[SSE mobile] Fix bug 45643
This commit is contained in:
parent
38d4026a91
commit
031a75e0b9
|
@ -102,7 +102,7 @@ define([
|
||||||
this.api = api;
|
this.api = api;
|
||||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect, this));
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect, this));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.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_onEditCell', _.bind(this.onApiEditCell, this));
|
||||||
this.api.asc_registerCallback('asc_onWorkbookLocked', _.bind(this.onWorkbookLocked, this));
|
this.api.asc_registerCallback('asc_onWorkbookLocked', _.bind(this.onWorkbookLocked, this));
|
||||||
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this));
|
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this));
|
||||||
|
@ -144,6 +144,8 @@ define([
|
||||||
this.sheets.reset(items);
|
this.sheets.reset(items);
|
||||||
this.hiddensheets.reset(hiddentems);
|
this.hiddensheets.reset(hiddentems);
|
||||||
|
|
||||||
|
this.updateTabsColors();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
|
@ -271,7 +273,7 @@ define([
|
||||||
this.api['asc_hideWorksheet']([index]);
|
this.api['asc_hideWorksheet']([index]);
|
||||||
} else {
|
} else {
|
||||||
this.api['asc_showWorksheet'](index);
|
this.api['asc_showWorksheet'](index);
|
||||||
// this.loadTabColor(index);
|
this.loadTabColor(index);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -436,11 +438,9 @@ define([
|
||||||
|
|
||||||
loadTabColor: function (sheetindex) {
|
loadTabColor: function (sheetindex) {
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
if (!this.api.asc_isWorksheetHidden(sheetindex)) {
|
var tab = this.sheets.findWhere({index: sheetindex});
|
||||||
var tab = _.findWhere(this.statusbar.tabbar.tabs, {sheetindex: sheetindex});
|
if (tab) {
|
||||||
if (tab) {
|
this.setTabLineColor(tab, this.api.asc_getWorksheetTabColor(sheetindex));
|
||||||
this.setTabLineColor(tab, this.api.asc_getWorksheetTabColor(sheetindex));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -454,19 +454,26 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
if (color.length) {
|
if (color.length) {
|
||||||
if (!tab.isActive()) {
|
if (!tab.get('active')) {
|
||||||
color = '0px 3px 0 ' + Common.Utils.RGBColor(color).toRGBA(0.7) + ' inset';
|
color = '0px 4px 0 ' + Common.Utils.RGBColor(color).toRGBA(0.7) + ' inset';
|
||||||
} else {
|
} 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 {
|
} 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) {
|
onError: function(id, level, errData) {
|
||||||
// if (id == Asc.c_oAscError.ID.LockedWorksheetRename)
|
// if (id == Asc.c_oAscError.ID.LockedWorksheetRename)
|
||||||
// this.statusbar.update();
|
// this.statusbar.update();
|
||||||
|
|
Loading…
Reference in a new issue