[SSE] Bug 37388 (set worksheet color)
This commit is contained in:
parent
e744a710e3
commit
8f4537a22a
|
@ -495,18 +495,26 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setWorksheetColor: function (color) {
|
setWorksheetColor: function (color) {
|
||||||
|
var me = this;
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
var sindex = this.api.asc_getActiveWorksheetIndex();
|
var selectTabs = this.statusbar.tabbar.selectTabs,
|
||||||
var tab = _.findWhere(this.statusbar.tabbar.tabs, {sheetindex: sindex});
|
arrIndex = [];
|
||||||
if (tab) {
|
selectTabs.forEach(function (item) {
|
||||||
|
arrIndex.push(item.sheetindex);
|
||||||
|
});
|
||||||
|
if (arrIndex) {
|
||||||
if ('transparent' === color) {
|
if ('transparent' === color) {
|
||||||
this.api.asc_setWorksheetTabColor(sindex, null);
|
this.api.asc_setWorksheetTabColor(null, arrIndex);
|
||||||
tab.$el.find('a').css('box-shadow', '');
|
selectTabs.forEach(function (tab) {
|
||||||
|
tab.$el.find('a').css('box-shadow', '');
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
var asc_clr = Common.Utils.ThemeColor.getRgbColor(color);
|
var asc_clr = Common.Utils.ThemeColor.getRgbColor(color);
|
||||||
if (asc_clr) {
|
if (asc_clr) {
|
||||||
this.api.asc_setWorksheetTabColor(sindex, asc_clr);
|
this.api.asc_setWorksheetTabColor(asc_clr, arrIndex);
|
||||||
this.setTabLineColor(tab, asc_clr);
|
selectTabs.forEach(function (tab) {
|
||||||
|
me.setTabLineColor(tab, asc_clr);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue