[Common] refactoring
This commit is contained in:
parent
ceaf3371c6
commit
1afc0e47de
|
@ -246,12 +246,15 @@ define([
|
||||||
menu.render(menuContainer);
|
menu.render(menuContainer);
|
||||||
menu.cmpEl.attr({tabindex: "-1"});
|
menu.cmpEl.attr({tabindex: "-1"});
|
||||||
|
|
||||||
menu.on('show:after', function(cmp) {
|
menu.on({
|
||||||
if (cmp && cmp.menuAlignEl)
|
'show:after': function(cmp) {
|
||||||
cmp.menuAlignEl.toggleClass('over', true);
|
if (cmp && cmp.menuAlignEl)
|
||||||
}).on('hide:after', function(cmp) {
|
cmp.menuAlignEl.toggleClass('over', true);
|
||||||
if (cmp && cmp.menuAlignEl)
|
},
|
||||||
cmp.menuAlignEl.toggleClass('over', false);
|
'hide:after': function(cmp) {
|
||||||
|
if (cmp && cmp.menuAlignEl)
|
||||||
|
cmp.menuAlignEl.toggleClass('over', false);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,16 +305,22 @@ define([
|
||||||
buttons: isCustomWindow ? undefined : newBtns,
|
buttons: isCustomWindow ? undefined : newBtns,
|
||||||
toolcallback: _.bind(this.onToolClose, this)
|
toolcallback: _.bind(this.onToolClose, this)
|
||||||
});
|
});
|
||||||
me.pluginDlg.on('render:after', function(obj){
|
me.pluginDlg.on({
|
||||||
obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me));
|
'render:after': function(obj){
|
||||||
me.pluginContainer = me.pluginDlg.$window.find('#id-plugin-container');
|
obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me));
|
||||||
}).on('close', function(obj){
|
me.pluginContainer = me.pluginDlg.$window.find('#id-plugin-container');
|
||||||
me.pluginDlg = undefined;
|
},
|
||||||
}).on('drag', function(args){
|
'close': function(obj){
|
||||||
me.api.asc_pluginEnableMouseEvents(args[1]=='start');
|
me.pluginDlg = undefined;
|
||||||
}).on('resize', function(args){
|
},
|
||||||
me.api.asc_pluginEnableMouseEvents(args[1]=='start');
|
'drag': function(args){
|
||||||
|
me.api.asc_pluginEnableMouseEvents(args[1]=='start');
|
||||||
|
},
|
||||||
|
'resize': function(args){
|
||||||
|
me.api.asc_pluginEnableMouseEvents(args[1]=='start');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
me.pluginDlg.show();
|
me.pluginDlg.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue