From dab6db4c98bc03531b33ebbe15b253019a0dba16 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 7 Dec 2020 13:10:04 +0300 Subject: [PATCH] [DE mobile] Fix Bug 47807 --- apps/documenteditor/mobile/app/controller/Main.js | 10 ++-------- apps/documenteditor/mobile/app/controller/Settings.js | 5 +++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 70476926e..885b392df 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -555,12 +555,6 @@ define([ var zf = (value!==null) ? parseInt(value) : (this.appOptions.customization && this.appOptions.customization.zoom ? parseInt(this.appOptions.customization.zoom) : 100); (zf == -1) ? this.api.zoomFitToPage() : ((zf == -2) ? this.api.zoomFitToWidth() : this.api.zoom(zf>0 ? zf : 100)); - value = Common.localStorage.getItem("de-show-hiddenchars"); - me.api.put_ShowParaMarks((value!==null) ? eval(value) : false); - - value = Common.localStorage.getItem("de-show-tableline"); - me.api.put_ShowTableEmptyLine((value!==null) ? eval(value) : true); - 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); @@ -575,10 +569,10 @@ define([ me.api.SetTextBoxInputMode(Common.localStorage.getBool("de-settings-inputmode")); value = Common.localStorage.getItem("de-mobile-no-characters"); - me.api.put_ShowParaMarks((value!==null) ? eval(value) : false); + me.api.put_ShowParaMarks(value==='true'); value = Common.localStorage.getItem("de-mobile-hidden-borders"); - me.api.put_ShowTableEmptyLine((value!==null) ? eval(value) : true); + me.api.put_ShowTableEmptyLine(value===null || value==='true'); /** coauthoring begin **/ if (me.appOptions.isEdit && me.appOptions.canLicense && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) { diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index feb6b6554..2c2d9a36c 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -236,9 +236,10 @@ define([ me.initPageAdvancedSettings(); $('#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').attr('checked', Common.localStorage.getItem("de-mobile-no-characters") === 'true'); $('#settings-no-characters input:checkbox').single('change', _.bind(me.onNoCharacters, me)); - $('#settings-hidden-borders input:checkbox').attr('checked', (Common.localStorage.getItem("de-mobile-hidden-borders") == 'true') ? true : false); + var value = Common.localStorage.getItem("de-mobile-hidden-borders"); + $('#settings-hidden-borders input:checkbox').attr('checked', value===null || value==='true'); $('#settings-hidden-borders input:checkbox').single('change', _.bind(me.onShowTableEmptyLine, me)); $('#settings-orthography').single('click', _.bind(me.onOrthographyCheck, me)); var displayComments = Common.localStorage.getBool("de-mobile-settings-livecomment", true);