From 7629b9c73473ea61a17d0d284ec4931eb92726c9 Mon Sep 17 00:00:00 2001 From: Alexander Yuzhin Date: Thu, 1 Dec 2016 14:37:22 +0300 Subject: [PATCH] [DE mobile] Fixed highlight search results. --- apps/documenteditor/mobile/app/controller/Search.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Search.js b/apps/documenteditor/mobile/app/controller/Search.js index 8f960881b..e3026c38d 100644 --- a/apps/documenteditor/mobile/app/controller/Search.js +++ b/apps/documenteditor/mobile/app/controller/Search.js @@ -178,17 +178,18 @@ define([ $inputHighlight = $pageSettings.find('#search-highlight-results input:checkbox'); $inputType.val([isReplace ? 'replace' : 'search']); - $inputCase.attr('checked', isCaseSensitive); - $inputHighlight.attr('checked', isHighlight); + $inputCase.prop('checked', isCaseSensitive); + $inputHighlight.prop('checked', isHighlight); // init events - $inputType.single('change', _.bind(me.onTypeChange, me)); - $inputCase.single('click', _.bind(me.onCaseClick, me)); - $inputHighlight.single('click', _.bind(me.onHighlightClick, me)); + $inputType.single('change', _.bind(me.onTypeChange, me)); + $inputCase.single('change', _.bind(me.onCaseClick, me)); + $inputHighlight.single('change', _.bind(me.onHighlightClick, me)); }, onSearchbarShow: function(bar) { _isShow = true; + this.api.asc_selectSearchingResults(Common.SharedSettings.get('search-highlight')); }, onSearchEnable: function (bar) { @@ -197,6 +198,7 @@ define([ onSearchbarHide: function(bar) { _isShow = false; + this.api.asc_selectSearchingResults(false); }, onSearchChange: function(search) { @@ -325,6 +327,7 @@ define([ onHighlightClick: function (e) { Common.SharedSettings.set('search-highlight', $(e.currentTarget).is(':checked')); + this.api.asc_selectSearchingResults(Common.SharedSettings.get('search-highlight')); }, // API handlers