[Common] debug toolbar's collapsing

This commit is contained in:
Maxim Kadushkin 2017-07-10 18:34:10 +03:00
parent cb9b82e0f0
commit 70a9e6deb5

View file

@ -122,7 +122,7 @@ define([
if ( this.isFolded ) { if ( this.isFolded ) {
if (!optsFold.$box) optsFold.$box = me.$el.find('.box-controls'); if (!optsFold.$box) optsFold.$box = me.$el.find('.box-controls');
optsFold.$bar.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(me.collapse, optsFold.timeout);
@ -193,7 +193,7 @@ define([
if ( !tab ) { if ( !tab ) {
onShowFullviewPanel.call(this, false); onShowFullviewPanel.call(this, false);
if ( this.isFolded ) { /*this.collapseToolbar();*/ } if ( this.isFolded ) { this.collapse(); }
else tab = this.lastPanel; else tab = this.lastPanel;
} }
@ -207,17 +207,16 @@ define([
panel.addClass('active'); panel.addClass('active');
} }
var $tp = this.$tabs.find('> a[data-tab=' + tab + ']').parent();
if ( $tp.length ) {
$tp.addClass('active');
}
if ( panel.length ) { if ( panel.length ) {
if ( this.isFolded ) this.expand(); if ( this.isFolded ) this.expand();
} else { } else {
onShowFullviewPanel.call(this, true); onShowFullviewPanel.call(this, true);
if ( this.isFolded ) this.collapse(); if ( this.isFolded ) this.collapse();
} }
var $tp = this.$tabs.find('> a[data-tab=' + tab + ']').parent();
if ( $tp.length ) {
$tp.addClass('active');
} }
} }
}, },