[Common] refactoring
This commit is contained in:
parent
e4faebd1d0
commit
44e1eb0e8d
|
@ -242,12 +242,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);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,16 +301,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