[SSE] Save height of the formula bar in the browser local storage
This commit is contained in:
parent
ea251e41ca
commit
d895ecde62
|
@ -119,6 +119,14 @@ define([
|
||||||
this.bindViewEvents(this.editor, this.events);
|
this.bindViewEvents(this.editor, this.events);
|
||||||
|
|
||||||
this.editor.$el.parent().find('.after').css({zIndex: '4'}); // for spreadsheets - bug 23127
|
this.editor.$el.parent().find('.after').css({zIndex: '4'}); // for spreadsheets - bug 23127
|
||||||
|
|
||||||
|
var val = Common.localStorage.getItem('sse-celleditor-height');
|
||||||
|
this.editor.keep_height = (val!==null && parseInt(val)>0) ? parseInt(val) : 74;
|
||||||
|
if (Common.localStorage.getBool('sse-celleditor-expand')) {
|
||||||
|
this.editor.$el.height(this.editor.keep_height);
|
||||||
|
this.onLayoutResize(undefined, 'cell:edit');
|
||||||
|
}
|
||||||
|
|
||||||
this.editor.btnNamedRanges.menu.on('item:click', _.bind(this.onNamedRangesMenu, this))
|
this.editor.btnNamedRanges.menu.on('item:click', _.bind(this.onNamedRangesMenu, this))
|
||||||
.on('show:before', _.bind(this.onNameBeforeShow, this));
|
.on('show:before', _.bind(this.onNameBeforeShow, this));
|
||||||
this.namedrange_locked = false;
|
this.namedrange_locked = false;
|
||||||
|
@ -180,8 +188,11 @@ define([
|
||||||
if (this.editor.$el.height() > 19) {
|
if (this.editor.$el.height() > 19) {
|
||||||
if (!this.editor.$btnexpand.hasClass('btn-collapse'))
|
if (!this.editor.$btnexpand.hasClass('btn-collapse'))
|
||||||
this.editor.$btnexpand['addClass']('btn-collapse');
|
this.editor.$btnexpand['addClass']('btn-collapse');
|
||||||
|
o && Common.localStorage.setItem('sse-celleditor-height', this.editor.$el.height());
|
||||||
|
o && Common.localStorage.setBool('sse-celleditor-expand', true);
|
||||||
} else {
|
} else {
|
||||||
this.editor.$btnexpand['removeClass']('btn-collapse');
|
this.editor.$btnexpand['removeClass']('btn-collapse');
|
||||||
|
o && Common.localStorage.setBool('sse-celleditor-expand', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -218,9 +229,11 @@ define([
|
||||||
this.editor.keep_height = this.editor.$el.height();
|
this.editor.keep_height = this.editor.$el.height();
|
||||||
this.editor.$el.height(19);
|
this.editor.$el.height(19);
|
||||||
this.editor.$btnexpand['removeClass']('btn-collapse');
|
this.editor.$btnexpand['removeClass']('btn-collapse');
|
||||||
|
Common.localStorage.setBool('sse-celleditor-expand', false);
|
||||||
} else {
|
} else {
|
||||||
this.editor.$el.height(this.editor.keep_height||74);
|
this.editor.$el.height(this.editor.keep_height);
|
||||||
this.editor.$btnexpand['addClass']('btn-collapse');
|
this.editor.$btnexpand['addClass']('btn-collapse');
|
||||||
|
Common.localStorage.setBool('sse-celleditor-expand', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.NotificationCenter.trigger('layout:changed', 'celleditor');
|
Common.NotificationCenter.trigger('layout:changed', 'celleditor');
|
||||||
|
|
Loading…
Reference in a new issue