From 3a6f9545336e53451de95a4fe136518557745a67 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 30 May 2019 17:51:11 +0300 Subject: [PATCH] [SSE] Data tab: add show/hide details --- .../main/app/controller/DataTab.js | 12 ++++++- .../main/app/template/Toolbar.template | 8 +++++ .../main/app/view/DataTab.js | 33 +++++++++++++++++-- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DataTab.js b/apps/spreadsheeteditor/main/app/controller/DataTab.js index e2fb48416..4cc9ef8a1 100644 --- a/apps/spreadsheeteditor/main/app/controller/DataTab.js +++ b/apps/spreadsheeteditor/main/app/controller/DataTab.js @@ -61,7 +61,9 @@ define([ 'DataTab': { 'data:group': this.onGroup, 'data:ungroup': this.onUngroup, - 'data:tocolumns': this.onTextToColumn + 'data:tocolumns': this.onTextToColumn, + 'data:show': this.onShowClick, + 'data:hide': this.onHideClick } }); @@ -176,6 +178,14 @@ define([ })).show(); }, + onShowClick: function() { + // this.api.asc_showDetails(); + }, + + onHideClick: function() { + // this.api.asc_hideDetails(); + }, + textWizard: 'Text to Columns Wizard' }, SSE.Controllers.DataTab || {})); diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template index 41ab17045..aa54e6c75 100644 --- a/apps/spreadsheeteditor/main/app/template/Toolbar.template +++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template @@ -161,6 +161,14 @@ + + + + + + + + diff --git a/apps/spreadsheeteditor/main/app/view/DataTab.js b/apps/spreadsheeteditor/main/app/view/DataTab.js index 89dfdb053..e1ba99ee0 100644 --- a/apps/spreadsheeteditor/main/app/view/DataTab.js +++ b/apps/spreadsheeteditor/main/app/view/DataTab.js @@ -54,14 +54,18 @@ define([ me.btnUngroup.on('click', function (b, e) { me.fireEvent('data:ungroup'); }); - me.btnGroup.on('click', function (b, e) { me.fireEvent('data:group'); }); - me.btnTextToColumns.on('click', function (b, e) { me.fireEvent('data:tocolumns'); }); + // me.btnShow.on('click', function (b, e) { + // me.fireEvent('data:show'); + // }); + // me.btnHide.on('click', function (b, e) { + // me.fireEvent('data:hide'); + // }); } return { @@ -117,6 +121,27 @@ define([ _injectComponent('#slot-btn-text-column', this.btnTextToColumns); this.lockedControls.push(this.btnTextToColumns); + // Show / Hide details, TODO: add to sdk + // this.btnShow = new Common.UI.Button({ + // cls : 'btn-toolbar', + // iconCls : 'btn-show-details', + // style: 'padding-right: 2px;', + // caption: this.capBtnTextShow, + // lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth] + // }); + // _injectComponent('#slot-btn-show-details', this.btnShow); + // this.lockedControls.push(this.btnShow); + // + // this.btnHide = new Common.UI.Button({ + // cls : 'btn-toolbar', + // iconCls : 'btn-hide-details', + // style: 'padding-right: 2px;', + // caption: this.capBtnTextHide, + // lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth] + // }); + // _injectComponent('#slot-btn-hide-details', this.btnHide); + // this.lockedControls.push(this.btnHide); + Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); }, @@ -171,7 +196,9 @@ define([ tipGroup: 'Group range of cells', tipUngroup: 'Ungroup range of cells', capBtnTextToCol: 'Text to Columns', - tipToColumns: 'Separate cell text into columns' + tipToColumns: 'Separate cell text into columns', + capBtnTextShow: 'Show details', + capBtnTextHide: 'Hide details' } }()), SSE.Views.DataTab || {})); });