diff --git a/apps/spreadsheeteditor/main/app/controller/DataTab.js b/apps/spreadsheeteditor/main/app/controller/DataTab.js index 4cc9ef8a1..a4e5dc7e3 100644 --- a/apps/spreadsheeteditor/main/app/controller/DataTab.js +++ b/apps/spreadsheeteditor/main/app/controller/DataTab.js @@ -150,6 +150,7 @@ define([ })).show(); } else if (val!==undefined) //undefined - error, true - rows, false - columns me.api.asc_group(val); + Common.NotificationCenter.trigger('edit:complete', me.toolbar); }, onTextToColumn: function() { @@ -179,11 +180,11 @@ define([ }, onShowClick: function() { - // this.api.asc_showDetails(); + this.api.asc_changeGroupDetails(true); }, onHideClick: function() { - // this.api.asc_hideDetails(); + this.api.asc_changeGroupDetails(false); }, textWizard: 'Text to Columns Wizard' diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template index aa54e6c75..b74d5f2ef 100644 --- a/apps/spreadsheeteditor/main/app/template/Toolbar.template +++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template @@ -161,14 +161,14 @@ - - - - - - - - +
+
+ +
+
+ +
+
diff --git a/apps/spreadsheeteditor/main/app/view/DataTab.js b/apps/spreadsheeteditor/main/app/view/DataTab.js index e1ba99ee0..5a4db0dfa 100644 --- a/apps/spreadsheeteditor/main/app/view/DataTab.js +++ b/apps/spreadsheeteditor/main/app/view/DataTab.js @@ -60,12 +60,12 @@ define([ 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'); - // }); + me.btnShow.on('click', function (b, e) { + me.fireEvent('data:show'); + }); + me.btnHide.on('click', function (b, e) { + me.fireEvent('data:hide'); + }); } return { @@ -121,26 +121,25 @@ 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); + 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)); }, diff --git a/apps/spreadsheeteditor/main/resources/less/toolbar.less b/apps/spreadsheeteditor/main/resources/less/toolbar.less index d71597540..3d4e730c8 100644 --- a/apps/spreadsheeteditor/main/resources/less/toolbar.less +++ b/apps/spreadsheeteditor/main/resources/less/toolbar.less @@ -161,6 +161,8 @@ .toolbar-btn-icon(rotate-270, 90, @toolbar-icon-size); .toolbar-btn-icon(flip-hor, 91, @toolbar-icon-size); .toolbar-btn-icon(flip-vert, 92, @toolbar-icon-size); +.toolbar-btn-icon(btn-show-details, 73, @toolbar-icon-size); +.toolbar-btn-icon(btn-hide-details, 73, @toolbar-icon-size); @menu-icon-size: 22px; .menu-btn-icon(mnu-align-center, 0, @menu-icon-size);