diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js
index 64d3d6ae6..405e63780 100644
--- a/apps/common/main/lib/view/Header.js
+++ b/apps/common/main/lib/view/Header.js
@@ -405,6 +405,8 @@ define([
menu: true
});
+ me.mnuZoom = {options: {value: 100}};
+
Common.NotificationCenter.on('app:ready', function(mode) {
Common.Utils.asyncCall(onAppReady, me, mode);
});
@@ -691,6 +693,14 @@ define([
}
},
+ fakeMenuItem: function() {
+ return {
+ conf: {checked: false},
+ setChecked: function (val) { this.conf.checked = val; },
+ isChecked: function () { return this.conf.checked; }
+ };
+ },
+
textBack: 'Go to Documents',
txtRename: 'Rename',
textSaveBegin: 'Saving...',
@@ -706,7 +716,13 @@ define([
tipGoEdit: 'Edit current file',
tipSave: 'Save',
tipUndo: 'Undo',
- tipRedo: 'Redo'
+ tipRedo: 'Redo',
+ textCompactView: 'Hide Toolbar',
+ textHideStatusBar: 'Hide Status Bar',
+ textHideLines: 'Hide Rulers',
+ textZoom: 'Zoom',
+ textAdvSettings: 'Advanced Settings',
+ tipViewSettings: 'View Settings'
}
}(), Common.Views.Header || {}))
});
diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js
index a3a5d020a..2be1b2a1c 100644
--- a/apps/documenteditor/main/app/controller/LeftMenu.js
+++ b/apps/documenteditor/main/app/controller/LeftMenu.js
@@ -62,6 +62,7 @@ define([
},
'Common.Views.Header': {
'click:users': _.bind(this.clickStatusbarUsers, this),
+ 'file:settings': _.bind(this.clickToolbarSettings,this),
'history:show': function () {
if ( !this.leftMenu.panelHistory.isVisible() )
this.clickMenuFileItem('header', 'history');
diff --git a/apps/documenteditor/main/app/controller/Statusbar.js b/apps/documenteditor/main/app/controller/Statusbar.js
index d195a7620..35237e80c 100644
--- a/apps/documenteditor/main/app/controller/Statusbar.js
+++ b/apps/documenteditor/main/app/controller/Statusbar.js
@@ -55,6 +55,7 @@ define([
],
initialize: function() {
+ var me = this;
this.addListeners({
'Statusbar': {
'langchanged': this.onLangMenu,
@@ -62,6 +63,15 @@ define([
this.api.zoom(value);
Common.NotificationCenter.trigger('edit:complete', this.statusbar);
}.bind(this)
+ },
+ 'Common.Views.Header': {
+ 'statusbar:hide': function (view, status) {
+ me.statusbar.setVisible(!status);
+ Common.localStorage.setBool('de-hidden-status', status);
+
+ Common.NotificationCenter.trigger('layout:changed', 'status');
+ Common.NotificationCenter.trigger('edit:complete', this.statusbar);
+ }
}
});
},
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index 349989085..87bbe2826 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -114,6 +114,7 @@ define([
'menu:show': this.onFileMenu.bind(this, 'show')
},
'Common.Views.Header': {
+ 'toolbar:setcompact': this.onChangeCompactView.bind(this),
'print': function (opts) {
var _main = this.getApplication().getController('Main');
_main.onPrint();
@@ -296,7 +297,6 @@ define([
toolbar.btnPageMargins.menu.on('item:click', _.bind(this.onPageMarginsSelect, this));
toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this));
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this));
- toolbar.btnAdvSettings.on('click', _.bind(this.onAdvSettingsClick, this));
toolbar.mnuPageSize.on('item:click', _.bind(this.onPageSizeClick, this));
toolbar.mnuColorSchema.on('item:click', _.bind(this.onColorSchemaClick, this));
toolbar.btnMailRecepients.on('click', _.bind(this.onSelectRecepientsClick, this));
@@ -308,13 +308,6 @@ define([
toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this));
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this));
- toolbar.mnuitemHideStatusBar.on('toggle', _.bind(this.onHideStatusBar, this));
- toolbar.mnuitemHideRulers.on('toggle', _.bind(this.onHideRulers, this));
- toolbar.mnuitemCompactToolbar.on('toggle', _.bind(this.onChangeCompactView, this));
- toolbar.btnFitPage.on('toggle', _.bind(this.onZoomToPageToggle, this));
- toolbar.btnFitWidth.on('toggle', _.bind(this.onZoomToWidthToggle, this));
- toolbar.mnuZoomIn.on('click', _.bind(this.onZoomInClick, this));
- toolbar.mnuZoomOut.on('click', _.bind(this.onZoomOutClick, this));
toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this));
$('#id-save-style-plus, #id-save-style-link', toolbar.$el).on('click', this.onMenuSaveStyle.bind(this));
@@ -379,7 +372,6 @@ define([
var me = this;
setTimeout(function () {
me.onChangeCompactView(null, !me.toolbar.isCompact());
- me.toolbar.mnuitemCompactToolbar.setChecked(me.toolbar.isCompact(), true);
}, 0);
}
},
@@ -845,12 +837,7 @@ define([
this.toolbar.mnuInsertPageNum.setDisabled(false);
},
- onApiZoomChange: function(percent, type) {
- this.toolbar.btnFitPage.setChecked(type == 2, true);
- this.toolbar.btnFitWidth.setChecked(type == 1, true);
- this.toolbar.mnuZoom.options.value = percent;
- $('.menu-zoom .zoom', this.toolbar.el).html(percent + '%');
- },
+ onApiZoomChange: function(percent, type) {},
onApiStartHighlight: function(pressed) {
this.toolbar.btnHighlightColor.toggle(pressed, true);
@@ -1415,11 +1402,6 @@ define([
this.modeAlwaysSetStyle = state;
},
- onAdvSettingsClick: function(btn, e) {
- this.toolbar.fireEvent('file:settings', this);
- btn.cmpEl.blur();
- },
-
onPageSizeClick: function(menu, item, state) {
if (this.api && state) {
this._state.pgsize = [0, 0];
@@ -1993,61 +1975,6 @@ define([
// Common.NotificationCenter.trigger('edit:complete', this.toolbar);
// },
- onHideStatusBar: function(item, checked) {
- var headerView = this.getApplication().getController('Statusbar').getView('Statusbar');
- headerView && headerView.setVisible(!checked);
-
- Common.localStorage.setBool('de-hidden-status', checked);
-
- Common.NotificationCenter.trigger('layout:changed', 'status');
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onHideRulers: function(item, checked) {
- if (this.api) {
- this.api.asc_SetViewRulers(!checked);
- }
-
- Common.localStorage.setBool('de-hidden-rulers', checked);
-
- Common.NotificationCenter.trigger('layout:changed', 'rulers');
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onZoomToPageToggle: function(item, state) {
- if (this.api) {
- if (state)
- this.api.zoomFitToPage();
- else
- this.api.zoomCustomMode();
- }
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onZoomToWidthToggle: function(item, state) {
- if (this.api) {
- if (state)
- this.api.zoomFitToWidth();
- else
- this.api.zoomCustomMode();
- }
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onZoomInClick: function(btn) {
- if (this.api)
- this.api.zoomIn();
-
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onZoomOutClick: function(btn) {
- if (this.api)
- this.api.zoomOut();
-
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
_clearBullets: function() {
this.toolbar.btnMarkers.toggle(false, true);
this.toolbar.btnNumbers.toggle(false, true);
@@ -2716,7 +2643,6 @@ define([
disable = disable || (reviewmode ? toolbar_mask.length>0 : group_mask.length>0);
toolbar.$el.find('.toolbar').toggleClass('masked', disable);
- toolbar.btnHide.setDisabled(disable);
if ( toolbar.synchTooltip )
toolbar.synchTooltip.hide();
diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js
index 93bb5defd..0c889b7c0 100644
--- a/apps/documenteditor/main/app/controller/Viewport.js
+++ b/apps/documenteditor/main/app/controller/Viewport.js
@@ -79,6 +79,7 @@ define([
toolbar.setExtra('left', me.header.getPanel('left', config));
},
'view:compact' : function (toolbar, state) {
+ me.header.mnuitemCompactToolbar.setChecked(state, true);
me.viewport.vlayout.getItem('toolbar').height = state ?
Common.Utils.InternalSettings.get('toolbar-height-compact') : Common.Utils.InternalSettings.get('toolbar-height-normal');
},
@@ -105,6 +106,7 @@ define([
setApi: function(api) {
this.api = api;
+ this.api.asc_registerCallback('asc_onZoomChange', this.onApiZoomChange.bind(this));
},
@@ -130,7 +132,11 @@ define([
this.boxSdk = $('#editor_sdk');
this.boxSdk.css('border-left', 'none');
+ this.header.mnuitemFitPage = this.header.fakeMenuItem();
+ this.header.mnuitemFitWidth = this.header.fakeMenuItem();
+
Common.NotificationCenter.on('app:face', this.onAppShowed.bind(this));
+ Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},
onAppShowed: function (config) {
@@ -169,6 +175,111 @@ define([
}
},
+ onAppReady: function (config) {
+ var me = this;
+ if ( me.header.btnOptions ) {
+ var compactview = !config.isEdit;
+ if ( config.isEdit ) {
+ if ( Common.localStorage.itemExists("de-compact-toolbar") ) {
+ compactview = Common.localStorage.getBool("de-compact-toolbar");
+ } else
+ if ( config.customization && config.customization.compactToolbar )
+ compactview = true;
+ }
+
+ me.header.mnuitemCompactToolbar = new Common.UI.MenuItem({
+ caption: me.header.textCompactView,
+ checked: compactview,
+ checkable: true,
+ value: 'toolbar'
+ });
+
+ var mnuitemHideStatusBar = new Common.UI.MenuItem({
+ caption: me.header.textHideStatusBar,
+ checked: Common.localStorage.getBool("de-hidden-status"),
+ checkable: true,
+ value: 'statusbar'
+ });
+
+ if ( config.canBrandingExt && config.customization && config.customization.statusBar === false )
+ mnuitemHideStatusBar.hide();
+
+ var mnuitemHideRulers = new Common.UI.MenuItem({
+ caption: me.header.textHideLines,
+ checked: Common.localStorage.getBool("de-hidden-rulers"),
+ checkable: true,
+ value: 'rulers'
+ });
+
+ me.header.mnuitemFitPage = new Common.UI.MenuItem({
+ caption: me.textFitPage,
+ checkable: true,
+ checked: me.header.mnuitemFitPage.isChecked(),
+ value: 'zoom:page'
+ });
+
+ me.header.mnuitemFitWidth = new Common.UI.MenuItem({
+ caption: me.textFitWidth,
+ checkable: true,
+ checked: me.header.mnuitemFitWidth.isChecked(),
+ value: 'zoom:width'
+ });
+
+ me.header.mnuZoom = new Common.UI.MenuItem({
+ template: _.template([
+ '
'
+ ].join('')),
+ stopPropagation: true,
+ value: me.header.mnuZoom.options.value
+ });
+
+ me.header.btnOptions.setMenu(new Common.UI.Menu({
+ cls: 'pull-right',
+ style: 'min-width: 180px;',
+ items: [
+ me.header.mnuitemCompactToolbar,
+ mnuitemHideStatusBar,
+ mnuitemHideRulers,
+ {caption:'--'},
+ me.header.mnuitemFitPage,
+ me.header.mnuitemFitWidth,
+ me.header.mnuZoom,
+ {caption:'--'},
+ new Common.UI.MenuItem({
+ caption: me.header.textAdvSettings,
+ value: 'advanced'
+ })
+ ]
+ })
+ );
+
+ var _on_btn_zoom = function (btn) {
+ btn == 'up' ? me.api.zoomIn() : me.api.zoomOut();
+ Common.NotificationCenter.trigger('edit:complete', me.header);
+ };
+
+ (new Common.UI.Button({
+ el : $('#hdr-menu-zoom-out', me.header.mnuZoom.$el),
+ cls : 'btn-toolbar'
+ })).on('click', _on_btn_zoom.bind(me, 'down'));
+
+ (new Common.UI.Button({
+ el : $('#hdr-menu-zoom-in', me.header.mnuZoom.$el),
+ cls : 'btn-toolbar'
+ })).on('click', _on_btn_zoom.bind(me, 'up'));
+
+ me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
+ }
+ },
+
onLayoutChanged: function(area) {
switch (area) {
default:
@@ -217,6 +328,42 @@ define([
me.header.lockHeaderBtns( 'undo', _need_disable );
me.header.lockHeaderBtns( 'redo', _need_disable );
- }
- });
+ me.header.lockHeaderBtns( 'opts', _need_disable );
+ },
+
+ onApiZoomChange: function(percent, type) {
+ this.header.mnuitemFitPage.setChecked(type == 2, true);
+ this.header.mnuitemFitWidth.setChecked(type == 1, true);
+ this.header.mnuZoom.options.value = percent;
+
+ if ( this.header.mnuZoom.$el )
+ $('.menu-zoom label.zoom', this.header.mnuZoom.$el).html(percent + '%');
+ },
+
+ onOptionsItemClick: function (menu, item, e) {
+ var me = this;
+
+ switch ( item.value ) {
+ case 'toolbar': me.header.fireEvent('toolbar:setcompact', [menu, item.isChecked()]); break;
+ case 'statusbar': me.header.fireEvent('statusbar:hide', [item, item.isChecked()]); break;
+ case 'rulers':
+ me.api.asc_SetViewRulers(!item.isChecked());
+ Common.localStorage.setBool('de-hidden-rulers', item.isChecked());
+ Common.NotificationCenter.trigger('layout:changed', 'rulers');
+ Common.NotificationCenter.trigger('edit:complete', me.header);
+ break;
+ case 'zoom:page':
+ item.isChecked() ? me.api.zoomFitToPage() : me.api.zoomCustomMode();
+ Common.NotificationCenter.trigger('edit:complete', me.header);
+ break;
+ case 'zoom:width':
+ item.isChecked() ? me.api.zoomFitToWidth() : me.api.zoomCustomMode();
+ Common.NotificationCenter.trigger('edit:complete', me.header);
+ break;
+ case 'advanced': me.header.fireEvent('file:settings', me.header); break;
+ }
+ },
+
+ textFitPage: 'Fit to Page',
+ textFitWidth: 'Fit to Width'
});
diff --git a/apps/documenteditor/main/app/template/Toolbar.template b/apps/documenteditor/main/app/template/Toolbar.template
index 1c6d10506..6e9d81d96 100644
--- a/apps/documenteditor/main/app/template/Toolbar.template
+++ b/apps/documenteditor/main/app/template/Toolbar.template
@@ -92,16 +92,7 @@
-
-
-
+
diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js
index 15a7c2f74..fc879aaf5 100644
--- a/apps/documenteditor/main/app/view/Toolbar.js
+++ b/apps/documenteditor/main/app/view/Toolbar.js
@@ -944,33 +944,6 @@ define([
iconCls: 'btn-mailrecepients'
});
- this.btnHide = new Common.UI.Button({
- id: 'id-toolbar-btn-hidebars',
- cls: 'btn-toolbar',
- iconCls: 'btn-hidebars no-mask',
- menu: true
- });
- this.toolbarControls.push(this.btnHide);
-
- this.btnFitPage = {
- conf: {checked: false},
- setChecked: function (val) {
- this.conf.checked = val;
- },
- isChecked: function () {
- return this.conf.checked;
- }
- };
- this.btnFitWidth = clone(this.btnFitPage);
- this.mnuZoom = {options: {value: 100}};
-
- this.btnAdvSettings = new Common.UI.Button({
- id: 'id-toolbar-btn-settings',
- cls: 'btn-toolbar',
- iconCls: 'btn-settings no-mask'
- });
- this.toolbarControls.push(this.btnAdvSettings);
-
me.btnImgAlign = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-img-align',
@@ -1198,9 +1171,9 @@ define([
}
});
+ me.setTab('home');
if ( me.isCompactView )
- me.setFolded(true); else
- me.setTab('home');
+ me.setFolded(true);
var top = Common.localStorage.getItem("de-pgmargins-top"),
left = Common.localStorage.getItem("de-pgmargins-left"),
@@ -1291,8 +1264,6 @@ define([
_injectComponent('#slot-btn-clearstyle', this.btnClearStyle);
_injectComponent('#slot-btn-copystyle', this.btnCopyStyle);
_injectComponent('#slot-btn-colorschemas', this.btnColorSchemas);
- _injectComponent('#slot-btn-hidebars', this.btnHide);
- _injectComponent('#slot-btn-settings', this.btnAdvSettings);
_injectComponent('#slot-btn-paracolor', this.btnParagraphColor);
_injectComponent('#slot-field-styles', this.listStyles);
_injectComponent('#slot-btn-halign', this.btnHorizontalAlign);
@@ -1539,67 +1510,14 @@ define([
this.btnCopyStyle.updateHint(this.tipCopyStyle + Common.Utils.String.platformKey('Ctrl+Shift+C'));
this.btnColorSchemas.updateHint(this.tipColorSchemas);
this.btnMailRecepients.updateHint(this.tipMailRecepients);
- this.btnHide.updateHint(this.tipViewSettings);
- this.btnAdvSettings.updateHint(this.tipAdvSettings);
// set menus
var me = this;
- this.btnHide.setMenu(new Common.UI.Menu({
- cls: 'pull-right',
- style: 'min-width: 180px;',
- items: [
- this.mnuitemCompactToolbar = new Common.UI.MenuItem({
- caption: this.textCompactView,
- checked: me.isCompactView,
- checkable: true
- }),
- this.mnuitemHideStatusBar = new Common.UI.MenuItem({
- caption: this.textHideStatusBar,
- checked: Common.localStorage.getBool("de-hidden-status"),
- checkable: true
- }),
- this.mnuitemHideRulers = new Common.UI.MenuItem({
- caption: this.textHideLines,
- checked: Common.localStorage.getBool("de-hidden-rulers"),
- checkable: true
- }),
- {caption: '--'},
- this.btnFitPage = new Common.UI.MenuItem({
- caption: this.textFitPage,
- checkable: true,
- checked: this.btnFitPage.isChecked()
- }),
- this.btnFitWidth = new Common.UI.MenuItem({
- caption: this.textFitWidth,
- checkable: true,
- checked: this.btnFitWidth.isChecked()
- }),
- this.mnuZoom = new Common.UI.MenuItem({
- template: _.template([
- ''
- ].join('')),
- stopPropagation: true,
- value: this.mnuZoom.options.value
- })
- ]
- })
- );
// if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header === false)
// this.mnuitemHideTitleBar.hide();
- if (this.mode.canBrandingExt && this.mode.customization && this.mode.customization.statusBar===false)
- this.mnuitemHideStatusBar.hide();
-
this.btnMarkers.setMenu(
new Common.UI.Menu({
style: 'min-width: 139px',
@@ -1657,15 +1575,6 @@ define([
this.paragraphControls.push(this.mnuPageNumCurrentPos);
this.paragraphControls.push(this.mnuInsertPageCount);
- this.mnuZoomOut = new Common.UI.Button({
- el: $('#id-menu-zoom-out'),
- cls: 'btn-toolbar'
- });
- this.mnuZoomIn = new Common.UI.Button({
- el: $('#id-menu-zoom-in'),
- cls: 'btn-toolbar'
- });
-
// set dataviews
var _conf = this.mnuMarkersPicker.conf;
@@ -2305,15 +2214,6 @@ define([
tipInsertText: 'Insert Text',
tipInsertTextArt: 'Insert Text Art',
tipHAligh: 'Horizontal Align',
- tipViewSettings: 'View Settings',
- tipAdvSettings: 'Advanced Settings',
- textCompactView: 'Hide Toolbar',
- textHideTitleBar: 'Hide Title Bar',
- textHideStatusBar: 'Hide Status Bar',
- textHideLines: 'Hide Rulers',
- textFitPage: 'Fit to Page',
- textFitWidth: 'Fit to Width',
- textZoom: 'Zoom',
mniEditDropCap: 'Drop Cap Settings',
textNone: 'None',
textInText: 'In Text',
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index c87840c5d..7f15075c5 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -153,6 +153,12 @@
"Common.Views.Header.tipViewUsers": "View users and manage document access rights",
"Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename",
+ "Common.Views.Header.textAdvSettings": "Advanced settings",
+ "Common.Views.Header.textCompactView": "Hide Toolbar",
+ "Common.Views.Header.textHideStatusBar": "Hide Status Bar",
+ "Common.Views.Header.textZoom": "Zoom",
+ "Common.Views.Header.tipViewSettings": "View settings",
+ "Common.Views.Header.textHideLines": "Hide Rulers",
"Common.Views.History.textCloseHistory": "Close History",
"Common.Views.History.textHide": "Collapse",
"Common.Views.History.textHideAll": "Hide detailed changes",
@@ -779,6 +785,8 @@
"DE.Controllers.Toolbar.txtSymbol_vdots": "Vertical ellipsis",
"DE.Controllers.Toolbar.txtSymbol_xsi": "Xi",
"DE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
+ "DE.Controllers.Viewport.textFitPage": "Fit to Page",
+ "DE.Controllers.Viewport.textFitWidth": "Fit to Width",
"DE.Views.ChartSettings.textAdvanced": "Show advanced settings",
"DE.Views.ChartSettings.textArea": "Area",
"DE.Views.ChartSettings.textBar": "Bar",
@@ -1744,14 +1752,14 @@
"DE.Views.Toolbar.textColumnsRight": "Right",
"DE.Views.Toolbar.textColumnsThree": "Three",
"DE.Views.Toolbar.textColumnsTwo": "Two",
- "DE.Views.Toolbar.textCompactView": "Hide Toolbar",
+ "del_DE.Views.Toolbar.textCompactView": "Hide Toolbar",
"DE.Views.Toolbar.textContPage": "Continuous Page",
"DE.Views.Toolbar.textEvenPage": "Even Page",
- "DE.Views.Toolbar.textFitPage": "Fit to Page",
- "DE.Views.Toolbar.textFitWidth": "Fit to Width",
- "DE.Views.Toolbar.textHideLines": "Hide Rulers",
- "DE.Views.Toolbar.textHideStatusBar": "Hide Status Bar",
- "DE.Views.Toolbar.textHideTitleBar": "Hide Title Bar",
+ "del_DE.Views.Toolbar.textFitPage": "Fit to Page",
+ "del_DE.Views.Toolbar.textFitWidth": "Fit to Width",
+ "del_DE.Views.Toolbar.textHideLines": "Hide Rulers",
+ "del_DE.Views.Toolbar.textHideStatusBar": "Hide Status Bar",
+ "del_DE.Views.Toolbar.textHideTitleBar": "Hide Title Bar",
"DE.Views.Toolbar.textInMargin": "In Margin",
"DE.Views.Toolbar.textInsColumnBreak": "Insert Column Break",
"DE.Views.Toolbar.textInsertPageCount": "Insert number of pages",
@@ -1805,8 +1813,8 @@
"DE.Views.Toolbar.textToCurrent": "To current position",
"DE.Views.Toolbar.textTop": "Top: ",
"DE.Views.Toolbar.textUnderline": "Underline",
- "DE.Views.Toolbar.textZoom": "Zoom",
- "DE.Views.Toolbar.tipAdvSettings": "Advanced settings",
+ "del_DE.Views.Toolbar.textZoom": "Zoom",
+ "del_DE.Views.Toolbar.tipAdvSettings": "Advanced settings",
"DE.Views.Toolbar.tipAlignCenter": "Align center",
"DE.Views.Toolbar.tipAlignJust": "Justified",
"DE.Views.Toolbar.tipAlignLeft": "Align left",
@@ -1862,7 +1870,7 @@
"DE.Views.Toolbar.tipShowHiddenChars": "Nonprinting characters",
"DE.Views.Toolbar.tipSynchronize": "The document has been changed by another user. Please click to save your changes and reload the updates.",
"DE.Views.Toolbar.tipUndo": "Undo",
- "DE.Views.Toolbar.tipViewSettings": "View settings",
+ "del_DE.Views.Toolbar.tipViewSettings": "View settings",
"DE.Views.Toolbar.txtScheme1": "Office",
"DE.Views.Toolbar.txtScheme10": "Median",
"DE.Views.Toolbar.txtScheme11": "Metro",
diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js
index eaed9b725..ce96b2837 100644
--- a/apps/presentationeditor/main/app/controller/LeftMenu.js
+++ b/apps/presentationeditor/main/app/controller/LeftMenu.js
@@ -61,6 +61,7 @@ define([
'hide': _.bind(this.onHideChat, this)
},
'Common.Views.Header': {
+ 'file:settings': _.bind(this.clickToolbarSettings,this),
'click:users': _.bind(this.clickStatusbarUsers, this)
},
'Common.Views.Plugins': {
diff --git a/apps/presentationeditor/main/app/controller/Statusbar.js b/apps/presentationeditor/main/app/controller/Statusbar.js
index 00b0364c8..87ef91725 100644
--- a/apps/presentationeditor/main/app/controller/Statusbar.js
+++ b/apps/presentationeditor/main/app/controller/Statusbar.js
@@ -56,12 +56,22 @@ define([
],
initialize: function() {
+ var me = this;
this.addListeners({
'FileMenu': {
'settings:apply': _.bind(this.applySettings, this)
},
'Statusbar': {
'langchanged': this.onLangMenu
+ },
+ 'Common.Views.Header': {
+ 'statusbar:hide': function (view, status) {
+ me.statusbar.setVisible(!status);
+ Common.localStorage.setBool('pe-hidden-status', status);
+
+ Common.NotificationCenter.trigger('layout:changed', 'status');
+ Common.NotificationCenter.trigger('edit:complete', this.statusbar);
+ }
}
});
this._state = {
diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js
index 51cb88ead..da523a4e6 100644
--- a/apps/presentationeditor/main/app/controller/Toolbar.js
+++ b/apps/presentationeditor/main/app/controller/Toolbar.js
@@ -129,6 +129,7 @@ define([
'menu:show': this.onFileMenu.bind(this, 'show')
},
'Common.Views.Header': {
+ 'toolbar:setcompact': this.onChangeCompactView.bind(this),
'print': function (opts) {
var _main = this.getApplication().getController('Main');
_main.onPrint();
@@ -293,18 +294,10 @@ define([
toolbar.btnInsertTable.menu.on('item:click', _.bind(this.onInsertTableClick, this));
toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this));
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this));
- toolbar.btnAdvSettings.on('click', _.bind(this.onAdvSettingsClick, this));
toolbar.btnColorSchemas.menu.on('item:click', _.bind(this.onColorSchemaClick, this));
toolbar.btnSlideSize.menu.on('item:click', _.bind(this.onSlideSize, this));
toolbar.mnuInsertChartPicker.on('item:click', _.bind(this.onSelectChart, this));
toolbar.listTheme.on('click', _.bind(this.onListThemeSelect, this));
- toolbar.mnuitemHideStatusBar.on('toggle', _.bind(this.onHideStatusBar, this));
- toolbar.mnuitemHideRulers.on('toggle', _.bind(this.onHideRulers, this));
- toolbar.mnuitemCompactToolbar.on('toggle', _.bind(this.onChangeCompactView, this));
- toolbar.btnFitPage.on('toggle', _.bind(this.onZoomToPageToggle, this));
- toolbar.btnFitWidth.on('toggle', _.bind(this.onZoomToWidthToggle, this));
- toolbar.mnuZoomIn.on('click', _.bind(this.onZoomInClick, this));
- toolbar.mnuZoomOut.on('click', _.bind(this.onZoomOutClick, this));
toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this));
},
@@ -369,7 +362,6 @@ define([
var me = this;
Common.Utils.asyncCall(function () {
me.onChangeCompactView(null, !me.toolbar.isCompact());
- me.toolbar.mnuitemCompactToolbar.setChecked(me.toolbar.isCompact(), true);
});
}
},
@@ -775,18 +767,7 @@ define([
this.editMode = false;
},
- onApiZoomChange: function(percent, type) {
- if (this._state.zoom_type !== type) {
- this.toolbar.btnFitPage.setChecked(type == 2, true);
- this.toolbar.btnFitWidth.setChecked(type == 1, true);
- this._state.zoom_type = type;
- }
- if (this._state.zoom_percent !== percent) {
- $('.menu-zoom .zoom', this.toolbar.el).html(percent + '%');
- this._state.zoom_percent = percent;
- }
- this.toolbar.mnuZoom.options.value = percent;
- },
+ onApiZoomChange: function(percent, type) {},
onApiInitEditorStyles: function(themes) {
if (themes) {
@@ -1441,11 +1422,6 @@ define([
this.modeAlwaysSetStyle = state;
},
- onAdvSettingsClick: function(btn, e) {
- this.toolbar.fireEvent('file:settings', this);
- btn.cmpEl.blur();
- },
-
onColorSchemaClick: function(menu, item) {
if (this.api) {
this.api.ChangeColorScheme(item.value);
@@ -1559,69 +1535,6 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
},
- onHideStatusBar: function(item, checked) {
- var headerView = this.getApplication().getController('Statusbar').getView('Statusbar');
- headerView && headerView.setVisible(!checked);
-
- Common.localStorage.setBool('pe-hidden-status', checked);
-
- Common.NotificationCenter.trigger('layout:changed', 'status');
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onHideRulers: function(item, checked) {
- if (this.api) {
- this.api.asc_SetViewRulers(!checked);
- }
-
- Common.localStorage.setBool('pe-hidden-rulers', checked);
-
- Common.NotificationCenter.trigger('layout:changed', 'rulers');
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onZoomToPageToggle: function(item, state) {
- if (this.api) {
- this._state.zoom_type = undefined;
- this._state.zoom_percent = undefined;
- if (state)
- this.api.zoomFitToPage();
- else
- this.api.zoomCustomMode();
- }
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onZoomToWidthToggle: function(item, state) {
- if (this.api) {
- this._state.zoom_type = undefined;
- this._state.zoom_percent = undefined;
- if (state)
- this.api.zoomFitToWidth();
- else
- this.api.zoomCustomMode();
- }
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onZoomInClick: function(btn) {
- this._state.zoom_type = undefined;
- this._state.zoom_percent = undefined;
- if (this.api)
- this.api.zoomIn();
-
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onZoomOutClick: function(btn) {
- this._state.zoom_type = undefined;
- this._state.zoom_percent = undefined;
- if (this.api)
- this.api.zoomOut();
-
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
_clearBullets: function() {
this.toolbar.btnMarkers.toggle(false, true);
this.toolbar.btnNumbers.toggle(false, true);
diff --git a/apps/presentationeditor/main/app/controller/Viewport.js b/apps/presentationeditor/main/app/controller/Viewport.js
index 0ae30080e..6ae3dbbe9 100644
--- a/apps/presentationeditor/main/app/controller/Viewport.js
+++ b/apps/presentationeditor/main/app/controller/Viewport.js
@@ -112,6 +112,7 @@ define([
setApi: function(api) {
this.api = api;
+ this.api.asc_registerCallback('asc_onZoomChange', this.onApiZoomChange.bind(this));
},
@@ -134,7 +135,11 @@ define([
Common.localStorage.setItem('pe-mainmenu-width',leftPanel.width());
}, this);
+ this.header.mnuitemFitPage = this.header.fakeMenuItem();
+ this.header.mnuitemFitWidth = this.header.fakeMenuItem();
+
Common.NotificationCenter.on('app:face', this.onAppShowed.bind(this));
+ Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},
onAppShowed: function (config) {
@@ -172,6 +177,110 @@ define([
}
},
+ onAppReady: function (config) {
+ var me = this;
+ if ( me.header.btnOptions ) {
+ var compactview = !config.isEdit;
+ if ( config.isEdit ) {
+ if ( Common.localStorage.itemExists("pe-compact-toolbar") ) {
+ compactview = Common.localStorage.getBool("pe-compact-toolbar");
+ } else
+ if ( config.customization && config.customization.compactToolbar )
+ compactview = true;
+ }
+
+ me.header.mnuitemCompactToolbar = new Common.UI.MenuItem({
+ caption: me.header.textCompactView,
+ checked: compactview,
+ checkable: true,
+ value: 'toolbar'
+ });
+
+ var mnuitemHideStatusBar = new Common.UI.MenuItem({
+ caption: me.header.textHideStatusBar,
+ checked: Common.localStorage.getBool("pe-hidden-status"),
+ checkable: true,
+ value: 'statusbar'
+ });
+
+ if ( config.canBrandingExt && config.customization && config.customization.statusBar === false )
+ mnuitemHideStatusBar.hide();
+
+ var mnuitemHideRulers = new Common.UI.MenuItem({
+ caption: me.header.textHideLines,
+ checked: Common.localStorage.getBool("pe-hidden-rulers"),
+ checkable: true,
+ value: 'rulers'
+ });
+
+ me.header.mnuitemFitPage = new Common.UI.MenuItem({
+ caption: me.textFitPage,
+ checkable: true,
+ checked: me.header.mnuitemFitPage.isChecked(),
+ value: 'zoom:page'
+ });
+
+ me.header.mnuitemFitWidth = new Common.UI.MenuItem({
+ caption: me.textFitWidth,
+ checkable: true,
+ checked: me.header.mnuitemFitWidth.isChecked(),
+ value: 'zoom:width'
+ });
+
+ me.header.mnuZoom = new Common.UI.MenuItem({
+ template: _.template([
+ ''
+ ].join('')),
+ stopPropagation: true,
+ value: me.header.mnuZoom.options.value
+ });
+
+ me.header.btnOptions.setMenu(new Common.UI.Menu({
+ cls: 'pull-right',
+ style: 'min-width: 180px;',
+ items: [
+ me.header.mnuitemCompactToolbar,
+ mnuitemHideStatusBar,
+ mnuitemHideRulers,
+ {caption:'--'},
+ me.header.mnuitemFitPage,
+ me.header.mnuitemFitWidth,
+ me.header.mnuZoom,
+ {caption:'--'},
+ new Common.UI.MenuItem({
+ caption: me.header.textAdvSettings,
+ value: 'advanced'
+ })
+ ]
+ })
+ );
+
+ var _on_btn_zoom = function (btn) {
+ btn == 'up' ? me.api.zoomIn() : me.api.zoomOut();
+ Common.NotificationCenter.trigger('edit:complete', me.header);
+ };
+
+ (new Common.UI.Button({
+ el : $('#hdr-menu-zoom-out', me.header.mnuZoom.$el),
+ cls : 'btn-toolbar'
+ })).on('click', _on_btn_zoom.bind(me, 'down'));
+
+ (new Common.UI.Button({
+ el : $('#hdr-menu-zoom-in', me.header.mnuZoom.$el),
+ cls : 'btn-toolbar'
+ })).on('click', _on_btn_zoom.bind(me, 'up'));
+
+ me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
+ }
+ },
onLayoutChanged: function(area) {
switch (area) {
@@ -256,6 +365,42 @@ define([
me.header.lockHeaderBtns( 'undo', _need_disable );
me.header.lockHeaderBtns( 'redo', _need_disable );
- }
- });
+ me.header.lockHeaderBtns( 'opts', _need_disable );
+ },
+
+ onApiZoomChange: function(percent, type) {
+ this.header.mnuitemFitPage.setChecked(type == 2, true);
+ this.header.mnuitemFitWidth.setChecked(type == 1, true);
+ this.header.mnuZoom.options.value = percent;
+
+ if ( this.header.mnuZoom.$el )
+ $('.menu-zoom label.zoom', this.header.mnuZoom.$el).html(percent + '%');
+ },
+
+ onOptionsItemClick: function (menu, item, e) {
+ var me = this;
+
+ switch ( item.value ) {
+ case 'toolbar': me.header.fireEvent('toolbar:setcompact', [menu, item.isChecked()]); break;
+ case 'statusbar': me.header.fireEvent('statusbar:hide', [item, item.isChecked()]); break;
+ case 'rulers':
+ me.api.asc_SetViewRulers(!item.isChecked());
+ Common.localStorage.setBool('pe-hidden-rulers', item.isChecked());
+ Common.NotificationCenter.trigger('layout:changed', 'rulers');
+ Common.NotificationCenter.trigger('edit:complete', me.header);
+ break;
+ case 'zoom:page':
+ item.isChecked() ? me.api.zoomFitToPage() : me.api.zoomCustomMode();
+ Common.NotificationCenter.trigger('edit:complete', me.header);
+ break;
+ case 'zoom:width':
+ item.isChecked() ? me.api.zoomFitToWidth() : me.api.zoomCustomMode();
+ Common.NotificationCenter.trigger('edit:complete', me.header);
+ break;
+ case 'advanced': me.header.fireEvent('file:settings', me.header); break;
+ }
+ },
+
+ textFitPage: 'Fit to Page',
+ textFitWidth: 'Fit to Width'
});
diff --git a/apps/presentationeditor/main/app/template/Toolbar.template b/apps/presentationeditor/main/app/template/Toolbar.template
index 7cae88f91..0cb5f81ec 100644
--- a/apps/presentationeditor/main/app/template/Toolbar.template
+++ b/apps/presentationeditor/main/app/template/Toolbar.template
@@ -110,16 +110,7 @@
-
-
-
+
diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js
index bafa319e4..6a308131f 100644
--- a/apps/presentationeditor/main/app/view/Toolbar.js
+++ b/apps/presentationeditor/main/app/view/Toolbar.js
@@ -576,31 +576,6 @@ define([
});
me.slideOnlyControls.push(me.btnColorSchemas);
- me.btnHide = new Common.UI.Button({
- id : 'id-toolbar-btn-hidebars',
- cls : 'btn-toolbar',
- iconCls : 'btn-hidebars no-mask',
- lock : [_set.menuFileOpen, _set.slideDeleted, _set.disableOnStart],
- menu : true
- });
- me.slideOnlyControls.push(me.btnHide);
-
- this.btnFitPage = {
- conf: {checked:false},
- setChecked: function(val) { this.conf.checked = val;},
- isChecked: function () { return this.conf.checked; }
- };
- this.btnFitWidth = clone(this.btnFitPage);
- this.mnuZoom = {options: {value: 100}};
-
- me.btnAdvSettings = new Common.UI.Button({
- id : 'id-toolbar-btn-settings',
- cls : 'btn-toolbar',
- iconCls : 'btn-settings no-mask',
- lock : [_set.slideDeleted, _set.disableOnStart]
- });
- me.slideOnlyControls.push(me.btnAdvSettings);
-
me.btnShapeAlign = new Common.UI.Button({
id : 'id-toolbar-btn-shape-align',
cls : 'btn-toolbar',
@@ -875,9 +850,9 @@ define([
}
});
+ me.setTab('home');
if ( me.isCompactView )
- me.setFolded(true); else
- me.setTab('home');
+ me.setFolded(true);
return this;
},
@@ -943,8 +918,6 @@ define([
_injectComponent('#slot-btn-colorschemas', this.btnColorSchemas);
_injectComponent('#slot-btn-slidesize', this.btnSlideSize);
_injectComponent('#slot-field-styles', this.listTheme);
- _injectComponent('#slot-btn-hidebars', this.btnHide);
- _injectComponent('#slot-btn-settings', this.btnAdvSettings);
function _injectBtns(opts) {
var array = createButtonSet();
@@ -1105,8 +1078,6 @@ define([
this.btnInsertHyperlink.updateHint(this.tipInsertHyperlink + Common.Utils.String.platformKey('Ctrl+K'));
this.btnInsertTextArt.updateHint(this.tipInsertTextArt);
this.btnColorSchemas.updateHint(this.tipColorSchemas);
- this.btnHide.updateHint(this.tipViewSettings);
- this.btnAdvSettings.updateHint(this.tipAdvSettings);
this.btnShapeAlign.updateHint(this.tipShapeAlign);
this.btnShapeArrange.updateHint(this.tipShapeArrange);
this.btnSlideSize.updateHint(this.tipSlideSize);
@@ -1115,66 +1086,6 @@ define([
var me = this;
- this.btnHide.setMenu(
- new Common.UI.Menu({
- cls: 'pull-right',
- style: 'min-width: 180px;',
- items: [
- this.mnuitemCompactToolbar = new Common.UI.MenuItem({
- caption: this.textCompactView,
- checkable: true,
- checked: me.isCompactView
- }),
- this.mnuitemHideStatusBar = new Common.UI.MenuItem({
- caption: this.textHideStatusBar,
- checkable: true
- }),
- this.mnuitemHideRulers = new Common.UI.MenuItem({
- caption: this.textHideLines,
- checkable: true
- }),
- {caption: '--'},
- this.btnFitPage = new Common.UI.MenuItem({
- caption: this.textFitPage,
- checkable: true,
- checked: this.btnFitPage.isChecked()
- }),
- this.btnFitWidth = new Common.UI.MenuItem({
- caption: this.textFitWidth,
- checkable: true,
- checked: this.btnFitWidth.isChecked()
- }),
- this.mnuZoom = new Common.UI.MenuItem({
- template: _.template([
- ''
- ].join('')),
- stopPropagation: true,
- value: this.mnuZoom.options.value
- })
- ]
- })
- );
- if (this.mode.canBrandingExt && this.mode.customization && this.mode.customization.statusBar === false)
- this.mnuitemHideStatusBar.hide();
-
- this.mnuZoomOut = new Common.UI.Button({
- el: $('#id-menu-zoom-out'),
- cls: 'btn-toolbar'
- });
- this.mnuZoomIn = new Common.UI.Button({
- el: $('#id-menu-zoom-in'),
- cls: 'btn-toolbar'
- });
-
this.btnMarkers.setMenu(
new Common.UI.Menu({
style: 'min-width: 139px',
@@ -1339,9 +1250,6 @@ define([
me.mnuChangeSlidePicker._needRecalcSlideLayout = true;
});
- this.mnuitemHideStatusBar.setChecked(Common.localStorage.getBool('pe-hidden-status'), true);
- this.mnuitemHideRulers.setChecked(Common.localStorage.getBool("pe-hidden-rulers", true), true);
-
// // Enable none paragraph components
this.lockToolbar(PE.enumLock.disableOnStart, false, {array: this.slideOnlyControls.concat(this.shapeControls)});
@@ -1747,15 +1655,6 @@ define([
mniSlideWide: 'Widescreen (16:9)',
mniSlideAdvanced: 'Advanced Settings',
tipSlideSize: 'Select Slide Size',
- tipViewSettings: 'View Settings',
- tipAdvSettings: 'Advanced Settings',
- textCompactView: 'Hide Toolbar',
- textHideTitleBar: 'Hide Title Bar',
- textHideStatusBar: 'Hide Status Bar',
- textHideLines: 'Hide Rulers',
- textFitPage: 'Fit to Slide',
- textFitWidth: 'Fit to Width',
- textZoom: 'Zoom',
tipInsertChart: 'Insert Chart',
textLine: 'Line',
textColumn: 'Column',
diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json
index a60255b37..eb8605858 100644
--- a/apps/presentationeditor/main/locale/en.json
+++ b/apps/presentationeditor/main/locale/en.json
@@ -92,6 +92,12 @@
"Common.Views.Header.tipViewUsers": "View users and manage document access rights",
"Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename",
+ "Common.Views.Header.textAdvSettings": "Advanced settings",
+ "Common.Views.Header.textCompactView": "Hide Toolbar",
+ "Common.Views.Header.textHideStatusBar": "Hide Status Bar",
+ "Common.Views.Header.textZoom": "Zoom",
+ "Common.Views.Header.tipViewSettings": "View settings",
+ "Common.Views.Header.textHideLines": "Hide Rulers",
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
@@ -700,6 +706,8 @@
"PE.Controllers.Toolbar.txtSymbol_vdots": "Vertical ellipsis",
"PE.Controllers.Toolbar.txtSymbol_xsi": "Xi",
"PE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
+ "PE.Controllers.Viewport.textFitPage": "Fit to Slide",
+ "PE.Controllers.Viewport.textFitWidth": "Fit to Width",
"PE.Views.ChartSettings.textAdvanced": "Show advanced settings",
"PE.Views.ChartSettings.textArea": "Area",
"PE.Views.ChartSettings.textBar": "Bar",
@@ -1405,12 +1413,12 @@
"PE.Views.Toolbar.textCancel": "Cancel",
"PE.Views.Toolbar.textCharts": "Charts",
"PE.Views.Toolbar.textColumn": "Column",
- "PE.Views.Toolbar.textCompactView": "Hide Toolbar",
- "PE.Views.Toolbar.textFitPage": "Fit to Slide",
- "PE.Views.Toolbar.textFitWidth": "Fit to Width",
- "PE.Views.Toolbar.textHideLines": "Hide Rulers",
- "PE.Views.Toolbar.textHideStatusBar": "Hide Status Bar",
- "PE.Views.Toolbar.textHideTitleBar": "Hide Title Bar",
+ "del_PE.Views.Toolbar.textCompactView": "Hide Toolbar",
+ "del_PE.Views.Toolbar.textFitPage": "Fit to Slide",
+ "del_PE.Views.Toolbar.textFitWidth": "Fit to Width",
+ "del_PE.Views.Toolbar.textHideLines": "Hide Rulers",
+ "del_PE.Views.Toolbar.textHideStatusBar": "Hide Status Bar",
+ "del_PE.Views.Toolbar.textHideTitleBar": "Hide Title Bar",
"PE.Views.Toolbar.textItalic": "Italic",
"PE.Views.Toolbar.textLine": "Line",
"PE.Views.Toolbar.textNewColor": "Custom Color",
@@ -1439,9 +1447,9 @@
"PE.Views.Toolbar.textTabProtect": "Protection",
"PE.Views.Toolbar.textTitleError": "Error",
"PE.Views.Toolbar.textUnderline": "Underline",
- "PE.Views.Toolbar.textZoom": "Zoom",
+ "del_PE.Views.Toolbar.textZoom": "Zoom",
"PE.Views.Toolbar.tipAddSlide": "Add slide",
- "PE.Views.Toolbar.tipAdvSettings": "Advanced settings",
+ "del_PE.Views.Toolbar.tipAdvSettings": "Advanced settings",
"PE.Views.Toolbar.tipBack": "Back",
"PE.Views.Toolbar.tipChangeChart": "Change chart type",
"PE.Views.Toolbar.tipChangeSlide": "Change slide layout",
@@ -1454,7 +1462,7 @@
"PE.Views.Toolbar.tipFontName": "Font",
"PE.Views.Toolbar.tipFontSize": "Font size",
"PE.Views.Toolbar.tipHAligh": "Horizontal align",
- "PE.Views.Toolbar.tipHideBars": "Hide Title bar & Status bar",
+ "del_PE.Views.Toolbar.tipHideBars": "Hide Title bar & Status bar",
"PE.Views.Toolbar.tipIncPrLeft": "Increase indent",
"PE.Views.Toolbar.tipInsertChart": "Insert chart",
"PE.Views.Toolbar.tipInsertEquation": "Insert equation",
diff --git a/apps/spreadsheeteditor/main/app/controller/CellEditor.js b/apps/spreadsheeteditor/main/app/controller/CellEditor.js
index ab413d942..7c9c69def 100644
--- a/apps/spreadsheeteditor/main/app/controller/CellEditor.js
+++ b/apps/spreadsheeteditor/main/app/controller/CellEditor.js
@@ -67,6 +67,13 @@ define([
'CellEditor': {},
'Viewport': {
'layout:resizedrag': _.bind(this.onLayoutResize, this)
+ },
+ 'Common.Views.Header': {
+ 'formulabar:hide': function (state) {
+ this.editor.setVisible(!state);
+ Common.localStorage.setBool('sse-hidden-formula', state);
+ Common.NotificationCenter.trigger('layout:changed', 'celleditor', state?'hidden':'showed');
+ }.bind(this)
}
});
},
diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js
index c472d4f92..c6fa3a093 100644
--- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js
+++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js
@@ -55,6 +55,7 @@ define([
'hide': _.bind(this.onHidePlugins, this)
},
'Common.Views.Header': {
+ 'file:settings': _.bind(this.clickToolbarSettings,this),
'click:users': _.bind(this.clickStatusbarUsers, this)
},
'LeftMenu': {
diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js
index 7e6a09000..59beebf6a 100644
--- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js
+++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js
@@ -80,6 +80,7 @@ define([
'settings:apply': _.bind(this.applyFormulaSettings, this)
},
'Common.Views.Header': {
+ 'toolbar:setcompact': this.onChangeViewMode.bind(this),
'print': function (opts) {
var _main = this.getApplication().getController('Main');
_main.onPrint();
@@ -305,7 +306,6 @@ define([
toolbar.btnDecDecimal.on('click', _.bind(this.onDecrement, this));
toolbar.btnIncDecimal.on('click', _.bind(this.onIncrement, this));
toolbar.btnInsertFormula.on('click', _.bind(this.onInsertFormulaMenu, this));
- toolbar.btnSettings.on('click', _.bind(this.onAdvSettingsClick, this));
toolbar.btnInsertFormula.menu.on('item:click', _.bind(this.onInsertFormulaMenu, this));
toolbar.btnNamedRange.menu.on('item:click', _.bind(this.onNamedRangeMenu, this));
toolbar.btnNamedRange.menu.on('show:after', _.bind(this.onNamedRangeMenuOpen, this));
@@ -326,16 +326,12 @@ define([
toolbar.cmbFontSize.on('hide:after', _.bind(this.onHideMenus, this));
toolbar.cmbFontSize.on('combo:blur', _.bind(this.onComboBlur, this));
toolbar.cmbFontSize.on('combo:focusin', _.bind(this.onComboOpen, this, false));
- if (toolbar.mnuZoomIn) toolbar.mnuZoomIn.on('click', _.bind(this.onZoomInClick, this));
- if (toolbar.mnuZoomOut) toolbar.mnuZoomOut.on('click', _.bind(this.onZoomOutClick, this));
- if (toolbar.btnShowMode.rendered) toolbar.btnShowMode.menu.on('item:click', _.bind(this.onHideMenu, this));
toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this));
toolbar.cmbNumberFormat.on('selected', _.bind(this.onNumberFormatSelect, this));
toolbar.cmbNumberFormat.on('show:before', _.bind(this.onNumberFormatOpenBefore, this, true));
if (toolbar.cmbNumberFormat.cmpEl)
toolbar.cmbNumberFormat.cmpEl.on('click', '#id-toolbar-mnu-item-more-formats a', _.bind(this.onNumberFormatSelect, this));
toolbar.btnCurrencyStyle.menu.on('item:click', _.bind(this.onNumberFormatMenu, this));
- if (toolbar.mnuitemCompactToolbar) toolbar.mnuitemCompactToolbar.on('toggle', _.bind(this.onChangeViewMode, this));
$('#id-toolbar-menu-new-fontcolor').on('click', _.bind(this.onNewTextColor, this));
$('#id-toolbar-menu-new-paracolor').on('click', _.bind(this.onNewBackColor, this));
$('#id-toolbar-menu-new-bordercolor').on('click', _.bind(this.onNewBorderColor, this));
@@ -1361,53 +1357,6 @@ define([
}
},
- onAdvSettingsClick: function(btn, e) {
- this.toolbar.fireEvent('file:settings', this);
- btn.cmpEl.blur();
- },
-
- onZoomInClick: function(btn) {
- if (this.api) {
- var f = Math.floor(this.api.asc_getZoom() * 10)/10;
- f += .1;
- if (f > 0 && !(f > 2.)) {
- this.api.asc_setZoom(f);
- }
- }
-
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onZoomOutClick: function(btn) {
- if (this.api) {
- var f = Math.ceil(this.api.asc_getZoom() * 10)/10;
- f -= .1;
- if (!(f < .5)) {
- this.api.asc_setZoom(f);
- }
- }
-
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
- onHideMenu: function(menu, item) {
- var params = {},
- option;
-
- switch(item.value) {
- case 'title': params.title = item.checked; option = 'sse-hidden-title'; break;
- case 'formula': params.formula = item.checked; option = 'sse-hidden-formula'; break;
- case 'headings': params.headings = item.checked; break;
- case 'gridlines': params.gridlines = item.checked; break;
- case 'freezepanes': params.freezepanes = item.checked; break;
- }
-
- this.hideElements(params);
- option && Common.localStorage.setBool(option, item.checked);
-
- Common.NotificationCenter.trigger('edit:complete', this.toolbar);
- },
-
onListStyleSelect: function(combo, record) {
this._state.prstyle = undefined;
if (this.api) {
@@ -1513,7 +1462,6 @@ define([
if ( from != 'file' ) {
Common.Utils.asyncCall(function () {
this.onChangeViewMode(null, !this.toolbar.isCompact());
- this.toolbar.mnuitemCompactToolbar.setChecked(this.toolbar.isCompact(), true);
}, this);
}
},
@@ -1711,26 +1659,9 @@ define([
this.checkInsertAutoshape({action:'cancel'});
},
- onApiZoomChange: function(zf, type){
- switch (type) {
- case 1: // FitWidth
- case 2: // FitPage
- case 0:
- default: {
- this.toolbar.mnuZoom.options.value = Math.floor((zf + .005) * 100);
- $('.menu-zoom .zoom', this.toolbar.el).html(Math.floor((zf + .005) * 100) + '%');
- }
- }
- },
+ onApiZoomChange: function(zf, type){},
- onApiSheetChanged: function() {
- if ( this.api && !this.appConfig.isEditDiagram && !this.appConfig.isEditMailMerge ) {
- var params = this.api.asc_getSheetViewSettings();
- this.toolbar.mnuitemHideHeadings.setChecked(!params.asc_getShowRowColHeaders());
- this.toolbar.mnuitemHideGridlines.setChecked(!params.asc_getShowGridLines());
- this.toolbar.mnuitemFreezePanes.setChecked(params.asc_getIsFreezePane());
- }
- },
+ onApiSheetChanged: function() {},
onApiEditorSelectionChanged: function(fontobj) {
if (!this.editMode) return;
@@ -2411,13 +2342,6 @@ define([
},
hideElements: function(opts) {
- if (!_.isUndefined(opts.title)) {
- var headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header');
- headerView && headerView.setVisible(!opts.title);
-
- Common.NotificationCenter.trigger('layout:changed', 'header');
- }
-
if (!_.isUndefined(opts.compact)) {
this.onChangeViewMode(opts.compact);
}
@@ -2981,7 +2905,7 @@ define([
var toolbar = this.toolbar;
toolbar.$el.find('.toolbar').toggleClass('masked', disable);
- this.toolbar.lockToolbar(SSE.enumLock.menuFileOpen, disable, {array: [toolbar.btnShowMode]});
+ this.toolbar.lockToolbar(SSE.enumLock.menuFileOpen, disable);
if(disable) {
mask = $("
").appendTo(toolbar.$el.find('.toolbar'));
Common.util.Shortcuts.suspendEvents('command+l, ctrl+l, command+shift+l, ctrl+shift+l, command+k, ctrl+k, command+alt+h, ctrl+alt+h, command+1, ctrl+1');
diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js
index a88a191c1..ce517338f 100644
--- a/apps/spreadsheeteditor/main/app/controller/Viewport.js
+++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js
@@ -71,6 +71,9 @@ define([
'menu:hide': me.onFileMenu.bind(me, 'hide'),
'menu:show': me.onFileMenu.bind(me, 'show')
},
+ 'Statusbar': {
+ 'sheet:changed': me.onApiSheetChanged.bind(me)
+ },
'Toolbar': {
'render:before' : function (toolbar) {
var config = SSE.getController('Main').appOptions;
@@ -83,6 +86,7 @@ define([
},
'view:compact' : function (toolbar, state) {
+ me.header.mnuitemCompactToolbar.setChecked(state, true);
me.viewport.vlayout.getItem('toolbar').height = state ?
Common.Utils.InternalSettings.get('toolbar-height-compact') : Common.Utils.InternalSettings.get('toolbar-height-normal');
},
@@ -108,10 +112,16 @@ define([
});
Common.NotificationCenter.on('app:face', this.onAppShowed.bind(this));
+ Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
+ Common.NotificationCenter.on('cells:range', this.onCellsRange.bind(this));
},
setApi: function(api) {
this.api = api;
+ this.api.asc_registerCallback('asc_onZoomChanged', this.onApiZoomChange.bind(this));
+ this.api.asc_registerCallback('asc_onSheetsChanged', this.onApiSheetChanged.bind(this));
+ this.api.asc_registerCallback('asc_onUpdateSheetViewSettings', this.onApiSheetChanged.bind(this));
+ this.api.asc_registerCallback('asc_onEditCell', this.onApiEditCell.bind(this));
},
onAppShowed: function (config) {
@@ -149,6 +159,123 @@ define([
}
},
+ onAppReady: function (config) {
+ var me = this;
+ if ( me.header.btnOptions ) {
+ var compactview = !config.isEdit;
+ if ( config.isEdit && !config.isEditDiagram && !config.isEditMailMerge ) {
+ if ( Common.localStorage.itemExists("sse-compact-toolbar") ) {
+ compactview = Common.localStorage.getBool("sse-compact-toolbar");
+ } else
+ if ( config.customization && config.customization.compactToolbar )
+ compactview = true;
+ }
+
+ me.header.mnuitemCompactToolbar = new Common.UI.MenuItem({
+ caption : me.header.textCompactView,
+ checked : compactview,
+ checkable : true,
+ value : 'toolbar'
+ });
+
+ var mnuitemHideFormulaBar = new Common.UI.MenuItem({
+ caption : me.textHideFBar,
+ checked : Common.localStorage.getBool('sse-hidden-formula'),
+ checkable : true,
+ value : 'formula'
+ });
+
+ me.header.mnuitemHideHeadings = new Common.UI.MenuItem({
+ caption : me.textHideHeadings,
+ checkable : true,
+ checked : me.header.mnuitemHideHeadings.isChecked(),
+ value : 'headings'
+ });
+
+ me.header.mnuitemHideGridlines = new Common.UI.MenuItem({
+ caption : me.textHideGridlines,
+ checkable : true,
+ checked : me.header.mnuitemHideGridlines.isChecked(),
+ value : 'gridlines'
+ });
+
+ me.header.mnuitemFreezePanes = new Common.UI.MenuItem({
+ caption : me.textFreezePanes,
+ checkable : true,
+ checked : me.header.mnuitemFreezePanes.isChecked(),
+ value : 'freezepanes'
+ });
+
+ me.header.mnuZoom = new Common.UI.MenuItem({
+ template: _.template([
+ ''
+ ].join('')),
+ stopPropagation: true,
+ value: me.header.mnuZoom.options.value
+ });
+
+ var mnuitemAdvSettings = new Common.UI.MenuItem({
+ caption: me.header.textAdvSettings,
+ value: 'advanced'
+ });
+
+ me.header.btnOptions.setMenu(new Common.UI.Menu({
+ cls: 'pull-right',
+ style: 'min-width: 180px;',
+ items: [
+ me.header.mnuitemCompactToolbar,
+ mnuitemHideFormulaBar,
+ {caption:'--'},
+ me.header.mnuitemHideHeadings,
+ me.header.mnuitemHideGridlines,
+ {caption:'--'},
+ me.header.mnuitemFreezePanes,
+ {caption:'--'},
+ me.header.mnuZoom,
+ {caption:'--'},
+ mnuitemAdvSettings
+ ]
+ })
+ );
+
+ var _on_btn_zoom = function (btn) {
+ if ( btn == 'up' ) {
+ var _f = Math.floor(this.api.asc_getZoom() * 10)/10;
+ _f += .1;
+ if (_f > 0 && !(_f > 2.))
+ this.api.asc_setZoom(_f);
+ } else {
+ _f = Math.ceil(this.api.asc_getZoom() * 10)/10;
+ _f -= .1;
+ if (!(_f < .5))
+ this.api.asc_setZoom(_f);
+ }
+
+ Common.NotificationCenter.trigger('edit:complete', me.header);
+ };
+
+ (new Common.UI.Button({
+ el : $('#hdr-menu-zoom-out', me.header.mnuZoom.$el),
+ cls : 'btn-toolbar'
+ })).on('click', _on_btn_zoom.bind(me, 'down'));
+
+ (new Common.UI.Button({
+ el : $('#hdr-menu-zoom-in', me.header.mnuZoom.$el),
+ cls : 'btn-toolbar'
+ })).on('click', _on_btn_zoom.bind(me, 'up'));
+
+ me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
+ }
+ },
+
// When our application is ready, lets get started
onLaunch: function() {
// Create and render main view
@@ -176,6 +303,10 @@ define([
this.boxFormula = $('#cell-editing-box');
this.boxSdk.css('border-left', 'none');
this.boxFormula.css('border-left', 'none');
+
+ this.header.mnuitemHideHeadings = this.header.fakeMenuItem();
+ this.header.mnuitemHideGridlines = this.header.fakeMenuItem();
+ this.header.mnuitemFreezePanes = this.header.fakeMenuItem();
},
onLayoutChanged: function(area) {
@@ -228,6 +359,58 @@ define([
me.header.lockHeaderBtns( 'undo', _need_disable );
me.header.lockHeaderBtns( 'redo', _need_disable );
- }
- });
+ me.header.lockHeaderBtns( 'opts', _need_disable );
+ },
+
+ onApiZoomChange: function(zf, type){
+ switch (type) {
+ case 1: // FitWidth
+ case 2: // FitPage
+ case 0:
+ default: {
+ this.header.mnuZoom.options.value = Math.floor((zf + .005) * 100);
+ $('.menu-zoom .zoom', this.header.mnuZoom.$el).html(Math.floor((zf + .005) * 100) + '%');
+ }
+ }
+ },
+
+ onApiSheetChanged: function() {
+ var me = this;
+ var appConfig = me.viewport.mode;
+ if ( !!appConfig && !appConfig.isEditDiagram && !appConfig.isEditMailMerge ) {
+ var params = me.api.asc_getSheetViewSettings();
+ me.header.mnuitemHideHeadings.setChecked(!params.asc_getShowRowColHeaders());
+ me.header.mnuitemHideGridlines.setChecked(!params.asc_getShowGridLines());
+ me.header.mnuitemFreezePanes.setChecked(params.asc_getIsFreezePane());
+ }
+ },
+
+ onApiEditCell: function(state) {
+ if ( state == Asc.c_oAscCellEditorState.editStart )
+ this.header.lockHeaderBtns('opts', true); else
+ if ( state == Asc.c_oAscCellEditorState.editEnd )
+ this.header.lockHeaderBtns('opts', false);
+ },
+
+ onCellsRange: function(status) {
+ this.onApiEditCell(status != Asc.c_oAscSelectionDialogType.None ? Asc.c_oAscCellEditorState.editStart : Asc.c_oAscCellEditorState.editEnd);
+ },
+
+ onOptionsItemClick: function (menu, item, e) {
+ var me = this;
+
+ switch ( item.value ) {
+ case 'toolbar': me.header.fireEvent('toolbar:setcompact', [menu, item.isChecked()]); break;
+ case 'formula': me.header.fireEvent('formulabar:hide', [item.isChecked()]); break;
+ case 'headings': me.api.asc_setDisplayHeadings(!item.isChecked()); break;
+ case 'gridlines': me.api.asc_setDisplayGridlines(!item.isChecked()); break;
+ case 'freezepanes': me.api.asc_freezePane(); break;
+ case 'advanced': me.header.fireEvent('file:settings', me.header); break;
+ }
+ },
+
+ textHideFBar: 'Hide Formula Bar',
+ textHideHeadings: 'Hide Headings',
+ textHideGridlines: 'Hide Gridlines',
+ textFreezePanes: 'Freeze Panes'
});
diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template
index 6fc9e087c..5bb2ae135 100644
--- a/apps/spreadsheeteditor/main/app/template/Toolbar.template
+++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template
@@ -131,16 +131,7 @@
-
-
-
+
diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js
index ed56ec308..23f6cd580 100644
--- a/apps/spreadsheeteditor/main/app/view/Toolbar.js
+++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js
@@ -1048,41 +1048,6 @@ define([
})
});
- me.mnuZoomIn = dummyCmp();
- me.mnuZoomOut = dummyCmp();
-
- var clone = function(source) {
- var obj = {};
- for (var prop in source)
- obj[prop] = (typeof(source[prop])=='object') ? clone(source[prop]) : source[prop];
- return obj;
- };
-
- this.mnuitemHideHeadings = {
- conf: {checked:false},
- setChecked: function(val) { this.conf.checked = val;},
- isChecked: function () { return this.conf.checked; }
- };
- this.mnuitemHideGridlines = clone(this.mnuitemHideHeadings);
- this.mnuitemFreezePanes = clone(this.mnuitemHideHeadings);
- this.mnuZoom = {
- options: {value: 100}
- };
-
- me.btnShowMode = new Common.UI.Button({
- id : 'id-toolbar-btn-showmode',
- cls : 'btn-toolbar',
- iconCls : 'btn-showmode no-mask',
- lock : [_set.menuFileOpen, _set.editCell],
- menu : true
- });
-
- me.btnSettings = new Common.UI.Button({
- id : 'id-toolbar-btn-settings',
- cls : 'btn-toolbar',
- iconCls : 'btn-settings no-mask'
- });
-
// Is unique for the short view
me.btnHorizontalAlign = new Common.UI.Button({
@@ -1235,7 +1200,7 @@ define([
me.btnTableTemplate, me.btnPercentStyle, me.btnCurrencyStyle, me.btnDecDecimal, me.btnAddCell, me.btnDeleteCell,
me.cmbNumberFormat, me.btnBorders, me.btnInsertImage, me.btnInsertHyperlink,
me.btnInsertChart, me.btnColorSchemas,
- me.btnAutofilter, me.btnCopy, me.btnPaste, me.btnSettings, me.listStyles, me.btnPrint, me.btnShowMode,
+ me.btnAutofilter, me.btnCopy, me.btnPaste, me.listStyles, me.btnPrint,
me.btnSave, me.btnClearStyle, me.btnCopyStyle
];
@@ -1244,8 +1209,8 @@ define([
me.btnInsertImage, me.btnInsertText, me.btnInsertTextArt, me.btnInsertShape, me.btnInsertEquation, me.btnIncFontSize,
me.btnDecFontSize, me.btnBold, me.btnItalic, me.btnUnderline, me.btnStrikeout, me.btnSubscript, me.btnTextColor, me.btnBackColor,
me.btnInsertHyperlink, me.btnBorders, me.btnTextOrient, me.btnPercentStyle, me.btnCurrencyStyle, me.btnColorSchemas,
- me.btnSettings, me.btnInsertFormula, me.btnNamedRange, me.btnDecDecimal, me.btnIncDecimal, me.cmbNumberFormat, me.btnWrap,
- me.btnInsertChart, me.btnMerge, me.btnAddCell, me.btnDeleteCell, me.btnShowMode, me.btnPrint,
+ me.btnInsertFormula, me.btnNamedRange, me.btnDecDecimal, me.btnIncDecimal, me.cmbNumberFormat, me.btnWrap,
+ me.btnInsertChart, me.btnMerge, me.btnAddCell, me.btnDeleteCell, me.btnPrint,
me.btnAutofilter, me.btnSortUp, me.btnSortDown, me.btnTableTemplate, me.btnSetAutofilter, me.btnClearAutofilter,
me.btnSave, me.btnClearStyle, me.btnCopyStyle, me.btnCopy, me.btnPaste];
@@ -1294,9 +1259,9 @@ define([
}
});
+ me.setTab('home');
if ( me.isCompactView )
- me.setFolded(true); else
- me.setTab('home');
+ me.setFolded(true);
return this;
},
@@ -1379,8 +1344,6 @@ define([
_injectComponent('#slot-btn-cell-ins', this.btnAddCell);
_injectComponent('#slot-btn-cell-del', this.btnDeleteCell);
_injectComponent('#slot-btn-colorschemas', this.btnColorSchemas);
- _injectComponent('#slot-btn-hidebars', this.btnShowMode);
- _injectComponent('#slot-btn-settings', this.btnSettings);
_injectComponent('#slot-btn-search', this.btnSearch);
_injectComponent('#slot-btn-inschart', this.btnInsertChart);
_injectComponent('#slot-field-styles', this.listStyles);
@@ -1450,77 +1413,11 @@ define([
_updateHint(this.btnAddCell, this.tipInsertOpt);
_updateHint(this.btnDeleteCell, this.tipDeleteOpt);
_updateHint(this.btnColorSchemas, this.tipColorSchemas);
- _updateHint(this.btnShowMode, this.tipViewSettings);
- _updateHint(this.btnSettings, this.tipAdvSettings);
_updateHint(this.btnHorizontalAlign, this.tipHAligh);
_updateHint(this.btnVerticalAlign, this.tipVAligh);
_updateHint(this.btnAutofilter, this.tipAutofilter);
// set menus
- if ( this.btnShowMode && this.btnShowMode.rendered ) {
- this.btnShowMode.setMenu(new Common.UI.Menu({
- items: [
- this.mnuitemCompactToolbar = new Common.UI.MenuItem({
- caption : this.textCompactToolbar,
- checkable : true,
- checked : this.isCompactView,
- value : 'compact'
- }),
- this.mnuitemHideFormulaBar = new Common.UI.MenuItem({
- caption : this.textHideFBar,
- checkable : true,
- checked : Common.localStorage.getBool('sse-hidden-formula'),
- value : 'formula'
- }),
- {caption: '--'},
- this.mnuitemHideHeadings = new Common.UI.MenuItem({
- caption : this.textHideHeadings,
- checkable : true,
- checked : this.mnuitemHideHeadings.isChecked(),
- value : 'headings'
- }),
- this.mnuitemHideGridlines = new Common.UI.MenuItem({
- caption : this.textHideGridlines,
- checkable : true,
- checked : this.mnuitemHideGridlines.isChecked(),
- value : 'gridlines'
- }),
- {caption: '--'},
- this.mnuitemFreezePanes = new Common.UI.MenuItem({
- caption : this.textFreezePanes,
- checkable : true,
- checked : this.mnuitemFreezePanes.isChecked(),
- value : 'freezepanes'
- }),
- {caption: '--'},
- this.mnuZoom = new Common.UI.MenuItem({
- template: _.template([
- ''
- ].join('')),
- stopPropagation: true,
- value: this.mnuZoom.options.value
- })
- ]
- }));
-
- this.mnuZoomOut = new Common.UI.Button({
- el : $('#id-menu-zoom-out'),
- cls : 'btn-toolbar'
- });
- this.mnuZoomIn = new Common.UI.Button({
- el : $('#id-menu-zoom-in'),
- cls : 'btn-toolbar'
- });
- }
-
if (this.btnBorders && this.btnBorders.rendered) {
this.btnBorders.setMenu( new Common.UI.Menu({
items: [
@@ -1991,8 +1888,6 @@ define([
tipDigStylePercent: 'Percent Style',
// tipDigStyleCurrency:'Currency Style',
tipDigStyleAccounting: 'Accounting Style',
- tipViewSettings: 'View Settings',
- tipAdvSettings: 'Advanced Settings',
tipTextOrientation: 'Orientation',
tipInsertOpt: 'Insert Cells',
tipDeleteOpt: 'Delete Cells',
@@ -2035,12 +1930,6 @@ define([
textDelLeft: 'Shift Cells Left',
textDelUp: 'Shift Cells Up',
textZoom: 'Zoom',
- textCompactToolbar: 'Hide Toolbar',
- textHideTBar: 'Hide Title Bar',
- textHideFBar: 'Hide Formula Bar',
- textHideHeadings: 'Hide Headings',
- textHideGridlines: 'Hide Gridlines',
- textFreezePanes: 'Freeze Panes',
txtScheme1: 'Office',
txtScheme2: 'Grayscale',
txtScheme3: 'Apex',
diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json
index 5835da0a8..dfdd89c35 100644
--- a/apps/spreadsheeteditor/main/locale/en.json
+++ b/apps/spreadsheeteditor/main/locale/en.json
@@ -86,6 +86,12 @@
"Common.Views.Header.tipViewUsers": "View users and manage document access rights",
"Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename",
+ "Common.Views.Header.textAdvSettings": "Advanced settings",
+ "Common.Views.Header.textCompactView": "Hide Toolbar",
+ "Common.Views.Header.textHideStatusBar": "Hide Status Bar",
+ "Common.Views.Header.textZoom": "Zoom",
+ "Common.Views.Header.tipViewSettings": "View settings",
+ "Common.Views.Header.textHideLines": "Hide Rulers",
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
@@ -835,6 +841,10 @@
"SSE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
"SSE.Controllers.Toolbar.warnLongOperation": "The operation you are about to perform might take rather much time to complete.
Are you sure you want to continue?",
"SSE.Controllers.Toolbar.warnMergeLostData": "Only the data from the upper-left cell will remain in the merged cell.
Are you sure you want to continue?",
+ "SSE.Controllers.Viewport.textHideFBar": "Hide Formula Bar",
+ "SSE.Controllers.Viewport.textHideGridlines": "Hide Gridlines",
+ "SSE.Controllers.Viewport.textHideHeadings": "Hide Headings",
+ "SSE.Controllers.Viewport.textFreezePanes": "Freeze Panes",
"SSE.Views.AutoFilterDialog.btnCustomFilter": "Custom Filter",
"SSE.Views.AutoFilterDialog.cancelButtonText": "Cancel",
"SSE.Views.AutoFilterDialog.okButtonText": "OK",
@@ -1790,7 +1800,7 @@
"SSE.Views.Toolbar.textClockwise": "Angle Clockwise",
"SSE.Views.Toolbar.textColumn": "Column",
"SSE.Views.Toolbar.textColumnSpark": "Column",
- "SSE.Views.Toolbar.textCompactToolbar": "Hide Toolbar",
+ "del_SSE.Views.Toolbar.textCompactToolbar": "Hide Toolbar",
"SSE.Views.Toolbar.textCounterCw": "Angle Counterclockwise",
"SSE.Views.Toolbar.textDelLeft": "Shift Cells Left",
"SSE.Views.Toolbar.textDelUp": "Shift Cells Up",
@@ -1798,11 +1808,11 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Diagonal Up Border",
"SSE.Views.Toolbar.textEntireCol": "Entire Column",
"SSE.Views.Toolbar.textEntireRow": "Entire Row",
- "SSE.Views.Toolbar.textFreezePanes": "Freeze Panes",
- "SSE.Views.Toolbar.textHideFBar": "Hide Formula Bar",
- "SSE.Views.Toolbar.textHideGridlines": "Hide Gridlines",
- "SSE.Views.Toolbar.textHideHeadings": "Hide Headings",
- "SSE.Views.Toolbar.textHideTBar": "Hide Title Bar",
+ "del_SSE.Views.Toolbar.textFreezePanes": "Freeze Panes",
+ "del_SSE.Views.Toolbar.textHideFBar": "Hide Formula Bar",
+ "del_SSE.Views.Toolbar.textHideGridlines": "Hide Gridlines",
+ "del_SSE.Views.Toolbar.textHideHeadings": "Hide Headings",
+ "del_SSE.Views.Toolbar.textHideTBar": "Hide Title Bar",
"SSE.Views.Toolbar.textHorizontal": "Horizontal Text",
"SSE.Views.Toolbar.textInsDown": "Shift Cells Down",
"SSE.Views.Toolbar.textInsideBorders": "Inside Borders",
@@ -1839,7 +1849,7 @@
"SSE.Views.Toolbar.textUnderline": "Underline",
"SSE.Views.Toolbar.textWinLossSpark": "Win/Loss",
"SSE.Views.Toolbar.textZoom": "Zoom",
- "SSE.Views.Toolbar.tipAdvSettings": "Advanced settings",
+ "del_SSE.Views.Toolbar.tipAdvSettings": "Advanced settings",
"SSE.Views.Toolbar.tipAlignBottom": "Align bottom",
"SSE.Views.Toolbar.tipAlignCenter": "Align center",
"SSE.Views.Toolbar.tipAlignJust": "Justified",
@@ -1890,7 +1900,7 @@
"SSE.Views.Toolbar.tipTextOrientation": "Orientation",
"SSE.Views.Toolbar.tipUndo": "Undo",
"SSE.Views.Toolbar.tipVAligh": "Vertical Alignment",
- "SSE.Views.Toolbar.tipViewSettings": "View settings",
+ "del_SSE.Views.Toolbar.tipViewSettings": "View settings",
"SSE.Views.Toolbar.tipWrap": "Wrap text",
"SSE.Views.Toolbar.txtAccounting": "Accounting",
"SSE.Views.Toolbar.txtAdditional": "Additional",