Merge branch 'develop' of https://github.com/ONLYOFFICE/web-apps into develop

This commit is contained in:
Maxim Kadushkin 2021-12-14 22:57:56 +03:00
commit 7dd910f13a
63 changed files with 1699 additions and 291 deletions

View file

@ -161,6 +161,9 @@
collaboration: false / true // collaboration tab
protect: false / true, // protect tab
plugins: false / true // plugins tab
view: {
navigation: false/true // navigation button in de
} / false / true, // view tab
save: false/true // save button on toolbar in
},
header: {

View file

@ -545,6 +545,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
this.disabled = disabled;
if (!this.rendered)

View file

@ -81,6 +81,7 @@ define([
this.style = this.options.style;
this.hint = this.options.hint;
this.store = this.options.store || new Common.UI.DataViewStore();
this.groups = this.options.groups;
this.itemWidth = this.options.itemWidth;
this.itemHeight = this.options.itemHeight;
this.menuMaxHeight = this.options.menuMaxHeight;
@ -92,18 +93,19 @@ define([
this.needFillComboView = false;
this.minWidth = this.options.minWidth;
this.delayRenderTips = this.options.delayRenderTips || false;
this.itemTemplate = this.options.itemTemplate || _.template([
'<div class="style" id="<%= id %>">',
'<img src="<%= imageUrl %>" width="' + this.itemWidth + '" height="' + this.itemHeight + '"/>',
'<% if (typeof title !== "undefined") {%>',
'<span class="title"><%= title %></span>',
'<% } %>',
'</div>'
].join(''));
this.fieldPicker = new Common.UI.DataView({
cls: 'field-picker',
allowScrollbar: false,
itemTemplate : _.template([
'<div class="style" id="<%= id %>">',
'<img src="<%= imageUrl %>" width="' + this.itemWidth + '" height="' + this.itemHeight + '"/>',
'<% if (typeof title !== "undefined") {%>',
'<span class="title"><%= title %></span>',
'<% } %>',
'</div>'
].join('')),
itemTemplate : this.itemTemplate,
delayRenderTips: this.delayRenderTips
});
@ -128,15 +130,9 @@ define([
restoreHeight: this.menuMaxHeight,
style: 'max-height: '+this.menuMaxHeight+'px;',
enableKeyEvents: this.options.enableKeyEvents,
groups: this.groups,
store: this.store,
itemTemplate : _.template([
'<div class="style" id="<%= id %>">',
'<img src="<%= imageUrl %>" width="' + this.itemWidth + '" height="' + this.itemHeight + '"/>',
'<% if (typeof title !== "undefined") {%>',
'<span class="title"><%= title %></span>',
'<% } %>',
'</div>'
].join('')),
itemTemplate : this.itemTemplate,
delayRenderTips: this.delayRenderTips
});
@ -384,6 +380,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
this.disabled = disabled;
if (!this.rendered)

View file

@ -439,6 +439,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
this.disabled = disabled;
if (!this.rendered)

View file

@ -763,6 +763,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
this.disabled = disabled;
$(this.el).find('.inner').addBack().filter('.inner').toggleClass('disabled', disabled);
},
@ -1237,6 +1238,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
this.disabled = disabled;
$(this.el).find('.inner').addBack().filter('.inner').toggleClass('disabled', disabled);
},

View file

@ -299,6 +299,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
this.disabled = disabled;
$(this.el).toggleClass('disabled', disabled);
disabled
@ -525,6 +526,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
this.disabled = disabled;
$(this.el).toggleClass('disabled', disabled);
disabled

View file

@ -206,6 +206,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
var el = this.$el || $(this.el);
if (disabled !== this.disabled) {
el.find('button').toggleClass('disabled', disabled);

View file

@ -133,6 +133,7 @@ define([
if (!this.rendered)
return;
disabled = !!disabled;
if (disabled !== this.disabled) {
this.$label.toggleClass('disabled', disabled);
this.$radio.toggleClass('disabled', disabled);

View file

@ -272,6 +272,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
if (disabled !== this.disabled)
this.cmpEl.toggleClass('disabled', disabled);
this.disabled = disabled;
@ -588,6 +589,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
if (disabled !== this.disabled)
this.cmpEl.toggleClass('disabled', disabled);
this.disabled = disabled;

View file

@ -76,11 +76,12 @@ define([
this.target = this.options.target;
this.text = !_.isEmpty(this.options.text) ? this.options.text : this.textSynchronize;
this.textLink = !_.isEmpty(this.options.textLink) ? this.options.textLink : this.textDontShow;
this.placement = this.options.placement;
this.placement = this.options.placement; // if placement='target' and position is undefined show in top,left position of target, also use for arrow position
this.showLink = this.options.showLink;
this.showButton = this.options.showButton;
this.closable = this.options.closable;
this.textButton = this.options.textButton || '';
this.position = this.options.position; // show in the position relative to target
},
render: function() {
@ -90,6 +91,8 @@ define([
this.cmpEl.find('.close').on('click', _.bind(function() { this.trigger('closeclick');}, this));
this.cmpEl.find('.show-link label').on('click', _.bind(function() { this.trigger('dontshowclick');}, this));
this.cmpEl.find('.btn-div').on('click', _.bind(function() { this.trigger('buttonclick');}, this));
this.closable && this.cmpEl.addClass('closable');
}
this.applyPlacement();
@ -115,12 +118,28 @@ define([
},
applyPlacement: function () {
var showxy = this.target.offset();
if (this.placement=='target') {
var target = this.target && this.target.length>0 ? this.target : $(document.body);
var showxy = target.offset();
if (this.placement=='target' && !this.position) {
this.cmpEl.css({top : showxy.top + 5 + 'px', left: showxy.left + 5 + 'px'});
return;
}
if (this.position && typeof this.position == 'object') {
var top = this.position.top, left = this.position.left, bottom = this.position.bottom, right = this.position.right;
if (bottom!==undefined || top!==undefined)
left = showxy.left + (target.width() - this.cmpEl.width())/2;
else
top = showxy.top + (target.height() - this.cmpEl.height())/2;
top = (top!==undefined) ? (top + 'px') : 'auto';
bottom = (bottom!==undefined) ? (bottom + 'px') : 'auto';
right = (right!==undefined) ? (right + 'px') : 'auto';
left = (left!==undefined) ? (left + 'px') : 'auto';
this.cmpEl.css({top : top, left: left, right: right, bottom: bottom});
return;
}
var placement = this.placement.split('-');
if (placement.length>0) {
var top, left, bottom, right;
@ -128,29 +147,29 @@ define([
if (pos=='top') {
bottom = Common.Utils.innerHeight() - showxy.top;
} else if (pos == 'bottom') {
top = showxy.top + this.target.height();
top = showxy.top + target.height();
} else if (pos == 'left') {
right = Common.Utils.innerWidth() - showxy.left;
} else if (pos == 'right') {
left = showxy.left + this.target.width();
left = showxy.left + target.width();
}
pos = placement[1];
if (pos=='top') {
bottom = Common.Utils.innerHeight() - showxy.top - this.target.height()/2;
bottom = Common.Utils.innerHeight() - showxy.top - target.height()/2;
} else if (pos == 'bottom') {
top = showxy.top + this.target.height()/2;
top = showxy.top + target.height()/2;
var height = this.cmpEl.height();
if (top+height>Common.Utils.innerHeight())
top = Common.Utils.innerHeight() - height - 10;
} else if (pos == 'left') {
right = Common.Utils.innerWidth() - showxy.left - this.target.width()/2;
right = Common.Utils.innerWidth() - showxy.left - target.width()/2;
} else if (pos == 'right') {
left = showxy.left + this.target.width()/2;
left = showxy.left + target.width()/2;
} else {
if (bottom!==undefined || top!==undefined)
left = showxy.left + (this.target.width() - this.cmpEl.width())/2;
left = showxy.left + (target.width() - this.cmpEl.width())/2;
else
top = showxy.top + (this.target.height() - this.cmpEl.height())/2;
top = showxy.top + (target.height() - this.cmpEl.height())/2;
}
top = (top!==undefined) ? (top + 'px') : 'auto';
bottom = (bottom!==undefined) ? (bottom + 'px') : 'auto';

View file

@ -183,6 +183,7 @@ define([
},
setDisabled: function(disabled) {
disabled = !!disabled;
this.disabled = disabled;
$(this.el).toggleClass('disabled', disabled);
disabled

View file

@ -1,14 +1,9 @@
.synch-tip-root {
position: fixed;
z-index: @zindex-navbar + 2;
@tip-width: 300px;
&:not(.simple) {
width: @tip-width;
.tip-text {
width: @tip-width - 40px;
}
max-width: 300px;
}
&.simple {
@ -18,17 +13,15 @@
.tip-arrow {
display: none;
}
.asc-synchronizetip {
padding-right: 30px;
}
}
&.no-arrow {
.tip-arrow {
display: none;
}
}
&.closable {
.asc-synchronizetip {
padding-right: 30px;
}
@ -84,12 +77,6 @@
}
&.colored {
@tip-width: 270px;
width: @tip-width;
.tip-text {
width: @tip-width - 40px;
}
.asc-synchronizetip {
background-color: @background-contrast-popover-ie;
background-color: @background-contrast-popover;
@ -439,7 +426,7 @@
}
.asc-synchronizetip {
padding: 15px 8px 15px 15px;
padding: 10px 15px;
border-radius: 5px;
background-color: @background-notification-popover-ie;
background-color: @background-notification-popover;
@ -528,7 +515,7 @@
top: 0;
width: 16px;
height: 16px;
margin: 8px;
margin: 5px;
cursor: pointer;
opacity: 0.7;

View file

@ -759,3 +759,8 @@
}
}
#slot-field-zoom {
float: left;
min-width: 46px;
}

View file

@ -157,6 +157,7 @@ require([
'RightMenu',
'LeftMenu',
'Main',
'ViewTab',
'Common.Controllers.Fonts',
'Common.Controllers.History'
/** coauthoring begin **/
@ -185,6 +186,7 @@ require([
'documenteditor/main/app/controller/RightMenu',
'documenteditor/main/app/controller/LeftMenu',
'documenteditor/main/app/controller/Main',
'documenteditor/main/app/controller/ViewTab',
'documenteditor/main/app/view/FileMenuPanels',
'documenteditor/main/app/view/ParagraphSettings',
'documenteditor/main/app/view/HeaderFooterSettings',

View file

@ -45,14 +45,16 @@ define([
'common/main/lib/util/Shortcuts',
'common/main/lib/view/SaveAsDlg',
'documenteditor/main/app/view/LeftMenu',
'documenteditor/main/app/view/FileMenu'
'documenteditor/main/app/view/FileMenu',
'documenteditor/main/app/view/ViewTab',
], function () {
'use strict';
DE.Controllers.LeftMenu = Backbone.Controller.extend(_.extend({
views: [
'LeftMenu',
'FileMenu'
'FileMenu',
'ViewTab'
],
initialize: function() {
@ -85,7 +87,6 @@ define([
'menu:show': _.bind(this.menuFilesShowHide, this, 'show'),
'item:click': _.bind(this.clickMenuFileItem, this),
'saveas:format': _.bind(this.clickSaveAsFormat, this),
'savecopy:format': _.bind(this.clickSaveCopyAsFormat, this),
'settings:apply': _.bind(this.applySettings, this),
'create:new': _.bind(this.onCreateNew, this),
'recent:open': _.bind(this.onOpenRecent, this)
@ -106,6 +107,9 @@ define([
},
'Common.Views.ReviewChanges': {
'collaboration:chat': _.bind(this.onShowHideChat, this)
},
'ViewTab': {
'viewtab:navigation': _.bind(this.onShowHideNavigation, this)
}
});
@ -239,11 +243,11 @@ define([
case 'save-desktop': this.api.asc_DownloadAs(); break;
case 'saveas':
if ( isopts ) close_menu = false;
else this.clickSaveAsFormat(undefined);
else this.clickSaveAsFormat();
break;
case 'save-copy':
if ( isopts ) close_menu = false;
else this.clickSaveCopyAsFormat(undefined);
else this.clickSaveAsFormat(undefined, undefined, true);
break;
case 'print': this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86)); break;
case 'exit': Common.NotificationCenter.trigger('goback'); break;
@ -302,57 +306,12 @@ define([
}
},
clickSaveAsFormat: function(menu, format) {
if (menu) {
if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) {
Common.UI.warning({
closable: false,
title: this.notcriticalErrorTitle,
msg: (format == Asc.c_oAscFileType.TXT) ? this.warnDownloadAs : this.warnDownloadAsRTF,
buttons: ['ok', 'cancel'],
callback: _.bind(function(btn){
if (btn == 'ok') {
if (format == Asc.c_oAscFileType.TXT)
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format));
else
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
menu.hide();
}
}, this)
});
} else if (format == Asc.c_oAscFileType.DOCX) {
if (!Common.Utils.InternalSettings.get("de-settings-compatible") && !Common.localStorage.getBool("de-hide-save-compatible") && this.api.asc_isCompatibilityMode()) {
Common.UI.warning({
closable: false,
width: 600,
title: this.notcriticalErrorTitle,
msg: this.txtCompatible,
buttons: ['ok', 'cancel'],
dontshow: true,
callback: _.bind(function(btn, dontshow){
if (dontshow) Common.localStorage.setItem("de-hide-save-compatible", 1);
if (btn == 'ok') {
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
menu.hide();
}
}, this)
});
} else {
var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX);
opts.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible"));
this.api.asc_DownloadAs(opts);
menu.hide();
}
} else {
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
menu.hide();
}
} else
this.api.asc_DownloadOrigin();
},
_saveAsFormat: function(menu, format, ext, textParams) {
var needDownload = !!ext;
clickSaveCopyAsFormat: function(menu, format, ext) {
if (menu) {
var options = new Asc.asc_CDownloadOptions(format, needDownload);
options.asc_setTextParams(textParams);
if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) {
Common.UI.warning({
closable: false,
@ -363,9 +322,9 @@ define([
if (btn == 'ok') {
this.isFromFileDownloadAs = ext;
if (format == Asc.c_oAscFileType.TXT)
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format, true));
Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, options);
else
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
this.api.asc_DownloadAs(options);
menu.hide();
}
}, this)
@ -383,29 +342,56 @@ define([
if (dontshow) Common.localStorage.setItem("de-hide-save-compatible", 1);
if (btn == 'ok') {
this.isFromFileDownloadAs = ext;
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
this.api.asc_DownloadAs(options);
menu.hide();
}
}, this)
});
} else {
this.isFromFileDownloadAs = ext;
var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true);
opts.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible"));
this.api.asc_DownloadAs(opts);
options.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible"));
this.api.asc_DownloadAs(options);
menu.hide();
}
} else {
this.isFromFileDownloadAs = ext;
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
this.api.asc_DownloadAs(options);
menu.hide();
}
} else {
this.isFromFileDownloadAs = true;
this.api.asc_DownloadOrigin(true);
this.isFromFileDownloadAs = needDownload;
this.api.asc_DownloadOrigin(needDownload);
}
},
clickSaveAsFormat: function(menu, format, ext) { // ext isn't undefined for save copy as
var me = this,
fileType = this.getApplication().getController('Main').document.fileType;
if ( /^pdf|xps|oxps$/.test(fileType)) {
if (format===undefined || format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA || format == Asc.c_oAscFileType.XPS)
this._saveAsFormat(undefined, format, ext); // download original
else {
(new Common.Views.OptionsDialog({
width: 300,
title: this.titleConvertOptions,
label: this.textGroup,
items: [
{caption: this.textChar, value: Asc.c_oAscTextAssociation.Char, checked: true},
{caption: this.textLine, value: Asc.c_oAscTextAssociation.Line, checked: false},
{caption: this.textParagraph, value: Asc.c_oAscTextAssociation.Block, checked: false}
],
handler: function (dlg, result) {
if (result=='ok') {
me._saveAsFormat(menu, format, ext, new AscCommon.asc_CTextParams(dlg.getSettings()));
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
})).show();
}
} else
this._saveAsFormat(menu, format, ext);
},
onDownloadUrl: function(url, fileType) {
if (this.isFromFileDownloadAs) {
var me = this,
@ -914,6 +900,16 @@ define([
}
},
onShowHideNavigation: function(state) {
if (state) {
Common.UI.Menu.Manager.hideAll();
this.leftMenu.showMenu('navigation');
} else {
this.leftMenu.btnNavigation.toggle(false, true);
this.leftMenu.onBtnMenuClick(this.leftMenu.btnNavigation);
}
},
isCommentsVisible: function() {
return this.leftMenu && this.leftMenu.panelComments && this.leftMenu.panelComments.isVisible();
},
@ -929,7 +925,12 @@ define([
warnDownloadAs : 'If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?',
warnDownloadAsRTF : 'If you continue saving in this format some of the formatting might be lost.<br>Are you sure you want to continue?',
txtUntitled: 'Untitled',
txtCompatible: 'The document will be saved to the new format. It will allow to use all the editor features, but might affect the document layout.<br>Use the \'Compatibility\' option of the advanced settings if you want to make the files compatible with older MS Word versions.'
txtCompatible: 'The document will be saved to the new format. It will allow to use all the editor features, but might affect the document layout.<br>Use the \'Compatibility\' option of the advanced settings if you want to make the files compatible with older MS Word versions.',
titleConvertOptions: 'Grouping options',
textGroup: 'Group by',
textChar: 'Char',
textLine: 'Line',
textParagraph: 'Paragraph'
}, DE.Controllers.LeftMenu || {}));
});

View file

@ -942,6 +942,8 @@ define([
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
this.disableEditing(false, true);
this.getApplication().getController('Statusbar').hideDisconnectTip();
this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect);
}
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
@ -955,6 +957,7 @@ define([
setLongActionView: function(action) {
var title = '', text = '', force = false;
var statusCallback = null; // call after showing status
switch (action.id) {
case Asc.c_oAscAsyncAction['Open']:
@ -1043,6 +1046,10 @@ define([
case Asc.c_oAscAsyncAction['Disconnect']:
text = this.textDisconnect;
this.disableEditing(true, true);
var me = this;
statusCallback = function() {
me.getApplication().getController('Statusbar').showDisconnectTip();
};
break;
default:
@ -1062,7 +1069,7 @@ define([
if (!this.isShowOpenDialog)
this.loadMask.show(action.id===Asc.c_oAscAsyncAction['Open']);
} else {
this.getApplication().getController('Statusbar').setStatusCaption(text, force);
this.getApplication().getController('Statusbar').setStatusCaption(text, force, 0, statusCallback);
}
},
@ -1454,10 +1461,10 @@ define([
this.appOptions.canChat = false;
}
var type = /^(?:(pdf|djvu|xps|oxps))$/.exec(this.document.fileType);
var type = /^(?:(djvu))$/.exec(this.document.fileType);
this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string');
this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string');
this.appOptions.canUseThumbnails = this.appOptions.canUseViwerNavigation = /^(?:(pdf|djvu|xps))$/.test(this.document.fileType);
this.appOptions.canUseThumbnails = this.appOptions.canUseViwerNavigation = /^(?:(pdf|djvu|xps|oxps))$/.test(this.document.fileType);
this.appOptions.canDownloadForms = this.appOptions.canLicense && this.appOptions.canDownload;
this.appOptions.fileKey = this.document.key;
@ -3070,6 +3077,7 @@ define([
txtStyle_endnote_text: 'Endnote Text',
txtTOCHeading: 'TOC Heading',
textDisconnect: 'Connection is lost',
textReconnect: 'Connection is restored',
errorLang: 'The interface language is not loaded.<br>Please contact your Document Server administrator.',
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.'
}

View file

@ -65,13 +65,10 @@ define([
}.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', me.statusbar);
}
'statusbar:hide': _.bind(me.onChangeCompactView, me)
},
'ViewTab': {
'statusbar:hide': _.bind(me.onChangeCompactView, me)
}
});
},
@ -174,6 +171,18 @@ define([
});
},
onChangeCompactView: function (view, status) {
this.statusbar.setVisible(!status);
Common.localStorage.setBool('de-hidden-status', status);
if (view.$el.closest('.btn-slot').prop('id') === 'slot-btn-options') {
this.statusbar.fireEvent('view:hide', [this, status]);
}
Common.NotificationCenter.trigger('layout:changed', 'status');
Common.NotificationCenter.trigger('edit:complete', this.statusbar);
},
onApiTrackRevisionsChange: function(localFlag, globalFlag, userId) {
var global = (localFlag===null),
state = global ? globalFlag : localFlag;
@ -251,13 +260,14 @@ define([
this.statusbar.reloadLanguages(langs);
},
setStatusCaption: function(text, force, delay) {
setStatusCaption: function(text, force, delay, callback) {
if (this.timerCaption && ( ((new Date()) < this.timerCaption) || text.length==0 ) && !force )
return;
this.timerCaption = undefined;
if (text.length) {
this.statusbar.showStatusMessage(text);
callback && callback();
if (delay>0)
this.timerCaption = (new Date()).getTime() + delay;
} else
@ -306,10 +316,38 @@ define([
return tip;
},
showDisconnectTip: function () {
var me = this;
if (!this.disconnectTip) {
var target = this.statusbar.getStatusLabel();
target = target.is(':visible') ? target.parent() : this.statusbar.isVisible() ? this.statusbar.$el : $(document.body);
this.disconnectTip = new Common.UI.SynchronizeTip({
target : target,
text : this.textDisconnect,
placement: 'top',
position: this.statusbar.isVisible() ? undefined : {bottom: 0},
showLink: false
});
this.disconnectTip.on({
'closeclick': function() {
me.disconnectTip.hide();
me.disconnectTip = null;
}
});
}
this.disconnectTip.show();
},
hideDisconnectTip: function() {
this.disconnectTip && this.disconnectTip.hide();
this.disconnectTip = null;
},
zoomText : 'Zoom {0}%',
textHasChanges : 'New changes have been tracked',
textTrackChanges: 'The document is opened with the Track Changes mode enabled',
tipReview : 'Review',
textSetTrackChanges: 'You are in Track Changes mode'
textSetTrackChanges: 'You are in Track Changes mode',
textDisconnect: '<b>Connection is lost</b><br>Please check connection settings.'
}, DE.Controllers.Statusbar || {}));
});

View file

@ -173,6 +173,9 @@ define([
'go:editor': function() {
Common.Gateway.requestEditRights();
}
},
'ViewTab': {
'toolbar:setcompact': this.onChangeCompactView.bind(this)
}
});
@ -3230,6 +3233,10 @@ define([
var links = me.getApplication().getController('Links');
links.setApi(me.api).setConfig({toolbar: me});
Array.prototype.push.apply(me.toolbar.toolbarControls, links.getView('Links').getButtons());
var viewtab = me.getApplication().getController('ViewTab');
viewtab.setApi(me.api).setConfig({toolbar: me, mode: config});
Array.prototype.push.apply(me.toolbar.toolbarControls, viewtab.getView('ViewTab').getButtons());
}
if ( config.isEdit && config.canFeatureContentControl && config.canFeatureForms || config.isRestrictedEdit && config.canFillForms ) {
if (config.isFormCreator) {

View file

@ -0,0 +1,218 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2020
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* ViewTab.js
*
* Created by Julia Svinareva on 06.12.2021
* Copyright (c) 2021 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'documenteditor/main/app/view/ViewTab'
], function () {
'use strict';
DE.Controllers.ViewTab = Backbone.Controller.extend(_.extend({
models : [],
collections : [
],
views : [
'ViewTab'
],
sdkViewName : '#id_main',
initialize: function () {
},
onLaunch: function () {
this._state = {};
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
Common.NotificationCenter.on('contenttheme:dark', this.onContentThemeChangedToDark.bind(this));
Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this));
},
setApi: function (api) {
if (api) {
this.api = api;
this.api.asc_registerCallback('asc_onZoomChange', _.bind(this.onZoomChange, this));
}
return this;
},
setConfig: function(config) {
this.toolbar = config.toolbar;
this.view = this.createView('ViewTab', {
toolbar: this.toolbar.toolbar,
mode: config.mode,
compactToolbar: this.toolbar.toolbar.isCompactView
});
this.addListeners({
'ViewTab': {
'zoom:value': _.bind(this.onChangeZoomValue, this),
'zoom:topage': _.bind(this.onBtnZoomTo, this, 'topage'),
'zoom:towidth': _.bind(this.onBtnZoomTo, this, 'towidth'),
'rulers:change': _.bind(this.onChangeRulers, this),
'darkmode:change': _.bind(this.onChangeDarkMode, this)
},
'Toolbar': {
'view:compact': _.bind(function (toolbar, state) {
this.view.chToolbar.setValue(!state, true);
}, this)
},
'Statusbar': {
'view:hide': _.bind(function (statusbar, state) {
this.view.chStatusbar.setValue(!state, true);
}, this)
},
'Common.Views.Header': {
'rulers:hide': _.bind(function (isChecked) {
this.view.chRulers.setValue(!isChecked, true);
}, this)
}
});
},
SetDisabled: function(state) {
this.view && this.view.SetDisabled(state);
},
getView: function(name) {
return !name && this.view ?
this.view : Backbone.Controller.prototype.getView.call(this, name);
},
onCoAuthoringDisconnect: function() {
this.SetDisabled(true);
},
onAppReady: function (config) {
var me = this;
if (me.view) {
(new Promise(function (accept, reject) {
accept();
})).then(function(){
me.view.setEvents();
me.getApplication().getController('LeftMenu').leftMenu.btnNavigation.on('toggle', function (btn, state) {
if (state !== me.view.btnNavigation.pressed)
me.view.turnNavigation(state);
});
var menuItems = [],
currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId();
for (var t in Common.UI.Themes.map()) {
menuItems.push({
value: t,
caption: Common.UI.Themes.get(t).text,
checked: t === currentTheme,
checkable: true,
toggleGroup: 'interface-theme'
});
}
if (menuItems.length) {
me.view.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems}));
me.view.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) {
var value = item.value;
Common.UI.Themes.setTheme(value);
me.view.btnDarkDocument.setDisabled(!Common.UI.Themes.isDarkTheme());
}, me));
setTimeout(function () {
me.onContentThemeChangedToDark(Common.UI.Themes.isContentThemeDark());
me.view.btnDarkDocument.setDisabled(!Common.UI.Themes.isDarkTheme());
}, 0);
}
});
}
},
onZoomChange: function (percent, type) {
this.view.btnFitToPage.toggle(type == 2, true);
this.view.btnFitToWidth.toggle(type == 1, true);
this.view.cmbZoom.setValue(percent, percent + '%');
},
onChangeZoomValue: function (value) {
this.api.zoom(value);
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onBtnZoomTo: function(type) {
var btn, func;
if ( type === 'topage' ) {
btn = 'btnFitToPage';
func = 'zoomFitToPage';
} else {
btn = 'btnFitToWidth';
func = 'zoomFitToWidth';
}
if ( !this.view[btn].pressed )
this.api.zoomCustomMode();
else
this.api[func]();
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onChangeRulers: function (btn, checked) {
this.api.asc_SetViewRulers(checked);
Common.localStorage.setBool('de-hidden-rulers', !checked);
Common.Utils.InternalSettings.set("de-hidden-rulers", !checked);
this.view.fireEvent('rulers:hide', [!checked]);
Common.NotificationCenter.trigger('layout:changed', 'rulers');
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onChangeDarkMode: function () {
Common.UI.Themes.toggleContentTheme();
},
onContentThemeChangedToDark: function (isdark) {
this.view && this.view.btnDarkDocument.toggle(isdark, true);
},
onThemeChanged: function () {
if (this.view) {
var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(),
menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme});
this.view.btnInterfaceTheme.menu.clearAll();
menu_item.setChecked(true, true);
this.view.btnDarkDocument.setDisabled(!Common.UI.Themes.isDarkTheme());
}
},
}, DE.Controllers.ViewTab || {}));
});

View file

@ -105,6 +105,14 @@ define([
if ( me.header.btnSave )
me.header.btnSave.setDisabled(state);
}
},
'ViewTab': {
'rulers:hide': function (state) {
me.header.mnuitemHideRulers.setChecked(state, true);
},
'statusbar:hide': function (view, state) {
me.header.mnuitemHideStatusBar.setChecked(state, true);
}
}
});
},
@ -231,7 +239,7 @@ define([
}, this));
}
var mnuitemHideStatusBar = new Common.UI.MenuItem({
me.header.mnuitemHideStatusBar = new Common.UI.MenuItem({
caption: me.header.textHideStatusBar,
checked: Common.localStorage.getBool("de-hidden-status"),
checkable: true,
@ -239,16 +247,16 @@ define([
});
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false )
mnuitemHideStatusBar.hide();
me.header.mnuitemHideStatusBar.hide();
var mnuitemHideRulers = new Common.UI.MenuItem({
me.header.mnuitemHideRulers = new Common.UI.MenuItem({
caption: me.header.textHideLines,
checked: Common.Utils.InternalSettings.get("de-hidden-rulers"),
checkable: true,
value: 'rulers'
});
if (!config.isEdit)
mnuitemHideRulers.hide();
me.header.mnuitemHideRulers.hide();
me.header.menuItemsDarkMode = new Common.UI.MenuItem({
caption: me.txtDarkMode,
@ -292,8 +300,8 @@ define([
style: 'min-width: 180px;',
items: [
me.header.mnuitemCompactToolbar,
mnuitemHideStatusBar,
mnuitemHideRulers,
me.header.mnuitemHideStatusBar,
me.header.mnuitemHideRulers,
{caption:'--'},
me.header.menuItemsDarkMode,
{caption:'--'},
@ -421,6 +429,7 @@ define([
Common.Utils.InternalSettings.set("de-hidden-rulers", item.isChecked());
Common.NotificationCenter.trigger('layout:changed', 'rulers');
Common.NotificationCenter.trigger('edit:complete', me.header);
me.header.fireEvent('rulers:hide', [item.isChecked()]);
break;
case 'zoom:page':
item.isChecked() ? me.api.zoomFitToPage() : me.api.zoomCustomMode();

View file

@ -174,6 +174,49 @@
</div>
</div>
</section>
<section class="panel" data-tab="view">
<div class="group" data-layout-name="toolbar-view-navigation">
<span class="btn-slot text x-huge" id="slot-btn-navigation"></span>
</div>
<div class="separator long" data-layout-name="toolbar-view-navigation"></div>
<div class="group small">
<div class="elset" style="display: flex;">
<span class="btn-slot" id="slot-field-zoom" style="flex-grow: 1;"></span>
</div>
<div class="elset" style="text-align: center;">
<span class="btn-slot text" id="slot-lbl-zoom" style="font-size: 11px;text-align: center;margin-top: 4px;"></span>
</div>
</div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-btn-ftp" style="font-size: 11px;text-align: center;"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-btn-ftw" style="font-size: 11px;text-align: center;"></span>
</div>
</div>
<div class="separator long"></div>
<div class="group">
<span class="btn-slot text x-huge" id="slot-btn-interface-theme"></span>
<span class="btn-slot text x-huge" id="slot-btn-dark-document"></span>
</div>
<div class="separator long"></div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-toolbar"></span>
</div>
</div>
<div class="separator long"></div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-rulers"></span>
</div>
<div class="elset"></div>
</div>
</section>
</section>
</section>
</div>

View file

@ -236,14 +236,14 @@ define([
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big',
delayRenderTips: true
delayRenderTips: true,
itemTemplate: _.template([
'<div class="item-icon-box" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" ' +
'class="combo-wrap-item options__icon options__icon-huge <%= icon %>" ',
'</div>'
].join(''))
});
this.cmbWrapType.menuPicker.itemTemplate = this.cmbWrapType.fieldPicker.itemTemplate = _.template([
'<div class="item-icon-box" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" ' +
'class="combo-wrap-item options__icon options__icon-huge <%= icon %>" ',
'</div>'
].join(''));
this.cmbWrapType.render($('#chart-combo-wrap'));
this.cmbWrapType.openButton.menu.cmpEl.css({
'min-width': 178,

View file

@ -98,6 +98,11 @@ define([
},
render: function() {
if (/^pdf|xps|oxps$/.test(this.fileType)) {
this.formats[0].splice(1, 1); // remove pdf
this.formats[1].splice(1, 1); // remove pdfa
this.formats[3].push({name: 'Original', imgCls: 'pdf', type: ''});
}
if (this.mode && !this.mode.canFeatureForms) {
this.formats[2].splice(1, 2);
this.formats[2] = this.formats[2].concat(this.formats[3]);
@ -126,7 +131,7 @@ define([
onFormatClick: function(e) {
var type = e.currentTarget.attributes['format'];
if (!_.isUndefined(type) && this.menu) {
this.menu.fireEvent('saveas:format', [this.menu, parseInt(type.value)]);
this.menu.fireEvent('saveas:format', [this.menu, type.value ? parseInt(type.value) : undefined]);
}
}
});
@ -181,6 +186,11 @@ define([
},
render: function() {
if (/^pdf|xps|oxps$/.test(this.fileType)) {
this.formats[0].splice(1, 1); // remove pdf
this.formats[1].splice(1, 1); // remove pdfa
this.formats[3].push({name: 'Original', imgCls: 'pdf', type: '', ext: true});
}
if (this.mode && !this.mode.canFeatureForms) {
this.formats[2].splice(1, 2);
this.formats[2] = this.formats[2].concat(this.formats[3]);
@ -210,7 +220,7 @@ define([
var type = e.currentTarget.attributes['format'],
ext = e.currentTarget.attributes['format-ext'];
if (!_.isUndefined(type) && !_.isUndefined(ext) && this.menu) {
this.menu.fireEvent('savecopy:format', [this.menu, parseInt(type.value), ext.value]);
this.menu.fireEvent('saveas:format', [this.menu, type.value ? parseInt(type.value) : undefined, ext.value]);
}
}
});
@ -473,7 +483,7 @@ define([
var itemsTemplate =
_.template([
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "custom") { %> class="border-top" style="margin-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem" <% if (typeof(item.checked) !== "undefined" && item.checked) { %> class="checked" <% } %> ><%= scope.getDisplayValue(item) %></a></li>',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "custom") { %> class="border-top" style="margin-top: 5px;padding-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem" <% if (typeof(item.checked) !== "undefined" && item.checked) { %> class="checked" <% } %> ><%= scope.getDisplayValue(item) %></a></li>',
'<% }); %>'
].join(''));
this.cmbFontRender = new Common.UI.ComboBox({

View file

@ -140,14 +140,14 @@ define([
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '-10, 0',
delayRenderTips: true
delayRenderTips: true,
itemTemplate: _.template([
'<div class="item-icon-box" id="<%= id %>" style="">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" ' +
'class="combo-wrap-item options__icon options__icon-huge <%= icon %>"',
'</div>'
].join(''))
});
this.cmbWrapType.menuPicker.itemTemplate = this.cmbWrapType.fieldPicker.itemTemplate = _.template([
'<div class="item-icon-box" id="<%= id %>" style="">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" ' +
'class="combo-wrap-item options__icon options__icon-huge <%= icon %>"',
'</div>'
].join(''));
this.cmbWrapType.render($('#image-combo-wrap'));
this.cmbWrapType.openButton.menu.cmpEl.css({
'min-width': 178,

View file

@ -378,6 +378,13 @@ define([
this.onBtnMenuClick(this.btnComments);
this.onCoauthOptions();
}
} else if (menu == 'navigation') {
if (this.btnNavigation.isVisible() &&
!this.btnNavigation.isDisabled() && !this.btnNavigation.pressed) {
this.btnNavigation.toggle(true);
this.onBtnMenuClick(this.btnNavigation);
this.onCoauthOptions();
}
}
/** coauthoring end **/
}

View file

@ -1267,23 +1267,25 @@ define([
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this.fillControls.push(this.cmbFillSrc);
var itemWidth = 28,
itemHeight = 28;
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
itemWidth: itemWidth,
itemHeight: itemHeight,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
dataHintOffset: 'big',
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'width="' + itemWidth + '" height="' + itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
].join(''))
});
this.cmbPattern.render($('#shape-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,
@ -1639,14 +1641,14 @@ define([
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big',
delayRenderTips: true
delayRenderTips: true,
itemTemplate: _.template([
'<div class="item-icon-box" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" ' +
'class="combo-wrap-item options__icon options__icon-huge <%= icon %>"',
'</div>'
].join(''))
});
this.cmbWrapType.menuPicker.itemTemplate = this.cmbWrapType.fieldPicker.itemTemplate = _.template([
'<div class="item-icon-box" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" ' +
'class="combo-wrap-item options__icon options__icon-huge <%= icon %>"',
'</div>'
].join(''));
this.cmbWrapType.render($('#shape-combo-wrap'));
this.cmbWrapType.openButton.menu.cmpEl.css({
'min-width': 178,

View file

@ -325,6 +325,10 @@ define([
: this.hide();
},
isVisible: function() {
return this.$el && this.$el.is(':visible');
},
reloadLanguages: function(array) {
var arr = [],
saved = this.langMenu.saved;
@ -358,12 +362,16 @@ define([
}
},
getStatusLabel: function() {
return $('.statusbar #label-action');
},
showStatusMessage: function(message) {
$('.statusbar #label-action').text(message);
this.getStatusLabel().text(message);
},
clearStatusMessage: function() {
$('.statusbar #label-action').text('');
this.getStatusLabel().text('');
},
SetDisabled: function(disable) {

View file

@ -113,7 +113,9 @@ define([
{caption: me.textTabHome, action: 'home', extcls: 'canedit', dataHintTitle: 'H'},
{caption: me.textTabInsert, action: 'ins', extcls: 'canedit', dataHintTitle: 'I'},
{caption: me.textTabLayout, action: 'layout', extcls: 'canedit', layoutname: 'toolbar-layout', dataHintTitle: 'L'},
{caption: me.textTabLinks, action: 'links', extcls: 'canedit', layoutname: 'toolbar-references', dataHintTitle: 'R'}
{caption: me.textTabLinks, action: 'links', extcls: 'canedit', layoutname: 'toolbar-references', dataHintTitle: 'R'},
undefined, undefined, undefined,
{caption: me.textTabView, action: 'view', extcls: 'canedit', layoutname: 'toolbar-view', dataHintTitle: 'W'}
]
}
);
@ -1303,16 +1305,23 @@ define([
caption: me.textStyleMenuNew
});
var itemWidth = 104,
itemHeight = 40;
this.listStyles = new Common.UI.ComboDataView({
cls: 'combo-styles',
itemWidth: 104,
itemHeight: 40,
itemWidth: itemWidth,
itemHeight: itemHeight,
// hint : this.tipParagraphStyle,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '-16, -4',
enableKeyEvents: true,
additionalMenuItems: [this.listStylesAdditionalMenuItem],
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<div style="background-image: url(<%= imageUrl %>); width: ' + itemWidth + 'px; height: ' + itemHeight + 'px;"></div>',
'</div>'
].join('')),
beforeOpenHandler: function (e) {
var cmp = this,
menu = cmp.openButton.menu,
@ -1322,22 +1331,22 @@ define([
var itemEl = $(cmp.cmpEl.find('.dataview.inner .style').get(0)).parent();
var itemMargin = /*parseInt($(itemEl.get(0)).parent().css('margin-right'))*/-1;
Common.Utils.applicationPixelRatio() > 1 && Common.Utils.applicationPixelRatio() < 2 && (itemMargin = -1 / Common.Utils.applicationPixelRatio());
var itemWidth = itemEl.is(':visible') ? parseFloat(itemEl.css('width')) :
var _width = itemEl.is(':visible') ? parseFloat(itemEl.css('width')) :
(cmp.itemWidth + parseFloat(itemEl.css('padding-left')) + parseFloat(itemEl.css('padding-right')) +
parseFloat(itemEl.css('border-left-width')) + parseFloat(itemEl.css('border-right-width')));
var minCount = cmp.menuPicker.store.length >= minMenuColumn ? minMenuColumn : cmp.menuPicker.store.length,
columnCount = Math.min(cmp.menuPicker.store.length, Math.round($('.dataview', $(cmp.fieldPicker.el)).width() / (itemMargin + itemWidth) + 0.5));
columnCount = Math.min(cmp.menuPicker.store.length, Math.round($('.dataview', $(cmp.fieldPicker.el)).width() / (itemMargin + _width) + 0.5));
columnCount = columnCount < minCount ? minCount : columnCount;
menu.menuAlignEl = cmp.cmpEl;
menu.menuAlign = 'tl-tl';
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - columnCount * (itemMargin + itemWidth) - 1;
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - columnCount * (itemMargin + _width) - 1;
menu.setOffset(Math.min(offset, 0));
menu.cmpEl.css({
'width': columnCount * (itemWidth + itemMargin),
'width': columnCount * (_width + itemMargin),
'min-height': cmp.cmpEl.height()
});
}
@ -1353,16 +1362,6 @@ define([
}
});
this.listStyles.fieldPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">',
'<div style="background-image: url(<%= imageUrl %>); width: ' + this.listStyles.itemWidth + 'px; height: ' + this.listStyles.itemHeight + 'px;"></div>',
'</div>'
].join(''));
this.listStyles.menuPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">',
'<div style="background-image: url(<%= imageUrl %>); width: ' + this.listStyles.itemWidth + 'px; height: ' + this.listStyles.itemHeight + 'px;"></div>',
'</div>'
].join(''));
this.paragraphControls.push(this.listStyles);
this.textOnlyControls.push(this.listStyles);
@ -2653,7 +2652,8 @@ define([
tipMarkersArrow: 'Arrow bullets',
tipMarkersCheckmark: 'Checkmark bullets',
tipMarkersFRhombus: 'Filled rhombus bullets',
tipMarkersDash: 'Dash bullets'
tipMarkersDash: 'Dash bullets',
textTabView: 'View'
}
})(), DE.Views.Toolbar || {}));
});

View file

@ -0,0 +1,256 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2020
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* ViewTab.js
*
* Created by Julia Svinareva on 06.12.2021
* Copyright (c) 2021 Ascensio System SIA. All rights reserved.
*
*/
define([
'common/main/lib/util/utils',
'common/main/lib/component/BaseView',
'common/main/lib/component/Layout'
], function () {
'use strict';
DE.Views.ViewTab = Common.UI.BaseView.extend(_.extend((function(){
return {
options: {},
setEvents: function () {
var me = this;
me.btnNavigation.on('click', function (btn, e) {
me.fireEvent('viewtab:navigation', [btn.pressed]);
});
me.cmbZoom.on('selected', function (combo, record) {
me.fireEvent('zoom:value', [record.value]);
});
me.btnFitToPage.on('click', function () {
me.fireEvent('zoom:topage');
});
me.btnFitToWidth.on('click', function () {
me.fireEvent('zoom:towidth');
});
me.chToolbar.on('change', _.bind(function(checkbox, state) {
me.fireEvent('toolbar:setcompact', [me.chToolbar, state !== 'checked']);
}, me));
me.chStatusbar.on('change', _.bind(function (checkbox, state) {
me.fireEvent('statusbar:hide', [me.chStatusbar, state !== 'checked']);
}, me));
me.chRulers.on('change', _.bind(function (checkbox, state) {
me.fireEvent('rulers:change', [me.chRulers, state === 'checked']);
}, me));
me.btnDarkDocument.on('click', _.bind(function () {
me.fireEvent('darkmode:change');
}, me));
},
initialize: function (options) {
Common.UI.BaseView.prototype.initialize.call(this);
this.toolbar = options.toolbar;
this.appConfig = options.mode;
this.lockedControls = [];
var me = this,
$host = me.toolbar.$el;
this.btnNavigation = new Common.UI.Button({
parentEl: $host.find('#slot-btn-navigation'),
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-menu-navigation',
caption: this.textNavigation,
enableToggle: true,
disabled: true,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
this.lockedControls.push(this.btnNavigation);
this.cmbZoom = new Common.UI.ComboBox({
el: $host.find('#slot-field-zoom'),
cls: 'input-group-nr',
menuStyle: 'min-width: 55px;',
editable: false,
disabled: true,
data: [
{ displayValue: "50%", value: 50 },
{ displayValue: "75%", value: 75 },
{ displayValue: "100%", value: 100 },
{ displayValue: "125%", value: 125 },
{ displayValue: "150%", value: 150 },
{ displayValue: "175%", value: 175 },
{ displayValue: "200%", value: 200 },
{ displayValue: "300%", value: 300 },
{ displayValue: "400%", value: 400 },
{ displayValue: "500%", value: 500 }
],
dataHint : '1',
dataHintDirection: 'top',
dataHintOffset: 'small'
});
this.cmbZoom.setValue(100);
this.lockedControls.push(this.cmbZoom);
$host.find('#slot-lbl-zoom').text(this.textZoom);
this.btnFitToPage = new Common.UI.Button({
parentEl: $host.find('#slot-btn-ftp'),
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-zoomtopage',
caption: this.textFitToPage,
toggleGroup: 'view-zoom',
enableToggle: true,
disabled: true,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'medium'
});
this.lockedControls.push(this.btnFitToPage);
this.btnFitToWidth = new Common.UI.Button({
parentEl: $host.find('#slot-btn-ftw'),
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-zoomtowidth',
caption: this.textFitToWidth,
toggleGroup: 'view-zoom',
enableToggle: true,
disabled: true,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'medium'
});
this.lockedControls.push(this.btnFitToWidth);
this.btnInterfaceTheme = new Common.UI.Button({
parentEl: $host.find('#slot-btn-interface-theme'),
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon day',
caption: this.textInterfaceTheme,
menu: true,
disabled: true,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
this.lockedControls.push(this.btnInterfaceTheme);
this.btnDarkDocument = new Common.UI.Button({
parentEl: $host.find('#slot-btn-dark-document'),
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon night',
caption: this.textDarkDocument,
enableToggle: true,
disabled: true,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
this.lockedControls.push(this.btnDarkDocument);
this.chStatusbar = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-statusbar'),
labelText: this.textStatusBar,
value: !Common.localStorage.getBool("de-hidden-status"),
disabled: true,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.chStatusbar);
this.chToolbar = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-toolbar'),
labelText: this.textAlwaysShowToolbar,
value: !options.compactToolbar,
disabled: true,
dataHint : '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.chToolbar);
this.chRulers = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-rulers'),
labelText: this.textRulers,
value: !Common.Utils.InternalSettings.get("de-hidden-rulers"),
disabled: true,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.chRulers);
},
render: function (el) {
return this;
},
show: function () {
Common.UI.BaseView.prototype.show.call(this);
this.fireEvent('show', this);
},
getButtons: function(type) {
if (type===undefined)
return this.lockedControls;
return [];
},
SetDisabled: function (state) {
this.lockedControls && this.lockedControls.forEach(function(button) {
if ( button ) {
button.setDisabled(state);
}
}, this);
},
turnNavigation: function (state) {
this.btnNavigation && this.btnNavigation.toggle(state, true);
},
textNavigation: 'Navigation',
textZoom: 'Zoom',
textFitToPage: 'Fit To Page',
textFitToWidth: 'Fit To Width',
textInterfaceTheme: 'Interface theme',
textStatusBar: 'Status Bar',
textAlwaysShowToolbar: 'Always show toolbar',
textRulers: 'Rulers',
textDarkDocument: 'Dark document'
}
}()), DE.Views.ViewTab || {}));
});

View file

@ -147,6 +147,7 @@ require([
'RightMenu',
'LeftMenu',
'Main',
'ViewTab',
'Common.Controllers.Fonts',
'Common.Controllers.History'
/** coauthoring begin **/
@ -175,6 +176,7 @@ require([
'documenteditor/main/app/controller/RightMenu',
'documenteditor/main/app/controller/LeftMenu',
'documenteditor/main/app/controller/Main',
'documenteditor/main/app/controller/ViewTab',
'documenteditor/main/app/view/FileMenuPanels',
'documenteditor/main/app/view/ParagraphSettings',
'documenteditor/main/app/view/HeaderFooterSettings',

View file

@ -884,6 +884,7 @@
"DE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Main.textReconnect": "Connection is restored",
"DE.Controllers.Navigation.txtBeginning": "Beginning of document",
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",
@ -891,6 +892,7 @@
"DE.Controllers.Statusbar.textTrackChanges": "The document is opened with the Track Changes mode enabled",
"DE.Controllers.Statusbar.tipReview": "Track changes",
"DE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"DE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Please check connection settings.",
"DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
"DE.Controllers.Toolbar.dataUrl": "Paste a data URL",
"DE.Controllers.Toolbar.notcriticalErrorTitle": "Warning",
@ -2808,6 +2810,7 @@
"DE.Views.Toolbar.txtScheme7": "Equity",
"DE.Views.Toolbar.txtScheme8": "Flow",
"DE.Views.Toolbar.txtScheme9": "Foundry",
"DE.Views.Toolbar.textTabView": "View",
"DE.Views.WatermarkSettingsDialog.textAuto": "Auto",
"DE.Views.WatermarkSettingsDialog.textBold": "Bold",
"DE.Views.WatermarkSettingsDialog.textColor": "Text color",
@ -2831,5 +2834,14 @@
"DE.Views.WatermarkSettingsDialog.textTransparency": "Semitransparent",
"DE.Views.WatermarkSettingsDialog.textUnderline": "Underline",
"DE.Views.WatermarkSettingsDialog.tipFontName": "Font Name",
"DE.Views.WatermarkSettingsDialog.tipFontSize": "Font Size"
"DE.Views.WatermarkSettingsDialog.tipFontSize": "Font Size",
"DE.Views.ViewTab.textNavigation": "Navigation",
"DE.Views.ViewTab.textZoom": "Zoom",
"DE.Views.ViewTab.textFitToPage": "Fit To Page",
"DE.Views.ViewTab.textFitToWidth": "Fit To Width",
"DE.Views.ViewTab.textInterfaceTheme": "Interface theme",
"DE.Views.ViewTab.textStatusBar": "Status Bar",
"DE.Views.ViewTab.textAlwaysShowToolbar": "Always show toolbar",
"DE.Views.ViewTab.textRulers": "Rulers",
"DE.Views.ViewTab.textDarkDocument": "Dark document"
}

View file

@ -152,6 +152,7 @@ require([
'RightMenu',
'LeftMenu',
'Main',
'ViewTab',
'Common.Controllers.Fonts',
'Common.Controllers.History'
/** coauthoring begin **/
@ -175,6 +176,7 @@ require([
'presentationeditor/main/app/controller/RightMenu',
'presentationeditor/main/app/controller/LeftMenu',
'presentationeditor/main/app/controller/Main',
'presentationeditor/main/app/controller/ViewTab',
'presentationeditor/main/app/view/FileMenuPanels',
'presentationeditor/main/app/view/ParagraphSettings',
'presentationeditor/main/app/view/ImageSettings',

View file

@ -621,6 +621,8 @@ define([
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
this.disableEditing(false, true);
this.getApplication().getController('Statusbar').hideDisconnectTip();
this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect);
}
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl))) {
@ -631,6 +633,7 @@ define([
setLongActionView: function(action) {
var title = '', text = '', force = false;
var statusCallback = null; // call after showing status
switch (action.id) {
case Asc.c_oAscAsyncAction['Open']:
@ -712,6 +715,10 @@ define([
case Asc.c_oAscAsyncAction['Disconnect']:
text = this.textDisconnect;
this.disableEditing(true, true);
var me = this;
statusCallback = function() {
me.getApplication().getController('Statusbar').showDisconnectTip();
};
break;
default:
@ -731,7 +738,7 @@ define([
if (!this.isShowOpenDialog)
this.loadMask.show(action.id===Asc.c_oAscAsyncAction['Open']);
} else {
this.getApplication().getController('Statusbar').setStatusCaption(text, force);
this.getApplication().getController('Statusbar').setStatusCaption(text, force, 0, statusCallback);
}
},
@ -2854,7 +2861,8 @@ define([
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.',
textConvertEquation: 'This equation was created with an old version of equation editor which is no longer supported. Converting this equation to Office Math ML format will make it editable.<br>Do you want to convert this equation?',
textApplyAll: 'Apply to all equations',
textLearnMore: 'Learn More'
textLearnMore: 'Learn More',
textReconnect: 'Connection is restored'
}
})(), PE.Controllers.Main || {}))
});

View file

@ -62,13 +62,10 @@ define([
'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);
}
'statusbar:hide': _.bind(me.onChangeCompactView, me)
},
'ViewTab': {
'statusbar:hide': _.bind(me.onChangeCompactView, me)
}
});
this._state = {
@ -205,13 +202,14 @@ define([
this.statusbar.reloadLanguages(langs);
},
setStatusCaption: function(text, force, delay) {
setStatusCaption: function(text, force, delay, callback) {
if (this.timerCaption && ( ((new Date()) < this.timerCaption) || text.length==0 ) && !force )
return;
this.timerCaption = undefined;
if (text.length) {
this.statusbar.showStatusMessage(text);
callback && callback();
if (delay>0)
this.timerCaption = (new Date()).getTime() + delay;
} else
@ -226,6 +224,47 @@ define([
this.api.put_TextPrLang(langid);
},
zoomText : 'Zoom {0}%'
onChangeCompactView: function (view, status) {
this.statusbar.setVisible(!status);
Common.localStorage.setBool('pe-hidden-status', status);
if (view.$el.closest('.btn-slot').prop('id') === 'slot-btn-options') {
this.statusbar.fireEvent('view:hide', [this, status]);
}
Common.NotificationCenter.trigger('layout:changed', 'status');
Common.NotificationCenter.trigger('edit:complete', this.statusbar);
},
showDisconnectTip: function () {
var me = this;
if (!this.disconnectTip) {
var target = this.statusbar.getStatusLabel();
target = target.is(':visible') ? target.parent() : this.statusbar.isVisible() ? this.statusbar.$el : $(document.body);
this.disconnectTip = new Common.UI.SynchronizeTip({
target : target,
text : this.textDisconnect,
placement: 'top',
position: this.statusbar.isVisible() ? undefined : {bottom: 0},
showLink: false
});
this.disconnectTip.on({
'closeclick': function() {
me.disconnectTip.hide();
me.disconnectTip = null;
}
});
}
this.disconnectTip.show();
},
hideDisconnectTip: function() {
this.disconnectTip && this.disconnectTip.hide();
this.disconnectTip = null;
},
zoomText : 'Zoom {0}%',
textDisconnect: '<b>Connection is lost</b><br>Please check connection settings.'
}, PE.Controllers.Statusbar || {}));
});

View file

@ -177,6 +177,9 @@ define([
'go:editor': function() {
Common.Gateway.requestEditRights();
}
},
'ViewTab': {
'toolbar:setcompact': this.onChangeCompactView.bind(this)
}
});
@ -2482,7 +2485,7 @@ define([
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration, layoutname: 'toolbar-collaboration', dataHintTitle: 'U'};
var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel();
if ( $panel ) {
me.toolbar.addTab(tab, $panel, 4);
me.toolbar.addTab(tab, $panel, 3);
me.toolbar.setVisible('review', (config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments) && Common.UI.LayoutManager.isElementVisible('toolbar-collaboration'));
}
@ -2494,6 +2497,10 @@ define([
Array.prototype.push.apply(me.toolbar.lockControls,transitController.getView().getButtons());
Array.prototype.push.apply(me.toolbar.slideOnlyControls,transitController.getView().getButtons());
var viewtab = me.getApplication().getController('ViewTab');
viewtab.setApi(me.api).setConfig({toolbar: me, mode: config});
Array.prototype.push.apply(me.toolbar.lockControls, viewtab.getView('ViewTab').getButtons());
me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled'));
if (!(config.customization && config.customization.compactHeader)) {

View file

@ -0,0 +1,211 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2020
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* ViewTab.js
*
* Created by Julia Svinareva on 07.12.2021
* Copyright (c) 2021 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/main/app/view/ViewTab'
], function () {
'use strict';
PE.Controllers.ViewTab = Backbone.Controller.extend(_.extend({
models : [],
collections : [
],
views : [
'ViewTab'
],
sdkViewName : '#id_main',
initialize: function () {
},
onLaunch: function () {
this._state = {
zoom_type: undefined,
zoom_percent: undefined
};
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this));
},
setApi: function (api) {
if (api) {
this.api = api;
this.api.asc_registerCallback('asc_onZoomChange', _.bind(this.onZoomChange, this));
}
return this;
},
setConfig: function(config) {
this.toolbar = config.toolbar;
this.view = this.createView('ViewTab', {
toolbar: this.toolbar.toolbar,
mode: config.mode,
compactToolbar: this.toolbar.toolbar.isCompactView
});
this.addListeners({
'ViewTab': {
'zoom:value': _.bind(this.onChangeZoomValue, this),
'zoom:toslide': _.bind(this.onBtnZoomTo, this, 'toslide'),
'zoom:towidth': _.bind(this.onBtnZoomTo, this, 'towidth'),
'rulers:change': _.bind(this.onChangeRulers, this),
'notes:change': _.bind(this.onChangeNotes, this),
},
'Toolbar': {
'view:compact': _.bind(function (toolbar, state) {
this.view.chToolbar.setValue(!state, true);
}, this)
},
'Statusbar': {
'view:hide': _.bind(function (statusbar, state) {
this.view.chStatusbar.setValue(!state, true);
}, this)
},
'Common.Views.Header': {
'rulers:hide': _.bind(function (isChecked) {
this.view.chRulers.setValue(!isChecked, true);
}, this),
'notes:hide': _.bind(function (isChecked) {
this.view.chNotes.setValue(!isChecked, true);
}, this),
}
});
},
SetDisabled: function(state) {
this.view && this.view.SetDisabled(state);
},
getView: function(name) {
return !name && this.view ?
this.view : Backbone.Controller.prototype.getView.call(this, name);
},
onCoAuthoringDisconnect: function() {
this.SetDisabled(true);
},
onZoomChange: function (percent, type) {
if (this._state.zoom_type !== type) {
this.view.btnFitToSlide.toggle(type == 2, true);
this.view.btnFitToWidth.toggle(type == 1, true);
this._state.zoom_type = type;
}
if (this._state.zoom_percent !== percent) {
this.view.cmbZoom.setValue(percent, percent + '%');
this._state.zoom_percent = percent;
}
},
onAppReady: function (config) {
var me = this;
if (me.view) {
(new Promise(function (accept, reject) {
accept();
})).then(function () {
me.view.setEvents();
});
var menuItems = [],
currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId();
for (var t in Common.UI.Themes.map()) {
menuItems.push({
value: t,
caption: Common.UI.Themes.get(t).text,
checked: t === currentTheme,
checkable: true,
toggleGroup: 'interface-theme'
});
}
if (menuItems.length) {
this.view.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems}));
this.view.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) {
var value = item.value;
Common.UI.Themes.setTheme(value);
}, this));
}
}
},
onChangeZoomValue: function (value) {
this._state.zoom_type = undefined;
this._state.zoom_percent = undefined;
this.api.zoom(value);
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onBtnZoomTo: function (type, btn) {
this._state.zoom_type = undefined;
this._state.zoom_percent = undefined;
if (!btn.pressed)
this.api.zoomCustomMode();
else
this.api[type === 'toslide' ? 'zoomFitToPage' : 'zoomFitToWidth']();
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onChangeRulers: function (btn, checked) {
this.api.asc_SetViewRulers(checked);
Common.localStorage.setBool('pe-hidden-rulers', !checked);
Common.Utils.InternalSettings.set("pe-hidden-rulers", !checked);
this.view.fireEvent('rulers:hide', [!checked]);
Common.NotificationCenter.trigger('layout:changed', 'rulers');
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onChangeNotes: function (btn, checked) {
this.api.asc_ShowNotes(checked);
Common.localStorage.setBool('pe-hidden-notes', !checked);
this.view.fireEvent('notes:hide', [!checked]);
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onThemeChanged: function () {
if (this.view) {
var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(),
menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme});
this.view.btnInterfaceTheme.menu.clearAll();
menu_item.setChecked(true, true);
}
},
}, PE.Controllers.ViewTab || {}));
});

View file

@ -111,6 +111,17 @@ define([
// Events generated by main view
'Viewport': {
},
'ViewTab': {
'rulers:hide': function (state) {
me.header.mnuitemHideRulers.setChecked(state, true);
},
'notes:hide': function (state) {
me.header.mnuitemHideNotes.setChecked(state, true);
},
'statusbar:hide': function (view, state) {
me.header.mnuitemHideStatusBar.setChecked(state, true);
}
}
});
Common.NotificationCenter.on('preview:start', this.onPreviewStart.bind(this));
@ -237,7 +248,7 @@ define([
}, this));
}
var mnuitemHideStatusBar = new Common.UI.MenuItem({
me.header.mnuitemHideStatusBar = new Common.UI.MenuItem({
caption: me.header.textHideStatusBar,
checked: Common.localStorage.getBool("pe-hidden-status"),
checkable: true,
@ -245,16 +256,16 @@ define([
});
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false )
mnuitemHideStatusBar.hide();
me.header.mnuitemHideStatusBar.hide();
var mnuitemHideRulers = new Common.UI.MenuItem({
me.header.mnuitemHideRulers = new Common.UI.MenuItem({
caption: me.header.textHideLines,
checked: Common.Utils.InternalSettings.get("pe-hidden-rulers"),
checkable: true,
value: 'rulers'
});
if (!config.isEdit)
mnuitemHideRulers.hide();
me.header.mnuitemHideRulers.hide();
me.header.mnuitemHideNotes = new Common.UI.MenuItem({
caption: me.header.textHideNotes,
@ -298,8 +309,8 @@ define([
style: 'min-width: 180px;',
items: [
me.header.mnuitemCompactToolbar,
mnuitemHideStatusBar,
mnuitemHideRulers,
me.header.mnuitemHideStatusBar,
me.header.mnuitemHideRulers,
me.header.mnuitemHideNotes,
{caption:'--'},
me.header.mnuitemFitPage,
@ -460,11 +471,13 @@ define([
Common.Utils.InternalSettings.set("pe-hidden-rulers", item.isChecked());
Common.NotificationCenter.trigger('layout:changed', 'rulers');
Common.NotificationCenter.trigger('edit:complete', me.header);
me.header.fireEvent('rulers:hide', [item.isChecked()]);
break;
case 'notes':
me.api.asc_ShowNotes(!item.isChecked());
Common.localStorage.setBool('pe-hidden-notes', item.isChecked());
Common.NotificationCenter.trigger('edit:complete', me.header);
me.header.fireEvent('notes:hide', [item.isChecked()]);
break;
case 'zoom:page':
item.isChecked() ? me.api.zoomFitToPage() : me.api.zoomCustomMode();

View file

@ -178,6 +178,46 @@
</div>
</div>
</section>
<section class="panel" data-tab="view">
<div class="group small">
<div class="elset" style="display: flex;">
<span class="btn-slot" id="slot-field-zoom" style="flex-grow: 1;"></span>
</div>
<div class="elset" style="text-align: center;">
<span class="btn-slot text" id="slot-lbl-zoom" style="font-size: 11px;text-align: center;margin-top: 4px;"></span>
</div>
</div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-btn-fts" style="font-size: 11px;text-align: center;"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-btn-ftw" style="font-size: 11px;text-align: center;"></span>
</div>
</div>
<div class="separator long"></div>
<div class="group">
<span class="btn-slot text x-huge" id="slot-btn-interface-theme"></span>
</div>
<div class="separator long"></div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-notes"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-rulers"></span>
</div>
</div>
<div class="separator long"></div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-toolbar"></span>
</div>
</div>
</section>
</section>
</section>
</div>

View file

@ -384,7 +384,7 @@ define([
var itemsTemplate =
_.template([
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "custom") { %> class="border-top" style="margin-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem" <% if (typeof(item.checked) !== "undefined" && item.checked) { %> class="checked" <% } %> ><%= scope.getDisplayValue(item) %></a></li>',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "custom") { %> class="border-top" style="margin-top: 5px;padding-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem" <% if (typeof(item.checked) !== "undefined" && item.checked) { %> class="checked" <% } %> ><%= scope.getDisplayValue(item) %></a></li>',
'<% }); %>'
].join(''));
this.cmbFontRender = new Common.UI.ComboBox({

View file

@ -1172,23 +1172,25 @@ define([
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this.fillControls.push(this.cmbFillSrc);
var itemWidth = 28,
itemHeight = 28;
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
itemWidth: itemWidth,
itemHeight: itemHeight,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
dataHintOffset: 'big',
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'width="' + itemWidth + '" height="' + itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
].join(''))
});
this.cmbPattern.render($('#shape-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,

View file

@ -702,23 +702,25 @@ define([
createDelayedControls: function() {
var me = this;
var itemWidth = 28,
itemHeight = 28;
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
itemWidth: itemWidth,
itemHeight: itemHeight,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
dataHintOffset: 'big',
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + itemWidth + '" height="' + itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''))
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
this.cmbPattern.render($('#slide-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,

View file

@ -309,12 +309,20 @@ define([
: this.hide();
},
isVisible: function() {
return this.$el && this.$el.is(':visible');
},
getStatusLabel: function() {
return $('.statusbar #status-label-action');
},
showStatusMessage: function(message) {
$('#status-label-action').text(message);
this.getStatusLabel().text(message);
},
clearStatusMessage: function() {
$('#status-label-action').text('');
this.getStatusLabel().text('');
},
reloadLanguages: function(array) {

View file

@ -1102,23 +1102,25 @@ define([
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this.lockedControls.push(this.cmbFillSrc);
var itemWidth = 28,
itemHeight = 28;
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
itemWidth: itemWidth,
itemHeight: itemHeight,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
dataHintOffset: 'big',
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'width="' + itemWidth + '" height="' + itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
].join(''))
});
this.cmbPattern.render($('#textart-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,

View file

@ -134,7 +134,9 @@ define([
{caption: me.textTabFile, action: 'file', extcls: 'canedit', layoutname: 'toolbar-file', haspanel:false, dataHintTitle: 'F'},
{caption: me.textTabHome, action: 'home', extcls: 'canedit', dataHintTitle: 'H'},
{caption: me.textTabInsert, action: 'ins', extcls: 'canedit', dataHintTitle: 'I'},
{caption: me.textTabTransitions, action: 'transit', extcls: 'canedit', dataHintTitle: 'N'}
{caption: me.textTabTransitions, action: 'transit', extcls: 'canedit', dataHintTitle: 'N'},
undefined, undefined,
{caption: me.textTabView, action: 'view', extcls: 'canedit', layoutname: 'toolbar-view', dataHintTitle: 'W'}
]
}
);
@ -1017,6 +1019,11 @@ define([
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '-16, -4',
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<div class="item-theme" style="' + '<% if (typeof imageUrl !== "undefined") { %>' + 'background-image: url(<%= imageUrl %>);' + '<% } %> background-position: 0 -<%= offsety %>px;"></div>',
'</div>'
].join('')),
beforeOpenHandler: function (e) {
var cmp = this,
menu = cmp.openButton.menu,
@ -1055,17 +1062,6 @@ define([
}
});
me.listTheme.fieldPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">',
'<div class="item-theme" style="' + '<% if (typeof imageUrl !== "undefined") { %>' + 'background-image: url(<%= imageUrl %>);' + '<% } %> background-position: 0 -<%= offsety %>px;"></div>',
'</div>'
].join(''));
me.listTheme.menuPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">',
'<div class="item-theme" style="' + '<% if (typeof imageUrl !== "undefined") { %>' + 'background-image: url(<%= imageUrl %>);' + '<% } %> background-position: 0 -<%= offsety %>px;"></div>',
'</div>'
].join(''));
this.cmbInsertShape = new Common.UI.ComboDataViewShape({
cls: 'combo-styles shapes',
itemWidth: 20,
@ -1993,7 +1989,8 @@ define([
tipMarkersCheckmark: 'Checkmark bullets',
tipMarkersFRhombus: 'Filled rhombus bullets',
tipMarkersDash: 'Dash bullets',
tipNone: 'None'
tipNone: 'None',
textTabView: 'View'
}
}()), PE.Views.Toolbar || {}));
});

View file

@ -136,10 +136,18 @@ define([
item.tip = item.title;
});
var itemWidth = 87,
itemHeight = 40;
this.listEffects = new Common.UI.ComboDataView({
cls: 'combo-transitions',
itemWidth: 87,
itemHeight: 40,
itemWidth: itemWidth,
itemHeight: itemHeight,
itemTemplate: _.template([
'<div class = "btn_item x-huge" id = "<%= id %>" style = "width: ' + itemWidth + 'px;height: ' + itemHeight + 'px;">',
'<div class = "icon toolbar__icon <%= imageUrl %>"></div>',
'<div class = "caption"><%= title %></div>',
'</div>'
].join('')),
enableKeyEvents: true,
lock: [_set.slideDeleted, _set.noSlides, _set.disableOnStart, _set.transitLock],
dataHint: '1',
@ -173,14 +181,6 @@ define([
this.lockedControls.push(this.listEffects);
this.listEffects.menuPicker.store.add(this._arrEffectName);
this.listEffects.fieldPicker.itemTemplate = _.template([
'<div class = "btn_item x-huge" id = "<%= id %>" style = "width: ' + (this.listEffects.itemWidth) + 'px;height: ' + (this.listEffects.itemHeight) + 'px;">',
'<div class = "icon toolbar__icon <%= imageUrl %>"></div>',
'<div class = "caption"><%= title %></div>',
'</div>'
].join(''));
this.listEffects.menuPicker.itemTemplate = this.listEffects.fieldPicker.itemTemplate;
this.btnPreview = new Common.UI.Button({
cls: 'btn-toolbar', // x-huge icon-top',
caption: this.txtPreview,

View file

@ -0,0 +1,234 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2020
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* ViewTab.js
*
* Created by Julia Svinareva on 07.12.2021
* Copyright (c) 2021 Ascensio System SIA. All rights reserved.
*
*/
define([
'common/main/lib/util/utils',
'common/main/lib/component/BaseView',
'common/main/lib/component/Layout'
], function () {
'use strict';
PE.Views.ViewTab = Common.UI.BaseView.extend(_.extend((function(){
return {
options: {},
setEvents: function () {
var me = this;
me.cmbZoom && me.cmbZoom.on('selected', function (combo, record) {
me.fireEvent('zoom:value', [record.value]);
});
me.btnFitToSlide && me.btnFitToSlide.on('click', function () {
me.fireEvent('zoom:toslide', [me.btnFitToSlide]);
});
me.btnFitToWidth && me.btnFitToWidth.on('click', function () {
me.fireEvent('zoom:towidth', [me.btnFitToWidth]);
});
me.chToolbar && me.chToolbar.on('change', _.bind(function(checkbox, state) {
me.fireEvent('toolbar:setcompact', [me.chToolbar, state !== 'checked']);
}, me));
me.chStatusbar && me.chStatusbar.on('change', _.bind(function (checkbox, state) {
me.fireEvent('statusbar:hide', [me.chStatusbar, state !== 'checked']);
}, me));
me.chRulers && me.chRulers.on('change', _.bind(function (checkbox, state) {
me.fireEvent('rulers:change', [me.chRulers, state === 'checked']);
}, me));
me.chNotes && me.chNotes.on('change', _.bind(function (checkbox, state) {
me.fireEvent('notes:change', [me.chNotes, state === 'checked']);
}, me));
},
initialize: function (options) {
Common.UI.BaseView.prototype.initialize.call(this);
this.toolbar = options.toolbar;
this.appConfig = options.mode;
var _set = PE.enumLock;
this.lockedControls = [];
var me = this,
$host = me.toolbar.$el;
this.cmbZoom = new Common.UI.ComboBox({
el: $host.find('#slot-field-zoom'),
cls: 'input-group-nr',
menuStyle: 'min-width: 55px;',
editable: false,
lock: [_set.disableOnStart],
data: [
{ displayValue: "50%", value: 50 },
{ displayValue: "75%", value: 75 },
{ displayValue: "100%", value: 100 },
{ displayValue: "125%", value: 125 },
{ displayValue: "150%", value: 150 },
{ displayValue: "175%", value: 175 },
{ displayValue: "200%", value: 200 },
{ displayValue: "300%", value: 300 },
{ displayValue: "400%", value: 400 },
{ displayValue: "500%", value: 500 }
],
dataHint : '1',
dataHintDirection: 'top',
dataHintOffset: 'small'
});
this.cmbZoom.setValue(100);
this.lockedControls.push(this.cmbZoom);
$host.find('#slot-lbl-zoom').text(this.textZoom);
this.btnFitToSlide = new Common.UI.Button({
parentEl: $host.find('#slot-btn-fts'),
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-zoomtoslide',
caption: this.textFitToSlide,
lock: [_set.disableOnStart],
toggleGroup: 'view-zoom',
enableToggle: true,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'medium'
});
this.lockedControls.push(this.btnFitToSlide);
this.btnFitToWidth = new Common.UI.Button({
parentEl: $host.find('#slot-btn-ftw'),
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-zoomtowidth',
caption: this.textFitToWidth,
lock: [_set.disableOnStart],
toggleGroup: 'view-zoom',
enableToggle: true,
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'medium'
});
this.lockedControls.push(this.btnFitToWidth);
this.btnInterfaceTheme = new Common.UI.Button({
parentEl: $host.find('#slot-btn-interface-theme'),
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon day',
caption: this.textInterfaceTheme,
lock: [_set.disableOnStart],
menu: true,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
this.lockedControls.push(this.btnInterfaceTheme);
this.chStatusbar = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-statusbar'),
labelText: this.textStatusBar,
value: !Common.localStorage.getBool("pe-hidden-status"),
lock: [_set.disableOnStart],
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.chStatusbar);
this.chToolbar = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-toolbar'),
labelText: this.textAlwaysShowToolbar,
value: !options.compactToolbar,
lock: [_set.disableOnStart],
dataHint : '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.chToolbar);
this.chRulers = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-rulers'),
labelText: this.textRulers,
value: !Common.Utils.InternalSettings.get("pe-hidden-rulers"),
lock: [_set.disableOnStart],
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.chRulers);
this.chNotes = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-notes'),
labelText: this.textNotes,
value: !Common.localStorage.getBool('pe-hidden-notes', this.appConfig.customization && this.appConfig.customization.hideNotes===true),
lock: [_set.disableOnStart],
dataHint: '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.chNotes);
},
render: function (el) {
return this;
},
show: function () {
Common.UI.BaseView.prototype.show.call(this);
this.fireEvent('show', this);
},
getButtons: function(type) {
if (type===undefined)
return this.lockedControls;
return [];
},
SetDisabled: function (state) {
this.lockedControls && this.lockedControls.forEach(function(button) {
if ( button ) {
button.setDisabled(state);
}
}, this);
},
textZoom: 'Zoom',
textFitToSlide: 'Fit To Slide',
textFitToWidth: 'Fit To Width',
textInterfaceTheme: 'Interface theme',
textStatusBar: 'Status Bar',
textAlwaysShowToolbar: 'Always show toolbar',
textRulers: 'Rulers',
textNotes: 'Notes'
}
}()), PE.Views.ViewTab || {}));
});

View file

@ -143,6 +143,7 @@ require([
'RightMenu',
'LeftMenu',
'Main',
'ViewTab',
'Common.Controllers.Fonts',
'Common.Controllers.History'
/** coauthoring begin **/
@ -166,6 +167,7 @@ require([
'presentationeditor/main/app/controller/RightMenu',
'presentationeditor/main/app/controller/LeftMenu',
'presentationeditor/main/app/controller/Main',
'presentationeditor/main/app/controller/ViewTab',
'presentationeditor/main/app/view/FileMenuPanels',
'presentationeditor/main/app/view/ParagraphSettings',
'presentationeditor/main/app/view/ImageSettings',

View file

@ -757,7 +757,9 @@
"PE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"PE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Main.textReconnect": "Connection is restored",
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"PE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Please check connection settings.",
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
"PE.Controllers.Toolbar.textAccent": "Accents",
"PE.Controllers.Toolbar.textBracket": "Brackets",
@ -1998,6 +2000,7 @@
"PE.Views.Toolbar.txtScheme9": "Foundry",
"PE.Views.Toolbar.txtSlideAlign": "Align to Slide",
"PE.Views.Toolbar.txtUngroup": "Ungroup",
"PE.Views.Toolbar.textTabView": "View",
"PE.Views.Transitions.strDelay": "Delay",
"PE.Views.Transitions.strDuration": "Duration",
"PE.Views.Transitions.strStartOnClick": "Start On Click",
@ -2033,5 +2036,13 @@
"PE.Views.Transitions.txtApplyToAll": "Apply to All Slides",
"PE.Views.Transitions.txtParameters": "Parameters",
"PE.Views.Transitions.txtPreview": "Preview",
"PE.Views.Transitions.txtSec": "s"
"PE.Views.Transitions.txtSec": "s",
"PE.Views.ViewTab.textZoom": "Zoom",
"PE.Views.ViewTab.textFitToSlide": "Fit To Slide",
"PE.Views.ViewTab.textFitToWidth": "Fit To Width",
"PE.Views.ViewTab.textInterfaceTheme": "Interface theme",
"PE.Views.ViewTab.textStatusBar": "Status Bar",
"PE.Views.ViewTab.textAlwaysShowToolbar": "Always show toolbar",
"PE.Views.ViewTab.textRulers": "Rulers",
"PE.Views.ViewTab.textNotes": "Notes"
}

View file

@ -707,11 +707,14 @@ define([
}
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
this.disableEditing(false, true);
this.getApplication().getController('Statusbar').hideDisconnectTip();
this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect);
}
},
setLongActionView: function(action) {
var title = '', text = '', force = false;
var statusCallback = null; // call after showing status
switch (action.id) {
case Asc.c_oAscAsyncAction.Open:
@ -787,6 +790,10 @@ define([
title = this.textDisconnect;
text = this.textDisconnect;
this.disableEditing(true, true);
var me = this;
statusCallback = function() {
me.getApplication().getController('Statusbar').showDisconnectTip();
};
break;
default:
@ -806,7 +813,7 @@ define([
this.loadMask.show();
}
} else {
this.getApplication().getController('Statusbar').setStatusCaption(text, force);
this.getApplication().getController('Statusbar').setStatusCaption(text, force, 0, statusCallback);
}
},
@ -3440,7 +3447,8 @@ define([
textFormulaFilledAllRows: 'Formula filled {0} rows have data. Filling other empty rows may take a few minutes.',
textFormulaFilledAllRowsWithEmpty: 'Formula filled first {0} rows. Filling other empty rows may take a few minutes.',
textFormulaFilledFirstRowsOtherIsEmpty: 'Formula filled only first {0} rows by memory save reason. Other rows in this sheet don\'t have data.',
textFormulaFilledFirstRowsOtherHaveData: 'Formula filled only first {0} rows have data by memory save reason. There are other {1} rows have data in this sheet. You can fill them manually.'
textFormulaFilledFirstRowsOtherHaveData: 'Formula filled only first {0} rows have data by memory save reason. There are other {1} rows have data in this sheet. You can fill them manually.',
textReconnect: 'Connection is restored'
}
})(), SSE.Controllers.Main || {}))
});

View file

@ -70,6 +70,9 @@ define([
},
'Common.Views.Header': {
'statusbar:setcompact': _.bind(this.onChangeViewMode, this)
},
'ViewTab': {
'statusbar:setcompact': _.bind(this.onChangeViewMode, this)
}
});
},
@ -788,13 +791,13 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.statusbar);
},
setStatusCaption: function(text, force, delay) {
setStatusCaption: function(text, force, delay, callback) {
if (this.timerCaption && ( ((new Date()) < this.timerCaption) || text.length==0 ) && !force )
return;
this.timerCaption = undefined;
if (text.length) {
this.statusbar.showStatusMessage(text);
this.statusbar.showStatusMessage(text, callback);
if (delay>0)
this.timerCaption = (new Date()).getTime() + delay;
} else
@ -811,12 +814,40 @@ define([
return isDragDrop;
},
showDisconnectTip: function () {
var me = this;
if (!this.disconnectTip) {
var target = this.statusbar.getStatusLabel();
target = target.is(':visible') ? target.parent() : this.statusbar.isVisible() ? this.statusbar.$el : $(document.body);
this.disconnectTip = new Common.UI.SynchronizeTip({
target : target,
text : this.textDisconnect,
placement: 'top',
position: this.statusbar.isVisible() ? undefined : {bottom: 0},
showLink: false
});
this.disconnectTip.on({
'closeclick': function() {
me.disconnectTip.hide();
me.disconnectTip = null;
}
});
}
this.disconnectTip.show();
},
hideDisconnectTip: function() {
this.disconnectTip && this.disconnectTip.hide();
this.disconnectTip = null;
},
zoomText : 'Zoom {0}%',
errorLastSheet : 'Workbook must have at least one visible worksheet.',
errorRemoveSheet: 'Can\'t delete the worksheet.',
warnDeleteSheet : 'The worksheet maybe has data. Proceed operation?',
strSheet : 'Sheet',
textSheetViewTip: 'You are in Sheet View mode. Filters and sorting are visible only to you and those who are still in this view.',
textSheetViewTipFilters: 'You are in Sheet View mode. Filters are visible only to you and those who are still in this view.'
textSheetViewTipFilters: 'You are in Sheet View mode. Filters are visible only to you and those who are still in this view.',
textDisconnect: '<b>Connection is lost</b><br>Please check connection settings.'
}, SSE.Controllers.Statusbar || {}));
});

View file

@ -145,6 +145,9 @@ define([
},
'CellSettings': {
'cf:init': this.onShowBeforeCondFormat
},
'ViewTab': {
'viewtab:showtoolbar': this.onChangeViewMode.bind(this)
}
});
Common.NotificationCenter.on('page:settings', _.bind(this.onApiSheetChanged, this));

View file

@ -59,6 +59,7 @@ define([
},
onLaunch: function () {
this._state = {};
Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this));
},
setApi: function (api) {
@ -79,11 +80,13 @@ define([
this.toolbar = config.toolbar;
this.view = this.createView('ViewTab', {
toolbar: this.toolbar.toolbar,
mode: config.mode
mode: config.mode,
compactToolbar: this.toolbar.toolbar.isCompactView
});
this.addListeners({
'ViewTab': {
'viewtab:freeze': this.onFreeze,
'viewtab:freezeshadow': this.onFreezeShadow,
'viewtab:formula': this.onViewSettings,
'viewtab:headings': this.onViewSettings,
'viewtab:gridlines': this.onViewSettings,
@ -95,7 +98,20 @@ define([
'viewtab:manager': this.onOpenManager
},
'Statusbar': {
'sheet:changed': this.onApiSheetChanged.bind(this)
'sheet:changed': this.onApiSheetChanged.bind(this),
'view:compact': _.bind(function (statusbar, state) {
this.view.chStatusbar.setValue(state, true);
}, this)
},
'Toolbar': {
'view:compact': _.bind(function (toolbar, state) {
this.view.chToolbar.setValue(!state, true);
}, this)
},
'Common.Views.Header': {
'toolbar:freezeshadow': _.bind(function (isChecked) {
this.view.btnFreezePanes.menu.items[4].setChecked(isChecked, true);
}, this)
}
});
Common.NotificationCenter.on('layout:changed', _.bind(this.onLayoutChanged, this));
@ -128,6 +144,13 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onFreezeShadow: function (checked) {
this.api.asc_setFrozenPaneBorderType(checked ? Asc.c_oAscFrozenPaneBorderType.shadow : Asc.c_oAscFrozenPaneBorderType.line);
Common.localStorage.setBool('sse-freeze-shadow', checked);
this.view.fireEvent('freeze:shadow', [checked]);
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onZoom: function(zoom) {
if (this.api) {
this.api.asc_setZoom(zoom/100);
@ -224,6 +247,16 @@ define([
onApiZoomChange: function(zf, type){
var value = Math.floor((zf + .005) * 100);
this.view.cmbZoom.setValue(value, value + '%');
},
onThemeChanged: function () {
if (this.view) {
var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(),
menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme});
this.view.btnInterfaceTheme.menu.clearAll();
menu_item.setChecked(true, true);
}
}
}, SSE.Controllers.ViewTab || {}));
});

View file

@ -118,6 +118,11 @@ define([
if ( me.header.btnSave )
me.header.btnSave.setDisabled(state);
}
},
'ViewTab': {
'freeze:shadow': function (checked) {
me.header.mnuitemFreezePanesShadow.setChecked(checked, true);
}
}
});
@ -511,6 +516,7 @@ define([
case 'freezepanesshadow':
me.api.asc_setFrozenPaneBorderType(item.isChecked() ? Asc.c_oAscFrozenPaneBorderType.shadow : Asc.c_oAscFrozenPaneBorderType.line);
Common.localStorage.setBool('sse-freeze-shadow', item.isChecked());
me.header.fireEvent('toolbar:freezeshadow', [item.isChecked()]);
break;
case 'advanced': me.header.fireEvent('file:settings', me.header); break;
}

View file

@ -267,6 +267,10 @@
</div>
</div>
<div class="separator long"></div>
<div class="group">
<span class="btn-slot text x-huge" id="slot-btn-interface-theme"></span>
</div>
<div class="separator long"></div>
<div class="group">
<span class="btn-slot text x-huge" id="slot-btn-freeze"></span>
</div>
@ -287,6 +291,15 @@
<span class="btn-slot text" id="slot-chk-zeros"></span>
</div>
</div>
<div class="separator long"></div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-toolbar"></span>
</div>
</div>
</section>
</section>
</section>

View file

@ -320,23 +320,25 @@ define([
});
this.fillControls.push(this.sldrGradient);
var itemWidth = 28,
itemHeight = 28;
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
itemWidth: itemWidth,
itemHeight: itemHeight,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
dataHintOffset: 'big',
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + itemWidth + '" height="' + itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''))
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
this.cmbPattern.render($('#cell-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,

View file

@ -446,7 +446,7 @@ define([
var itemsTemplate =
_.template([
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "customoptions") { %> class="border-top" style="margin-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem">',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "customoptions") { %> class="border-top" style="margin-top: 5px;padding-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem">',
'<%= scope.getDisplayValue(item) %>',
'</a></li>',
'<% }); %>'
@ -900,7 +900,7 @@ define([
var itemsTemplate =
_.template([
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "custom") { %> class="border-top" style="margin-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem" <% if (typeof(item.checked) !== "undefined" && item.checked) { %> class="checked" <% } %> ><%= scope.getDisplayValue(item) %></a></li>',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "custom") { %> class="border-top" style="margin-top: 5px;padding-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem" <% if (typeof(item.checked) !== "undefined" && item.checked) { %> class="checked" <% } %> ><%= scope.getDisplayValue(item) %></a></li>',
'<% }); %>'
].join(''));
this.cmbFontRender = new Common.UI.ComboBox({
@ -2879,7 +2879,7 @@ define([
var itemsTemplate =
_.template([
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "customoptions") { %> class="border-top" style="margin-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem">',
'<li id="<%= item.id %>" data-value="<%= item.value %>" <% if (item.value === "customoptions") { %> class="border-top" style="margin-top: 5px;padding-top: 5px;" <% } %> ><a tabindex="-1" type="menuitem">',
'<%= scope.getDisplayValue(item) %>',
'</a></li>',
'<% }); %>'

View file

@ -1188,23 +1188,25 @@ define([
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this.fillControls.push(this.cmbFillSrc);
var itemWidth = 28,
itemHeight = 28;
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
itemWidth: itemWidth,
itemHeight: itemHeight,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
dataHintOffset: 'big',
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'width="' + itemWidth + '" height="' + itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
].join(''))
});
this.cmbPattern.render($('#shape-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,

View file

@ -525,6 +525,10 @@ define([
visible ? this.show(): this.hide();
},
isVisible: function() {
return this.$el && this.$el.is(':visible');
},
update: function() {
var me = this;
@ -983,7 +987,7 @@ define([
return _message;
},
showStatusMessage: function(message) {
showStatusMessage: function(message, callback) {
this.statusMessage = message;
if (!this.actionWidth) {
this.actionWidth = message.length > 22 ? 166 : 140;
@ -1002,6 +1006,7 @@ define([
_.delay(function(){
me.updateTabbarBorders();
me.onTabInvisible(undefined, me.tabbar.checkInvisible(true));
callback && callback();
},30);
},
@ -1010,6 +1015,10 @@ define([
this.statusMessage = undefined;
},
getStatusLabel: function() {
return this.labelAction;
},
sheetIndexText : 'Sheet {0} of {1}',
tipZoomIn : 'Zoom In',
tipZoomOut : 'Zoom Out',

View file

@ -1106,23 +1106,25 @@ define([
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this.lockedControls.push(this.cmbFillSrc);
var itemWidth = 28,
itemHeight = 28;
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
itemWidth: itemWidth,
itemHeight: itemHeight,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
dataHintOffset: 'big',
itemTemplate: _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'width="' + itemWidth + '" height="' + itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
].join(''))
});
this.cmbPattern.render($('#textart-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,

View file

@ -384,7 +384,7 @@ define([
{caption: me.textTabFormula, action: 'formula', extcls: 'canedit', dataHintTitle: 'O'},
{caption: me.textTabData, action: 'data', extcls: 'canedit', dataHintTitle: 'D'},
undefined, undefined, undefined,
{caption: me.textTabView, action: 'view', extcls: 'canedit', dataHintTitle: 'W'}
{caption: me.textTabView, action: 'view', extcls: 'canedit', layoutname: 'toolbar-view', dataHintTitle: 'W'}
]}
);

View file

@ -58,7 +58,11 @@ define([
}
me.btnFreezePanes.menu.on('item:click', function (menu, item, e) {
me.fireEvent('viewtab:freeze', [item.value]);
if (item.value === 'shadow') {
me.fireEvent('viewtab:freezeshadow', [item.checked]);
} else {
me.fireEvent('viewtab:freeze', [item.value]);
}
});
this.chFormula.on('change', function (field, value) {
me.fireEvent('viewtab:formula', [0, value]);
@ -75,6 +79,12 @@ define([
this.cmbZoom.on('selected', function(combo, record) {
me.fireEvent('viewtab:zoom', [record.value]);
});
this.chToolbar.on('change', function (field, value) {
me.fireEvent('viewtab:showtoolbar', [field, value !== 'checked']);
});
this.chStatusbar.on('change', function (field, value) {
me.fireEvent('statusbar:setcompact', [field, value === 'checked']);
});
}
return {
@ -212,6 +222,40 @@ define([
});
this.lockedControls.push(this.chZeros);
this.btnInterfaceTheme = new Common.UI.Button({
parentEl: $host.find('#slot-btn-interface-theme'),
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon day',
caption: this.textInterfaceTheme,
menu: true,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
this.lockedControls.push(this.btnInterfaceTheme);
this.chStatusbar = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-statusbar'),
labelText: this.textCombineSheetAndStatusBars,
value : Common.localStorage.getBool('sse-compact-statusbar', true),
lock : [_set.sheetLock, _set.lostConnect, _set.coAuth, _set.editCell],
dataHint : '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.chStatusbar);
this.chToolbar = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-toolbar'),
labelText: this.textAlwaysShowToolbar,
value : !options.compactToolbar,
lock : [_set.sheetLock, _set.lostConnect, _set.coAuth, _set.editCell],
dataHint : '1',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.lockedControls.push(this.chToolbar);
$host.find('#slot-lbl-zoom').text(this.textZoom);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
@ -249,11 +293,38 @@ define([
{
caption: me.textFreezeCol,
value: Asc.c_oAscFrozenPaneAddType.firstCol
},
{ caption: '--' },
{
caption: me.textShowFrozenPanesShadow,
value: 'shadow',
checkable: true,
checked: Common.localStorage.getBool('sse-freeze-shadow', true)
}
]
}));
me.btnFreezePanes.updateHint(me.tipFreeze);
var menuItems = [],
currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId();
for (var t in Common.UI.Themes.map()) {
menuItems.push({
value: t,
caption: Common.UI.Themes.get(t).text,
checked: t === currentTheme,
checkable: true,
toggleGroup: 'interface-theme'
});
}
if (menuItems.length) {
me.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems}));
me.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) {
var value = item.value;
Common.UI.Themes.setTheme(value);
}, me));
}
setEvents.call(me);
});
},
@ -342,7 +413,11 @@ define([
textFreezeRow: 'Freeze Top Row',
textFreezeCol: 'Freeze First Column',
textUnFreeze: 'Unfreeze Panes',
textZeros: 'Show zeros'
textZeros: 'Show zeros',
textCombineSheetAndStatusBars: 'Combine sheet and status bars',
textAlwaysShowToolbar: 'Always show toolbar',
textInterfaceTheme: 'Interface theme',
textShowFrozenPanesShadow: 'Show frozen panes shadow'
}
}()), SSE.Views.ViewTab || {}));
});

View file

@ -1056,6 +1056,7 @@
"SSE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"SSE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"SSE.Controllers.Main.textReconnect": "Connection is restored",
"SSE.Controllers.Print.strAllSheets": "All Sheets",
"SSE.Controllers.Print.textFirstCol": "First column",
"SSE.Controllers.Print.textFirstRow": "First row",
@ -1075,6 +1076,7 @@
"SSE.Controllers.Statusbar.textSheetViewTipFilters": "You are in Sheet View mode. Filters are visible only to you and those who are still in this view.",
"SSE.Controllers.Statusbar.warnDeleteSheet": "The selected worksheets might contain data. Are you sure you want to proceed?",
"SSE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"SSE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Please check connection settings.",
"SSE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
"SSE.Controllers.Toolbar.errorComboSeries": "To create a combination chart, select at least two series of data.",
"SSE.Controllers.Toolbar.errorMaxRows": "ERROR! The maximum number of data series per chart is 255",
@ -3594,6 +3596,10 @@
"SSE.Views.ViewTab.tipCreate": "Create sheet view",
"SSE.Views.ViewTab.tipFreeze": "Freeze panes",
"SSE.Views.ViewTab.tipSheetView": "Sheet view",
"SSE.Views.ViewTab.textCombineSheetAndStatusBars": "Combine sheet and status bars",
"SSE.Views.ViewTab.textAlwaysShowToolbar": "Always show toolbar",
"SSE.Views.ViewTab.textInterfaceTheme": "Interface theme",
"SSE.Views.ViewTab.textShowFrozenPanesShadow": "Show frozen panes shadow",
"SSE.Views.WBProtection.hintAllowRanges": "Allow edit ranges",
"SSE.Views.WBProtection.hintProtectSheet": "Protect sheet",
"SSE.Views.WBProtection.hintProtectWB": "Protect workbook",

View file

@ -146,8 +146,3 @@
margin-right: 2px;
}
}
#slot-field-zoom {
float: left;
min-width: 46px;
}