Jan 07, 2016, 9:34 PM
TreeNode - Ext.msg.confirm
Hi All,
I have below two functions, when ever user click on the treenode it wil select the selected value. When the user tries to switch to another node i should pop up a message with yes/No button. If the user clicks on yes it should remain on same treenode or else move to the new node. How do i get that ?
sree
I have below two functions, when ever user click on the treenode it wil select the selected value. When the user tries to switch to another node i should pop up a message with yes/No button. If the user clicks on yes it should remain on same treenode or else move to the new node. How do i get that ?
init: function () {
this.loadStores();
this.control({
'#btnApiBuilderExport': { click: this.onBtnApiBuilderExport },
'assettreepanel': { itemclick: this.onTreeNodeSelected },
'#searchAssetTree': { change: { fn: this.searchAssetTree, buffer: 300} }
});
},
onTreeNodeSelected: function (view, record, item, index) {
nodeSelectedvalue = record;
var attributeFilterCtrl = this.application.getController('AttributeFilterCtrl');
var selAttributeStore = Ext.getStore('apibuilder.SelectedAttributes');
var selFilterStore = Ext.getStore('apibuilder.Filters');
if (selAttributeStore.data.length > 0 || selFilterStore.data.length > 0) {
Ext.Msg.confirm('Save Changes?', 'You are changing Asset type that may have unused changes. Would you like to save your changes?', function (btn, text) {
if (btn == 'yes') {
}
}, this);
}
attributeFilterCtrl.refreshStores();
}
Thanksree
Last edited by fabricio.murta; Jan 09, 2016 at 12:18 AM.