[DE] Bookmarks: save option for hidden bookmarks

This commit is contained in:
Julia Radzhabova 2018-03-29 11:53:42 +03:00
parent 9f77f3d792
commit 843e3632b5

View file

@ -176,7 +176,8 @@ define([
this.chHidden = new Common.UI.CheckBox({
el: $('#bookmarks-checkbox-hidden'),
labelText: this.textHidden
labelText: this.textHidden,
value: Common.Utils.InternalSettings.get("de-bookmarks-hidden") || false
});
this.chHidden.on('change', _.bind(this.onChangeHidden, this));
@ -191,6 +192,11 @@ define([
Common.Views.AdvancedSettingsWindow.prototype.show.apply(this, arguments);
},
close: function() {
Common.Views.AdvancedSettingsWindow.prototype.close.apply(this, arguments);
Common.Utils.InternalSettings.set("de-bookmarks-hidden", this.chHidden.getValue()=='checked');
},
_setDefaults: function (props) {
this.refreshBookmarks();
this.bookmarksList.scrollToRecord(this.bookmarksList.selectByIndex(0));
@ -204,7 +210,6 @@ define([
var state = (typeof(event) == 'object') ? event.currentTarget.attributes['result'].value : event;
if (state == 'add') {
this.props.asc_AddBookmark(this.txtName.getValue());
// this.handler && this.handler.call(this, state, (state == 'add') ? this.getSettings() : undefined);
}
this.close();