[SSE] Bug 46767 (fix locked, fix close after click on item)
This commit is contained in:
parent
f28422fb9c
commit
dc5268069e
|
@ -180,6 +180,10 @@ define([
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var listItem =this.statusbar.sheetListMenu.items[index];
|
||||||
|
if (listItem.$el.children().first().data('hidden')) {
|
||||||
|
listItem.setDisabled(locked);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
|
|
||||||
|
@ -246,6 +250,7 @@ define([
|
||||||
var islocked = this.statusbar.tabbar.hasClass('coauth-locked'),
|
var islocked = this.statusbar.tabbar.hasClass('coauth-locked'),
|
||||||
currentIdx = this.api.asc_getActiveWorksheetIndex();
|
currentIdx = this.api.asc_getActiveWorksheetIndex();
|
||||||
this.statusbar.btnAddWorksheet.setDisabled(islocked || this.api.isCellEdited || mode!=Asc.c_oAscSelectionDialogType.None);
|
this.statusbar.btnAddWorksheet.setDisabled(islocked || this.api.isCellEdited || mode!=Asc.c_oAscSelectionDialogType.None);
|
||||||
|
this.statusbar.btnSheetList[mode != Asc.c_oAscSelectionDialogType.None ? 'addClass' : 'removeClass']('disabled');
|
||||||
|
|
||||||
var item, i = this.statusbar.tabbar.getCount();
|
var item, i = this.statusbar.tabbar.getCount();
|
||||||
while (i-- > 0) {
|
while (i-- > 0) {
|
||||||
|
@ -502,6 +507,10 @@ define([
|
||||||
this.api.asc_showWorksheet(sheetIndex);
|
this.api.asc_showWorksheet(sheetIndex);
|
||||||
this.loadTabColor(sheetIndex);
|
this.loadTabColor(sheetIndex);
|
||||||
}
|
}
|
||||||
|
var me = this;
|
||||||
|
setTimeout(function(){
|
||||||
|
me.statusbar.sheetListMenu.hide();
|
||||||
|
}, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
selectTab: function (sheetindex) {
|
selectTab: function (sheetindex) {
|
||||||
|
|
|
@ -9,9 +9,7 @@
|
||||||
<div id="status-addtabs-box" class="status-group">
|
<div id="status-addtabs-box" class="status-group">
|
||||||
<button id="status-btn-addtab" type="button" class="btn small btn-toolbar"><i class="icon toolbar__icon btn-zoomup"> </i></button>
|
<button id="status-btn-addtab" type="button" class="btn small btn-toolbar"><i class="icon toolbar__icon btn-zoomup"> </i></button>
|
||||||
<div class="cnt-tabslist">
|
<div class="cnt-tabslist">
|
||||||
<div class="dropdown-toggle" data-toggle="dropdown">
|
<button id="status-btn-tabslist" type="button" class="btn small btn-toolbar dropdown-toggle" data-toggle="dropdown"><i class="icon toolbar__icon btn-sheet-list"> </i></button>
|
||||||
<button id="status-btn-tabslist" type="button" class="btn small btn-toolbar"><i class="icon toolbar__icon btn-sheet-list"> </i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="status-zoom-box" class="status-group">
|
<div id="status-zoom-box" class="status-group">
|
||||||
|
|
|
@ -129,11 +129,12 @@ define([
|
||||||
hintAnchor: 'top'
|
hintAnchor: 'top'
|
||||||
});
|
});
|
||||||
|
|
||||||
this.btnSheetList = new Common.UI.Button({
|
this.cntSheetList = new Common.UI.Button({
|
||||||
el: $('.cnt-tabslist', this.el),
|
el: $('.cnt-tabslist', this.el),
|
||||||
hint: this.tipListOfSheets,
|
hint: this.tipListOfSheets,
|
||||||
hintAnchor: 'top'
|
hintAnchor: 'top'
|
||||||
});
|
});
|
||||||
|
this.btnSheetList = $('#status-btn-tabslist',this.$el);
|
||||||
this.sheetListMenu = new Common.UI.Menu({
|
this.sheetListMenu = new Common.UI.Menu({
|
||||||
style: 'margin-top:-3px;',
|
style: 'margin-top:-3px;',
|
||||||
menuAlign: 'bl-tl',
|
menuAlign: 'bl-tl',
|
||||||
|
@ -141,12 +142,11 @@ define([
|
||||||
});
|
});
|
||||||
this.sheetListMenu.on('item:click', function(obj,item) {
|
this.sheetListMenu.on('item:click', function(obj,item) {
|
||||||
me.fireEvent('show:tab', [item.value]);
|
me.fireEvent('show:tab', [item.value]);
|
||||||
me.sheetListMenu.items[item.value].setChecked(true);
|
|
||||||
});
|
});
|
||||||
this.btnSheetList.cmpEl.on({
|
this.cntSheetList.cmpEl.on({
|
||||||
'show.bs.dropdown': function () {
|
'show.bs.dropdown': function () {
|
||||||
_.defer(function(){
|
_.defer(function(){
|
||||||
me.btnSheetList.cmpEl.find('ul').focus();
|
me.cntSheetList.cmpEl.find('ul').focus();
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
'hide.bs.dropdown': function () {
|
'hide.bs.dropdown': function () {
|
||||||
|
@ -573,7 +573,7 @@ define([
|
||||||
hidden: me.api.asc_isWorksheetHidden(item.sheetindex),
|
hidden: me.api.asc_isWorksheetHidden(item.sheetindex),
|
||||||
textHidden: me.itemHidden,
|
textHidden: me.itemHidden,
|
||||||
template: _.template([
|
template: _.template([
|
||||||
'<a id="<%= id %>" style="<%= style %>" tabindex="-1" type="menuitem">',
|
'<a id="<%= id %>" style="<%= style %>" tabindex="-1" type="menuitem" <% if (options.hidden) { %> data-hidden="true" <% } %>>',
|
||||||
'<div class="color"></div>',
|
'<div class="color"></div>',
|
||||||
'<span class="name"><%= caption %></span>',
|
'<span class="name"><%= caption %></span>',
|
||||||
'<% if (options.hidden) { %>',
|
'<% if (options.hidden) { %>',
|
||||||
|
|
Loading…
Reference in a new issue