[SSE] Bug 37388
This commit is contained in:
parent
c708c55056
commit
0cc3ddfca6
|
@ -51,7 +51,7 @@ define([
|
||||||
this.active = false;
|
this.active = false;
|
||||||
this.label = 'Tab';
|
this.label = 'Tab';
|
||||||
this.cls = '';
|
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>',
|
'<a><%- label %></a>',
|
||||||
'</li>'].join(''));
|
'</li>'].join(''));
|
||||||
|
|
||||||
|
|
|
@ -292,10 +292,8 @@ define([
|
||||||
|
|
||||||
tab.$el.on({
|
tab.$el.on({
|
||||||
click: $.proxy(function (event) {
|
click: $.proxy(function (event) {
|
||||||
if (!tab.disabled && !tab.$el.hasClass('active')) {
|
if (!tab.disabled) {
|
||||||
if (tab.control == 'manual') {
|
if (event.ctrlKey || event.metaKey) {
|
||||||
this.bar.trigger('tab:manual', this.bar, this.bar.tabs.indexOf(tab), tab);
|
|
||||||
} else if (event.ctrlKey || event.metaKey) {
|
|
||||||
tab.changeState(true);
|
tab.changeState(true);
|
||||||
} else if (event.shiftKey) {
|
} else if (event.shiftKey) {
|
||||||
this.bar.$el.find('ul > li.selected').removeClass('selected');
|
this.bar.$el.find('ul > li.selected').removeClass('selected');
|
||||||
|
@ -304,11 +302,15 @@ define([
|
||||||
indexCur = tab.sheetindex;
|
indexCur = tab.sheetindex;
|
||||||
var startIndex = (indexCur > indexAct) ? indexAct : indexCur,
|
var startIndex = (indexCur > indexAct) ? indexAct : indexCur,
|
||||||
endIndex = (indexCur > indexAct) ? indexCur : indexAct;
|
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);
|
this.bar.tabs[i].changeState(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!tab.$el.hasClass('active')) {
|
||||||
tab.changeState();
|
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);
|
!tab.disabled && Common.NotificationCenter.trigger('edit:complete', this.bar);
|
||||||
|
|
Loading…
Reference in a new issue