[Common] refactoring
This commit is contained in:
parent
b7a17a2fee
commit
cb9b82e0f0
|
@ -73,7 +73,7 @@ define([
|
||||||
if ( this.isFolded ) {
|
if ( this.isFolded ) {
|
||||||
if ( $(e.target).parents('.toolbar').length ){
|
if ( $(e.target).parents('.toolbar').length ){
|
||||||
} else {
|
} else {
|
||||||
this.collapseToolbar();
|
this.collapse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ define([
|
||||||
optsFold.$bar.addClass('folded');
|
optsFold.$bar.addClass('folded');
|
||||||
optsFold.$box.on({
|
optsFold.$box.on({
|
||||||
mouseleave: function (e) {
|
mouseleave: function (e) {
|
||||||
optsFold.timer = setTimeout(me.collapseToolbar, optsFold.timeout);
|
optsFold.timer = setTimeout(me.collapse, optsFold.timeout);
|
||||||
},
|
},
|
||||||
mouseenter: function (e) {
|
mouseenter: function (e) {
|
||||||
clearTimeout(optsFold.timer);
|
clearTimeout(optsFold.timer);
|
||||||
|
@ -163,7 +163,7 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
collapseToolbar: function() {
|
collapse: function() {
|
||||||
if ( this.isFolded && optsFold.$bar ) {
|
if ( this.isFolded && optsFold.$bar ) {
|
||||||
optsFold.$bar.removeClass('expanded');
|
optsFold.$bar.removeClass('expanded');
|
||||||
optsFold.$bar.find('.tabs .ribtab').removeClass('active');
|
optsFold.$bar.find('.tabs .ribtab').removeClass('active');
|
||||||
|
@ -172,11 +172,11 @@ define([
|
||||||
Common.UI.Menu.Manager.hideAll();
|
Common.UI.Menu.Manager.hideAll();
|
||||||
},
|
},
|
||||||
|
|
||||||
expandToolbar: function() {
|
expand: function() {
|
||||||
clearTimeout(optsFold.timer);
|
clearTimeout(optsFold.timer);
|
||||||
|
|
||||||
optsFold.$bar.addClass('expanded');
|
optsFold.$bar.addClass('expanded');
|
||||||
optsFold.timer = setTimeout(this.collapseToolbar, optsFold.timeout);
|
optsFold.timer = setTimeout(this.collapse, optsFold.timeout);
|
||||||
},
|
},
|
||||||
|
|
||||||
onResize: function(e) {
|
onResize: function(e) {
|
||||||
|
@ -213,10 +213,11 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( panel.length ) {
|
if ( panel.length ) {
|
||||||
if ( this.isFolded ) this.expandToolbar();
|
if ( this.isFolded ) this.expand();
|
||||||
} else {
|
} else {
|
||||||
onShowFullviewPanel.call(this, true);
|
onShowFullviewPanel.call(this, true);
|
||||||
if ( this.isFolded ) this.collapseToolbar();
|
if ( this.isFolded ) this.collapse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -347,7 +347,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onContextMenu: function() {
|
onContextMenu: function() {
|
||||||
this.toolbar.collapseToolbar();
|
this.toolbar.collapse();
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiFontSize: function(size) {
|
onApiFontSize: function(size) {
|
||||||
|
|
Loading…
Reference in a new issue