Merge pull request #1324 from ONLYOFFICE/fix/bugfix
[SSE] Fix Bug 53709, Bug 53654
This commit is contained in:
commit
b94819331f
|
@ -98,6 +98,7 @@ define([
|
||||||
checked : false,
|
checked : false,
|
||||||
allowDepress: false,
|
allowDepress: false,
|
||||||
disabled : false,
|
disabled : false,
|
||||||
|
visible : true,
|
||||||
value : null,
|
value : null,
|
||||||
toggleGroup : null,
|
toggleGroup : null,
|
||||||
iconCls : '',
|
iconCls : '',
|
||||||
|
@ -134,6 +135,7 @@ define([
|
||||||
this.checked = me.options.checked;
|
this.checked = me.options.checked;
|
||||||
me.allowDepress = me.options.allowDepress;
|
me.allowDepress = me.options.allowDepress;
|
||||||
this.disabled = me.options.disabled;
|
this.disabled = me.options.disabled;
|
||||||
|
this.visible = me.options.visible;
|
||||||
this.value = me.options.value;
|
this.value = me.options.value;
|
||||||
this.toggleGroup = me.options.toggleGroup;
|
this.toggleGroup = me.options.toggleGroup;
|
||||||
this.template = me.options.template || this.template;
|
this.template = me.options.template || this.template;
|
||||||
|
@ -229,6 +231,8 @@ define([
|
||||||
Common.UI.ToggleManager.register(me);
|
Common.UI.ToggleManager.register(me);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!this.visible)
|
||||||
|
this.setVisible(this.visible);
|
||||||
|
|
||||||
me.cmpEl = el;
|
me.cmpEl = el;
|
||||||
me.rendered = true;
|
me.rendered = true;
|
||||||
|
|
|
@ -552,9 +552,8 @@ define([
|
||||||
iconTitle : name,
|
iconTitle : name,
|
||||||
iconVisible : name!==''
|
iconVisible : name!==''
|
||||||
};
|
};
|
||||||
var hidden = this.api.asc_isWorksheetHidden(i);
|
this.api.asc_isWorksheetHidden(i)? hidentems.push(tab) : items.push(tab);
|
||||||
hidden ? hidentems.push(tab) : items.push(tab);
|
allItems.push(tab);
|
||||||
(!hidden || !wbprotected) && allItems.push(tab);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hidentems.length) {
|
if (hidentems.length) {
|
||||||
|
@ -571,13 +570,15 @@ define([
|
||||||
this.tabbar.add(items);
|
this.tabbar.add(items);
|
||||||
|
|
||||||
allItems.forEach(function(item){
|
allItems.forEach(function(item){
|
||||||
|
var hidden = me.api.asc_isWorksheetHidden(item.sheetindex);
|
||||||
me.sheetListMenu.addItem(new Common.UI.MenuItem({
|
me.sheetListMenu.addItem(new Common.UI.MenuItem({
|
||||||
style: 'white-space: pre',
|
style: 'white-space: pre',
|
||||||
caption: Common.Utils.String.htmlEncode(item.label),
|
caption: Common.Utils.String.htmlEncode(item.label),
|
||||||
value: item.sheetindex,
|
value: item.sheetindex,
|
||||||
checkable: true,
|
checkable: true,
|
||||||
checked: item.active,
|
checked: item.active,
|
||||||
hidden: me.api.asc_isWorksheetHidden(item.sheetindex),
|
hidden: hidden,
|
||||||
|
visible: !hidden || !wbprotected,
|
||||||
textHidden: me.itemHidden,
|
textHidden: me.itemHidden,
|
||||||
template: _.template([
|
template: _.template([
|
||||||
'<a id="<%= id %>" style="<%= style %>" tabindex="-1" type="menuitem" <% if (options.hidden) { %> data-hidden="true" <% } %>>',
|
'<a id="<%= id %>" style="<%= style %>" tabindex="-1" type="menuitem" <% if (options.hidden) { %> data-hidden="true" <% } %>>',
|
||||||
|
|
Loading…
Reference in a new issue