From 8a7a321b8cba129e543e2d701ab271fd29acd815 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 13 Jan 2017 18:37:15 +0300 Subject: [PATCH] [SSE mobile] refactoring --- apps/spreadsheeteditor/mobile/app-dev.js | 4 -- .../mobile/app/controller/Statusbar.js | 4 +- .../mobile/app/view/Statusbar.js | 56 ------------------- 3 files changed, 2 insertions(+), 62 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app-dev.js b/apps/spreadsheeteditor/mobile/app-dev.js index e1b9f3798..95ec61f1f 100644 --- a/apps/spreadsheeteditor/mobile/app-dev.js +++ b/apps/spreadsheeteditor/mobile/app-dev.js @@ -125,7 +125,6 @@ require([ ,'EditContainer' ,'EditCell' ,'EditText' - // ,'EditTable' ,'EditImage' ,'EditShape' ,'EditChart' @@ -134,7 +133,6 @@ require([ ,'AddChart' ,'AddFunction' ,'AddShape' - // ,'AddImage' ,'AddOther' ,'AddLink' ] @@ -197,7 +195,6 @@ require([ ,'spreadsheeteditor/mobile/app/controller/edit/EditContainer' ,'spreadsheeteditor/mobile/app/controller/edit/EditCell' ,'spreadsheeteditor/mobile/app/controller/edit/EditText' - // ,'spreadsheeteditor/mobile/app/controller/edit/EditTable' ,'spreadsheeteditor/mobile/app/controller/edit/EditImage' ,'spreadsheeteditor/mobile/app/controller/edit/EditShape' ,'spreadsheeteditor/mobile/app/controller/edit/EditChart' @@ -206,7 +203,6 @@ require([ ,'spreadsheeteditor/mobile/app/controller/add/AddChart' ,'spreadsheeteditor/mobile/app/controller/add/AddFunction' ,'spreadsheeteditor/mobile/app/controller/add/AddShape' - // ,'spreadsheeteditor/mobile/app/controller/add/AddImage' ,'spreadsheeteditor/mobile/app/controller/add/AddOther' ,'spreadsheeteditor/mobile/app/controller/add/AddLink' ], function() { diff --git a/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js b/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js index d75cf0406..a60063014 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js @@ -410,8 +410,8 @@ define([ }, onError: function(id, level, errData) { - if (id == Asc.c_oAscError.ID.LockedWorksheetRename) - this.statusbar.update(); + // if (id == Asc.c_oAscError.ID.LockedWorksheetRename) + // this.statusbar.update(); }, onTabClick: function(index, model) { diff --git a/apps/spreadsheeteditor/mobile/app/view/Statusbar.js b/apps/spreadsheeteditor/mobile/app/view/Statusbar.js index 8318160d7..b5cbd84a2 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/mobile/app/view/Statusbar.js @@ -127,62 +127,6 @@ define([ .eq(index).addClass('active'); }, - update: function() { - var me = this; - - return; - - this.tabbar.empty(true); - this.btnAddWorksheet.setDisabled(true); - - if (this.api) { - var wc = this.api.asc_getWorksheetsCount(), i = -1; - var hidentems = [], items = [], tab, locked; - var sindex = this.api.asc_getActiveWorksheetIndex(); - - while (++i < wc) { - locked = me.api.asc_isWorksheetLockedOrDeleted(i); - tab = { - sheetindex : i, - active : sindex == i, - label : me.api.asc_getWorksheetName(i), -// reorderable : !locked, - cls : locked ? 'coauth-locked':'', - isLockTheDrag : locked - }; - - this.api.asc_isWorksheetHidden(i)? hidentems.push(tab) : items.push(tab); - } - - if (hidentems.length) { - hidentems.forEach(function(item){ - me.tabMenu.items[6].menu.addItem(new Common.UI.MenuItem({ - style: 'white-space: pre-wrap', - caption: Common.Utils.String.htmlEncode(item.label), - value: item.sheetindex - })); - }); - this.tabMenu.items[6].show(); - } - - this.tabbar.add(items); - - if (!_.isUndefined(this.tabBarScroll)) { - this.tabbar.$bar.scrollLeft(this.tabBarScroll.scrollLeft); - this.tabBarScroll = undefined; - } - if (!this.tabbar.isTabVisible(sindex)) - this.tabbar.setTabVisible(sindex); - - this.btnAddWorksheet.setDisabled(me.mode.isDisconnected || me.api.asc_isWorkbookLocked()); - $('#status-label-zoom').text(Common.Utils.String.format(this.zoomText, Math.floor((this.api.asc_getZoom() +.005)*100))); - - me.fireEvent('sheet:changed', [me, sindex]); - me.fireEvent('sheet:updateColors', [true]); - Common.NotificationCenter.trigger('comments:updatefilter', {property: 'uid', value: new RegExp('^(doc_|sheet' + me.api.asc_getActiveWorksheetId() + '_)')}, false); - } - }, - onSheetClick: function (index, model, e) { this.fireEvent('sheet:click', [index, model]); return false;