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
    Sencha User
    Join Date
    Jul 2012
    Posts
    235
    Vote Rating
    0
    chandan.behura is on a distinguished road

      0  

    Default Window remains masking

    Window remains masking


    Hi,

    I have a problem in closing the window.
    I have a pop up window with an input text field and a save button.That pop up will come on click of a button.
    on click of save button the value of input text will save and pop up will close.
    The problem is after click on save button the value is getting saved and the pop up is closing but after that when i am again opening the pop up by clicking the button the trying to close it then the background remains masked.
    Bellow is the codes for ur review..
    Code of button for which the pop up will come
    Code:
    {
                xtype : 'button',
                text : '<img src="images/Preferences.png "/>',
                cls : 'iconButton',
                width : 40,
                height : 40,
                margin : 12,
                tooltip : '<b>Preference</b><br> Please click the button to insert an Preference',
                action : 'settings'
            }
    Controller part for the button
    Code:
    settingsFn: function() {
    
            prefWindow = new MY.view.PreferenceWindow;
            prefWindow.showAt(600,300);
        },
    mu pop up window
    Code:
    Ext.define('MY.view..PreferenceWindow', {
    extend:'Ext.window.Window',
    alias: 'widget.preferencewindow',
    id:'preferencewindow',
        title: 'My Preference',
        height: 200,
        width: 700,
        modal:true,
        layout: {
            type: 'hbox',
            align: 'middle'
        },
        items: [ {
             xtype: 'textfield',
             itemId:'prefName',
             hideLabel: true,
             flex: 1,
           },{
            xtype: 'button',
            text: 'Save',
            id:'saveId',
            action:'closePref',
        }
        ]   
    });
    In controller.....for save button
    Code:
    closePreffn: function() {
            var prefname = this.getPreferenceWindow().getComponent('prefName').getValue();
            var filterpanel=this.getSummaryLeftPanel();
            var scgrid = Ext.widget('scpopup').getComponent('sccheckgrid');
            var stcgrid = Ext.widget('stcpopup').getComponent('stccheckgrid');
            var scselection = scgrid.getSelectionModel().getSelection();
            var scselected = [];    
            for ( var i = 0; i < scselection.length; i++) {
                
                scselected.push(scselection[i].data.shippingConditionValue);
            }
            var stcselection = stcgrid.getSelectionModel().getSelection();
            var stcselected = [];    
            for ( var j = 0; j < stcselection.length; j++) {
                
                stcselected.push(stcselection[j].data.shipToCountryValue);
                
            }
            Ext.Ajax.request({
                
                url : './cutomerFreightCharges/1/insertPref.do',
                
                     params : {
                     shippingCondition : scselected,
                     shipToCountry : stcselected,
                     prefName : prefname
                     
                                    },
                            success : function(response){
                                var pref = Ext.getCmp('prference');
                                pref.getStore().reload();
    
                           } 
            });
            prefWindow.hide();
    
        }
    Actually the save button and the close(X) one working individually fine.
    But when i am clicking the save button then the window is getting closed and after that for second time when i am trying to close th window without clicking the save button the background remains masking.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It looks like you are recreating a window each time you click on the button but you only hide the window not close it. close() will destroy the window.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    235
    Vote Rating
    0
    chandan.behura is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    It looks like you are recreating a window each time you click on the button but you only hide the window not close it. close() will destroy the window.
    Then how i will meet my requirement of close the window after click on save button and (X) and again make it available on click of the preferences button.

  4. #4
    Sencha User
    Join Date
    May 2009
    Posts
    178
    Vote Rating
    2
    TampaBay55 is on a distinguished road

      0  

    Default


    I would close the window on a save, instead of hiding it.

    Code:
    prefWindow.close()
    In the settingsFn method I would do the following:
    Code:
    prefWindow = Ext.widget('preferencewindow').show();
    You may not even need the .show().
    This should create a new instance of the window and meet your requirements.

Thread Participants: 2

Tags for this Thread