Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    May 2009
    Posts
    4
    Vote Rating
    0
    knutsford-software is on a distinguished road

      0  

    Default Delete not working

    Delete not working


    If you try and delete more than one item the left hand panel doesn't get update. It is fine for the first item but the second one remain in the list even though it has been deleted ok. You have to refresh to seee the right contents

    The code is


    id : 'delete-node'
    , text:'Remove',
    iconCls:'delete-icon',
    scope: this,
    handler:function(){

    this.ctxNode.select();
    madSiteManager.resetSiteManager();
    madSiteManager.setSelected(this.ctxNode.id);
    Ext.MessageBox.confirm('Delete page or product?','Are you sure you want to delete this page or product? This will also delete any child pages!',function(btn)
    {
    if ( btn=='yes' )
    {
    Ext.Ajax.request({
    disableCache:true,
    url: 'controller.sitemanager.php',
    success:function(){node.ui.remove();},
    failure:function(){Ext.vSimple.msg('Delete','Unfortunately, we were unable to delete the selected item.');},
    params: { action: 'delete'
    , node_id:madSiteManager.getSelected()}

    });
    }
    });
    }


    The page is


    com.madano.vsimple.sitepanel.js


    The line that is the problem is

    success:function(){node.ui.remove();},



    How do you make sure that node.ui.remove() is removing the page that has been selected as it is still pointing to the first one that was deleted. I can't work out how to update it to madSiteManager.getSelected() instead

    Thanls

  2. #2

  3. #3
    Ext User
    Join Date
    May 2009
    Posts
    4
    Vote Rating
    0
    knutsford-software is on a distinguished road

      0  

    Default


    id: 'delete-node',
    text: 'Remove',
    iconCls: 'delete-icon',
    scope: this,
    handler: function() {

    this.ctxNode.select();
    madSiteManager.resetSiteManager();
    madSiteManager.setSelected(this.ctxNode.id);
    Ext.MessageBox.confirm('Delete page or product?', 'Are you sure you want to delete this page or product? This will also delete any child pages!',
    function(btn) {
    if (btn == 'yes') {
    Ext.Ajax.request({
    disableCache: true,
    url: 'controller.sitemanager.php',
    success: function() {
    node.ui.remove();
    },
    failure: function() {
    Ext.vSimple.msg('Delete', 'Unfortunately, we were unable to delete the selected item.');
    },
    params: {
    action: 'delete',
    node_id: madSiteManager.getSelected()
    }

    });
    }
    });
    }







    Sorry - that should be more readable

  4. #4
    Ext User
    Join Date
    May 2009
    Posts
    4
    Vote Rating
    0
    knutsford-software is on a distinguished road

      0  

    Default


    Code:
    id: 'delete-node',
    text: 'Remove',
    iconCls: 'delete-icon',
    scope: this,
    handler: function() {
    
        this.ctxNode.select();
        madSiteManager.resetSiteManager();
        madSiteManager.setSelected(this.ctxNode.id);
        Ext.MessageBox.confirm('Delete page or product?', 'Are you sure you want to delete this page or product? This will also delete any child pages!',
        function(btn) {
            if (btn == 'yes') {
                Ext.Ajax.request({
                    disableCache: true,
                    url: 'controller.sitemanager.php',
                    success: function() {
                        node.ui.remove();
                    },
                    failure: function() {
                        Ext.vSimple.msg('Delete', 'Unfortunately, we were unable to delete the selected item.');
                    },
                    params: {
                        action: 'delete',
                        node_id: madSiteManager.getSelected()
                    }
    
                });
            }
        });
    }
    Try again - sorry

Thread Participants: 1