[ALL] added menu for 'options' button

This commit is contained in:
Maxim Kadushkin 2018-03-21 14:28:28 +03:00
parent a2afa4b7fe
commit dbf06b62fe
22 changed files with 600 additions and 629 deletions

View file

@ -405,6 +405,8 @@ define([
menu: true menu: true
}); });
me.mnuZoom = {options: {value: 100}};
Common.NotificationCenter.on('app:ready', function(mode) { Common.NotificationCenter.on('app:ready', function(mode) {
Common.Utils.asyncCall(onAppReady, me, 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', textBack: 'Go to Documents',
txtRename: 'Rename', txtRename: 'Rename',
textSaveBegin: 'Saving...', textSaveBegin: 'Saving...',
@ -706,7 +716,13 @@ define([
tipGoEdit: 'Edit current file', tipGoEdit: 'Edit current file',
tipSave: 'Save', tipSave: 'Save',
tipUndo: 'Undo', 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 || {})) }(), Common.Views.Header || {}))
}); });

View file

@ -62,6 +62,7 @@ define([
}, },
'Common.Views.Header': { 'Common.Views.Header': {
'click:users': _.bind(this.clickStatusbarUsers, this), 'click:users': _.bind(this.clickStatusbarUsers, this),
'file:settings': _.bind(this.clickToolbarSettings,this),
'history:show': function () { 'history:show': function () {
if ( !this.leftMenu.panelHistory.isVisible() ) if ( !this.leftMenu.panelHistory.isVisible() )
this.clickMenuFileItem('header', 'history'); this.clickMenuFileItem('header', 'history');

View file

@ -55,6 +55,7 @@ define([
], ],
initialize: function() { initialize: function() {
var me = this;
this.addListeners({ this.addListeners({
'Statusbar': { 'Statusbar': {
'langchanged': this.onLangMenu, 'langchanged': this.onLangMenu,
@ -62,6 +63,15 @@ define([
this.api.zoom(value); this.api.zoom(value);
Common.NotificationCenter.trigger('edit:complete', this.statusbar); Common.NotificationCenter.trigger('edit:complete', this.statusbar);
}.bind(this) }.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);
}
} }
}); });
}, },

View file

@ -114,6 +114,7 @@ define([
'menu:show': this.onFileMenu.bind(this, 'show') 'menu:show': this.onFileMenu.bind(this, 'show')
}, },
'Common.Views.Header': { 'Common.Views.Header': {
'toolbar:setcompact': this.onChangeCompactView.bind(this),
'print': function (opts) { 'print': function (opts) {
var _main = this.getApplication().getController('Main'); var _main = this.getApplication().getController('Main');
_main.onPrint(); _main.onPrint();
@ -296,7 +297,6 @@ define([
toolbar.btnPageMargins.menu.on('item:click', _.bind(this.onPageMarginsSelect, this)); toolbar.btnPageMargins.menu.on('item:click', _.bind(this.onPageMarginsSelect, this));
toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this)); toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this));
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, 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.mnuPageSize.on('item:click', _.bind(this.onPageSizeClick, this));
toolbar.mnuColorSchema.on('item:click', _.bind(this.onColorSchemaClick, this)); toolbar.mnuColorSchema.on('item:click', _.bind(this.onColorSchemaClick, this));
toolbar.btnMailRecepients.on('click', _.bind(this.onSelectRecepientsClick, 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('click', _.bind(this.onListStyleSelect, this));
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this)); toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, 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)); toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this));
$('#id-save-style-plus, #id-save-style-link', toolbar.$el).on('click', this.onMenuSaveStyle.bind(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; var me = this;
setTimeout(function () { setTimeout(function () {
me.onChangeCompactView(null, !me.toolbar.isCompact()); me.onChangeCompactView(null, !me.toolbar.isCompact());
me.toolbar.mnuitemCompactToolbar.setChecked(me.toolbar.isCompact(), true);
}, 0); }, 0);
} }
}, },
@ -845,12 +837,7 @@ define([
this.toolbar.mnuInsertPageNum.setDisabled(false); this.toolbar.mnuInsertPageNum.setDisabled(false);
}, },
onApiZoomChange: function(percent, type) { 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 + '%');
},
onApiStartHighlight: function(pressed) { onApiStartHighlight: function(pressed) {
this.toolbar.btnHighlightColor.toggle(pressed, true); this.toolbar.btnHighlightColor.toggle(pressed, true);
@ -1415,11 +1402,6 @@ define([
this.modeAlwaysSetStyle = state; this.modeAlwaysSetStyle = state;
}, },
onAdvSettingsClick: function(btn, e) {
this.toolbar.fireEvent('file:settings', this);
btn.cmpEl.blur();
},
onPageSizeClick: function(menu, item, state) { onPageSizeClick: function(menu, item, state) {
if (this.api && state) { if (this.api && state) {
this._state.pgsize = [0, 0]; this._state.pgsize = [0, 0];
@ -1993,61 +1975,6 @@ define([
// Common.NotificationCenter.trigger('edit:complete', this.toolbar); // 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() { _clearBullets: function() {
this.toolbar.btnMarkers.toggle(false, true); this.toolbar.btnMarkers.toggle(false, true);
this.toolbar.btnNumbers.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); disable = disable || (reviewmode ? toolbar_mask.length>0 : group_mask.length>0);
toolbar.$el.find('.toolbar').toggleClass('masked', disable); toolbar.$el.find('.toolbar').toggleClass('masked', disable);
toolbar.btnHide.setDisabled(disable);
if ( toolbar.synchTooltip ) if ( toolbar.synchTooltip )
toolbar.synchTooltip.hide(); toolbar.synchTooltip.hide();

View file

@ -79,6 +79,7 @@ define([
toolbar.setExtra('left', me.header.getPanel('left', config)); toolbar.setExtra('left', me.header.getPanel('left', config));
}, },
'view:compact' : function (toolbar, state) { 'view:compact' : function (toolbar, state) {
me.header.mnuitemCompactToolbar.setChecked(state, true);
me.viewport.vlayout.getItem('toolbar').height = state ? me.viewport.vlayout.getItem('toolbar').height = state ?
Common.Utils.InternalSettings.get('toolbar-height-compact') : Common.Utils.InternalSettings.get('toolbar-height-normal'); Common.Utils.InternalSettings.get('toolbar-height-compact') : Common.Utils.InternalSettings.get('toolbar-height-normal');
}, },
@ -105,6 +106,7 @@ define([
setApi: function(api) { setApi: function(api) {
this.api = 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 = $('#editor_sdk');
this.boxSdk.css('border-left', 'none'); 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:face', this.onAppShowed.bind(this));
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
}, },
onAppShowed: function (config) { 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([
'<div id="hdr-menu-zoom" class="menu-zoom" style="height: 25px;" ',
'<% if(!_.isUndefined(options.stopPropagation)) { %>',
'data-stopPropagation="true"',
'<% } %>', '>',
'<label class="title">' + me.header.textZoom + '</label>',
'<button id="hdr-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><i class="icon btn-zoomup">&nbsp;</i></button>',
'<label class="zoom"><%= options.value %>%</label>',
'<button id="hdr-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><i class="icon btn-zoomdown">&nbsp;</i></button>',
'</div>'
].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) { onLayoutChanged: function(area) {
switch (area) { switch (area) {
default: default:
@ -217,6 +328,42 @@ define([
me.header.lockHeaderBtns( 'undo', _need_disable ); me.header.lockHeaderBtns( 'undo', _need_disable );
me.header.lockHeaderBtns( 'redo', _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'
}); });

View file

@ -92,16 +92,7 @@
<span class="btn-slot" id="slot-btn-mailrecepients"></span> <span class="btn-slot" id="slot-btn-mailrecepients"></span>
</div> </div>
</div> </div>
<div class="group" id="slot-field-styles"> <div class="group" id="slot-field-styles"></div>
</div>
<div class="group no-mask">
<div class="elset">
<span class="btn-slot split" id="slot-btn-hidebars"></span>
</div>
<div class="elset">
<span class="btn-slot" id="slot-btn-settings"></span>
</div>
</div>
</section> </section>
<section class="panel" data-tab="ins"> <section class="panel" data-tab="ins">
<div class="group"> <div class="group">

View file

@ -944,33 +944,6 @@ define([
iconCls: 'btn-mailrecepients' 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({ me.btnImgAlign = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-img-align', iconCls: 'btn-img-align',
@ -1198,9 +1171,9 @@ define([
} }
}); });
if ( me.isCompactView )
me.setFolded(true); else
me.setTab('home'); me.setTab('home');
if ( me.isCompactView )
me.setFolded(true);
var top = Common.localStorage.getItem("de-pgmargins-top"), var top = Common.localStorage.getItem("de-pgmargins-top"),
left = Common.localStorage.getItem("de-pgmargins-left"), left = Common.localStorage.getItem("de-pgmargins-left"),
@ -1291,8 +1264,6 @@ define([
_injectComponent('#slot-btn-clearstyle', this.btnClearStyle); _injectComponent('#slot-btn-clearstyle', this.btnClearStyle);
_injectComponent('#slot-btn-copystyle', this.btnCopyStyle); _injectComponent('#slot-btn-copystyle', this.btnCopyStyle);
_injectComponent('#slot-btn-colorschemas', this.btnColorSchemas); _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-btn-paracolor', this.btnParagraphColor);
_injectComponent('#slot-field-styles', this.listStyles); _injectComponent('#slot-field-styles', this.listStyles);
_injectComponent('#slot-btn-halign', this.btnHorizontalAlign); _injectComponent('#slot-btn-halign', this.btnHorizontalAlign);
@ -1539,67 +1510,14 @@ define([
this.btnCopyStyle.updateHint(this.tipCopyStyle + Common.Utils.String.platformKey('Ctrl+Shift+C')); this.btnCopyStyle.updateHint(this.tipCopyStyle + Common.Utils.String.platformKey('Ctrl+Shift+C'));
this.btnColorSchemas.updateHint(this.tipColorSchemas); this.btnColorSchemas.updateHint(this.tipColorSchemas);
this.btnMailRecepients.updateHint(this.tipMailRecepients); this.btnMailRecepients.updateHint(this.tipMailRecepients);
this.btnHide.updateHint(this.tipViewSettings);
this.btnAdvSettings.updateHint(this.tipAdvSettings);
// set menus // set menus
var me = this; 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([
'<div id="id-toolbar-menu-zoom" class="menu-zoom" style="height: 25px;" ',
'<% if(!_.isUndefined(options.stopPropagation)) { %>',
'data-stopPropagation="true"',
'<% } %>', '>',
'<label class="title">' + this.textZoom + '</label>',
'<button id="id-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><i class="icon btn-zoomup">&nbsp;</i></button>',
'<label class="zoom"><%= options.value %>%</label>',
'<button id="id-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><i class="icon btn-zoomdown">&nbsp;</i></button>',
'</div>'
].join('')),
stopPropagation: true,
value: this.mnuZoom.options.value
})
]
})
);
// if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header === false) // if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header === false)
// this.mnuitemHideTitleBar.hide(); // this.mnuitemHideTitleBar.hide();
if (this.mode.canBrandingExt && this.mode.customization && this.mode.customization.statusBar===false)
this.mnuitemHideStatusBar.hide();
this.btnMarkers.setMenu( this.btnMarkers.setMenu(
new Common.UI.Menu({ new Common.UI.Menu({
style: 'min-width: 139px', style: 'min-width: 139px',
@ -1657,15 +1575,6 @@ define([
this.paragraphControls.push(this.mnuPageNumCurrentPos); this.paragraphControls.push(this.mnuPageNumCurrentPos);
this.paragraphControls.push(this.mnuInsertPageCount); 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 // set dataviews
var _conf = this.mnuMarkersPicker.conf; var _conf = this.mnuMarkersPicker.conf;
@ -2305,15 +2214,6 @@ define([
tipInsertText: 'Insert Text', tipInsertText: 'Insert Text',
tipInsertTextArt: 'Insert Text Art', tipInsertTextArt: 'Insert Text Art',
tipHAligh: 'Horizontal Align', 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', mniEditDropCap: 'Drop Cap Settings',
textNone: 'None', textNone: 'None',
textInText: 'In Text', textInText: 'In Text',

View file

@ -153,6 +153,12 @@
"Common.Views.Header.tipViewUsers": "View users and manage document access rights", "Common.Views.Header.tipViewUsers": "View users and manage document access rights",
"Common.Views.Header.txtAccessRights": "Change access rights", "Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename", "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.textCloseHistory": "Close History",
"Common.Views.History.textHide": "Collapse", "Common.Views.History.textHide": "Collapse",
"Common.Views.History.textHideAll": "Hide detailed changes", "Common.Views.History.textHideAll": "Hide detailed changes",
@ -779,6 +785,8 @@
"DE.Controllers.Toolbar.txtSymbol_vdots": "Vertical ellipsis", "DE.Controllers.Toolbar.txtSymbol_vdots": "Vertical ellipsis",
"DE.Controllers.Toolbar.txtSymbol_xsi": "Xi", "DE.Controllers.Toolbar.txtSymbol_xsi": "Xi",
"DE.Controllers.Toolbar.txtSymbol_zeta": "Zeta", "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.textAdvanced": "Show advanced settings",
"DE.Views.ChartSettings.textArea": "Area", "DE.Views.ChartSettings.textArea": "Area",
"DE.Views.ChartSettings.textBar": "Bar", "DE.Views.ChartSettings.textBar": "Bar",
@ -1744,14 +1752,14 @@
"DE.Views.Toolbar.textColumnsRight": "Right", "DE.Views.Toolbar.textColumnsRight": "Right",
"DE.Views.Toolbar.textColumnsThree": "Three", "DE.Views.Toolbar.textColumnsThree": "Three",
"DE.Views.Toolbar.textColumnsTwo": "Two", "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.textContPage": "Continuous Page",
"DE.Views.Toolbar.textEvenPage": "Even Page", "DE.Views.Toolbar.textEvenPage": "Even Page",
"DE.Views.Toolbar.textFitPage": "Fit to Page", "del_DE.Views.Toolbar.textFitPage": "Fit to Page",
"DE.Views.Toolbar.textFitWidth": "Fit to Width", "del_DE.Views.Toolbar.textFitWidth": "Fit to Width",
"DE.Views.Toolbar.textHideLines": "Hide Rulers", "del_DE.Views.Toolbar.textHideLines": "Hide Rulers",
"DE.Views.Toolbar.textHideStatusBar": "Hide Status Bar", "del_DE.Views.Toolbar.textHideStatusBar": "Hide Status Bar",
"DE.Views.Toolbar.textHideTitleBar": "Hide Title Bar", "del_DE.Views.Toolbar.textHideTitleBar": "Hide Title Bar",
"DE.Views.Toolbar.textInMargin": "In Margin", "DE.Views.Toolbar.textInMargin": "In Margin",
"DE.Views.Toolbar.textInsColumnBreak": "Insert Column Break", "DE.Views.Toolbar.textInsColumnBreak": "Insert Column Break",
"DE.Views.Toolbar.textInsertPageCount": "Insert number of pages", "DE.Views.Toolbar.textInsertPageCount": "Insert number of pages",
@ -1805,8 +1813,8 @@
"DE.Views.Toolbar.textToCurrent": "To current position", "DE.Views.Toolbar.textToCurrent": "To current position",
"DE.Views.Toolbar.textTop": "Top: ", "DE.Views.Toolbar.textTop": "Top: ",
"DE.Views.Toolbar.textUnderline": "Underline", "DE.Views.Toolbar.textUnderline": "Underline",
"DE.Views.Toolbar.textZoom": "Zoom", "del_DE.Views.Toolbar.textZoom": "Zoom",
"DE.Views.Toolbar.tipAdvSettings": "Advanced settings", "del_DE.Views.Toolbar.tipAdvSettings": "Advanced settings",
"DE.Views.Toolbar.tipAlignCenter": "Align center", "DE.Views.Toolbar.tipAlignCenter": "Align center",
"DE.Views.Toolbar.tipAlignJust": "Justified", "DE.Views.Toolbar.tipAlignJust": "Justified",
"DE.Views.Toolbar.tipAlignLeft": "Align left", "DE.Views.Toolbar.tipAlignLeft": "Align left",
@ -1862,7 +1870,7 @@
"DE.Views.Toolbar.tipShowHiddenChars": "Nonprinting characters", "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.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.tipUndo": "Undo",
"DE.Views.Toolbar.tipViewSettings": "View settings", "del_DE.Views.Toolbar.tipViewSettings": "View settings",
"DE.Views.Toolbar.txtScheme1": "Office", "DE.Views.Toolbar.txtScheme1": "Office",
"DE.Views.Toolbar.txtScheme10": "Median", "DE.Views.Toolbar.txtScheme10": "Median",
"DE.Views.Toolbar.txtScheme11": "Metro", "DE.Views.Toolbar.txtScheme11": "Metro",

View file

@ -61,6 +61,7 @@ define([
'hide': _.bind(this.onHideChat, this) 'hide': _.bind(this.onHideChat, this)
}, },
'Common.Views.Header': { 'Common.Views.Header': {
'file:settings': _.bind(this.clickToolbarSettings,this),
'click:users': _.bind(this.clickStatusbarUsers, this) 'click:users': _.bind(this.clickStatusbarUsers, this)
}, },
'Common.Views.Plugins': { 'Common.Views.Plugins': {

View file

@ -56,12 +56,22 @@ define([
], ],
initialize: function() { initialize: function() {
var me = this;
this.addListeners({ this.addListeners({
'FileMenu': { 'FileMenu': {
'settings:apply': _.bind(this.applySettings, this) 'settings:apply': _.bind(this.applySettings, this)
}, },
'Statusbar': { 'Statusbar': {
'langchanged': this.onLangMenu '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 = { this._state = {

View file

@ -129,6 +129,7 @@ define([
'menu:show': this.onFileMenu.bind(this, 'show') 'menu:show': this.onFileMenu.bind(this, 'show')
}, },
'Common.Views.Header': { 'Common.Views.Header': {
'toolbar:setcompact': this.onChangeCompactView.bind(this),
'print': function (opts) { 'print': function (opts) {
var _main = this.getApplication().getController('Main'); var _main = this.getApplication().getController('Main');
_main.onPrint(); _main.onPrint();
@ -293,18 +294,10 @@ define([
toolbar.btnInsertTable.menu.on('item:click', _.bind(this.onInsertTableClick, this)); toolbar.btnInsertTable.menu.on('item:click', _.bind(this.onInsertTableClick, this));
toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this)); toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this));
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, 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.btnColorSchemas.menu.on('item:click', _.bind(this.onColorSchemaClick, this));
toolbar.btnSlideSize.menu.on('item:click', _.bind(this.onSlideSize, this)); toolbar.btnSlideSize.menu.on('item:click', _.bind(this.onSlideSize, this));
toolbar.mnuInsertChartPicker.on('item:click', _.bind(this.onSelectChart, this)); toolbar.mnuInsertChartPicker.on('item:click', _.bind(this.onSelectChart, this));
toolbar.listTheme.on('click', _.bind(this.onListThemeSelect, 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)); toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this));
}, },
@ -369,7 +362,6 @@ define([
var me = this; var me = this;
Common.Utils.asyncCall(function () { Common.Utils.asyncCall(function () {
me.onChangeCompactView(null, !me.toolbar.isCompact()); me.onChangeCompactView(null, !me.toolbar.isCompact());
me.toolbar.mnuitemCompactToolbar.setChecked(me.toolbar.isCompact(), true);
}); });
} }
}, },
@ -775,18 +767,7 @@ define([
this.editMode = false; this.editMode = false;
}, },
onApiZoomChange: function(percent, type) { 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;
},
onApiInitEditorStyles: function(themes) { onApiInitEditorStyles: function(themes) {
if (themes) { if (themes) {
@ -1441,11 +1422,6 @@ define([
this.modeAlwaysSetStyle = state; this.modeAlwaysSetStyle = state;
}, },
onAdvSettingsClick: function(btn, e) {
this.toolbar.fireEvent('file:settings', this);
btn.cmpEl.blur();
},
onColorSchemaClick: function(menu, item) { onColorSchemaClick: function(menu, item) {
if (this.api) { if (this.api) {
this.api.ChangeColorScheme(item.value); this.api.ChangeColorScheme(item.value);
@ -1559,69 +1535,6 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.toolbar); 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() { _clearBullets: function() {
this.toolbar.btnMarkers.toggle(false, true); this.toolbar.btnMarkers.toggle(false, true);
this.toolbar.btnNumbers.toggle(false, true); this.toolbar.btnNumbers.toggle(false, true);

View file

@ -112,6 +112,7 @@ define([
setApi: function(api) { setApi: function(api) {
this.api = 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()); Common.localStorage.setItem('pe-mainmenu-width',leftPanel.width());
}, this); }, 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:face', this.onAppShowed.bind(this));
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
}, },
onAppShowed: function (config) { 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([
'<div id="hdr-menu-zoom" class="menu-zoom" style="height: 25px;" ',
'<% if(!_.isUndefined(options.stopPropagation)) { %>',
'data-stopPropagation="true"',
'<% } %>', '>',
'<label class="title">' + me.header.textZoom + '</label>',
'<button id="hdr-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><i class="icon btn-zoomin">&nbsp;</i></button>',
'<label class="zoom"><%= options.value %>%</label>',
'<button id="hdr-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><i class="icon btn-zoomout">&nbsp;</i></button>',
'</div>'
].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) { onLayoutChanged: function(area) {
switch (area) { switch (area) {
@ -256,6 +365,42 @@ define([
me.header.lockHeaderBtns( 'undo', _need_disable ); me.header.lockHeaderBtns( 'undo', _need_disable );
me.header.lockHeaderBtns( 'redo', _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'
}); });

View file

@ -110,16 +110,7 @@
<span class="btn-slot split" id="slot-btn-slidesize"></span> <span class="btn-slot split" id="slot-btn-slidesize"></span>
</div> </div>
</div> </div>
<div class="group" id="slot-field-styles" style="width: 100%; min-width: 140px;"> <div class="group" id="slot-field-styles" style="width: 100%; min-width: 140px;"></div>
</div>
<div class="group no-mask">
<div class="elset">
<span class="btn-slot split" id="slot-btn-hidebars"></span>
</div>
<div class="elset">
<span class="btn-slot" id="slot-btn-settings"></span>
</div>
</div>
</section> </section>
<section class="panel" data-tab="ins"> <section class="panel" data-tab="ins">
<div class="group"> <div class="group">

View file

@ -576,31 +576,6 @@ define([
}); });
me.slideOnlyControls.push(me.btnColorSchemas); 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({ me.btnShapeAlign = new Common.UI.Button({
id : 'id-toolbar-btn-shape-align', id : 'id-toolbar-btn-shape-align',
cls : 'btn-toolbar', cls : 'btn-toolbar',
@ -875,9 +850,9 @@ define([
} }
}); });
if ( me.isCompactView )
me.setFolded(true); else
me.setTab('home'); me.setTab('home');
if ( me.isCompactView )
me.setFolded(true);
return this; return this;
}, },
@ -943,8 +918,6 @@ define([
_injectComponent('#slot-btn-colorschemas', this.btnColorSchemas); _injectComponent('#slot-btn-colorschemas', this.btnColorSchemas);
_injectComponent('#slot-btn-slidesize', this.btnSlideSize); _injectComponent('#slot-btn-slidesize', this.btnSlideSize);
_injectComponent('#slot-field-styles', this.listTheme); _injectComponent('#slot-field-styles', this.listTheme);
_injectComponent('#slot-btn-hidebars', this.btnHide);
_injectComponent('#slot-btn-settings', this.btnAdvSettings);
function _injectBtns(opts) { function _injectBtns(opts) {
var array = createButtonSet(); var array = createButtonSet();
@ -1105,8 +1078,6 @@ define([
this.btnInsertHyperlink.updateHint(this.tipInsertHyperlink + Common.Utils.String.platformKey('Ctrl+K')); this.btnInsertHyperlink.updateHint(this.tipInsertHyperlink + Common.Utils.String.platformKey('Ctrl+K'));
this.btnInsertTextArt.updateHint(this.tipInsertTextArt); this.btnInsertTextArt.updateHint(this.tipInsertTextArt);
this.btnColorSchemas.updateHint(this.tipColorSchemas); this.btnColorSchemas.updateHint(this.tipColorSchemas);
this.btnHide.updateHint(this.tipViewSettings);
this.btnAdvSettings.updateHint(this.tipAdvSettings);
this.btnShapeAlign.updateHint(this.tipShapeAlign); this.btnShapeAlign.updateHint(this.tipShapeAlign);
this.btnShapeArrange.updateHint(this.tipShapeArrange); this.btnShapeArrange.updateHint(this.tipShapeArrange);
this.btnSlideSize.updateHint(this.tipSlideSize); this.btnSlideSize.updateHint(this.tipSlideSize);
@ -1115,66 +1086,6 @@ define([
var me = this; 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([
'<div id="id-toolbar-menu-zoom" class="menu-zoom" style="height: 25px;" ',
'<% if(!_.isUndefined(options.stopPropagation)) { %>',
'data-stopPropagation="true"',
'<% } %>',
'>',
'<label class="title">' + this.textZoom + '</label>',
'<button id="id-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><i class="icon btn-zoomin"></i></button>',
'<label class="zoom"><%= options.value %>%</label>',
'<button id="id-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><i class="icon btn-zoomout"></i></button>',
'</div>'
].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( this.btnMarkers.setMenu(
new Common.UI.Menu({ new Common.UI.Menu({
style: 'min-width: 139px', style: 'min-width: 139px',
@ -1339,9 +1250,6 @@ define([
me.mnuChangeSlidePicker._needRecalcSlideLayout = true; 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 // // Enable none paragraph components
this.lockToolbar(PE.enumLock.disableOnStart, false, {array: this.slideOnlyControls.concat(this.shapeControls)}); this.lockToolbar(PE.enumLock.disableOnStart, false, {array: this.slideOnlyControls.concat(this.shapeControls)});
@ -1747,15 +1655,6 @@ define([
mniSlideWide: 'Widescreen (16:9)', mniSlideWide: 'Widescreen (16:9)',
mniSlideAdvanced: 'Advanced Settings', mniSlideAdvanced: 'Advanced Settings',
tipSlideSize: 'Select Slide Size', 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', tipInsertChart: 'Insert Chart',
textLine: 'Line', textLine: 'Line',
textColumn: 'Column', textColumn: 'Column',

View file

@ -92,6 +92,12 @@
"Common.Views.Header.tipViewUsers": "View users and manage document access rights", "Common.Views.Header.tipViewUsers": "View users and manage document access rights",
"Common.Views.Header.txtAccessRights": "Change access rights", "Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename", "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.cancelButtonText": "Cancel",
"Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.okButtonText": "OK",
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:", "Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
@ -700,6 +706,8 @@
"PE.Controllers.Toolbar.txtSymbol_vdots": "Vertical ellipsis", "PE.Controllers.Toolbar.txtSymbol_vdots": "Vertical ellipsis",
"PE.Controllers.Toolbar.txtSymbol_xsi": "Xi", "PE.Controllers.Toolbar.txtSymbol_xsi": "Xi",
"PE.Controllers.Toolbar.txtSymbol_zeta": "Zeta", "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.textAdvanced": "Show advanced settings",
"PE.Views.ChartSettings.textArea": "Area", "PE.Views.ChartSettings.textArea": "Area",
"PE.Views.ChartSettings.textBar": "Bar", "PE.Views.ChartSettings.textBar": "Bar",
@ -1405,12 +1413,12 @@
"PE.Views.Toolbar.textCancel": "Cancel", "PE.Views.Toolbar.textCancel": "Cancel",
"PE.Views.Toolbar.textCharts": "Charts", "PE.Views.Toolbar.textCharts": "Charts",
"PE.Views.Toolbar.textColumn": "Column", "PE.Views.Toolbar.textColumn": "Column",
"PE.Views.Toolbar.textCompactView": "Hide Toolbar", "del_PE.Views.Toolbar.textCompactView": "Hide Toolbar",
"PE.Views.Toolbar.textFitPage": "Fit to Slide", "del_PE.Views.Toolbar.textFitPage": "Fit to Slide",
"PE.Views.Toolbar.textFitWidth": "Fit to Width", "del_PE.Views.Toolbar.textFitWidth": "Fit to Width",
"PE.Views.Toolbar.textHideLines": "Hide Rulers", "del_PE.Views.Toolbar.textHideLines": "Hide Rulers",
"PE.Views.Toolbar.textHideStatusBar": "Hide Status Bar", "del_PE.Views.Toolbar.textHideStatusBar": "Hide Status Bar",
"PE.Views.Toolbar.textHideTitleBar": "Hide Title Bar", "del_PE.Views.Toolbar.textHideTitleBar": "Hide Title Bar",
"PE.Views.Toolbar.textItalic": "Italic", "PE.Views.Toolbar.textItalic": "Italic",
"PE.Views.Toolbar.textLine": "Line", "PE.Views.Toolbar.textLine": "Line",
"PE.Views.Toolbar.textNewColor": "Custom Color", "PE.Views.Toolbar.textNewColor": "Custom Color",
@ -1439,9 +1447,9 @@
"PE.Views.Toolbar.textTabProtect": "Protection", "PE.Views.Toolbar.textTabProtect": "Protection",
"PE.Views.Toolbar.textTitleError": "Error", "PE.Views.Toolbar.textTitleError": "Error",
"PE.Views.Toolbar.textUnderline": "Underline", "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.tipAddSlide": "Add slide",
"PE.Views.Toolbar.tipAdvSettings": "Advanced settings", "del_PE.Views.Toolbar.tipAdvSettings": "Advanced settings",
"PE.Views.Toolbar.tipBack": "Back", "PE.Views.Toolbar.tipBack": "Back",
"PE.Views.Toolbar.tipChangeChart": "Change chart type", "PE.Views.Toolbar.tipChangeChart": "Change chart type",
"PE.Views.Toolbar.tipChangeSlide": "Change slide layout", "PE.Views.Toolbar.tipChangeSlide": "Change slide layout",
@ -1454,7 +1462,7 @@
"PE.Views.Toolbar.tipFontName": "Font", "PE.Views.Toolbar.tipFontName": "Font",
"PE.Views.Toolbar.tipFontSize": "Font size", "PE.Views.Toolbar.tipFontSize": "Font size",
"PE.Views.Toolbar.tipHAligh": "Horizontal align", "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.tipIncPrLeft": "Increase indent",
"PE.Views.Toolbar.tipInsertChart": "Insert chart", "PE.Views.Toolbar.tipInsertChart": "Insert chart",
"PE.Views.Toolbar.tipInsertEquation": "Insert equation", "PE.Views.Toolbar.tipInsertEquation": "Insert equation",

View file

@ -67,6 +67,13 @@ define([
'CellEditor': {}, 'CellEditor': {},
'Viewport': { 'Viewport': {
'layout:resizedrag': _.bind(this.onLayoutResize, this) '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)
} }
}); });
}, },

View file

@ -55,6 +55,7 @@ define([
'hide': _.bind(this.onHidePlugins, this) 'hide': _.bind(this.onHidePlugins, this)
}, },
'Common.Views.Header': { 'Common.Views.Header': {
'file:settings': _.bind(this.clickToolbarSettings,this),
'click:users': _.bind(this.clickStatusbarUsers, this) 'click:users': _.bind(this.clickStatusbarUsers, this)
}, },
'LeftMenu': { 'LeftMenu': {

View file

@ -80,6 +80,7 @@ define([
'settings:apply': _.bind(this.applyFormulaSettings, this) 'settings:apply': _.bind(this.applyFormulaSettings, this)
}, },
'Common.Views.Header': { 'Common.Views.Header': {
'toolbar:setcompact': this.onChangeViewMode.bind(this),
'print': function (opts) { 'print': function (opts) {
var _main = this.getApplication().getController('Main'); var _main = this.getApplication().getController('Main');
_main.onPrint(); _main.onPrint();
@ -305,7 +306,6 @@ define([
toolbar.btnDecDecimal.on('click', _.bind(this.onDecrement, this)); toolbar.btnDecDecimal.on('click', _.bind(this.onDecrement, this));
toolbar.btnIncDecimal.on('click', _.bind(this.onIncrement, this)); toolbar.btnIncDecimal.on('click', _.bind(this.onIncrement, this));
toolbar.btnInsertFormula.on('click', _.bind(this.onInsertFormulaMenu, 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.btnInsertFormula.menu.on('item:click', _.bind(this.onInsertFormulaMenu, this));
toolbar.btnNamedRange.menu.on('item:click', _.bind(this.onNamedRangeMenu, this)); toolbar.btnNamedRange.menu.on('item:click', _.bind(this.onNamedRangeMenu, this));
toolbar.btnNamedRange.menu.on('show:after', _.bind(this.onNamedRangeMenuOpen, 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('hide:after', _.bind(this.onHideMenus, this));
toolbar.cmbFontSize.on('combo:blur', _.bind(this.onComboBlur, this)); toolbar.cmbFontSize.on('combo:blur', _.bind(this.onComboBlur, this));
toolbar.cmbFontSize.on('combo:focusin', _.bind(this.onComboOpen, this, false)); 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.listStyles.on('click', _.bind(this.onListStyleSelect, this));
toolbar.cmbNumberFormat.on('selected', _.bind(this.onNumberFormatSelect, this)); toolbar.cmbNumberFormat.on('selected', _.bind(this.onNumberFormatSelect, this));
toolbar.cmbNumberFormat.on('show:before', _.bind(this.onNumberFormatOpenBefore, this, true)); toolbar.cmbNumberFormat.on('show:before', _.bind(this.onNumberFormatOpenBefore, this, true));
if (toolbar.cmbNumberFormat.cmpEl) if (toolbar.cmbNumberFormat.cmpEl)
toolbar.cmbNumberFormat.cmpEl.on('click', '#id-toolbar-mnu-item-more-formats a', _.bind(this.onNumberFormatSelect, this)); 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)); 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-fontcolor').on('click', _.bind(this.onNewTextColor, this));
$('#id-toolbar-menu-new-paracolor').on('click', _.bind(this.onNewBackColor, this)); $('#id-toolbar-menu-new-paracolor').on('click', _.bind(this.onNewBackColor, this));
$('#id-toolbar-menu-new-bordercolor').on('click', _.bind(this.onNewBorderColor, 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) { onListStyleSelect: function(combo, record) {
this._state.prstyle = undefined; this._state.prstyle = undefined;
if (this.api) { if (this.api) {
@ -1513,7 +1462,6 @@ define([
if ( from != 'file' ) { if ( from != 'file' ) {
Common.Utils.asyncCall(function () { Common.Utils.asyncCall(function () {
this.onChangeViewMode(null, !this.toolbar.isCompact()); this.onChangeViewMode(null, !this.toolbar.isCompact());
this.toolbar.mnuitemCompactToolbar.setChecked(this.toolbar.isCompact(), true);
}, this); }, this);
} }
}, },
@ -1711,26 +1659,9 @@ define([
this.checkInsertAutoshape({action:'cancel'}); this.checkInsertAutoshape({action:'cancel'});
}, },
onApiZoomChange: function(zf, type){ 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) + '%');
}
}
},
onApiSheetChanged: function() { 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());
}
},
onApiEditorSelectionChanged: function(fontobj) { onApiEditorSelectionChanged: function(fontobj) {
if (!this.editMode) return; if (!this.editMode) return;
@ -2411,13 +2342,6 @@ define([
}, },
hideElements: function(opts) { 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)) { if (!_.isUndefined(opts.compact)) {
this.onChangeViewMode(opts.compact); this.onChangeViewMode(opts.compact);
} }
@ -2981,7 +2905,7 @@ define([
var toolbar = this.toolbar; var toolbar = this.toolbar;
toolbar.$el.find('.toolbar').toggleClass('masked', disable); 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) { if(disable) {
mask = $("<div class='toolbar-mask'>").appendTo(toolbar.$el.find('.toolbar')); mask = $("<div class='toolbar-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'); 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');

View file

@ -71,6 +71,9 @@ define([
'menu:hide': me.onFileMenu.bind(me, 'hide'), 'menu:hide': me.onFileMenu.bind(me, 'hide'),
'menu:show': me.onFileMenu.bind(me, 'show') 'menu:show': me.onFileMenu.bind(me, 'show')
}, },
'Statusbar': {
'sheet:changed': me.onApiSheetChanged.bind(me)
},
'Toolbar': { 'Toolbar': {
'render:before' : function (toolbar) { 'render:before' : function (toolbar) {
var config = SSE.getController('Main').appOptions; var config = SSE.getController('Main').appOptions;
@ -83,6 +86,7 @@ define([
}, },
'view:compact' : function (toolbar, state) { 'view:compact' : function (toolbar, state) {
me.header.mnuitemCompactToolbar.setChecked(state, true);
me.viewport.vlayout.getItem('toolbar').height = state ? me.viewport.vlayout.getItem('toolbar').height = state ?
Common.Utils.InternalSettings.get('toolbar-height-compact') : Common.Utils.InternalSettings.get('toolbar-height-normal'); 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: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) { setApi: function(api) {
this.api = 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) { 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([
'<div id="hdr-menu-zoom" class="menu-zoom" style="height: 25px;" ',
'<% if(!_.isUndefined(options.stopPropagation)) { %>',
'data-stopPropagation="true"',
'<% } %>', '>',
'<label class="title">' + me.header.textZoom + '</label>',
'<button id="hdr-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><i class="icon btn-zoomin">&nbsp;</i></button>',
'<label class="zoom"><%= options.value %>%</label>',
'<button id="hdr-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><i class="icon btn-zoomout">&nbsp;</i></button>',
'</div>'
].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 // When our application is ready, lets get started
onLaunch: function() { onLaunch: function() {
// Create and render main view // Create and render main view
@ -176,6 +303,10 @@ define([
this.boxFormula = $('#cell-editing-box'); this.boxFormula = $('#cell-editing-box');
this.boxSdk.css('border-left', 'none'); this.boxSdk.css('border-left', 'none');
this.boxFormula.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) { onLayoutChanged: function(area) {
@ -228,6 +359,58 @@ define([
me.header.lockHeaderBtns( 'undo', _need_disable ); me.header.lockHeaderBtns( 'undo', _need_disable );
me.header.lockHeaderBtns( 'redo', _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'
}); });

View file

@ -131,16 +131,7 @@
<span class="btn-slot split" id="slot-btn-table-tpl"></span> <span class="btn-slot split" id="slot-btn-table-tpl"></span>
</div> </div>
</div> </div>
<div class="group" id="slot-field-styles" style="width: 100%; min-width: 160px;"> <div class="group" id="slot-field-styles" style="width: 100%; min-width: 160px;"></div>
</div>
<div class="group no-mask">
<div class="elset">
<span class="btn-slot split" id="slot-btn-hidebars"></span>
</div>
<div class="elset">
<span class="btn-slot" id="slot-btn-settings"></span>
</div>
</div>
</section> </section>
<section class="panel" data-tab="ins"> <section class="panel" data-tab="ins">
<div class="group"> <div class="group">

View file

@ -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 // Is unique for the short view
me.btnHorizontalAlign = new Common.UI.Button({ me.btnHorizontalAlign = new Common.UI.Button({
@ -1235,7 +1200,7 @@ define([
me.btnTableTemplate, me.btnPercentStyle, me.btnCurrencyStyle, me.btnDecDecimal, me.btnAddCell, me.btnDeleteCell, me.btnTableTemplate, me.btnPercentStyle, me.btnCurrencyStyle, me.btnDecDecimal, me.btnAddCell, me.btnDeleteCell,
me.cmbNumberFormat, me.btnBorders, me.btnInsertImage, me.btnInsertHyperlink, me.cmbNumberFormat, me.btnBorders, me.btnInsertImage, me.btnInsertHyperlink,
me.btnInsertChart, me.btnColorSchemas, 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 me.btnSave, me.btnClearStyle, me.btnCopyStyle
]; ];
@ -1244,8 +1209,8 @@ define([
me.btnInsertImage, me.btnInsertText, me.btnInsertTextArt, me.btnInsertShape, me.btnInsertEquation, me.btnIncFontSize, 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.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.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.btnInsertFormula, me.btnNamedRange, me.btnDecDecimal, me.btnIncDecimal, me.cmbNumberFormat, me.btnWrap,
me.btnInsertChart, me.btnMerge, me.btnAddCell, me.btnDeleteCell, me.btnShowMode, me.btnPrint, me.btnInsertChart, me.btnMerge, me.btnAddCell, me.btnDeleteCell, me.btnPrint,
me.btnAutofilter, me.btnSortUp, me.btnSortDown, me.btnTableTemplate, me.btnSetAutofilter, me.btnClearAutofilter, me.btnAutofilter, me.btnSortUp, me.btnSortDown, me.btnTableTemplate, me.btnSetAutofilter, me.btnClearAutofilter,
me.btnSave, me.btnClearStyle, me.btnCopyStyle, me.btnCopy, me.btnPaste]; me.btnSave, me.btnClearStyle, me.btnCopyStyle, me.btnCopy, me.btnPaste];
@ -1294,9 +1259,9 @@ define([
} }
}); });
if ( me.isCompactView )
me.setFolded(true); else
me.setTab('home'); me.setTab('home');
if ( me.isCompactView )
me.setFolded(true);
return this; return this;
}, },
@ -1379,8 +1344,6 @@ define([
_injectComponent('#slot-btn-cell-ins', this.btnAddCell); _injectComponent('#slot-btn-cell-ins', this.btnAddCell);
_injectComponent('#slot-btn-cell-del', this.btnDeleteCell); _injectComponent('#slot-btn-cell-del', this.btnDeleteCell);
_injectComponent('#slot-btn-colorschemas', this.btnColorSchemas); _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-search', this.btnSearch);
_injectComponent('#slot-btn-inschart', this.btnInsertChart); _injectComponent('#slot-btn-inschart', this.btnInsertChart);
_injectComponent('#slot-field-styles', this.listStyles); _injectComponent('#slot-field-styles', this.listStyles);
@ -1450,77 +1413,11 @@ define([
_updateHint(this.btnAddCell, this.tipInsertOpt); _updateHint(this.btnAddCell, this.tipInsertOpt);
_updateHint(this.btnDeleteCell, this.tipDeleteOpt); _updateHint(this.btnDeleteCell, this.tipDeleteOpt);
_updateHint(this.btnColorSchemas, this.tipColorSchemas); _updateHint(this.btnColorSchemas, this.tipColorSchemas);
_updateHint(this.btnShowMode, this.tipViewSettings);
_updateHint(this.btnSettings, this.tipAdvSettings);
_updateHint(this.btnHorizontalAlign, this.tipHAligh); _updateHint(this.btnHorizontalAlign, this.tipHAligh);
_updateHint(this.btnVerticalAlign, this.tipVAligh); _updateHint(this.btnVerticalAlign, this.tipVAligh);
_updateHint(this.btnAutofilter, this.tipAutofilter); _updateHint(this.btnAutofilter, this.tipAutofilter);
// set menus // 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([
'<div id="id-toolbar-menu-zoom" class="menu-zoom" style="height: 25px;" ',
'<% if(!_.isUndefined(options.stopPropagation)) { %>',
'data-stopPropagation="true"',
'<% } %>', '>',
'<label class="title">' + this.textZoom + '</label>',
'<button id="id-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><span class="icon btn-zoomin">&nbsp;</span></button>',
'<label class="zoom"><%= options.value %>%</label>',
'<button id="id-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><span class="icon btn-zoomout">&nbsp;</span></button>',
'</div>'
].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) { if (this.btnBorders && this.btnBorders.rendered) {
this.btnBorders.setMenu( new Common.UI.Menu({ this.btnBorders.setMenu( new Common.UI.Menu({
items: [ items: [
@ -1991,8 +1888,6 @@ define([
tipDigStylePercent: 'Percent Style', tipDigStylePercent: 'Percent Style',
// tipDigStyleCurrency:'Currency Style', // tipDigStyleCurrency:'Currency Style',
tipDigStyleAccounting: 'Accounting Style', tipDigStyleAccounting: 'Accounting Style',
tipViewSettings: 'View Settings',
tipAdvSettings: 'Advanced Settings',
tipTextOrientation: 'Orientation', tipTextOrientation: 'Orientation',
tipInsertOpt: 'Insert Cells', tipInsertOpt: 'Insert Cells',
tipDeleteOpt: 'Delete Cells', tipDeleteOpt: 'Delete Cells',
@ -2035,12 +1930,6 @@ define([
textDelLeft: 'Shift Cells Left', textDelLeft: 'Shift Cells Left',
textDelUp: 'Shift Cells Up', textDelUp: 'Shift Cells Up',
textZoom: 'Zoom', textZoom: 'Zoom',
textCompactToolbar: 'Hide Toolbar',
textHideTBar: 'Hide Title Bar',
textHideFBar: 'Hide Formula Bar',
textHideHeadings: 'Hide Headings',
textHideGridlines: 'Hide Gridlines',
textFreezePanes: 'Freeze Panes',
txtScheme1: 'Office', txtScheme1: 'Office',
txtScheme2: 'Grayscale', txtScheme2: 'Grayscale',
txtScheme3: 'Apex', txtScheme3: 'Apex',

View file

@ -86,6 +86,12 @@
"Common.Views.Header.tipViewUsers": "View users and manage document access rights", "Common.Views.Header.tipViewUsers": "View users and manage document access rights",
"Common.Views.Header.txtAccessRights": "Change access rights", "Common.Views.Header.txtAccessRights": "Change access rights",
"Common.Views.Header.txtRename": "Rename", "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.cancelButtonText": "Cancel",
"Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.okButtonText": "OK",
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:", "Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
@ -835,6 +841,10 @@
"SSE.Controllers.Toolbar.txtSymbol_zeta": "Zeta", "SSE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
"SSE.Controllers.Toolbar.warnLongOperation": "The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?", "SSE.Controllers.Toolbar.warnLongOperation": "The operation you are about to perform might take rather much time to complete.<br>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. <br>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. <br>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.btnCustomFilter": "Custom Filter",
"SSE.Views.AutoFilterDialog.cancelButtonText": "Cancel", "SSE.Views.AutoFilterDialog.cancelButtonText": "Cancel",
"SSE.Views.AutoFilterDialog.okButtonText": "OK", "SSE.Views.AutoFilterDialog.okButtonText": "OK",
@ -1790,7 +1800,7 @@
"SSE.Views.Toolbar.textClockwise": "Angle Clockwise", "SSE.Views.Toolbar.textClockwise": "Angle Clockwise",
"SSE.Views.Toolbar.textColumn": "Column", "SSE.Views.Toolbar.textColumn": "Column",
"SSE.Views.Toolbar.textColumnSpark": "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.textCounterCw": "Angle Counterclockwise",
"SSE.Views.Toolbar.textDelLeft": "Shift Cells Left", "SSE.Views.Toolbar.textDelLeft": "Shift Cells Left",
"SSE.Views.Toolbar.textDelUp": "Shift Cells Up", "SSE.Views.Toolbar.textDelUp": "Shift Cells Up",
@ -1798,11 +1808,11 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Diagonal Up Border", "SSE.Views.Toolbar.textDiagUpBorder": "Diagonal Up Border",
"SSE.Views.Toolbar.textEntireCol": "Entire Column", "SSE.Views.Toolbar.textEntireCol": "Entire Column",
"SSE.Views.Toolbar.textEntireRow": "Entire Row", "SSE.Views.Toolbar.textEntireRow": "Entire Row",
"SSE.Views.Toolbar.textFreezePanes": "Freeze Panes", "del_SSE.Views.Toolbar.textFreezePanes": "Freeze Panes",
"SSE.Views.Toolbar.textHideFBar": "Hide Formula Bar", "del_SSE.Views.Toolbar.textHideFBar": "Hide Formula Bar",
"SSE.Views.Toolbar.textHideGridlines": "Hide Gridlines", "del_SSE.Views.Toolbar.textHideGridlines": "Hide Gridlines",
"SSE.Views.Toolbar.textHideHeadings": "Hide Headings", "del_SSE.Views.Toolbar.textHideHeadings": "Hide Headings",
"SSE.Views.Toolbar.textHideTBar": "Hide Title Bar", "del_SSE.Views.Toolbar.textHideTBar": "Hide Title Bar",
"SSE.Views.Toolbar.textHorizontal": "Horizontal Text", "SSE.Views.Toolbar.textHorizontal": "Horizontal Text",
"SSE.Views.Toolbar.textInsDown": "Shift Cells Down", "SSE.Views.Toolbar.textInsDown": "Shift Cells Down",
"SSE.Views.Toolbar.textInsideBorders": "Inside Borders", "SSE.Views.Toolbar.textInsideBorders": "Inside Borders",
@ -1839,7 +1849,7 @@
"SSE.Views.Toolbar.textUnderline": "Underline", "SSE.Views.Toolbar.textUnderline": "Underline",
"SSE.Views.Toolbar.textWinLossSpark": "Win/Loss", "SSE.Views.Toolbar.textWinLossSpark": "Win/Loss",
"SSE.Views.Toolbar.textZoom": "Zoom", "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.tipAlignBottom": "Align bottom",
"SSE.Views.Toolbar.tipAlignCenter": "Align center", "SSE.Views.Toolbar.tipAlignCenter": "Align center",
"SSE.Views.Toolbar.tipAlignJust": "Justified", "SSE.Views.Toolbar.tipAlignJust": "Justified",
@ -1890,7 +1900,7 @@
"SSE.Views.Toolbar.tipTextOrientation": "Orientation", "SSE.Views.Toolbar.tipTextOrientation": "Orientation",
"SSE.Views.Toolbar.tipUndo": "Undo", "SSE.Views.Toolbar.tipUndo": "Undo",
"SSE.Views.Toolbar.tipVAligh": "Vertical Alignment", "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.tipWrap": "Wrap text",
"SSE.Views.Toolbar.txtAccounting": "Accounting", "SSE.Views.Toolbar.txtAccounting": "Accounting",
"SSE.Views.Toolbar.txtAdditional": "Additional", "SSE.Views.Toolbar.txtAdditional": "Additional",