Revert "[SSE] Remove locking when moving tabs". For Bug 43206

This reverts commit e94e6e2268.
This commit is contained in:
Julia Radzhabova 2019-10-18 10:37:32 +03:00
parent d895ecde62
commit 4da866952b
3 changed files with 12 additions and 10 deletions

View file

@ -391,10 +391,12 @@ define([
}, this.bar), }, this.bar),
mousedown: $.proxy(function (e) { mousedown: $.proxy(function (e) {
if (this.bar.options.draggable && !_.isUndefined(dragHelper) && (3 !== e.which)) { if (this.bar.options.draggable && !_.isUndefined(dragHelper) && (3 !== e.which)) {
if (this.bar.selectTabs.length > 1) { if (!tab.isLockTheDrag) {
dragHelper.setHookTabs(e, this.bar, this.bar.selectTabs); if (this.bar.selectTabs.length > 1) {
} else { dragHelper.setHookTabs(e, this.bar, this.bar.selectTabs);
dragHelper.setHook(e, this.bar, tab); } else {
dragHelper.setHook(e, this.bar, tab);
}
} }
} }
}, this) }, this)

View file

@ -169,7 +169,7 @@ define([
tab = this.statusbar.tabbar.getAt(i); tab = this.statusbar.tabbar.getAt(i);
if (index == tab.sheetindex) { if (index == tab.sheetindex) {
tab[locked?'addClass':'removeClass']('coauth-locked'); tab[locked?'addClass':'removeClass']('coauth-locked');
//tab.isLockTheDrag = locked || (this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable); tab.isLockTheDrag = locked || (this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
break; break;
} }
} }
@ -241,7 +241,7 @@ define([
if (item.sheetindex !== currentIdx) { if (item.sheetindex !== currentIdx) {
item.disable(mode==Asc.c_oAscSelectionDialogType.FormatTable); item.disable(mode==Asc.c_oAscSelectionDialogType.FormatTable);
} }
//item.isLockTheDrag = (item.hasClass('coauth-locked') || (mode!=Asc.c_oAscSelectionDialogType.None)); item.isLockTheDrag = (item.hasClass('coauth-locked') || (mode!=Asc.c_oAscSelectionDialogType.None));
} }
this.statusbar.rangeSelectionMode = mode; this.statusbar.rangeSelectionMode = mode;
}, },

View file

@ -330,7 +330,7 @@ define([
label : me.api.asc_getWorksheetName(i), label : me.api.asc_getWorksheetName(i),
// reorderable : !locked, // reorderable : !locked,
cls : locked ? 'coauth-locked':'', cls : locked ? 'coauth-locked':'',
// isLockTheDrag : locked isLockTheDrag : locked
}; };
this.api.asc_isWorksheetHidden(i)? hidentems.push(tab) : items.push(tab); this.api.asc_isWorksheetHidden(i)? hidentems.push(tab) : items.push(tab);
@ -435,7 +435,7 @@ define([
this.tabMenu.items[1].setDisabled(issheetlocked); this.tabMenu.items[1].setDisabled(issheetlocked);
this.tabMenu.items[2].setDisabled(issheetlocked); this.tabMenu.items[2].setDisabled(issheetlocked);
this.tabMenu.items[3].setDisabled(issheetlocked); this.tabMenu.items[3].setDisabled(issheetlocked);
this.tabMenu.items[4].setDisabled(isdoclocked); this.tabMenu.items[4].setDisabled(issheetlocked);
this.tabMenu.items[5].setDisabled(issheetlocked); this.tabMenu.items[5].setDisabled(issheetlocked);
this.tabMenu.items[6].setDisabled(isdoclocked); this.tabMenu.items[6].setDisabled(isdoclocked);
this.tabMenu.items[7].setDisabled(issheetlocked); this.tabMenu.items[7].setDisabled(issheetlocked);
@ -446,8 +446,8 @@ define([
this.tabMenu.items[10].show(); this.tabMenu.items[10].show();
} }
this.tabMenu.items[9].setDisabled(isdoclocked); this.tabMenu.items[9].setDisabled(issheetlocked);
this.tabMenu.items[10].setDisabled(isdoclocked); this.tabMenu.items[10].setDisabled(issheetlocked);
this.api.asc_closeCellEditor(); this.api.asc_closeCellEditor();
this.api.asc_enableKeyEvents(false); this.api.asc_enableKeyEvents(false);