diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 2276dedc2..84fd58d81 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -97,14 +97,6 @@ define([ 'file:close': this.clickToolbarTab.bind(this, 'other'), 'save:disabled': this.changeToolbarSaveState.bind(this) }, - 'SearchDialog': { - 'hide': _.bind(this.onSearchDlgHide, this), - 'search:back': _.bind(this.onQuerySearch, this, 'back'), - 'search:next': _.bind(this.onQuerySearch, this, 'next'), - 'search:replace': _.bind(this.onQueryReplace, this), - 'search:replaceall': _.bind(this.onQueryReplaceAll, this), - 'search:highlight': _.bind(this.onSearchHighlight, this) - }, 'Common.Views.ReviewChanges': { 'collaboration:chat': _.bind(this.onShowHideChat, this) }, @@ -126,7 +118,6 @@ define([ onLaunch: function() { this.leftMenu = this.createView('LeftMenu').render(); - this.leftMenu.btnSearch.on('toggle', _.bind(this.onMenuSearch, this)); this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this)); Common.util.Shortcuts.delegateShortcuts({ @@ -149,7 +140,6 @@ define([ setApi: function(api) { this.api = api; - this.api.asc_registerCallback('asc_onReplaceAll', _.bind(this.onApiTextReplaced, this)); this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiServerDisconnect, this)); this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this)); @@ -564,86 +554,6 @@ define([ }, /** coauthoring end **/ - onQuerySearch: function(d, w, opts) { - if (opts.textsearch && opts.textsearch.length) { - if (!this.api.asc_findText(opts.textsearch, d != 'back', opts.matchcase, opts.matchword)) { - var me = this; - Common.UI.info({ - msg: this.textNoTextFound, - callback: function() { - me.dlgSearch.focus(); - } - }); - } - } - }, - - onQueryReplace: function(w, opts) { - if (!_.isEmpty(opts.textsearch)) { - if (!this.api.asc_replaceText(opts.textsearch, opts.textreplace, false, opts.matchcase, opts.matchword)) { - var me = this; - Common.UI.info({ - msg: this.textNoTextFound, - callback: function() { - me.dlgSearch.focus(); - } - }); - } - } - }, - - onQueryReplaceAll: function(w, opts) { - if (!_.isEmpty(opts.textsearch)) { - this.api.asc_replaceText(opts.textsearch, opts.textreplace, true, opts.matchcase, opts.matchword); - } - }, - - onSearchHighlight: function(w, highlight) { - this.api.asc_selectSearchingResults(highlight); - }, - - showSearchDlg: function(show,action) { - if ( !this.dlgSearch ) { - this.dlgSearch = (new Common.UI.SearchDialog({ - matchcase: true, - markresult: {applied: true} - })); - } - - if (show) { - var mode = this.mode.isEdit && !this.viewmode ? (action || undefined) : 'no-replace'; - if (this.dlgSearch.isVisible()) { - this.dlgSearch.setMode(mode); - this.dlgSearch.setSearchText(this.api.asc_GetSelectedText()); - this.dlgSearch.focus(); - } else { - this.dlgSearch.show(mode, this.api.asc_GetSelectedText()); - } - } else this.dlgSearch['hide'](); - }, - - onMenuSearch: function(obj, show) { - this.showSearchDlg(show); - }, - - onSearchDlgHide: function() { - this.leftMenu.btnSearch.toggle(false, true); - this.api.asc_selectSearchingResults(false); - $(this.leftMenu.btnSearch.el).blur(); - this.api.asc_enableKeyEvents(true); - }, - - onApiTextReplaced: function(found,replaced) { - var me = this; - if (found) { - !(found - replaced > 0) ? - Common.UI.info( {msg: Common.Utils.String.format(this.textReplaceSuccess, replaced)} ) : - Common.UI.warning( {msg: Common.Utils.String.format(this.textReplaceSkipped, found-replaced)} ); - } else { - Common.UI.info({msg: this.textNoTextFound}); - } - }, - onApiServerDisconnect: function(enableDownload) { this.mode.isEdit = false; this.leftMenu.close(); @@ -656,18 +566,12 @@ define([ this.leftMenu.btnNavigation.setDisabled(true); this.leftMenu.getMenu('file').setMode({isDisconnected: true, enableDownload: !!enableDownload}); - if ( this.dlgSearch ) { - this.leftMenu.btnSearch.toggle(false, true); - this.dlgSearch['hide'](); - } }, setPreviewMode: function(mode) { if (this.viewmode === mode) return; this.viewmode = mode; - this.dlgSearch && this.dlgSearch.setMode(this.viewmode ? 'no-replace' : 'search'); - this.leftMenu.panelSearch && this.leftMenu.panelSearch.setSearchMode(this.viewmode ? 'no-replace' : 'search'); }, @@ -762,12 +666,6 @@ define([ }, menuFilesShowHide: function(state) { - if ( this.dlgSearch ) { - if ( state == 'show' ) - this.dlgSearch.suspendKeyEvents(); - else - Common.Utils.asyncCall(this.dlgSearch.resumeKeyEvents, this.dlgSearch); - } if (this.api && state == 'hide') this.api.asc_enableKeyEvents(true); }, diff --git a/apps/documenteditor/main/app/template/LeftMenu.template b/apps/documenteditor/main/app/template/LeftMenu.template index f1b280f03..fa0abf7c2 100644 --- a/apps/documenteditor/main/app/template/LeftMenu.template +++ b/apps/documenteditor/main/app/template/LeftMenu.template @@ -1,6 +1,5 @@
- diff --git a/apps/documenteditor/main/app/view/LeftMenu.js b/apps/documenteditor/main/app/view/LeftMenu.js index 49e9ea585..46f629aaa 100644 --- a/apps/documenteditor/main/app/view/LeftMenu.js +++ b/apps/documenteditor/main/app/view/LeftMenu.js @@ -97,14 +97,6 @@ define([ render: function () { var $markup = $(this.template({})); - this.btnSearch = new Common.UI.Button({ - action: 'search', - el: $markup.elementById('#left-btn-search'), - hint: this.tipSearch + Common.Utils.String.platformKey('Ctrl+F'), - disabled: true, - enableToggle: true - }); - this.btnSearchBar = new Common.UI.Button({ action: 'advancedsearch', el: $markup.elementById('#left-btn-searchbar'), @@ -174,7 +166,6 @@ define([ }); this.btnNavigation.on('click', this.onBtnMenuClick.bind(this)); - this.btnSearch.on('click', this.onBtnMenuClick.bind(this)); this.btnSearchBar.on('click', this.onBtnMenuClick.bind(this)); this.btnAbout.on('toggle', this.onBtnMenuToggle.bind(this)); @@ -202,9 +193,6 @@ define([ btn.panel['show'](); if (!this._state.pluginIsRunning) this.$el.width(SCALE_MIN); - - if (this.btnSearch.isActive()) - this.btnSearch.toggle(false); } else { btn.panel['hide'](); } @@ -370,7 +358,6 @@ define([ }, disableMenu: function(menu, disable) { - this.btnSearch.setDisabled(false); this.btnSearchBar.setDisabled(false); this.btnAbout.setDisabled(false); this.btnSupport.setDisabled(false); diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index f8091b677..f397fa3b6 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -82,8 +82,6 @@ define([ 'comments:hide': _.bind(this.commentsShowHide, this, 'hide') }, 'FileMenu': { - 'menu:hide': _.bind(this.menuFilesShowHide, this, 'hide'), - 'menu:show': _.bind(this.menuFilesShowHide, this, 'show'), 'filemenu:hide': _.bind(this.menuFilesHide, this), 'item:click': _.bind(this.clickMenuFileItem, this), 'saveas:format': _.bind(this.clickSaveAsFormat, this), @@ -98,13 +96,6 @@ define([ 'file:close': this.clickToolbarTab.bind(this, 'other'), 'save:disabled' : this.changeToolbarSaveState.bind(this) }, - 'SearchDialog': { - 'hide': _.bind(this.onSearchDlgHide, this), - 'search:back': _.bind(this.onQuerySearch, this, 'back'), - 'search:next': _.bind(this.onQuerySearch, this, 'next'), - 'search:replace': _.bind(this.onQueryReplace, this), - 'search:replaceall': _.bind(this.onQueryReplaceAll, this) - }, 'Common.Views.ReviewChanges': { 'collaboration:chat': _.bind(this.onShowHideChat, this) }, @@ -121,7 +112,6 @@ define([ onLaunch: function() { this.leftMenu = this.createView('LeftMenu').render(); - this.leftMenu.btnSearch.on('toggle', _.bind(this.onMenuSearch, this)); this.leftMenu.btnThumbs.on('toggle', _.bind(this.onShowTumbnails, this)); this.isThumbsShown = true; this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this)); @@ -150,7 +140,6 @@ define([ this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiServerDisconnect, this)); this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this)); - this.api.asc_registerCallback('asc_onReplaceAll', _.bind(this.onApiTextReplaced, this)); /** coauthoring begin **/ if (this.mode.canCoAuthoring) { if (this.mode.canChat) @@ -442,66 +431,6 @@ define([ }, /** coauthoring end **/ - onQuerySearch: function(d, w, opts) { - if (opts.textsearch && opts.textsearch.length) { - if (!this.api.findText(opts.textsearch, d != 'back', opts.matchcase)) { - var me = this; - Common.UI.info({ - msg: this.textNoTextFound, - callback: function() { - me.dlgSearch.focus(); - } - }); - } - } - }, - - onQueryReplace: function(w, opts) { - if (!_.isEmpty(opts.textsearch)) { - if (!this.api.asc_replaceText(opts.textsearch, opts.textreplace, false, opts.matchcase)) { - var me = this; - Common.UI.info({ - msg: this.textNoTextFound, - callback: function() { - me.dlgSearch.focus(); - } - }); - } - } - }, - - onQueryReplaceAll: function(w, opts) { - if (!_.isEmpty(opts.textsearch)) { - this.api.asc_replaceText(opts.textsearch, opts.textreplace, true, opts.matchcase); - } - }, - - showSearchDlg: function(show,action) { - if ( !this.dlgSearch ) { - this.dlgSearch = (new Common.UI.SearchDialog({ - matchcase: true - })); - var me = this; - Common.NotificationCenter.on('preview:start', function() { - me.dlgSearch.hide(); - }); - } - - if (show) { - var mode = this.mode.isEdit && !this.viewmode ? (action || undefined) : 'no-replace'; - if (this.dlgSearch.isVisible()) { - this.dlgSearch.setMode(mode); - this.dlgSearch.focus(); - } else { - this.dlgSearch.show(mode); - } - } else this.dlgSearch['hide'](); - }, - - onMenuSearch: function(obj, show) { - this.showSearchDlg(show); - }, - onShowTumbnails: function(obj, show) { this.api.ShowThumbnails(show); @@ -515,30 +444,10 @@ define([ this.isThumbsShown = isShow; }, - onSearchDlgHide: function() { - this.leftMenu.btnSearch.toggle(false, true); - $(this.leftMenu.btnSearch.el).blur(); - this.api.asc_enableKeyEvents(true); -// this.api.asc_selectSearchingResults(false); - }, - - onApiTextReplaced: function(found,replaced) { - var me = this; - if (found) { - !(found - replaced > 0) ? - Common.UI.info( {msg: Common.Utils.String.format(this.textReplaceSuccess, replaced)} ) : - Common.UI.warning( {msg: Common.Utils.String.format(this.textReplaceSkipped, found-replaced)} ); - } else { - Common.UI.info({msg: this.textNoTextFound}); - } - }, - setPreviewMode: function(mode) { if (this.viewmode === mode) return; this.viewmode = mode; - this.dlgSearch && this.dlgSearch.setMode(this.viewmode ? 'no-replace' : 'search'); - this.leftMenu.panelSearch && this.leftMenu.panelSearch.setSearchMode(this.viewmode ? 'no-replace' : 'search'); }, @@ -553,10 +462,6 @@ define([ this.leftMenu.btnPlugins.setDisabled(true); this.leftMenu.getMenu('file').setMode({isDisconnected: true, enableDownload: !!enableDownload}); - if ( this.dlgSearch ) { - this.leftMenu.btnSearch.toggle(false, true); - this.dlgSearch['hide'](); - } }, onApiCountPages: function(count) { @@ -628,15 +533,6 @@ define([ } }, - menuFilesShowHide: function(state) { - if ( this.dlgSearch ) { - if ( state == 'show' ) - this.dlgSearch.suspendKeyEvents(); - else - Common.Utils.asyncCall(this.dlgSearch.resumeKeyEvents, this.dlgSearch); - } - }, - onShortcut: function(s, e) { if (!this.mode) return; diff --git a/apps/presentationeditor/main/app/template/LeftMenu.template b/apps/presentationeditor/main/app/template/LeftMenu.template index 384fc8c88..18cca4c88 100644 --- a/apps/presentationeditor/main/app/template/LeftMenu.template +++ b/apps/presentationeditor/main/app/template/LeftMenu.template @@ -1,6 +1,5 @@
- diff --git a/apps/presentationeditor/main/app/view/LeftMenu.js b/apps/presentationeditor/main/app/view/LeftMenu.js index 84674b0d4..1dd9e130c 100644 --- a/apps/presentationeditor/main/app/view/LeftMenu.js +++ b/apps/presentationeditor/main/app/view/LeftMenu.js @@ -93,14 +93,6 @@ define([ render: function () { var $markup = $(this.template({})); - this.btnSearch = new Common.UI.Button({ - action: 'search', - el: $markup.elementById('#left-btn-search'), - hint: this.tipSearch + Common.Utils.String.platformKey('Ctrl+F'), - disabled: true, - enableToggle: true - }); - this.btnSearchBar = new Common.UI.Button({ action: 'advancedsearch', el: $markup.elementById('#left-btn-searchbar'), @@ -168,8 +160,6 @@ define([ }); this.btnPlugins.hide(); this.btnPlugins.on('click', _.bind(this.onBtnMenuClick, this)); - - this.btnSearch.on('click', _.bind(this.onBtnMenuClick, this)); this.btnSearchBar.on('click', _.bind(this.onBtnMenuClick, this)); this.btnThumbs.on('click', _.bind(this.onBtnMenuClick, this)); this.btnAbout.on('toggle', _.bind(this.onBtnMenuToggle, this)); @@ -187,9 +177,6 @@ define([ btn.panel['show'](); if (!this._state.pluginIsRunning) this.$el.width(SCALE_MIN); - - if (this.btnSearch.isActive()) - this.btnSearch.toggle(false); } else { btn.panel['hide'](); } diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index f5c56da32..723ca475d 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -89,14 +89,6 @@ define([ 'file:close': this.clickToolbarTab.bind(this, 'other'), 'save:disabled' : this.changeToolbarSaveState.bind(this) }, - 'SearchDialog': { - 'hide': _.bind(this.onSearchDlgHide, this), - 'search:back': _.bind(this.onQuerySearch, this, 'back'), - 'search:next': _.bind(this.onQuerySearch, this, 'next'), - 'search:replace': _.bind(this.onQueryReplace, this), - 'search:replaceall': _.bind(this.onQueryReplaceAll, this), - 'search:highlight': _.bind(this.onSearchHighlight, this) - }, 'Common.Views.ReviewChanges': { 'collaboration:chat': _.bind(this.onShowHideChat, this) }, @@ -115,7 +107,6 @@ define([ onLaunch: function() { this.leftMenu = this.createView('LeftMenu').render(); - this.leftMenu.btnSearch.on('toggle', _.bind(this.onMenuSearch, this)); this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this)); Common.util.Shortcuts.delegateShortcuts({ @@ -560,170 +551,10 @@ define([ }, /** coauthoring end **/ - onQuerySearch: function(d, w, opts) { - // if (opts.textsearch && opts.textsearch.length) { - var options = this.dlgSearch.findOptions; - options.asc_setFindWhat(opts.textsearch); - options.asc_setScanForward(d != 'back'); - options.asc_setIsMatchCase(opts.matchcase); - options.asc_setIsWholeCell(opts.matchword); - options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked); - options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked); - options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value); - - if (!this.api.asc_findText(options)) { - var me = this; - Common.UI.info({ - msg: this.textNoTextFound, - callback: function() { - me.dlgSearch.focus(); - } - }); - } - // } - }, - - onQueryReplace: function(w, opts) { - // if (!_.isEmpty(opts.textsearch)) { - this.api.isReplaceAll = false; - - var options = this.dlgSearch.findOptions; - options.asc_setFindWhat(opts.textsearch); - options.asc_setReplaceWith(opts.textreplace); - options.asc_setIsMatchCase(opts.matchcase); - options.asc_setIsWholeCell(opts.matchword); - options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked); - options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked); - options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value); - options.asc_setIsReplaceAll(false); - - this.api.asc_replaceText(options); - // } - }, - - onQueryReplaceAll: function(w, opts) { - // if (!_.isEmpty(opts.textsearch)) { - this.api.isReplaceAll = true; - - var options = this.dlgSearch.findOptions; - options.asc_setFindWhat(opts.textsearch); - options.asc_setReplaceWith(opts.textreplace); - options.asc_setIsMatchCase(opts.matchcase); - options.asc_setIsWholeCell(opts.matchword); - options.asc_setScanOnOnlySheet(this.dlgSearch.menuWithin.menu.items[0].checked); - options.asc_setScanByRows(this.dlgSearch.menuSearch.menu.items[0].checked); - options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value); - options.asc_setIsReplaceAll(true); - - this.api.asc_replaceText(options); - // } - }, - - onSearchHighlight: function(w, highlight) { - this.api.asc_selectSearchingResults(highlight); - }, - - showSearchDlg: function(show,action) { - if ( !this.dlgSearch ) { - var menuWithin = new Common.UI.MenuItem({ - caption : this.textWithin, - menu : new Common.UI.Menu({ - menuAlign : 'tl-tr', - items : [{ - caption : this.textSheet, - toggleGroup : 'searchWithih', - checkable : true, - checked : true - },{ - caption : this.textWorkbook, - toggleGroup : 'searchWithih', - checkable : true, - checked : false - }] - }) - }); - - var menuSearch = new Common.UI.MenuItem({ - caption : this.textSearch, - menu : new Common.UI.Menu({ - menuAlign : 'tl-tr', - items : [{ - caption : this.textByRows, - toggleGroup : 'searchByrows', - checkable : true, - checked : true - },{ - caption : this.textByColumns, - toggleGroup : 'searchByrows', - checkable : true, - checked : false - }] - }) - }); - - var menuLookin = new Common.UI.MenuItem({ - caption : this.textLookin, - menu : new Common.UI.Menu({ - menuAlign : 'tl-tr', - items : [{ - caption : this.textFormulas, - toggleGroup : 'searchLookin', - checkable : true, - checked : true - },{ - caption : this.textValues, - toggleGroup : 'searchLookin', - checkable : true, - checked : false - }] - }) - }); - - this.dlgSearch = (new Common.UI.SearchDialog({ - matchcase: true, - matchword: true, - matchwordstr: this.textItemEntireCell, - markresult: {applied: true}, - extraoptions : [menuWithin,menuSearch,menuLookin] - })); - - this.dlgSearch.menuWithin = menuWithin; - this.dlgSearch.menuSearch = menuSearch; - this.dlgSearch.menuLookin = menuLookin; - this.dlgSearch.findOptions = new Asc.asc_CFindOptions(); - } - - if (show) { - var mode = this.mode.isEdit && !this.viewmode ? (action || undefined) : 'no-replace'; - - if (this.dlgSearch.isVisible()) { - this.dlgSearch.setMode(mode); - this.dlgSearch.focus(); - } else { - this.dlgSearch.show(mode); - } - - this.api.asc_closeCellEditor(); - } else this.dlgSearch['hide'](); - }, - - onMenuSearch: function(obj, show) { - this.showSearchDlg(show); - }, - - onSearchDlgHide: function() { - this.leftMenu.btnSearch.toggle(false, true); - this.api.asc_selectSearchingResults(false); - $(this.leftMenu.btnSearch.el).blur(); - this.api.asc_enableKeyEvents(true); - }, - setPreviewMode: function(mode) { if (this.viewmode === mode) return; this.viewmode = mode; - this.dlgSearch && this.dlgSearch.setMode(this.viewmode ? 'no-replace' : 'search'); - this.leftMenu.panelSearch && this.leftMenu.panelSearch.setSearchMode(this.viewmode ? 'no-replace' : 'search'); }, @@ -739,10 +570,6 @@ define([ this.leftMenu.btnSpellcheck.setDisabled(true); this.leftMenu.getMenu('file').setMode({isDisconnected: true, enableDownload: !!enableDownload}); - if ( this.dlgSearch ) { - this.leftMenu.btnSearch.toggle(false, true); - this.dlgSearch['hide'](); - } }, /** coauthoring begin **/ diff --git a/apps/spreadsheeteditor/main/app/template/LeftMenu.template b/apps/spreadsheeteditor/main/app/template/LeftMenu.template index b9c3925ce..2b2b9aac0 100644 --- a/apps/spreadsheeteditor/main/app/template/LeftMenu.template +++ b/apps/spreadsheeteditor/main/app/template/LeftMenu.template @@ -1,6 +1,5 @@
- diff --git a/apps/spreadsheeteditor/main/app/view/LeftMenu.js b/apps/spreadsheeteditor/main/app/view/LeftMenu.js index ce50023c7..cbcc13535 100644 --- a/apps/spreadsheeteditor/main/app/view/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/view/LeftMenu.js @@ -83,14 +83,6 @@ define([ render: function () { var $markup = $(this.template({})); - this.btnSearch = new Common.UI.Button({ - action: 'search', - el: $markup.elementById('#left-btn-search'), - hint: this.tipSearch + Common.Utils.String.platformKey('Ctrl+F'), - disabled: true, - enableToggle: true - }); - this.btnSearchBar = new Common.UI.Button({ action: 'advancedsearch', el: $markup.elementById('#left-btn-searchbar'), @@ -161,7 +153,6 @@ define([ this.btnSpellcheck.hide(); this.btnSpellcheck.on('click', _.bind(this.onBtnMenuClick, this)); - this.btnSearch.on('click', _.bind(this.onBtnMenuClick, this)); this.btnSearchBar.on('click', _.bind(this.onBtnMenuClick, this)); this.btnAbout.on('toggle', _.bind(this.onBtnMenuToggle, this)); @@ -177,9 +168,6 @@ define([ btn.panel['show'](); if (!this._state.pluginIsRunning) this.$el.width(SCALE_MIN); - - if (this.btnSearch.isActive()) - this.btnSearch.toggle(false); } else { btn.panel['hide'](); } @@ -327,7 +315,6 @@ define([ disableMenu: function(menu, disable) { this.btnAbout.setDisabled(false); this.btnSupport.setDisabled(false); - this.btnSearch.setDisabled(false); this.btnSearchBar.setDisabled(false); /** coauthoring begin **/ this.btnComments.setDisabled(false);