[SSE mobile] Fix bug 45643

This commit is contained in:
JuliaSvinareva 2020-06-27 23:22:54 +03:00
parent 38d4026a91
commit 031a75e0b9

View file

@ -102,7 +102,7 @@ define([
this.api = api;
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiDisconnect, this));
// this.api.asc_registerCallback('asc_onUpdateTabColor', _.bind(this.onApiUpdateTabColor, this));
this.api.asc_registerCallback('asc_onUpdateTabColor', _.bind(this.onApiUpdateTabColor, this));
// this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this));
this.api.asc_registerCallback('asc_onWorkbookLocked', _.bind(this.onWorkbookLocked, this));
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this));
@ -144,6 +144,8 @@ define([
this.sheets.reset(items);
this.hiddensheets.reset(hiddentems);
this.updateTabsColors();
return;
if (this.api) {
@ -271,7 +273,7 @@ define([
this.api['asc_hideWorksheet']([index]);
} else {
this.api['asc_showWorksheet'](index);
// this.loadTabColor(index);
this.loadTabColor(index);
}
},
@ -436,11 +438,9 @@ define([
loadTabColor: function (sheetindex) {
if (this.api) {
if (!this.api.asc_isWorksheetHidden(sheetindex)) {
var tab = _.findWhere(this.statusbar.tabbar.tabs, {sheetindex: sheetindex});
if (tab) {
this.setTabLineColor(tab, this.api.asc_getWorksheetTabColor(sheetindex));
}
var tab = this.sheets.findWhere({index: sheetindex});
if (tab) {
this.setTabLineColor(tab, this.api.asc_getWorksheetTabColor(sheetindex));
}
}
},
@ -454,19 +454,26 @@ define([
}
if (color.length) {
if (!tab.isActive()) {
color = '0px 3px 0 ' + Common.Utils.RGBColor(color).toRGBA(0.7) + ' inset';
if (!tab.get('active')) {
color = '0px 4px 0 ' + Common.Utils.RGBColor(color).toRGBA(0.7) + ' inset';
} else {
color = '0px 3px 0 ' + color + ' inset';
color = '0px 4px 0 ' + color + ' inset';
}
tab.$el.find('a').css('box-shadow', color);
tab.get('el').find('a').css('box-shadow', color);
} else {
tab.$el.find('a').css('box-shadow', '');
tab.get('el').find('a').css('box-shadow', '');
}
}
},
updateTabsColors: function () {
var me = this;
_.each(this.sheets.models, function (item) {
me.setTabLineColor(item, me.api.asc_getWorksheetTabColor(item.get('index')));
});
},
onError: function(id, level, errData) {
// if (id == Asc.c_oAscError.ID.LockedWorksheetRename)
// this.statusbar.update();