diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js
index 9eccb802c6..78b9807811 100644
--- a/apps/documenteditor/main/app/controller/LeftMenu.js
+++ b/apps/documenteditor/main/app/controller/LeftMenu.js
@@ -432,7 +432,7 @@ define([
this.isFromFileDownloadAs = false;
},
- applySettings: function(menu) {
+ applySettings: function(menu, showmenu) {
var value;
value = Common.localStorage.getBool("de-settings-inputmode");
@@ -501,7 +501,7 @@ define([
this.api.put_ShowSnapLines(Common.Utils.InternalSettings.get("de-settings-showsnaplines"));
- menu.hide();
+ (!showmenu) && menu.hide();
},
onCreateNew: function(menu, type) {
diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js
index 041fb97955..71cb9eedba 100644
--- a/apps/documenteditor/main/app/view/FileMenu.js
+++ b/apps/documenteditor/main/app/view/FileMenu.js
@@ -69,7 +69,10 @@ define([
this.fireEvent('item:click', [this, item.options.action, !!panel]);
if (panel) {
- this.$el.find('.content-box:visible').hide();
+ if(this.active == 'opts')
+ this.panels[this.active].hide();
+ else
+ this.$el.find('.content-box:visible').hide();
this.active = item.options.action;
panel.show();
}
diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js
index f8929c1cea..bf15c73c4e 100644
--- a/apps/documenteditor/main/app/view/FileMenuPanels.js
+++ b/apps/documenteditor/main/app/view/FileMenuPanels.js
@@ -339,21 +339,21 @@ define([
'
',
'',
'
|
',
- '
',
+ /*'
',
' | ',
' | ',
- '
',
+ '',*/
'',
'
',
- '',
+ /* '
',
'
',
'',
' | ',
' | ',
'
',
'
',
- '
'
+ '
'*/
].join('')),
initialize: function(options) {
@@ -636,17 +636,17 @@ define([
dataHintDirection: 'left',
dataHintOffset: 'small'
});
-
- $markup.find('.btn.primary').each(function(index, el){
+ this.menu.on('menu:hide', _.bind(this.applySettings,this));
+ /*$markup.find('.btn.primary').each(function(index, el){
(new Common.UI.Button({
el: $(el)
})).on('click', _.bind(me.applySettings, me));
- });
+ });*/
this.pnlSettings = $markup.find('.flex-settings').addBack().filter('.flex-settings');
- this.pnlApply = $markup.find('.fms-flex-apply').addBack().filter('.fms-flex-apply');
+ //this.pnlApply = $markup.find('.fms-flex-apply').addBack().filter('.fms-flex-apply');
this.pnlTable = this.pnlSettings.find('table');
- this.trApply = $markup.find('.fms-btn-apply');
+ //this.trApply = $markup.find('.fms-btn-apply');
this.$el = $(node).html($markup);
@@ -673,13 +673,17 @@ define([
this.updateSettings();
this.updateScroller();
},
+ hide: function (){
+ Common.UI.BaseView.prototype.hide.call(this,arguments);
+ this.applySettings();
+ },
updateScroller: function() {
if (this.scroller) {
Common.UI.Menu.Manager.hideAll();
- var scrolled = this.$el.height()< this.pnlTable.parent().height() + 25 + this.pnlApply.height();
- this.pnlApply.toggleClass('hidden', !scrolled);
- this.trApply.toggleClass('hidden', scrolled);
+ var scrolled = this.$el.height()< this.pnlTable.parent().height() + 25;// + this.pnlApply.height();
+ //this.pnlApply.toggleClass('hidden', !scrolled);
+ //this.trApply.toggleClass('hidden', scrolled);
this.pnlSettings.css('overflow', scrolled ? 'hidden' : 'visible');
this.scroller.update();
this.pnlSettings.toggleClass('bordered', this.scroller.isVisible());
@@ -841,7 +845,7 @@ define([
Common.localStorage.save();
if (this.menu) {
- this.menu.fireEvent('settings:apply', [this.menu]);
+ this.menu.fireEvent('settings:apply', [this.menu, true]);
if (this._oldUnits !== this.cmbUnit.getValue())
Common.NotificationCenter.trigger('settings:unitschanged', this);