[DE mobile][PE mobile] Refactoring spellcheck. Bug 42696
This commit is contained in:
parent
2a141b4ceb
commit
be9772abaf
|
@ -535,7 +535,8 @@ define([
|
|||
value = Common.localStorage.getItem("de-show-tableline");
|
||||
me.api.put_ShowTableEmptyLine((value!==null) ? eval(value) : true);
|
||||
|
||||
value = Common.localStorage.getBool("de-mobile-spellcheck", false);
|
||||
value = Common.localStorage.getBool("de-mobile-spellcheck", !(this.appOptions.customization && this.appOptions.customization.spellcheck===false));
|
||||
Common.Utils.InternalSettings.set("de-mobile-spellcheck", value);
|
||||
me.api.asc_setSpellCheck(value);
|
||||
|
||||
me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me));
|
||||
|
|
|
@ -229,7 +229,7 @@ define([
|
|||
Common.Utils.addScrollIfNeed('.page[data-page=settings-about-view]', '.page[data-page=settings-about-view] .page-content');
|
||||
} else if ('#settings-advanced-view' == pageId) {
|
||||
me.initPageAdvancedSettings();
|
||||
$('#settings-spellcheck input:checkbox').attr('checked', Common.localStorage.getBool("de-mobile-spellcheck", false));
|
||||
$('#settings-spellcheck input:checkbox').attr('checked', Common.Utils.InternalSettings.get("de-mobile-spellcheck"));
|
||||
$('#settings-spellcheck input:checkbox').single('change', _.bind(me.onSpellcheck, me));
|
||||
$('#settings-no-characters input:checkbox').attr('checked', (Common.localStorage.getItem("de-mobile-no-characters") == 'true') ? true : false);
|
||||
$('#settings-no-characters input:checkbox').single('change', _.bind(me.onNoCharacters, me));
|
||||
|
@ -543,6 +543,7 @@ define([
|
|||
var $checkbox = $(e.currentTarget),
|
||||
state = $checkbox.is(':checked');
|
||||
Common.localStorage.setItem("de-mobile-spellcheck", state ? 1 : 0);
|
||||
Common.Utils.InternalSettings.set("de-mobile-spellcheck", state);
|
||||
this.api && this.api.asc_setSpellCheck(state);
|
||||
},
|
||||
|
||||
|
|
|
@ -497,7 +497,8 @@ define([
|
|||
var zf = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.zoom ? parseInt(me.appOptions.customization.zoom) : -1);
|
||||
(zf == -1) ? me.api.zoomFitToPage() : ((zf == -2) ? me.api.zoomFitToWidth() : me.api.zoom(zf>0 ? zf : 100));
|
||||
|
||||
value = Common.localStorage.getBool("pe-mobile-spellcheck", false);
|
||||
value = Common.localStorage.getBool("pe-mobile-spellcheck", !(this.appOptions.customization && this.appOptions.customization.spellcheck===false));
|
||||
Common.Utils.InternalSettings.set("pe-mobile-spellcheck", value);
|
||||
me.api.asc_setSpellCheck(value);
|
||||
|
||||
me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me));
|
||||
|
|
|
@ -156,7 +156,7 @@ define([
|
|||
|
||||
onPageShow: function(view, pageId) {
|
||||
var me = this;
|
||||
$('#settings-spellcheck input:checkbox').attr('checked', Common.localStorage.getBool("pe-mobile-spellcheck", false));
|
||||
$('#settings-spellcheck input:checkbox').attr('checked', Common.Utils.InternalSettings.get("pe-mobile-spellcheck"));
|
||||
$('#settings-search').single('click', _.bind(me._onSearch, me));
|
||||
$('#settings-readermode input:checkbox').single('change', _.bind(me._onReaderMode, me));
|
||||
$('#settings-spellcheck input:checkbox').single('change', _.bind(me._onSpellcheck, me));
|
||||
|
@ -357,6 +357,7 @@ define([
|
|||
var $checkbox = $(e.currentTarget),
|
||||
state = $checkbox.is(':checked');
|
||||
Common.localStorage.setItem("pe-mobile-spellcheck", state ? 1 : 0);
|
||||
Common.Utils.InternalSettings.set("pe-mobile-spellcheck", state);
|
||||
this.api && this.api.asc_setSpellCheck(state);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue