diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 46060e89c..176d92429 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -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)); diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index 4e1eb3f7e..ba3138074 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -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); }, diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index da95d6730..b777fa609 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -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)); diff --git a/apps/presentationeditor/mobile/app/controller/Settings.js b/apps/presentationeditor/mobile/app/controller/Settings.js index aa85b12be..c8efc0556 100644 --- a/apps/presentationeditor/mobile/app/controller/Settings.js +++ b/apps/presentationeditor/mobile/app/controller/Settings.js @@ -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); },