diff --git a/Readme.md b/Readme.md
index 56395225d..747cb8437 100644
--- a/Readme.md
+++ b/Readme.md
@@ -1,25 +1,29 @@
-[](https://www.gnu.org/licenses/agpl-3.0.en.html)
-
-## web-apps
-
-The frontend for [ONLYOFFICE Document Server][2]. Builds the program interface and allows the user create, edit, save and export text, spreadsheet and presentation documents using the common interface of a document editor.
-
-## Project Information
-
-Official website: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org")
-
-Code repository: [https://github.com/ONLYOFFICE/web-apps](https://github.com/ONLYOFFICE/web-apps "https://github.com/ONLYOFFICE/web-apps")
-
-SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.onlyoffice.com")
-
-## User Feedback and Support
-
-If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [dev.onlyoffice.org][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3].
-
- [1]: http://dev.onlyoffice.org
- [2]: https://github.com/ONLYOFFICE/DocumentServer
- [3]: http://stackoverflow.com/questions/tagged/onlyoffice
-
-## License
-
-web-apps is released under an GNU AGPL v3.0 license. See the LICENSE file for more information.
+[](https://www.gnu.org/licenses/agpl-3.0.en.html)
+
+## web-apps
+
+The frontend for [ONLYOFFICE Document Server][2]. Builds the program interface and allows the user create, edit, save and export text, spreadsheet and presentation documents using the common interface of a document editor.
+
+## Previos versions
+
+Until 2019-10-23 the repository was called web-apps-pro
+
+## Project Information
+
+Official website: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org")
+
+Code repository: [https://github.com/ONLYOFFICE/web-apps](https://github.com/ONLYOFFICE/web-apps "https://github.com/ONLYOFFICE/web-apps")
+
+SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.onlyoffice.com")
+
+## User Feedback and Support
+
+If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [dev.onlyoffice.org][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3].
+
+ [1]: http://dev.onlyoffice.org
+ [2]: https://github.com/ONLYOFFICE/DocumentServer
+ [3]: http://stackoverflow.com/questions/tagged/onlyoffice
+
+## License
+
+web-apps is released under an GNU AGPL v3.0 license. See the LICENSE file for more information.
diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js
index ed34a79cb..f70d1565f 100644
--- a/apps/api/documents/api.js
+++ b/apps/api/documents/api.js
@@ -109,7 +109,8 @@
goback: {
url: 'http://...',
text: 'Go to London',
- blank: true
+ blank: true,
+ requestClose: false // if true - goback send onRequestClose event instead opening url
},
chat: true,
comments: true,
@@ -129,7 +130,8 @@
toolbarNoTabs: false,
toolbarHideFileName: false,
reviewDisplay: 'original',
- spellcheck: true
+ spellcheck: true,
+ compatibleFeatures: false
},
plugins: {
autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'],
@@ -206,6 +208,7 @@
_config.editorConfig.canRequestSaveAs = _config.events && !!_config.events.onRequestSaveAs;
_config.editorConfig.canRequestInsertImage = _config.events && !!_config.events.onRequestInsertImage;
_config.editorConfig.canRequestMailMergeRecipients = _config.events && !!_config.events.onRequestMailMergeRecipients;
+ _config.editorConfig.canRequestCompareFile = _config.events && !!_config.events.onRequestCompareFile;
_config.frameEditorId = placeholderId;
var onMouseUp = function (evt) {
@@ -575,6 +578,13 @@
});
};
+ var _setRevisedFile = function(data) {
+ _sendCommand({
+ command: 'setRevisedFile',
+ data: data
+ });
+ };
+
var _processMouse = function(evt) {
var r = iframe.getBoundingClientRect();
var data = {
@@ -619,7 +629,8 @@
showSharingSettings : _showSharingSettings,
setSharingSettings : _setSharingSettings,
insertImage : _insertImage,
- setMailMergeRecipients: _setMailMergeRecipients
+ setMailMergeRecipients: _setMailMergeRecipients,
+ setRevisedFile : _setRevisedFile
}
};
@@ -730,8 +741,14 @@
}
}
+ var userAgent = navigator.userAgent.toLowerCase(),
+ check = function(regex){ return regex.test(userAgent); },
+ isIE = !check(/opera/) && (check(/msie/) || check(/trident/) || check(/edge/)),
+ isChrome = !isIE && check(/\bchrome\b/),
+ isSafari_mobile = !isIE && !isChrome && check(/safari/) && (navigator.maxTouchPoints>0);
+
path += app + "/";
- path += config.type === "mobile"
+ path += (config.type === "mobile" || isSafari_mobile)
? "mobile"
: config.type === "embedded"
? "embed"
@@ -770,9 +787,19 @@
}
}
+ if (config.editorConfig && (config.editorConfig.mode == 'editdiagram' || config.editorConfig.mode == 'editmerge'))
+ params += "&internal=true";
+
if (config.frameEditorId)
params += "&frameEditorId=" + config.frameEditorId;
-
+
+ if (config.editorConfig && config.editorConfig.mode == 'view' ||
+ config.document && config.document.permissions && (config.document.permissions.edit === false && !config.document.permissions.review ))
+ params += "&mode=view";
+
+ if (config.editorConfig && config.editorConfig.customization && !!config.editorConfig.customization.compactHeader)
+ params += "&compact=true";
+
return params;
}
@@ -788,7 +815,8 @@
iframe.allowFullscreen = true;
iframe.setAttribute("allowfullscreen",""); // for IE11
iframe.setAttribute("onmousewheel",""); // for Safari on Mac
-
+ iframe.setAttribute("allow", "autoplay");
+
if (config.type == "mobile")
{
iframe.style.position = "fixed";
diff --git a/apps/common/Gateway.js b/apps/common/Gateway.js
index b8e90ebad..6d45aa3a7 100644
--- a/apps/common/Gateway.js
+++ b/apps/common/Gateway.js
@@ -118,6 +118,10 @@ if (Common === undefined) {
'setMailMergeRecipients': function(data) {
$me.trigger('setmailmergerecipients', data);
+ },
+
+ 'setRevisedFile': function(data) {
+ $me.trigger('setrevisedfile', data);
}
};
@@ -308,6 +312,10 @@ if (Common === undefined) {
_postMessage({event:'onRequestMailMergeRecipients'})
},
+ requestCompareFile: function () {
+ _postMessage({event:'onRequestCompareFile'})
+ },
+
on: function(event, handler){
var localHandler = function(event, data){
handler.call(me, data)
diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js
index 6bca49533..78ee15724 100644
--- a/apps/common/main/lib/component/Button.js
+++ b/apps/common/main/lib/component/Button.js
@@ -712,7 +712,7 @@ define([
this.caption = caption;
if (this.rendered) {
- var captionNode = this.cmpEl.find('button:first > .caption').addBack().filter('button > .caption');
+ var captionNode = this.cmpEl.find('.caption');
if (captionNode.length > 0) {
captionNode.text(caption);
diff --git a/apps/common/main/lib/component/Calendar.js b/apps/common/main/lib/component/Calendar.js
new file mode 100644
index 000000000..71b282a13
--- /dev/null
+++ b/apps/common/main/lib/component/Calendar.js
@@ -0,0 +1,491 @@
+/*
+ *
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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
+ *
+*/
+if (Common === undefined)
+ var Common = {};
+
+define([
+ 'common/main/lib/component/BaseView',
+ 'common/main/lib/util/utils'
+], function () {
+ 'use strict';
+
+ Common.UI.Calendar = Common.UI.BaseView.extend(_.extend({
+
+ template :
+ _.template([
+ '
',
+ '
',
+ '
',
+ '',
+ '',
+ '',
+ '
',
+ '
',
+ '
',
+ '
',
+ '',
+ '
'
+ ].join('')),
+
+ options: {
+ date: undefined,
+ firstday: 0 // 0 - sunday, 1 - monday
+ },
+
+ initialize : function(options) {
+ Common.UI.BaseView.prototype.initialize.call(this, options);
+
+ var me = this;
+
+ this.monthNames = [this.textJanuary, this.textFebruary, this.textMarch, this.textApril, this.textMay, this.textJune, this.textJuly, this.textAugust, this.textSeptember, this.textOctober, this.textNovember, this.textDecember];
+ this.dayNamesShort = [this.textShortSunday, this.textShortMonday, this.textShortTuesday, this.textShortWednesday, this.textShortThursday, this.textShortFriday, this.textShortSaturday];
+ this.monthShortNames = [this.textShortJanuary, this.textShortFebruary, this.textShortMarch, this.textShortApril, this.textShortMay, this.textShortJune, this.textShortJuly, this.textShortAugust, this.textShortSeptember, this.textShortOctober, this.textShortNovember, this.textShortDecember];
+
+ me.options.date = options.date;
+ if (!_.isUndefined(options.firstday) && (options.firstday === 0 || options.firstday === 1)) {
+ me.options.firstday = options.firstday;
+ }
+
+ me.enableKeyEvents= me.options.enableKeyEvents;
+
+ me._state = undefined; // 0 - month, 1 - months, 2 - years
+
+ me.render();
+ },
+
+ render: function () {
+ var me = this;
+ me.cmpEl = me.$el || $(this.el);
+ me.cmpEl.html(this.template());
+
+ me.currentDate = me.options.date || new Date();
+
+ me.btnPrev = new Common.UI.Button({
+ cls: '',
+ iconCls: 'arrow-prev img-commonctrl'
+ });
+ me.btnPrev.render(me.cmpEl.find('#prev-arrow'));
+ me.btnPrev.on('click', _.bind(me.onClickPrev, me));
+
+ me.btnNext = new Common.UI.Button({
+ cls: '',
+ iconCls: 'arrow-next img-commonctrl'
+ });
+ me.btnNext.render(me.cmpEl.find('#next-arrow'));
+ me.btnNext.on('click', _.bind(me.onClickNext, me));
+
+ me.cmpEl.on('keydown', function(e) {
+ me.trigger('calendar:keydown', me, e);
+ });
+
+ me.renderMonth(me.currentDate);
+
+ this.trigger('render:after', this);
+ return this;
+ },
+
+ onClickPrev: function () {
+ var me = this;
+ if (me._state === 0) {
+ var d = new Date(me.currentDate);
+ d.setMonth(d.getMonth() - 1);
+ if (d.getFullYear() > 0) {
+ me.renderMonth(d);
+ }
+ } else if (me._state === 1) {
+ var d = new Date(me.currentDate);
+ d.setFullYear(d.getFullYear() - 1);
+ if (d.getFullYear() > 0) {
+ me.renderMonths(d);
+ }
+ } else if (me._state === 2) {
+ var year = me.currentDate.getFullYear(),
+ newYear;
+ if (year % 10 !== 0) {
+ newYear = String(year);
+ newYear = Number(newYear.slice(0, -1) + '0') - 1;
+ } else {
+ newYear = year - 1;
+ }
+ if (newYear > 0) {
+ me.currentDate.setFullYear(newYear);
+ me.renderYears(newYear);
+ }
+ }
+ },
+
+ onClickNext: function () {
+ var me = this;
+ if (me._state === 0) {
+ var d = new Date(me.currentDate);
+ d.setMonth(d.getMonth() + 1);
+ if (d.getFullYear() > 0) {
+ me.renderMonth(d);
+ }
+ } else if (me._state === 1) {
+ var d = new Date(me.currentDate);
+ d.setFullYear(d.getFullYear() + 1);
+ if (d.getFullYear() > 0) {
+ me.renderMonths(d);
+ }
+ } else if (me._state === 2) {
+ var year = me.currentDate.getFullYear(),
+ newYear;
+ if (year % 10 !== 9) {
+ newYear = String(year);
+ newYear = Number(newYear.slice(0, -1) + '9') + 1;
+ } else {
+ newYear = year + 1;
+ }
+ if (newYear > 0) {
+ me.currentDate.setFullYear(newYear);
+ me.renderYears(newYear);
+ }
+ }
+ },
+
+ renderYears: function (year) {
+ var me = this,
+ year = _.isNumber(year) ? year : (me.currentDate ? me.currentDate.getFullYear() : new Date().getFullYear());
+
+ me._state = 2;
+
+ var firstYear = year,
+ lastYear = year;
+ if ((firstYear % 10) !== 0) {
+ var strYear = String(year);
+ firstYear = Number(strYear.slice(0, -1) + '0');
+ }
+ if ((lastYear % 10) !== 9) {
+ var strYear = String(year);
+ lastYear = Number(strYear.slice(0, -1) + '9');
+ }
+
+ me.topTitle = _.template([
+ ''
+ ].join(''));
+ me.cmpEl.find('.calendar-header .title').html(me.topTitle);
+
+ me.bottomTitle = _.template([
+ ''
+ ].join(''));
+ me.cmpEl.find('.calendar-header .bottom-row').html(me.bottomTitle);
+
+ var arrYears = [];
+ var tmpYear = firstYear - 3;
+
+ for (var i = 0; i < 16; i++) {
+ arrYears.push({
+ year: (tmpYear > 0) ? tmpYear : '',
+ isCurrentDecade: ((tmpYear >= firstYear) && (tmpYear <= lastYear)) ? true : false,
+ disabled: (tmpYear > 0) ? false : true,
+ selected: (_.isDate(me.selectedDate)) ?
+ (tmpYear === me.selectedDate.getFullYear()) :
+ (tmpYear === new Date().getFullYear())
+ });
+ tmpYear++;
+ }
+
+ if (!me.yearPicker) {
+ me.yearPicker = new Common.UI.DataView({
+ el: me.cmpEl.find('.calendar-content'),
+ store: new Common.UI.DataViewStore(arrYears),
+ itemTemplate: _.template('
<%= year %>
')
+ });
+ me.yearPicker.on('item:click', function (picker, item, record, e) {
+ var year = record.get('year'),
+ date = new Date();
+ date.setFullYear(year);
+ me.renderMonths(date);
+ });
+ me.enableKeyEvents && this.yearPicker.on('item:keydown', function(view, record, e) {
+ if (e.keyCode==Common.UI.Keys.ESC) {
+ Common.NotificationCenter.trigger('dataview:blur');
+ }
+ });
+ } else
+ me.yearPicker.store.reset(arrYears);
+
+ me.enableKeyEvents && _.delay(function() {
+ me.monthPicker.cmpEl.find('.dataview').focus();
+ }, 10);
+ },
+
+ renderMonths: function (date) {
+ var me = this,
+ curDate = (_.isDate(date)) ? date : (me.currentDate ? me.currentDate : new Date()),
+ year = curDate.getFullYear();
+
+ me._state = 1;
+ me.currentDate = curDate;
+
+ // Number of year
+ me.topTitle = _.template([
+ ''
+ ].join(''));
+ me.cmpEl.find('.calendar-header .title').html(me.topTitle);
+ me.cmpEl.find('.calendar-header .title').off();
+ me.cmpEl.find('.calendar-header .title').on('click', _.bind(me.renderYears, me));
+
+ me.bottomTitle = _.template([
+ ''
+ ].join(''));
+ me.cmpEl.find('.calendar-header .bottom-row').html(me.bottomTitle);
+
+ var arrMonths = [];
+ var today = new Date();
+
+ for (var ind = 0; ind < 12; ind++) {
+ arrMonths.push({
+ indexMonth: ind,
+ nameMonth: me.monthShortNames[ind],
+ year: year,
+ curYear: true,
+ isCurrentMonth: (ind === curDate.getMonth()),
+ selected: (_.isDate(me.selectedDate)) ?
+ (ind === me.selectedDate.getMonth() && year === me.selectedDate.getFullYear()) :
+ (ind === today.getMonth() && year === today.getFullYear())
+ });
+ }
+ year = year + 1;
+ for (var ind = 0; ind < 4; ind++) {
+ arrMonths.push({
+ indexMonth: ind,
+ nameMonth: me.monthShortNames[ind],
+ year: year,
+ curYear: false,
+ selected: (_.isDate(me.selectedDate)) ?
+ (ind === me.selectedDate.getMonth() && year === me.selectedDate.getFullYear()) :
+ (ind === today.getMonth() && year === today.getFullYear())
+ });
+ }
+
+ if (!me.monthsPicker) {
+ me.monthsPicker = new Common.UI.DataView({
+ el: me.cmpEl.find('.calendar-content'),
+ store: new Common.UI.DataViewStore(arrMonths),
+ itemTemplate: _.template('
<%= nameMonth %>
')
+ });
+ me.monthsPicker.on('item:click', function (picker, item, record, e) {
+ var month = record.get('indexMonth'),
+ year = record.get('year'),
+ date = new Date();
+ date.setFullYear(year, month);
+ me.renderMonth(date);
+ });
+ me.enableKeyEvents && this.monthsPicker.on('item:keydown', function(view, record, e) {
+ if (e.keyCode==Common.UI.Keys.ESC) {
+ Common.NotificationCenter.trigger('dataview:blur');
+ }
+ });
+ } else
+ me.monthsPicker.store.reset(arrMonths);
+
+ me.enableKeyEvents && _.delay(function() {
+ me.monthPicker.cmpEl.find('.dataview').focus();
+ }, 10);
+ },
+
+ renderMonth: function (date) {
+ var me = this;
+ me._state = 0;
+ var firstDay = me.options.firstday;
+
+ // Current date
+ var curDate = date || new Date(),
+ curMonth = curDate.getMonth(),
+ curIndexDayInWeek = curDate.getDay(),
+ curNumberDayInMonth = curDate.getDate(),
+ curYear = curDate.getFullYear();
+
+ me.currentDate = curDate;
+
+ // Name month
+ me.topTitle = _.template([
+ '
' +
diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js
new file mode 100644
index 000000000..8f783c8d0
--- /dev/null
+++ b/apps/common/main/lib/view/ListSettingsDialog.js
@@ -0,0 +1,293 @@
+/*
+ *
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * 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
+ *
+ */
+
+/**
+ * ListSettingsDialog.js
+ *
+ * Created by Julia Radzhabova on 30.10.2019
+ * Copyright (c) 2019 Ascensio System SIA. All rights reserved.
+ *
+ */
+
+if (Common === undefined)
+ var Common = {};
+
+define([
+ 'common/main/lib/component/Window',
+ 'common/main/lib/component/MetricSpinner',
+ 'common/main/lib/component/ThemeColorPalette',
+ 'common/main/lib/component/ColorButton',
+ 'common/main/lib/view/SymbolTableDialog'
+], function () { 'use strict';
+
+ Common.Views.ListSettingsDialog = Common.UI.Window.extend(_.extend({
+ options: {
+ type: 0, // 0 - markers, 1 - numbers
+ width: 230,
+ height: 200,
+ style: 'min-width: 240px;',
+ cls: 'modal-dlg',
+ split: false,
+ buttons: ['ok', 'cancel']
+ },
+
+ initialize : function(options) {
+ this.type = options.type || 0;
+
+ _.extend(this.options, {
+ title: this.txtTitle
+ }, options || {});
+
+ this.template = [
+ '
');
}
Common.Controllers.Desktop.init(this.appOptions);
@@ -596,7 +601,7 @@ define([
docId: version.key,
docIdPrev: docIdPrev,
selected: false,
- canRestore: this.appOptions.canHistoryRestore,
+ canRestore: this.appOptions.canHistoryRestore && this.appOptions.canDownload,
isRevision: false,
isVisible: true,
serverVersion: version.serverVersion
@@ -646,11 +651,16 @@ define([
goBack: function(current) {
if ( !Common.Controllers.Desktop.process('goback') ) {
- var href = this.appOptions.customization.goback.url;
- if (!current && this.appOptions.customization.goback.blank!==false) {
- window.open(href, "_blank");
+ if (this.appOptions.customization.goback.requestClose && this.appOptions.canRequestClose) {
+ Common.Gateway.requestClose();
+ // Common.Controllers.Desktop.requestClose();
} else {
- parent.location.href = href;
+ var href = this.appOptions.customization.goback.url;
+ if (!current && this.appOptions.customization.goback.blank!==false) {
+ window.open(href, "_blank");
+ } else {
+ parent.location.href = href;
+ }
}
}
},
@@ -1057,6 +1067,7 @@ define([
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
Common.Gateway.documentReady();
+ $('#editor-container').css('overflow', '');
$('.doc-placeholder').remove();
},
@@ -1155,7 +1166,6 @@ define([
this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.isReviewOnly = this.permissions.review === true && this.permissions.edit === false;
this.appOptions.canRequestEditRights = this.editorConfig.canRequestEditRights;
- this.appOptions.canRequestClose = this.editorConfig.canRequestClose;
this.appOptions.canEdit = (this.permissions.edit !== false || this.permissions.review === true) && // can edit or review
(this.editorConfig.canRequestEditRights || this.editorConfig.mode !== 'view') && // if mode=="view" -> canRequestEditRights must be defined
(!this.appOptions.isReviewOnly || this.appOptions.canLicense); // if isReviewOnly==true -> canLicense must be true
@@ -1263,13 +1273,13 @@ define([
var me = this,
application = this.getApplication(),
reviewController = application.getController('Common.Controllers.ReviewChanges');
- reviewController.setMode(me.appOptions).setConfig({config: me.editorConfig}, me.api);
+ reviewController.setMode(me.appOptions).setConfig({config: me.editorConfig}, me.api).loadDocument({doc:me.document});
if (this.appOptions.isEdit || this.appOptions.isRestrictedEdit) { // set api events for toolbar in the Restricted Editing mode
var toolbarController = application.getController('Toolbar');
toolbarController && toolbarController.setApi(me.api);
- if (this.appOptions.isRestrictedEdit) return;
+ if (!this.appOptions.isEdit) return;
var rightmenuController = application.getController('RightMenu'),
fontsControllers = application.getController('Common.Controllers.Fonts');
@@ -1387,6 +1397,18 @@ define([
config.msg = this.uploadImageFileCountMessage;
break;
+ case Asc.c_oAscError.ID.UplDocumentSize:
+ config.msg = this.uploadDocSizeMessage;
+ break;
+
+ case Asc.c_oAscError.ID.UplDocumentExt:
+ config.msg = this.uploadDocExtMessage;
+ break;
+
+ case Asc.c_oAscError.ID.UplDocumentFileCount:
+ config.msg = this.uploadDocFileCountMessage;
+ break;
+
case Asc.c_oAscError.ID.SplitCellMaxRows:
config.msg = this.splitMaxRowsErrorText.replace('%1', errData.get_Value());
break;
@@ -1450,7 +1472,7 @@ define([
break;
case Asc.c_oAscError.ID.Warning:
- config.msg = this.errorConnectToServer.replace('%1', '{{API_URL_EDITING_CALLBACK}}');
+ config.msg = this.errorConnectToServer;
config.closable = false;
break;
@@ -1499,6 +1521,11 @@ define([
config.msg = this.errorFileSizeExceed;
break;
+ case Asc.c_oAscError.ID.UpdateVersion:
+ config.msg = this.errorUpdateVersionOnDisconnect;
+ config.maxwidth = 600;
+ break;
+
default:
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
break;
@@ -2076,7 +2103,8 @@ define([
var filemenu = this.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file');
filemenu.loadDocument({doc:this.document});
- filemenu.panels['info'].updateInfo(this.document);
+ filemenu.panels && filemenu.panels['info'] && filemenu.panels['info'].updateInfo(this.document);
+ this.getApplication().getController('Common.Controllers.ReviewChanges').loadDocument({doc:this.document});
Common.Gateway.metaChange(meta);
},
@@ -2159,7 +2187,7 @@ define([
uploadImageTextText: 'Uploading image...',
savePreparingText: 'Preparing to save',
savePreparingTitle: 'Preparing to save. Please wait...',
- uploadImageSizeMessage: 'Maximium image size limit exceeded.',
+ uploadImageSizeMessage: 'Maximum image size limit exceeded.',
uploadImageExtMessage: 'Unknown image format.',
uploadImageFileCountMessage: 'No images uploaded.',
reloadButtonText: 'Reload Page',
@@ -2219,15 +2247,14 @@ define([
sendMergeTitle: 'Sending Merge',
sendMergeText: 'Sending Merge...',
txtArt: 'Your text here',
- errorConnectToServer: 'The document could not be saved. Please check connection settings or contact your administrator. When you click the \'OK\' button, you will be prompted to download the document.
' +
- 'Find more information about connecting Document Server here',
+ errorConnectToServer: 'The document could not be saved. Please check connection settings or contact your administrator. When you click the \'OK\' button, you will be prompted to download the document.',
textTryUndoRedo: 'The Undo/Redo functions are disabled for the Fast co-editing mode. Click the \'Strict mode\' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.',
textStrict: 'Strict mode',
txtErrorLoadHistory: 'Loading history failed',
textBuyNow: 'Visit website',
textNoLicenseTitle: '%1 connection limitation',
textContactUs: 'Contact sales',
- errorViewerDisconnect: 'Connection is lost. You can still view the document, but will not be able to download or print until the connection is restored.',
+ errorViewerDisconnect: 'Connection is lost. You can still view the document, but will not be able to download or print until the connection is restored and page is reloaded.',
warnLicenseExp: 'Your license has expired. Please update your license and refresh the page.',
titleLicenseExp: 'License expired',
openErrorText: 'An error has occurred while opening the file',
@@ -2475,7 +2502,11 @@ define([
errorFileSizeExceed: 'The file size exceeds the limitation set for your server. Please contact your Document Server administrator for details.',
txtMainDocOnly: 'Error! Main Document Only.',
txtNotValidBookmark: 'Error! Not a valid bookmark self-reference.',
- txtNoText: 'Error! No text of specified style in document.'
+ txtNoText: 'Error! No text of specified style in document.',
+ uploadDocSizeMessage: 'Maximum document size limit exceeded.',
+ uploadDocExtMessage: 'Unknown document format.',
+ uploadDocFileCountMessage: 'No documents uploaded.',
+ errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed. Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.'
}
})(), DE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index 3f9caafcf..eb5a1f826 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -47,6 +47,7 @@ define([
'common/main/lib/view/ImageFromUrlDialog',
'common/main/lib/view/InsertTableDialog',
'common/main/lib/view/SelectFileDlg',
+ 'common/main/lib/view/SymbolTableDialog',
'common/main/lib/util/define',
'documenteditor/main/app/view/Toolbar',
'documenteditor/main/app/view/DropcapSettingsAdvanced',
@@ -56,7 +57,8 @@ define([
'documenteditor/main/app/controller/PageLayout',
'documenteditor/main/app/view/CustomColumnsDialog',
'documenteditor/main/app/view/ControlSettingsDialog',
- 'documenteditor/main/app/view/WatermarkSettingsDialog'
+ 'documenteditor/main/app/view/WatermarkSettingsDialog',
+ 'documenteditor/main/app/view/CompareSettingsDialog'
], function () {
'use strict';
@@ -323,6 +325,7 @@ define([
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this));
toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this));
+ toolbar.btnInsertSymbol.on('click', _.bind(this.onInsertSymbolClick, this));
toolbar.mnuNoControlsColor.on('click', _.bind(this.onNoControlsColor, this));
toolbar.mnuControlsColorPicker.on('select', _.bind(this.onSelectControlsColor, this));
Common.Gateway.on('insertimage', _.bind(this.insertImage, this));
@@ -377,7 +380,10 @@ define([
this.api.asc_registerCallback('asc_onContextMenu', _.bind(this.onContextMenu, this));
this.api.asc_registerCallback('asc_onShowParaMarks', _.bind(this.onShowParaMarks, this));
this.api.asc_registerCallback('asc_onChangeSdtGlobalSettings', _.bind(this.onChangeSdtGlobalSettings, this));
+ this.api.asc_registerCallback('asc_onTextLanguage', _.bind(this.onTextLanguage, this));
Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this));
+ this.api.asc_registerCallback('asc_onTableDrawModeChanged', _.bind(this.onTableDraw, this));
+ this.api.asc_registerCallback('asc_onTableEraseModeChanged', _.bind(this.onTableErase, this));
} else if (this.mode.isRestrictedEdit) {
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObjectRestrictedEdit, this));
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
@@ -640,7 +646,8 @@ define([
var i = -1, type,
paragraph_locked = false,
header_locked = false,
- image_locked = false;
+ image_locked = false,
+ in_image = false;
while (++i < selectedObjects.length) {
type = selectedObjects[i].get_ObjectType();
@@ -650,11 +657,15 @@ define([
} else if (type === Asc.c_oAscTypeSelectElement.Header) {
header_locked = selectedObjects[i].get_ObjectValue().get_Locked();
} else if (type === Asc.c_oAscTypeSelectElement.Image) {
+ in_image = true;
image_locked = selectedObjects[i].get_ObjectValue().get_Locked();
}
}
var need_disable = !this.api.can_AddQuotedComment() || paragraph_locked || header_locked || image_locked;
+ if (this.mode.compatibleFeatures) {
+ need_disable = need_disable || in_image;
+ }
if ( this.btnsComment && this.btnsComment.length > 0 )
this.btnsComment.setDisabled(need_disable);
},
@@ -716,7 +727,11 @@ define([
if (sh)
this.onParagraphColor(sh);
- var need_disable = paragraph_locked || header_locked;
+ var rich_del_lock = (frame_pr) ? !frame_pr.can_DeleteBlockContentControl() : true,
+ rich_edit_lock = (frame_pr) ? !frame_pr.can_EditBlockContentControl() : true,
+ plain_del_lock = (frame_pr) ? !frame_pr.can_DeleteInlineContentControl() : true,
+ plain_edit_lock = (frame_pr) ? !frame_pr.can_EditInlineContentControl() : true;
+ var need_disable = paragraph_locked || header_locked || rich_edit_lock || plain_edit_lock;
if (this._state.prcontrolsdisable != need_disable) {
if (this._state.activated) this._state.prcontrolsdisable = need_disable;
@@ -730,15 +745,18 @@ define([
lock_type = (in_control&&control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked,
control_plain = (in_control&&control_props) ? (control_props.get_ContentControlType()==Asc.c_oAscSdtLevelType.Inline) : false;
(lock_type===undefined) && (lock_type = Asc.c_oAscSdtLockType.Unlocked);
+ var content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked;
- if (!paragraph_locked && !header_locked) {
- toolbar.btnContentControls.menu.items[0].setDisabled(control_plain || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked);
- toolbar.btnContentControls.menu.items[1].setDisabled(control_plain || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked);
- toolbar.btnContentControls.menu.items[3].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked);
- toolbar.btnContentControls.menu.items[5].setDisabled(!in_control);
+ toolbar.btnContentControls.setDisabled(paragraph_locked || header_locked);
+ if (!(paragraph_locked || header_locked)) {
+ var control_disable = control_plain || content_locked;
+ for (var i=0; i<7; i++)
+ toolbar.btnContentControls.menu.items[i].setDisabled(control_disable);
+ toolbar.btnContentControls.menu.items[8].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked);
+ toolbar.btnContentControls.menu.items[10].setDisabled(!in_control);
}
- var need_text_disable = paragraph_locked || header_locked || in_chart;
+ var need_text_disable = paragraph_locked || header_locked || in_chart || rich_edit_lock || plain_edit_lock;
if (this._state.textonlycontrolsdisable != need_text_disable) {
if (this._state.activated) this._state.textonlycontrolsdisable = need_text_disable;
if (!need_disable) {
@@ -746,7 +764,7 @@ define([
item.setDisabled(need_text_disable);
}, this);
}
- toolbar.btnCopyStyle.setDisabled(need_text_disable);
+ // toolbar.btnCopyStyle.setDisabled(need_text_disable);
toolbar.btnClearStyle.setDisabled(need_text_disable);
}
@@ -772,22 +790,22 @@ define([
if ( !toolbar.btnDropCap.isDisabled() )
toolbar.mnuDropCapAdvanced.setDisabled(disable_dropcapadv);
- need_disable = !can_add_table || header_locked || in_equation || control_plain;
+ need_disable = !can_add_table || header_locked || in_equation || control_plain || rich_edit_lock || plain_edit_lock || rich_del_lock || plain_del_lock;
toolbar.btnInsertTable.setDisabled(need_disable);
need_disable = toolbar.mnuPageNumCurrentPos.isDisabled() && toolbar.mnuPageNumberPosPicker.isDisabled() || control_plain;
toolbar.mnuInsertPageNum.setDisabled(need_disable);
var in_footnote = this.api.asc_IsCursorInFootnote();
- need_disable = paragraph_locked || header_locked || in_header || in_image || in_equation && !btn_eq_state || in_footnote || in_control;
+ need_disable = paragraph_locked || header_locked || in_header || in_image || in_equation && !btn_eq_state || in_footnote || in_control || rich_edit_lock || plain_edit_lock || rich_del_lock;
toolbar.btnsPageBreak.setDisabled(need_disable);
toolbar.btnBlankPage.setDisabled(need_disable);
- need_disable = paragraph_locked || header_locked || in_equation || control_plain;
+ need_disable = paragraph_locked || header_locked || in_equation || control_plain || content_locked;
toolbar.btnInsertShape.setDisabled(need_disable);
toolbar.btnInsertText.setDisabled(need_disable);
- need_disable = paragraph_locked || header_locked || in_para && !can_add_image || in_equation || control_plain;
+ need_disable = paragraph_locked || header_locked || in_para && !can_add_image || in_equation || control_plain || rich_del_lock || plain_del_lock || content_locked;
toolbar.btnInsertImage.setDisabled(need_disable);
toolbar.btnInsertTextArt.setDisabled(need_disable || in_footnote);
@@ -796,26 +814,31 @@ define([
this._state.in_chart = in_chart;
}
- need_disable = in_chart && image_locked || !in_chart && need_disable || control_plain;
+ need_disable = in_chart && image_locked || !in_chart && need_disable || control_plain || rich_del_lock || plain_del_lock || content_locked;
toolbar.btnInsertChart.setDisabled(need_disable);
- need_disable = paragraph_locked || header_locked || in_chart || !can_add_image&&!in_equation || control_plain;
+ need_disable = paragraph_locked || header_locked || in_chart || !can_add_image&&!in_equation || control_plain || rich_edit_lock || plain_edit_lock || rich_del_lock || plain_del_lock;
toolbar.btnInsertEquation.setDisabled(need_disable);
- need_disable = paragraph_locked || header_locked || in_equation;
+ toolbar.btnInsertSymbol.setDisabled(!in_para || paragraph_locked || header_locked || rich_edit_lock || plain_edit_lock || rich_del_lock || plain_del_lock);
+
+ need_disable = paragraph_locked || header_locked || in_equation || rich_edit_lock || plain_edit_lock;
toolbar.btnSuperscript.setDisabled(need_disable);
toolbar.btnSubscript.setDisabled(need_disable);
toolbar.btnEditHeader.setDisabled(in_equation);
- need_disable = paragraph_locked || header_locked || in_image || control_plain;
+ need_disable = paragraph_locked || header_locked || in_image || control_plain || rich_edit_lock || plain_edit_lock;
if (need_disable != toolbar.btnColumns.isDisabled())
toolbar.btnColumns.setDisabled(need_disable);
if (toolbar.listStylesAdditionalMenuItem && (frame_pr===undefined) !== toolbar.listStylesAdditionalMenuItem.isDisabled())
toolbar.listStylesAdditionalMenuItem.setDisabled(frame_pr===undefined);
- need_disable = !this.api.can_AddQuotedComment() || paragraph_locked || header_locked || image_locked;
+ need_disable = !this.api.can_AddQuotedComment() || paragraph_locked || header_locked || image_locked || rich_del_lock || rich_edit_lock || plain_del_lock || plain_edit_lock;
+ if (this.mode.compatibleFeatures) {
+ need_disable = need_disable || in_image;
+ }
if ( this.btnsComment && this.btnsComment.length > 0 )
this.btnsComment.setDisabled(need_disable);
@@ -829,6 +852,13 @@ define([
this.modeAlwaysSetStyle = false;
},
+ onTableDraw: function(v) {
+ this.toolbar.mnuInsertTable && this.toolbar.mnuInsertTable.items[2].setChecked(!!v, true);
+ },
+ onTableErase: function(v) {
+ this.toolbar.mnuInsertTable && this.toolbar.mnuInsertTable.items[3].setChecked(!!v, true);
+ },
+
onApiParagraphStyleChange: function(name) {
if (this._state.prstyle != name) {
var listStyle = this.toolbar.listStyles,
@@ -1371,6 +1401,12 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
})).show();
+ } else if (item.value == 'draw') {
+ item.isChecked() && menu.items[3].setChecked(false, true);
+ this.api.SetTableDrawMode(item.isChecked());
+ } else if (item.value == 'erase') {
+ item.isChecked() && menu.items[2].setChecked(false, true);
+ this.api.SetTableEraseMode(item.isChecked());
}
},
@@ -1694,6 +1730,8 @@ define([
(new DE.Views.ControlSettingsDialog({
props: props,
api: me.api,
+ controlLang: me._state.lang,
+ interfaceLang: me.mode.lang,
handler: function(result, value) {
if (result == 'ok') {
me.api.asc_SetContentControlProperties(value, id);
@@ -1710,7 +1748,17 @@ define([
}
}
} else {
- this.api.asc_AddContentControl(item.value);
+ if (item.value == 'plain' || item.value == 'rich')
+ this.api.asc_AddContentControl((item.value=='plain') ? Asc.c_oAscSdtLevelType.Inline : Asc.c_oAscSdtLevelType.Block);
+ else if (item.value == 'picture')
+ this.api.asc_AddContentControlPicture();
+ else if (item.value == 'checkbox')
+ this.api.asc_AddContentControlCheckBox();
+ else if (item.value == 'date')
+ this.api.asc_AddContentControlDatePicker();
+ else if (item.value == 'combobox' || item.value == 'dropdown')
+ this.api.asc_AddContentControlList(item.value == 'combobox');
+
Common.component.Analytics.trackEvent('ToolBar', 'Add Content Control');
}
@@ -2435,6 +2483,31 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.toolbar, this.toolbar.btnInsertEquation);
},
+ onInsertSymbolClick: function() {
+ if (this.dlgSymbolTable && this.dlgSymbolTable.isVisible()) return;
+
+ if (this.api) {
+ var me = this;
+ me.dlgSymbolTable = new Common.Views.SymbolTableDialog({
+ api: me.api,
+ lang: me.mode.lang,
+ modal: false,
+ type: 1,
+ buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
+ handler: function(dlg, result, settings) {
+ if (result == 'ok') {
+ me.api.asc_insertSymbol(settings.font, settings.code);
+ } else
+ Common.NotificationCenter.trigger('edit:complete', me.toolbar);
+ }
+ });
+ me.dlgSymbolTable.show();
+ me.dlgSymbolTable.on('symbol:dblclick', function(cmp, result, settings) {
+ me.api.asc_insertSymbol(settings.font, settings.code);
+ });
+ }
+ },
+
onApiMathTypes: function(equation) {
this._equationTemp = equation;
var me = this;
@@ -2800,45 +2873,43 @@ define([
compactview = true;
}
- setTimeout(function () {
- me.toolbar.render(_.extend({isCompactView: compactview}, config));
+ me.toolbar.render(_.extend({isCompactView: compactview}, config));
- var tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
- var $panel = me.application.getController('Common.Controllers.ReviewChanges').createToolbarPanel();
- if ( $panel )
- me.toolbar.addTab(tab, $panel, 4);
+ var tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
+ var $panel = me.application.getController('Common.Controllers.ReviewChanges').createToolbarPanel();
+ if ( $panel )
+ me.toolbar.addTab(tab, $panel, 4);
- if ( config.isEdit ) {
- me.toolbar.setMode(config);
+ if ( config.isEdit ) {
+ me.toolbar.setMode(config);
- me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled'));
+ me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled'));
- if (!(config.customization && config.customization.compactHeader)) {
- // hide 'print' and 'save' buttons group and next separator
- me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
+ if (!(config.customization && config.customization.compactHeader)) {
+ // hide 'print' and 'save' buttons group and next separator
+ me.toolbar.btnPrint.$el.parents('.group').hide().next().hide();
- // hide 'undo' and 'redo' buttons and retrieve parent container
- var $box = me.toolbar.btnUndo.$el.hide().next().hide().parent();
+ // hide 'undo' and 'redo' buttons and retrieve parent container
+ var $box = me.toolbar.btnUndo.$el.hide().next().hide().parent();
- // move 'paste' button to the container instead of 'undo' and 'redo'
- me.toolbar.btnPaste.$el.detach().appendTo($box);
- me.toolbar.btnCopy.$el.removeClass('split');
- }
-
- if ( config.isDesktopApp ) {
- if ( config.canProtect ) {
- tab = {action: 'protect', caption: me.toolbar.textTabProtect};
- $panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
-
- if ($panel) me.toolbar.addTab(tab, $panel, 5);
- }
- }
-
- var links = me.getApplication().getController('Links');
- links.setApi(me.api).setConfig({toolbar: me});
- Array.prototype.push.apply(me.toolbar.toolbarControls, links.getView('Links').getButtons());
+ // move 'paste' button to the container instead of 'undo' and 'redo'
+ me.toolbar.btnPaste.$el.detach().appendTo($box);
+ me.toolbar.btnCopy.$el.removeClass('split');
}
- }, 0);
+
+ if ( config.isDesktopApp ) {
+ if ( config.canProtect ) {
+ tab = {action: 'protect', caption: me.toolbar.textTabProtect};
+ $panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
+
+ if ($panel) me.toolbar.addTab(tab, $panel, 5);
+ }
+ }
+
+ var links = me.getApplication().getController('Links');
+ links.setApi(me.api).setConfig({toolbar: me});
+ Array.prototype.push.apply(me.toolbar.toolbarControls, links.getView('Links').getButtons());
+ }
},
onAppReady: function (config) {
@@ -2854,6 +2925,8 @@ define([
btn.on('click', function (btn, e) {
Common.NotificationCenter.trigger('app:comment:add', 'toolbar');
});
+ if (btn.cmpEl.closest('#review-changes-panel').length>0)
+ btn.setCaption(me.toolbar.capBtnAddComment);
}, this);
}
}
@@ -2888,6 +2961,10 @@ define([
}
},
+ onTextLanguage: function(langId) {
+ this._state.lang = langId;
+ },
+
textEmptyImgUrl : 'You need to specify image URL.',
textWarning : 'Warning',
textFontSizeErr : 'The entered value is incorrect. Please enter a numeric value between 1 and 100',
@@ -3235,7 +3312,8 @@ define([
confirmAddFontName: 'The font you are going to save is not available on the current device. The text style will be displayed using one of the device fonts, the saved font will be used when it is available. Do you want to continue?',
notcriticalErrorTitle: 'Warning',
txtMarginsW: 'Left and right margins are too high for a given page wight',
- txtMarginsH: 'Top and bottom margins are too high for a given page height'
+ txtMarginsH: 'Top and bottom margins are too high for a given page height',
+ textInsert: 'Insert'
}, DE.Controllers.Toolbar || {}));
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/template/ControlSettingsDialog.template b/apps/documenteditor/main/app/template/ControlSettingsDialog.template
new file mode 100644
index 000000000..70df12159
--- /dev/null
+++ b/apps/documenteditor/main/app/template/ControlSettingsDialog.template
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/template/ImageSettings.template b/apps/documenteditor/main/app/template/ImageSettings.template
index 8abc9eaf0..9fae4b54e 100644
--- a/apps/documenteditor/main/app/template/ImageSettings.template
+++ b/apps/documenteditor/main/app/template/ImageSettings.template
@@ -14,17 +14,17 @@