[Common] locked timed toolbar collapsing
This commit is contained in:
parent
1a61bdcf06
commit
52169b80ce
|
@ -125,10 +125,13 @@ define([
|
||||||
optsFold.$bar.toggleClass('expanded', true).addClass('folded');
|
optsFold.$bar.toggleClass('expanded', true).addClass('folded');
|
||||||
optsFold.$box.on({
|
optsFold.$box.on({
|
||||||
mouseleave: function (e) {
|
mouseleave: function (e) {
|
||||||
optsFold.timer = setTimeout(me.collapse, optsFold.timeout);
|
// optsFold.timer = setTimeout( function(e) {
|
||||||
|
// clearTimeout(optsFold.timer);
|
||||||
|
// me.collapse();
|
||||||
|
// }, optsFold.timeout);
|
||||||
},
|
},
|
||||||
mouseenter: function (e) {
|
mouseenter: function (e) {
|
||||||
clearTimeout(optsFold.timer);
|
// clearTimeout(optsFold.timer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -157,26 +160,27 @@ define([
|
||||||
// });
|
// });
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
clearTimeout(optsFold.timer);
|
// clearTimeout(optsFold.timer);
|
||||||
optsFold.$bar.removeClass('folded');
|
optsFold.$bar.removeClass('folded');
|
||||||
optsFold.$box.off();
|
optsFold.$box.off();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
collapse: function() {
|
collapse: function() {
|
||||||
|
Common.UI.Menu.Manager.hideAll();
|
||||||
|
// clearTimeout(optsFold.timer);
|
||||||
|
|
||||||
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');
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.UI.Menu.Manager.hideAll();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
expand: function() {
|
expand: function() {
|
||||||
clearTimeout(optsFold.timer);
|
// clearTimeout(optsFold.timer);
|
||||||
|
|
||||||
optsFold.$bar.addClass('expanded');
|
optsFold.$bar.addClass('expanded');
|
||||||
optsFold.timer = setTimeout(this.collapse, optsFold.timeout);
|
// optsFold.timer = setTimeout(this.collapse, optsFold.timeout);
|
||||||
},
|
},
|
||||||
|
|
||||||
onResize: function(e) {
|
onResize: function(e) {
|
||||||
|
|
Loading…
Reference in a new issue