diff --git a/apps/common/main/lib/component/TabBar.js b/apps/common/main/lib/component/TabBar.js index 85c1dafde..27d120875 100644 --- a/apps/common/main/lib/component/TabBar.js +++ b/apps/common/main/lib/component/TabBar.js @@ -391,10 +391,12 @@ define([ }, this.bar), mousedown: $.proxy(function (e) { if (this.bar.options.draggable && !_.isUndefined(dragHelper) && (3 !== e.which)) { - if (this.bar.selectTabs.length > 1) { - dragHelper.setHookTabs(e, this.bar, this.bar.selectTabs); - } else { - dragHelper.setHook(e, this.bar, tab); + if (!tab.isLockTheDrag) { + if (this.bar.selectTabs.length > 1) { + dragHelper.setHookTabs(e, this.bar, this.bar.selectTabs); + } else { + dragHelper.setHook(e, this.bar, tab); + } } } }, this) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 794fc91da..6b4d37ad2 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -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; } } @@ -241,7 +241,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; }, diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 420ebda83..49385a5c7 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -330,7 +330,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); @@ -435,7 +435,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(isdoclocked); + this.tabMenu.items[4].setDisabled(issheetlocked); this.tabMenu.items[5].setDisabled(issheetlocked); this.tabMenu.items[6].setDisabled(isdoclocked); this.tabMenu.items[7].setDisabled(issheetlocked); @@ -446,8 +446,8 @@ define([ this.tabMenu.items[10].show(); } - this.tabMenu.items[9].setDisabled(isdoclocked); - this.tabMenu.items[10].setDisabled(isdoclocked); + this.tabMenu.items[9].setDisabled(issheetlocked); + this.tabMenu.items[10].setDisabled(issheetlocked); this.api.asc_closeCellEditor(); this.api.asc_enableKeyEvents(false);