[SSE] Bug 37388

This commit is contained in:
Julia Svinareva 2019-09-02 13:52:16 +03:00
parent c708c55056
commit 0cc3ddfca6
2 changed files with 10 additions and 8 deletions

View file

@ -51,7 +51,7 @@ define([
this.active = false;
this.label = 'Tab';
this.cls = '';
this.template = _.template(['<li class="<% if(active){ %>active<% } %> <% if(cls.length){%><%= cls %><%}%>" data-label="<%= label %>">',
this.template = _.template(['<li class="<% if(active){ %>active selected<% } %> <% if(cls.length){%><%= cls %><%}%>" data-label="<%= label %>">',
'<a><%- label %></a>',
'</li>'].join(''));

View file

@ -292,10 +292,8 @@ define([
tab.$el.on({
click: $.proxy(function (event) {
if (!tab.disabled && !tab.$el.hasClass('active')) {
if (tab.control == 'manual') {
this.bar.trigger('tab:manual', this.bar, this.bar.tabs.indexOf(tab), tab);
} else if (event.ctrlKey || event.metaKey) {
if (!tab.disabled) {
if (event.ctrlKey || event.metaKey) {
tab.changeState(true);
} else if (event.shiftKey) {
this.bar.$el.find('ul > li.selected').removeClass('selected');
@ -304,11 +302,15 @@ define([
indexCur = tab.sheetindex;
var startIndex = (indexCur > indexAct) ? indexAct : indexCur,
endIndex = (indexCur > indexAct) ? indexCur : indexAct;
for(var i = startIndex; i <= endIndex; i++) {
for (var i = startIndex; i <= endIndex; i++) {
this.bar.tabs[i].changeState(true);
}
} else {
tab.changeState();
} else if (!tab.$el.hasClass('active')) {
if (tab.control == 'manual') {
this.bar.trigger('tab:manual', this.bar, this.bar.tabs.indexOf(tab), tab);
} else {
tab.changeState();
}
}
}
!tab.disabled && Common.NotificationCenter.trigger('edit:complete', this.bar);