From 5e47e7965958c776060bfa7c8c1054ac0f81aeab Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Thu, 12 Dec 2019 14:35:57 +0300 Subject: [PATCH] [SSE] Drag and drop for move sheet --- apps/common/main/lib/component/TabBar.js | 2 ++ apps/spreadsheeteditor/main/app/view/Statusbar.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/apps/common/main/lib/component/TabBar.js b/apps/common/main/lib/component/TabBar.js index 9b77da678..17406f67c 100644 --- a/apps/common/main/lib/component/TabBar.js +++ b/apps/common/main/lib/component/TabBar.js @@ -144,6 +144,7 @@ define([ } me.drag = undefined; + me.bar.trigger('tab:drop', this); } } function dragMove (event) { @@ -187,6 +188,7 @@ define([ $(document).off('mouseup.tabbar'); $(document).off('mousemove.tabbar', dragMove); }); + this.bar.trigger('tab:drag', this.bar.selectTabs); } } } diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 0d50e0bfc..3c415d6c1 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -200,6 +200,12 @@ define([ me.fireEvent('sheet:move', [undefined, false, true, tabIndex, index]); } + }, this), + 'tab:drag' : _.bind(function (selectTabs) { + + }, this), + 'tab:drop' : _.bind(function (selectTabs) { + }, this) });