Revert commit 4d5cf5700e
[4d5cf57
]
(DE advanced settings without button apply)
This commit is contained in:
parent
f9571ab875
commit
0137bb22a4
|
@ -433,7 +433,7 @@ define([
|
||||||
this.isFromFileDownloadAs = false;
|
this.isFromFileDownloadAs = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
applySettings: function(menu, showmenu) {
|
applySettings: function(menu) {
|
||||||
var value;
|
var value;
|
||||||
|
|
||||||
value = Common.localStorage.getBool("de-settings-inputmode");
|
value = Common.localStorage.getBool("de-settings-inputmode");
|
||||||
|
@ -502,7 +502,7 @@ define([
|
||||||
|
|
||||||
this.api.put_ShowSnapLines(Common.Utils.InternalSettings.get("de-settings-showsnaplines"));
|
this.api.put_ShowSnapLines(Common.Utils.InternalSettings.get("de-settings-showsnaplines"));
|
||||||
|
|
||||||
(!showmenu) && menu.hide();
|
menu.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
onCreateNew: function(menu, type) {
|
onCreateNew: function(menu, type) {
|
||||||
|
|
|
@ -69,10 +69,7 @@ define([
|
||||||
this.fireEvent('item:click', [this, item.options.action, !!panel]);
|
this.fireEvent('item:click', [this, item.options.action, !!panel]);
|
||||||
|
|
||||||
if (panel) {
|
if (panel) {
|
||||||
if(this.active == 'opts')
|
this.$el.find('.content-box:visible').hide();
|
||||||
this.panels[this.active].hide();
|
|
||||||
else
|
|
||||||
this.$el.find('.content-box:visible').hide();
|
|
||||||
this.active = item.options.action;
|
this.active = item.options.action;
|
||||||
panel.show();
|
panel.show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -355,21 +355,21 @@ define([
|
||||||
'<div><div id="fms-cmb-macros" style="display: inline-block; margin-right: 15px; vertical-align: middle;"></div>',
|
'<div><div id="fms-cmb-macros" style="display: inline-block; margin-right: 15px; vertical-align: middle;"></div>',
|
||||||
'</tr>',
|
'</tr>',
|
||||||
'<tr class ="divider-group"></tr>',
|
'<tr class ="divider-group"></tr>',
|
||||||
/*'<tr class="fms-btn-apply">',
|
'<tr class="fms-btn-apply">',
|
||||||
'<td style="padding-top:15px; padding-bottom: 15px;"><button class="btn normal dlg-btn primary" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.okButtonText %></button></td>',
|
'<td style="padding-top:15px; padding-bottom: 15px;"><button class="btn normal dlg-btn primary" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.okButtonText %></button></td>',
|
||||||
'<td></td>',
|
'<td></td>',
|
||||||
'</tr>',*/
|
'</tr>',
|
||||||
'</tbody></table>',
|
'</tbody></table>',
|
||||||
|
|
||||||
'</div>',
|
'</div>',
|
||||||
/* '<div class="fms-flex-apply hidden">',
|
'<div class="fms-flex-apply hidden">',
|
||||||
'<table style="margin: 10px 14px;"><tbody>',
|
'<table style="margin: 10px 14px;"><tbody>',
|
||||||
'<tr>',
|
'<tr>',
|
||||||
'<td><button class="btn normal dlg-btn primary" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.okButtonText %></button></td>',
|
'<td><button class="btn normal dlg-btn primary" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.okButtonText %></button></td>',
|
||||||
'<td></td>',
|
'<td></td>',
|
||||||
'</tr>',
|
'</tr>',
|
||||||
'</tbody></table>',
|
'</tbody></table>',
|
||||||
'</div>'*/
|
'</div>'
|
||||||
].join('')),
|
].join('')),
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
|
@ -652,17 +652,16 @@ define([
|
||||||
dataHintDirection: 'left',
|
dataHintDirection: 'left',
|
||||||
dataHintOffset: 'small'
|
dataHintOffset: 'small'
|
||||||
});
|
});
|
||||||
this.menu.on('menu:hide', _.bind(this.applySettings,this));
|
$markup.find('.btn.primary').each(function(index, el){
|
||||||
/*$markup.find('.btn.primary').each(function(index, el){
|
|
||||||
(new Common.UI.Button({
|
(new Common.UI.Button({
|
||||||
el: $(el)
|
el: $(el)
|
||||||
})).on('click', _.bind(me.applySettings, me));
|
})).on('click', _.bind(me.applySettings, me));
|
||||||
});*/
|
});
|
||||||
|
|
||||||
this.pnlSettings = $markup.find('.flex-settings').addBack().filter('.flex-settings');
|
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.pnlTable = this.pnlSettings.find('table');
|
||||||
//this.trApply = $markup.find('.fms-btn-apply');
|
this.trApply = $markup.find('.fms-btn-apply');
|
||||||
|
|
||||||
this.$el = $(node).html($markup);
|
this.$el = $(node).html($markup);
|
||||||
|
|
||||||
|
@ -689,17 +688,13 @@ define([
|
||||||
this.updateSettings();
|
this.updateSettings();
|
||||||
this.updateScroller();
|
this.updateScroller();
|
||||||
},
|
},
|
||||||
hide: function (){
|
|
||||||
Common.UI.BaseView.prototype.hide.call(this,arguments);
|
|
||||||
this.applySettings();
|
|
||||||
},
|
|
||||||
|
|
||||||
updateScroller: function() {
|
updateScroller: function() {
|
||||||
if (this.scroller) {
|
if (this.scroller) {
|
||||||
Common.UI.Menu.Manager.hideAll();
|
Common.UI.Menu.Manager.hideAll();
|
||||||
var scrolled = this.$el.height()< this.pnlTable.parent().height() + 25;// + this.pnlApply.height();
|
var scrolled = this.$el.height()< this.pnlTable.parent().height() + 25 + this.pnlApply.height();
|
||||||
//this.pnlApply.toggleClass('hidden', !scrolled);
|
this.pnlApply.toggleClass('hidden', !scrolled);
|
||||||
//this.trApply.toggleClass('hidden', scrolled);
|
this.trApply.toggleClass('hidden', scrolled);
|
||||||
this.pnlSettings.css('overflow', scrolled ? 'hidden' : 'visible');
|
this.pnlSettings.css('overflow', scrolled ? 'hidden' : 'visible');
|
||||||
this.scroller.update();
|
this.scroller.update();
|
||||||
this.pnlSettings.toggleClass('bordered', this.scroller.isVisible());
|
this.pnlSettings.toggleClass('bordered', this.scroller.isVisible());
|
||||||
|
@ -861,7 +856,7 @@ define([
|
||||||
Common.localStorage.save();
|
Common.localStorage.save();
|
||||||
|
|
||||||
if (this.menu) {
|
if (this.menu) {
|
||||||
this.menu.fireEvent('settings:apply', [this.menu, true]);
|
this.menu.fireEvent('settings:apply', [this.menu]);
|
||||||
|
|
||||||
if (this._oldUnits !== this.cmbUnit.getValue())
|
if (this._oldUnits !== this.cmbUnit.getValue())
|
||||||
Common.NotificationCenter.trigger('settings:unitschanged', this);
|
Common.NotificationCenter.trigger('settings:unitschanged', this);
|
||||||
|
|
Loading…
Reference in a new issue