[SSE] Remove locking when moving tabs

This commit is contained in:
Julia Svinareva 2019-10-11 13:44:26 +03:00
parent b88568801e
commit e94e6e2268
3 changed files with 10 additions and 12 deletions

View file

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

View file

@ -169,7 +169,7 @@ define([
tab = this.statusbar.tabbar.getAt(i);
if (index == tab.sheetindex) {
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;
}
}
@ -240,7 +240,7 @@ define([
if (item.sheetindex !== currentIdx) {
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;
},

View file

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