From aff4b5d35cf72115e082b46d6c0cf27a6a431273 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 11 Oct 2018 14:25:53 +0300 Subject: [PATCH 001/510] [SSE] Add dialog for editing header/footer --- .../main/app/controller/Toolbar.js | 38 +- .../main/app/template/Toolbar.template | 1 + .../main/app/view/HeaderFooterDialog.js | 348 ++++++++++++++++++ .../main/app/view/Toolbar.js | 31 +- 4 files changed, 415 insertions(+), 3 deletions(-) create mode 100644 apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index cb0e1540d..1cb3213a4 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -54,7 +54,8 @@ define([ 'spreadsheeteditor/main/app/view/NamedRangePasteDlg', 'spreadsheeteditor/main/app/view/NameManagerDlg', 'spreadsheeteditor/main/app/view/FormatSettingsDialog', - 'spreadsheeteditor/main/app/view/PageMarginsDialog' + 'spreadsheeteditor/main/app/view/PageMarginsDialog', + 'spreadsheeteditor/main/app/view/HeaderFooterDialog' ], function () { 'use strict'; SSE.Controllers.Toolbar = Backbone.Controller.extend(_.extend({ @@ -365,6 +366,7 @@ define([ toolbar.btnImgAlign.menu.on('item:click', _.bind(this.onImgAlignSelect, this)); toolbar.btnImgForward.on('click', this.onImgArrangeSelect.bind(this, 'forward')); toolbar.btnImgBackward.on('click', this.onImgArrangeSelect.bind(this, 'backward')); + toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderClick, this)); this.onSetupCopyStyleButton(); } @@ -3298,6 +3300,40 @@ define([ this.toolbar.btnPrintArea.menu.items[2].setVisible(this.api.asc_CanAddPrintArea()); }, + onEditHeaderClick: function(menu, item) { + var me = this; + if (_.isUndefined(me.fontStore)) { + me.fontStore = new Common.Collections.Fonts(); + var fonts = me.toolbar.cmbFontName.store.toJSON(); + var arr = []; + _.each(fonts, function(font, index){ + if (!font.cloneid) { + arr.push(_.clone(font)); + } + }); + me.fontStore.add(arr); + } + + var win = new SSE.Views.HeaderFooterDialog({ + api: me.api, + fontStore: me.fontStore, + type: item.value, + handler: function(dlg, result) { + if (result == 'ok') { + var props = dlg.getSettings(); + // if (item.value == 'header') + // me.api.asc_editHeader(props); + // else + // me.api.asc_editFooter(props); + } + Common.NotificationCenter.trigger('edit:complete'); + } + }); + win.show(); + + Common.NotificationCenter.trigger('edit:complete', this.toolbar); + }, + textEmptyImgUrl : 'You need to specify image URL.', warnMergeLostData : 'Operation can destroy data in the selected cells.
Continue?', textWarning : 'Warning', diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template index d6054321a..69e985163 100644 --- a/apps/spreadsheeteditor/main/app/template/Toolbar.template +++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template @@ -142,6 +142,7 @@ +
diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js new file mode 100644 index 000000000..df546246f --- /dev/null +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -0,0 +1,348 @@ +/* + * + * (c) Copyright Ascensio System Limited 2010-2018 + * + * 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 Lubanas st. 125a-25, Riga, Latvia, + * EU, LV-1021. + * + * 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 + * +*/ +/** + * HeaderFooterDialog.js + * + * Created by Julia Radzhabova on 10/111/18 + * Copyright (c) 2018 Ascensio System SIA. All rights reserved. + * + */ + + +define([ + 'common/main/lib/util/utils', + 'common/main/lib/component/InputField', + 'common/main/lib/component/Window', + 'common/main/lib/component/ComboBoxFonts' +], function () { 'use strict'; + + SSE.Views.HeaderFooterDialog = Common.UI.Window.extend(_.extend({ + options: { + width: 654, + style: 'min-width: 350px;', + cls: 'modal-dlg' + }, + + initialize : function(options) { + _.extend(this.options, { + title: (this.options.type == 'header') ? this.textHeader : this.textFooter + }, options || {}); + + this.api = this.options.api; + this.type = this.options.type || 'header'; + this.fontStore = this.options.fontStore; + this.font = { + size: 11, + name: 'Arial', + bold: false, + italic: false + }; + + this.template = [ + '
', + '
', + '
', + '
','
', + '
','
', + '
','
', + '
', + '
', + '', + '
', + '
', + '
', + '
', + '
', + '', + '
', + '
', + '
', + '
', + '
', + '', + '
', + '
', + '
', + '
', + '
', + '
', + '' + ].join(''); + + this.options.tpl = _.template(this.template)(this.options); + Common.UI.Window.prototype.initialize.call(this, this.options); + }, + + render: function() { + Common.UI.Window.prototype.render.call(this); + + var me = this, + $window = this.getChild(); + + me.cmbFonts = new Common.UI.ComboBoxFonts({ + el : $('#id-dlg-sign-fonts'), + cls : 'input-group-nr', + style : 'width: 234px;', + menuCls : 'scrollable-menu', + menuStyle : 'min-width: 234px;max-height: 270px;', + store : new Common.Collections.Fonts(), + recent : 0, + hint : me.tipFontName + }).on('selected', function(combo, record) { + if (me.signObject) { + me.signObject.setText('Some text', record.name, me.font.size, me.font.italic, me.font.bold); + me.scrollerUpdate(); + } + me.font.name = record.name; + }); + + this.cmbFontSize = new Common.UI.ComboBox({ + el: $('#id-dlg-sign-font-size'), + cls: 'input-group-nr', + style: 'width: 55px;', + menuCls : 'scrollable-menu', + menuStyle: 'min-width: 55px;max-height: 270px;', + hint: this.tipFontSize, + data: [ + { value: 8, displayValue: "8" }, + { value: 9, displayValue: "9" }, + { value: 10, displayValue: "10" }, + { value: 11, displayValue: "11" }, + { value: 12, displayValue: "12" }, + { value: 14, displayValue: "14" }, + { value: 16, displayValue: "16" }, + { value: 18, displayValue: "18" }, + { value: 20, displayValue: "20" }, + { value: 22, displayValue: "22" }, + { value: 24, displayValue: "24" }, + { value: 26, displayValue: "26" }, + { value: 28, displayValue: "28" }, + { value: 36, displayValue: "36" }, + { value: 48, displayValue: "48" }, + { value: 72, displayValue: "72" } + ] + }).on('selected', function(combo, record) { + if (me.signObject) { + me.signObject.setText('Some text', me.font.name, record.value, me.font.italic, me.font.bold); + me.scrollerUpdate(); + } + me.font.size = record.value; + }); + this.cmbFontSize.setValue(this.font.size); + + me.btnBold = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-bold', + enableToggle: true, + hint: me.textBold + }); + me.btnBold.render($('#id-dlg-sign-bold')) ; + me.btnBold.on('click', function(btn, e) { + if (me.signObject) { + me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, btn.pressed); + me.scrollerUpdate(); + } + me.font.bold = btn.pressed; + }); + + me.btnItalic = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-italic', + enableToggle: true, + hint: me.textItalic + }); + me.btnItalic.render($('#id-dlg-sign-italic')) ; + me.btnItalic.on('click', function(btn, e) { + if (me.signObject) { + me.signObject.setText('Some text', me.font.name, me.font.size, btn.pressed, me.font.bold); + me.scrollerUpdate(); + } + me.font.italic = btn.pressed; + }); + + me.btnUnderline = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-underline', + enableToggle: true, + hint: me.textUnderline + }); + me.btnUnderline.render($('#id-dlg-sign-underline')) ; + me.btnUnderline.on('click', function(btn, e) { + if (me.signObject) { + me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, me.font.bold); + me.scrollerUpdate(); + } + me.font.underline = btn.pressed; + }); + + me.btnStrikeout = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-strikeout', + enableToggle: true, + hint: me.textStrikeout + }); + me.btnStrikeout.render($('#id-dlg-sign-strikeout')) ; + me.btnStrikeout.on('click', function(btn, e) { + if (me.signObject) { + me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, me.font.bold); + me.scrollerUpdate(); + } + me.font.strikeout = btn.pressed; + }); + + this.btnSuperscript = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-superscript', + enableToggle: true, + toggleGroup: 'superscriptHFGroup', + hint: me.textSuperscript + }); + me.btnSuperscript.render($('#id-dlg-sign-superscript')) ; + me.btnSuperscript.on('click', function(btn, e) { + if (me.signObject) { + me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, me.font.bold); + me.scrollerUpdate(); + } + me.font.superscript = btn.pressed; + }); + + this.btnSubscript = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-subscript', + enableToggle: true, + toggleGroup: 'superscriptHFGroup', + hint: me.textSubscript + }); + me.btnSubscript.render($('#id-dlg-sign-subscript')) ; + me.btnSubscript.on('click', function(btn, e) { + if (me.signObject) { + me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, me.font.bold); + me.scrollerUpdate(); + } + me.font.subscript = btn.pressed; + }); + + me.btnOk = new Common.UI.Button({ + el: $window.find('.primary') + }); + + $window.find('.dlg-btn').on('click', _.bind(me.onBtnClick, me)); + + this.scrollerYL = new Common.UI.Scroller({ + el: this.$window.find('#headerfooter-left-img').parent(), + minScrollbarLength : 20 + }); + this.scrollerYL.update(); this.scrollerYL.scrollTop(0); + this.scrollerYC = new Common.UI.Scroller({ + el: this.$window.find('#headerfooter-center-img').parent(), + minScrollbarLength : 20 + }); + this.scrollerYC.update(); this.scrollerYC.scrollTop(0); + this.scrollerYR = new Common.UI.Scroller({ + el: this.$window.find('#headerfooter-right-img').parent(), + minScrollbarLength : 20 + }); + this.scrollerYR.update(); this.scrollerYR.scrollTop(0); + + me.afterRender(); + }, + + show: function() { + Common.UI.Window.prototype.show.apply(this, arguments); + }, + + close: function() { + Common.UI.Window.prototype.close.apply(this, arguments); + + if (this.signObject) + this.signObject.destroy(); + // if (this.HFObject) + // this.HFObject.destroy(); + }, + + afterRender: function () { + this.cmbFonts.fillFonts(this.fontStore); + this.cmbFonts.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); + + this.signObject = new AscCommon.CSignatureDrawer('headerfooter-left-img', this.api, 50, 50); + // this.HFObject = new AscCommon.CHeaderDrawer('headerfooter-left-img', 'headerfooter-center-img', 'headerfooter-right-img'); + }, + + getSettings: function () { + var props = {}; + return props; + }, + + onBtnClick: function(event) { + this._handleInput(event.currentTarget.attributes['result'].value); + }, + + onPrimary: function(event) { + this._handleInput('ok'); + return false; + }, + + _handleInput: function(state) { + if (this.options.handler) { + this.options.handler.call(this, this, state); + } + this.close(); + }, + + scrollerUpdate: function() { + this.scrollerYL.update(); + this.scrollerYR.update(); + this.scrollerYC.update(); + }, + + cancelButtonText: 'Cancel', + okButtonText: 'Ok', + tipFontName: 'Font Name', + tipFontSize: 'Font Size', + textBold: 'Bold', + textItalic: 'Italic', + textUnderline: 'Underline', + textStrikeout: 'Strikeout', + textSuperscript: 'Superscript', + textSubscript: 'Subscript', + textHeader: 'Header', + textFooter: 'Footer', + textLeft: 'Left', + textCenter: 'Center', + textRight: 'Right' + + }, SSE.Views.HeaderFooterDialog || {})) +}); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index a9d750a42..64e9aadfe 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -1438,6 +1438,27 @@ define([ }) }); + me.btnEditHeader = new Common.UI.Button({ + id: 'tlbtn-editheader', + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'btn-editheader', + caption: me.capBtnInsHeader, + lock : [_set.editCell, _set.selRangeEdit, _set.printAreaLock, _set.lostConnect, _set.coAuth], + menu: new Common.UI.Menu({ + cls: 'ppm-toolbar', + items: [ + { + caption: me.mniEditHeader, + value: 'header' + }, + { + caption: me.mniEditFooter, + value: 'footer' + } + ] + }) + }); + me.btnImgAlign = new Common.UI.Button({ cls: 'btn-toolbar x-huge icon-top', iconCls: 'btn-img-align', @@ -1493,7 +1514,7 @@ define([ me.btnInsertChart, me.btnColorSchemas, me.btnAutofilter, me.btnCopy, me.btnPaste, me.listStyles, me.btnPrint, /*me.btnSave,*/ me.btnClearStyle, me.btnCopyStyle, - me.btnPageMargins, me.btnPageSize, me.btnPageOrient, me.btnPrintArea, me.btnImgAlign, me.btnImgBackward, me.btnImgForward, me.btnImgGroup + me.btnPageMargins, me.btnPageSize, me.btnPageOrient, me.btnPrintArea, me.btnImgAlign, me.btnImgBackward, me.btnImgForward, me.btnImgGroup, me.btnEditHeader ]; var _temp_array = [me.cmbFontName, me.cmbFontSize, me.btnAlignLeft,me.btnAlignCenter,me.btnAlignRight,me.btnAlignJust,me.btnAlignTop, @@ -1669,6 +1690,7 @@ define([ _injectComponent('#slot-img-group', this.btnImgGroup); _injectComponent('#slot-img-movefrwd', this.btnImgForward); _injectComponent('#slot-img-movebkwd', this.btnImgBackward); + _injectComponent('#slot-btn-editheader', this.btnEditHeader); // replacePlacholder('#id-toolbar-short-placeholder-btn-halign', this.btnHorizontalAlign); // replacePlacholder('#id-toolbar-short-placeholder-btn-valign', this.btnVerticalAlign); @@ -1742,6 +1764,7 @@ define([ _updateHint(this.btnPageSize, this.tipPageSize); _updateHint(this.btnPageMargins, this.tipPageMargins); _updateHint(this.btnPrintArea, this.tipPrintArea); + _updateHint(this.btnEditHeader, this.tipEditHeader); // set menus if (this.btnBorders && this.btnBorders.rendered) { @@ -2451,6 +2474,10 @@ define([ textSetPrintArea: 'Set Print Area', textClearPrintArea: 'Clear Print Area', textAddPrintArea: 'Add to Print Area', - tipPrintArea: 'Print Area' + tipPrintArea: 'Print Area', + capBtnInsHeader: 'Headers/Footers', + tipEditHeader: 'Edit Header or Footer', + mniEditHeader: 'Edit Header', + mniEditFooter: 'Edit Footer' }, SSE.Views.Toolbar || {})); }); \ No newline at end of file From 6446725dd5c8f21f75e712509fd676eb97861ab9 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 24 Oct 2018 16:11:58 +0300 Subject: [PATCH 002/510] [SSE] Edit header/footer: click on canvas --- .../main/app/view/HeaderFooterDialog.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index df546246f..b245059be 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -261,6 +261,10 @@ define([ $window.find('.dlg-btn').on('click', _.bind(me.onBtnClick, me)); + $window.find('#headerfooter-left-img').on('click', _.bind(me.onCanvasClick, me, '#headerfooter-left-img')); + $window.find('#headerfooter-center-img').on('click', _.bind(me.onCanvasClick, me, '#headerfooter-center-img')); + $window.find('#headerfooter-right-img').on('click', _.bind(me.onCanvasClick, me, '#headerfooter-right-img')); + this.scrollerYL = new Common.UI.Scroller({ el: this.$window.find('#headerfooter-left-img').parent(), minScrollbarLength : 20 @@ -297,8 +301,10 @@ define([ this.cmbFonts.fillFonts(this.fontStore); this.cmbFonts.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); - this.signObject = new AscCommon.CSignatureDrawer('headerfooter-left-img', this.api, 50, 50); - // this.HFObject = new AscCommon.CHeaderDrawer('headerfooter-left-img', 'headerfooter-center-img', 'headerfooter-right-img'); + // this.signObject = new AscCommon.CSignatureDrawer('headerfooter-left-img', this.api, 50, 50); + this.HFObject = new AscCommonExcel.CHeaderFooterEditor('headerfooter-left-img', 'headerfooter-center-img', 'headerfooter-right-img', 190); + + }, getSettings: function () { @@ -328,6 +334,10 @@ define([ this.scrollerYC.update(); }, + onCanvasClick: function(id, event){ + this.HFObject.click(id, event.pageX*Common.Utils.zoom(), event.pageY*Common.Utils.zoom()); + }, + cancelButtonText: 'Cancel', okButtonText: 'Ok', tipFontName: 'Font Name', From 61e71afc828db2240b95ac8a69fc82bccf07250d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 25 Oct 2018 16:36:05 +0300 Subject: [PATCH 003/510] [SSE] Destroy header object --- apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index b245059be..282bf83c0 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -291,10 +291,8 @@ define([ close: function() { Common.UI.Window.prototype.close.apply(this, arguments); - if (this.signObject) - this.signObject.destroy(); - // if (this.HFObject) - // this.HFObject.destroy(); + if (this.HFObject) + this.HFObject.destroy(); }, afterRender: function () { From ebb67c9b6e215ed7b8ce1277f0da2656eefe4698 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 30 Oct 2018 15:34:34 +0300 Subject: [PATCH 004/510] [SSE] Set font settings for header/footer. --- .../main/app/view/HeaderFooterDialog.js | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 282bf83c0..0e527f42f 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -48,7 +48,7 @@ define([ SSE.Views.HeaderFooterDialog = Common.UI.Window.extend(_.extend({ options: { - width: 654, + width: 660, style: 'min-width: 350px;', cls: 'modal-dlg' }, @@ -78,19 +78,19 @@ define([ '
', '
', '', - '
', + '
', '
', '
', '
', '
', '', - '
', + '
', '
', '
', '
', '
', '', - '
', + '
', '
', '
', '
', @@ -122,8 +122,8 @@ define([ recent : 0, hint : me.tipFontName }).on('selected', function(combo, record) { - if (me.signObject) { - me.signObject.setText('Some text', record.name, me.font.size, me.font.italic, me.font.bold); + if (me.HFObject) { + me.HFObject.setFontName(record.name); me.scrollerUpdate(); } me.font.name = record.name; @@ -155,8 +155,8 @@ define([ { value: 72, displayValue: "72" } ] }).on('selected', function(combo, record) { - if (me.signObject) { - me.signObject.setText('Some text', me.font.name, record.value, me.font.italic, me.font.bold); + if (me.HFObject) { + me.HFObject.setFontSize(record.value); me.scrollerUpdate(); } me.font.size = record.value; @@ -171,8 +171,8 @@ define([ }); me.btnBold.render($('#id-dlg-sign-bold')) ; me.btnBold.on('click', function(btn, e) { - if (me.signObject) { - me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, btn.pressed); + if (me.HFObject) { + me.HFObject.setBold(btn.pressed); me.scrollerUpdate(); } me.font.bold = btn.pressed; @@ -186,8 +186,8 @@ define([ }); me.btnItalic.render($('#id-dlg-sign-italic')) ; me.btnItalic.on('click', function(btn, e) { - if (me.signObject) { - me.signObject.setText('Some text', me.font.name, me.font.size, btn.pressed, me.font.bold); + if (me.HFObject) { + me.HFObject.setItalic(btn.pressed); me.scrollerUpdate(); } me.font.italic = btn.pressed; @@ -201,8 +201,8 @@ define([ }); me.btnUnderline.render($('#id-dlg-sign-underline')) ; me.btnUnderline.on('click', function(btn, e) { - if (me.signObject) { - me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, me.font.bold); + if (me.HFObject) { + me.HFObject.setUnderline(btn.pressed); me.scrollerUpdate(); } me.font.underline = btn.pressed; @@ -216,8 +216,8 @@ define([ }); me.btnStrikeout.render($('#id-dlg-sign-strikeout')) ; me.btnStrikeout.on('click', function(btn, e) { - if (me.signObject) { - me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, me.font.bold); + if (me.HFObject) { + me.HFObject.setStrikeout(btn.pressed); me.scrollerUpdate(); } me.font.strikeout = btn.pressed; @@ -232,8 +232,8 @@ define([ }); me.btnSuperscript.render($('#id-dlg-sign-superscript')) ; me.btnSuperscript.on('click', function(btn, e) { - if (me.signObject) { - me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, me.font.bold); + if (me.HFObject) { + me.HFObject.setSuperscript(btn.pressed); me.scrollerUpdate(); } me.font.superscript = btn.pressed; @@ -248,8 +248,8 @@ define([ }); me.btnSubscript.render($('#id-dlg-sign-subscript')) ; me.btnSubscript.on('click', function(btn, e) { - if (me.signObject) { - me.signObject.setText('Some text', me.font.name, me.font.size, me.font.italic, me.font.bold); + if (me.HFObject) { + me.HFObject.setSubscript(btn.pressed); me.scrollerUpdate(); } me.font.subscript = btn.pressed; @@ -323,6 +323,10 @@ define([ if (this.options.handler) { this.options.handler.call(this, this, state); } + if (this.HFObject) { + this.HFObject.destroy(state=='ok'); + this.HFObject = null; + } this.close(); }, @@ -333,7 +337,9 @@ define([ }, onCanvasClick: function(id, event){ - this.HFObject.click(id, event.pageX*Common.Utils.zoom(), event.pageY*Common.Utils.zoom()); + var parent = $(event.currentTarget).parent(), + offset = parent.offset(); + this.HFObject.click(id, event.pageX*Common.Utils.zoom() - offset.left, event.pageY*Common.Utils.zoom() - offset.top + parent.scrollTop()); }, cancelButtonText: 'Cancel', From a5098b22e1695881019737bbf68f7073eb38c3ae Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 30 Oct 2018 15:59:07 +0300 Subject: [PATCH 005/510] [SSE] Add fields to header/footer --- .../main/app/view/HeaderFooterDialog.js | 119 ++++++++++++++---- 1 file changed, 94 insertions(+), 25 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 0e527f42f..be5f7fd0d 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -70,11 +70,15 @@ define([ this.template = [ '
', - '
', - '
', - '
','
', - '
','
', - '
','
', + '
', + '
', + '
','
', + '
','
', + '
','
', + '
','
', + '
','
', + '
', '
', + '
', '
', '
', '', @@ -113,7 +117,7 @@ define([ $window = this.getChild(); me.cmbFonts = new Common.UI.ComboBoxFonts({ - el : $('#id-dlg-sign-fonts'), + el : $('#id-dlg-hf-fonts'), cls : 'input-group-nr', style : 'width: 234px;', menuCls : 'scrollable-menu', @@ -126,11 +130,10 @@ define([ me.HFObject.setFontName(record.name); me.scrollerUpdate(); } - me.font.name = record.name; }); this.cmbFontSize = new Common.UI.ComboBox({ - el: $('#id-dlg-sign-font-size'), + el: $('#id-dlg-hf-font-size'), cls: 'input-group-nr', style: 'width: 55px;', menuCls : 'scrollable-menu', @@ -159,7 +162,6 @@ define([ me.HFObject.setFontSize(record.value); me.scrollerUpdate(); } - me.font.size = record.value; }); this.cmbFontSize.setValue(this.font.size); @@ -169,13 +171,12 @@ define([ enableToggle: true, hint: me.textBold }); - me.btnBold.render($('#id-dlg-sign-bold')) ; + me.btnBold.render($('#id-dlg-hf-bold')) ; me.btnBold.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setBold(btn.pressed); me.scrollerUpdate(); } - me.font.bold = btn.pressed; }); me.btnItalic = new Common.UI.Button({ @@ -184,13 +185,12 @@ define([ enableToggle: true, hint: me.textItalic }); - me.btnItalic.render($('#id-dlg-sign-italic')) ; + me.btnItalic.render($('#id-dlg-hf-italic')) ; me.btnItalic.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setItalic(btn.pressed); me.scrollerUpdate(); } - me.font.italic = btn.pressed; }); me.btnUnderline = new Common.UI.Button({ @@ -199,13 +199,12 @@ define([ enableToggle: true, hint: me.textUnderline }); - me.btnUnderline.render($('#id-dlg-sign-underline')) ; + me.btnUnderline.render($('#id-dlg-hf-underline')) ; me.btnUnderline.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setUnderline(btn.pressed); me.scrollerUpdate(); } - me.font.underline = btn.pressed; }); me.btnStrikeout = new Common.UI.Button({ @@ -214,13 +213,12 @@ define([ enableToggle: true, hint: me.textStrikeout }); - me.btnStrikeout.render($('#id-dlg-sign-strikeout')) ; + me.btnStrikeout.render($('#id-dlg-hf-strikeout')) ; me.btnStrikeout.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setStrikeout(btn.pressed); me.scrollerUpdate(); } - me.font.strikeout = btn.pressed; }); this.btnSuperscript = new Common.UI.Button({ @@ -230,13 +228,12 @@ define([ toggleGroup: 'superscriptHFGroup', hint: me.textSuperscript }); - me.btnSuperscript.render($('#id-dlg-sign-superscript')) ; + me.btnSuperscript.render($('#id-dlg-hf-superscript')) ; me.btnSuperscript.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setSuperscript(btn.pressed); me.scrollerUpdate(); } - me.font.superscript = btn.pressed; }); this.btnSubscript = new Common.UI.Button({ @@ -246,15 +243,83 @@ define([ toggleGroup: 'superscriptHFGroup', hint: me.textSubscript }); - me.btnSubscript.render($('#id-dlg-sign-subscript')) ; + me.btnSubscript.render($('#id-dlg-hf-subscript')) ; me.btnSubscript.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setSubscript(btn.pressed); me.scrollerUpdate(); } - me.font.subscript = btn.pressed; }); + + var onHeaderFooterFieldClick = function(btn){ + if (me.HFObject) + me.HFObject.addField(btn.options.value); + }; + + me.btnPageNum = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-align-just', + hint: me.textPageNum, + value: Asc.c_oAscHeaderFooterField.pageNumber + }); + me.btnPageNum.render($('#id-dlg-hf-pagenum')) ; + me.btnPageNum.on('click', onHeaderFooterFieldClick); + + me.btnPageCount = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-align-just', + hint: me.textPageCount, + value: Asc.c_oAscHeaderFooterField.pageCount + }); + me.btnPageCount.render($('#id-dlg-hf-pagecount')) ; + me.btnPageCount.on('click', onHeaderFooterFieldClick); + + me.btnDate = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-align-just', + hint: me.textDate, + value: Asc.c_oAscHeaderFooterField.date + }); + me.btnDate.render($('#id-dlg-hf-date')) ; + me.btnDate.on('click', onHeaderFooterFieldClick); + + me.btnTime = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-align-just', + hint: me.textTime, + value: Asc.c_oAscHeaderFooterField.time + }); + me.btnTime.render($('#id-dlg-hf-time')) ; + me.btnTime.on('click', onHeaderFooterFieldClick); + + me.btnFilePath = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-align-just', + hint: me.textFilePath, + value: Asc.c_oAscHeaderFooterField.filePath + }); + me.btnFilePath.render($('#id-dlg-hf-filepath')) ; + me.btnFilePath.on('click', onHeaderFooterFieldClick); + + me.btnFileName = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-align-just', + hint: me.textFileName, + value: Asc.c_oAscHeaderFooterField.fileName + }); + me.btnFileName.render($('#id-dlg-hf-filename')) ; + me.btnFileName.on('click', onHeaderFooterFieldClick); + + me.btnSheet = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-align-just', + hint: me.textSheet, + value: Asc.c_oAscHeaderFooterField.sheetName + }); + me.btnSheet.render($('#id-dlg-hf-sheet')) ; + me.btnSheet.on('click', onHeaderFooterFieldClick); + me.btnOk = new Common.UI.Button({ el: $window.find('.primary') }); @@ -299,10 +364,7 @@ define([ this.cmbFonts.fillFonts(this.fontStore); this.cmbFonts.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); - // this.signObject = new AscCommon.CSignatureDrawer('headerfooter-left-img', this.api, 50, 50); this.HFObject = new AscCommonExcel.CHeaderFooterEditor('headerfooter-left-img', 'headerfooter-center-img', 'headerfooter-right-img', 190); - - }, getSettings: function () { @@ -356,7 +418,14 @@ define([ textFooter: 'Footer', textLeft: 'Left', textCenter: 'Center', - textRight: 'Right' + textRight: 'Right', + textPageNum: 'Insert page number', + textPageCount: 'Insert page count', + textDate: 'Insert date', + textTime: 'Insert time', + textFilePath: 'Insert file path', + textFileName: 'Insert file name', + textSheet: 'Insert sheet name' }, SSE.Views.HeaderFooterDialog || {})) }); \ No newline at end of file From c1cf352dd1f38b6ee38a57004ca19007fb81da87 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 30 Oct 2018 17:07:48 +0300 Subject: [PATCH 006/510] [SSE] Add text color to header/footer --- .../main/app/view/HeaderFooterDialog.js | 51 +++++++++++++++++-- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index be5f7fd0d..164658d30 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -70,9 +70,10 @@ define([ this.template = [ '
', - '
', - '
', - '
','
', + '
', + '
', + '
', + '
','
', '
','
', '
','
', '
','
', @@ -119,7 +120,7 @@ define([ me.cmbFonts = new Common.UI.ComboBoxFonts({ el : $('#id-dlg-hf-fonts'), cls : 'input-group-nr', - style : 'width: 234px;', + style : 'width: 220px;', menuCls : 'scrollable-menu', menuStyle : 'min-width: 234px;max-height: 270px;', store : new Common.Collections.Fonts(), @@ -251,6 +252,39 @@ define([ } }); + me.btnTextColor = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-fontcolor', + hint : me.textColor, + menu : new Common.UI.Menu({ + items: [ + { template: _.template('
') }, + { template: _.template('' + me.textNewColor + '') } + ] + }) + }); + me.btnTextColor.render($('#id-dlg-hf-textcolor')); + if (me.btnTextColor && me.btnTextColor.cmpEl) { + var colorVal = $('
'); + $('button:first-child', this.btnTextColor.cmpEl).append(colorVal); + colorVal.css('background-color', this.btnTextColor.currentColor || '#000000'); + me.mnuTextColorPicker = new Common.UI.ThemeColorPalette({ + el: $('#id-dlg-hf-menu-fontcolor') + }); + } + this.btnTextColor.menu.cmpEl.on('click', '#id-dlg-hf-menu-new-fontcolor', _.bind(function() { + me.mnuTextColorPicker.addNewColor((typeof(me.btnTextColor.color) == 'object') ? me.btnTextColor.color.color : me.btnTextColor.color); + }, me)); + me.mnuTextColorPicker.on('select', function(picker, color, fromBtn) { + var clr = (typeof(color) == 'object') ? color.color : color; + + me.btnTextColor.currentColor = color; + $('.btn-color-value-line', me.btnTextColor.cmpEl).css('background-color', '#' + clr); + + me.mnuTextColorPicker.currentColor = color; + if (me.HFObject) + me.HFObject.setTextColor(Common.Utils.ThemeColor.getRgbColor(color)); + }); var onHeaderFooterFieldClick = function(btn){ if (me.HFObject) @@ -363,10 +397,15 @@ define([ afterRender: function () { this.cmbFonts.fillFonts(this.fontStore); this.cmbFonts.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); + this.updateThemeColors(); this.HFObject = new AscCommonExcel.CHeaderFooterEditor('headerfooter-left-img', 'headerfooter-center-img', 'headerfooter-right-img', 190); }, + updateThemeColors: function() { + this.mnuTextColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); + }, + getSettings: function () { var props = {}; return props; @@ -425,7 +464,9 @@ define([ textTime: 'Insert time', textFilePath: 'Insert file path', textFileName: 'Insert file name', - textSheet: 'Insert sheet name' + textSheet: 'Insert sheet name', + textColor: 'Text color', + textNewColor: 'Add New Custom Color' }, SSE.Views.HeaderFooterDialog || {})) }); \ No newline at end of file From 82b36d5508af2c9140a8527f0ea91e6ff9dae744 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 23 Jan 2019 12:00:23 +0300 Subject: [PATCH 007/510] [SSE] Change layout for header/footer settings --- .../main/app/view/HeaderFooterDialog.js | 253 ++++++++---------- 1 file changed, 116 insertions(+), 137 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 164658d30..bfa17317a 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -33,7 +33,7 @@ /** * HeaderFooterDialog.js * - * Created by Julia Radzhabova on 10/111/18 + * Created by Julia Radzhabova on 10/11/18 * Copyright (c) 2018 Ascensio System SIA. All rights reserved. * */ @@ -69,34 +69,56 @@ define([ }; this.template = [ - '
', - '
', - '
', - '
', - '
','
', - '
','
', - '
','
', - '
','
', - '
','
', - '
', '
', - '
', - '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
','
', + '
','
', + '
','
', + '', + '
', '
', - '', - '
', - '
', + '
', + '
', '
', '
', '
', - '', - '
', - '
', + '
', + '
', '
', '
', '
', - '', - '
', - '
', + '
', + '
', + '
', + '
', + '
', + '', + '
', + '
', + '
', + '
', + '
', + '
','
', + '
','
', + '
','
', + '
', + '
', + '
', + '', + '
', + '
', + '
', + '
', + '', + '
', + '
', + '
', + '
', + '', '
', '
', '
', @@ -117,12 +139,37 @@ define([ var me = this, $window = this.getChild(); - me.cmbFonts = new Common.UI.ComboBoxFonts({ - el : $('#id-dlg-hf-fonts'), + var data = [ + {displayValue: this.textPageNum, value: Asc.c_oAscHeaderFooterField.pageNumber}, + {displayValue: this.textPageCount, value: Asc.c_oAscHeaderFooterField.pageCount}, + {displayValue: this.textDate, value: Asc.c_oAscHeaderFooterField.date}, + {displayValue: this.textTime, value: Asc.c_oAscHeaderFooterField.time}, + {displayValue: this.textFilePath, value: Asc.c_oAscHeaderFooterField.filePath}, + {displayValue: this.textFileName, value: Asc.c_oAscHeaderFooterField.fileName}, + {displayValue: this.textSheet, value: Asc.c_oAscHeaderFooterField.sheetName} + ]; + + this.cmbInsertH = new Common.UI.ComboBox({ + el : $('#id-dlg-h-insert'), cls : 'input-group-nr', - style : 'width: 220px;', + style : 'width: 120px;', + menuStyle : 'min-width: 100%; max-heigh: 100px;', + editable : false, + data: data + }); + this.cmbInsertH.on('selected', _.bind(function(combo, record) { + combo.setValue(this.textInsert); + if (this.HFObject) + this.HFObject.addField(record.value); + }, this)); + this.cmbInsertH.setValue(this.textInsert); + + me.cmbFonts = new Common.UI.ComboBoxFonts({ + el : $('#id-dlg-h-fonts'), + cls : 'input-group-nr', + style : 'width: 150px;', menuCls : 'scrollable-menu', - menuStyle : 'min-width: 234px;max-height: 270px;', + menuStyle : 'min-width: 100%;max-height: 270px;', store : new Common.Collections.Fonts(), recent : 0, hint : me.tipFontName @@ -134,7 +181,7 @@ define([ }); this.cmbFontSize = new Common.UI.ComboBox({ - el: $('#id-dlg-hf-font-size'), + el: $('#id-dlg-h-font-size'), cls: 'input-group-nr', style: 'width: 55px;', menuCls : 'scrollable-menu', @@ -172,7 +219,7 @@ define([ enableToggle: true, hint: me.textBold }); - me.btnBold.render($('#id-dlg-hf-bold')) ; + me.btnBold.render($('#id-dlg-h-bold')) ; me.btnBold.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setBold(btn.pressed); @@ -186,7 +233,7 @@ define([ enableToggle: true, hint: me.textItalic }); - me.btnItalic.render($('#id-dlg-hf-italic')) ; + me.btnItalic.render($('#id-dlg-h-italic')) ; me.btnItalic.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setItalic(btn.pressed); @@ -200,7 +247,7 @@ define([ enableToggle: true, hint: me.textUnderline }); - me.btnUnderline.render($('#id-dlg-hf-underline')) ; + me.btnUnderline.render($('#id-dlg-h-underline')) ; me.btnUnderline.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setUnderline(btn.pressed); @@ -214,7 +261,7 @@ define([ enableToggle: true, hint: me.textStrikeout }); - me.btnStrikeout.render($('#id-dlg-hf-strikeout')) ; + me.btnStrikeout.render($('#id-dlg-h-strikeout')) ; me.btnStrikeout.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setStrikeout(btn.pressed); @@ -229,7 +276,7 @@ define([ toggleGroup: 'superscriptHFGroup', hint: me.textSuperscript }); - me.btnSuperscript.render($('#id-dlg-hf-superscript')) ; + me.btnSuperscript.render($('#id-dlg-h-superscript')) ; me.btnSuperscript.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setSuperscript(btn.pressed); @@ -244,7 +291,7 @@ define([ toggleGroup: 'superscriptHFGroup', hint: me.textSubscript }); - me.btnSubscript.render($('#id-dlg-hf-subscript')) ; + me.btnSubscript.render($('#id-dlg-h-subscript')) ; me.btnSubscript.on('click', function(btn, e) { if (me.HFObject) { me.HFObject.setSubscript(btn.pressed); @@ -258,21 +305,21 @@ define([ hint : me.textColor, menu : new Common.UI.Menu({ items: [ - { template: _.template('
') }, - { template: _.template('' + me.textNewColor + '') } + { template: _.template('
') }, + { template: _.template('' + me.textNewColor + '') } ] }) }); - me.btnTextColor.render($('#id-dlg-hf-textcolor')); + me.btnTextColor.render($('#id-dlg-h-textcolor')); if (me.btnTextColor && me.btnTextColor.cmpEl) { var colorVal = $('
'); $('button:first-child', this.btnTextColor.cmpEl).append(colorVal); colorVal.css('background-color', this.btnTextColor.currentColor || '#000000'); me.mnuTextColorPicker = new Common.UI.ThemeColorPalette({ - el: $('#id-dlg-hf-menu-fontcolor') + el: $('#id-dlg-h-menu-fontcolor') }); } - this.btnTextColor.menu.cmpEl.on('click', '#id-dlg-hf-menu-new-fontcolor', _.bind(function() { + this.btnTextColor.menu.cmpEl.on('click', '#id-dlg-h-menu-new-fontcolor', _.bind(function() { me.mnuTextColorPicker.addNewColor((typeof(me.btnTextColor.color) == 'object') ? me.btnTextColor.color.color : me.btnTextColor.color); }, me)); me.mnuTextColorPicker.on('select', function(picker, color, fromBtn) { @@ -286,103 +333,34 @@ define([ me.HFObject.setTextColor(Common.Utils.ThemeColor.getRgbColor(color)); }); - var onHeaderFooterFieldClick = function(btn){ - if (me.HFObject) - me.HFObject.addField(btn.options.value); - }; - - me.btnPageNum = new Common.UI.Button({ - cls : 'btn-toolbar', - iconCls : 'btn-align-just', - hint: me.textPageNum, - value: Asc.c_oAscHeaderFooterField.pageNumber - }); - me.btnPageNum.render($('#id-dlg-hf-pagenum')) ; - me.btnPageNum.on('click', onHeaderFooterFieldClick); - - me.btnPageCount = new Common.UI.Button({ - cls : 'btn-toolbar', - iconCls : 'btn-align-just', - hint: me.textPageCount, - value: Asc.c_oAscHeaderFooterField.pageCount - }); - me.btnPageCount.render($('#id-dlg-hf-pagecount')) ; - me.btnPageCount.on('click', onHeaderFooterFieldClick); - - me.btnDate = new Common.UI.Button({ - cls : 'btn-toolbar', - iconCls : 'btn-align-just', - hint: me.textDate, - value: Asc.c_oAscHeaderFooterField.date - }); - me.btnDate.render($('#id-dlg-hf-date')) ; - me.btnDate.on('click', onHeaderFooterFieldClick); - - me.btnTime = new Common.UI.Button({ - cls : 'btn-toolbar', - iconCls : 'btn-align-just', - hint: me.textTime, - value: Asc.c_oAscHeaderFooterField.time - }); - me.btnTime.render($('#id-dlg-hf-time')) ; - me.btnTime.on('click', onHeaderFooterFieldClick); - - me.btnFilePath = new Common.UI.Button({ - cls : 'btn-toolbar', - iconCls : 'btn-align-just', - hint: me.textFilePath, - value: Asc.c_oAscHeaderFooterField.filePath - }); - me.btnFilePath.render($('#id-dlg-hf-filepath')) ; - me.btnFilePath.on('click', onHeaderFooterFieldClick); - - me.btnFileName = new Common.UI.Button({ - cls : 'btn-toolbar', - iconCls : 'btn-align-just', - hint: me.textFileName, - value: Asc.c_oAscHeaderFooterField.fileName - }); - me.btnFileName.render($('#id-dlg-hf-filename')) ; - me.btnFileName.on('click', onHeaderFooterFieldClick); - - me.btnSheet = new Common.UI.Button({ - cls : 'btn-toolbar', - iconCls : 'btn-align-just', - hint: me.textSheet, - value: Asc.c_oAscHeaderFooterField.sheetName - }); - me.btnSheet.render($('#id-dlg-hf-sheet')) ; - me.btnSheet.on('click', onHeaderFooterFieldClick); - me.btnOk = new Common.UI.Button({ el: $window.find('.primary') }); $window.find('.dlg-btn').on('click', _.bind(me.onBtnClick, me)); - $window.find('#headerfooter-left-img').on('click', _.bind(me.onCanvasClick, me, '#headerfooter-left-img')); - $window.find('#headerfooter-center-img').on('click', _.bind(me.onCanvasClick, me, '#headerfooter-center-img')); - $window.find('#headerfooter-right-img').on('click', _.bind(me.onCanvasClick, me, '#headerfooter-right-img')); - - this.scrollerYL = new Common.UI.Scroller({ - el: this.$window.find('#headerfooter-left-img').parent(), - minScrollbarLength : 20 - }); - this.scrollerYL.update(); this.scrollerYL.scrollTop(0); - this.scrollerYC = new Common.UI.Scroller({ - el: this.$window.find('#headerfooter-center-img').parent(), - minScrollbarLength : 20 - }); - this.scrollerYC.update(); this.scrollerYC.scrollTop(0); - this.scrollerYR = new Common.UI.Scroller({ - el: this.$window.find('#headerfooter-right-img').parent(), - minScrollbarLength : 20 - }); - this.scrollerYR.update(); this.scrollerYR.scrollTop(0); + this.scrollers = []; + this.initCanvas('#header-left-img'); + this.initCanvas('#header-center-img'); + this.initCanvas('#header-right-img'); + this.initCanvas('#footer-left-img'); + this.initCanvas('#footer-center-img'); + this.initCanvas('#footer-right-img'); me.afterRender(); }, + initCanvas: function(name) { + var el = this.$window.find(name); + el.on('click', _.bind(this.onCanvasClick, this, name)); + this.scrollers.push(new Common.UI.Scroller({ + el: el.parent(), + minScrollbarLength : 20 + })); + this.scrollers[this.scrollers.length-1].update(); + this.scrollers[this.scrollers.length-1].scrollTop(0); + }, + show: function() { Common.UI.Window.prototype.show.apply(this, arguments); }, @@ -399,7 +377,7 @@ define([ this.cmbFonts.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); this.updateThemeColors(); - this.HFObject = new AscCommonExcel.CHeaderFooterEditor('headerfooter-left-img', 'headerfooter-center-img', 'headerfooter-right-img', 190); + this.HFObject = new AscCommonExcel.CHeaderFooterEditor('header-left-img', 'header-center-img', 'header-right-img', 190); }, updateThemeColors: function() { @@ -432,9 +410,9 @@ define([ }, scrollerUpdate: function() { - this.scrollerYL.update(); - this.scrollerYR.update(); - this.scrollerYC.update(); + this.scrollers.forEach(function(item){ + item.update(); + }); }, onCanvasClick: function(id, event){ @@ -458,15 +436,16 @@ define([ textLeft: 'Left', textCenter: 'Center', textRight: 'Right', - textPageNum: 'Insert page number', - textPageCount: 'Insert page count', - textDate: 'Insert date', - textTime: 'Insert time', - textFilePath: 'Insert file path', - textFileName: 'Insert file name', - textSheet: 'Insert sheet name', + textPageNum: 'Page number', + textPageCount: 'Page count', + textDate: 'Date', + textTime: 'Time', + textFilePath: 'File path', + textFileName: 'File name', + textSheet: 'Sheet name', textColor: 'Text color', - textNewColor: 'Add New Custom Color' + textNewColor: 'Add New Custom Color', + textInsert: 'Insert' }, SSE.Views.HeaderFooterDialog || {})) }); \ No newline at end of file From e27152626aa324d387a5bbdc63ec2179edcb6113 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 23 Jan 2019 15:29:51 +0300 Subject: [PATCH 008/510] [SSE] Change layout for header/footer settings --- .../main/app/controller/Toolbar.js | 8 +- .../main/app/view/HeaderFooterDialog.js | 402 ++++++++++++------ .../main/app/view/Toolbar.js | 19 +- 3 files changed, 283 insertions(+), 146 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 6049a13b0..d36b5df49 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -366,7 +366,7 @@ define([ toolbar.btnImgAlign.menu.on('item:click', _.bind(this.onImgAlignSelect, this)); toolbar.btnImgForward.on('click', this.onImgArrangeSelect.bind(this, 'forward')); toolbar.btnImgBackward.on('click', this.onImgArrangeSelect.bind(this, 'backward')); - toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderClick, this)); + toolbar.btnEditHeader.on('click', _.bind(this.onEditHeaderClick, this)); this.onSetupCopyStyleButton(); } @@ -3290,7 +3290,7 @@ define([ this.toolbar.btnPrintArea.menu.items[2].setVisible(this.api.asc_CanAddPrintArea()); }, - onEditHeaderClick: function(menu, item) { + onEditHeaderClick: function(btn) { var me = this; if (_.isUndefined(me.fontStore)) { me.fontStore = new Common.Collections.Fonts(); @@ -3307,14 +3307,10 @@ define([ var win = new SSE.Views.HeaderFooterDialog({ api: me.api, fontStore: me.fontStore, - type: item.value, handler: function(dlg, result) { if (result == 'ok') { var props = dlg.getSettings(); - // if (item.value == 'header') // me.api.asc_editHeader(props); - // else - // me.api.asc_editFooter(props); } Common.NotificationCenter.trigger('edit:complete'); } diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index bfa17317a..a48abaf37 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -48,18 +48,17 @@ define([ SSE.Views.HeaderFooterDialog = Common.UI.Window.extend(_.extend({ options: { - width: 660, + width: 647, style: 'min-width: 350px;', cls: 'modal-dlg' }, initialize : function(options) { _.extend(this.options, { - title: (this.options.type == 'header') ? this.textHeader : this.textFooter + title: this.textTitle }, options || {}); this.api = this.options.api; - this.type = this.options.type || 'header'; this.fontStore = this.options.fontStore; this.font = { size: 11, @@ -70,22 +69,22 @@ define([ this.template = [ '
', + '', '
', - '
', + '
', '
', '
', '
', '
','
', '
','
', '
','
', - '', - '
', - '
', + '
', + '
', '
', '
', '
', '
', - '
', + '
', '
', '
', '
', @@ -96,22 +95,22 @@ define([ '
', '
', '
', - '', + '', '
', - '
', + '
', '
', '
', '
', '
','
', '
','
', '
','
', - '
', - '
', + '
', + '
', '
', '', '
', '
', - '
', + '
', '
', '', '
', @@ -139,6 +138,28 @@ define([ var me = this, $window = this.getChild(); + this.cmbPresetsH = new Common.UI.ComboBox({ + el : $('#id-dlg-h-presets'), + cls : 'input-group-nr', + style : 'width: 115px;', + menuStyle : 'min-width: 100%; max-heigh: 100px;', + editable : false, + data: data + }); + this.cmbPresetsH.on('selected', _.bind(this.onPresetSelect, this)); + this.cmbPresetsH.setValue(this.textPresets); + + this.cmbPresetsF = new Common.UI.ComboBox({ + el : $('#id-dlg-f-presets'), + cls : 'input-group-nr', + style : 'width: 115px;', + menuStyle : 'min-width: 100%; max-heigh: 100px;', + editable : false, + data: data + }); + this.cmbPresetsF.on('selected', _.bind(this.onPresetSelect, this)); + this.cmbPresetsF.setValue(this.textPresets); + var data = [ {displayValue: this.textPageNum, value: Asc.c_oAscHeaderFooterField.pageNumber}, {displayValue: this.textPageCount, value: Asc.c_oAscHeaderFooterField.pageCount}, @@ -152,19 +173,26 @@ define([ this.cmbInsertH = new Common.UI.ComboBox({ el : $('#id-dlg-h-insert'), cls : 'input-group-nr', - style : 'width: 120px;', + style : 'width: 115px;', menuStyle : 'min-width: 100%; max-heigh: 100px;', editable : false, data: data }); - this.cmbInsertH.on('selected', _.bind(function(combo, record) { - combo.setValue(this.textInsert); - if (this.HFObject) - this.HFObject.addField(record.value); - }, this)); + this.cmbInsertH.on('selected', _.bind(this.onObjectSelect, this)); this.cmbInsertH.setValue(this.textInsert); - me.cmbFonts = new Common.UI.ComboBoxFonts({ + this.cmbInsertF = new Common.UI.ComboBox({ + el : $('#id-dlg-f-insert'), + cls : 'input-group-nr', + style : 'width: 115px;', + menuStyle : 'min-width: 100%; max-heigh: 100px;', + editable : false, + data: data + }); + this.cmbInsertF.on('selected', _.bind(this.onObjectSelect, this)); + this.cmbInsertF.setValue(this.textInsert); + + me.cmbFontsH = new Common.UI.ComboBoxFonts({ el : $('#id-dlg-h-fonts'), cls : 'input-group-nr', style : 'width: 150px;', @@ -173,165 +201,208 @@ define([ store : new Common.Collections.Fonts(), recent : 0, hint : me.tipFontName - }).on('selected', function(combo, record) { - if (me.HFObject) { - me.HFObject.setFontName(record.name); - me.scrollerUpdate(); - } - }); + }).on('selected', _.bind(this.onFontSelect, this)); + me.cmbFontsF = new Common.UI.ComboBoxFonts({ + el : $('#id-dlg-f-fonts'), + cls : 'input-group-nr', + style : 'width: 150px;', + menuCls : 'scrollable-menu', + menuStyle : 'min-width: 100%;max-height: 270px;', + store : new Common.Collections.Fonts(), + recent : 0, + hint : me.tipFontName + }).on('selected', _.bind(this.onFontSelect, this)); - this.cmbFontSize = new Common.UI.ComboBox({ + data = [ + { value: 8, displayValue: "8" }, + { value: 9, displayValue: "9" }, + { value: 10, displayValue: "10" }, + { value: 11, displayValue: "11" }, + { value: 12, displayValue: "12" }, + { value: 14, displayValue: "14" }, + { value: 16, displayValue: "16" }, + { value: 18, displayValue: "18" }, + { value: 20, displayValue: "20" }, + { value: 22, displayValue: "22" }, + { value: 24, displayValue: "24" }, + { value: 26, displayValue: "26" }, + { value: 28, displayValue: "28" }, + { value: 36, displayValue: "36" }, + { value: 48, displayValue: "48" }, + { value: 72, displayValue: "72" } + ]; + this.cmbFontSizeH = new Common.UI.ComboBox({ el: $('#id-dlg-h-font-size'), cls: 'input-group-nr', style: 'width: 55px;', menuCls : 'scrollable-menu', menuStyle: 'min-width: 55px;max-height: 270px;', hint: this.tipFontSize, - data: [ - { value: 8, displayValue: "8" }, - { value: 9, displayValue: "9" }, - { value: 10, displayValue: "10" }, - { value: 11, displayValue: "11" }, - { value: 12, displayValue: "12" }, - { value: 14, displayValue: "14" }, - { value: 16, displayValue: "16" }, - { value: 18, displayValue: "18" }, - { value: 20, displayValue: "20" }, - { value: 22, displayValue: "22" }, - { value: 24, displayValue: "24" }, - { value: 26, displayValue: "26" }, - { value: 28, displayValue: "28" }, - { value: 36, displayValue: "36" }, - { value: 48, displayValue: "48" }, - { value: 72, displayValue: "72" } - ] - }).on('selected', function(combo, record) { - if (me.HFObject) { - me.HFObject.setFontSize(record.value); - me.scrollerUpdate(); - } - }); - this.cmbFontSize.setValue(this.font.size); + data: data + }).on('selected', _.bind(this.onFontSizeSelect, this)); + this.cmbFontSizeH.setValue(this.font.size); + this.cmbFontSizeF = new Common.UI.ComboBox({ + el: $('#id-dlg-f-font-size'), + cls: 'input-group-nr', + style: 'width: 55px;', + menuCls : 'scrollable-menu', + menuStyle: 'min-width: 55px;max-height: 270px;', + hint: this.tipFontSize, + data: data + }).on('selected', _.bind(this.onFontSizeSelect, this)); + this.cmbFontSizeF.setValue(this.font.size); - me.btnBold = new Common.UI.Button({ + me.btnBoldH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-bold', enableToggle: true, hint: me.textBold }); - me.btnBold.render($('#id-dlg-h-bold')) ; - me.btnBold.on('click', function(btn, e) { - if (me.HFObject) { - me.HFObject.setBold(btn.pressed); - me.scrollerUpdate(); - } - }); + me.btnBoldH.render($('#id-dlg-h-bold')) ; + me.btnBoldH.on('click', _.bind(this.onBoldClick, this)); - me.btnItalic = new Common.UI.Button({ + me.btnBoldF = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-bold', + enableToggle: true, + hint: me.textBold + }); + me.btnBoldF.render($('#id-dlg-f-bold')) ; + me.btnBoldF.on('click', _.bind(this.onBoldClick, this)); + + me.btnItalicH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-italic', enableToggle: true, hint: me.textItalic }); - me.btnItalic.render($('#id-dlg-h-italic')) ; - me.btnItalic.on('click', function(btn, e) { - if (me.HFObject) { - me.HFObject.setItalic(btn.pressed); - me.scrollerUpdate(); - } - }); + me.btnItalicH.render($('#id-dlg-h-italic')) ; + me.btnItalicH.on('click', _.bind(this.onItalicClick, this)); - me.btnUnderline = new Common.UI.Button({ + me.btnItalicF = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-italic', + enableToggle: true, + hint: me.textItalic + }); + me.btnItalicF.render($('#id-dlg-f-italic')) ; + me.btnItalicF.on('click', _.bind(this.onItalicClick, this)); + + me.btnUnderlineH = new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-underline', enableToggle: true, hint: me.textUnderline }); - me.btnUnderline.render($('#id-dlg-h-underline')) ; - me.btnUnderline.on('click', function(btn, e) { - if (me.HFObject) { - me.HFObject.setUnderline(btn.pressed); - me.scrollerUpdate(); - } - }); + me.btnUnderlineH.render($('#id-dlg-h-underline')) ; + me.btnUnderlineH.on('click', _.bind(this.onUnderlineClick, this)); - me.btnStrikeout = new Common.UI.Button({ + me.btnUnderlineF = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-underline', + enableToggle: true, + hint: me.textUnderline + }); + me.btnUnderlineF.render($('#id-dlg-f-underline')) ; + me.btnUnderlineF.on('click', _.bind(this.onUnderlineClick, this)); + + me.btnStrikeoutH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-strikeout', enableToggle: true, hint: me.textStrikeout }); - me.btnStrikeout.render($('#id-dlg-h-strikeout')) ; - me.btnStrikeout.on('click', function(btn, e) { - if (me.HFObject) { - me.HFObject.setStrikeout(btn.pressed); - me.scrollerUpdate(); - } + me.btnStrikeoutH.render($('#id-dlg-h-strikeout')) ; + me.btnStrikeoutH.on('click',_.bind(this.onStrikeoutClick, this)); + me.btnStrikeoutF = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-strikeout', + enableToggle: true, + hint: me.textStrikeout }); + me.btnStrikeoutF.render($('#id-dlg-f-strikeout')) ; + me.btnStrikeoutF.on('click',_.bind(this.onStrikeoutClick, this)); - this.btnSuperscript = new Common.UI.Button({ + this.btnSuperscriptH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-superscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', hint: me.textSuperscript }); - me.btnSuperscript.render($('#id-dlg-h-superscript')) ; - me.btnSuperscript.on('click', function(btn, e) { - if (me.HFObject) { - me.HFObject.setSuperscript(btn.pressed); - me.scrollerUpdate(); - } + me.btnSuperscriptH.render($('#id-dlg-h-superscript')) ; + me.btnSuperscriptH.on('click', _.bind(this.onSuperscriptClick, this)); + this.btnSuperscriptF = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-superscript', + enableToggle: true, + toggleGroup: 'superscriptHFGroup', + hint: me.textSuperscript }); + me.btnSuperscriptF.render($('#id-dlg-f-superscript')) ; + me.btnSuperscriptF.on('click', _.bind(this.onSuperscriptClick, this)); - this.btnSubscript = new Common.UI.Button({ + this.btnSubscriptH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-subscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', hint: me.textSubscript }); - me.btnSubscript.render($('#id-dlg-h-subscript')) ; - me.btnSubscript.on('click', function(btn, e) { - if (me.HFObject) { - me.HFObject.setSubscript(btn.pressed); - me.scrollerUpdate(); - } + me.btnSubscriptH.render($('#id-dlg-h-subscript')) ; + me.btnSubscriptH.on('click', _.bind(this.onSubscriptClick, this)); + this.btnSubscriptF = new Common.UI.Button({ + cls: 'btn-toolbar', + iconCls: 'btn-subscript', + enableToggle: true, + toggleGroup: 'superscriptHFGroup', + hint: me.textSubscript }); + me.btnSubscriptF.render($('#id-dlg-f-subscript')) ; + me.btnSubscriptF.on('click', _.bind(this.onSubscriptClick, this)); - me.btnTextColor = new Common.UI.Button({ + var initNewColor = function(btn, picker_el) { + if (btn && btn.cmpEl) { + var colorVal = $('
'); + $('button:first-child', btn.cmpEl).append(colorVal); + colorVal.css('background-color', btn.currentColor || '#000000'); + var picker = new Common.UI.ThemeColorPalette({ + el: $(picker_el) + }); + } + btn.menu.cmpEl.on('click', picker_el+'-new', _.bind(function() { + picker.addNewColor((typeof(btn.color) == 'object') ? btn.color.color : btn.color); + }, me)); + picker.on('select', _.bind(me.onColorSelect, me, btn)); + return picker; + }; + me.btnTextColorH = new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-fontcolor', hint : me.textColor, menu : new Common.UI.Menu({ items: [ { template: _.template('
') }, - { template: _.template('' + me.textNewColor + '') } + { template: _.template('' + me.textNewColor + '') } ] }) }); - me.btnTextColor.render($('#id-dlg-h-textcolor')); - if (me.btnTextColor && me.btnTextColor.cmpEl) { - var colorVal = $('
'); - $('button:first-child', this.btnTextColor.cmpEl).append(colorVal); - colorVal.css('background-color', this.btnTextColor.currentColor || '#000000'); - me.mnuTextColorPicker = new Common.UI.ThemeColorPalette({ - el: $('#id-dlg-h-menu-fontcolor') - }); - } - this.btnTextColor.menu.cmpEl.on('click', '#id-dlg-h-menu-new-fontcolor', _.bind(function() { - me.mnuTextColorPicker.addNewColor((typeof(me.btnTextColor.color) == 'object') ? me.btnTextColor.color.color : me.btnTextColor.color); - }, me)); - me.mnuTextColorPicker.on('select', function(picker, color, fromBtn) { - var clr = (typeof(color) == 'object') ? color.color : color; + me.btnTextColorH.render($('#id-dlg-h-textcolor')); + me.mnuTextColorPickerH = initNewColor(me.btnTextColorH, "#id-dlg-h-menu-fontcolor"); - me.btnTextColor.currentColor = color; - $('.btn-color-value-line', me.btnTextColor.cmpEl).css('background-color', '#' + clr); - - me.mnuTextColorPicker.currentColor = color; - if (me.HFObject) - me.HFObject.setTextColor(Common.Utils.ThemeColor.getRgbColor(color)); + me.btnTextColorF = new Common.UI.Button({ + cls : 'btn-toolbar', + iconCls : 'btn-fontcolor', + hint : me.textColor, + menu : new Common.UI.Menu({ + items: [ + { template: _.template('
') }, + { template: _.template('' + me.textNewColor + '') } + ] + }) }); + me.btnTextColorF.render($('#id-dlg-f-textcolor')); + me.mnuTextColorPickerF = initNewColor(me.btnTextColorF, "#id-dlg-f-menu-fontcolor"); me.btnOk = new Common.UI.Button({ el: $window.find('.primary') @@ -363,6 +434,10 @@ define([ show: function() { Common.UI.Window.prototype.show.apply(this, arguments); + var me = this; + _.delay(function(){ + me.HFObject && me.HFObject.click('#header-left-img', 0, 0); + },500); }, close: function() { @@ -373,15 +448,18 @@ define([ }, afterRender: function () { - this.cmbFonts.fillFonts(this.fontStore); - this.cmbFonts.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); + this.cmbFontsH.fillFonts(this.fontStore); + this.cmbFontsH.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); + this.cmbFontsF.fillFonts(this.fontStore); + this.cmbFontsF.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); this.updateThemeColors(); this.HFObject = new AscCommonExcel.CHeaderFooterEditor('header-left-img', 'header-center-img', 'header-right-img', 190); }, updateThemeColors: function() { - this.mnuTextColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); + this.mnuTextColorPickerH.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); + this.mnuTextColorPickerF.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); }, getSettings: function () { @@ -421,6 +499,82 @@ define([ this.HFObject.click(id, event.pageX*Common.Utils.zoom() - offset.left, event.pageY*Common.Utils.zoom() - offset.top + parent.scrollTop()); }, + onPresetSelect: function(combo, record) { + // if (this.HFObject) + // this.HFObject.setPreset(record.value); + }, + + onObjectSelect: function(combo, record) { + combo.setValue(this.textInsert); + if (this.HFObject) + this.HFObject.addField(record.value); + }, + + onFontSelect: function(combo, record) { + if (this.HFObject) { + this.HFObject.setFontName(record.name); + this.scrollerUpdate(); + } + }, + + onFontSizeSelect: function(combo, record) { + if (this.HFObject) { + this.HFObject.setFontSize(record.value); + this.scrollerUpdate(); + } + }, + + onBoldClick: function(btn, e) { + if (this.HFObject) { + this.HFObject.setBold(btn.pressed); + this.scrollerUpdate(); + } + }, + + onItalicClick: function(btn, e) { + if (this.HFObject) { + this.HFObject.setItalic(btn.pressed); + this.scrollerUpdate(); + } + }, + + onUnderlineClick: function(btn, e) { + if (this.HFObject) { + this.HFObject.setUnderline(btn.pressed); + this.scrollerUpdate(); + } + }, + + onStrikeoutClick: function(btn, e) { + if (this.HFObject) { + this.HFObject.setStrikeout(btn.pressed); + this.scrollerUpdate(); + } + }, + + onSuperscriptClick: function(btn, e) { + if (this.HFObject) { + this.HFObject.setSuperscript(btn.pressed); + this.scrollerUpdate(); + } + }, + + onSubscriptClick: function(btn, e) { + if (this.HFObject) { + this.HFObject.setSubscript(btn.pressed); + this.scrollerUpdate(); + } + }, + + onColorSelect: function(btn, picker, color) { + var clr = (typeof(color) == 'object') ? color.color : color; + btn.currentColor = color; + $('.btn-color-value-line', btn.cmpEl).css('background-color', '#' + clr); + picker.currentColor = color; + if (this.HFObject) + this.HFObject.setTextColor(Common.Utils.ThemeColor.getRgbColor(color)); + }, + cancelButtonText: 'Cancel', okButtonText: 'Ok', tipFontName: 'Font Name', @@ -431,6 +585,7 @@ define([ textStrikeout: 'Strikeout', textSuperscript: 'Superscript', textSubscript: 'Subscript', + textTitle: 'Header/Footer Settings', textHeader: 'Header', textFooter: 'Footer', textLeft: 'Left', @@ -445,7 +600,8 @@ define([ textSheet: 'Sheet name', textColor: 'Text color', textNewColor: 'Add New Custom Color', - textInsert: 'Insert' + textInsert: 'Insert', + textPresets: 'Presets' }, SSE.Views.HeaderFooterDialog || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index faec951c6..d79bb4edb 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -1443,20 +1443,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'btn-editheader', caption: me.capBtnInsHeader, - lock : [_set.editCell, _set.selRangeEdit, _set.printAreaLock, _set.lostConnect, _set.coAuth], - menu: new Common.UI.Menu({ - cls: 'ppm-toolbar', - items: [ - { - caption: me.mniEditHeader, - value: 'header' - }, - { - caption: me.mniEditFooter, - value: 'footer' - } - ] - }) + lock : [_set.editCell, _set.selRangeEdit, _set.printAreaLock, _set.lostConnect, _set.coAuth] }); me.btnImgAlign = new Common.UI.Button({ @@ -2466,8 +2453,6 @@ define([ textAddPrintArea: 'Add to Print Area', tipPrintArea: 'Print Area', capBtnInsHeader: 'Headers/Footers', - tipEditHeader: 'Edit Header or Footer', - mniEditHeader: 'Edit Header', - mniEditFooter: 'Edit Footer' + tipEditHeader: 'Edit Header or Footer' }, SSE.Views.Toolbar || {})); }); \ No newline at end of file From 579d565961cb265e0da1d16e8a6a7780fcbfa3a0 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 24 Jan 2019 12:02:33 +0300 Subject: [PATCH 009/510] [SSE] Header/footer settings: set settings for different pages (odd, even, first) --- .../main/app/view/HeaderFooterDialog.js | 151 ++++++++++++++++-- 1 file changed, 138 insertions(+), 13 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index a48abaf37..6c90eaf73 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -68,7 +68,31 @@ define([ }; this.template = [ - '
', + '
', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '
', + '', + '', + '', + '', + '
', '', '
', '
', @@ -79,23 +103,23 @@ define([ '
','
', '
','
', '
', - '
', - '
', + '
', + '
', '
', '
', '
', - '
', - '
', + '
', + '
', '
', '
', '
', '
', - '
', + '
', '
', '
', '
', '
', - '', + '', '
', '
', '
', @@ -105,18 +129,18 @@ define([ '
','
', '
','
', '
', - '
', - '
', + '
', + '
', '', '
', '
', - '
', - '
', + '
', + '
', '', '
', '
', '
', - '
', + '
', '', '
', '
', @@ -138,6 +162,95 @@ define([ var me = this, $window = this.getChild(); + this.chFirstPage = new Common.UI.CheckBox({ + el: $('#id-dlg-hf-ch-first'), + labelText: this.textDiffFirst + }); + this.chFirstPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var checked = (field.getValue()=='checked'); + // if (this.HFObject) + // this.HFObject.setFirst(checked); + + this.btnFirst.setVisible(checked); + if (!checked && this.btnFirst.isActive()) + (this.btnAll.isVisible()) ? this.btnAll.toggle(true) : this.btnOdd.toggle(true); + + this.cmbPresetsF.setDisabled(checked); + this.cmbPresetsH.setDisabled(checked); + }, this)); + + this.chOddPage = new Common.UI.CheckBox({ + el: $('#id-dlg-hf-ch-odd'), + labelText: this.textDiffOdd + }); + this.chOddPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var checked = (field.getValue()=='checked'); + // if (this.HFObject) + // this.HFObject.setOdd(checked); + + this.btnOdd.setVisible(checked); + this.btnEven.setVisible(checked); + this.btnAll.setVisible(!checked); + if (!checked && (this.btnOdd.isActive() || this.btnEven.isActive())) + this.btnAll.toggle(true); + if (checked && this.btnAll.isActive()) + this.btnOdd.toggle(true); + this.cmbPresetsF.setDisabled(checked); + this.cmbPresetsH.setDisabled(checked); + }, this)); + + this.chScale = new Common.UI.CheckBox({ + el: $('#id-dlg-hf-ch-scale'), + labelText: this.textScale + }); + this.chScale.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var checked = (field.getValue()=='checked'); + // if (this.HFObject) + // this.HFObject.setScale(checked); + }, this)); + + this.chAlign = new Common.UI.CheckBox({ + el: $('#id-dlg-hf-ch-align'), + labelText: this.textAlign + }); + this.chAlign.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var checked = (field.getValue()=='checked'); + // if (this.HFObject) + // this.HFObject.setAlign(checked); + }, this)); + + this.btnAll = new Common.UI.Button({ + el: $('#id-dlg-hf-btn-all'), + enableToggle: true, + toggleGroup: 'hf-pages', + allowDepress: false, + pressed: true + }); + + this.btnOdd = new Common.UI.Button({ + el: $('#id-dlg-hf-btn-odd'), + enableToggle: true, + toggleGroup: 'hf-pages', + allowDepress: false + }); + this.btnOdd.on('click', _.bind(this.onPageTypeClick, this, 0)); + + this.btnEven = new Common.UI.Button({ + el: $('#id-dlg-hf-btn-even'), + enableToggle: true, + toggleGroup: 'hf-pages', + allowDepress: false + }); + this.btnEven.on('click', _.bind(this.onPageTypeClick, this, 1)); + + this.btnFirst = new Common.UI.Button({ + el: $('#id-dlg-hf-btn-first'), + enableToggle: true, + toggleGroup: 'hf-pages', + allowDepress: false + }); + this.btnFirst.on('click', _.bind(this.onPageTypeClick, this, 2)); + this.cmbPresetsH = new Common.UI.ComboBox({ el : $('#id-dlg-h-presets'), cls : 'input-group-nr', @@ -575,6 +688,10 @@ define([ this.HFObject.setTextColor(Common.Utils.ThemeColor.getRgbColor(color)); }, + onPageTypeClick: function(type, btn, event) { + + }, + cancelButtonText: 'Cancel', okButtonText: 'Ok', tipFontName: 'Font Name', @@ -601,7 +718,15 @@ define([ textColor: 'Text color', textNewColor: 'Add New Custom Color', textInsert: 'Insert', - textPresets: 'Presets' + textPresets: 'Presets', + textDiffFirst: 'Different first page', + textDiffOdd: 'Different odd and even pages', + textScale: 'Scale with document', + textAlign: 'Align with page margins', + textFirst: 'First page', + textOdd: 'Odd page', + textEven: 'Even page', + textAll: 'All pages' }, SSE.Views.HeaderFooterDialog || {})) }); \ No newline at end of file From 62b92c6b3845d5efe5c11e2dab09e01a13a9a51f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 24 Jan 2019 13:20:42 +0300 Subject: [PATCH 010/510] [SSE] Fix header/footer settings init --- .../main/app/view/HeaderFooterDialog.js | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 6c90eaf73..e60a0ad42 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -95,13 +95,13 @@ define([ '
', '', '
', - '
', - '
', - '
', - '
', - '
','
', - '
','
', - '
','
', + '
', + '
', + '
', + '
', + '
','
', + '
','
', + '
','
', '
', '
', '
', @@ -121,13 +121,13 @@ define([ '
', '', '
', - '
', - '
', - '
', - '
', - '
','
', - '
','
', - '
','
', + '
', + '
', + '
', + '
', + '
','
', + '
','
', + '
','
', '
', '
', '
', @@ -254,7 +254,7 @@ define([ this.cmbPresetsH = new Common.UI.ComboBox({ el : $('#id-dlg-h-presets'), cls : 'input-group-nr', - style : 'width: 115px;', + style : 'width: 110px;', menuStyle : 'min-width: 100%; max-heigh: 100px;', editable : false, data: data @@ -265,7 +265,7 @@ define([ this.cmbPresetsF = new Common.UI.ComboBox({ el : $('#id-dlg-f-presets'), cls : 'input-group-nr', - style : 'width: 115px;', + style : 'width: 110px;', menuStyle : 'min-width: 100%; max-heigh: 100px;', editable : false, data: data @@ -286,7 +286,7 @@ define([ this.cmbInsertH = new Common.UI.ComboBox({ el : $('#id-dlg-h-insert'), cls : 'input-group-nr', - style : 'width: 115px;', + style : 'width: 110px;', menuStyle : 'min-width: 100%; max-heigh: 100px;', editable : false, data: data @@ -297,7 +297,7 @@ define([ this.cmbInsertF = new Common.UI.ComboBox({ el : $('#id-dlg-f-insert'), cls : 'input-group-nr', - style : 'width: 115px;', + style : 'width: 110px;', menuStyle : 'min-width: 100%; max-heigh: 100px;', editable : false, data: data @@ -308,7 +308,7 @@ define([ me.cmbFontsH = new Common.UI.ComboBoxFonts({ el : $('#id-dlg-h-fonts'), cls : 'input-group-nr', - style : 'width: 150px;', + style : 'width: 142px;', menuCls : 'scrollable-menu', menuStyle : 'min-width: 100%;max-height: 270px;', store : new Common.Collections.Fonts(), @@ -318,7 +318,7 @@ define([ me.cmbFontsF = new Common.UI.ComboBoxFonts({ el : $('#id-dlg-f-fonts'), cls : 'input-group-nr', - style : 'width: 150px;', + style : 'width: 142px;', menuCls : 'scrollable-menu', menuStyle : 'min-width: 100%;max-height: 270px;', store : new Common.Collections.Fonts(), @@ -567,7 +567,7 @@ define([ this.cmbFontsF.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); this.updateThemeColors(); - this.HFObject = new AscCommonExcel.CHeaderFooterEditor('header-left-img', 'header-center-img', 'header-right-img', 190); + this.HFObject = new AscCommonExcel.CHeaderFooterEditor(['header-left-img', 'header-center-img', 'header-right-img', 'footer-left-img', 'footer-center-img', 'footer-right-img'], 205); }, updateThemeColors: function() { From a97d311ee8fbbfdd3a42023f82e9c6059e12a634 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 25 Jan 2019 11:50:56 +0300 Subject: [PATCH 011/510] [SSE] Header/footer settings: switch between pages --- .../main/app/view/HeaderFooterDialog.js | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index e60a0ad42..378d33510 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -59,6 +59,7 @@ define([ }, options || {}); this.api = this.options.api; + this.props = this.options.props; this.fontStore = this.options.fontStore; this.font = { size: 11, @@ -174,9 +175,6 @@ define([ this.btnFirst.setVisible(checked); if (!checked && this.btnFirst.isActive()) (this.btnAll.isVisible()) ? this.btnAll.toggle(true) : this.btnOdd.toggle(true); - - this.cmbPresetsF.setDisabled(checked); - this.cmbPresetsH.setDisabled(checked); }, this)); this.chOddPage = new Common.UI.CheckBox({ @@ -195,8 +193,6 @@ define([ this.btnAll.toggle(true); if (checked && this.btnAll.isActive()) this.btnOdd.toggle(true); - this.cmbPresetsF.setDisabled(checked); - this.cmbPresetsH.setDisabled(checked); }, this)); this.chScale = new Common.UI.CheckBox({ @@ -226,6 +222,7 @@ define([ allowDepress: false, pressed: true }); + this.btnAll.on('toggle', _.bind(this.onPageTypeToggle, this, Asc.c_oAscHeaderFooterType.odd)); this.btnOdd = new Common.UI.Button({ el: $('#id-dlg-hf-btn-odd'), @@ -233,7 +230,7 @@ define([ toggleGroup: 'hf-pages', allowDepress: false }); - this.btnOdd.on('click', _.bind(this.onPageTypeClick, this, 0)); + this.btnOdd.on('toggle', _.bind(this.onPageTypeToggle, this, Asc.c_oAscHeaderFooterType.odd)); this.btnEven = new Common.UI.Button({ el: $('#id-dlg-hf-btn-even'), @@ -241,7 +238,7 @@ define([ toggleGroup: 'hf-pages', allowDepress: false }); - this.btnEven.on('click', _.bind(this.onPageTypeClick, this, 1)); + this.btnEven.on('toggle', _.bind(this.onPageTypeToggle, this, Asc.c_oAscHeaderFooterType.even)); this.btnFirst = new Common.UI.Button({ el: $('#id-dlg-hf-btn-first'), @@ -249,7 +246,7 @@ define([ toggleGroup: 'hf-pages', allowDepress: false }); - this.btnFirst.on('click', _.bind(this.onPageTypeClick, this, 2)); + this.btnFirst.on('toggle', _.bind(this.onPageTypeToggle, this, Asc.c_oAscHeaderFooterType.first)); this.cmbPresetsH = new Common.UI.ComboBox({ el : $('#id-dlg-h-presets'), @@ -568,6 +565,22 @@ define([ this.updateThemeColors(); this.HFObject = new AscCommonExcel.CHeaderFooterEditor(['header-left-img', 'header-center-img', 'header-right-img', 'footer-left-img', 'footer-center-img', 'footer-right-img'], 205); + this._setDefaults(this.props); + }, + + _setDefaults: function (props) { + if (props) { + // this.chOddPage.setValue(props.getOdd()); + // this.chFirstPage.setValue(props.getFirst()); + } + var value = (this.chOddPage.getValue() == 'checked'); + this.btnOdd.setVisible(value); + this.btnEven.setVisible(value); + this.btnAll.setVisible(!value); + value ? this.btnOdd.toggle(true) : this.btnAll.toggle(true); + + value = (this.chFirstPage.getValue() == 'checked'); + this.btnFirst.setVisible(value); }, updateThemeColors: function() { @@ -688,8 +701,9 @@ define([ this.HFObject.setTextColor(Common.Utils.ThemeColor.getRgbColor(color)); }, - onPageTypeClick: function(type, btn, event) { - + onPageTypeToggle: function(type, btn, state) { + if (state && this.HFObject) + this.HFObject.switchHeaderFooterType(type); }, cancelButtonText: 'Cancel', From 37ff977c1132d2b01e9e4d34ae4c76515ba8a397 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 29 Jan 2019 12:57:32 +0300 Subject: [PATCH 012/510] [SSE] Apply presets for header/footer --- .../main/app/view/HeaderFooterDialog.js | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 378d33510..1056452b9 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -252,22 +252,24 @@ define([ el : $('#id-dlg-h-presets'), cls : 'input-group-nr', style : 'width: 110px;', - menuStyle : 'min-width: 100%; max-heigh: 100px;', + menuStyle : 'min-width: 100%; max-height: 200px;', editable : false, - data: data + scrollAlwaysVisible: true, + data: [] }); - this.cmbPresetsH.on('selected', _.bind(this.onPresetSelect, this)); + this.cmbPresetsH.on('selected', _.bind(this.onPresetSelect, this, false)); this.cmbPresetsH.setValue(this.textPresets); this.cmbPresetsF = new Common.UI.ComboBox({ el : $('#id-dlg-f-presets'), cls : 'input-group-nr', style : 'width: 110px;', - menuStyle : 'min-width: 100%; max-heigh: 100px;', + menuStyle : 'min-width: 100%; max-height: 200px;', editable : false, - data: data + scrollAlwaysVisible: true, + data: [] }); - this.cmbPresetsF.on('selected', _.bind(this.onPresetSelect, this)); + this.cmbPresetsF.on('selected', _.bind(this.onPresetSelect, this, true)); this.cmbPresetsF.setValue(this.textPresets); var data = [ @@ -573,6 +575,15 @@ define([ // this.chOddPage.setValue(props.getOdd()); // this.chFirstPage.setValue(props.getFirst()); } + var presets = []; + this.HFObject.getTextPresetsArr().forEach(function(item, index){ + presets.push({displayValue: item, value: index}); + }); + this.cmbPresetsH.setData(presets); + this.cmbPresetsH.setValue(this.textPresets); + this.cmbPresetsF.setData(presets); + this.cmbPresetsF.setValue(this.textPresets); + var value = (this.chOddPage.getValue() == 'checked'); this.btnOdd.setVisible(value); this.btnEven.setVisible(value); @@ -625,9 +636,9 @@ define([ this.HFObject.click(id, event.pageX*Common.Utils.zoom() - offset.left, event.pageY*Common.Utils.zoom() - offset.top + parent.scrollTop()); }, - onPresetSelect: function(combo, record) { - // if (this.HFObject) - // this.HFObject.setPreset(record.value); + onPresetSelect: function(footer, combo, record) { + if (this.HFObject) + this.HFObject.applyPreset(record.value, !!footer); }, onObjectSelect: function(combo, record) { From 4ae17d2d35b516dcd4e9e232ad6b5455957195be Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 30 Jan 2019 14:03:08 +0300 Subject: [PATCH 013/510] [SSE] Apply header/footer settings --- .../main/app/view/HeaderFooterDialog.js | 243 +++++++++++------- 1 file changed, 156 insertions(+), 87 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 1056452b9..72e93e888 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -61,11 +61,20 @@ define([ this.api = this.options.api; this.props = this.options.props; this.fontStore = this.options.fontStore; - this.font = { - size: 11, - name: 'Arial', - bold: false, - italic: false + this.isFooter = false; + this.currentCanvas = null; + this.headerControls = []; + this.footerControls = []; + this._state = { + clrtext: undefined, + bold: undefined, + italic: undefined, + underline: undefined, + strikeout: undefined, + subscript: undefined, + superscript: undefined, + fontsize: undefined, + fontname: 'Arial' }; this.template = [ @@ -169,8 +178,8 @@ define([ }); this.chFirstPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){ var checked = (field.getValue()=='checked'); - // if (this.HFObject) - // this.HFObject.setFirst(checked); + if (this.HFObject) + this.HFObject.setDifferentFirst(checked); this.btnFirst.setVisible(checked); if (!checked && this.btnFirst.isActive()) @@ -183,8 +192,8 @@ define([ }); this.chOddPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){ var checked = (field.getValue()=='checked'); - // if (this.HFObject) - // this.HFObject.setOdd(checked); + if (this.HFObject) + this.HFObject.setDifferentOddEven(checked); this.btnOdd.setVisible(checked); this.btnEven.setVisible(checked); @@ -201,8 +210,8 @@ define([ }); this.chScale.on('change', _.bind(function(field, newValue, oldValue, eOpts){ var checked = (field.getValue()=='checked'); - // if (this.HFObject) - // this.HFObject.setScale(checked); + if (this.HFObject) + this.HFObject.setScaleWithDoc(checked); }, this)); this.chAlign = new Common.UI.CheckBox({ @@ -211,8 +220,8 @@ define([ }); this.chAlign.on('change', _.bind(function(field, newValue, oldValue, eOpts){ var checked = (field.getValue()=='checked'); - // if (this.HFObject) - // this.HFObject.setAlign(checked); + if (this.HFObject) + this.HFObject.setAlignWithMargins(checked); }, this)); this.btnAll = new Common.UI.Button({ @@ -292,6 +301,7 @@ define([ }); this.cmbInsertH.on('selected', _.bind(this.onObjectSelect, this)); this.cmbInsertH.setValue(this.textInsert); + this.headerControls.push(this.cmbInsertH); this.cmbInsertF = new Common.UI.ComboBox({ el : $('#id-dlg-f-insert'), @@ -303,8 +313,9 @@ define([ }); this.cmbInsertF.on('selected', _.bind(this.onObjectSelect, this)); this.cmbInsertF.setValue(this.textInsert); + this.footerControls.push(this.cmbInsertF); - me.cmbFontsH = new Common.UI.ComboBoxFonts({ + this.cmbFontsH = new Common.UI.ComboBoxFonts({ el : $('#id-dlg-h-fonts'), cls : 'input-group-nr', style : 'width: 142px;', @@ -312,9 +323,11 @@ define([ menuStyle : 'min-width: 100%;max-height: 270px;', store : new Common.Collections.Fonts(), recent : 0, - hint : me.tipFontName + hint : this.tipFontName }).on('selected', _.bind(this.onFontSelect, this)); - me.cmbFontsF = new Common.UI.ComboBoxFonts({ + this.headerControls.push(this.cmbFontsH); + + this.cmbFontsF = new Common.UI.ComboBoxFonts({ el : $('#id-dlg-f-fonts'), cls : 'input-group-nr', style : 'width: 142px;', @@ -322,8 +335,9 @@ define([ menuStyle : 'min-width: 100%;max-height: 270px;', store : new Common.Collections.Fonts(), recent : 0, - hint : me.tipFontName + hint : this.tipFontName }).on('selected', _.bind(this.onFontSelect, this)); + this.footerControls.push(this.cmbFontsF); data = [ { value: 8, displayValue: "8" }, @@ -352,7 +366,9 @@ define([ hint: this.tipFontSize, data: data }).on('selected', _.bind(this.onFontSizeSelect, this)); - this.cmbFontSizeH.setValue(this.font.size); + this.cmbFontSizeH.setValue(this._state.fontsize); + this.headerControls.push(this.cmbFontSizeH); + this.cmbFontSizeF = new Common.UI.ComboBox({ el: $('#id-dlg-f-font-size'), cls: 'input-group-nr', @@ -362,116 +378,132 @@ define([ hint: this.tipFontSize, data: data }).on('selected', _.bind(this.onFontSizeSelect, this)); - this.cmbFontSizeF.setValue(this.font.size); + this.cmbFontSizeF.setValue(this._state.fontsize); + this.footerControls.push(this.cmbFontSizeF); - me.btnBoldH = new Common.UI.Button({ + this.btnBoldH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-bold', enableToggle: true, - hint: me.textBold + hint: this.textBold }); - me.btnBoldH.render($('#id-dlg-h-bold')) ; - me.btnBoldH.on('click', _.bind(this.onBoldClick, this)); + this.btnBoldH.render($('#id-dlg-h-bold')) ; + this.btnBoldH.on('click', _.bind(this.onBoldClick, this)); + this.headerControls.push(this.btnBoldH); - me.btnBoldF = new Common.UI.Button({ + this.btnBoldF = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-bold', enableToggle: true, - hint: me.textBold + hint: this.textBold }); - me.btnBoldF.render($('#id-dlg-f-bold')) ; - me.btnBoldF.on('click', _.bind(this.onBoldClick, this)); + this.btnBoldF.render($('#id-dlg-f-bold')) ; + this.btnBoldF.on('click', _.bind(this.onBoldClick, this)); + this.footerControls.push(this.btnBoldF); - me.btnItalicH = new Common.UI.Button({ + this.btnItalicH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-italic', enableToggle: true, - hint: me.textItalic + hint: this.textItalic }); - me.btnItalicH.render($('#id-dlg-h-italic')) ; - me.btnItalicH.on('click', _.bind(this.onItalicClick, this)); + this.btnItalicH.render($('#id-dlg-h-italic')) ; + this.btnItalicH.on('click', _.bind(this.onItalicClick, this)); + this.headerControls.push(this.btnItalicH); - me.btnItalicF = new Common.UI.Button({ + this.btnItalicF = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-italic', enableToggle: true, - hint: me.textItalic + hint: this.textItalic }); - me.btnItalicF.render($('#id-dlg-f-italic')) ; - me.btnItalicF.on('click', _.bind(this.onItalicClick, this)); + this.btnItalicF.render($('#id-dlg-f-italic')) ; + this.btnItalicF.on('click', _.bind(this.onItalicClick, this)); + this.footerControls.push(this.btnItalicF); - me.btnUnderlineH = new Common.UI.Button({ + this.btnUnderlineH = new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-underline', enableToggle: true, - hint: me.textUnderline + hint: this.textUnderline }); - me.btnUnderlineH.render($('#id-dlg-h-underline')) ; - me.btnUnderlineH.on('click', _.bind(this.onUnderlineClick, this)); + this.btnUnderlineH.render($('#id-dlg-h-underline')) ; + this.btnUnderlineH.on('click', _.bind(this.onUnderlineClick, this)); + this.headerControls.push(this.btnUnderlineH); - me.btnUnderlineF = new Common.UI.Button({ + this.btnUnderlineF = new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-underline', enableToggle: true, - hint: me.textUnderline + hint: this.textUnderline }); - me.btnUnderlineF.render($('#id-dlg-f-underline')) ; - me.btnUnderlineF.on('click', _.bind(this.onUnderlineClick, this)); + this.btnUnderlineF.render($('#id-dlg-f-underline')) ; + this.btnUnderlineF.on('click', _.bind(this.onUnderlineClick, this)); + this.footerControls.push(this.btnUnderlineF); - me.btnStrikeoutH = new Common.UI.Button({ + this.btnStrikeoutH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-strikeout', enableToggle: true, - hint: me.textStrikeout + hint: this.textStrikeout }); - me.btnStrikeoutH.render($('#id-dlg-h-strikeout')) ; - me.btnStrikeoutH.on('click',_.bind(this.onStrikeoutClick, this)); - me.btnStrikeoutF = new Common.UI.Button({ + this.btnStrikeoutH.render($('#id-dlg-h-strikeout')) ; + this.btnStrikeoutH.on('click',_.bind(this.onStrikeoutClick, this)); + this.headerControls.push(this.btnStrikeoutH); + + this.btnStrikeoutF = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-strikeout', enableToggle: true, - hint: me.textStrikeout + hint: this.textStrikeout }); - me.btnStrikeoutF.render($('#id-dlg-f-strikeout')) ; - me.btnStrikeoutF.on('click',_.bind(this.onStrikeoutClick, this)); + this.btnStrikeoutF.render($('#id-dlg-f-strikeout')) ; + this.btnStrikeoutF.on('click',_.bind(this.onStrikeoutClick, this)); + this.footerControls.push(this.btnStrikeoutF); this.btnSuperscriptH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-superscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', - hint: me.textSuperscript + hint: this.textSuperscript }); - me.btnSuperscriptH.render($('#id-dlg-h-superscript')) ; - me.btnSuperscriptH.on('click', _.bind(this.onSuperscriptClick, this)); + this.btnSuperscriptH.render($('#id-dlg-h-superscript')) ; + this.btnSuperscriptH.on('click', _.bind(this.onSuperscriptClick, this)); + this.headerControls.push(this.btnSuperscriptH); + this.btnSuperscriptF = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-superscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', - hint: me.textSuperscript + hint: this.textSuperscript }); - me.btnSuperscriptF.render($('#id-dlg-f-superscript')) ; - me.btnSuperscriptF.on('click', _.bind(this.onSuperscriptClick, this)); + this.btnSuperscriptF.render($('#id-dlg-f-superscript')) ; + this.btnSuperscriptF.on('click', _.bind(this.onSuperscriptClick, this)); + this.footerControls.push(this.btnSuperscriptF); this.btnSubscriptH = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-subscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', - hint: me.textSubscript + hint: this.textSubscript }); - me.btnSubscriptH.render($('#id-dlg-h-subscript')) ; - me.btnSubscriptH.on('click', _.bind(this.onSubscriptClick, this)); + this.btnSubscriptH.render($('#id-dlg-h-subscript')) ; + this.btnSubscriptH.on('click', _.bind(this.onSubscriptClick, this)); + this.headerControls.push(this.btnSubscriptH); + this.btnSubscriptF = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-subscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', - hint: me.textSubscript + hint: this.textSubscript }); - me.btnSubscriptF.render($('#id-dlg-f-subscript')) ; - me.btnSubscriptF.on('click', _.bind(this.onSubscriptClick, this)); + this.btnSubscriptF.render($('#id-dlg-f-subscript')) ; + this.btnSubscriptF.on('click', _.bind(this.onSubscriptClick, this)); + this.footerControls.push(this.btnSubscriptF); var initNewColor = function(btn, picker_el) { if (btn && btn.cmpEl) { @@ -488,39 +520,41 @@ define([ picker.on('select', _.bind(me.onColorSelect, me, btn)); return picker; }; - me.btnTextColorH = new Common.UI.Button({ + this.btnTextColorH = new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-fontcolor', - hint : me.textColor, + hint : this.textColor, menu : new Common.UI.Menu({ items: [ { template: _.template('
') }, - { template: _.template('' + me.textNewColor + '') } + { template: _.template('' + this.textNewColor + '') } ] }) }); - me.btnTextColorH.render($('#id-dlg-h-textcolor')); - me.mnuTextColorPickerH = initNewColor(me.btnTextColorH, "#id-dlg-h-menu-fontcolor"); + this.btnTextColorH.render($('#id-dlg-h-textcolor')); + this.mnuTextColorPickerH = initNewColor(this.btnTextColorH, "#id-dlg-h-menu-fontcolor"); + this.headerControls.push(this.btnTextColorH); - me.btnTextColorF = new Common.UI.Button({ + this.btnTextColorF = new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-fontcolor', - hint : me.textColor, + hint : this.textColor, menu : new Common.UI.Menu({ items: [ { template: _.template('
') }, - { template: _.template('' + me.textNewColor + '') } + { template: _.template('' + this.textNewColor + '') } ] }) }); - me.btnTextColorF.render($('#id-dlg-f-textcolor')); - me.mnuTextColorPickerF = initNewColor(me.btnTextColorF, "#id-dlg-f-menu-fontcolor"); + this.btnTextColorF.render($('#id-dlg-f-textcolor')); + this.mnuTextColorPickerF = initNewColor(this.btnTextColorF, "#id-dlg-f-menu-fontcolor"); + this.footerControls.push(this.btnTextColorF); - me.btnOk = new Common.UI.Button({ + this.btnOk = new Common.UI.Button({ el: $window.find('.primary') }); - $window.find('.dlg-btn').on('click', _.bind(me.onBtnClick, me)); + $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); this.scrollers = []; this.initCanvas('#header-left-img'); @@ -530,7 +564,11 @@ define([ this.initCanvas('#footer-center-img'); this.initCanvas('#footer-right-img'); - me.afterRender(); + this.wrapEvents = { + onApiEditorSelectionChanged: _.bind(this.onApiEditorSelectionChanged, this) + }; + + this.afterRender(); }, initCanvas: function(name) { @@ -548,11 +586,13 @@ define([ Common.UI.Window.prototype.show.apply(this, arguments); var me = this; _.delay(function(){ - me.HFObject && me.HFObject.click('#header-left-img', 0, 0); + me.onCanvasClick('#header-left-img'); },500); }, close: function() { + this.api.asc_unregisterCallback('asc_onEditorSelectionChanged', this.wrapEvents.onApiEditorSelectionChanged); + Common.UI.Window.prototype.close.apply(this, arguments); if (this.HFObject) @@ -560,10 +600,12 @@ define([ }, afterRender: function () { + this.api.asc_registerCallback('asc_onEditorSelectionChanged', this.wrapEvents.onApiEditorSelectionChanged); + this.cmbFontsH.fillFonts(this.fontStore); - this.cmbFontsH.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); + this.cmbFontsH.selectRecord(this.fontStore.findWhere({name: this._state.fontname}) || this.fontStore.at(0)); this.cmbFontsF.fillFonts(this.fontStore); - this.cmbFontsF.selectRecord(this.fontStore.findWhere({name: this.font.name}) || this.fontStore.at(0)); + this.cmbFontsF.selectRecord(this.fontStore.findWhere({name: this._state.fontname}) || this.fontStore.at(0)); this.updateThemeColors(); this.HFObject = new AscCommonExcel.CHeaderFooterEditor(['header-left-img', 'header-center-img', 'header-right-img', 'footer-left-img', 'footer-center-img', 'footer-right-img'], 205); @@ -571,10 +613,6 @@ define([ }, _setDefaults: function (props) { - if (props) { - // this.chOddPage.setValue(props.getOdd()); - // this.chFirstPage.setValue(props.getFirst()); - } var presets = []; this.HFObject.getTextPresetsArr().forEach(function(item, index){ presets.push({displayValue: item, value: index}); @@ -584,6 +622,11 @@ define([ this.cmbPresetsF.setData(presets); this.cmbPresetsF.setValue(this.textPresets); + this.chOddPage.setValue(this.HFObject.getDifferentOddEven()); + this.chFirstPage.setValue(this.HFObject.getDifferentFirst()); + this.chAlign.setValue(this.HFObject.getAlignWithMargins()); + this.chScale.setValue(this.HFObject.getScaleWithDoc()); + var value = (this.chOddPage.getValue() == 'checked'); this.btnOdd.setVisible(value); this.btnEven.setVisible(value); @@ -631,20 +674,40 @@ define([ }, onCanvasClick: function(id, event){ - var parent = $(event.currentTarget).parent(), - offset = parent.offset(); - this.HFObject.click(id, event.pageX*Common.Utils.zoom() - offset.left, event.pageY*Common.Utils.zoom() - offset.top + parent.scrollTop()); + if (!this.HFObject) return; + id = id || 'header-left-img'; + + if (event) { + var parent = $(event.currentTarget).parent(), + offset = parent.offset(); + this.HFObject.click(id, event.pageX*Common.Utils.zoom() - offset.left, event.pageY*Common.Utils.zoom() - offset.top + parent.scrollTop()); + } else + this.HFObject.click(id, 0, 0); + + this.scrollerUpdate(); + this.currentCanvas = id; + this.isFooter = (id == '#footer-left-img' || id == '#footer-center-img' || id == '#footer-right-img'); + + var me = this; + this.headerControls.forEach(function(item){ + item.setDisabled(me.isFooter); + }); + this.footerControls.forEach(function(item){ + item.setDisabled(!me.isFooter); + }); }, onPresetSelect: function(footer, combo, record) { if (this.HFObject) this.HFObject.applyPreset(record.value, !!footer); + this.onCanvasClick(footer ? '#footer-left-img' : '#header-left-img'); }, onObjectSelect: function(combo, record) { combo.setValue(this.textInsert); if (this.HFObject) this.HFObject.addField(record.value); + this.onCanvasClick(this.currentCanvas); }, onFontSelect: function(combo, record) { @@ -713,8 +776,14 @@ define([ }, onPageTypeToggle: function(type, btn, state) { - if (state && this.HFObject) + if (state && this.HFObject) { this.HFObject.switchHeaderFooterType(type); + this.onCanvasClick(this.currentCanvas); + } + }, + + onApiEditorSelectionChanged: function(fontobj) { + }, cancelButtonText: 'Cancel', From 47f508b0b2bd03f025965ada919f2bd976eb3b1f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 30 Jan 2019 15:43:30 +0300 Subject: [PATCH 014/510] [SSE] Show font settings for header/footer --- .../main/app/view/HeaderFooterDialog.js | 275 +++++++++++------- 1 file changed, 176 insertions(+), 99 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 72e93e888..b68af4d1f 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -315,7 +315,8 @@ define([ this.cmbInsertF.setValue(this.textInsert); this.footerControls.push(this.cmbInsertF); - this.cmbFontsH = new Common.UI.ComboBoxFonts({ + this.cmbFonts = []; + this.cmbFonts.push(new Common.UI.ComboBoxFonts({ el : $('#id-dlg-h-fonts'), cls : 'input-group-nr', style : 'width: 142px;', @@ -324,10 +325,11 @@ define([ store : new Common.Collections.Fonts(), recent : 0, hint : this.tipFontName - }).on('selected', _.bind(this.onFontSelect, this)); - this.headerControls.push(this.cmbFontsH); + })); + this.cmbFonts[0].on('selected', _.bind(this.onFontSelect, this)); + this.headerControls.push(this.cmbFonts[0]); - this.cmbFontsF = new Common.UI.ComboBoxFonts({ + this.cmbFonts.push(new Common.UI.ComboBoxFonts({ el : $('#id-dlg-f-fonts'), cls : 'input-group-nr', style : 'width: 142px;', @@ -336,8 +338,9 @@ define([ store : new Common.Collections.Fonts(), recent : 0, hint : this.tipFontName - }).on('selected', _.bind(this.onFontSelect, this)); - this.footerControls.push(this.cmbFontsF); + })); + this.cmbFonts[1].on('selected', _.bind(this.onFontSelect, this)); + this.footerControls.push(this.cmbFonts[1]); data = [ { value: 8, displayValue: "8" }, @@ -357,7 +360,8 @@ define([ { value: 48, displayValue: "48" }, { value: 72, displayValue: "72" } ]; - this.cmbFontSizeH = new Common.UI.ComboBox({ + this.cmbFontSize = []; + this.cmbFontSize.push(new Common.UI.ComboBox({ el: $('#id-dlg-h-font-size'), cls: 'input-group-nr', style: 'width: 55px;', @@ -365,11 +369,12 @@ define([ menuStyle: 'min-width: 55px;max-height: 270px;', hint: this.tipFontSize, data: data - }).on('selected', _.bind(this.onFontSizeSelect, this)); - this.cmbFontSizeH.setValue(this._state.fontsize); - this.headerControls.push(this.cmbFontSizeH); + })); + this.cmbFontSize[0].on('selected', _.bind(this.onFontSizeSelect, this)); + this.cmbFontSize[0].setValue(this._state.fontsize); + this.headerControls.push(this.cmbFontSize[0]); - this.cmbFontSizeF = new Common.UI.ComboBox({ + this.cmbFontSize.push(new Common.UI.ComboBox({ el: $('#id-dlg-f-font-size'), cls: 'input-group-nr', style: 'width: 55px;', @@ -377,133 +382,140 @@ define([ menuStyle: 'min-width: 55px;max-height: 270px;', hint: this.tipFontSize, data: data - }).on('selected', _.bind(this.onFontSizeSelect, this)); - this.cmbFontSizeF.setValue(this._state.fontsize); - this.footerControls.push(this.cmbFontSizeF); + })); + this.cmbFontSize[1].on('selected', _.bind(this.onFontSizeSelect, this)); + this.cmbFontSize[1].setValue(this._state.fontsize); + this.footerControls.push(this.cmbFontSize[1]); - this.btnBoldH = new Common.UI.Button({ + this.btnBold = []; + this.btnBold.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-bold', enableToggle: true, hint: this.textBold - }); - this.btnBoldH.render($('#id-dlg-h-bold')) ; - this.btnBoldH.on('click', _.bind(this.onBoldClick, this)); - this.headerControls.push(this.btnBoldH); + })); + this.btnBold[0].render($('#id-dlg-h-bold')) ; + this.btnBold[0].on('click', _.bind(this.onBoldClick, this)); + this.headerControls.push(this.btnBold[0]); - this.btnBoldF = new Common.UI.Button({ + this.btnBold.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-bold', enableToggle: true, hint: this.textBold - }); - this.btnBoldF.render($('#id-dlg-f-bold')) ; - this.btnBoldF.on('click', _.bind(this.onBoldClick, this)); - this.footerControls.push(this.btnBoldF); + })); + this.btnBold[1].render($('#id-dlg-f-bold')) ; + this.btnBold[1].on('click', _.bind(this.onBoldClick, this)); + this.footerControls.push(this.btnBold[1]); - this.btnItalicH = new Common.UI.Button({ + this.btnItalic = []; + this.btnItalic.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-italic', enableToggle: true, hint: this.textItalic - }); - this.btnItalicH.render($('#id-dlg-h-italic')) ; - this.btnItalicH.on('click', _.bind(this.onItalicClick, this)); - this.headerControls.push(this.btnItalicH); + })); + this.btnItalic[0].render($('#id-dlg-h-italic')) ; + this.btnItalic[0].on('click', _.bind(this.onItalicClick, this)); + this.headerControls.push(this.btnItalic[0]); - this.btnItalicF = new Common.UI.Button({ + this.btnItalic.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-italic', enableToggle: true, hint: this.textItalic - }); - this.btnItalicF.render($('#id-dlg-f-italic')) ; - this.btnItalicF.on('click', _.bind(this.onItalicClick, this)); - this.footerControls.push(this.btnItalicF); + })); + this.btnItalic[1].render($('#id-dlg-f-italic')) ; + this.btnItalic[1].on('click', _.bind(this.onItalicClick, this)); + this.footerControls.push(this.btnItalic[1]); - this.btnUnderlineH = new Common.UI.Button({ + this.btnUnderline = []; + this.btnUnderline.push(new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-underline', enableToggle: true, hint: this.textUnderline - }); - this.btnUnderlineH.render($('#id-dlg-h-underline')) ; - this.btnUnderlineH.on('click', _.bind(this.onUnderlineClick, this)); - this.headerControls.push(this.btnUnderlineH); + })); + this.btnUnderline[0].render($('#id-dlg-h-underline')) ; + this.btnUnderline[0].on('click', _.bind(this.onUnderlineClick, this)); + this.headerControls.push(this.btnUnderline[0]); - this.btnUnderlineF = new Common.UI.Button({ + this.btnUnderline.push(new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-underline', enableToggle: true, hint: this.textUnderline - }); - this.btnUnderlineF.render($('#id-dlg-f-underline')) ; - this.btnUnderlineF.on('click', _.bind(this.onUnderlineClick, this)); - this.footerControls.push(this.btnUnderlineF); + })); + this.btnUnderline[1].render($('#id-dlg-f-underline')) ; + this.btnUnderline[1].on('click', _.bind(this.onUnderlineClick, this)); + this.footerControls.push(this.btnUnderline[1]); - this.btnStrikeoutH = new Common.UI.Button({ + this.btnStrikeout = []; + this.btnStrikeout.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-strikeout', enableToggle: true, hint: this.textStrikeout - }); - this.btnStrikeoutH.render($('#id-dlg-h-strikeout')) ; - this.btnStrikeoutH.on('click',_.bind(this.onStrikeoutClick, this)); - this.headerControls.push(this.btnStrikeoutH); + })); + this.btnStrikeout[0].render($('#id-dlg-h-strikeout')) ; + this.btnStrikeout[0].on('click',_.bind(this.onStrikeoutClick, this)); + this.headerControls.push(this.btnStrikeout[0]); - this.btnStrikeoutF = new Common.UI.Button({ + this.btnStrikeout.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-strikeout', enableToggle: true, hint: this.textStrikeout - }); - this.btnStrikeoutF.render($('#id-dlg-f-strikeout')) ; - this.btnStrikeoutF.on('click',_.bind(this.onStrikeoutClick, this)); - this.footerControls.push(this.btnStrikeoutF); + })); + this.btnStrikeout[1].render($('#id-dlg-f-strikeout')) ; + this.btnStrikeout[1].on('click',_.bind(this.onStrikeoutClick, this)); + this.footerControls.push(this.btnStrikeout[1]); - this.btnSuperscriptH = new Common.UI.Button({ + this.btnSuperscript = []; + this.btnSuperscript.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-superscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', hint: this.textSuperscript - }); - this.btnSuperscriptH.render($('#id-dlg-h-superscript')) ; - this.btnSuperscriptH.on('click', _.bind(this.onSuperscriptClick, this)); - this.headerControls.push(this.btnSuperscriptH); + })); + this.btnSuperscript[0].render($('#id-dlg-h-superscript')) ; + this.btnSuperscript[0].on('click', _.bind(this.onSuperscriptClick, this)); + this.headerControls.push(this.btnSuperscript[0]); - this.btnSuperscriptF = new Common.UI.Button({ + this.btnSuperscript.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-superscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', hint: this.textSuperscript - }); - this.btnSuperscriptF.render($('#id-dlg-f-superscript')) ; - this.btnSuperscriptF.on('click', _.bind(this.onSuperscriptClick, this)); - this.footerControls.push(this.btnSuperscriptF); + })); + this.btnSuperscript[1].render($('#id-dlg-f-superscript')) ; + this.btnSuperscript[1].on('click', _.bind(this.onSuperscriptClick, this)); + this.footerControls.push(this.btnSuperscript[1]); - this.btnSubscriptH = new Common.UI.Button({ + this.btnSubscript = []; + this.btnSubscript.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-subscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', hint: this.textSubscript - }); - this.btnSubscriptH.render($('#id-dlg-h-subscript')) ; - this.btnSubscriptH.on('click', _.bind(this.onSubscriptClick, this)); - this.headerControls.push(this.btnSubscriptH); + })); + this.btnSubscript[0].render($('#id-dlg-h-subscript')) ; + this.btnSubscript[0].on('click', _.bind(this.onSubscriptClick, this)); + this.headerControls.push(this.btnSubscript[0]); - this.btnSubscriptF = new Common.UI.Button({ + this.btnSubscript.push(new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'btn-subscript', enableToggle: true, toggleGroup: 'superscriptHFGroup', hint: this.textSubscript - }); - this.btnSubscriptF.render($('#id-dlg-f-subscript')) ; - this.btnSubscriptF.on('click', _.bind(this.onSubscriptClick, this)); - this.footerControls.push(this.btnSubscriptF); + })); + this.btnSubscript[1].render($('#id-dlg-f-subscript')) ; + this.btnSubscript[1].on('click', _.bind(this.onSubscriptClick, this)); + this.footerControls.push(this.btnSubscript[1]); var initNewColor = function(btn, picker_el) { if (btn && btn.cmpEl) { @@ -520,7 +532,8 @@ define([ picker.on('select', _.bind(me.onColorSelect, me, btn)); return picker; }; - this.btnTextColorH = new Common.UI.Button({ + this.btnTextColor = []; + this.btnTextColor.push(new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-fontcolor', hint : this.textColor, @@ -530,12 +543,13 @@ define([ { template: _.template('' + this.textNewColor + '') } ] }) - }); - this.btnTextColorH.render($('#id-dlg-h-textcolor')); - this.mnuTextColorPickerH = initNewColor(this.btnTextColorH, "#id-dlg-h-menu-fontcolor"); - this.headerControls.push(this.btnTextColorH); + })); + this.btnTextColor[0].render($('#id-dlg-h-textcolor')); + this.mnuTextColorPicker = []; + this.mnuTextColorPicker.push(initNewColor(this.btnTextColor[0], "#id-dlg-h-menu-fontcolor")); + this.headerControls.push(this.btnTextColor[0]); - this.btnTextColorF = new Common.UI.Button({ + this.btnTextColor.push(new Common.UI.Button({ cls : 'btn-toolbar', iconCls : 'btn-fontcolor', hint : this.textColor, @@ -545,10 +559,10 @@ define([ { template: _.template('' + this.textNewColor + '') } ] }) - }); - this.btnTextColorF.render($('#id-dlg-f-textcolor')); - this.mnuTextColorPickerF = initNewColor(this.btnTextColorF, "#id-dlg-f-menu-fontcolor"); - this.footerControls.push(this.btnTextColorF); + })); + this.btnTextColor[1].render($('#id-dlg-f-textcolor')); + this.mnuTextColorPicker.push(initNewColor(this.btnTextColor[1], "#id-dlg-f-menu-fontcolor")); + this.footerControls.push(this.btnTextColor[1]); this.btnOk = new Common.UI.Button({ el: $window.find('.primary') @@ -602,10 +616,10 @@ define([ afterRender: function () { this.api.asc_registerCallback('asc_onEditorSelectionChanged', this.wrapEvents.onApiEditorSelectionChanged); - this.cmbFontsH.fillFonts(this.fontStore); - this.cmbFontsH.selectRecord(this.fontStore.findWhere({name: this._state.fontname}) || this.fontStore.at(0)); - this.cmbFontsF.fillFonts(this.fontStore); - this.cmbFontsF.selectRecord(this.fontStore.findWhere({name: this._state.fontname}) || this.fontStore.at(0)); + this.cmbFonts[0].fillFonts(this.fontStore); + this.cmbFonts[0].selectRecord(this.fontStore.findWhere({name: this._state.fontname}) || this.fontStore.at(0)); + this.cmbFonts[1].fillFonts(this.fontStore); + this.cmbFonts[1].selectRecord(this.fontStore.findWhere({name: this._state.fontname}) || this.fontStore.at(0)); this.updateThemeColors(); this.HFObject = new AscCommonExcel.CHeaderFooterEditor(['header-left-img', 'header-center-img', 'header-right-img', 'footer-left-img', 'footer-center-img', 'footer-right-img'], 205); @@ -638,8 +652,8 @@ define([ }, updateThemeColors: function() { - this.mnuTextColorPickerH.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); - this.mnuTextColorPickerF.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); + this.mnuTextColorPicker[0].updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); + this.mnuTextColorPicker[1].updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); }, getSettings: function () { @@ -676,15 +690,6 @@ define([ onCanvasClick: function(id, event){ if (!this.HFObject) return; id = id || 'header-left-img'; - - if (event) { - var parent = $(event.currentTarget).parent(), - offset = parent.offset(); - this.HFObject.click(id, event.pageX*Common.Utils.zoom() - offset.left, event.pageY*Common.Utils.zoom() - offset.top + parent.scrollTop()); - } else - this.HFObject.click(id, 0, 0); - - this.scrollerUpdate(); this.currentCanvas = id; this.isFooter = (id == '#footer-left-img' || id == '#footer-center-img' || id == '#footer-right-img'); @@ -695,6 +700,15 @@ define([ this.footerControls.forEach(function(item){ item.setDisabled(!me.isFooter); }); + + if (event) { + var parent = $(event.currentTarget).parent(), + offset = parent.offset(); + this.HFObject.click(id, event.pageX*Common.Utils.zoom() - offset.left, event.pageY*Common.Utils.zoom() - offset.top + parent.scrollTop()); + } else + this.HFObject.click(id, 0, 0); + + this.scrollerUpdate(); }, onPresetSelect: function(footer, combo, record) { @@ -783,7 +797,70 @@ define([ }, onApiEditorSelectionChanged: function(fontobj) { + var idx = this.isFooter ? 1 : 0, + val; + /* read font name */ + var fontparam = fontobj.asc_getName(); + if (fontparam != this.cmbFonts[idx].getValue()) { + Common.NotificationCenter.trigger('fonts:change', fontobj); + } + + /* read font params */ + val = fontobj.asc_getBold(); + if (this.btnBold[idx].isActive() !== val) + this.btnBold[idx].toggle(val === true, true); + + val = fontobj.asc_getItalic(); + if (this.btnItalic[idx].isActive() !== val) + this.btnItalic[idx].toggle(val === true, true); + + val = fontobj.asc_getUnderline(); + if (this.btnUnderline[idx].isActive() !== val) + this.btnUnderline[idx].toggle(val === true, true); + + val = fontobj.asc_getStrikeout(); + if (this.btnStrikeout[idx].isActive() !== val) + this.btnStrikeout[idx].toggle(val === true, true); + + val = fontobj.asc_getSubscript(); + if (this.btnSubscript[idx].isActive() !== val) + this.btnSubscript[idx].toggle(val === true, true); + + val = fontobj.asc_getSuperscript(); + if (this.btnSuperscript[idx].isActive() !== val) + this.btnSuperscript[idx].toggle(val === true, true); + + /* read font size */ + var str_size = fontobj.asc_getSize(); + if (this.cmbFontSize[idx].getValue() !== str_size) + this.cmbFontSize[idx].setValue((str_size!==undefined) ? str_size : ''); + + /* read font color */ + var clr, + color, + fontColorPicker = this.mnuTextColorPicker[idx]; + color = fontobj.asc_getColor(); + if (color) { + if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) { + clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() }; + } else { + clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()); + } + } + if (_.isObject(clr)) { + var isselected = false; + for (var i = 0; i < 10; i++) { + if (Common.Utils.ThemeColor.ThemeValues[i] == clr.effectValue) { + fontColorPicker.select(clr, true); + isselected = true; + break; + } + } + if (!isselected) fontColorPicker.clearSelection(); + } else { + fontColorPicker.select(clr, true); + } }, cancelButtonText: 'Cancel', From d52a2c6774618e23430a9bc43c89f3232503fd4b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 1 Feb 2019 13:13:44 +0300 Subject: [PATCH 015/510] Register font events in controllers (not in the component ComboBoxFonts) --- .../main/lib/component/ComboBoxFonts.js | 6 +---- .../main/app/controller/Toolbar.js | 5 ++++ .../main/app/controller/Toolbar.js | 5 ++++ .../main/app/controller/Toolbar.js | 5 ++++ .../main/app/view/HeaderFooterDialog.js | 26 ++++++++++++++----- 5 files changed, 36 insertions(+), 11 deletions(-) diff --git a/apps/common/main/lib/component/ComboBoxFonts.js b/apps/common/main/lib/component/ComboBoxFonts.js index f84eb5950..c6a132079 100644 --- a/apps/common/main/lib/component/ComboBoxFonts.js +++ b/apps/common/main/lib/component/ComboBoxFonts.js @@ -95,7 +95,7 @@ define([ this.recent = _.isNumber(options.recent) ? options.recent : 3; - Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this)); + // Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this)); Common.NotificationCenter.on('fonts:load', _.bind(this.fillFonts, this)); }, @@ -115,8 +115,6 @@ define([ this._input.on('focus', _.bind(function() {this.inFormControl = true;}, this)); this._input.on('blur', _.bind(function() {this.inFormControl = false;}, this)); - this._modalParents = this.cmpEl.closest('.asc-window'); - return this; }, @@ -334,8 +332,6 @@ define([ var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getName()); if (this.getRawValue() !== name) { - if (this._modalParents.length > 0) return; - var record = this.store.findWhere({ name: name }); diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index fda331485..0a6d52c89 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -368,6 +368,7 @@ 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)); + Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this)); }, onChangeCompactView: function(view, compact) { @@ -392,6 +393,10 @@ define([ this.toolbar.collapse(); }, + onApiChangeFont: function(font) { + !this.getApplication().getController('Main').isModalShowed && this.toolbar.cmbFontName.onApiChangeFont(font); + }, + onApiFontSize: function(size) { if (this._state.fontsize !== size) { this.toolbar.cmbFontSize.setValue(size); diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 492f45054..63587bfe9 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -319,6 +319,7 @@ define([ this.api.asc_registerCallback('asc_onUnderline', _.bind(this.onApiUnderline, this)); this.api.asc_registerCallback('asc_onStrikeout', _.bind(this.onApiStrikeout, this)); this.api.asc_registerCallback('asc_onVerticalAlign', _.bind(this.onApiVerticalAlign, this)); + Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this)); this.api.asc_registerCallback('asc_onCanUndo', _.bind(this.onApiCanRevert, this, 'undo')); this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo')); @@ -377,6 +378,10 @@ define([ this.toolbar.collapse(); }, + onApiChangeFont: function(font) { + !this.getApplication().getController('Main').isModalShowed && this.toolbar.cmbFontName.onApiChangeFont(font); + }, + onApiFontSize: function(size) { if (this._state.fontsize !== size) { this.toolbar.cmbFontSize.setValue(size); diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index d36b5df49..0b6855422 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -387,6 +387,7 @@ define([ Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiCoAuthoringDisconnect, this)); this.api.asc_registerCallback('asc_onLockDefNameManager', _.bind(this.onLockDefNameManager, this)); this.api.asc_registerCallback('asc_onZoomChanged', _.bind(this.onApiZoomChange, this)); + Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this)); }, // onNewDocument: function(btn, e) { @@ -403,6 +404,10 @@ define([ // Common.component.Analytics.trackEvent('ToolBar', 'Open Document'); // }, + onApiChangeFont: function(font) { + !this.getApplication().getController('Main').isModalShowed && this.toolbar.cmbFontName.onApiChangeFont(font); + }, + onContextMenu: function() { this.toolbar.collapse(); }, diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index b68af4d1f..606d2dc36 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -341,6 +341,7 @@ define([ })); this.cmbFonts[1].on('selected', _.bind(this.onFontSelect, this)); this.footerControls.push(this.cmbFonts[1]); + Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this)); data = [ { value: 8, displayValue: "8" }, @@ -537,6 +538,7 @@ define([ cls : 'btn-toolbar', iconCls : 'btn-fontcolor', hint : this.textColor, + split : true, menu : new Common.UI.Menu({ items: [ { template: _.template('
') }, @@ -545,6 +547,7 @@ define([ }) })); this.btnTextColor[0].render($('#id-dlg-h-textcolor')); + this.btnTextColor[0].on('click', _.bind(this.onTextColor, this)); this.mnuTextColorPicker = []; this.mnuTextColorPicker.push(initNewColor(this.btnTextColor[0], "#id-dlg-h-menu-fontcolor")); this.headerControls.push(this.btnTextColor[0]); @@ -553,6 +556,7 @@ define([ cls : 'btn-toolbar', iconCls : 'btn-fontcolor', hint : this.textColor, + split : true, menu : new Common.UI.Menu({ items: [ { template: _.template('
') }, @@ -561,6 +565,7 @@ define([ }) })); this.btnTextColor[1].render($('#id-dlg-f-textcolor')); + this.btnTextColor[1].on('click', _.bind(this.onTextColor, this)); this.mnuTextColorPicker.push(initNewColor(this.btnTextColor[1], "#id-dlg-f-menu-fontcolor")); this.footerControls.push(this.btnTextColor[1]); @@ -725,17 +730,15 @@ define([ }, onFontSelect: function(combo, record) { - if (this.HFObject) { + if (this.HFObject) this.HFObject.setFontName(record.name); - this.scrollerUpdate(); - } + this.onCanvasClick(this.currentCanvas); }, onFontSizeSelect: function(combo, record) { - if (this.HFObject) { + if (this.HFObject) this.HFObject.setFontSize(record.value); - this.scrollerUpdate(); - } + this.onCanvasClick(this.currentCanvas); }, onBoldClick: function(btn, e) { @@ -780,6 +783,12 @@ define([ } }, + + onTextColor: function() { + var mnuTextColorPicker = this.mnuTextColorPicker[this.isFooter ? 1 : 0]; + mnuTextColorPicker.trigger('select', mnuTextColorPicker, mnuTextColorPicker.currentColor, true); + }, + onColorSelect: function(btn, picker, color) { var clr = (typeof(color) == 'object') ? color.color : color; btn.currentColor = color; @@ -787,6 +796,7 @@ define([ picker.currentColor = color; if (this.HFObject) this.HFObject.setTextColor(Common.Utils.ThemeColor.getRgbColor(color)); + this.onCanvasClick(this.currentCanvas); }, onPageTypeToggle: function(type, btn, state) { @@ -796,6 +806,10 @@ define([ } }, + onApiChangeFont: function(font) { + this.cmbFonts[this.isFooter ? 1 : 0].onApiChangeFont(font); + }, + onApiEditorSelectionChanged: function(fontobj) { var idx = this.isFooter ? 1 : 0, val; From 89e42289b3f995207cc4a1bf505db7d3994b6db0 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 1 Feb 2019 19:51:48 +0300 Subject: [PATCH 016/510] [all] asynchronous loading languages --- apps/common/locale.js | 140 +++++++++++++++++++++++++++++++++--------- 1 file changed, 111 insertions(+), 29 deletions(-) diff --git a/apps/common/locale.js b/apps/common/locale.js index b84aa0c37..b63aa330a 100644 --- a/apps/common/locale.js +++ b/apps/common/locale.js @@ -35,26 +35,27 @@ if (Common === undefined) { } Common.Locale = new(function() { + "use strict"; var l10n = {}; - var _createXMLHTTPObject = function() { - var xmlhttp; - try { - xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); - } - catch (e) { - try { - xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); - } - catch (E) { - xmlhttp = false; - } - } - if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { - xmlhttp = new XMLHttpRequest(); - } - return xmlhttp; - }; + // var _createXMLHTTPObject = function() { + // var xmlhttp; + // try { + // xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + // } + // catch (e) { + // try { + // xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + // } + // catch (E) { + // xmlhttp = false; + // } + // } + // if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { + // xmlhttp = new XMLHttpRequest(); + // } + // return xmlhttp; + // }; var _applyLocalization = function() { try { @@ -96,21 +97,102 @@ Common.Locale = new(function() { return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); }; + // { + // let lang = (_getUrlParameterByName('lang') || 'en').split(/[\-_]/)[0]; + // let httpGet = function(url) { + // return new Promise( + // function (resolve, reject) { + // var request = new XMLHttpRequest(); + // request.onload = function() { + // if ( this.readyState === 4 ) + // if ( this.status == 200 ) { + // resolve(this.responseText); + // } else { + // resolve('failed'); + // } + // else reject('error: ' + this.readyState); + // }; + // request.onerror = function () { + // reject(new Error( + // 'XMLHttpRequest Error: '+this.statusText)); + // }; + // request.open('GET', url); + // request.send(null); + // }); + // } + // + // httpGet('locale/' + lang + '.json') + // .then(function(result) { + // // console.log('httpget result: ' + result); + // + // if ( result == 'failed' ) { + // if ( lang != 'en' ) + // return httpGet('locale/en.json'); + // + // return result; + // } + // + // return result; + // }).then(function(result) { + // if (result == 'failed') + // throw new Error('server error'); + // else { + // let _l10n = JSON.parse(result); + // // console.log('ok: ' + _l10n); + // console.log('ok: '); + // } + // }).catch(function(e) { + // console.log('httpget error: ' + e); + // }); + // } + + var _requireLang = function () { + var lang = (_getUrlParameterByName('lang') || 'en').split(/[\-_]/)[0]; + fetch('locale/' + lang + '.json') + .then(function(response) { + if (!response.ok) { + if (lang != 'en') + /* load default lang if fetch failed */ + return fetch('locale/en.json'); + + throw new Error('server error'); + } + return response.json(); + }).then(function(response) { + if ( response.then ) + return response.json(); + else { + l10n = response; + /* to break promises chain */ + throw new Error('loaded'); + } + }).then(function(json) { + if ( !!json ) l10n = json; + }).catch(function(e) { + console.log('fetch error: ' + e); + }); + }; + + if ( !window.fetch ) { + /* use fetch polifill if native method isn't supported */ + require(['../vendor/fetch/fetch.umd'], _requireLang); + } else _requireLang(); + try { - var langParam = _getUrlParameterByName('lang'); - var xhrObj = _createXMLHTTPObject(); - if (xhrObj && langParam) { - var lang = langParam.split(/[\-\_]/)[0]; - xhrObj.open('GET', 'locale/' + lang + '.json', false); - xhrObj.send(''); - l10n = eval("(" + xhrObj.responseText + ")"); - } + // var langParam = _getUrlParameterByName('lang'); + // var xhrObj = _createXMLHTTPObject(); + // if (xhrObj && langParam) { + // var lang = langParam.split(/[\-\_]/)[0]; + // xhrObj.open('GET', 'locale/' + lang + '.json', false); + // xhrObj.send(''); + // l10n = eval("(" + xhrObj.responseText + ")"); + // } } catch (e) { try { - xhrObj.open('GET', 'locale/en.json', false); - xhrObj.send(''); - l10n = eval("(" + xhrObj.responseText + ")"); + // xhrObj.open('GET', 'locale/en.json', false); + // xhrObj.send(''); + // l10n = eval("(" + xhrObj.responseText + ")"); } catch (e) { } From 74aa97c8f65cf48a0668c5c5b124982ca42dd238 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 4 Feb 2019 15:48:51 +0300 Subject: [PATCH 017/510] [DE] async load plugins list from server --- apps/common/main/lib/util/utils.js | 13 +++++++++++++ apps/documenteditor/main/app/controller/Main.js | 16 +++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index dd8d04051..b6bcf8b26 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -738,6 +738,19 @@ Common.Utils.getConfigJson = function (url) { return null; } +Common.Utils.loadConfig = function(url, callback) { + "use strict"; + + fetch(url) + .then(function(response){ + if ( response.ok ) + return response.json(); + else return 'error'; + }).then(function(json){ + callback(json); + }); +}; + Common.Utils.asyncCall = function (callback, scope, args) { (new Promise(function (resolve, reject) { resolve(); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 999f4001b..e8f758466 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -2054,12 +2054,18 @@ define([ if (!pluginsPath) return; var config_plugins = (this.plugins && this.plugins.pluginsData && this.plugins.pluginsData.length>0) ? this.updatePlugins(this.plugins, false) : null, // return plugins object - request_plugins = this.updatePlugins( Common.Utils.getConfigJson(pluginsPath), false ); + request_plugins /*= this.updatePlugins( Common.Utils.getConfigJson(pluginsPath), false )*/; - this.updatePluginsList({ - autostart: (config_plugins&&config_plugins.autostart ? config_plugins.autostart : []).concat(request_plugins&&request_plugins.autostart ? request_plugins.autostart : []), - pluginsData: (config_plugins ? config_plugins.pluginsData : []).concat(request_plugins ? request_plugins.pluginsData : []) - }, false); + var me = this; + Common.Utils.loadConfig(pluginsPath, function(json) { + if (json != 'error') { + request_plugins = me.updatePlugins(json); + me.updatePluginsList({ + autostart: (config_plugins&&config_plugins.autostart ? config_plugins.autostart : []).concat(request_plugins&&request_plugins.autostart ? request_plugins.autostart : []), + pluginsData: (config_plugins ? config_plugins.pluginsData : []).concat(request_plugins ? request_plugins.pluginsData : []) + }, false); + } + }); }, updatePlugins: function(plugins, uiCustomize) { // plugins from config From 477f3f58d8ed7a2cad4fab3921082b57bf989604 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 4 Feb 2019 15:49:41 +0300 Subject: [PATCH 018/510] [DE] debug --- apps/common/locale.js | 5 ++++- apps/documenteditor/main/app/controller/Main.js | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/common/locale.js b/apps/common/locale.js index b63aa330a..2932d6fa6 100644 --- a/apps/common/locale.js +++ b/apps/common/locale.js @@ -169,7 +169,10 @@ Common.Locale = new(function() { }).then(function(json) { if ( !!json ) l10n = json; }).catch(function(e) { - console.log('fetch error: ' + e); + if ( e.message == 'loaded' ) { + + } else + console.log('fetch error: ' + e); }); }; diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index e8f758466..710e59e3c 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -2083,6 +2083,18 @@ define([ } }); + /**/ + Promise.all(pluginsData.map(url => { + return fetch(url) + .then(response => response.json()); + // .then(json => json); + })).then( values => { + console.log('plugins: ' + values); + }).catch(e => { + console.log('error: ' + e.message); + }); + /**/ + if (arr.length>0) { var autostart = plugins.autostart || plugins.autoStartGuid; if (typeof (autostart) == 'string') From 2419a7d612a5506d220d41a4b9769b8c8c256ad2 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 12 Feb 2019 12:13:45 +0300 Subject: [PATCH 019/510] [SSE] Fix color select for header/footer --- .../spreadsheeteditor/main/app/view/HeaderFooterDialog.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 606d2dc36..a719d1110 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -286,7 +286,6 @@ define([ {displayValue: this.textPageCount, value: Asc.c_oAscHeaderFooterField.pageCount}, {displayValue: this.textDate, value: Asc.c_oAscHeaderFooterField.date}, {displayValue: this.textTime, value: Asc.c_oAscHeaderFooterField.time}, - {displayValue: this.textFilePath, value: Asc.c_oAscHeaderFooterField.filePath}, {displayValue: this.textFileName, value: Asc.c_oAscHeaderFooterField.fileName}, {displayValue: this.textSheet, value: Asc.c_oAscHeaderFooterField.sheetName} ]; @@ -520,12 +519,14 @@ define([ var initNewColor = function(btn, picker_el) { if (btn && btn.cmpEl) { + btn.currentColor = '#000000'; var colorVal = $('
'); $('button:first-child', btn.cmpEl).append(colorVal); - colorVal.css('background-color', btn.currentColor || '#000000'); + colorVal.css('background-color', btn.currentColor); var picker = new Common.UI.ThemeColorPalette({ el: $(picker_el) }); + picker.currentColor = btn.currentColor; } btn.menu.cmpEl.on('click', picker_el+'-new', _.bind(function() { picker.addNewColor((typeof(btn.color) == 'object') ? btn.color.color : btn.color); @@ -711,7 +712,7 @@ define([ offset = parent.offset(); this.HFObject.click(id, event.pageX*Common.Utils.zoom() - offset.left, event.pageY*Common.Utils.zoom() - offset.top + parent.scrollTop()); } else - this.HFObject.click(id, 0, 0); + this.HFObject.click(id); this.scrollerUpdate(); }, @@ -897,7 +898,6 @@ define([ textPageCount: 'Page count', textDate: 'Date', textTime: 'Time', - textFilePath: 'File path', textFileName: 'File name', textSheet: 'Sheet name', textColor: 'Text color', From 8bff4f4b35bd02200a0bfebf6233ac72d5644ef6 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 15 Feb 2019 13:44:37 +0300 Subject: [PATCH 020/510] [DE] moved plugins functions from Main controller --- apps/common/main/lib/controller/Plugins.js | 232 +++++++++++++++++- .../main/app/controller/Main.js | 168 +------------ 2 files changed, 227 insertions(+), 173 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 47d214327..91f89cdd1 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -45,6 +45,8 @@ define([ Common.Controllers.Plugins = Backbone.Controller.extend(_.extend({ models: [], + appOptions: {}, + plugins: { autostart:[] }, collections: [ 'Common.Collections.Plugins' ], @@ -96,6 +98,32 @@ define([ this._moveOffset = {x:0, y:0}; this.autostart = null; + + Common.Gateway.on('init', this.loadConfig.bind(this)); + Common.NotificationCenter.on('app:face', this.onAppShowed.bind(this)); + }, + + loadConfig: function(data) { + var me = this; + me.appOptions.lang = data.config.lang; + me.appOptions.plugins = data.config.plugins; + me.appOptions.editor = DE ? 'word' : PE ? 'slide' : 'cell'; + + me.plugins.autostart = me.appOptions.plugins.autostart; + me.getAppConfigPlugins(me.appOptions.plugins); + + var server_plugins_url = '../../../../plugins.json'; + Common.Utils.loadConfig(server_plugins_url, function (obj) { + if ( obj != 'error' ) { + me.plugins.autostart = _.union(me.plugins.autostart, obj.autostart); + me.getServerPlugins(obj); + } + }); + }, + + onAppShowed: function (config) { + this.appOptions.isEdit = config.isEdit; + // this.appOptions.canPlugins = config.canPlugins; }, setApi: function(api) { @@ -106,14 +134,33 @@ define([ this.api.asc_registerCallback("asc_onPluginResize", _.bind(this.onPluginResize, this)); this.api.asc_registerCallback("asc_onPluginMouseUp", _.bind(this.onPluginMouseUp, this)); this.api.asc_registerCallback("asc_onPluginMouseMove", _.bind(this.onPluginMouseMove, this)); + this.api.asc_registerCallback('asc_onPluginsReset', _.bind(this.resetPluginsList, this)); + // this.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me)); + + /** + * sometime plugins info from server can be received after + * AppShowed event, so try to parse info there + **/ + if ( this.plugins.serverpluginsdata == undefined ) { + console.log('set api: plugins data from server is late') + } else + if ( this.plugins.serverpluginsdata === false ) { + console.log('set api: error for plugins data from server'); + } else { + this.parsePlugins(this.plugins.serverpluginsdata); + } + + if ( this.appOptions.canPlugins ) + this.refreshPluginsList(); return this; }, setMode: function(mode) { - if (mode.canPlugins) { - this.updatePluginsList(); - } + console.log('set plugins mode'); + // if (mode.canPlugins) { + // this.refreshPluginsList(); + // } return this; }, @@ -138,7 +185,7 @@ define([ }); }, - updatePluginsList: function() { + refreshPluginsList: function() { var me = this; var storePlugins = this.getApplication().getCollection('Common.Collections.Plugins'), arr = []; @@ -147,6 +194,7 @@ define([ plugin.set_Name(item.get('name')); plugin.set_Guid(item.get('guid')); plugin.set_BaseUrl(item.get('baseUrl')); + var variations = item.get('variations'), variationsArr = []; variations.forEach(function(itemVar){ @@ -168,8 +216,10 @@ define([ variation.set_Size(itemVar.get('size')); variation.set_InitOnSelectionChanged(itemVar.get('initOnSelectionChanged')); variation.set_Events(itemVar.get('events')); + variationsArr.push(variation); }); + plugin.set_Variations(variationsArr); item.set('pluginObj', plugin); arr.push(plugin); @@ -193,6 +243,7 @@ define([ onResetPlugins: function (collection) { var me = this; + me.appOptions.canPlugins = !collection.isEmpty(); if ( me.$toolbarPanelPlugins ) { me.$toolbarPanelPlugins.empty(); @@ -217,6 +268,8 @@ define([ rank = new_rank; }); _group.appendTo(me.$toolbarPanelPlugins); + } else { + console.error('toolbar panel isnot created'); } }, @@ -397,12 +450,173 @@ define([ }, runAutoStartPlugins: function(autostart) { - if (autostart && autostart.length>0) { - var guid = autostart.shift(); - this.autostart = autostart; - this.api.asc_pluginRun(guid, 0, ''); + autostart = this.plugins.autostart; + if (autostart && autostart.length > 0) { + // var guid = autostart.shift(); + // this.autostart = autostart; + this.api.asc_pluginRun(autostart.shift(), 0, ''); } - } + }, + + resetPluginsList: function() { + this.getApplication().getCollection('Common.Collections.Plugins').reset(); + }, + + applyUICustomization: function () { + var me = this; + if ( me.plugins.uicustom ) { + me.plugins.uicustom.forEach(function (c) { + if ( c.code ) eval(c.code); + }); + } + }, + + parsePlugins: function(pluginsdata, silent/*, uiCustomize*/) { + var me = this; + var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'), + isEdit = me.appOptions.isEdit, + editor = me.appOptions.editor; + if ( pluginsdata instanceof Array ) { + var arr = [], arrUI = [], + lang = me.appOptions.lang.split(/[\-_]/)[0]; + pluginsdata.forEach(function(item){ + if ( arr.some(function(i) { + return (i.get('baseUrl') == item.baseUrl || i.get('guid') == item.guid); + } + ) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid})) + { + return; + } + + var variationsArr = [], + pluginVisible = false; + item.variations.forEach(function(itemVar){ + var visible = (isEdit || itemVar.isViewer && (itemVar.isDisplayedInViewer!==false)) && _.contains(itemVar.EditorsSupport, editor) && !itemVar.isSystem; + if ( visible ) pluginVisible = true; + + if (item.isUICustomizer ) { + visible && arrUI.push({ + url: item.baseUrl + itemVar.url + }); + } else { + var model = new Common.Models.PluginVariation(itemVar); + var description = itemVar.description; + if (typeof itemVar.descriptionLocale == 'object') + description = itemVar.descriptionLocale[lang] || itemVar.descriptionLocale['en'] || description || ''; + + _.each(itemVar.buttons, function(b, index){ + if (typeof b.textLocale == 'object') + b.text = b.textLocale[lang] || b.textLocale['en'] || b.text || ''; + b.visible = (isEdit || b.isViewer !== false); + }); + + model.set({ + description: description, + index: variationsArr.length, + url: itemVar.url, + icons: itemVar.icons, + buttons: itemVar.buttons, + visible: visible + }); + + variationsArr.push(model); + } + }); + + if (variationsArr.length > 0 && !item.isUICustomizer) { + var name = item.name; + if (typeof item.nameLocale == 'object') + name = item.nameLocale[lang] || item.nameLocale['en'] || name || ''; + + arr.push(new Common.Models.Plugin({ + name : name, + guid: item.guid, + baseUrl : item.baseUrl, + variations: variationsArr, + currentVariation: 0, + visible: pluginVisible, + groupName: (item.group) ? item.group.name : '', + groupRank: (item.group) ? item.group.rank : 0 + })); + } + }); + + // if ( uiCustomize!==false ) // from ui customizer in editor config or desktop event + // this.UICustomizePlugins = arrUI; + if ( arrUI.length ) + me.plugins.uicustom = _.union(me.plugins.uicustom, arrUI); + + // if ( !uiCustomize && pluginStore) + { + arr = pluginStore.models.concat(arr); + arr.sort(function(a, b){ + var rank_a = a.get('groupRank'), + rank_b = b.get('groupRank'); + if (rank_a < rank_b) + return (rank_a==0) ? 1 : -1; + if (rank_a > rank_b) + return (rank_b==0) ? -1 : 1; + return 0; + }); + pluginStore.reset(arr, {silent: !!silent}); + // this.appOptions.canPlugins = !pluginStore.isEmpty(); + } + } + // else if (!uiCustomize){ + // this.appOptions.canPlugins = false; + // } + + // if (!uiCustomize) + // this.getApplication().getController('LeftMenu').enablePlugins(); + + // if (this.appOptions.canPlugins) { + // this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions).runAutoStartPlugins(plugins.autostart); + // } + }, + + getServerPlugins: function (config) { + var me = this; + Promise.all(config.pluginsData.map(function(url) { + return fetch(url) + .then(function(response) { + if ( response.ok ) return response.json(); + else return 'error'; + }).then(function(json) { + json.baseUrl = url.substring(0, url.lastIndexOf("config.json")); + return json; + }); + })).then(function(values) { + me.plugins.serverpluginsdata = values; + console.log('server plugins data received'); + }).catch(e => { + me.plugins.serverpluginsdata = false; + console.log('getServerPlugins error: ' + e.message); + }); + }, + + getAppConfigPlugins: function (config) { + var me = this; + Promise.all(config.UIpluginsData.map(function(url) { + return fetch(url) + .then(function(response) {return response.json();}) + .then(function(json) { + json.baseUrl = url.substring(0, url.lastIndexOf("config.json")); + return json; + }); + })).then(function(values) { + me.parsePlugins(values, true); + + if ( me.plugins.uicustom ) { + me.plugins.uicustom.forEach(function (c) { + fetch(c.url) + .then(function (response) {return response.text();}) + .then(function (text) {c.code = text;}); + }); + } + }).catch(e => { + console.log('error: ' + e.message); + }); + }, }, Common.Controllers.Plugins || {})); }); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 3e811ef72..244fc7f62 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -191,7 +191,6 @@ define([ this.editorConfig = {}; this.appOptions = {}; this.plugins = undefined; - this.UICustomizePlugins = []; Common.Gateway.on('init', _.bind(this.loadConfig, this)); Common.Gateway.on('showmessage', _.bind(this.onExternalMessage, this)); Common.Gateway.on('opendocument', _.bind(this.loadDocument, this)); @@ -925,9 +924,9 @@ define([ application.getController('Common.Controllers.ExternalMergeEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization}); pluginsController.setApi(me.api); - me.requestPlugins('../../../../plugins.json'); - me.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me)); - me.api.asc_registerCallback('asc_onPluginsReset', _.bind(me.resetPluginsList, me)); + if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) + pluginsController.runAutoStartPlugins(); + leftmenuController.enablePlugins(); documentHolderController.setApi(me.api); documentHolderController.createDelayedElements(); @@ -1165,10 +1164,7 @@ define([ } this.appOptions.canRename && appHeader.setCanRename(true); - this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); - if (this.appOptions.canBrandingExt) - this.updatePlugins(this.plugins, true); this.applyModeCommonElements(); this.applyModeEditorElements(); @@ -1648,7 +1644,7 @@ define([ Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); - Common.Utils.applyCustomizationPlugins(this.UICustomizePlugins); + this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); } } @@ -2054,162 +2050,6 @@ define([ if (url) this.iframePrint.src = url; }, - requestPlugins: function(pluginsPath) { // request plugins - if (!pluginsPath) return; - - var config_plugins = (this.plugins && this.plugins.pluginsData && this.plugins.pluginsData.length>0) ? this.updatePlugins(this.plugins, false) : null, // return plugins object - request_plugins /*= this.updatePlugins( Common.Utils.getConfigJson(pluginsPath), false )*/; - - var me = this; - Common.Utils.loadConfig(pluginsPath, function(json) { - if (json != 'error') { - request_plugins = me.updatePlugins(json); - me.updatePluginsList({ - autostart: (config_plugins&&config_plugins.autostart ? config_plugins.autostart : []).concat(request_plugins&&request_plugins.autostart ? request_plugins.autostart : []), - pluginsData: (config_plugins ? config_plugins.pluginsData : []).concat(request_plugins ? request_plugins.pluginsData : []) - }, false); - } - }); - }, - - updatePlugins: function(plugins, uiCustomize) { // plugins from config - if (!plugins) return; - - var pluginsData = (uiCustomize) ? plugins.UIpluginsData : plugins.pluginsData; - if (!pluginsData || pluginsData.length<1) return; - - var arr = []; - pluginsData.forEach(function(item){ - var value = Common.Utils.getConfigJson(item); - if (value) { - value.baseUrl = item.substring(0, item.lastIndexOf("config.json")); - arr.push(value); - } - }); - - /**/ - Promise.all(pluginsData.map(url => { - return fetch(url) - .then(response => response.json()); - // .then(json => json); - })).then( values => { - console.log('plugins: ' + values); - }).catch(e => { - console.log('error: ' + e.message); - }); - /**/ - - if (arr.length>0) { - var autostart = plugins.autostart || plugins.autoStartGuid; - if (typeof (autostart) == 'string') - autostart = [autostart]; - plugins.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); - - if (uiCustomize) - this.updatePluginsList({ - autostart: autostart, - pluginsData: arr - }, !!uiCustomize); - else return { - autostart: autostart, - pluginsData: arr - }; - } - }, - - updatePluginsList: function(plugins, uiCustomize) { - var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'), - isEdit = this.appOptions.isEdit; - if (plugins) { - var arr = [], arrUI = [], - lang = this.appOptions.lang.split(/[\-\_]/)[0]; - plugins.pluginsData.forEach(function(item){ - if (_.find(arr, function(arritem) { - return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid); - }) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid})) - return; - - var variationsArr = [], - pluginVisible = false; - item.variations.forEach(function(itemVar){ - var visible = (isEdit || itemVar.isViewer && (itemVar.isDisplayedInViewer!==false)) && _.contains(itemVar.EditorsSupport, 'word') && !itemVar.isSystem; - if ( visible ) pluginVisible = true; - - if (item.isUICustomizer ) { - visible && arrUI.push(item.baseUrl + itemVar.url); - } else { - var model = new Common.Models.PluginVariation(itemVar); - var description = itemVar.description; - if (typeof itemVar.descriptionLocale == 'object') - description = itemVar.descriptionLocale[lang] || itemVar.descriptionLocale['en'] || description || ''; - - _.each(itemVar.buttons, function(b, index){ - if (typeof b.textLocale == 'object') - b.text = b.textLocale[lang] || b.textLocale['en'] || b.text || ''; - b.visible = (isEdit || b.isViewer !== false); - }); - - model.set({ - description: description, - index: variationsArr.length, - url: itemVar.url, - icons: itemVar.icons, - buttons: itemVar.buttons, - visible: visible - }); - - variationsArr.push(model); - } - }); - - if (variationsArr.length>0 && !item.isUICustomizer) { - var name = item.name; - if (typeof item.nameLocale == 'object') - name = item.nameLocale[lang] || item.nameLocale['en'] || name || ''; - - arr.push(new Common.Models.Plugin({ - name : name, - guid: item.guid, - baseUrl : item.baseUrl, - variations: variationsArr, - currentVariation: 0, - visible: pluginVisible, - groupName: (item.group) ? item.group.name : '', - groupRank: (item.group) ? item.group.rank : 0 - })); - } - }); - - if ( uiCustomize!==false ) // from ui customizer in editor config or desktop event - this.UICustomizePlugins = arrUI; - - if ( !uiCustomize && pluginStore) { - arr = pluginStore.models.concat(arr); - arr.sort(function(a, b){ - var rank_a = a.get('groupRank'), - rank_b = b.get('groupRank'); - if (rank_a < rank_b) - return (rank_a==0) ? 1 : -1; - if (rank_a > rank_b) - return (rank_b==0) ? -1 : 1; - return 0; - }); - pluginStore.reset(arr); - this.appOptions.canPlugins = !pluginStore.isEmpty(); - } - } else if (!uiCustomize){ - this.appOptions.canPlugins = false; - } - if (!uiCustomize) this.getApplication().getController('LeftMenu').enablePlugins(); - if (this.appOptions.canPlugins) { - this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions).runAutoStartPlugins(plugins.autostart); - } - }, - - resetPluginsList: function() { - this.getApplication().getCollection('Common.Collections.Plugins').reset(); - }, - leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', defaultTitleText: 'ONLYOFFICE Document Editor', criticalErrorTitle: 'Error', From 83218b80a9e8b6364ff86aeef3aaaa63be61cda2 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 15 Feb 2019 13:44:54 +0300 Subject: [PATCH 021/510] [common] refactoring --- apps/common/main/lib/util/utils.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index c7e8184a1..1625069ca 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -722,22 +722,6 @@ Common.Utils.getConfigJson = function (url) { return null; }; -Common.Utils.getConfigJson = function (url) { - if ( url ) { - try { - var xhrObj = Common.Utils.createXhr(); - if ( xhrObj ) { - xhrObj.open('GET', url, false); - xhrObj.send(''); - - return JSON.parse(xhrObj.responseText); - } - } catch (e) {} - } - - return null; -} - Common.Utils.loadConfig = function(url, callback) { "use strict"; From 963cd66d019591f8960aea787f4453becbd17a61 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 22 Feb 2019 15:28:39 +0300 Subject: [PATCH 022/510] refactoring --- apps/common/main/lib/controller/Chat.js | 15 ++------ .../embed/js/ApplicationController.js | 2 +- .../main/app/view/FootnoteTip.js | 36 +++++++++++-------- apps/documenteditor/main/locale/en.json | 2 +- .../embed/js/ApplicationController.js | 2 +- apps/presentationeditor/main/locale/en.json | 2 +- .../embed/js/ApplicationController.js | 2 +- apps/spreadsheeteditor/main/locale/en.json | 2 +- 8 files changed, 30 insertions(+), 33 deletions(-) diff --git a/apps/common/main/lib/controller/Chat.js b/apps/common/main/lib/controller/Chat.js index 2132767a2..5731e4721 100644 --- a/apps/common/main/lib/controller/Chat.js +++ b/apps/common/main/lib/controller/Chat.js @@ -122,17 +122,7 @@ define([ this._isCoAuthoringStopped = true; this.api.asc_coAuthoringDisconnect(); Common.NotificationCenter.trigger('api:disconnect'); - /* - setTimeout(_.bind(function(){ - Common.UI.alert({ - closable: false, - title: this.notcriticalErrorTitle, - msg: this.textUserLimit, - iconCls: 'warn', - buttons: ['ok'] - }); - }, this), 100); - */ + return; } } @@ -225,7 +215,6 @@ define([ } }, - notcriticalErrorTitle: 'Warning', - textUserLimit: 'You are using ONLYOFFICE Editors free version.
Only two users can co-edit the document simultaneously.
Want more? Consider buying ONLYOFFICE Editors Pro version.
Read more' + notcriticalErrorTitle: 'Warning' }, Common.Controllers.Chat || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 999c40b60..09bd46d62 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -44,7 +44,7 @@ var ApplicationController = new(function(){ // Initialize analytics // ------------------------- -// Common.Analytics.initialize('UA-12442749-13', 'Embedded ONLYOFFICE Document'); +// Common.Analytics.initialize('UA-12442749-13', 'Embedded Document Editor'); // Check browser diff --git a/apps/documenteditor/main/app/view/FootnoteTip.js b/apps/documenteditor/main/app/view/FootnoteTip.js index 9996fff39..8c1956ff2 100644 --- a/apps/documenteditor/main/app/view/FootnoteTip.js +++ b/apps/documenteditor/main/app/view/FootnoteTip.js @@ -2,24 +2,32 @@ * * (c) Copyright Ascensio System SIA 2010-2019 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL 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 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 more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html + * 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 by email at sales@onlyoffice.com + * 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 ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. + * 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  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * 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 * */ diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 7d393094f..3d0c22fcc 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1,7 +1,7 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Warning", "Common.Controllers.Chat.textEnterMessage": "Enter your message here", - "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
Only two users can co-edit the document simultaneously.
Want more? Consider buying ONLYOFFICE Enterprise Edition.
Read more", + "del_Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
Only two users can co-edit the document simultaneously.
Want more? Consider buying ONLYOFFICE Enterprise Edition.
Read more", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anonymous", "Common.Controllers.ExternalDiagramEditor.textClose": "Close", "Common.Controllers.ExternalDiagramEditor.warningText": "The object is disabled because it is being edited by another user.", diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index e8625b6f5..17fc0dcea 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -45,7 +45,7 @@ var ApplicationController = new(function(){ // Initialize analytics // ------------------------- -// Common.Analytics.initialize('UA-12442749-13', 'Embedded ONLYOFFICE Presentation'); +// Common.Analytics.initialize('UA-12442749-13', 'Embedded Presentation Editor'); // Check browser diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 6894b2214..9cec69f44 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1,7 +1,7 @@ { "Common.Controllers.Chat.notcriticalErrorTitle": "Warning", "Common.Controllers.Chat.textEnterMessage": "Enter your message here", - "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
Only two users can co-edit the document simultaneously.
Want more? Consider buying ONLYOFFICE Enterprise Edition.
Read more", + "del_Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
Only two users can co-edit the document simultaneously.
Want more? Consider buying ONLYOFFICE Enterprise Edition.
Read more", "Common.Controllers.ExternalDiagramEditor.textAnonymous": "Anonymous", "Common.Controllers.ExternalDiagramEditor.textClose": "Close", "Common.Controllers.ExternalDiagramEditor.warningText": "The object is disabled because it is being edited by another user.", diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 0aaebd439..edb9d1f5e 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -47,7 +47,7 @@ var ApplicationController = new(function(){ // Initialize analytics // ------------------------- -// Common.Analytics.initialize('UA-12442749-13', 'Embedded ONLYOFFICE Spreadsheet'); +// Common.Analytics.initialize('UA-12442749-13', 'Embedded Spreadsheet Editor'); // Check browser diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 984b927ae..3339833a5 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2,7 +2,7 @@ "cancelButtonText": "Cancel", "Common.Controllers.Chat.notcriticalErrorTitle": "Warning", "Common.Controllers.Chat.textEnterMessage": "Enter your message here", - "Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
Only two users can co-edit the document simultaneously.
Want more? Consider buying ONLYOFFICE Enterprise Edition.
Read more", + "del_Common.Controllers.Chat.textUserLimit": "You are using ONLYOFFICE Free Edition.
Only two users can co-edit the document simultaneously.
Want more? Consider buying ONLYOFFICE Enterprise Edition.
Read more", "Common.UI.ComboBorderSize.txtNoBorders": "No borders", "Common.UI.ComboBorderSizeEditable.txtNoBorders": "No borders", "Common.UI.ComboDataView.emptyComboText": "No styles", From 30dc3098b483da6da6a6810f8aa0437232f54d7c Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 22 Feb 2019 15:52:33 +0300 Subject: [PATCH 023/510] [build] apply tags to vary production info --- apps/common/main/lib/view/About.js | 23 +++++----- apps/common/main/lib/view/Header.js | 2 +- .../main/app/controller/Main.js | 22 ++++++---- apps/documenteditor/main/app/view/LeftMenu.js | 2 +- .../mobile/app/controller/Main.js | 4 +- .../mobile/app/controller/Settings.js | 2 +- .../main/app/controller/Main.js | 6 +-- .../main/app/view/LeftMenu.js | 2 +- .../mobile/app/controller/Main.js | 4 +- .../mobile/app/view/Settings.js | 2 +- .../main/app/controller/Main.js | 6 +-- .../main/app/view/LeftMenu.js | 2 +- .../mobile/app/controller/Main.js | 4 +- .../mobile/app/controller/Settings.js | 2 +- build/Gruntfile.js | 43 +++++++++++++++++++ 15 files changed, 87 insertions(+), 39 deletions(-) diff --git a/apps/common/main/lib/view/About.js b/apps/common/main/lib/view/About.js index 38ad2b36c..068e6bb3c 100644 --- a/apps/common/main/lib/view/About.js +++ b/apps/common/main/lib/view/About.js @@ -53,10 +53,6 @@ define([ Common.UI.BaseView.prototype.initialize.call(this,arguments); this.txtVersionNum = '{{PRODUCT_VERSION}}'; - this.txtAscMail = 'support@onlyoffice.com'; - this.txtAscTelNum = '+371 660-16425'; - this.txtAscUrl = 'www.onlyoffice.com'; - this.txtAscName = 'Ascensio System SIA'; this.template = _.template([ '', @@ -72,29 +68,29 @@ define([ '', '', '', - '', + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '
', '', - '', + '', '
', '', - '' + this.txtAscMail + '', + '<%= supportemail %>', '
', '', - '', + '', '
', - '' + this.txtAscUrl + '', + '<% print(publisherurl.replace(/https?:\\/{2}/, "")) %>', '
', @@ -143,11 +139,11 @@ define([ '
', '', '', - '', + '', '', '', '', - '', + '', '', '', '' @@ -158,6 +154,11 @@ define([ render: function() { var el = $(this.el); el.html(this.template({ + publishername: '{{PUBLISHER_NAME}}', + publisheraddr: '{{PUBLISHER_ADDRESS}}', + publisherurl: /^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1], + supportemail: '{{SUPPORT_EMAIL}}', + phonenum: '{{PUBLISHER_PHONE}}', scope: this })); diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 7d594374a..cb1547d8b 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -208,7 +208,7 @@ define([ if ( me.logo ) me.logo.children(0).on('click', function (e) { var _url = !!me.branding && !!me.branding.logo && (me.branding.logo.url!==undefined) ? - me.branding.logo.url : 'https://www.onlyoffice.com'; + me.branding.logo.url : '{{PUBLISHER_URL}}'; if (_url) { var newDocumentPage = window.open(_url); newDocumentPage && newDocumentPage.focus(); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index d1a306fc5..b3f6f513b 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -286,6 +286,10 @@ define([ } }); } + + this.warnNoLicense = this.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); + this.warnNoLicenseUsers = this.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); + this.textNoLicenseTitle = this.textNoLicenseTitle.replace('%1', '{{COMPANY_NAME}}'); }, loadConfig: function(data) { @@ -1042,9 +1046,9 @@ define([ callback: function(btn) { Common.localStorage.setItem("de-license-warning", now); if (btn == 'buynow') - window.open('https://www.onlyoffice.com', "_blank"); + window.open('{{PUBLISHER_URL}}', "_blank"); else if (btn == 'contact') - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }); } @@ -1053,7 +1057,7 @@ define([ onPaidFeatureError: function() { var buttons = [], primary, - mail = (this.appOptions.canBranding) ? ((this.editorConfig && this.editorConfig.customization && this.editorConfig.customization.customer) ? this.editorConfig.customization.customer.mail : '') : 'sales@onlyoffice.com'; + mail = (this.appOptions.canBranding) ? ((this.editorConfig && this.editorConfig.customization && this.editorConfig.customization.customer) ? this.editorConfig.customization.customer.mail : '') : '{{SALES_EMAIL}}'; if (mail.length>0) { buttons.push({value: 'contact', caption: this.textContactUs}); primary = 'contact'; @@ -1399,7 +1403,7 @@ define([ break; case Asc.c_oAscError.ID.Warning: - config.msg = this.errorConnectToServer; + config.msg = this.errorConnectToServer.replace('%1', 'here'); config.closable = false; break; @@ -2276,13 +2280,13 @@ 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.

' + + 'Find more information about connecting Document Server %1', 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: 'ONLYOFFICE connection limitation', + 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.', warnLicenseExp: 'Your license has expired.
Please update your license and refresh the page.', @@ -2333,8 +2337,8 @@ define([ txtNoTableOfContents: "No table of contents entries found.", txtTableOfContents: "Table of Contents", errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", - warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', - warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', + warnNoLicense: 'This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', + warnNoLicenseUsers: 'This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.', diff --git a/apps/documenteditor/main/app/view/LeftMenu.js b/apps/documenteditor/main/app/view/LeftMenu.js index a59814a56..767fd4613 100644 --- a/apps/documenteditor/main/app/view/LeftMenu.js +++ b/apps/documenteditor/main/app/view/LeftMenu.js @@ -79,7 +79,7 @@ define([ var config = this.mode.customization; config && !!config.feedback && !!config.feedback.url ? window.open(config.feedback.url) : - window.open('http://support.onlyoffice.com'); + window.open('{{SUPPORT_URL}}'); } } }, diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 542d51928..989f8b1f5 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -608,13 +608,13 @@ define([ text: me.textBuyNow, bold: true, onClick: function() { - window.open('https://www.onlyoffice.com', "_blank"); + window.open('{{PUBLISHER_URL}}', "_blank"); } }, { text: me.textContactUs, onClick: function() { - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }]; } diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index e30fcf45b..ea559fef6 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -326,7 +326,7 @@ define([ }, onShowHelp: function () { - window.open('http://support.onlyoffice.com/', "_blank"); + window.open('{{SUPPORT_URL}}', "_blank"); this.hideModal(); }, diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 3a75f5021..92e2ef361 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -803,9 +803,9 @@ define([ callback: function(btn) { Common.localStorage.setItem("pe-license-warning", now); if (btn == 'buynow') - window.open('https://www.onlyoffice.com', "_blank"); + window.open('{{PUBLISHER_URL}}', "_blank"); else if (btn == 'contact') - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }); } @@ -814,7 +814,7 @@ define([ onPaidFeatureError: function() { var buttons = [], primary, - mail = (this.appOptions.canBranding) ? ((this.editorConfig && this.editorConfig.customization && this.editorConfig.customization.customer) ? this.editorConfig.customization.customer.mail : '') : 'sales@onlyoffice.com'; + mail = (this.appOptions.canBranding) ? ((this.editorConfig && this.editorConfig.customization && this.editorConfig.customization.customer) ? this.editorConfig.customization.customer.mail : '') : '{{SALES_EMAIL}}'; if (mail.length>0) { buttons.push({value: 'contact', caption: this.textContactUs}); primary = 'contact'; diff --git a/apps/presentationeditor/main/app/view/LeftMenu.js b/apps/presentationeditor/main/app/view/LeftMenu.js index f1a0509e6..5f8120337 100644 --- a/apps/presentationeditor/main/app/view/LeftMenu.js +++ b/apps/presentationeditor/main/app/view/LeftMenu.js @@ -76,7 +76,7 @@ define([ var config = this.mode.customization; config && !!config.feedback && !!config.feedback.url ? window.open(config.feedback.url) : - window.open('http://support.onlyoffice.com'); + window.open('{{SUPPORT_URL}}'); } } }, diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index aa82f3511..637d10c01 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -563,13 +563,13 @@ define([ text: me.textBuyNow, bold: true, onClick: function() { - window.open('https://www.onlyoffice.com', "_blank"); + window.open('{{PUBLISHER_URL}}', "_blank"); } }, { text: me.textContactUs, onClick: function() { - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }]; } diff --git a/apps/presentationeditor/mobile/app/view/Settings.js b/apps/presentationeditor/mobile/app/view/Settings.js index 5f2d32da8..405c910e8 100644 --- a/apps/presentationeditor/mobile/app/view/Settings.js +++ b/apps/presentationeditor/mobile/app/view/Settings.js @@ -179,7 +179,7 @@ define([ }, showHelp: function () { - window.open('http://support.onlyoffice.com/', "_blank"); + window.open('{{SUPPORT_URL}}', "_blank"); PE.getController('Settings').hideModal(); }, diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index d83047457..7740a426d 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -834,9 +834,9 @@ define([ callback: function(btn) { Common.localStorage.setItem("sse-license-warning", now); if (btn == 'buynow') - window.open('https://www.onlyoffice.com', "_blank"); + window.open('{{PUBLISHER_URL}}', "_blank"); else if (btn == 'contact') - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }); } @@ -845,7 +845,7 @@ define([ onPaidFeatureError: function() { var buttons = [], primary, - mail = (this.appOptions.canBranding) ? ((this.editorConfig && this.editorConfig.customization && this.editorConfig.customization.customer) ? this.editorConfig.customization.customer.mail : '') : 'sales@onlyoffice.com'; + mail = (this.appOptions.canBranding) ? ((this.editorConfig && this.editorConfig.customization && this.editorConfig.customization.customer) ? this.editorConfig.customization.customer.mail : '') : '{{SALES_EMAIL}}'; if (mail.length>0) { buttons.push({value: 'contact', caption: this.textContactUs}); primary = 'contact'; diff --git a/apps/spreadsheeteditor/main/app/view/LeftMenu.js b/apps/spreadsheeteditor/main/app/view/LeftMenu.js index 95f90c320..c88ea99fd 100644 --- a/apps/spreadsheeteditor/main/app/view/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/view/LeftMenu.js @@ -67,7 +67,7 @@ define([ var config = this.mode.customization; config && !!config.feedback && !!config.feedback.url ? window.open(config.feedback.url) : - window.open('http://support.onlyoffice.com'); + window.open('{{SUPPORT_URL}}'); } } }, diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index aaabd781e..a39915ce3 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -581,13 +581,13 @@ define([ text: me.textBuyNow, bold: true, onClick: function() { - window.open('https://www.onlyoffice.com', "_blank"); + window.open('{{PUBLISHER_URL}}', "_blank"); } }, { text: me.textContactUs, onClick: function() { - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }]; } diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index 625a048a7..e4bf4c34e 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -68,7 +68,7 @@ define([ 'Settings': { 'page:show' : this.onPageShow , 'settings:showhelp': function(e) { - window.open('http://support.onlyoffice.com/', "_blank"); + window.open('{{SUPPORT_URL}}', "_blank"); this.hideModal(); } } diff --git a/build/Gruntfile.js b/build/Gruntfile.js index 858b51f43..23206b8e9 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -183,6 +183,33 @@ module.exports = function(grunt) { replacements: [{ from: /\{\{PRODUCT_VERSION\}\}/, to: packageFile.version + },{ + from: /\{\{SUPPORT_EMAIL\}\}/g, + to: 'support@onlyoffice.com' + },{ + from: /\{\{SUPPORT_URL\}\}/g, + to: 'https://support.onlyoffice.com' + },{ + from: /\{\{SALES_EMAIL\}\}/g, + to: 'sales@onlyoffice.com' + },{ + from: /\{\{PUBLISHER_URL\}\}/g, + to: 'https://www.onlyoffice.com' + },{ + from: /\{\{PUBLISHER_PHONE\}\}/, + to: '+371 660-16425' + },{ + from: /\{\{PUBLISHER_NAME\}\}/g, + to: 'Ascensio System SIA' + },{ + from: /\{\{PUBLISHER_ADDRESS\}\}/, + to: '20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050' + }, { + from: /\{\{API_URL_EDITING_CALLBACK\}\}/, + to: 'https://api.onlyoffice.com/editors/callback' + }, { + from: /\{\{COMPANY_NAME\}\}/, + to: 'ONLYOFFICE' }] } }, @@ -245,6 +272,22 @@ module.exports = function(grunt) { } } }); + + var extr = process.env['ASCREPLACE']; + if ( !!extr ) { + var replace = grunt.config.get('replace'); + var pairs = extr.split(';'); + for (var i in pairs) { + var v = pairs[i].split(':'); + + replace.writeVersion.replacements.push({ + from: v[0], + to: v[1] || '' + }); + } + + grunt.config.set('replace', replace); + } }); grunt.registerTask('deploy-reporter', function(){ From 8df10d8348b236f1875a61caf8291d9093796d6d Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 25 Feb 2019 16:04:29 +0300 Subject: [PATCH 024/510] [all] debug plugins loading --- apps/common/main/lib/controller/Plugins.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 91f89cdd1..d2371bfa3 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -107,10 +107,12 @@ define([ var me = this; me.appOptions.lang = data.config.lang; me.appOptions.plugins = data.config.plugins; - me.appOptions.editor = DE ? 'word' : PE ? 'slide' : 'cell'; + me.appOptions.editor = !!window.DE ? 'word' : !!window.PE ? 'slide' : 'cell'; - me.plugins.autostart = me.appOptions.plugins.autostart; - me.getAppConfigPlugins(me.appOptions.plugins); + if ( me.appOptions.plugins ) { + me.plugins.autostart = me.appOptions.plugins.autostart; + me.getAppConfigPlugins(me.appOptions.plugins); + } var server_plugins_url = '../../../../plugins.json'; Common.Utils.loadConfig(server_plugins_url, function (obj) { @@ -157,10 +159,6 @@ define([ }, setMode: function(mode) { - console.log('set plugins mode'); - // if (mode.canPlugins) { - // this.refreshPluginsList(); - // } return this; }, @@ -587,8 +585,8 @@ define([ }); })).then(function(values) { me.plugins.serverpluginsdata = values; - console.log('server plugins data received'); - }).catch(e => { + // console.log('server plugins data received'); + }).catch(function(e) { me.plugins.serverpluginsdata = false; console.log('getServerPlugins error: ' + e.message); }); @@ -613,7 +611,7 @@ define([ .then(function (text) {c.code = text;}); }); } - }).catch(e => { + }).catch(function(e) { console.log('error: ' + e.message); }); }, From 2a085c01c8252c277f30714cbbade8495728acbc Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 25 Feb 2019 16:10:45 +0300 Subject: [PATCH 025/510] [PE, SSE] refactoring for plugins --- .../main/app/controller/Main.js | 150 +----------------- .../main/app/controller/Main.js | 148 +---------------- 2 files changed, 8 insertions(+), 290 deletions(-) diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 3a75f5021..1a74010ca 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -183,7 +183,6 @@ define([ this.editorConfig = {}; this.appOptions = {}; this.plugins = undefined; - this.UICustomizePlugins = []; Common.Gateway.on('init', _.bind(this.loadConfig, this)); Common.Gateway.on('showmessage', _.bind(this.onExternalMessage, this)); Common.Gateway.on('opendocument', _.bind(this.loadDocument, this)); @@ -683,9 +682,9 @@ define([ application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization}); pluginsController.setApi(me.api); - me.requestPlugins('../../../../plugins.json'); - me.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me)); - me.api.asc_registerCallback('asc_onPluginsReset', _.bind(me.resetPluginsList, me)); + if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) + pluginsController.runAutoStartPlugins(); + leftmenuController.enablePlugins(); documentHolderController.setApi(me.api); documentHolderController.createDelayedElements(); @@ -903,10 +902,7 @@ define([ } this.appOptions.canRename && appHeader.setCanRename(true); - this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); - if (this.appOptions.canBrandingExt) - this.updatePlugins(this.plugins, true); this.applyModeCommonElements(); this.applyModeEditorElements(); @@ -1383,7 +1379,7 @@ define([ Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); - Common.Utils.applyCustomizationPlugins(this.UICustomizePlugins); + this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); } } @@ -1802,144 +1798,6 @@ define([ } }, - requestPlugins: function(pluginsPath) { // request plugins - if (!pluginsPath) return; - - var config_plugins = (this.plugins && this.plugins.pluginsData && this.plugins.pluginsData.length>0) ? this.updatePlugins(this.plugins, false) : null, - request_plugins = this.updatePlugins( Common.Utils.getConfigJson(pluginsPath), false ); - - this.updatePluginsList({ - autostart: (config_plugins&&config_plugins.autostart ? config_plugins.autostart : []).concat(request_plugins&&request_plugins.autostart ? request_plugins.autostart : []), - pluginsData: (config_plugins ? config_plugins.pluginsData : []).concat(request_plugins ? request_plugins.pluginsData : []) - }, false); - }, - - - updatePlugins: function(plugins, uiCustomize) { // plugins from config - if (!plugins) return; - - var pluginsData = (uiCustomize) ? plugins.UIpluginsData : plugins.pluginsData; - if (!pluginsData || pluginsData.length<1) return; - - var arr = []; - pluginsData.forEach(function(item){ - var value = Common.Utils.getConfigJson(item); - if (value) { - value.baseUrl = item.substring(0, item.lastIndexOf("config.json")); - arr.push(value); - } - }); - - if (arr.length>0) { - var autostart = plugins.autostart || plugins.autoStartGuid; - if (typeof (autostart) == 'string') - autostart = [autostart]; - plugins.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); - - if (uiCustomize) - this.updatePluginsList({ - autostart: autostart, - pluginsData: arr - }, !!uiCustomize); - else return { - autostart: autostart, - pluginsData: arr - }; - } - }, - - updatePluginsList: function(plugins, uiCustomize) { - var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'), - isEdit = this.appOptions.isEdit; - if (plugins) { - var arr = [], arrUI = [], - lang = this.appOptions.lang.split(/[\-\_]/)[0]; - plugins.pluginsData.forEach(function(item){ - if (_.find(arr, function(arritem) { - return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid); - }) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid})) - return; - - var variationsArr = [], - pluginVisible = false; - item.variations.forEach(function(itemVar){ - var visible = (isEdit || itemVar.isViewer && (itemVar.isDisplayedInViewer!==false)) && _.contains(itemVar.EditorsSupport, 'slide') && !itemVar.isSystem; - if ( visible ) pluginVisible = true; - - if ( item.isUICustomizer ) { - visible && arrUI.push(item.baseUrl + itemVar.url); - } else { - var model = new Common.Models.PluginVariation(itemVar); - var description = itemVar.description; - if (typeof itemVar.descriptionLocale == 'object') - description = itemVar.descriptionLocale[lang] || itemVar.descriptionLocale['en'] || description || ''; - - _.each(itemVar.buttons, function(b, index){ - if (typeof b.textLocale == 'object') - b.text = b.textLocale[lang] || b.textLocale['en'] || b.text || ''; - b.visible = (isEdit || b.isViewer !== false); - }); - - model.set({ - description: description, - index: variationsArr.length, - url: itemVar.url, - icons: itemVar.icons, - buttons: itemVar.buttons, - visible: visible - }); - - variationsArr.push(model); - } - }); - if (variationsArr.length>0 && !item.isUICustomizer) { - var name = item.name; - if (typeof item.nameLocale == 'object') - name = item.nameLocale[lang] || item.nameLocale['en'] || name || ''; - - arr.push(new Common.Models.Plugin({ - name : name, - guid: item.guid, - baseUrl : item.baseUrl, - variations: variationsArr, - currentVariation: 0, - visible: pluginVisible, - groupName: (item.group) ? item.group.name : '', - groupRank: (item.group) ? item.group.rank : 0 - })); - } - }); - - if (uiCustomize!==false) // from ui customizer in editor config or desktop event - this.UICustomizePlugins = arrUI; - - if ( !uiCustomize && pluginStore) { - arr = pluginStore.models.concat(arr); - arr.sort(function(a, b){ - var rank_a = a.get('groupRank'), - rank_b = b.get('groupRank'); - if (rank_a < rank_b) - return (rank_a==0) ? 1 : -1; - if (rank_a > rank_b) - return (rank_b==0) ? -1 : 1; - return 0; - }); - pluginStore.reset(arr); - this.appOptions.canPlugins = !pluginStore.isEmpty(); - } - } else if (!uiCustomize){ - this.appOptions.canPlugins = false; - } - if (!uiCustomize) this.getApplication().getController('LeftMenu').enablePlugins(); - if (this.appOptions.canPlugins) { - this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions).runAutoStartPlugins(plugins.autostart); - } - }, - - resetPluginsList: function() { - this.getApplication().getCollection('Common.Collections.Plugins').reset(); - }, - // Translation leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', defaultTitleText: 'ONLYOFFICE Presentation Editor', diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index c79ac4422..4e70b20de 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -181,7 +181,6 @@ define([ // Initialize api gateway this.editorConfig = {}; this.plugins = undefined; - this.UICustomizePlugins = []; Common.Gateway.on('init', _.bind(this.loadConfig, this)); Common.Gateway.on('showmessage', _.bind(this.onExternalMessage, this)); Common.Gateway.on('opendocument', _.bind(this.loadDocument, this)); @@ -677,9 +676,9 @@ define([ if (!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram) { pluginsController.setApi(me.api); - me.requestPlugins('../../../../plugins.json'); - me.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me)); - me.api.asc_registerCallback('asc_onPluginsReset', _.bind(me.resetPluginsList, me)); + if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) + pluginsController.runAutoStartPlugins(); + leftmenuController.enablePlugins(); } leftMenuView.disableMenu('all',false); @@ -944,8 +943,6 @@ define([ if (!this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge) { this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); - if (this.appOptions.canBrandingExt) - this.updatePlugins(this.plugins, true); } this.applyModeCommonElements(); @@ -1523,7 +1520,7 @@ define([ Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); - Common.Utils.applyCustomizationPlugins(this.UICustomizePlugins); + this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); } } @@ -1998,143 +1995,6 @@ define([ if (url) this.iframePrint.src = url; }, - requestPlugins: function(pluginsPath) { // request plugins - if (!pluginsPath) return; - - var config_plugins = (this.plugins && this.plugins.pluginsData && this.plugins.pluginsData.length>0) ? this.updatePlugins(this.plugins, false) : null, // return plugins object - request_plugins = this.updatePlugins( Common.Utils.getConfigJson(pluginsPath), false ); - - this.updatePluginsList({ - autostart: (config_plugins&&config_plugins.autostart ? config_plugins.autostart : []).concat(request_plugins&&request_plugins.autostart ? request_plugins.autostart : []), - pluginsData: (config_plugins ? config_plugins.pluginsData : []).concat(request_plugins ? request_plugins.pluginsData : []) - }, false); - }, - - updatePlugins: function(plugins, uiCustomize) { // plugins from config - if (!plugins) return; - - var pluginsData = (uiCustomize) ? plugins.UIpluginsData : plugins.pluginsData; - if (!pluginsData || pluginsData.length<1) return; - - var arr = []; - pluginsData.forEach(function(item){ - var value = Common.Utils.getConfigJson(item); - if (value) { - value.baseUrl = item.substring(0, item.lastIndexOf("config.json")); - arr.push(value); - } - }); - - if (arr.length>0) { - var autostart = plugins.autostart || plugins.autoStartGuid; - if (typeof (autostart) == 'string') - autostart = [autostart]; - plugins.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); - - if (uiCustomize) - this.updatePluginsList({ - autostart: autostart, - pluginsData: arr - }, !!uiCustomize); - else return { - autostart: autostart, - pluginsData: arr - }; - } - }, - - updatePluginsList: function(plugins, uiCustomize) { - var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'), - isEdit = this.appOptions.isEdit; - if (plugins) { - var arr = [], arrUI = [], - lang = this.appOptions.lang.split(/[\-\_]/)[0]; - plugins.pluginsData.forEach(function(item){ - if (_.find(arr, function(arritem) { - return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid); - }) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid})) - return; - - var variationsArr = [], - pluginVisible = false; - item.variations.forEach(function(itemVar){ - var visible = (isEdit || itemVar.isViewer && (itemVar.isDisplayedInViewer!==false)) && _.contains(itemVar.EditorsSupport, 'cell') && !itemVar.isSystem; - if ( visible ) pluginVisible = true; - - if ( item.isUICustomizer ) { - visible && arrUI.push(item.baseUrl + itemVar.url); - } else { - var model = new Common.Models.PluginVariation(itemVar); - var description = itemVar.description; - if (typeof itemVar.descriptionLocale == 'object') - description = itemVar.descriptionLocale[lang] || itemVar.descriptionLocale['en'] || description || ''; - - _.each(itemVar.buttons, function(b, index){ - if (typeof b.textLocale == 'object') - b.text = b.textLocale[lang] || b.textLocale['en'] || b.text || ''; - b.visible = (isEdit || b.isViewer !== false); - }); - - model.set({ - description: description, - index: variationsArr.length, - url: itemVar.url, - icons: itemVar.icons, - buttons: itemVar.buttons, - visible: visible - }); - - variationsArr.push(model); - } - }); - if (variationsArr.length>0 && !item.isUICustomizer) { - var name = item.name; - if (typeof item.nameLocale == 'object') - name = item.nameLocale[lang] || item.nameLocale['en'] || name || ''; - - arr.push(new Common.Models.Plugin({ - name : name, - guid: item.guid, - baseUrl : item.baseUrl, - variations: variationsArr, - currentVariation: 0, - visible: pluginVisible, - groupName: (item.group) ? item.group.name : '', - groupRank: (item.group) ? item.group.rank : 0 - })); - } - }); - - if (uiCustomize!==false) // from ui customizer in editor config or desktop event - this.UICustomizePlugins = arrUI; - - if ( !uiCustomize && pluginStore) { - arr = pluginStore.models.concat(arr); - arr.sort(function(a, b){ - var rank_a = a.get('groupRank'), - rank_b = b.get('groupRank'); - if (rank_a < rank_b) - return (rank_a==0) ? 1 : -1; - if (rank_a > rank_b) - return (rank_b==0) ? -1 : 1; - return 0; - }); - pluginStore.reset(arr); - this.appOptions.canPlugins = !pluginStore.isEmpty(); - } - } else if (!uiCustomize){ - this.appOptions.canPlugins = false; - } - if (!uiCustomize) this.getApplication().getController('LeftMenu').enablePlugins(); - if (this.appOptions.canPlugins) { - this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions).runAutoStartPlugins(plugins.autostart); - } - }, - - resetPluginsList: function() { - this.getApplication().getCollection('Common.Collections.Plugins').reset(); - }, - leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', From 325667e0724ba5a0bd4b6a5ad1f9da0dfddc5741 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 25 Feb 2019 16:14:41 +0300 Subject: [PATCH 026/510] [SSE] asynchronous load translation for formulas --- .../main/app/controller/FormulaDialog.js | 69 ++++++---- .../main/app/controller/LeftMenu.js | 5 - .../main/app/controller/Main.js | 15 +-- .../main/app/view/FormulaLang.js | 123 ------------------ 4 files changed, 47 insertions(+), 165 deletions(-) delete mode 100644 apps/spreadsheeteditor/main/app/view/FormulaLang.js diff --git a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js index 941b410ae..7eea41c52 100644 --- a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js +++ b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js @@ -64,6 +64,12 @@ define([ 'FileMenu': { 'settings:apply': function() { me.needUpdateFormula = true; + + var lang = Common.localStorage.getItem("sse-settings-func-locale"); + Common.Utils.InternalSettings.set("sse-settings-func-locale", lang); + + me.formulasGroups.reset(); + me.reloadTranslations(lang); } } }); @@ -73,7 +79,8 @@ define([ this.api = api; if (this.formulasGroups && this.api) { - this.loadingFormulas(); + this.reloadTranslations( + Common.localStorage.getItem("sse-settings-func-locale") || this.appOptions.lang ); var me = this; @@ -82,7 +89,7 @@ define([ toolclose : 'hide', formulasGroups : this.formulasGroups, handler : function (func) { - if (func && me.api) { + if (func) { me.api.asc_insertFormula(func, Asc.c_oAscPopUpSelectorType.Func); } } @@ -90,9 +97,7 @@ define([ this.formulas.on({ 'hide': function () { - if (me.api) { - me.api.asc_enableKeyEvents(true); - } + me.api.asc_enableKeyEvents(true); } }); } @@ -101,19 +106,48 @@ define([ }, setMode: function(mode) { - this.mode = mode; return this; }, onLaunch: function () { this.formulasGroups = this.getApplication().getCollection('FormulaGroups'); + + Common.Gateway.on('init', this.loadConfig.bind(this)); + }, + + loadConfig: function(data) { + this.appOptions = {}; + this.appOptions.lang = data.config.lang; + }, + + reloadTranslations: function (lang) { + var me = this; + lang = (lang || 'en').split(/[\-_]/)[0].toLowerCase(); + + if ( lang != 'en' ) { + Common.Utils.InternalSettings.set("sse-settings-func-locale", lang); + Common.Utils.loadConfig('resources/formula-lang/' + lang + '.json', + function (config) { + if ( config != 'error' ) + me.api.asc_setLocalization(config); + }); + } else me.api.asc_setLocalization(undefined); + + Common.Utils.loadConfig('resources/formula-lang/' + lang + '_desc.json', + function (config) { + if ( config != 'error' ) + me.loadingFormulas(config); + }); }, showDialog: function () { if (this.formulas) { - if (this.needUpdateFormula) - this.updateFormulas(); - this.needUpdateFormula = false; + if ( this.needUpdateFormula ) { + this.needUpdateFormula = false; + + this.formulas.fillFormulasGroups(); + this.formulas.fillFunctions('All'); + } this.formulas.show(); } }, @@ -123,7 +157,7 @@ define([ } }, - loadingFormulas: function () { + loadingFormulas: function (descrarr) { var i = 0, j = 0, ascGroupName, ascFunctions, @@ -137,8 +171,6 @@ define([ allFunctionsGroup = null; if (store) { - var value = SSE.Views.FormulaLang.getDescription(Common.Utils.InternalSettings.get("sse-settings-func-locale")); - allFunctionsGroup = new SSE.Models.FormulaGroup ({ name : 'All', index : index, @@ -172,8 +204,8 @@ define([ index : funcInd, group : ascGroupName, name : ascFunctions[j].asc_getLocaleName(), - args : (value && value[funcname]) ? value[funcname].a : '', - desc : (value && value[funcname]) ? value[funcname].d : '' + args : (descrarr && descrarr[funcname]) ? descrarr[funcname].a : '', + desc : (descrarr && descrarr[funcname]) ? descrarr[funcname].d : '' }); funcInd += 1; @@ -190,15 +222,6 @@ define([ _.sortBy(allFunctions, function (model) {return model.get('name'); })); } } - }, - - updateFormulas: function () { - this.formulasGroups.reset(); - this.loadingFormulas(); - if (this.formulas.$window) { - this.formulas.fillFormulasGroups(); - this.formulas.fillFunctions('All'); - } } }); }); diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index 124df1cd1..70b5c0d4d 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -375,11 +375,6 @@ define([ this.api.asc_setAutoSaveGap(value); } - value = Common.localStorage.getItem("sse-settings-func-locale"); - Common.Utils.InternalSettings.set("sse-settings-func-locale", value); - if (value) value = SSE.Views.FormulaLang.get(value); - if (value!==null) this.api.asc_setLocalization(value); - value = Common.localStorage.getItem("sse-settings-reg-settings"); if (value!==null) this.api.asc_setLocale(parseInt(value)); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 4e70b20de..09db86c08 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -54,8 +54,7 @@ define([ 'spreadsheeteditor/main/app/collection/ShapeGroups', 'spreadsheeteditor/main/app/collection/TableTemplates', 'spreadsheeteditor/main/app/collection/EquationGroups', - 'spreadsheeteditor/main/app/controller/FormulaDialog', - 'spreadsheeteditor/main/app/view/FormulaLang' + 'spreadsheeteditor/main/app/controller/FormulaDialog' ], function () { 'use strict'; @@ -318,18 +317,6 @@ define([ this.api.asc_setLocale((this.editorConfig.lang) ? parseInt(Common.util.LanguageInfo.getLocalLanguageCode(this.editorConfig.lang)) : 0x0409); } - value = Common.localStorage.getItem("sse-settings-func-locale"); - if (value===null) { - var lang = ((this.editorConfig.lang) ? this.editorConfig.lang : 'en').split(/[\-\_]/)[0].toLowerCase(); - Common.Utils.InternalSettings.set("sse-settings-func-locale", lang); - if (lang !== 'en') - value = SSE.Views.FormulaLang.get(lang); - } else { - Common.Utils.InternalSettings.set("sse-settings-func-locale", value); - value = SSE.Views.FormulaLang.get(value); - } - if (value) this.api.asc_setLocalization(value); - value = Common.localStorage.getBool("sse-settings-r1c1"); Common.Utils.InternalSettings.set("sse-settings-r1c1", value); this.api.asc_setR1C1Mode(value); diff --git a/apps/spreadsheeteditor/main/app/view/FormulaLang.js b/apps/spreadsheeteditor/main/app/view/FormulaLang.js deleted file mode 100644 index b3a5915c6..000000000 --- a/apps/spreadsheeteditor/main/app/view/FormulaLang.js +++ /dev/null @@ -1,123 +0,0 @@ -/* - * - * (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 - * -*/ -define([ -], function () { - 'use strict'; - - SSE.Views = SSE.Views || {}; - - SSE.Views.FormulaLang = new(function() { - var langJson = {}, - langDescJson = {}; - - var _createXMLHTTPObject = function() { - var xmlhttp; - try { - xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); - } - catch (e) { - try { - xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); - } - catch (E) { - xmlhttp = false; - } - } - if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { - xmlhttp = new XMLHttpRequest(); - } - return xmlhttp; - }; - - var _get = function(lang) { - if (!lang) return ''; - lang = lang.toLowerCase() ; - - if (langJson[lang]) - return langJson[lang]; - else if (lang == 'en') - return undefined; - else { - try { - var xhrObj = _createXMLHTTPObject(); - if (xhrObj && lang) { - xhrObj.open('GET', 'resources/formula-lang/' + lang + '.json', false); - xhrObj.send(''); - langJson[lang] = eval("(" + xhrObj.responseText + ")"); - return langJson[lang]; - } - } - catch (e) { - } - } - - return null; - }; - - - var _getDescription = function(lang) { - if (!lang) return ''; - lang = lang.toLowerCase() ; - - if (langDescJson[lang]) - return langDescJson[lang]; - else { - try { - var xhrObj = _createXMLHTTPObject(); - if (xhrObj && lang) { - xhrObj.open('GET', 'resources/formula-lang/' + lang + '_desc.json', false); - xhrObj.send(''); - if (xhrObj.status==200 || - (xhrObj.status==0 && !!xhrObj.responseURL && xhrObj.responseURL.startsWith('file://'))) - langDescJson[lang] = eval("(" + xhrObj.responseText + ")"); - else { - xhrObj.open('GET', 'resources/formula-lang/en_desc.json', false); - xhrObj.send(''); - langDescJson[lang] = eval("(" + xhrObj.responseText + ")"); - } - return langDescJson[lang]; - } - } - catch (e) { - } - } - - return null; - }; - - return { - get: _get, - getDescription: _getDescription - }; - })(); -}); From 6cbbcac0db2449cb534126c9efe68f164f66093b Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 26 Feb 2019 12:33:24 +0300 Subject: [PATCH 027/510] [DE] refactoring --- apps/documenteditor/main/app/controller/Main.js | 10 +++++----- build/Gruntfile.js | 16 ---------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index b3f6f513b..78b1a01c0 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -287,9 +287,9 @@ define([ }); } - this.warnNoLicense = this.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); - this.warnNoLicenseUsers = this.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); - this.textNoLicenseTitle = this.textNoLicenseTitle.replace('%1', '{{COMPANY_NAME}}'); + me.warnNoLicense = me.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); + me.warnNoLicenseUsers = me.warnNoLicenseUsers.replace('%1', '{{COMPANY_NAME}}'); + me.textNoLicenseTitle = me.textNoLicenseTitle.replace('%1', '{{COMPANY_NAME}}'); }, loadConfig: function(data) { @@ -1403,7 +1403,7 @@ define([ break; case Asc.c_oAscError.ID.Warning: - config.msg = this.errorConnectToServer.replace('%1', 'here'); + config.msg = this.errorConnectToServer.replace('%1', '{{API_URL_EDITING_CALLBACK}}'); config.closable = false; break; @@ -2281,7 +2281,7 @@ define([ 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 %1', + 'Find more information about connecting Document Server here', 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', diff --git a/build/Gruntfile.js b/build/Gruntfile.js index 23206b8e9..d03c4d3f0 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -272,22 +272,6 @@ module.exports = function(grunt) { } } }); - - var extr = process.env['ASCREPLACE']; - if ( !!extr ) { - var replace = grunt.config.get('replace'); - var pairs = extr.split(';'); - for (var i in pairs) { - var v = pairs[i].split(':'); - - replace.writeVersion.replacements.push({ - from: v[0], - to: v[1] || '' - }); - } - - grunt.config.set('replace', replace); - } }); grunt.registerTask('deploy-reporter', function(){ From 6ccb00be8e22a39d7f16d713daa86e749382930f Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 26 Feb 2019 20:57:23 +0300 Subject: [PATCH 028/510] [all] extend production tags --- .../main/app/controller/Main.js | 2 +- apps/documenteditor/main/locale/en.json | 10 +-- apps/documenteditor/mobile/app.js | 2 +- .../mobile/app/controller/Main.js | 18 +++-- apps/documenteditor/mobile/locale/en.json | 10 +-- .../main/app/controller/Main.js | 16 +++-- apps/presentationeditor/main/locale/en.json | 10 +-- apps/presentationeditor/mobile/app.js | 2 +- .../mobile/app/controller/Main.js | 17 +++-- .../main/app/controller/Main.js | 16 +++-- apps/spreadsheeteditor/main/locale/en.json | 10 +-- apps/spreadsheeteditor/mobile/app.js | 2 +- .../mobile/app/controller/Main.js | 18 +++-- apps/spreadsheeteditor/mobile/locale/en.json | 10 +-- build/Gruntfile.js | 67 +++++++++++-------- 15 files changed, 121 insertions(+), 89 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 78b1a01c0..c6e30de44 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -287,6 +287,7 @@ define([ }); } + me.defaultTitleText = me.defaultTitleText || '{{APP_TITLE_TEXT}}'; me.warnNoLicense = me.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); me.warnNoLicenseUsers = me.warnNoLicenseUsers.replace('%1', '{{COMPANY_NAME}}'); me.textNoLicenseTitle = me.textNoLicenseTitle.replace('%1', '{{COMPANY_NAME}}'); @@ -2197,7 +2198,6 @@ define([ }, leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', - defaultTitleText: 'ONLYOFFICE Document Editor', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', errorDefaultMessage: 'Error code: %1', diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 3d0c22fcc..5bd24ebc4 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -326,7 +326,7 @@ "DE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.", "DE.Controllers.Main.criticalErrorExtText": "Press \"OK\" to return to document list.", "DE.Controllers.Main.criticalErrorTitle": "Error", - "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", + "del_DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", "DE.Controllers.Main.downloadErrorText": "Download failed.", "DE.Controllers.Main.downloadMergeText": "Downloading...", "DE.Controllers.Main.downloadMergeTitle": "Downloading", @@ -335,7 +335,7 @@ "DE.Controllers.Main.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", "DE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Server connection lost. The document cannot be edited right now.", - "DE.Controllers.Main.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", + "DE.Controllers.Main.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", "DE.Controllers.Main.errorDatabaseConnection": "External error.
Database connection error. Please contact support in case the error persists.", "DE.Controllers.Main.errorDataEncrypted": "Encrypted changes have been received, they cannot be deciphered.", "DE.Controllers.Main.errorDataRange": "Incorrect data range.", @@ -401,7 +401,7 @@ "DE.Controllers.Main.textContactUs": "Contact sales", "DE.Controllers.Main.textLicencePaidFeature": "The feature you are trying to use is available for extended license.
If you need it, please contact Sales Department", "DE.Controllers.Main.textLoadingDocument": "Loading document", - "DE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE connection limitation", + "DE.Controllers.Main.textNoLicenseTitle": "%1 connection limitation", "DE.Controllers.Main.textPaidFeature": "Paid feature", "DE.Controllers.Main.textShape": "Shape", "DE.Controllers.Main.textStrict": "Strict mode", @@ -469,8 +469,8 @@ "DE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", "DE.Controllers.Main.warnLicenseExp": "Your license has expired.
Please update your license and refresh the page.", "DE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", - "DE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", - "DE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", + "DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", + "DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "DE.Controllers.Main.txtShape_textRect": "Text Box", "DE.Controllers.Main.txtShape_rect": "Rectangle", diff --git a/apps/documenteditor/mobile/app.js b/apps/documenteditor/mobile/app.js index 249ffe259..6a176b986 100644 --- a/apps/documenteditor/mobile/app.js +++ b/apps/documenteditor/mobile/app.js @@ -180,7 +180,7 @@ require([ //Store Framework7 initialized instance for easy access window.uiApp = new Framework7({ // Default title for modals - modalTitle: 'ONLYOFFICE', + modalTitle: '{{MOBILE_MODAL_TITLE}}', // Enable tap hold events tapHold: true, diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 989f8b1f5..874e99404 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -183,6 +183,11 @@ define([ }); Common.Gateway.internalMessage('listenHardBack'); } + + me.defaultTitleText = me.defaultTitleText || '{{APP_TITLE_TEXT}}'; + me.warnNoLicense = me.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); + me.warnNoLicenseUsers = me.warnNoLicenseUsers.replace('%1', '{{COMPANY_NAME}}'); + me.textNoLicenseTitle = me.textNoLicenseTitle.replace('%1', '{{COMPANY_NAME}}'); }, loadConfig: function(data) { @@ -767,7 +772,7 @@ define([ if (msg && msg.msg) { msg.msg = (msg.msg).toString(); uiApp.addNotification({ - title: 'ONLYOFFICE', + title: uiApp.params.modalTitle, message: [msg.msg.charAt(0).toUpperCase() + msg.msg.substring(1)] }); @@ -887,7 +892,7 @@ define([ break; case Asc.c_oAscError.ID.Warning: - config.msg = this.errorConnectToServer; + config.msg = this.errorConnectToServer.replace('%1', '{{API_URL_EDITING_CALLBACK}}'); break; case Asc.c_oAscError.ID.UplImageUrl: @@ -1250,7 +1255,6 @@ define([ }, leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', - defaultTitleText: 'ONLYOFFICE Document Editor', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', errorDefaultMessage: 'Error code: %1', @@ -1318,10 +1322,10 @@ 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.

Find more information about connecting Document Server here', textTryUndoRedo: 'The Undo/Redo functions are disabled for the Fast co-editing mode.', textBuyNow: 'Visit website', - textNoLicenseTitle: 'ONLYOFFICE open source version', + textNoLicenseTitle: '%1 open source version', textContactUs: 'Contact sales', errorViewerDisconnect: 'Connection is lost. You can still view the document,
but will not be able to download until the connection is restored.', warnLicenseExp: 'Your license has expired.
Please update your license and refresh the page.', @@ -1363,8 +1367,8 @@ define([ txtHeader: "Header", txtFooter: "Footer", txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset', - warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', - warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', + warnNoLicense: 'This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', + warnNoLicenseUsers: 'This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.', diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index cc8f43431..3a437dfa8 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -52,7 +52,7 @@ "DE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.", "DE.Controllers.Main.criticalErrorExtText": "Press 'OK' to return to document list.", "DE.Controllers.Main.criticalErrorTitle": "Error", - "DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", + "del_DE.Controllers.Main.defaultTitleText": "ONLYOFFICE Document Editor", "DE.Controllers.Main.downloadErrorText": "Download failed.", "DE.Controllers.Main.downloadMergeText": "Downloading...", "DE.Controllers.Main.downloadMergeTitle": "Downloading", @@ -61,7 +61,7 @@ "DE.Controllers.Main.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", "DE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect", "DE.Controllers.Main.errorCoAuthoringDisconnect": "Server connection lost. You can't edit anymore.", - "DE.Controllers.Main.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", + "DE.Controllers.Main.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", "DE.Controllers.Main.errorDatabaseConnection": "External error.
Database connection error. Please, contact support.", "DE.Controllers.Main.errorDataEncrypted": "Encrypted changes have been received, they cannot be deciphered.", "DE.Controllers.Main.errorDataRange": "Incorrect data range.", @@ -116,7 +116,7 @@ "DE.Controllers.Main.textContactUs": "Contact sales", "DE.Controllers.Main.textDone": "Done", "DE.Controllers.Main.textLoadingDocument": "Loading document", - "DE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE connection limitation", + "DE.Controllers.Main.textNoLicenseTitle": "%1 connection limitation", "DE.Controllers.Main.textOK": "OK", "DE.Controllers.Main.textPassword": "Password", "DE.Controllers.Main.textPreloader": "Loading... ", @@ -161,8 +161,8 @@ "DE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", "DE.Controllers.Main.warnLicenseExp": "Your license has expired.
Please update your license and refresh the page.", "DE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", - "DE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", - "DE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", + "DE.Controllers.Main.warnNoLicense": "This version of %1 Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", + "DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "DE.Controllers.Search.textNoTextFound": "Text not Found", "DE.Controllers.Search.textReplaceAll": "Replace All", diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 92e2ef361..ba9782286 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -272,6 +272,11 @@ define([ } }); } + + me.defaultTitleText = me.defaultTitleText || '{{APP_TITLE_TEXT}}'; + me.textNoLicenseTitle = me.textNoLicenseTitle.replace('%1', '{{COMPANY_NAME}}'); + me.warnNoLicense = me.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); + me.warnNoLicenseUsers = me.warnNoLicenseUsers.replace('%1', '{{COMPANY_NAME}}'); }, loadConfig: function(data) { @@ -1134,7 +1139,7 @@ define([ break; case Asc.c_oAscError.ID.Warning: - config.msg = this.errorConnectToServer; + config.msg = this.errorConnectToServer.replace('%1', '{{API_URL_EDITING_CALLBACK}}'); config.closable = false; break; @@ -1942,7 +1947,6 @@ define([ // Translation leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', - defaultTitleText: 'ONLYOFFICE Presentation Editor', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', errorDefaultMessage: 'Error code: %1', @@ -2055,11 +2059,11 @@ define([ txtSeries: 'Seria', 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', + 'Find more information about connecting Document Server here', 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', textBuyNow: 'Visit website', - textNoLicenseTitle: 'ONLYOFFICE open source version', + textNoLicenseTitle: '%1 open source version', 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.', warnLicenseExp: 'Your license has expired.
Please update your license and refresh the page.', @@ -2105,8 +2109,8 @@ define([ txtTheme_dotted: 'Dotted', txtTheme_corner: 'Corner', txtTheme_turtle: 'Turtle', - warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', - warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', + warnNoLicense: 'This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', + warnNoLicenseUsers: 'This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.', diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 9cec69f44..7e0f7cdb5 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -244,14 +244,14 @@ "PE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.", "PE.Controllers.Main.criticalErrorExtText": "Press \"OK\" to return to document list.", "PE.Controllers.Main.criticalErrorTitle": "Error", - "PE.Controllers.Main.defaultTitleText": "ONLYOFFICE Presentation Editor", + "del_PE.Controllers.Main.defaultTitleText": "ONLYOFFICE Presentation Editor", "PE.Controllers.Main.downloadErrorText": "Download failed.", "PE.Controllers.Main.downloadTextText": "Downloading presentation...", "PE.Controllers.Main.downloadTitleText": "Downloading Presentation", "PE.Controllers.Main.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", "PE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect", "PE.Controllers.Main.errorCoAuthoringDisconnect": "Server connection lost. The document cannot be edited right now.", - "PE.Controllers.Main.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", + "PE.Controllers.Main.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", "PE.Controllers.Main.errorDatabaseConnection": "External error.
Database connection error. Please contact support in case the error persists.", "PE.Controllers.Main.errorDataEncrypted": "Encrypted changes have been received, they cannot be deciphered.", "PE.Controllers.Main.errorDataRange": "Incorrect data range.", @@ -313,7 +313,7 @@ "PE.Controllers.Main.textContactUs": "Contact sales", "PE.Controllers.Main.textLicencePaidFeature": "The feature you are trying to use is available for extended license.
If you need it, please contact Sales Department", "PE.Controllers.Main.textLoadingDocument": "Loading presentation", - "PE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE connection limitation", + "PE.Controllers.Main.textNoLicenseTitle": "%1 connection limitation", "PE.Controllers.Main.textPaidFeature": "Paid feature", "PE.Controllers.Main.textShape": "Shape", "PE.Controllers.Main.textStrict": "Strict mode", @@ -410,8 +410,8 @@ "PE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", "PE.Controllers.Main.warnLicenseExp": "Your license has expired.
Please update your license and refresh the page.", "PE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", - "PE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", - "PE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", + "PE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", + "PE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", "PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "PE.Controllers.Main.txtShape_textRect": "Text Box", "PE.Controllers.Main.txtShape_rect": "Rectangle", diff --git a/apps/presentationeditor/mobile/app.js b/apps/presentationeditor/mobile/app.js index d3ad21b28..563d162b2 100644 --- a/apps/presentationeditor/mobile/app.js +++ b/apps/presentationeditor/mobile/app.js @@ -179,7 +179,7 @@ require([ //Store Framework7 initialized instance for easy access window.uiApp = new Framework7({ // Default title for modals - modalTitle: 'ONLYOFFICE', + modalTitle: '{{MOBILE_MODAL_TITLE}}', // If it is webapp, we can enable hash navigation: // pushState: false, diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 637d10c01..fb16e6ea1 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -184,6 +184,10 @@ define([ } me.initNames(); + me.defaultTitleText = me.defaultTitleText || '{{APP_TITLE_TEXT}}'; + me.textNoLicenseTitle = me.textNoLicenseTitle.replace('%1', '{{COMPANY_NAME}}'); + me.warnNoLicense = me.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); + me.warnNoLicenseUsers = me.warnNoLicenseUsers.replace('%1', '{{COMPANY_NAME}}'); }, loadConfig: function(data) { @@ -721,7 +725,7 @@ define([ if (msg && msg.msg) { msg.msg = (msg.msg).toString(); uiApp.addNotification({ - title: 'ONLYOFFICE', + title: uiApp.params.modalTitle, message: [msg.msg.charAt(0).toUpperCase() + msg.msg.substring(1)] }); @@ -833,7 +837,7 @@ define([ break; case Asc.c_oAscError.ID.Warning: - config.msg = this.errorConnectToServer; + config.msg = this.errorConnectToServer.replace('%1', '{{API_URL_EDITING_CALLBACK}}'); break; case Asc.c_oAscError.ID.UplImageUrl: @@ -1192,7 +1196,6 @@ define([ // Translation leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', - defaultTitleText: 'ONLYOFFICE Presentation Editor', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', errorDefaultMessage: 'Error code: %1', @@ -1305,10 +1308,10 @@ define([ txtSeries: 'Seria', 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', + 'Find more information about connecting Document Server here', textTryUndoRedo: 'The Undo/Redo functions are disabled for the Fast co-editing mode.', textBuyNow: 'Visit website', - textNoLicenseTitle: 'ONLYOFFICE open source version', + textNoLicenseTitle: '%1 open source version', textContactUs: 'Contact sales', errorViewerDisconnect: 'Connection is lost. You can still view the document,
but will not be able to download until the connection is restored.', warnLicenseExp: 'Your license has expired.
Please update your license and refresh the page.', @@ -1342,8 +1345,8 @@ define([ txtSlideSubtitle: 'Slide subtitle', txtSlideTitle: 'Slide title', txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset', - warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', - warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', + warnNoLicense: 'This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', + warnNoLicenseUsers: 'This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.', diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 7740a426d..5242cd494 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -276,6 +276,11 @@ define([ }, this) } }); + + me.defaultTitleText = me.defaultTitleText || '{{APP_TITLE_TEXT}}'; + me.warnNoLicense = me.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); + me.warnNoLicenseUsers = me.warnNoLicenseUsers.replace('%1', '{{COMPANY_NAME}}'); + me.textNoLicenseTitle = me.textNoLicenseTitle.replace('%1', '{{COMPANY_NAME}}'); }, loadConfig: function(data) { @@ -1289,7 +1294,7 @@ define([ break; case Asc.c_oAscError.ID.Warning: - config.msg = this.errorConnectToServer; + config.msg = this.errorConnectToServer.replace('%1', '{{API_URL_EDITING_CALLBACK}}'); config.closable = false; break; @@ -2233,21 +2238,20 @@ define([ textShape: 'Shape', errorFillRange: 'Could not fill the selected range of cells.
All the merged cells need to be the same size.', errorUpdateVersion: 'The file version has been changed. The page will be reloaded.', - defaultTitleText: 'ONLYOFFICE Spreadsheet Editor', errorUserDrop: 'The file cannot be accessed right now.', txtArt: 'Your text here', errorInvalidRef: 'Enter a correct name for the selection or a valid reference to go to.', errorCreateDefName: 'The existing named ranges cannot be edited and the new ones cannot be created
at the moment as some of them are being edited.', errorPasteMaxRange: 'The copy and paste area does not match. Please select an area with the same size or click the first cell in a row to paste the copied cells.', 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', + 'Find more information about connecting Document Server here', errorLockedWorksheetRename: 'The sheet cannot be renamed at the moment as it is being renamed by another user', 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', errorOpenWarning: 'The length of one of the formulas in the file exceeded
the allowed number of characters and it was removed.', errorFrmlWrongReferences: 'The function refers to a sheet that does not exist.
Please check the data and try again.', textBuyNow: 'Visit website', - textNoLicenseTitle: 'ONLYOFFICE open source version', + textNoLicenseTitle: '%1 open source version', textContactUs: 'Contact sales', confirmPutMergeRange: 'The source data contains merged cells.
They will be unmerged before they are pasted into the table.', errorViewerDisconnect: 'Connection is lost. You can still view the document,
but will not be able to download or print until the connection is restored.', @@ -2290,8 +2294,8 @@ define([ txtStyle_Comma: 'Comma', errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", errorMaxPoints: "The maximum number of points in series per chart is 4096.", - warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', - warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', + warnNoLicense: 'This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', + warnNoLicenseUsers: 'This version of %1 Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 3339833a5..8efb41d1c 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -390,7 +390,7 @@ "SSE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.", "SSE.Controllers.Main.criticalErrorExtText": "Press \"OK\" to return to document list.", "SSE.Controllers.Main.criticalErrorTitle": "Error", - "SSE.Controllers.Main.defaultTitleText": "ONLYOFFICE Spreadsheet Editor", + "del_SSE.Controllers.Main.defaultTitleText": "ONLYOFFICE Spreadsheet Editor", "SSE.Controllers.Main.downloadErrorText": "Download failed.", "SSE.Controllers.Main.downloadTextText": "Downloading spreadsheet...", "SSE.Controllers.Main.downloadTitleText": "Downloading Spreadsheet", @@ -403,7 +403,7 @@ "SSE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect", "SSE.Controllers.Main.errorChangeArray": "You cannot change part of an array.", "SSE.Controllers.Main.errorCoAuthoringDisconnect": "Server connection lost. The document cannot be edited right now.", - "SSE.Controllers.Main.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", + "SSE.Controllers.Main.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", "SSE.Controllers.Main.errorCopyMultiselectArea": "This command cannot be used with multiple selections.
Select a single range and try again.", "SSE.Controllers.Main.errorCountArg": "An error in the entered formula.
Incorrect number of arguments is used.", "SSE.Controllers.Main.errorCountArgExceed": "An error in the entered formula.
Number of arguments is exceeded.", @@ -484,7 +484,7 @@ "SSE.Controllers.Main.textLicencePaidFeature": "The feature you are trying to use is available for extended license.
If you need it, please contact Sales Department", "SSE.Controllers.Main.textLoadingDocument": "Loading spreadsheet", "SSE.Controllers.Main.textNo": "No", - "SSE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE connection limitation", + "SSE.Controllers.Main.textNoLicenseTitle": "%1 connection limitation", "SSE.Controllers.Main.textPaidFeature": "Paid feature", "SSE.Controllers.Main.textPleaseWait": "The operation might take more time than expected. Please wait...", "SSE.Controllers.Main.textRecalcFormulas": "Calculating formulas...", @@ -544,8 +544,8 @@ "SSE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", "SSE.Controllers.Main.warnLicenseExp": "Your license has expired.
Please update your license and refresh the page.", "SSE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", - "SSE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", - "SSE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", + "SSE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", + "SSE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", "SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "SSE.Controllers.Main.txtShape_textRect": "Text Box", "SSE.Controllers.Main.txtShape_rect": "Rectangle", diff --git a/apps/spreadsheeteditor/mobile/app.js b/apps/spreadsheeteditor/mobile/app.js index a4c0195be..20dc8d749 100644 --- a/apps/spreadsheeteditor/mobile/app.js +++ b/apps/spreadsheeteditor/mobile/app.js @@ -164,7 +164,7 @@ require([ //Store Framework7 initialized instance for easy access window.uiApp = new Framework7({ // Default title for modals - modalTitle: 'ONLYOFFICE', + modalTitle: '{{MOBILE_MODAL_TITLE}}', // Enable tap hold events tapHold: true, diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index a39915ce3..04b744e18 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -188,6 +188,11 @@ define([ }); Common.Gateway.internalMessage('listenHardBack'); } + + me.defaultTitleText = me.defaultTitleText || '{{APP_TITLE_TEXT}}'; + me.warnNoLicense = me.warnNoLicense.replace('%1', '{{COMPANY_NAME}}'); + me.warnNoLicenseUsers = me.warnNoLicenseUsers.replace('%1', '{{COMPANY_NAME}}'); + me.textNoLicenseTitle = me.textNoLicenseTitle.replace('%1', '{{COMPANY_NAME}}'); }, loadConfig: function(data) { @@ -730,7 +735,7 @@ define([ if (msg && msg.msg) { msg.msg = (msg.msg).toString(); uiApp.addNotification({ - title: 'ONLYOFFICE', + title: uiApp.params.modalTitle, message: [msg.msg.charAt(0).toUpperCase() + msg.msg.substring(1)] }); @@ -933,7 +938,7 @@ define([ break; case Asc.c_oAscError.ID.Warning: - config.msg = this.errorConnectToServer; + config.msg = this.errorConnectToServer.replace('%1', '{{API_URL_EDITING_CALLBACK}}'); break; case Asc.c_oAscError.ID.LockedWorksheetRename: @@ -1365,7 +1370,6 @@ define([ }, leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', - defaultTitleText: 'ONLYOFFICE Spreadsheet Editor', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning', errorDefaultMessage: 'Error code: %1', @@ -1445,12 +1449,12 @@ define([ 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', + 'Find more information about connecting Document Server here', 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: 'ONLYOFFICE open source version', + textNoLicenseTitle: '%1 open source version', textContactUs: 'Contact sales', errorViewerDisconnect: 'Connection is lost. You can still view the document,
but will not be able to download until the connection is restored.', warnLicenseExp: 'Your license has expired.
Please update your license and refresh the page.', @@ -1505,8 +1509,8 @@ define([ txtStyle_Comma: 'Comma', errorMaxPoints: 'The maximum number of points in series per chart is 4096.', txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset', - warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', - warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', + warnNoLicense: 'This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.', + warnNoLicenseUsers: 'This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.', warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.', diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 2d35f54a6..787834c09 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -102,7 +102,7 @@ "SSE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.", "SSE.Controllers.Main.criticalErrorExtText": "Press 'OK' to return to document list.", "SSE.Controllers.Main.criticalErrorTitle": "Error", - "SSE.Controllers.Main.defaultTitleText": "ONLYOFFICE Spreadsheet Editor", + "del_SSE.Controllers.Main.defaultTitleText": "ONLYOFFICE Spreadsheet Editor", "SSE.Controllers.Main.downloadErrorText": "Download failed.", "SSE.Controllers.Main.downloadMergeText": "Downloading...", "SSE.Controllers.Main.downloadMergeTitle": "Downloading", @@ -117,7 +117,7 @@ "SSE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect", "SSE.Controllers.Main.errorChangeArray": "You cannot change part of an array.", "SSE.Controllers.Main.errorCoAuthoringDisconnect": "Server connection lost. The document cannot be edited right now.", - "SSE.Controllers.Main.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", + "SSE.Controllers.Main.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", "SSE.Controllers.Main.errorCopyMultiselectArea": "This command cannot be used with multiple selections.
Select a single range and try again.", "SSE.Controllers.Main.errorCountArg": "An error in the entered formula.
Incorrect number of arguments is used.", "SSE.Controllers.Main.errorCountArgExceed": "An error in the entered formula.
Number of arguments is exceeded.", @@ -200,7 +200,7 @@ "SSE.Controllers.Main.textContactUs": "Contact sales", "SSE.Controllers.Main.textDone": "Done", "SSE.Controllers.Main.textLoadingDocument": "Loading spreadsheet", - "SSE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE connection limitation", + "SSE.Controllers.Main.textNoLicenseTitle": "%1 connection limitation", "SSE.Controllers.Main.textOK": "OK", "SSE.Controllers.Main.textPassword": "Password", "SSE.Controllers.Main.textPreloader": "Loading... ", @@ -264,8 +264,8 @@ "SSE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", "SSE.Controllers.Main.warnLicenseExp": "Your license has expired.
Please update your license and refresh the page.", "SSE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.", - "SSE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", - "SSE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", + "SSE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.
If you need more please consider purchasing a commercial license.", + "SSE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.
If you need more please consider purchasing a commercial license.", "SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "SSE.Controllers.Search.textNoTextFound": "Text not found", "SSE.Controllers.Search.textReplaceAll": "Replace All", diff --git a/build/Gruntfile.js b/build/Gruntfile.js index d03c4d3f0..dd853abe0 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -12,6 +12,38 @@ module.exports = function(grunt) { ' * Version: <%= pkg.version %> (build:<%= pkg.build %>)\n' + ' */\n'; + var replacements = [ + { + from: /\{\{SUPPORT_EMAIL\}\}/g, + to: 'support@onlyoffice.com' + },{ + from: /\{\{SUPPORT_URL\}\}/g, + to: 'https://support.onlyoffice.com' + },{ + from: /\{\{SALES_EMAIL\}\}/g, + to: 'sales@onlyoffice.com' + },{ + from: /\{\{PUBLISHER_URL\}\}/g, + to: 'https://www.onlyoffice.com' + },{ + from: /\{\{PUBLISHER_PHONE\}\}/, + to: '+371 660-16425' + },{ + from: /\{\{PUBLISHER_NAME\}\}/g, + to: 'Ascensio System SIA' + },{ + from: /\{\{PUBLISHER_ADDRESS\}\}/, + to: '20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050' + },{ + from: /\{\{API_URL_EDITING_CALLBACK\}\}/, + to: 'https://api.onlyoffice.com/editors/callback' + },{ + from: /\{\{COMPANY_NAME\}\}/g, + to: 'ONLYOFFICE' + }, { + from: /\{\{APP_TITLE_TEXT\}\}/g, + to: 'ONLYOFFICE' + }]; grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-copy'); @@ -183,33 +215,6 @@ module.exports = function(grunt) { replacements: [{ from: /\{\{PRODUCT_VERSION\}\}/, to: packageFile.version - },{ - from: /\{\{SUPPORT_EMAIL\}\}/g, - to: 'support@onlyoffice.com' - },{ - from: /\{\{SUPPORT_URL\}\}/g, - to: 'https://support.onlyoffice.com' - },{ - from: /\{\{SALES_EMAIL\}\}/g, - to: 'sales@onlyoffice.com' - },{ - from: /\{\{PUBLISHER_URL\}\}/g, - to: 'https://www.onlyoffice.com' - },{ - from: /\{\{PUBLISHER_PHONE\}\}/, - to: '+371 660-16425' - },{ - from: /\{\{PUBLISHER_NAME\}\}/g, - to: 'Ascensio System SIA' - },{ - from: /\{\{PUBLISHER_ADDRESS\}\}/, - to: '20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050' - }, { - from: /\{\{API_URL_EDITING_CALLBACK\}\}/, - to: 'https://api.onlyoffice.com/editors/callback' - }, { - from: /\{\{COMPANY_NAME\}\}/, - to: 'ONLYOFFICE' }] } }, @@ -272,6 +277,10 @@ module.exports = function(grunt) { } } }); + + var replace = grunt.config.get('replace'); + replace.writeVersion.replacements.push(...replacements); + grunt.config.set('replace', replace); }); grunt.registerTask('deploy-reporter', function(){ @@ -393,6 +402,10 @@ module.exports = function(grunt) { } } }); + + var replace = grunt.config.get('replace'); + replace.writeVersion.replacements.push(...replacements); + grunt.config.set('replace', replace); }); grunt.registerTask('embed-app-init', function() { From 8bf839db424dfc119b1b8770655f4848b454385f Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Thu, 28 Feb 2019 16:14:41 +0300 Subject: [PATCH 029/510] [all] changed templates and styles for vary production --- .../img/about/{onlyoffice.svg => logo.svg} | 0 apps/common/mobile/resources/less/ios/_about.less | 2 +- .../mobile/resources/less/material/_about.less | 2 +- .../mobile/app/template/Settings.template | 14 +++++++------- .../mobile/resources/css/app-ios.css | 2 +- .../mobile/resources/css/app-material.css | 2 +- .../mobile/app/template/Settings.template | 12 ++++++------ .../mobile/resources/css/app-ios.css | 2 +- .../mobile/resources/css/app-material.css | 2 +- .../mobile/app/template/Settings.template | 14 +++++++------- .../mobile/resources/css/app-ios.css | 2 +- .../mobile/resources/css/app-material.css | 2 +- 12 files changed, 28 insertions(+), 28 deletions(-) rename apps/common/mobile/resources/img/about/{onlyoffice.svg => logo.svg} (100%) diff --git a/apps/common/mobile/resources/img/about/onlyoffice.svg b/apps/common/mobile/resources/img/about/logo.svg similarity index 100% rename from apps/common/mobile/resources/img/about/onlyoffice.svg rename to apps/common/mobile/resources/img/about/logo.svg diff --git a/apps/common/mobile/resources/less/ios/_about.less b/apps/common/mobile/resources/less/ios/_about.less index 031a94ebf..28d7460f2 100644 --- a/apps/common/mobile/resources/less/ios/_about.less +++ b/apps/common/mobile/resources/less/ios/_about.less @@ -32,7 +32,7 @@ } .logo { - background: url('../../../../common/mobile/resources/img/about/onlyoffice.svg') no-repeat center; + background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; margin-top: 20px; } } \ No newline at end of file diff --git a/apps/common/mobile/resources/less/material/_about.less b/apps/common/mobile/resources/less/material/_about.less index c317b5939..ce52c8b3e 100644 --- a/apps/common/mobile/resources/less/material/_about.less +++ b/apps/common/mobile/resources/less/material/_about.less @@ -33,6 +33,6 @@ } .logo { - background: url('../../../../common/mobile/resources/img/about/onlyoffice.svg') no-repeat center; + background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/template/Settings.template b/apps/documenteditor/mobile/app/template/Settings.template index 44a610148..139688442 100644 --- a/apps/documenteditor/mobile/app/template/Settings.template +++ b/apps/documenteditor/mobile/app/template/Settings.template @@ -481,18 +481,18 @@

<%= scope.textVersion %> {{PRODUCT_VERSION}}

-

Ascensio System SIA

-

20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050

-

support@onlyoffice.com

-

+371 660-16425

-

www.onlyoffice.com

+

{{PUBLISHER_NAME}}

+

{{PUBLISHER_ADDRESS}}

+

{{SUPPORT_EMAIL}}

+

{{PUBLISHER_PHONE}}

+

<% print(/^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1]); %>

diff --git a/apps/documenteditor/mobile/resources/css/app-ios.css b/apps/documenteditor/mobile/resources/css/app-ios.css index 687d0d69a..43214bec2 100644 --- a/apps/documenteditor/mobile/resources/css/app-ios.css +++ b/apps/documenteditor/mobile/resources/css/app-ios.css @@ -6236,7 +6236,7 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after margin-right: 5px; } .about .logo { - background: url('../../../../common/mobile/resources/img/about/onlyoffice.svg') no-repeat center; + background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; margin-top: 20px; } .tablet .searchbar.document.replace .center .searchbar:first-child { diff --git a/apps/documenteditor/mobile/resources/css/app-material.css b/apps/documenteditor/mobile/resources/css/app-material.css index 17df1a541..722222c5a 100644 --- a/apps/documenteditor/mobile/resources/css/app-material.css +++ b/apps/documenteditor/mobile/resources/css/app-material.css @@ -5836,7 +5836,7 @@ html.phone .document-menu .list-block .item-link { margin-right: 5px; } .about .logo { - background: url('../../../../common/mobile/resources/img/about/onlyoffice.svg') no-repeat center; + background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; } .tablet .searchbar.document.replace .center > .replace { display: flex; diff --git a/apps/presentationeditor/mobile/app/template/Settings.template b/apps/presentationeditor/mobile/app/template/Settings.template index 084d11e32..98f47c812 100644 --- a/apps/presentationeditor/mobile/app/template/Settings.template +++ b/apps/presentationeditor/mobile/app/template/Settings.template @@ -268,17 +268,17 @@

Ascensio System SIA

-

20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050

-

support@onlyoffice.com

-

+371 660-16425

-

www.onlyoffice.com

+

{{PUBLISHER_ADDRESS}}

+

{{SUPPORT_EMAIL}}

+

{{PUBLISHER_PHONE}}

+

<% print(/^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1]); %>

diff --git a/apps/presentationeditor/mobile/resources/css/app-ios.css b/apps/presentationeditor/mobile/resources/css/app-ios.css index 72bce2955..a6034723e 100644 --- a/apps/presentationeditor/mobile/resources/css/app-ios.css +++ b/apps/presentationeditor/mobile/resources/css/app-ios.css @@ -6236,7 +6236,7 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after margin-right: 5px; } .about .logo { - background: url('../../../../common/mobile/resources/img/about/onlyoffice.svg') no-repeat center; + background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; margin-top: 20px; } .tablet .searchbar.document.replace .center .searchbar:first-child { diff --git a/apps/presentationeditor/mobile/resources/css/app-material.css b/apps/presentationeditor/mobile/resources/css/app-material.css index c7e5133e0..12709cd79 100644 --- a/apps/presentationeditor/mobile/resources/css/app-material.css +++ b/apps/presentationeditor/mobile/resources/css/app-material.css @@ -5836,7 +5836,7 @@ html.phone .document-menu .list-block .item-link { margin-right: 5px; } .about .logo { - background: url('../../../../common/mobile/resources/img/about/onlyoffice.svg') no-repeat center; + background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; } .tablet .searchbar.document.replace .center > .replace { display: flex; diff --git a/apps/spreadsheeteditor/mobile/app/template/Settings.template b/apps/spreadsheeteditor/mobile/app/template/Settings.template index 9ca20c7cb..8ad2dbccc 100644 --- a/apps/spreadsheeteditor/mobile/app/template/Settings.template +++ b/apps/spreadsheeteditor/mobile/app/template/Settings.template @@ -289,18 +289,18 @@

<%= scope.textVersion %> {{PRODUCT_VERSION}}

-

Ascensio System SIA

-

20A-12 Ernesta Birznieka-Upisha street, Riga, Latvia, EU, LV-1050

-

support@onlyoffice.com

-

+371 660-16425

-

www.onlyoffice.com

+

{{PUBLISHER_NAME}}

+

{{PUBLISHER_ADDRESS}}

+

{{SUPPORT_EMAIL}}

+

{{PUBLISHER_PHONE}}

+

<% print(/^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1]); %>

diff --git a/apps/spreadsheeteditor/mobile/resources/css/app-ios.css b/apps/spreadsheeteditor/mobile/resources/css/app-ios.css index 9df3be106..258549237 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-ios.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-ios.css @@ -6236,7 +6236,7 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after margin-right: 5px; } .about .logo { - background: url('../../../../common/mobile/resources/img/about/onlyoffice.svg') no-repeat center; + background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; margin-top: 20px; } i.icon.icon-search { diff --git a/apps/spreadsheeteditor/mobile/resources/css/app-material.css b/apps/spreadsheeteditor/mobile/resources/css/app-material.css index 005dee430..b2c38a364 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-material.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-material.css @@ -5846,7 +5846,7 @@ html.phone .document-menu .list-block .item-link { margin-right: 5px; } .about .logo { - background: url('../../../../common/mobile/resources/img/about/onlyoffice.svg') no-repeat center; + background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; } .tablet .searchbar.document.replace .center > .replace { display: flex; From cbb3fe5b74ec6979588f14a9eeb7bb1e4f8f8e9c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 4 Mar 2019 16:02:57 +0300 Subject: [PATCH 030/510] [SSE] Debug formulas (set different languages) --- .../main/app/controller/FormulaDialog.js | 57 +++++++++++++++---- .../main/app/controller/Toolbar.js | 4 +- .../main/app/view/FormulaDialog.js | 2 +- .../main/resources/less/formuladialog.less | 1 + 4 files changed, 49 insertions(+), 15 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js index 7eea41c52..1a64cdfbc 100644 --- a/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js +++ b/apps/spreadsheeteditor/main/app/controller/FormulaDialog.js @@ -60,6 +60,9 @@ define([ initialize: function () { var me = this; + me.langJson = {}; + me.langDescJson = {}; + this.addListeners({ 'FileMenu': { 'settings:apply': function() { @@ -124,20 +127,50 @@ define([ var me = this; lang = (lang || 'en').split(/[\-_]/)[0].toLowerCase(); - if ( lang != 'en' ) { - Common.Utils.InternalSettings.set("sse-settings-func-locale", lang); + Common.Utils.InternalSettings.set("sse-settings-func-locale", lang); + if (me.langJson[lang]) { + me.api.asc_setLocalization(me.langJson[lang]); + Common.NotificationCenter.trigger('formula:settings', this); + } else if (lang == 'en') { + me.api.asc_setLocalization(undefined); + Common.NotificationCenter.trigger('formula:settings', this); + } else { Common.Utils.loadConfig('resources/formula-lang/' + lang + '.json', function (config) { - if ( config != 'error' ) + if ( config != 'error' ) { + me.langJson[lang] = config; me.api.asc_setLocalization(config); + Common.NotificationCenter.trigger('formula:settings', this); + } }); - } else me.api.asc_setLocalization(undefined); + } - Common.Utils.loadConfig('resources/formula-lang/' + lang + '_desc.json', - function (config) { - if ( config != 'error' ) - me.loadingFormulas(config); - }); + if (me.langDescJson[lang]) + me.loadingFormulas(me.langDescJson[lang]); + else { + Common.Utils.loadConfig('resources/formula-lang/' + lang + '_desc.json', + function (config) { + if ( config != 'error' ) { + me.langDescJson[lang] = config; + me.loadingFormulas(config); + } else { + Common.Utils.loadConfig('resources/formula-lang/en_desc.json', + function (config) { + me.langDescJson[lang] = (config != 'error') ? config : null; + me.loadingFormulas(me.langDescJson[lang]); + }); + } + }); + } + }, + + getDescription: function(lang) { + if (!lang) return ''; + lang = lang.toLowerCase() ; + + if (this.langDescJson[lang]) + return this.langDescJson[lang]; + return null; }, showDialog: function () { @@ -145,8 +178,10 @@ define([ if ( this.needUpdateFormula ) { this.needUpdateFormula = false; - this.formulas.fillFormulasGroups(); - this.formulas.fillFunctions('All'); + if (this.formulas.$window) { + this.formulas.fillFormulasGroups(); + this.formulas.fillFunctions('All'); + } } this.formulas.show(); } diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 6173101a8..34435fc7a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -78,9 +78,6 @@ define([ 'Statusbar': { 'sheet:changed': _.bind(this.onApiSheetChanged, this) }, - 'LeftMenu': { - 'settings:apply': _.bind(this.applyFormulaSettings, this) - }, 'Common.Views.Header': { 'toolbar:setcompact': this.onChangeViewMode.bind(this), 'print': function (opts) { @@ -121,6 +118,7 @@ define([ } }); Common.NotificationCenter.on('page:settings', _.bind(this.onApiSheetChanged, this)); + Common.NotificationCenter.on('formula:settings', _.bind(this.applyFormulaSettings, this)); this.editMode = true; this._isAddingShape = false; diff --git a/apps/spreadsheeteditor/main/app/view/FormulaDialog.js b/apps/spreadsheeteditor/main/app/view/FormulaDialog.js index 90275a9bc..c818c000b 100644 --- a/apps/spreadsheeteditor/main/app/view/FormulaDialog.js +++ b/apps/spreadsheeteditor/main/app/view/FormulaDialog.js @@ -56,7 +56,7 @@ define([ _options = {}; _.extend(_options, { - width : 310, + width : 350, height : 490, contentWidth : 390, header : true, diff --git a/apps/spreadsheeteditor/main/resources/less/formuladialog.less b/apps/spreadsheeteditor/main/resources/less/formuladialog.less index 5c7ea4215..c111e1d09 100644 --- a/apps/spreadsheeteditor/main/resources/less/formuladialog.less +++ b/apps/spreadsheeteditor/main/resources/less/formuladialog.less @@ -42,6 +42,7 @@ font-weight: bold; } + word-wrap: break-word; } } } From 1e5a6e6c8d3b1317be994f235a9e0c2b6a9e682a Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 4 Mar 2019 18:13:52 +0300 Subject: [PATCH 031/510] [common] debug plugins loading --- apps/common/main/lib/controller/Plugins.js | 42 +++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index d2371bfa3..f64bbb731 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -593,27 +593,29 @@ define([ }, getAppConfigPlugins: function (config) { - var me = this; - Promise.all(config.UIpluginsData.map(function(url) { - return fetch(url) - .then(function(response) {return response.json();}) - .then(function(json) { - json.baseUrl = url.substring(0, url.lastIndexOf("config.json")); - return json; - }); - })).then(function(values) { - me.parsePlugins(values, true); + if ( config.UIpluginsData ) { + var me = this; + Promise.all(config.UIpluginsData.map(function(url) { + return fetch(url) + .then(function(response) {return response.json();}) + .then(function(json) { + json.baseUrl = url.substring(0, url.lastIndexOf("config.json")); + return json; + }); + })).then(function(values) { + me.parsePlugins(values, true); - if ( me.plugins.uicustom ) { - me.plugins.uicustom.forEach(function (c) { - fetch(c.url) - .then(function (response) {return response.text();}) - .then(function (text) {c.code = text;}); - }); - } - }).catch(function(e) { - console.log('error: ' + e.message); - }); + if ( me.plugins.uicustom ) { + me.plugins.uicustom.forEach(function (c) { + fetch(c.url) + .then(function (response) {return response.text();}) + .then(function (text) {c.code = text;}); + }); + } + }).catch(function(e) { + console.log('error: ' + e.message); + }); + } }, }, Common.Controllers.Plugins || {})); From a481caff438c40a9d5b3a4789a9d2c0b52e99c3e Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 12 Mar 2019 15:45:32 +0300 Subject: [PATCH 032/510] [DE] create url with data for action/command --- apps/api/documents/api.js | 11 +++++++++++ apps/common/Gateway.js | 8 ++++++++ apps/documenteditor/main/app/controller/Links.js | 3 +++ apps/documenteditor/main/app/controller/Main.js | 1 + 4 files changed, 23 insertions(+) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 3d84e1e3e..1f5b55412 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -197,6 +197,7 @@ _config.editorConfig.canRequestEditRights = _config.events && !!_config.events.onRequestEditRights; _config.editorConfig.canRequestClose = _config.events && !!_config.events.onRequestClose; _config.editorConfig.canRename = _config.events && !!_config.events.onRequestRename; + _config.editorConfig.canMakeActionLink = _config.events && !!_config.events.onMakeActionLink; _config.editorConfig.mergeFolderUrl = _config.editorConfig.mergeFolderUrl || _config.editorConfig.saveAsUrl; _config.frameEditorId = placeholderId; @@ -509,6 +510,15 @@ }); }; + var _setActionLink = function (data) { + _sendCommand({ + command: 'setActionLink', + data: { + url: data + } + }); + }; + var _processMailMerge = function(enabled, message) { _sendCommand({ command: 'processMailMerge', @@ -559,6 +569,7 @@ refreshHistory : _refreshHistory, setHistoryData : _setHistoryData, setEmailAddresses : _setEmailAddresses, + setActionLink : _setActionLink, processMailMerge : _processMailMerge, downloadAs : _downloadAs, serviceCommand : _serviceCommand, diff --git a/apps/common/Gateway.js b/apps/common/Gateway.js index fe0cc2d50..a906dedba 100644 --- a/apps/common/Gateway.js +++ b/apps/common/Gateway.js @@ -76,6 +76,10 @@ if (Common === undefined) { $me.trigger('setemailaddresses', data); }, + 'setActionLink': function (data) { + $me.trigger('setactionlink', data.url); + }, + 'processMailMerge': function(data) { $me.trigger('processmailmerge', data); }, @@ -254,6 +258,10 @@ if (Common === undefined) { _postMessage({event: 'onRequestClose'}); }, + requestMakeActionLink: function (config) { + _postMessage({event:'onMakeActionLink', data: config}) + }, + on: function(event, handler){ var localHandler = function(event, data){ handler.call(me, data) diff --git a/apps/documenteditor/main/app/controller/Links.js b/apps/documenteditor/main/app/controller/Links.js index 8afbc37cf..df5a31c8e 100644 --- a/apps/documenteditor/main/app/controller/Links.js +++ b/apps/documenteditor/main/app/controller/Links.js @@ -78,6 +78,9 @@ define([ this._state = { prcontrolsdisable:undefined }; + Common.Gateway.on('setactionlink', function (url) { + console.log('url with actions: ' + url); + }.bind(this)); }, setApi: function (api) { diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 8704581d2..797e0b18f 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -326,6 +326,7 @@ define([ this.appOptions.canBack = this.appOptions.canBackToFolder === true; this.appOptions.canPlugins = false; this.plugins = this.editorConfig.plugins; + this.appOptions.canMakeActionLink = this.editorConfig.canMakeActionLink; appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); appHeader.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : '') From b779bddb593627c190464e3cb9559d41bf28f45f Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 12 Mar 2019 15:47:05 +0300 Subject: [PATCH 033/510] [all] send action data to sdk --- apps/documenteditor/main/app/controller/Main.js | 6 ++++-- apps/presentationeditor/main/app/controller/Main.js | 6 ++++-- apps/spreadsheeteditor/main/app/controller/Main.js | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 797e0b18f..2d4277a2a 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -351,7 +351,9 @@ define([ this.permissions = $.extend(this.permissions, data.doc.permissions); var _permissions = $.extend({}, data.doc.permissions), - _user = new Asc.asc_CUserInfo(); + _options = $.extend({}, data.doc.options, {actions: this.editorConfig.actionLink || {}}); + + var _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -361,7 +363,7 @@ define([ docInfo.put_Title(data.doc.title); docInfo.put_Format(data.doc.fileType); docInfo.put_VKey(data.doc.vkey); - docInfo.put_Options(data.doc.options); + docInfo.put_Options(_options); docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 65fc053c6..4acd69b04 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -341,7 +341,9 @@ define([ this.permissions = $.extend(this.permissions, data.doc.permissions); var _permissions = $.extend({}, data.doc.permissions), - _user = new Asc.asc_CUserInfo(); + _options = $.extend({}, data.doc.options, {actions: this.editorConfig.actionLink || {}}); + + var _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -351,7 +353,7 @@ define([ docInfo.put_Title(data.doc.title); docInfo.put_Format(data.doc.fileType); docInfo.put_VKey(data.doc.vkey); - docInfo.put_Options(data.doc.options); + docInfo.put_Options(_options); docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index fa50ebc4e..2e0295e41 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -365,7 +365,9 @@ define([ this.permissions = _.extend(this.permissions, data.doc.permissions); var _permissions = $.extend({}, data.doc.permissions), - _user = new Asc.asc_CUserInfo(); + _options = $.extend({}, data.doc.options, {actions: this.editorConfig.actionLink || {}}); + + var _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -375,7 +377,7 @@ define([ docInfo.put_Title(data.doc.title); docInfo.put_Format(data.doc.fileType); docInfo.put_VKey(data.doc.vkey); - docInfo.put_Options(data.doc.options); + docInfo.put_Options(_options); docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token); From 37ebd623b365c7afe715312d57a9b817669f0267 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 22 Mar 2019 13:23:09 +0300 Subject: [PATCH 034/510] [SSE] Header/footer editing: update scroll on canvas resize and cursor move --- .../main/app/view/HeaderFooterDialog.js | 81 +++++++++++++------ 1 file changed, 56 insertions(+), 25 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index a719d1110..7aed99a2d 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -114,17 +114,17 @@ define([ '
','
', '
', '
', - '
', + '
', '
', '
', '
', '
', - '
', + '
', '
', '
', '
', '
', - '
', + '
', '
', '
', '
', @@ -140,17 +140,17 @@ define([ '
','
', '
', '
', - '
', + '
', '', '
', '
', '
', - '
', + '
', '', '
', '
', '
', - '
', + '
', '', '
', '
', @@ -585,7 +585,9 @@ define([ this.initCanvas('#footer-right-img'); this.wrapEvents = { - onApiEditorSelectionChanged: _.bind(this.onApiEditorSelectionChanged, this) + onApiEditorSelectionChanged: _.bind(this.onApiEditorSelectionChanged, this), + onApiResizeEditorHeight: _.bind(this.onApiResizeEditorHeight, this), + onUpdateEditorCursorPosition: _.bind(this.onUpdateEditorCursorPosition, this) }; this.afterRender(); @@ -594,12 +596,13 @@ define([ initCanvas: function(name) { var el = this.$window.find(name); el.on('click', _.bind(this.onCanvasClick, this, name)); - this.scrollers.push(new Common.UI.Scroller({ + this.canvasBoxHeight = el.height(); + this.scrollers[name] = new Common.UI.Scroller({ el: el.parent(), minScrollbarLength : 20 - })); - this.scrollers[this.scrollers.length-1].update(); - this.scrollers[this.scrollers.length-1].scrollTop(0); + }); + this.scrollers[name].update(); + this.scrollers[name].scrollTop(0); }, show: function() { @@ -612,6 +615,8 @@ define([ close: function() { this.api.asc_unregisterCallback('asc_onEditorSelectionChanged', this.wrapEvents.onApiEditorSelectionChanged); + this.api.asc_unregisterCallback('asc_resizeEditorHeight', this.wrapEvents.onApiResizeEditorHeight); + this.api.asc_unregisterCallback('asc_updateEditorCursorPosition', this.wrapEvents.onUpdateEditorCursorPosition); Common.UI.Window.prototype.close.apply(this, arguments); @@ -621,6 +626,8 @@ define([ afterRender: function () { this.api.asc_registerCallback('asc_onEditorSelectionChanged', this.wrapEvents.onApiEditorSelectionChanged); + this.api.asc_registerCallback('asc_resizeEditorHeight', this.wrapEvents.onApiResizeEditorHeight); + this.api.asc_registerCallback('asc_updateEditorCursorPosition', this.wrapEvents.onUpdateEditorCursorPosition); this.cmbFonts[0].fillFonts(this.fontStore); this.cmbFonts[0].selectRecord(this.fontStore.findWhere({name: this._state.fontname}) || this.fontStore.at(0)); @@ -630,6 +637,7 @@ define([ this.HFObject = new AscCommonExcel.CHeaderFooterEditor(['header-left-img', 'header-center-img', 'header-right-img', 'footer-left-img', 'footer-center-img', 'footer-right-img'], 205); this._setDefaults(this.props); + this.editorCanvas = this.$window.find('#ce-canvas-menu'); }, _setDefaults: function (props) { @@ -688,24 +696,27 @@ define([ }, scrollerUpdate: function() { - this.scrollers.forEach(function(item){ - item.update(); - }); + for (var name in this.scrollers) { + this.scrollers[name] && this.scrollers[name].update(); + } }, onCanvasClick: function(id, event){ if (!this.HFObject) return; - id = id || 'header-left-img'; - this.currentCanvas = id; - this.isFooter = (id == '#footer-left-img' || id == '#footer-center-img' || id == '#footer-right-img'); + id = id || '#header-left-img'; + var diff = (this.currentCanvas !== id); + if (diff) { + this.currentCanvas = id; + this.isFooter = (id == '#footer-left-img' || id == '#footer-center-img' || id == '#footer-right-img'); - var me = this; - this.headerControls.forEach(function(item){ - item.setDisabled(me.isFooter); - }); - this.footerControls.forEach(function(item){ - item.setDisabled(!me.isFooter); - }); + var me = this; + this.headerControls.forEach(function(item){ + item.setDisabled(me.isFooter); + }); + this.footerControls.forEach(function(item){ + item.setDisabled(!me.isFooter); + }); + } if (event) { var parent = $(event.currentTarget).parent(), @@ -714,7 +725,27 @@ define([ } else this.HFObject.click(id); - this.scrollerUpdate(); + diff && this.scrollerUpdate(); + }, + + onApiResizeEditorHeight: function(event) { + if (!this.editorCanvas) return; + var height = this.editorCanvas.height(); + if (height == this.editorCanvasHeight) return; + this.editorCanvasHeight = height; + + if (this.scrollers[this.currentCanvas]) + this.scrollers[this.currentCanvas].update(); + }, + + onUpdateEditorCursorPosition: function(pos, height) { + if (!this.editorCanvas) return; + var id = this.currentCanvas; + if (this.scrollers[id]) { + var top = this.scrollers[id].getScrollTop(); + if (pos + height>top+this.canvasBoxHeight || pos Date: Fri, 22 Mar 2019 17:49:29 +0300 Subject: [PATCH 035/510] [SSE] Header/footer: fix scrolling in editors --- apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 7aed99a2d..ec003b4d6 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -743,7 +743,9 @@ define([ var id = this.currentCanvas; if (this.scrollers[id]) { var top = this.scrollers[id].getScrollTop(); - if (pos + height>top+this.canvasBoxHeight || postop+this.canvasBoxHeight) + this.scrollers[id].scrollTop(pos + height - this.canvasBoxHeight); + else if (pos Date: Mon, 1 Apr 2019 16:10:35 +0300 Subject: [PATCH 036/510] Use svg icons for autoshapes --- apps/common/main/lib/component/Menu.js | 2 +- .../main/resources/img/toolbar/shapetypes.svg | 605 ++++++++++++++++++ apps/common/main/resources/less/toolbar.less | 18 +- .../main/app/controller/Main.js | 1 - .../main/app/controller/Toolbar.js | 2 +- .../main/app/view/ShapeSettings.js | 8 +- apps/documenteditor/main/index.html | 1 + apps/documenteditor/main/index.html.deploy | 1 + .../main/app/controller/Main.js | 1 - .../main/app/view/ShapeSettings.js | 8 +- .../main/app/view/SlideSettings.js | 2 +- .../main/app/view/Toolbar.js | 2 +- apps/presentationeditor/main/index.html | 1 + .../presentationeditor/main/index.html.deploy | 1 + .../main/app/controller/Main.js | 1 - .../main/app/controller/Toolbar.js | 2 +- .../main/app/view/ShapeSettings.js | 8 +- apps/spreadsheeteditor/main/index.html | 1 + apps/spreadsheeteditor/main/index.html.deploy | 1 + 19 files changed, 645 insertions(+), 21 deletions(-) create mode 100644 apps/common/main/resources/img/toolbar/shapetypes.svg diff --git a/apps/common/main/lib/component/Menu.js b/apps/common/main/lib/component/Menu.js index 42fafc2e6..0ddfc79c8 100644 --- a/apps/common/main/lib/component/Menu.js +++ b/apps/common/main/lib/component/Menu.js @@ -607,7 +607,7 @@ define([ if (this.options.additionalAlign) this.options.additionalAlign.call(this, menuRoot, left, top); else - menuRoot.css({left: left, top: top}); + menuRoot.css({left: Math.ceil(left), top: Math.ceil(top)}); }, clearAll: function() { diff --git a/apps/common/main/resources/img/toolbar/shapetypes.svg b/apps/common/main/resources/img/toolbar/shapetypes.svg new file mode 100644 index 000000000..da2a7ac9f --- /dev/null +++ b/apps/common/main/resources/img/toolbar/shapetypes.svg @@ -0,0 +1,605 @@ + diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index 5978e804f..5f8c54c07 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -493,4 +493,20 @@ .button-normal-icon(~'x-huge .btn-select-pivot', 55, @toolbar-big-icon-size); .button-normal-icon(~'x-huge .btn-bookmarks', 56, @toolbar-big-icon-size); .button-normal-icon(btn-blankpage, 57, @toolbar-big-icon-size); -.button-normal-icon(btn-print-area, 58, @toolbar-big-icon-size); \ No newline at end of file +.button-normal-icon(btn-print-area, 58, @toolbar-big-icon-size); + +.item-shape { + .icon { + width: 20px; + height: 20px; + } + + svg.icon { + display: inline-block; + vertical-align: middle; + fill: #444444; + } + + width: 20px; + height: 20px; +} diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index fe3fd490a..ce84eadbe 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1792,7 +1792,6 @@ define([ _.each(shapes[index], function(shape, idx){ store.add({ - imageUrl : shape.Image, data : {shapeType: shape.Type}, tip : me['txtShape_' + shape.Type] || (me.textShape + ' ' + (idx+1)), allowSelected : true, diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 4bd68ba8f..36ffd3609 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -2281,7 +2281,7 @@ define([ store: shapeGroup.get('groupStore'), parentMenu: menuItem.menu, showLast: false, - itemTemplate: _.template('
') + itemTemplate: _.template('
\">
') }); shapePicker.on('item:click', function(picker, item, record, e) { diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js index ce9931af6..b7079382f 100644 --- a/apps/documenteditor/main/app/view/ShapeSettings.js +++ b/apps/documenteditor/main/app/view/ShapeSettings.js @@ -1541,7 +1541,7 @@ define([ parentMenu: me.textureMenu, showLast: false, store: new Common.UI.DataViewStore(texturearray), - itemTemplate: _.template('
') + itemTemplate: _.template('
') }); mnuTexturePicker.on('item:click', _.bind(this.onSelectTexture, this)); } @@ -1612,7 +1612,7 @@ define([ store: store, parentMenu: menuItem.menu, showLast: false, - itemTemplate: _.template('
') + itemTemplate: _.template('
\">
') }); shapePicker.on('item:click', function(picker, item, record, e) { @@ -1844,8 +1844,8 @@ define([ textRotation: 'Rotation', textRotate90: 'Rotate 90°', textFlip: 'Flip', - textHint270: 'Rotate Left 90°', - textHint90: 'Rotate Right 90°', + textHint270: 'Rotate 90° Counterclockwise', + textHint90: 'Rotate 90° Clockwise', textHintFlipV: 'Flip Vertically', textHintFlipH: 'Flip Horizontally' }, DE.Views.ShapeSettings || {})); diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index eb828a57d..442aff941 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -262,6 +262,7 @@ + diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy index 58c504339..b02b7ed29 100644 --- a/apps/documenteditor/main/index.html.deploy +++ b/apps/documenteditor/main/index.html.deploy @@ -293,6 +293,7 @@ +
diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index f63c9fdec..596403e8c 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1587,7 +1587,6 @@ define([ _.each(shapes[index], function(shape, idx){ store.add({ - imageUrl : shape.Image, data : {shapeType: shape.Type}, tip : me['txtShape_' + shape.Type] || (me.textShape + ' ' + (idx+1)), allowSelected : true, diff --git a/apps/presentationeditor/main/app/view/ShapeSettings.js b/apps/presentationeditor/main/app/view/ShapeSettings.js index 32ce9c75e..46c1751fa 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettings.js +++ b/apps/presentationeditor/main/app/view/ShapeSettings.js @@ -1415,7 +1415,7 @@ define([ parentMenu: me.textureMenu, showLast: false, store: new Common.UI.DataViewStore(texturearray), - itemTemplate: _.template('
') + itemTemplate: _.template('
') }); mnuTexturePicker.on('item:click', _.bind(this.onSelectTexture, this)); } @@ -1468,7 +1468,7 @@ define([ store: store, parentMenu: menuItem.menu, showLast: false, - itemTemplate: _.template('
') + itemTemplate: _.template('
\">
') }); shapePicker.on('item:click', function(picker, item, record, e) { @@ -1708,8 +1708,8 @@ define([ textRotation: 'Rotation', textRotate90: 'Rotate 90°', textFlip: 'Flip', - textHint270: 'Rotate Left 90°', - textHint90: 'Rotate Right 90°', + textHint270: 'Rotate 90° Counterclockwise', + textHint90: 'Rotate 90° Clockwise', textHintFlipV: 'Flip Vertically', textHintFlipH: 'Flip Horizontally' }, PE.Views.ShapeSettings || {})); diff --git a/apps/presentationeditor/main/app/view/SlideSettings.js b/apps/presentationeditor/main/app/view/SlideSettings.js index 16e55a5ea..900517ec0 100644 --- a/apps/presentationeditor/main/app/view/SlideSettings.js +++ b/apps/presentationeditor/main/app/view/SlideSettings.js @@ -849,7 +849,7 @@ define([ parentMenu: me.textureMenu, showLast: false, store: new Common.UI.DataViewStore(texturearray), - itemTemplate: _.template('
') + itemTemplate: _.template('
') }); mnuTexturePicker.on('item:click', _.bind(this.onSelectTexture, this)); } diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 99b8f77f2..39becbb96 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -1588,7 +1588,7 @@ define([ store: group.get('groupStore'), parentMenu: menuitem.menu, showLast: false, - itemTemplate: _.template('
') + itemTemplate: _.template('
\">
') })).on('item:click', function (picker, item, record, e) { if (e.type !== 'click') Common.UI.Menu.Manager.hideAll(); if (record) diff --git a/apps/presentationeditor/main/index.html b/apps/presentationeditor/main/index.html index 27f64755b..58e91ad76 100644 --- a/apps/presentationeditor/main/index.html +++ b/apps/presentationeditor/main/index.html @@ -268,6 +268,7 @@ + + diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index ddd62ba94..e4a188ab6 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -30,7 +30,7 @@ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ -var ApplicationController = new(function(){ +DE.ApplicationController = new(function(){ var me, api, config = {}, @@ -51,7 +51,7 @@ var ApplicationController = new(function(){ // ------------------------- if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){ - Common.Gateway.reportError(undefined, 'Your browser is not supported.'); + Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText); return; } @@ -122,7 +122,7 @@ var ApplicationController = new(function(){ function onCountPages(count) { maxPages = count; - $('#pages').text('of ' + count); + $('#pages').text(me.textOf + " " + count); } function onCurrentPage(number) { @@ -134,10 +134,10 @@ var ApplicationController = new(function(){ switch (id) { case Asc.c_oAscAsyncAction['Print']: - text = 'Downloading document...'; + text = me.downloadTextText; break; default: - text = 'Please wait...'; + text = me.waitText; break; } @@ -248,12 +248,12 @@ var ApplicationController = new(function(){ Common.Gateway.on('processmouse', onProcessMouse); Common.Gateway.on('downloadas', onDownloadAs); - ApplicationView.tools.get('#idt-fullscreen') + DE.ApplicationView.tools.get('#idt-fullscreen') .on('click', function(){ common.utils.openLink(embedConfig.fullscreenUrl); }); - ApplicationView.tools.get('#idt-download') + DE.ApplicationView.tools.get('#idt-download') .on('click', function(){ if ( !!embedConfig.saveUrl ){ common.utils.openLink(embedConfig.saveUrl); @@ -354,14 +354,14 @@ var ApplicationController = new(function(){ function onOpenDocument(progress) { var proc = (progress.asc_getCurrentFont() + progress.asc_getCurrentImage())/(progress.asc_getFontsCount() + progress.asc_getImagesCount()); - $('#loadmask-text').html('Loading document: ' + Math.min(Math.round(proc * 100), 100) + '%'); + $('#loadmask-text').html(me.textLoadingDocument + ': ' + + Math.min(Math.round(proc * 100), 100) + '%'); } function onError(id, level, errData) { if (id == Asc.c_oAscError.ID.LoadingScriptError) { $('#id-critical-error-title').text(me.criticalErrorTitle); $('#id-critical-error-message').text(me.scriptLoadError); - $('#id-critical-error-close').off().on('click', function(){ + $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ window.location.reload(); }); $('#id-critical-error-dialog').css('z-index', 20002).modal('show'); @@ -410,8 +410,7 @@ var ApplicationController = new(function(){ $('#id-critical-error-title').text(me.criticalErrorTitle); $('#id-critical-error-message').text(message); - $('#id-critical-error-close').off(); - $('#id-critical-error-close').on('click', function(){ + $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ window.location.reload(); }); } @@ -420,8 +419,7 @@ var ApplicationController = new(function(){ $('#id-critical-error-title').text(me.notcriticalErrorTitle); $('#id-critical-error-message').text(message); - $('#id-critical-error-close').off(); - $('#id-critical-error-close').on('click', function(){ + $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ $('#id-critical-error-dialog').modal('hide'); }); } @@ -434,7 +432,7 @@ var ApplicationController = new(function(){ function onExternalMessage(error) { if (error) { hidePreloader(); - $('#id-error-mask-title').text('Error'); + $('#id-error-mask-title').text(me.criticalErrorTitle); $('#id-error-mask-text').text(error.msg); $('#id-error-mask').css('display', 'block'); @@ -549,6 +547,12 @@ var ApplicationController = new(function(){ scriptLoadError: 'The connection is too slow, some of the components could not be loaded. Please reload the page.', errorFilePassProtect: 'The file is password protected and cannot be opened.', errorAccessDeny: 'You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.', - errorUserDrop: 'The file cannot be accessed right now.' + errorUserDrop: 'The file cannot be accessed right now.', + unsupportedBrowserErrorText: 'Your browser is not supported.', + textOf: 'of', + downloadTextText: 'Downloading document...', + waitText: 'Please, wait...', + textLoadingDocument: 'Loading document', + txtClose: 'Close' } })(); \ No newline at end of file diff --git a/apps/documenteditor/embed/js/ApplicationView.js b/apps/documenteditor/embed/js/ApplicationView.js index 41fb404d8..1c3aca46f 100644 --- a/apps/documenteditor/embed/js/ApplicationView.js +++ b/apps/documenteditor/embed/js/ApplicationView.js @@ -30,7 +30,11 @@ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ -var ApplicationView = new(function(){ +if (DE === undefined) { + var DE = {}; +} + +DE.ApplicationView = new(function(){ var $btnTools; // Initialize view @@ -41,10 +45,10 @@ var ApplicationView = new(function(){ $btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true'); $btnTools.parent().append( ''); } @@ -56,6 +60,11 @@ var ApplicationView = new(function(){ create: createView , tools: { get: getTools - } + }, + + txtDownload: 'Download', + txtShare: 'Share', + txtEmbed: 'Embed', + txtFullScreen: 'Full Screen' } })(); diff --git a/apps/documenteditor/embed/js/application.js b/apps/documenteditor/embed/js/application.js index 785fd189e..9045fe155 100644 --- a/apps/documenteditor/embed/js/application.js +++ b/apps/documenteditor/embed/js/application.js @@ -31,6 +31,7 @@ * */ +function ($) { - ApplicationView.create(); - ApplicationController.create(); + Common.Locale.apply(); + DE.ApplicationView.create(); + DE.ApplicationController.create(); }(); diff --git a/apps/documenteditor/embed/locale/en.json b/apps/documenteditor/embed/locale/en.json new file mode 100644 index 000000000..7ee13767a --- /dev/null +++ b/apps/documenteditor/embed/locale/en.json @@ -0,0 +1,26 @@ +{ + "common.view.modals.txtWidth": "Width", + "common.view.modals.txtHeight": "Height", + "common.view.modals.txtShare": "Share Link", + "common.view.modals.txtCopy": "Copy to clipboard", + "common.view.modals.txtEmbed": "Embed", + "DE.ApplicationView.txtDownload": "Download", + "DE.ApplicationView.txtShare": "Share", + "DE.ApplicationView.txtEmbed": "Embed", + "DE.ApplicationView.txtFullScreen": "Full Screen", + "DE.ApplicationController.errorDefaultMessage": "Error code: %1", + "DE.ApplicationController.unknownErrorText": "Unknown error.", + "DE.ApplicationController.convertationTimeoutText": "Convertation timeout exceeded.", + "DE.ApplicationController.convertationErrorText": "Convertation failed.", + "DE.ApplicationController.downloadErrorText": "Download failed.", + "DE.ApplicationController.criticalErrorTitle": "Error", + "DE.ApplicationController.notcriticalErrorTitle": "Warning", + "DE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", + "DE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", + "DE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", + "DE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "DE.ApplicationController.textOf": "of", + "DE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", + "DE.ApplicationController.textLoadingDocument": "Loading document", + "DE.ApplicationController.txtClose": "Close" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/ru.json b/apps/documenteditor/embed/locale/ru.json new file mode 100644 index 000000000..2acc61004 --- /dev/null +++ b/apps/documenteditor/embed/locale/ru.json @@ -0,0 +1,25 @@ +{ + "common.view.modals.txtWidth": "Ширина", + "common.view.modals.txtHeight": "Высота", + "common.view.modals.txtShare": "Поделиться ссылкой", + "common.view.modals.txtCopy": "Скопировать в буфер", + "common.view.modals.txtEmbed": "Встроить", + "DE.ApplicationView.txtDownload": "Скачать файл", + "DE.ApplicationView.txtShare": "Поделиться", + "DE.ApplicationView.txtEmbed": "Встроить", + "DE.ApplicationView.txtFullScreen": "Во весь экран", + "DE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", + "DE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", + "DE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", + "DE.ApplicationController.convertationErrorText": "Конвертация не удалась.", + "DE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "DE.ApplicationController.criticalErrorTitle": "Ошибка", + "DE.ApplicationController.notcriticalErrorTitle": "Внимание", + "DE.ApplicationController.scriptLoadError": "Слишком медленное подключение, некоторые компоненты не удалось загрузить. Пожалуйста, обновите страницу.", + "DE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", + "DE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", + "DE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", + "DE.ApplicationController.textOf": "из", + "DE.ApplicationController.textLoadingDocument": "Загрузка документа", + "DE.ApplicationController.txtClose": "Закрыть" +} \ No newline at end of file diff --git a/build/Gruntfile.js b/build/Gruntfile.js index f65b78b84..0f0923459 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -404,6 +404,9 @@ module.exports = function(grunt) { }, copy: { + localization: { + files: packageFile['embed']['copy']['localization'] + }, 'index-page': { files: packageFile['embed']['copy']['index-page'] }, diff --git a/build/documenteditor.json b/build/documenteditor.json index 99f4f09b2..50a89586e 100644 --- a/build/documenteditor.json +++ b/build/documenteditor.json @@ -368,6 +368,7 @@ }, "js": { "src": [ + "../apps/common/locale.js", "../apps/common/Gateway.js", "../apps/common/Analytics.js", "../apps/common/embed/lib/util/utils.js", @@ -386,6 +387,14 @@ } }, "copy": { + "localization": [ + { + "expand": true, + "cwd": "../apps/documenteditor/embed/locale/", + "src": "*", + "dest": "../deploy/web-apps/apps/documenteditor/embed/locale/" + } + ], "index-page": { "../deploy/web-apps/apps/documenteditor/embed/index.html": "../apps/documenteditor/embed/index.html.deploy" }, From f0b40a091174737dbbf9b9c3f3e73edccfb48cf6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 14 May 2019 15:18:18 +0300 Subject: [PATCH 100/510] [PE, SSE embed] Translate embedded viewer. Bug 31297 --- .../embed/js/ApplicationController.js | 2 +- apps/documenteditor/embed/locale/en.json | 4 ++- apps/documenteditor/embed/locale/ru.json | 3 ++ apps/presentationeditor/embed/index.html | 1 + .../embed/index.html.opensource | 1 + .../embed/js/ApplicationController.js | 34 +++++++++++-------- .../embed/js/ApplicationView.js | 21 ++++++++---- .../embed/js/application.js | 6 ++-- apps/presentationeditor/embed/locale/en.json | 28 +++++++++++++++ apps/presentationeditor/embed/locale/ru.json | 28 +++++++++++++++ apps/spreadsheeteditor/embed/index.html | 1 + .../embed/js/ApplicationController.js | 32 +++++++++-------- .../embed/js/ApplicationView.js | 21 ++++++++---- .../spreadsheeteditor/embed/js/application.js | 5 +-- apps/spreadsheeteditor/embed/locale/en.json | 28 +++++++++++++++ apps/spreadsheeteditor/embed/locale/ru.json | 28 +++++++++++++++ build/presentationeditor.json | 9 +++++ build/spreadsheeteditor.json | 9 +++++ 18 files changed, 213 insertions(+), 48 deletions(-) create mode 100644 apps/presentationeditor/embed/locale/en.json create mode 100644 apps/presentationeditor/embed/locale/ru.json create mode 100644 apps/spreadsheeteditor/embed/locale/en.json create mode 100644 apps/spreadsheeteditor/embed/locale/ru.json diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index e4a188ab6..71ea2e9fd 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -354,7 +354,7 @@ DE.ApplicationController = new(function(){ function onOpenDocument(progress) { var proc = (progress.asc_getCurrentFont() + progress.asc_getCurrentImage())/(progress.asc_getFontsCount() + progress.asc_getImagesCount()); - $('#loadmask-text').html(me.textLoadingDocument + ': ' + + Math.min(Math.round(proc * 100), 100) + '%'); + $('#loadmask-text').html(me.textLoadingDocument + ': ' + Math.min(Math.round(proc * 100), 100) + '%'); } function onError(id, level, errData) { diff --git a/apps/documenteditor/embed/locale/en.json b/apps/documenteditor/embed/locale/en.json index 7ee13767a..b750d452a 100644 --- a/apps/documenteditor/embed/locale/en.json +++ b/apps/documenteditor/embed/locale/en.json @@ -19,8 +19,10 @@ "DE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", "DE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", "DE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", - "DE.ApplicationController.textOf": "of", "DE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", + "DE.ApplicationController.textOf": "of", + "DE.ApplicationController.downloadTextText": "Downloading document...", + "DE.ApplicationController.waitText": "Please, wait...", "DE.ApplicationController.textLoadingDocument": "Loading document", "DE.ApplicationController.txtClose": "Close" } \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/ru.json b/apps/documenteditor/embed/locale/ru.json index 2acc61004..4afdf888c 100644 --- a/apps/documenteditor/embed/locale/ru.json +++ b/apps/documenteditor/embed/locale/ru.json @@ -19,7 +19,10 @@ "DE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", "DE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", "DE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", "DE.ApplicationController.textOf": "из", + "DE.ApplicationController.downloadTextText": "Загрузка документа...", + "DE.ApplicationController.waitText": "Пожалуйста, подождите...", "DE.ApplicationController.textLoadingDocument": "Загрузка документа", "DE.ApplicationController.txtClose": "Закрыть" } \ No newline at end of file diff --git a/apps/presentationeditor/embed/index.html b/apps/presentationeditor/embed/index.html index 4539053d3..1da1a11dd 100644 --- a/apps/presentationeditor/embed/index.html +++ b/apps/presentationeditor/embed/index.html @@ -332,6 +332,7 @@ + diff --git a/apps/presentationeditor/embed/index.html.opensource b/apps/presentationeditor/embed/index.html.opensource index 95aee40f5..e74eb4030 100644 --- a/apps/presentationeditor/embed/index.html.opensource +++ b/apps/presentationeditor/embed/index.html.opensource @@ -205,6 +205,7 @@ + diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index 236806af9..e19836e10 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -30,7 +30,7 @@ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ -var ApplicationController = new(function(){ +PE.ApplicationController = new(function(){ var me, api, config = {}, @@ -52,7 +52,7 @@ var ApplicationController = new(function(){ // ------------------------- if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){ - Common.Gateway.reportError(undefined, 'Your browser is not supported.'); + Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText); return; } @@ -118,7 +118,7 @@ var ApplicationController = new(function(){ function onCountPages(count) { maxPages = count; - $('#pages').text('of ' + count); + $('#pages').text(me.textOf + " " + count); } function onCurrentPage(number) { @@ -131,10 +131,10 @@ var ApplicationController = new(function(){ switch (id) { case Asc.c_oAscAsyncAction['Print']: - text = 'Downloading document...'; + text = me.downloadTextText; break; default: - text = 'Please wait...'; + text = me.waitText; break; } @@ -256,12 +256,12 @@ var ApplicationController = new(function(){ Common.Gateway.on('processmouse', onProcessMouse); Common.Gateway.on('downloadas', onDownloadAs); - ApplicationView.tools.get('#idt-fullscreen') + PE.ApplicationView.tools.get('#idt-fullscreen') .on('click', function(){ common.utils.openLink(embedConfig.fullscreenUrl); }); - ApplicationView.tools.get('#idt-download') + PE.ApplicationView.tools.get('#idt-download') .on('click', function(){ if ( !!embedConfig.saveUrl ){ common.utils.openLink(embedConfig.saveUrl); @@ -417,7 +417,7 @@ var ApplicationController = new(function(){ function onOpenDocument(progress) { var proc = (progress.asc_getCurrentFont() + progress.asc_getCurrentImage())/(progress.asc_getFontsCount() + progress.asc_getImagesCount()); - $('#loadmask-text').html('Loading document: ' + Math.min(Math.round(proc * 100), 100) + '%'); + $('#loadmask-text').html(me.textLoadingDocument + ': ' + Math.min(Math.round(proc * 100), 100) + '%'); } var isplaymode; @@ -461,7 +461,7 @@ var ApplicationController = new(function(){ if (id == Asc.c_oAscError.ID.LoadingScriptError) { $('#id-critical-error-title').text(me.criticalErrorTitle); $('#id-critical-error-message').text(me.scriptLoadError); - $('#id-critical-error-close').off().on('click', function(){ + $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ window.location.reload(); }); $('#id-critical-error-dialog').css('z-index', 20002).modal('show'); @@ -510,8 +510,7 @@ var ApplicationController = new(function(){ $('#id-critical-error-title').text(me.criticalErrorTitle); $('#id-critical-error-message').text(message); - $('#id-critical-error-close').off(); - $('#id-critical-error-close').on('click', function(){ + $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ window.location.reload(); }); } @@ -520,8 +519,7 @@ var ApplicationController = new(function(){ $('#id-critical-error-title').text(me.notcriticalErrorTitle); $('#id-critical-error-message').text(message); - $('#id-critical-error-close').off(); - $('#id-critical-error-close').on('click', function(){ + $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ $('#id-critical-error-dialog').modal('hide'); }); } @@ -534,7 +532,7 @@ var ApplicationController = new(function(){ function onExternalMessage(error) { if (error) { hidePreloader(); - $('#id-error-mask-title').text('Error'); + $('#id-error-mask-title').text(me.criticalErrorTitle); $('#id-error-mask-text').text(error.msg); $('#id-error-mask').css('display', 'block'); @@ -620,6 +618,12 @@ var ApplicationController = new(function(){ scriptLoadError: 'The connection is too slow, some of the components could not be loaded. Please reload the page.', errorFilePassProtect: 'The file is password protected and cannot be opened.', errorAccessDeny: 'You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.', - errorUserDrop: 'The file cannot be accessed right now.' + errorUserDrop: 'The file cannot be accessed right now.', + unsupportedBrowserErrorText: 'Your browser is not supported.', + textOf: 'of', + downloadTextText: 'Downloading presentation...', + waitText: 'Please, wait...', + textLoadingDocument: 'Loading presentation', + txtClose: 'Close' } })(); diff --git a/apps/presentationeditor/embed/js/ApplicationView.js b/apps/presentationeditor/embed/js/ApplicationView.js index dbbdb198d..e1d870c08 100644 --- a/apps/presentationeditor/embed/js/ApplicationView.js +++ b/apps/presentationeditor/embed/js/ApplicationView.js @@ -30,7 +30,11 @@ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ -var ApplicationView = new(function(){ +if (PE === undefined) { + var PE = {}; +} + +PE.ApplicationView = new(function(){ var $btnTools; // Initialize view @@ -41,10 +45,10 @@ var ApplicationView = new(function(){ $btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true'); $btnTools.parent().append( ''); } @@ -56,6 +60,11 @@ var ApplicationView = new(function(){ create: createView , tools: { get: getTools - } + }, + + txtDownload: 'Download', + txtShare: 'Share', + txtEmbed: 'Embed', + txtFullScreen: 'Full Screen' } })(); diff --git a/apps/presentationeditor/embed/js/application.js b/apps/presentationeditor/embed/js/application.js index 7d10d275f..73a13c863 100644 --- a/apps/presentationeditor/embed/js/application.js +++ b/apps/presentationeditor/embed/js/application.js @@ -31,8 +31,8 @@ * */ (function ($) { - - ApplicationView.create(); - ApplicationController.create(); + Common.Locale.apply(); + PE.ApplicationView.create(); + PE.ApplicationController.create(); })(window.jQuery); diff --git a/apps/presentationeditor/embed/locale/en.json b/apps/presentationeditor/embed/locale/en.json new file mode 100644 index 000000000..88905ab55 --- /dev/null +++ b/apps/presentationeditor/embed/locale/en.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtWidth": "Width", + "common.view.modals.txtHeight": "Height", + "common.view.modals.txtShare": "Share Link", + "common.view.modals.txtCopy": "Copy to clipboard", + "common.view.modals.txtEmbed": "Embed", + "PE.ApplicationView.txtDownload": "Download", + "PE.ApplicationView.txtShare": "Share", + "PE.ApplicationView.txtEmbed": "Embed", + "PE.ApplicationView.txtFullScreen": "Full Screen", + "PE.ApplicationController.errorDefaultMessage": "Error code: %1", + "PE.ApplicationController.unknownErrorText": "Unknown error.", + "PE.ApplicationController.convertationTimeoutText": "Convertation timeout exceeded.", + "PE.ApplicationController.convertationErrorText": "Convertation failed.", + "PE.ApplicationController.downloadErrorText": "Download failed.", + "PE.ApplicationController.criticalErrorTitle": "Error", + "PE.ApplicationController.notcriticalErrorTitle": "Warning", + "PE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", + "PE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", + "PE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", + "PE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "PE.ApplicationController.textOf": "of", + "PE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", + "PE.ApplicationController.downloadTextText": "Downloading presentation...", + "PE.ApplicationController.waitText": "Please, wait...", + "PE.ApplicationController.textLoadingDocument": "Loading presentation", + "PE.ApplicationController.txtClose": "Close" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/ru.json b/apps/presentationeditor/embed/locale/ru.json new file mode 100644 index 000000000..05f511301 --- /dev/null +++ b/apps/presentationeditor/embed/locale/ru.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtWidth": "Ширина", + "common.view.modals.txtHeight": "Высота", + "common.view.modals.txtShare": "Поделиться ссылкой", + "common.view.modals.txtCopy": "Скопировать в буфер", + "common.view.modals.txtEmbed": "Встроить", + "PE.ApplicationView.txtDownload": "Скачать файл", + "PE.ApplicationView.txtShare": "Поделиться", + "PE.ApplicationView.txtEmbed": "Встроить", + "PE.ApplicationView.txtFullScreen": "Во весь экран", + "PE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", + "PE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", + "PE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", + "PE.ApplicationController.convertationErrorText": "Конвертация не удалась.", + "PE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "PE.ApplicationController.criticalErrorTitle": "Ошибка", + "PE.ApplicationController.notcriticalErrorTitle": "Внимание", + "PE.ApplicationController.scriptLoadError": "Слишком медленное подключение, некоторые компоненты не удалось загрузить. Пожалуйста, обновите страницу.", + "PE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", + "PE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", + "PE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.", + "PE.ApplicationController.textOf": "из", + "PE.ApplicationController.downloadTextText": "Загрузка презентации...", + "PE.ApplicationController.waitText": "Пожалуйста, подождите...", + "PE.ApplicationController.textLoadingDocument": "Загрузка презентации", + "PE.ApplicationController.txtClose": "Закрыть" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/index.html b/apps/spreadsheeteditor/embed/index.html index 05bacda25..80aecf403 100644 --- a/apps/spreadsheeteditor/embed/index.html +++ b/apps/spreadsheeteditor/embed/index.html @@ -333,6 +333,7 @@ + diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 05fe7f2d1..96219e2ad 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -30,7 +30,7 @@ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ -var ApplicationController = new(function(){ +SSE.ApplicationController = new(function(){ var me, api, config = {}, @@ -54,7 +54,7 @@ var ApplicationController = new(function(){ // ------------------------- if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){ - Common.Gateway.reportError(undefined, 'Your browser is not supported.'); + Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText); return; } @@ -193,12 +193,12 @@ var ApplicationController = new(function(){ Common.Gateway.on('processmouse', onProcessMouse); Common.Gateway.on('downloadas', onDownloadAs); - ApplicationView.tools.get('#idt-fullscreen') + SSE.ApplicationView.tools.get('#idt-fullscreen') .on('click', function(){ common.utils.openLink(embedConfig.fullscreenUrl); }); - ApplicationView.tools.get('#idt-download') + SSE.ApplicationView.tools.get('#idt-download') .on('click', function(){ if ( !!embedConfig.saveUrl ){ common.utils.openLink(embedConfig.saveUrl); @@ -325,7 +325,7 @@ var ApplicationController = new(function(){ function onOpenDocument(progress) { var proc = (progress.asc_getCurrentFont() + progress.asc_getCurrentImage())/(progress.asc_getFontsCount() + progress.asc_getImagesCount()); - $('#loadmask-text').html('Loading document: ' + Math.min(Math.round(proc * 100), 100) + '%'); + $('#loadmask-text').html(me.textLoadingDocument + ': ' + Math.min(Math.round(proc * 100), 100) + '%'); } function onLongActionBegin(type, id){ @@ -333,10 +333,10 @@ var ApplicationController = new(function(){ switch (id) { case Asc.c_oAscAsyncAction['Print']: - text = 'Downloading document...'; + text = me.downloadTextText; break; default: - text = 'Please wait...'; + text = me.waitText; break; } @@ -369,7 +369,7 @@ var ApplicationController = new(function(){ if (id == Asc.c_oAscError.ID.LoadingScriptError) { $('#id-critical-error-title').text(me.criticalErrorTitle); $('#id-critical-error-message').text(me.scriptLoadError); - $('#id-critical-error-close').off().on('click', function(){ + $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ window.location.reload(); }); $('#id-critical-error-dialog').css('z-index', 20002).modal('show'); @@ -418,8 +418,7 @@ var ApplicationController = new(function(){ $('#id-critical-error-title').text(me.criticalErrorTitle); $('#id-critical-error-message').text(message); - $('#id-critical-error-close').off(); - $('#id-critical-error-close').on('click', function(){ + $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ window.location.reload(); }); } @@ -428,8 +427,7 @@ var ApplicationController = new(function(){ $('#id-critical-error-title').text(me.notcriticalErrorTitle); $('#id-critical-error-message').text(message); - $('#id-critical-error-close').off(); - $('#id-critical-error-close').on('click', function(){ + $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ $('#id-critical-error-dialog').modal('hide'); }); } @@ -442,7 +440,7 @@ var ApplicationController = new(function(){ function onExternalMessage(error) { if (error) { hidePreloader(); - $('#id-error-mask-title').text('Error'); + $('#id-error-mask-title').text(me.criticalErrorTitle); $('#id-error-mask-text').text(error.msg); $('#id-error-mask').css('display', 'block'); @@ -567,6 +565,12 @@ var ApplicationController = new(function(){ scriptLoadError: 'The connection is too slow, some of the components could not be loaded. Please reload the page.', errorFilePassProtect: 'The file is password protected and cannot be opened.', errorAccessDeny: 'You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.', - errorUserDrop: 'The file cannot be accessed right now.' + errorUserDrop: 'The file cannot be accessed right now.', + unsupportedBrowserErrorText: 'Your browser is not supported.', + textOf: 'of', + downloadTextText: 'Downloading spreadsheet...', + waitText: 'Please, wait...', + textLoadingDocument: 'Loading spreadsheet', + txtClose: 'Close' } })(); \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/js/ApplicationView.js b/apps/spreadsheeteditor/embed/js/ApplicationView.js index bd3c1a694..dd299554b 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationView.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationView.js @@ -30,7 +30,11 @@ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ -var ApplicationView = new(function(){ +if (SSE === undefined) { + var SSE = {}; +} + +SSE.ApplicationView = new(function(){ var $btnTools; @@ -42,10 +46,10 @@ var ApplicationView = new(function(){ $btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true'); $btnTools.parent().append( ''); } @@ -57,6 +61,11 @@ var ApplicationView = new(function(){ create: createView , tools: { get: getTools - } + }, + + txtDownload: 'Download', + txtShare: 'Share', + txtEmbed: 'Embed', + txtFullScreen: 'Full Screen' } })(); diff --git a/apps/spreadsheeteditor/embed/js/application.js b/apps/spreadsheeteditor/embed/js/application.js index c42c8847f..4327c07ca 100644 --- a/apps/spreadsheeteditor/embed/js/application.js +++ b/apps/spreadsheeteditor/embed/js/application.js @@ -33,8 +33,9 @@ (function ($) { $(function(){ - ApplicationView.create(); - ApplicationController.create(); + Common.Locale.apply(); + SSE.ApplicationView.create(); + SSE.ApplicationController.create(); }) })(window.jQuery); diff --git a/apps/spreadsheeteditor/embed/locale/en.json b/apps/spreadsheeteditor/embed/locale/en.json new file mode 100644 index 000000000..80d7d15d4 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/en.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtWidth": "Width", + "common.view.modals.txtHeight": "Height", + "common.view.modals.txtShare": "Share Link", + "common.view.modals.txtCopy": "Copy to clipboard", + "common.view.modals.txtEmbed": "Embed", + "SSE.ApplicationView.txtDownload": "Download", + "SSE.ApplicationView.txtShare": "Share", + "SSE.ApplicationView.txtEmbed": "Embed", + "SSE.ApplicationView.txtFullScreen": "Full Screen", + "SSE.ApplicationController.errorDefaultMessage": "Error code: %1", + "SSE.ApplicationController.unknownErrorText": "Unknown error.", + "SSE.ApplicationController.convertationTimeoutText": "Convertation timeout exceeded.", + "SSE.ApplicationController.convertationErrorText": "Convertation failed.", + "SSE.ApplicationController.downloadErrorText": "Download failed.", + "SSE.ApplicationController.criticalErrorTitle": "Error", + "SSE.ApplicationController.notcriticalErrorTitle": "Warning", + "SSE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", + "SSE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", + "SSE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", + "SSE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "SSE.ApplicationController.textOf": "of", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", + "SSE.ApplicationController.downloadTextText": "Downloading spreadsheet...", + "SSE.ApplicationController.waitText": "Please, wait...", + "SSE.ApplicationController.textLoadingDocument": "Loading spreadsheet", + "SSE.ApplicationController.txtClose": "Close" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/ru.json b/apps/spreadsheeteditor/embed/locale/ru.json new file mode 100644 index 000000000..4d6de4902 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/ru.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtWidth": "Ширина", + "common.view.modals.txtHeight": "Высота", + "common.view.modals.txtShare": "Поделиться ссылкой", + "common.view.modals.txtCopy": "Скопировать в буфер", + "common.view.modals.txtEmbed": "Встроить", + "SSE.ApplicationView.txtDownload": "Скачать файл", + "SSE.ApplicationView.txtShare": "Поделиться", + "SSE.ApplicationView.txtEmbed": "Встроить", + "SSE.ApplicationView.txtFullScreen": "Во весь экран", + "SSE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", + "SSE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", + "SSE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", + "SSE.ApplicationController.convertationErrorText": "Конвертация не удалась.", + "SSE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "SSE.ApplicationController.criticalErrorTitle": "Ошибка", + "SSE.ApplicationController.notcriticalErrorTitle": "Внимание", + "SSE.ApplicationController.scriptLoadError": "Слишком медленное подключение, некоторые компоненты не удалось загрузить. Пожалуйста, обновите страницу.", + "SSE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", + "SSE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", + "SSE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.", + "SSE.ApplicationController.textOf": "из", + "SSE.ApplicationController.downloadTextText": "Загрузка таблицы...", + "SSE.ApplicationController.waitText": "Пожалуйста, подождите...", + "SSE.ApplicationController.textLoadingDocument": "Загрузка таблицы", + "SSE.ApplicationController.txtClose": "Закрыть" +} \ No newline at end of file diff --git a/build/presentationeditor.json b/build/presentationeditor.json index e4654df63..aa44ac433 100644 --- a/build/presentationeditor.json +++ b/build/presentationeditor.json @@ -377,6 +377,7 @@ }, "js": { "src": [ + "../apps/common/locale.js", "../apps/common/Gateway.js", "../apps/common/Analytics.js", "../apps/common/embed/lib/util/utils.js", @@ -395,6 +396,14 @@ } }, "copy": { + "localization": [ + { + "expand": true, + "cwd": "../apps/presentationeditor/embed/locale/", + "src": "*", + "dest": "../deploy/web-apps/apps/presentationeditor/embed/locale/" + } + ], "index-page": { "../deploy/web-apps/apps/presentationeditor/embed/index.html": "../apps/presentationeditor/embed/index.html.deploy" }, diff --git a/build/spreadsheeteditor.json b/build/spreadsheeteditor.json index dbe176d15..03ddcf098 100644 --- a/build/spreadsheeteditor.json +++ b/build/spreadsheeteditor.json @@ -391,6 +391,7 @@ }, "js": { "src": [ + "../apps/common/locale.js", "../apps/common/Gateway.js", "../apps/common/Analytics.js", "../apps/common/embed/lib/util/utils.js", @@ -409,6 +410,14 @@ } }, "copy": { + "localization": [ + { + "expand": true, + "cwd": "../apps/spreadsheeteditor/embed/locale/", + "src": "*", + "dest": "../deploy/web-apps/apps/spreadsheeteditor/embed/locale/" + } + ], "index-page": { "../deploy/web-apps/apps/spreadsheeteditor/embed/index.html": "../apps/spreadsheeteditor/embed/index.html.deploy" }, From 9c6d950c3550fde61a7742b78af2b4d64e2f625d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 14 May 2019 16:55:52 +0300 Subject: [PATCH 101/510] Update translation --- apps/documenteditor/embed/js/ApplicationController.js | 4 ++-- apps/documenteditor/embed/locale/en.json | 4 ++-- apps/presentationeditor/embed/js/ApplicationController.js | 4 ++-- apps/presentationeditor/embed/locale/en.json | 4 ++-- apps/spreadsheeteditor/embed/js/ApplicationController.js | 4 ++-- apps/spreadsheeteditor/embed/locale/en.json | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 71ea2e9fd..482bd2bdc 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -539,8 +539,8 @@ DE.ApplicationController = new(function(){ create : createController, errorDefaultMessage : 'Error code: %1', unknownErrorText : 'Unknown error.', - convertationTimeoutText : 'Convertation timeout exceeded.', - convertationErrorText : 'Convertation failed.', + convertationTimeoutText : 'Conversion timeout exceeded.', + convertationErrorText : 'Conversion failed.', downloadErrorText : 'Download failed.', criticalErrorTitle : 'Error', notcriticalErrorTitle : 'Warning', diff --git a/apps/documenteditor/embed/locale/en.json b/apps/documenteditor/embed/locale/en.json index b750d452a..03ee4debc 100644 --- a/apps/documenteditor/embed/locale/en.json +++ b/apps/documenteditor/embed/locale/en.json @@ -10,8 +10,8 @@ "DE.ApplicationView.txtFullScreen": "Full Screen", "DE.ApplicationController.errorDefaultMessage": "Error code: %1", "DE.ApplicationController.unknownErrorText": "Unknown error.", - "DE.ApplicationController.convertationTimeoutText": "Convertation timeout exceeded.", - "DE.ApplicationController.convertationErrorText": "Convertation failed.", + "DE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", + "DE.ApplicationController.convertationErrorText": "Conversion failed.", "DE.ApplicationController.downloadErrorText": "Download failed.", "DE.ApplicationController.criticalErrorTitle": "Error", "DE.ApplicationController.notcriticalErrorTitle": "Warning", diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index e19836e10..80efd5dc3 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -610,8 +610,8 @@ PE.ApplicationController = new(function(){ create : createController, errorDefaultMessage : 'Error code: %1', unknownErrorText : 'Unknown error.', - convertationTimeoutText : 'Convertation timeout exceeded.', - convertationErrorText : 'Convertation failed.', + convertationTimeoutText : 'Conversion timeout exceeded.', + convertationErrorText : 'Conversion failed.', downloadErrorText : 'Download failed.', criticalErrorTitle : 'Error', notcriticalErrorTitle : 'Warning', diff --git a/apps/presentationeditor/embed/locale/en.json b/apps/presentationeditor/embed/locale/en.json index 88905ab55..1472c52d8 100644 --- a/apps/presentationeditor/embed/locale/en.json +++ b/apps/presentationeditor/embed/locale/en.json @@ -10,8 +10,8 @@ "PE.ApplicationView.txtFullScreen": "Full Screen", "PE.ApplicationController.errorDefaultMessage": "Error code: %1", "PE.ApplicationController.unknownErrorText": "Unknown error.", - "PE.ApplicationController.convertationTimeoutText": "Convertation timeout exceeded.", - "PE.ApplicationController.convertationErrorText": "Convertation failed.", + "PE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", + "PE.ApplicationController.convertationErrorText": "Conversion failed.", "PE.ApplicationController.downloadErrorText": "Download failed.", "PE.ApplicationController.criticalErrorTitle": "Error", "PE.ApplicationController.notcriticalErrorTitle": "Warning", diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 96219e2ad..9b638a239 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -557,8 +557,8 @@ SSE.ApplicationController = new(function(){ create : createController, errorDefaultMessage : 'Error code: %1', unknownErrorText : 'Unknown error.', - convertationTimeoutText : 'Convertation timeout exceeded.', - convertationErrorText : 'Convertation failed.', + convertationTimeoutText : 'Conversion timeout exceeded.', + convertationErrorText : 'Conversion failed.', downloadErrorText : 'Download failed.', criticalErrorTitle : 'Error', notcriticalErrorTitle : 'Warning', diff --git a/apps/spreadsheeteditor/embed/locale/en.json b/apps/spreadsheeteditor/embed/locale/en.json index 80d7d15d4..0d4322a23 100644 --- a/apps/spreadsheeteditor/embed/locale/en.json +++ b/apps/spreadsheeteditor/embed/locale/en.json @@ -10,8 +10,8 @@ "SSE.ApplicationView.txtFullScreen": "Full Screen", "SSE.ApplicationController.errorDefaultMessage": "Error code: %1", "SSE.ApplicationController.unknownErrorText": "Unknown error.", - "SSE.ApplicationController.convertationTimeoutText": "Convertation timeout exceeded.", - "SSE.ApplicationController.convertationErrorText": "Convertation failed.", + "SSE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", + "SSE.ApplicationController.convertationErrorText": "Conversion failed.", "SSE.ApplicationController.downloadErrorText": "Download failed.", "SSE.ApplicationController.criticalErrorTitle": "Error", "SSE.ApplicationController.notcriticalErrorTitle": "Warning", From e9391d30799db217ac18ebf0c8c9107f9678bf76 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 15 May 2019 14:17:29 +0300 Subject: [PATCH 102/510] [DE] Update document info --- apps/documenteditor/main/app/view/FileMenuPanels.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 16bea8c85..26180b49c 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -706,6 +706,8 @@ define([ '', '', '', + '', + '', '', '', '', @@ -782,6 +784,7 @@ define([ this.inputTitle = new Common.UI.InputField({ el : $('#id-info-title'), style : 'width: 200px;', + placeHolder : this.txtAddText, validateOnBlur: false }).on('changed:after', function() { // me.api && me.api.asc_setDocumentTitle(me.inputTitle.getValue()); @@ -789,6 +792,7 @@ define([ this.inputSubject = new Common.UI.InputField({ el : $('#id-info-subject'), style : 'width: 200px;', + placeHolder : this.txtAddText, validateOnBlur: false }).on('changed:after', function() { // me.api && me.api.asc_setDocumentSubject(me.inputSubject.getValue()); @@ -796,6 +800,7 @@ define([ this.inputComment = new Common.UI.InputField({ el : $('#id-info-comment'), style : 'width: 200px;', + placeHolder : this.txtAddText, validateOnBlur: false }).on('changed:after', function() { // me.api && me.api.asc_setDocumentComment(me.inputComment.getValue()); @@ -1026,8 +1031,8 @@ define([ this.lblTitle.text((name) ? name : '-'); }, - txtPlacement: 'File Location', - txtOwner: 'Owner on cloud', + txtPlacement: 'Location', + txtOwner: 'Owner', txtUploaded: 'Uploaded', txtPages: 'Pages', txtWords: 'Words', @@ -1044,7 +1049,8 @@ define([ txtModifyBy: 'Last Modified By', txtDate: 'Created', txtAuthor: 'Author', - txtAddAuthor: 'Add Author' + txtAddAuthor: 'Add Author', + txtAddText: 'Add Text' }, DE.Views.FileMenuPanels.DocumentInfo || {})); DE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({ From 40915c0c55a22492e9f5f218d9d91f49728353fa Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 15 May 2019 14:38:03 +0300 Subject: [PATCH 103/510] Update translation --- apps/documenteditor/embed/locale/bg.json | 28 +++++++++++++++ apps/documenteditor/embed/locale/cs.json | 24 +++++++++++++ apps/documenteditor/embed/locale/de.json | 28 +++++++++++++++ apps/documenteditor/embed/locale/en.json | 38 ++++++++++---------- apps/documenteditor/embed/locale/es.json | 28 +++++++++++++++ apps/documenteditor/embed/locale/fr.json | 28 +++++++++++++++ apps/documenteditor/embed/locale/hu.json | 21 +++++++++++ apps/documenteditor/embed/locale/it.json | 28 +++++++++++++++ apps/documenteditor/embed/locale/ja.json | 21 +++++++++++ apps/documenteditor/embed/locale/ko.json | 21 +++++++++++ apps/documenteditor/embed/locale/lv.json | 22 ++++++++++++ apps/documenteditor/embed/locale/nl.json | 23 ++++++++++++ apps/documenteditor/embed/locale/pl.json | 23 ++++++++++++ apps/documenteditor/embed/locale/pt.json | 22 ++++++++++++ apps/documenteditor/embed/locale/ru.json | 38 ++++++++++---------- apps/documenteditor/embed/locale/sk.json | 23 ++++++++++++ apps/documenteditor/embed/locale/sl.json | 21 +++++++++++ apps/documenteditor/embed/locale/tr.json | 22 ++++++++++++ apps/documenteditor/embed/locale/uk.json | 22 ++++++++++++ apps/documenteditor/embed/locale/vi.json | 22 ++++++++++++ apps/documenteditor/embed/locale/zh.json | 28 +++++++++++++++ apps/presentationeditor/embed/locale/bg.json | 28 +++++++++++++++ apps/presentationeditor/embed/locale/cs.json | 24 +++++++++++++ apps/presentationeditor/embed/locale/de.json | 28 +++++++++++++++ apps/presentationeditor/embed/locale/en.json | 38 ++++++++++---------- apps/presentationeditor/embed/locale/es.json | 28 +++++++++++++++ apps/presentationeditor/embed/locale/fr.json | 28 +++++++++++++++ apps/presentationeditor/embed/locale/hu.json | 21 +++++++++++ apps/presentationeditor/embed/locale/it.json | 28 +++++++++++++++ apps/presentationeditor/embed/locale/ja.json | 21 +++++++++++ apps/presentationeditor/embed/locale/ko.json | 21 +++++++++++ apps/presentationeditor/embed/locale/lv.json | 22 ++++++++++++ apps/presentationeditor/embed/locale/nl.json | 23 ++++++++++++ apps/presentationeditor/embed/locale/pl.json | 23 ++++++++++++ apps/presentationeditor/embed/locale/pt.json | 22 ++++++++++++ apps/presentationeditor/embed/locale/ru.json | 38 ++++++++++---------- apps/presentationeditor/embed/locale/sk.json | 23 ++++++++++++ apps/presentationeditor/embed/locale/sl.json | 21 +++++++++++ apps/presentationeditor/embed/locale/tr.json | 22 ++++++++++++ apps/presentationeditor/embed/locale/uk.json | 22 ++++++++++++ apps/presentationeditor/embed/locale/vi.json | 22 ++++++++++++ apps/presentationeditor/embed/locale/zh.json | 28 +++++++++++++++ apps/spreadsheeteditor/embed/locale/bg.json | 28 +++++++++++++++ apps/spreadsheeteditor/embed/locale/cs.json | 24 +++++++++++++ apps/spreadsheeteditor/embed/locale/de.json | 28 +++++++++++++++ apps/spreadsheeteditor/embed/locale/en.json | 38 ++++++++++---------- apps/spreadsheeteditor/embed/locale/es.json | 28 +++++++++++++++ apps/spreadsheeteditor/embed/locale/fr.json | 28 +++++++++++++++ apps/spreadsheeteditor/embed/locale/hu.json | 19 ++++++++++ apps/spreadsheeteditor/embed/locale/it.json | 28 +++++++++++++++ apps/spreadsheeteditor/embed/locale/ja.json | 21 +++++++++++ apps/spreadsheeteditor/embed/locale/ko.json | 21 +++++++++++ apps/spreadsheeteditor/embed/locale/lv.json | 22 ++++++++++++ apps/spreadsheeteditor/embed/locale/nl.json | 23 ++++++++++++ apps/spreadsheeteditor/embed/locale/pl.json | 23 ++++++++++++ apps/spreadsheeteditor/embed/locale/pt.json | 22 ++++++++++++ apps/spreadsheeteditor/embed/locale/ru.json | 38 ++++++++++---------- apps/spreadsheeteditor/embed/locale/sk.json | 23 ++++++++++++ apps/spreadsheeteditor/embed/locale/sl.json | 21 +++++++++++ apps/spreadsheeteditor/embed/locale/tr.json | 21 +++++++++++ apps/spreadsheeteditor/embed/locale/uk.json | 22 ++++++++++++ apps/spreadsheeteditor/embed/locale/vi.json | 22 ++++++++++++ apps/spreadsheeteditor/embed/locale/zh.json | 28 +++++++++++++++ 63 files changed, 1476 insertions(+), 114 deletions(-) create mode 100644 apps/documenteditor/embed/locale/bg.json create mode 100644 apps/documenteditor/embed/locale/cs.json create mode 100644 apps/documenteditor/embed/locale/de.json create mode 100644 apps/documenteditor/embed/locale/es.json create mode 100644 apps/documenteditor/embed/locale/fr.json create mode 100644 apps/documenteditor/embed/locale/hu.json create mode 100644 apps/documenteditor/embed/locale/it.json create mode 100644 apps/documenteditor/embed/locale/ja.json create mode 100644 apps/documenteditor/embed/locale/ko.json create mode 100644 apps/documenteditor/embed/locale/lv.json create mode 100644 apps/documenteditor/embed/locale/nl.json create mode 100644 apps/documenteditor/embed/locale/pl.json create mode 100644 apps/documenteditor/embed/locale/pt.json create mode 100644 apps/documenteditor/embed/locale/sk.json create mode 100644 apps/documenteditor/embed/locale/sl.json create mode 100644 apps/documenteditor/embed/locale/tr.json create mode 100644 apps/documenteditor/embed/locale/uk.json create mode 100644 apps/documenteditor/embed/locale/vi.json create mode 100644 apps/documenteditor/embed/locale/zh.json create mode 100644 apps/presentationeditor/embed/locale/bg.json create mode 100644 apps/presentationeditor/embed/locale/cs.json create mode 100644 apps/presentationeditor/embed/locale/de.json create mode 100644 apps/presentationeditor/embed/locale/es.json create mode 100644 apps/presentationeditor/embed/locale/fr.json create mode 100644 apps/presentationeditor/embed/locale/hu.json create mode 100644 apps/presentationeditor/embed/locale/it.json create mode 100644 apps/presentationeditor/embed/locale/ja.json create mode 100644 apps/presentationeditor/embed/locale/ko.json create mode 100644 apps/presentationeditor/embed/locale/lv.json create mode 100644 apps/presentationeditor/embed/locale/nl.json create mode 100644 apps/presentationeditor/embed/locale/pl.json create mode 100644 apps/presentationeditor/embed/locale/pt.json create mode 100644 apps/presentationeditor/embed/locale/sk.json create mode 100644 apps/presentationeditor/embed/locale/sl.json create mode 100644 apps/presentationeditor/embed/locale/tr.json create mode 100644 apps/presentationeditor/embed/locale/uk.json create mode 100644 apps/presentationeditor/embed/locale/vi.json create mode 100644 apps/presentationeditor/embed/locale/zh.json create mode 100644 apps/spreadsheeteditor/embed/locale/bg.json create mode 100644 apps/spreadsheeteditor/embed/locale/cs.json create mode 100644 apps/spreadsheeteditor/embed/locale/de.json create mode 100644 apps/spreadsheeteditor/embed/locale/es.json create mode 100644 apps/spreadsheeteditor/embed/locale/fr.json create mode 100644 apps/spreadsheeteditor/embed/locale/hu.json create mode 100644 apps/spreadsheeteditor/embed/locale/it.json create mode 100644 apps/spreadsheeteditor/embed/locale/ja.json create mode 100644 apps/spreadsheeteditor/embed/locale/ko.json create mode 100644 apps/spreadsheeteditor/embed/locale/lv.json create mode 100644 apps/spreadsheeteditor/embed/locale/nl.json create mode 100644 apps/spreadsheeteditor/embed/locale/pl.json create mode 100644 apps/spreadsheeteditor/embed/locale/pt.json create mode 100644 apps/spreadsheeteditor/embed/locale/sk.json create mode 100644 apps/spreadsheeteditor/embed/locale/sl.json create mode 100644 apps/spreadsheeteditor/embed/locale/tr.json create mode 100644 apps/spreadsheeteditor/embed/locale/uk.json create mode 100644 apps/spreadsheeteditor/embed/locale/vi.json create mode 100644 apps/spreadsheeteditor/embed/locale/zh.json diff --git a/apps/documenteditor/embed/locale/bg.json b/apps/documenteditor/embed/locale/bg.json new file mode 100644 index 000000000..63690dfe8 --- /dev/null +++ b/apps/documenteditor/embed/locale/bg.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Копиране в клипборда", + "common.view.modals.txtEmbed": "Вграждане", + "common.view.modals.txtHeight": "Височина", + "common.view.modals.txtShare": "Споделяне на връзка", + "common.view.modals.txtWidth": "Широчина", + "DE.ApplicationController.convertationErrorText": "Конвертирането е неуспешно.", + "DE.ApplicationController.convertationTimeoutText": "Превишава се времето на изтичане на реализациите.", + "DE.ApplicationController.criticalErrorTitle": "Грешка", + "DE.ApplicationController.downloadErrorText": "Изтеглянето се провали.", + "DE.ApplicationController.downloadTextText": "Документът се изтегли ...", + "DE.ApplicationController.errorAccessDeny": "Опитвате се да извършите действие, за което нямате права.
Моля, свържете се с администратора на сървъра за документи.", + "DE.ApplicationController.errorDefaultMessage": "Код на грешка: %1", + "DE.ApplicationController.errorFilePassProtect": "Файлът е защитен с парола и не може да бъде отворен.", + "DE.ApplicationController.errorUserDrop": "Файлът не може да бъде достъпен в момента.", + "DE.ApplicationController.notcriticalErrorTitle": "Внимание", + "DE.ApplicationController.scriptLoadError": "Връзката е твърде бавна, някои от компонентите не могат да бъдат заредени. Моля, презаредете страницата.", + "DE.ApplicationController.textLoadingDocument": "Зареждане на документ", + "DE.ApplicationController.textOf": "на", + "DE.ApplicationController.txtClose": "Затвори", + "DE.ApplicationController.unknownErrorText": "Неизвестна грешка.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Вашият браузър не се поддържа.", + "DE.ApplicationController.waitText": "Моля изчакай...", + "DE.ApplicationView.txtDownload": "Изтегли", + "DE.ApplicationView.txtEmbed": "Вграждане", + "DE.ApplicationView.txtFullScreen": "Цял екран", + "DE.ApplicationView.txtShare": "Дял" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/cs.json b/apps/documenteditor/embed/locale/cs.json new file mode 100644 index 000000000..53aee7c51 --- /dev/null +++ b/apps/documenteditor/embed/locale/cs.json @@ -0,0 +1,24 @@ +{ + "common.view.modals.txtCopy": "Zkopírovat do schránky", + "common.view.modals.txtHeight": "Výška", + "common.view.modals.txtWidth": "Šířka", + "DE.ApplicationController.convertationErrorText": "Konverze selhala.", + "DE.ApplicationController.convertationTimeoutText": "Vypršel čas konverze.", + "DE.ApplicationController.criticalErrorTitle": "Chyba", + "DE.ApplicationController.downloadErrorText": "Stahování selhalo.", + "DE.ApplicationController.downloadTextText": "Stahování dokumentu...", + "DE.ApplicationController.errorAccessDeny": "Pokoušíte se provést akci, na kterou nemáte oprávnění.
Prosím, kontaktujte administrátora vašeho Dokumentového serveru.", + "DE.ApplicationController.errorDefaultMessage": "Kód chyby: %1", + "DE.ApplicationController.errorFilePassProtect": "Dokument je chráněn heslem a nelze otevřít.", + "DE.ApplicationController.errorUserDrop": "Tento soubor není nyní přístupný.", + "DE.ApplicationController.notcriticalErrorTitle": "Varování", + "DE.ApplicationController.textLoadingDocument": "Načítání dokumentu", + "DE.ApplicationController.textOf": "z", + "DE.ApplicationController.txtClose": "Zavřít", + "DE.ApplicationController.unknownErrorText": "Neznámá chyba.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Váš prohlížeč není podporován.", + "DE.ApplicationController.waitText": "Prosím, čekejte...", + "DE.ApplicationView.txtDownload": "Stáhnout", + "DE.ApplicationView.txtFullScreen": "Celá obrazovka", + "DE.ApplicationView.txtShare": "Sdílet" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/de.json b/apps/documenteditor/embed/locale/de.json new file mode 100644 index 000000000..9e9088315 --- /dev/null +++ b/apps/documenteditor/embed/locale/de.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "In die Zwischenablage kopieren", + "common.view.modals.txtEmbed": "Einbetten", + "common.view.modals.txtHeight": "Höhe", + "common.view.modals.txtShare": "Link teilen", + "common.view.modals.txtWidth": "Breite", + "DE.ApplicationController.convertationErrorText": "Konvertierung ist fehlgeschlagen.", + "DE.ApplicationController.convertationTimeoutText": "Timeout für die Konvertierung wurde überschritten.", + "DE.ApplicationController.criticalErrorTitle": "Fehler", + "DE.ApplicationController.downloadErrorText": "Herunterladen ist fehlgeschlagen.", + "DE.ApplicationController.downloadTextText": "Dokument wird heruntergeladen...", + "DE.ApplicationController.errorAccessDeny": "Sie haben versucht die Änderungen im Dokument, zu dem Sie keine Berechtigungen haben, vorzunehemen.
Wenden Sie sich an Ihren Serveradministrator.", + "DE.ApplicationController.errorDefaultMessage": "Fehlercode: %1", + "DE.ApplicationController.errorFilePassProtect": "Das Dokument ist kennwortgeschützt und kann nicht geöffnet werden.", + "DE.ApplicationController.errorUserDrop": "Kein Zugriff auf diese Datei ist möglich.", + "DE.ApplicationController.notcriticalErrorTitle": "Warnung", + "DE.ApplicationController.scriptLoadError": "Die Verbindung ist zu langsam, einige der Komponenten konnten nicht geladen werden. Bitte laden Sie die Seite erneut.", + "DE.ApplicationController.textLoadingDocument": "Dokument wird geladen...", + "DE.ApplicationController.textOf": "von", + "DE.ApplicationController.txtClose": "Schließen", + "DE.ApplicationController.unknownErrorText": "Unbekannter Fehler.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Ihr Webbrowser wird nicht unterstützt.", + "DE.ApplicationController.waitText": "Bitte warten...", + "DE.ApplicationView.txtDownload": "Herunterladen", + "DE.ApplicationView.txtEmbed": "Einbetten", + "DE.ApplicationView.txtFullScreen": "Vollbild-Modus", + "DE.ApplicationView.txtShare": "Freigeben" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/en.json b/apps/documenteditor/embed/locale/en.json index 03ee4debc..77a8b48f8 100644 --- a/apps/documenteditor/embed/locale/en.json +++ b/apps/documenteditor/embed/locale/en.json @@ -1,28 +1,28 @@ { - "common.view.modals.txtWidth": "Width", - "common.view.modals.txtHeight": "Height", - "common.view.modals.txtShare": "Share Link", "common.view.modals.txtCopy": "Copy to clipboard", "common.view.modals.txtEmbed": "Embed", - "DE.ApplicationView.txtDownload": "Download", - "DE.ApplicationView.txtShare": "Share", - "DE.ApplicationView.txtEmbed": "Embed", - "DE.ApplicationView.txtFullScreen": "Full Screen", - "DE.ApplicationController.errorDefaultMessage": "Error code: %1", - "DE.ApplicationController.unknownErrorText": "Unknown error.", - "DE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", + "common.view.modals.txtHeight": "Height", + "common.view.modals.txtShare": "Share Link", + "common.view.modals.txtWidth": "Width", "DE.ApplicationController.convertationErrorText": "Conversion failed.", - "DE.ApplicationController.downloadErrorText": "Download failed.", + "DE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", "DE.ApplicationController.criticalErrorTitle": "Error", + "DE.ApplicationController.downloadErrorText": "Download failed.", + "DE.ApplicationController.downloadTextText": "Downloading document...", + "DE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", + "DE.ApplicationController.errorDefaultMessage": "Error code: %1", + "DE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", + "DE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", "DE.ApplicationController.notcriticalErrorTitle": "Warning", "DE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", - "DE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", - "DE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", - "DE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", - "DE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", - "DE.ApplicationController.textOf": "of", - "DE.ApplicationController.downloadTextText": "Downloading document...", - "DE.ApplicationController.waitText": "Please, wait...", "DE.ApplicationController.textLoadingDocument": "Loading document", - "DE.ApplicationController.txtClose": "Close" + "DE.ApplicationController.textOf": "of", + "DE.ApplicationController.txtClose": "Close", + "DE.ApplicationController.unknownErrorText": "Unknown error.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", + "DE.ApplicationController.waitText": "Please, wait...", + "DE.ApplicationView.txtDownload": "Download", + "DE.ApplicationView.txtEmbed": "Embed", + "DE.ApplicationView.txtFullScreen": "Full Screen", + "DE.ApplicationView.txtShare": "Share" } \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/es.json b/apps/documenteditor/embed/locale/es.json new file mode 100644 index 000000000..ea08f6722 --- /dev/null +++ b/apps/documenteditor/embed/locale/es.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Copiar al portapapeles", + "common.view.modals.txtEmbed": "Incorporar", + "common.view.modals.txtHeight": "Altura", + "common.view.modals.txtShare": "Compartir enlace", + "common.view.modals.txtWidth": "Ancho", + "DE.ApplicationController.convertationErrorText": "Fallo de conversión.", + "DE.ApplicationController.convertationTimeoutText": "Límite de tiempo de conversión está superado.", + "DE.ApplicationController.criticalErrorTitle": "Error", + "DE.ApplicationController.downloadErrorText": "Fallo en descarga.", + "DE.ApplicationController.downloadTextText": "Cargando documento...", + "DE.ApplicationController.errorAccessDeny": "Usted no tiene permisos para realizar la acción que está intentando hacer.
Por favor, contacte con su Administrador del Servidor de Documentos.", + "DE.ApplicationController.errorDefaultMessage": "Código de error: %1", + "DE.ApplicationController.errorFilePassProtect": "El archivo está protegido por una contraseña y no puede ser abierto.", + "DE.ApplicationController.errorUserDrop": "No se puede acceder al archivo ahora mismo.", + "DE.ApplicationController.notcriticalErrorTitle": "Aviso", + "DE.ApplicationController.scriptLoadError": "La conexión a Internet es demasiado lenta, no se podía cargar algunos componentes. Por favor, recargue la página.", + "DE.ApplicationController.textLoadingDocument": "Cargando documento", + "DE.ApplicationController.textOf": "de", + "DE.ApplicationController.txtClose": "Cerrar", + "DE.ApplicationController.unknownErrorText": "Error desconocido.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Su navegador no está soportado.", + "DE.ApplicationController.waitText": "Por favor, espere...", + "DE.ApplicationView.txtDownload": "Descargar", + "DE.ApplicationView.txtEmbed": "Incorporar", + "DE.ApplicationView.txtFullScreen": "Pantalla Completa", + "DE.ApplicationView.txtShare": "Compartir" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/fr.json b/apps/documenteditor/embed/locale/fr.json new file mode 100644 index 000000000..1145973e3 --- /dev/null +++ b/apps/documenteditor/embed/locale/fr.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Copier dans le Presse-papiers", + "common.view.modals.txtEmbed": "Incorporer", + "common.view.modals.txtHeight": "Hauteur", + "common.view.modals.txtShare": "Partager un lien", + "common.view.modals.txtWidth": "Largeur", + "DE.ApplicationController.convertationErrorText": "Échec de la conversion.", + "DE.ApplicationController.convertationTimeoutText": "Délai d'attente de la conversion dépassé ", + "DE.ApplicationController.criticalErrorTitle": "Erreur", + "DE.ApplicationController.downloadErrorText": "Échec du téléchargement.", + "DE.ApplicationController.downloadTextText": "Téléchargement du document...", + "DE.ApplicationController.errorAccessDeny": "Vous tentez d'exéсuter une action pour laquelle vous ne disposez pas des droits.
Veuillez contacter l'administrateur de Document Server.", + "DE.ApplicationController.errorDefaultMessage": "Code d'erreur: %1", + "DE.ApplicationController.errorFilePassProtect": "Le fichier est protégé par le mot de passe et ne peut pas être ouvert.", + "DE.ApplicationController.errorUserDrop": "Impossible d'accéder au fichier.", + "DE.ApplicationController.notcriticalErrorTitle": "Avertissement", + "DE.ApplicationController.scriptLoadError": "La connexion est trop lente, certains éléments ne peuvent pas être chargés. Veuillez recharger la page.", + "DE.ApplicationController.textLoadingDocument": "Chargement du document", + "DE.ApplicationController.textOf": "de", + "DE.ApplicationController.txtClose": "Fermer", + "DE.ApplicationController.unknownErrorText": "Erreur inconnue.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Votre navigateur n'est pas pris en charge.", + "DE.ApplicationController.waitText": "Veuillez patienter...", + "DE.ApplicationView.txtDownload": "Télécharger", + "DE.ApplicationView.txtEmbed": "Incorporer", + "DE.ApplicationView.txtFullScreen": "Plein écran", + "DE.ApplicationView.txtShare": "Partager" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/hu.json b/apps/documenteditor/embed/locale/hu.json new file mode 100644 index 000000000..e20d00001 --- /dev/null +++ b/apps/documenteditor/embed/locale/hu.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtHeight": "Magasság", + "common.view.modals.txtWidth": "Szélesség", + "DE.ApplicationController.convertationTimeoutText": "Időtúllépés az átalakítás során.", + "DE.ApplicationController.criticalErrorTitle": "Hiba", + "DE.ApplicationController.downloadErrorText": "Sikertelen letöltés.", + "DE.ApplicationController.downloadTextText": "Dokumentum letöltése...", + "DE.ApplicationController.errorAccessDeny": "Olyan műveletet próbál végrehajtani, melyre nincs jogosultsága.
Vegye fel a kapcsolatot a Document Server adminisztrátorával.", + "DE.ApplicationController.errorDefaultMessage": "Hibakód: %1", + "DE.ApplicationController.errorFilePassProtect": "A dokumentum jelszóval védett, és nem nyitható meg.", + "DE.ApplicationController.errorUserDrop": "A dokumentum jelenleg nem elérhető", + "DE.ApplicationController.notcriticalErrorTitle": "Figyelmeztetés", + "DE.ApplicationController.scriptLoadError": "A kapcsolat túl lassú, néhány komponens nem töltődött be. Frissítse az oldalt.", + "DE.ApplicationController.textLoadingDocument": "Dokumentum betöltése", + "DE.ApplicationController.txtClose": "Bezár", + "DE.ApplicationController.unknownErrorText": "Ismeretlen hiba.", + "DE.ApplicationController.unsupportedBrowserErrorText": "A böngészője nem támogatott.", + "DE.ApplicationView.txtDownload": "Letöltés", + "DE.ApplicationView.txtFullScreen": "Teljes képernyő", + "DE.ApplicationView.txtShare": "Megosztás" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/it.json b/apps/documenteditor/embed/locale/it.json new file mode 100644 index 000000000..327a968e2 --- /dev/null +++ b/apps/documenteditor/embed/locale/it.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Copia negli appunti", + "common.view.modals.txtEmbed": "Incorpora", + "common.view.modals.txtHeight": "Altezza", + "common.view.modals.txtShare": "Condividi collegamento", + "common.view.modals.txtWidth": "Larghezza", + "DE.ApplicationController.convertationErrorText": "Conversione fallita.", + "DE.ApplicationController.convertationTimeoutText": "È stato superato il tempo limite della conversione.", + "DE.ApplicationController.criticalErrorTitle": "Errore", + "DE.ApplicationController.downloadErrorText": "Scaricamento fallito", + "DE.ApplicationController.downloadTextText": "Scaricamento del documento in corso...", + "DE.ApplicationController.errorAccessDeny": "Stai tentando di eseguire un'azione per la quale non disponi di permessi sufficienti.
Si prega di contattare l'amministratore del Server dei Documenti.", + "DE.ApplicationController.errorDefaultMessage": "Codice errore: %1", + "DE.ApplicationController.errorFilePassProtect": "Il file è protetto da una password. Impossibile aprirlo.", + "DE.ApplicationController.errorUserDrop": "Impossibile accedere al file subito.", + "DE.ApplicationController.notcriticalErrorTitle": "Avviso", + "DE.ApplicationController.scriptLoadError": "La connessione è troppo lenta, alcuni componenti non possono essere caricati. Si prega di ricaricare la pagina.", + "DE.ApplicationController.textLoadingDocument": "Caricamento del documento", + "DE.ApplicationController.textOf": "di", + "DE.ApplicationController.txtClose": "Chiudi", + "DE.ApplicationController.unknownErrorText": "Errore sconosciuto.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Il tuo browser non è supportato.", + "DE.ApplicationController.waitText": "Per favore, attendi...", + "DE.ApplicationView.txtDownload": "Scarica", + "DE.ApplicationView.txtEmbed": "Incorpora", + "DE.ApplicationView.txtFullScreen": "Schermo intero", + "DE.ApplicationView.txtShare": "Condividi" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/ja.json b/apps/documenteditor/embed/locale/ja.json new file mode 100644 index 000000000..e3dfc777e --- /dev/null +++ b/apps/documenteditor/embed/locale/ja.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtHeight": "高さ", + "common.view.modals.txtWidth": "幅", + "DE.ApplicationController.convertationErrorText": "変換に失敗しました", + "DE.ApplicationController.convertationTimeoutText": "変換のタイムアウトを超過しました。", + "DE.ApplicationController.criticalErrorTitle": "エラー", + "DE.ApplicationController.downloadErrorText": "ダウンロードに失敗しました", + "DE.ApplicationController.downloadTextText": "ドキュメントのダウンロード中...", + "DE.ApplicationController.errorDefaultMessage": "エラー コード: %1", + "DE.ApplicationController.errorFilePassProtect": "ドキュメントがパスワードで保護されているため開くことができません", + "DE.ApplicationController.errorUserDrop": "今、ファイルにアクセスすることはできません。", + "DE.ApplicationController.notcriticalErrorTitle": "警告", + "DE.ApplicationController.textLoadingDocument": "ドキュメントを読み込んでいます", + "DE.ApplicationController.textOf": "から", + "DE.ApplicationController.txtClose": "閉じる", + "DE.ApplicationController.unknownErrorText": "不明なエラー", + "DE.ApplicationController.unsupportedBrowserErrorText": "お使いのブラウザがサポートされていません。", + "DE.ApplicationView.txtDownload": "ダウンロード", + "DE.ApplicationView.txtFullScreen": "全画面表示", + "DE.ApplicationView.txtShare": "シェア" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/ko.json b/apps/documenteditor/embed/locale/ko.json new file mode 100644 index 000000000..0724bd083 --- /dev/null +++ b/apps/documenteditor/embed/locale/ko.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtHeight": "높이", + "common.view.modals.txtWidth": "너비", + "DE.ApplicationController.convertationTimeoutText": "전환 시간 초과를 초과했습니다.", + "DE.ApplicationController.criticalErrorTitle": "오류", + "DE.ApplicationController.downloadErrorText": "다운로드하지 못했습니다.", + "DE.ApplicationController.downloadTextText": "문서 다운로드 중 ...", + "DE.ApplicationController.errorAccessDeny": "권한이없는 작업을 수행하려고합니다.
Document Server 관리자에게 문의하십시오.", + "DE.ApplicationController.errorDefaultMessage": "오류 코드 : %1", + "DE.ApplicationController.errorFilePassProtect": "이 문서는 암호로 보호되어있어 열 수 없습니다.", + "DE.ApplicationController.errorUserDrop": "파일에 지금 액세스 할 수 없습니다.", + "DE.ApplicationController.notcriticalErrorTitle": "경고", + "DE.ApplicationController.textLoadingDocument": "문서로드 중", + "DE.ApplicationController.textOf": "중", + "DE.ApplicationController.txtClose": "완료", + "DE.ApplicationController.unknownErrorText": "알 수없는 오류.", + "DE.ApplicationController.unsupportedBrowserErrorText": "사용중인 브라우저가 지원되지 않습니다.", + "DE.ApplicationView.txtDownload": "다운로드", + "DE.ApplicationView.txtFullScreen": "전체 화면", + "DE.ApplicationView.txtShare": "공유" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/lv.json b/apps/documenteditor/embed/locale/lv.json new file mode 100644 index 000000000..eab88f7f9 --- /dev/null +++ b/apps/documenteditor/embed/locale/lv.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Nokopēts starpliktuvē", + "common.view.modals.txtHeight": "Augstums", + "common.view.modals.txtWidth": "Platums", + "DE.ApplicationController.convertationErrorText": "Konversija neizdevās.", + "DE.ApplicationController.convertationTimeoutText": "Konversijas taimauts pārsniegts.", + "DE.ApplicationController.criticalErrorTitle": "Kļūda", + "DE.ApplicationController.downloadErrorText": "Lejuplāde neizdevās.", + "DE.ApplicationController.downloadTextText": "Lejuplādē dokumentu...", + "DE.ApplicationController.errorAccessDeny": "Jūs mēģināt veikt darbību, kuru nedrīkstat veikt.
Lūdzu, sazinieties ar savu dokumentu servera administratoru.", + "DE.ApplicationController.errorDefaultMessage": "Kļūdas kods: %1", + "DE.ApplicationController.errorFilePassProtect": "Fails ir aizsargāts ar paroli un to nevar atvērt.", + "DE.ApplicationController.errorUserDrop": "Failam šobrīd nevar piekļūt.", + "DE.ApplicationController.notcriticalErrorTitle": "Brīdinājums", + "DE.ApplicationController.textLoadingDocument": "Ielādē dokumentu", + "DE.ApplicationController.textOf": "no", + "DE.ApplicationController.txtClose": "Aizvērt", + "DE.ApplicationController.unknownErrorText": "Nezināma kļūda.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Jūsu pārlūkprogramma nav atbalstīta.", + "DE.ApplicationView.txtDownload": "Lejupielādēt", + "DE.ApplicationView.txtShare": "Dalīties" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/nl.json b/apps/documenteditor/embed/locale/nl.json new file mode 100644 index 000000000..93c687f69 --- /dev/null +++ b/apps/documenteditor/embed/locale/nl.json @@ -0,0 +1,23 @@ +{ + "common.view.modals.txtCopy": "Kopieer naar klembord", + "common.view.modals.txtHeight": "Hoogte", + "common.view.modals.txtWidth": "Breedte", + "DE.ApplicationController.convertationTimeoutText": "Time-out voor conversie overschreden.", + "DE.ApplicationController.criticalErrorTitle": "Fout", + "DE.ApplicationController.downloadErrorText": "Download mislukt.", + "DE.ApplicationController.downloadTextText": "Document wordt gedownload...", + "DE.ApplicationController.errorAccessDeny": "U probeert een actie uit te voeren waarvoor u geen rechten hebt.
Neem contact op met de beheerder van de documentserver.", + "DE.ApplicationController.errorDefaultMessage": "Foutcode: %1", + "DE.ApplicationController.errorFilePassProtect": "Het bestand is beschermd met een wachtwoord en kan niet worden geopend.", + "DE.ApplicationController.errorUserDrop": "Toegang tot het bestand is op dit moment niet mogelijk.", + "DE.ApplicationController.notcriticalErrorTitle": "Waarschuwing", + "DE.ApplicationController.scriptLoadError": "De verbinding is te langzaam, sommige componenten konden niet geladen worden. Laad de pagina opnieuw.", + "DE.ApplicationController.textLoadingDocument": "Document wordt geladen", + "DE.ApplicationController.textOf": "van", + "DE.ApplicationController.txtClose": "Sluiten", + "DE.ApplicationController.unknownErrorText": "Onbekende fout.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Uw browser wordt niet ondersteund.", + "DE.ApplicationView.txtDownload": "Downloaden", + "DE.ApplicationView.txtFullScreen": "Volledig scherm", + "DE.ApplicationView.txtShare": "Delen" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/pl.json b/apps/documenteditor/embed/locale/pl.json new file mode 100644 index 000000000..8e01748c2 --- /dev/null +++ b/apps/documenteditor/embed/locale/pl.json @@ -0,0 +1,23 @@ +{ + "common.view.modals.txtCopy": "Skopiuj do schowka", + "common.view.modals.txtHeight": "Wysokość", + "common.view.modals.txtWidth": "Szerokość", + "DE.ApplicationController.convertationTimeoutText": "Przekroczono limit czasu konwersji.", + "DE.ApplicationController.criticalErrorTitle": "Błąd", + "DE.ApplicationController.downloadErrorText": "Pobieranie nieudane.", + "DE.ApplicationController.downloadTextText": "Pobieranie dokumentu...", + "DE.ApplicationController.errorAccessDeny": "Próbujesz wykonać działanie, na które nie masz uprawnień.
Proszę skontaktować się z administratorem serwera dokumentów.", + "DE.ApplicationController.errorDefaultMessage": "Kod błędu: %1", + "DE.ApplicationController.errorFilePassProtect": "Dokument jest chroniony hasłem i nie może być otwarty.", + "DE.ApplicationController.errorUserDrop": "Nie można uzyskać dostępu do tego pliku.", + "DE.ApplicationController.notcriticalErrorTitle": "Ostrzeżenie", + "DE.ApplicationController.textLoadingDocument": "Ładowanie dokumentu", + "DE.ApplicationController.textOf": "z", + "DE.ApplicationController.txtClose": "Zamknij", + "DE.ApplicationController.unknownErrorText": "Nieznany błąd.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Twoja przeglądarka nie jest wspierana.", + "DE.ApplicationController.waitText": "Proszę czekać...", + "DE.ApplicationView.txtDownload": "Pobierz", + "DE.ApplicationView.txtFullScreen": "Pełny ekran", + "DE.ApplicationView.txtShare": "Udostępnij" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/pt.json b/apps/documenteditor/embed/locale/pt.json new file mode 100644 index 000000000..42280f39c --- /dev/null +++ b/apps/documenteditor/embed/locale/pt.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Copiar para a área de transferência", + "common.view.modals.txtHeight": "Altura", + "common.view.modals.txtWidth": "Largura", + "DE.ApplicationController.convertationTimeoutText": "Tempo limite de conversão excedido.", + "DE.ApplicationController.criticalErrorTitle": "Erro", + "DE.ApplicationController.downloadErrorText": "Falha ao baixar", + "DE.ApplicationController.downloadTextText": "Baixando documento...", + "DE.ApplicationController.errorAccessDeny": "Você está tentando executar uma ação para a qual não tem direitos.
Entre em contato com o administrador do Document Server.", + "DE.ApplicationController.errorDefaultMessage": "Código do erro: %1", + "DE.ApplicationController.errorFilePassProtect": "O documento é protegido por senha e não pode ser aberto.", + "DE.ApplicationController.errorUserDrop": "O arquivo não pode ser acessado agora.", + "DE.ApplicationController.notcriticalErrorTitle": "Aviso", + "DE.ApplicationController.textLoadingDocument": "Carregando documento", + "DE.ApplicationController.textOf": "de", + "DE.ApplicationController.txtClose": "Fechar", + "DE.ApplicationController.unknownErrorText": "Erro desconhecido.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Seu navegador não é suportado.", + "DE.ApplicationController.waitText": "Aguarde...", + "DE.ApplicationView.txtDownload": "Baixar", + "DE.ApplicationView.txtShare": "Compartilhar" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/ru.json b/apps/documenteditor/embed/locale/ru.json index 4afdf888c..ea575e0d1 100644 --- a/apps/documenteditor/embed/locale/ru.json +++ b/apps/documenteditor/embed/locale/ru.json @@ -1,28 +1,28 @@ { - "common.view.modals.txtWidth": "Ширина", - "common.view.modals.txtHeight": "Высота", - "common.view.modals.txtShare": "Поделиться ссылкой", "common.view.modals.txtCopy": "Скопировать в буфер", "common.view.modals.txtEmbed": "Встроить", - "DE.ApplicationView.txtDownload": "Скачать файл", - "DE.ApplicationView.txtShare": "Поделиться", - "DE.ApplicationView.txtEmbed": "Встроить", - "DE.ApplicationView.txtFullScreen": "Во весь экран", - "DE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", - "DE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", - "DE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", + "common.view.modals.txtHeight": "Высота", + "common.view.modals.txtShare": "Поделиться ссылкой", + "common.view.modals.txtWidth": "Ширина", "DE.ApplicationController.convertationErrorText": "Конвертация не удалась.", - "DE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "DE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", "DE.ApplicationController.criticalErrorTitle": "Ошибка", + "DE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "DE.ApplicationController.downloadTextText": "Загрузка документа...", + "DE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", + "DE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", + "DE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", + "DE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", "DE.ApplicationController.notcriticalErrorTitle": "Внимание", "DE.ApplicationController.scriptLoadError": "Слишком медленное подключение, некоторые компоненты не удалось загрузить. Пожалуйста, обновите страницу.", - "DE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", - "DE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", - "DE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", - "DE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", - "DE.ApplicationController.textOf": "из", - "DE.ApplicationController.downloadTextText": "Загрузка документа...", - "DE.ApplicationController.waitText": "Пожалуйста, подождите...", "DE.ApplicationController.textLoadingDocument": "Загрузка документа", - "DE.ApplicationController.txtClose": "Закрыть" + "DE.ApplicationController.textOf": "из", + "DE.ApplicationController.txtClose": "Закрыть", + "DE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.", + "DE.ApplicationController.waitText": "Пожалуйста, подождите...", + "DE.ApplicationView.txtDownload": "Скачать файл", + "DE.ApplicationView.txtEmbed": "Встроить", + "DE.ApplicationView.txtFullScreen": "Во весь экран", + "DE.ApplicationView.txtShare": "Поделиться" } \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/sk.json b/apps/documenteditor/embed/locale/sk.json new file mode 100644 index 000000000..c28aa45a6 --- /dev/null +++ b/apps/documenteditor/embed/locale/sk.json @@ -0,0 +1,23 @@ +{ + "common.view.modals.txtCopy": "Skopírovať do schránky", + "common.view.modals.txtHeight": "Výška", + "common.view.modals.txtWidth": "Šírka", + "DE.ApplicationController.convertationTimeoutText": "Prekročený čas konverzie.", + "DE.ApplicationController.criticalErrorTitle": "Chyba", + "DE.ApplicationController.downloadErrorText": "Sťahovanie zlyhalo.", + "DE.ApplicationController.downloadTextText": "Sťahovanie dokumentu...", + "DE.ApplicationController.errorAccessDeny": "Pokúšate sa vykonať akciu, na ktorú nemáte práva.
Prosím, kontaktujte svojho správcu dokumentového servera.", + "DE.ApplicationController.errorDefaultMessage": "Kód chyby: %1", + "DE.ApplicationController.errorFilePassProtect": "Dokument je chránený heslom a nie je možné ho otvoriť.", + "DE.ApplicationController.errorUserDrop": "K súboru nie je možné práve teraz získať prístup.", + "DE.ApplicationController.notcriticalErrorTitle": "Upozornenie", + "DE.ApplicationController.textLoadingDocument": "Načítavanie dokumentu", + "DE.ApplicationController.textOf": "z", + "DE.ApplicationController.txtClose": "Zatvoriť", + "DE.ApplicationController.unknownErrorText": "Neznáma chyba.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Váš prehliadač nie je podporovaný.", + "DE.ApplicationController.waitText": "Prosím čakajte...", + "DE.ApplicationView.txtDownload": "Stiahnuť", + "DE.ApplicationView.txtFullScreen": "Celá obrazovka", + "DE.ApplicationView.txtShare": "Zdieľať" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/sl.json b/apps/documenteditor/embed/locale/sl.json new file mode 100644 index 000000000..16f100dfc --- /dev/null +++ b/apps/documenteditor/embed/locale/sl.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtCopy": "Kopiraj v odložišče", + "common.view.modals.txtHeight": "Višina", + "common.view.modals.txtWidth": "Širina", + "DE.ApplicationController.convertationErrorText": "Pretvorba ni uspela.", + "DE.ApplicationController.convertationTimeoutText": "Pretvorbena prekinitev presežena.", + "DE.ApplicationController.criticalErrorTitle": "Napaka", + "DE.ApplicationController.downloadErrorText": "Prenos ni uspel.", + "DE.ApplicationController.downloadTextText": "Prenašanje dokumenta...", + "DE.ApplicationController.errorDefaultMessage": "Koda napake: %1", + "DE.ApplicationController.errorFilePassProtect": "Dokument je zaščiten z geslom in ga ni mogoče odpreti.", + "DE.ApplicationController.errorUserDrop": "Do datoteke v tem trenutku ni možno dostopati.", + "DE.ApplicationController.notcriticalErrorTitle": "Opozorilo", + "DE.ApplicationController.textLoadingDocument": "Nalaganje dokumenta", + "DE.ApplicationController.textOf": "od", + "DE.ApplicationController.txtClose": "Zapri", + "DE.ApplicationController.unknownErrorText": "Neznana napaka.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Vaš brskalnik ni podprt.", + "DE.ApplicationView.txtDownload": "Prenesi", + "DE.ApplicationView.txtShare": "Deli" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/tr.json b/apps/documenteditor/embed/locale/tr.json new file mode 100644 index 000000000..7e4f5129b --- /dev/null +++ b/apps/documenteditor/embed/locale/tr.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Panoya kopyala", + "common.view.modals.txtHeight": "Yükseklik", + "common.view.modals.txtWidth": "Genişlik", + "DE.ApplicationController.convertationErrorText": "Değişim başarısız oldu.", + "DE.ApplicationController.convertationTimeoutText": "Değişim süresi aşıldı.", + "DE.ApplicationController.criticalErrorTitle": "Hata", + "DE.ApplicationController.downloadErrorText": "Yükleme başarısız oldu.", + "DE.ApplicationController.downloadTextText": "Döküman yükleniyor...", + "DE.ApplicationController.errorAccessDeny": "Hakkınız olmayan bir eylem gerçekleştirmeye çalışıyorsunuz.
Lütfen Belge Sunucu yöneticinize başvurun.", + "DE.ApplicationController.errorDefaultMessage": "Hata kodu: %1", + "DE.ApplicationController.errorFilePassProtect": "Döküman şifre korumalı ve açılamadı", + "DE.ApplicationController.errorUserDrop": "Belgeye şu an erişilemiyor.", + "DE.ApplicationController.notcriticalErrorTitle": "Uyarı", + "DE.ApplicationController.textLoadingDocument": "Döküman yükleniyor", + "DE.ApplicationController.textOf": "'in", + "DE.ApplicationController.txtClose": "Kapat", + "DE.ApplicationController.unknownErrorText": "Bilinmeyen hata.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Tarayıcınız desteklenmiyor.", + "DE.ApplicationView.txtDownload": "İndir", + "DE.ApplicationView.txtShare": "Paylaş" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/uk.json b/apps/documenteditor/embed/locale/uk.json new file mode 100644 index 000000000..51db5f43e --- /dev/null +++ b/apps/documenteditor/embed/locale/uk.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Копіювати в буфер обміну", + "common.view.modals.txtHeight": "Висота", + "common.view.modals.txtWidth": "Ширина", + "DE.ApplicationController.convertationTimeoutText": "Термін переходу перевищено.", + "DE.ApplicationController.criticalErrorTitle": "Помилка", + "DE.ApplicationController.downloadErrorText": "Завантаження не вдалося", + "DE.ApplicationController.downloadTextText": "Завантаження документу...", + "DE.ApplicationController.errorAccessDeny": "Ви намагаєтеся виконати дію, на яку у вас немає прав.
Будь ласка, зв'яжіться з адміністратором вашого Сервера документів.", + "DE.ApplicationController.errorDefaultMessage": "Код помилки: %1", + "DE.ApplicationController.errorFilePassProtect": "Документ захищений паролем і його неможливо відкрити.", + "DE.ApplicationController.errorUserDrop": "На даний момент файл не доступний.", + "DE.ApplicationController.notcriticalErrorTitle": "Застереження", + "DE.ApplicationController.textLoadingDocument": "Завантаження документа", + "DE.ApplicationController.textOf": "з", + "DE.ApplicationController.txtClose": "Закрити", + "DE.ApplicationController.unknownErrorText": "Невідома помилка.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не підтримується", + "DE.ApplicationView.txtDownload": "Завантажити", + "DE.ApplicationView.txtFullScreen": "Повноекранний режим", + "DE.ApplicationView.txtShare": "Доступ" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/vi.json b/apps/documenteditor/embed/locale/vi.json new file mode 100644 index 000000000..ad3225af9 --- /dev/null +++ b/apps/documenteditor/embed/locale/vi.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Sao chép vào khay nhớ tạm", + "common.view.modals.txtHeight": "Chiều cao", + "common.view.modals.txtWidth": "Chiều rộng", + "DE.ApplicationController.convertationTimeoutText": "Đã quá thời gian chờ chuyển đổi.", + "DE.ApplicationController.criticalErrorTitle": "Lỗi", + "DE.ApplicationController.downloadErrorText": "Tải về không thành công.", + "DE.ApplicationController.downloadTextText": "Đang tải tài liệu...", + "DE.ApplicationController.errorAccessDeny": "Bạn đang cố gắng thực hiện hành động mà bạn không có quyền.
Vui lòng liên hệ với quản trị viên Server Tài liệu của bạn.", + "DE.ApplicationController.errorDefaultMessage": "Mã lỗi: %1", + "DE.ApplicationController.errorFilePassProtect": "Tài liệu được bảo vệ bằng mật khẩu và không thể mở được.", + "DE.ApplicationController.errorUserDrop": "Không thể truy cập file ngay lúc này.", + "DE.ApplicationController.notcriticalErrorTitle": "Cảnh báo", + "DE.ApplicationController.textLoadingDocument": "Đang tải tài liệu", + "DE.ApplicationController.textOf": "trên", + "DE.ApplicationController.txtClose": "Đóng", + "DE.ApplicationController.unknownErrorText": "Lỗi không xác định.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Trình duyệt của bạn không được hỗ trợ.", + "DE.ApplicationView.txtDownload": "Tải về", + "DE.ApplicationView.txtFullScreen": "Toàn màn hình", + "DE.ApplicationView.txtShare": "Chia sẻ" +} \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/zh.json b/apps/documenteditor/embed/locale/zh.json new file mode 100644 index 000000000..c2ac84814 --- /dev/null +++ b/apps/documenteditor/embed/locale/zh.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "复制到剪贴板", + "common.view.modals.txtEmbed": "嵌入", + "common.view.modals.txtHeight": "高度", + "common.view.modals.txtShare": "分享链接", + "common.view.modals.txtWidth": "宽度", + "DE.ApplicationController.convertationErrorText": "转换失败", + "DE.ApplicationController.convertationTimeoutText": "转换超时", + "DE.ApplicationController.criticalErrorTitle": "错误", + "DE.ApplicationController.downloadErrorText": "下载失败", + "DE.ApplicationController.downloadTextText": "正在下载文件...", + "DE.ApplicationController.errorAccessDeny": "您正在尝试执行您没有权限的操作。
请联系您的文档服务器管理员.", + "DE.ApplicationController.errorDefaultMessage": "错误代码:%1", + "DE.ApplicationController.errorFilePassProtect": "该文档受密码保护,无法被打开。", + "DE.ApplicationController.errorUserDrop": "该文件现在无法访问。", + "DE.ApplicationController.notcriticalErrorTitle": "警告", + "DE.ApplicationController.scriptLoadError": "连接速度过慢,部分组件无法被加载。请重新加载页面。", + "DE.ApplicationController.textLoadingDocument": "文件加载中…", + "DE.ApplicationController.textOf": "的", + "DE.ApplicationController.txtClose": "关闭", + "DE.ApplicationController.unknownErrorText": "示知错误", + "DE.ApplicationController.unsupportedBrowserErrorText": "你的浏览器不支持", + "DE.ApplicationController.waitText": "请稍候...", + "DE.ApplicationView.txtDownload": "下载", + "DE.ApplicationView.txtEmbed": "嵌入", + "DE.ApplicationView.txtFullScreen": "全屏", + "DE.ApplicationView.txtShare": "共享" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/bg.json b/apps/presentationeditor/embed/locale/bg.json new file mode 100644 index 000000000..9ae5b8973 --- /dev/null +++ b/apps/presentationeditor/embed/locale/bg.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Копиране в клипборда", + "common.view.modals.txtEmbed": "Вграждане", + "common.view.modals.txtHeight": "Височина", + "common.view.modals.txtShare": "Споделяне на връзка", + "common.view.modals.txtWidth": "Широчина", + "PE.ApplicationController.convertationErrorText": "Конвертирането е неуспешно.", + "PE.ApplicationController.convertationTimeoutText": "Превишава се времето на изтичане на реализациите.", + "PE.ApplicationController.criticalErrorTitle": "Грешка", + "PE.ApplicationController.downloadErrorText": "Изтеглянето се провали.", + "PE.ApplicationController.downloadTextText": "Презентация се се изтегли ...", + "PE.ApplicationController.errorAccessDeny": "Опитвате се да извършите действие, за което нямате права.
Моля, свържете се с администратора на сървъра за документи.", + "PE.ApplicationController.errorDefaultMessage": "Код на грешка: %1", + "PE.ApplicationController.errorFilePassProtect": "Файлът е защитен с парола и не може да бъде отворен.", + "PE.ApplicationController.errorUserDrop": "Файлът не може да бъде достъпен в момента.", + "PE.ApplicationController.notcriticalErrorTitle": "Внимание", + "PE.ApplicationController.scriptLoadError": "Връзката е твърде бавна, някои от компонентите не могат да бъдат заредени. Моля, презаредете страницата.", + "PE.ApplicationController.textLoadingDocument": "Зареждане на презентацията", + "PE.ApplicationController.textOf": "на", + "PE.ApplicationController.txtClose": "Затвори", + "PE.ApplicationController.unknownErrorText": "Неизвестна грешка.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Вашият браузър не се поддържа.", + "PE.ApplicationController.waitText": "Моля изчакай...", + "PE.ApplicationView.txtDownload": "Изтегли", + "PE.ApplicationView.txtEmbed": "Вграждане", + "PE.ApplicationView.txtFullScreen": "Цял екран", + "PE.ApplicationView.txtShare": "Дял" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/cs.json b/apps/presentationeditor/embed/locale/cs.json new file mode 100644 index 000000000..88f5669ab --- /dev/null +++ b/apps/presentationeditor/embed/locale/cs.json @@ -0,0 +1,24 @@ +{ + "common.view.modals.txtCopy": "Zkopírovat do schránky", + "common.view.modals.txtHeight": "Výška", + "common.view.modals.txtWidth": "Šířka", + "PE.ApplicationController.convertationErrorText": "Konverze selhala.", + "PE.ApplicationController.convertationTimeoutText": "Vypršel čas konverze.", + "PE.ApplicationController.criticalErrorTitle": "Chyba", + "PE.ApplicationController.downloadErrorText": "Stahování selhalo.", + "PE.ApplicationController.downloadTextText": "Stahování prezentace...", + "PE.ApplicationController.errorAccessDeny": "Pokoušíte se provést akci, na kterou nemáte oprávnění.
Prosím, kontaktujte administrátora vašeho Dokumentového serveru.", + "PE.ApplicationController.errorDefaultMessage": "Kód chyby: %1", + "PE.ApplicationController.errorFilePassProtect": "Dokument je chráněn heslem a nelze otevřít.", + "PE.ApplicationController.errorUserDrop": "Tento soubor není nyní přístupný.", + "PE.ApplicationController.notcriticalErrorTitle": "Varování", + "PE.ApplicationController.textLoadingDocument": "Načítání prezentace", + "PE.ApplicationController.textOf": "z", + "PE.ApplicationController.txtClose": "Zavřít", + "PE.ApplicationController.unknownErrorText": "Neznámá chyba.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Váš prohlížeč není podporován.", + "PE.ApplicationController.waitText": "Prosím, čekejte...", + "PE.ApplicationView.txtDownload": "Stáhnout", + "PE.ApplicationView.txtFullScreen": "Celá obrazovka", + "PE.ApplicationView.txtShare": "Sdílet" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/de.json b/apps/presentationeditor/embed/locale/de.json new file mode 100644 index 000000000..84f4a4530 --- /dev/null +++ b/apps/presentationeditor/embed/locale/de.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "In die Zwischenablage kopieren", + "common.view.modals.txtEmbed": "Einbetten", + "common.view.modals.txtHeight": "Höhe", + "common.view.modals.txtShare": "Link teilen", + "common.view.modals.txtWidth": "Breite", + "PE.ApplicationController.convertationErrorText": "Konvertierung ist fehlgeschlagen.", + "PE.ApplicationController.convertationTimeoutText": "Timeout für die Konvertierung wurde überschritten.", + "PE.ApplicationController.criticalErrorTitle": "Fehler", + "PE.ApplicationController.downloadErrorText": "Herunterladen ist fehlgeschlagen.", + "PE.ApplicationController.downloadTextText": "Präsentation wird heruntergeladen...", + "PE.ApplicationController.errorAccessDeny": "Sie haben versucht die Änderungen im Dokument, zu dem Sie keine Berechtigungen haben, vorzunehemen.
Wenden Sie sich an Ihren Serveradministrator.", + "PE.ApplicationController.errorDefaultMessage": "Fehlercode: %1", + "PE.ApplicationController.errorFilePassProtect": "Das Dokument ist kennwortgeschützt und kann nicht geöffnet werden.", + "PE.ApplicationController.errorUserDrop": "Kein Zugriff auf diese Datei ist möglich.", + "PE.ApplicationController.notcriticalErrorTitle": "Warnung", + "PE.ApplicationController.scriptLoadError": "Die Verbindung ist zu langsam, einige der Komponenten konnten nicht geladen werden. Bitte laden Sie die Seite erneut.", + "PE.ApplicationController.textLoadingDocument": "Präsentation wird geladen", + "PE.ApplicationController.textOf": "von", + "PE.ApplicationController.txtClose": "Schließen", + "PE.ApplicationController.unknownErrorText": "Unbekannter Fehler.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Ihr Webbrowser wird nicht unterstützt.", + "PE.ApplicationController.waitText": "Bitte warten...", + "PE.ApplicationView.txtDownload": "Herunterladen", + "PE.ApplicationView.txtEmbed": "Einbetten", + "PE.ApplicationView.txtFullScreen": "Vollbild-Modus", + "PE.ApplicationView.txtShare": "Freigeben" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/en.json b/apps/presentationeditor/embed/locale/en.json index 1472c52d8..c25ad71da 100644 --- a/apps/presentationeditor/embed/locale/en.json +++ b/apps/presentationeditor/embed/locale/en.json @@ -1,28 +1,28 @@ { - "common.view.modals.txtWidth": "Width", - "common.view.modals.txtHeight": "Height", - "common.view.modals.txtShare": "Share Link", "common.view.modals.txtCopy": "Copy to clipboard", "common.view.modals.txtEmbed": "Embed", - "PE.ApplicationView.txtDownload": "Download", - "PE.ApplicationView.txtShare": "Share", - "PE.ApplicationView.txtEmbed": "Embed", - "PE.ApplicationView.txtFullScreen": "Full Screen", - "PE.ApplicationController.errorDefaultMessage": "Error code: %1", - "PE.ApplicationController.unknownErrorText": "Unknown error.", - "PE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", + "common.view.modals.txtHeight": "Height", + "common.view.modals.txtShare": "Share Link", + "common.view.modals.txtWidth": "Width", "PE.ApplicationController.convertationErrorText": "Conversion failed.", - "PE.ApplicationController.downloadErrorText": "Download failed.", + "PE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", "PE.ApplicationController.criticalErrorTitle": "Error", + "PE.ApplicationController.downloadErrorText": "Download failed.", + "PE.ApplicationController.downloadTextText": "Downloading presentation...", + "PE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", + "PE.ApplicationController.errorDefaultMessage": "Error code: %1", + "PE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", + "PE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", "PE.ApplicationController.notcriticalErrorTitle": "Warning", "PE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", - "PE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", - "PE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", - "PE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", - "PE.ApplicationController.textOf": "of", - "PE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", - "PE.ApplicationController.downloadTextText": "Downloading presentation...", - "PE.ApplicationController.waitText": "Please, wait...", "PE.ApplicationController.textLoadingDocument": "Loading presentation", - "PE.ApplicationController.txtClose": "Close" + "PE.ApplicationController.textOf": "of", + "PE.ApplicationController.txtClose": "Close", + "PE.ApplicationController.unknownErrorText": "Unknown error.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", + "PE.ApplicationController.waitText": "Please, wait...", + "PE.ApplicationView.txtDownload": "Download", + "PE.ApplicationView.txtEmbed": "Embed", + "PE.ApplicationView.txtFullScreen": "Full Screen", + "PE.ApplicationView.txtShare": "Share" } \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/es.json b/apps/presentationeditor/embed/locale/es.json new file mode 100644 index 000000000..0cb26d995 --- /dev/null +++ b/apps/presentationeditor/embed/locale/es.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Copiar al portapapeles", + "common.view.modals.txtEmbed": "Incorporar", + "common.view.modals.txtHeight": "Altura", + "common.view.modals.txtShare": "Compartir enlace", + "common.view.modals.txtWidth": "Ancho", + "PE.ApplicationController.convertationErrorText": "Fallo de conversión.", + "PE.ApplicationController.convertationTimeoutText": "Límite de tiempo de conversión está superado.", + "PE.ApplicationController.criticalErrorTitle": "Error", + "PE.ApplicationController.downloadErrorText": "Fallo en descarga.", + "PE.ApplicationController.downloadTextText": "Descargando presentación...", + "PE.ApplicationController.errorAccessDeny": "Usted no tiene permisos para realizar la acción que está intentando hacer.
Por favor, contacte con su Administrador del Servidor de Documentos.", + "PE.ApplicationController.errorDefaultMessage": "Código de error: %1", + "PE.ApplicationController.errorFilePassProtect": "El archivo está protegido por una contraseña y no puede ser abierto.", + "PE.ApplicationController.errorUserDrop": "No se puede acceder al archivo ahora mismo.", + "PE.ApplicationController.notcriticalErrorTitle": "Aviso", + "PE.ApplicationController.scriptLoadError": "La conexión a Internet es demasiado lenta, no se podía cargar algunos componentes. Por favor, recargue la página.", + "PE.ApplicationController.textLoadingDocument": "Cargando presentación", + "PE.ApplicationController.textOf": "de", + "PE.ApplicationController.txtClose": "Cerrar", + "PE.ApplicationController.unknownErrorText": "Error desconocido.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Su navegador no está soportado.", + "PE.ApplicationController.waitText": "Por favor, espere...", + "PE.ApplicationView.txtDownload": "Descargar", + "PE.ApplicationView.txtEmbed": "Incorporar", + "PE.ApplicationView.txtFullScreen": "Pantalla Completa", + "PE.ApplicationView.txtShare": "Compartir" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/fr.json b/apps/presentationeditor/embed/locale/fr.json new file mode 100644 index 000000000..59e98e217 --- /dev/null +++ b/apps/presentationeditor/embed/locale/fr.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Copier dans le Presse-papiers", + "common.view.modals.txtEmbed": "Incorporer", + "common.view.modals.txtHeight": "Hauteur", + "common.view.modals.txtShare": "Partager un lien", + "common.view.modals.txtWidth": "Largeur", + "PE.ApplicationController.convertationErrorText": "Échec de la conversion.", + "PE.ApplicationController.convertationTimeoutText": "Délai d'attente de la conversion dépassé ", + "PE.ApplicationController.criticalErrorTitle": "Erreur", + "PE.ApplicationController.downloadErrorText": "Échec du téléchargement.", + "PE.ApplicationController.downloadTextText": "Téléchargement de la présentation...", + "PE.ApplicationController.errorAccessDeny": "Vous tentez d'exéсuter une action pour laquelle vous ne disposez pas des droits.
Veuillez contacter l'administrateur de Document Server.", + "PE.ApplicationController.errorDefaultMessage": "Code d'erreur: %1", + "PE.ApplicationController.errorFilePassProtect": "Le fichier est protégé par le mot de passe et ne peut pas être ouvert.", + "PE.ApplicationController.errorUserDrop": "Impossible d'accéder au fichier.", + "PE.ApplicationController.notcriticalErrorTitle": "Avertissement", + "PE.ApplicationController.scriptLoadError": "La connexion est trop lente, certains éléments ne peuvent pas être chargés. Veuillez recharger la page.", + "PE.ApplicationController.textLoadingDocument": "Chargement de la présentation", + "PE.ApplicationController.textOf": "de", + "PE.ApplicationController.txtClose": "Fermer", + "PE.ApplicationController.unknownErrorText": "Erreur inconnue.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Votre navigateur n'est pas pris en charge.", + "PE.ApplicationController.waitText": "Veuillez patienter...", + "PE.ApplicationView.txtDownload": "Télécharger", + "PE.ApplicationView.txtEmbed": "Incorporer", + "PE.ApplicationView.txtFullScreen": "Plein écran", + "PE.ApplicationView.txtShare": "Partager" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/hu.json b/apps/presentationeditor/embed/locale/hu.json new file mode 100644 index 000000000..c178d8383 --- /dev/null +++ b/apps/presentationeditor/embed/locale/hu.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtHeight": "Magasság", + "common.view.modals.txtWidth": "Szélesség", + "PE.ApplicationController.convertationTimeoutText": "Időtúllépés az átalakítás során.", + "PE.ApplicationController.criticalErrorTitle": "Hiba", + "PE.ApplicationController.downloadErrorText": "Sikertelen letöltés.", + "PE.ApplicationController.downloadTextText": "Prezentáció letöltése...", + "PE.ApplicationController.errorAccessDeny": "Olyan műveletet próbál végrehajtani, melyre nincs jogosultsága.
Vegye fel a kapcsolatot a Document Server adminisztrátorával.", + "PE.ApplicationController.errorDefaultMessage": "Hibakód: %1", + "PE.ApplicationController.errorFilePassProtect": "A dokumentum jelszóval védett, és nem nyitható meg.", + "PE.ApplicationController.errorUserDrop": "A dokumentum jelenleg nem elérhető", + "PE.ApplicationController.notcriticalErrorTitle": "Figyelmeztetés", + "PE.ApplicationController.scriptLoadError": "A kapcsolat túl lassú, néhány komponens nem töltődött be. Frissítse az oldalt.", + "PE.ApplicationController.textLoadingDocument": "Prezentáció betöltése", + "PE.ApplicationController.txtClose": "Bezár", + "PE.ApplicationController.unknownErrorText": "Ismeretlen hiba.", + "PE.ApplicationController.unsupportedBrowserErrorText": "A böngészője nem támogatott.", + "PE.ApplicationView.txtDownload": "Letöltés", + "PE.ApplicationView.txtFullScreen": "Teljes képernyő", + "PE.ApplicationView.txtShare": "Megosztás" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/it.json b/apps/presentationeditor/embed/locale/it.json new file mode 100644 index 000000000..1847821b7 --- /dev/null +++ b/apps/presentationeditor/embed/locale/it.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Copia negli appunti", + "common.view.modals.txtEmbed": "Incorpora", + "common.view.modals.txtHeight": "Altezza", + "common.view.modals.txtShare": "Condividi collegamento", + "common.view.modals.txtWidth": "Larghezza", + "PE.ApplicationController.convertationErrorText": "Conversione fallita.", + "PE.ApplicationController.convertationTimeoutText": "È stato superato il tempo limite della conversione.", + "PE.ApplicationController.criticalErrorTitle": "Errore", + "PE.ApplicationController.downloadErrorText": "Scaricamento fallito", + "PE.ApplicationController.downloadTextText": "Download della presentazione in corso...", + "PE.ApplicationController.errorAccessDeny": "Stai tentando di eseguire un'azione per la quale non disponi di permessi sufficienti.
Si prega di contattare l'amministratore del Server dei Documenti.", + "PE.ApplicationController.errorDefaultMessage": "Codice errore: %1", + "PE.ApplicationController.errorFilePassProtect": "Il file è protetto da una password. Impossibile aprirlo.", + "PE.ApplicationController.errorUserDrop": "Impossibile accedere al file subito.", + "PE.ApplicationController.notcriticalErrorTitle": "Avviso", + "PE.ApplicationController.scriptLoadError": "La connessione è troppo lenta, alcuni componenti non possono essere caricati. Si prega di ricaricare la pagina.", + "PE.ApplicationController.textLoadingDocument": "Caricamento della presentazione", + "PE.ApplicationController.textOf": "di", + "PE.ApplicationController.txtClose": "Chiudi", + "PE.ApplicationController.unknownErrorText": "Errore sconosciuto.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Il tuo browser non è supportato.", + "PE.ApplicationController.waitText": "Per favore, attendi...", + "PE.ApplicationView.txtDownload": "Scarica", + "PE.ApplicationView.txtEmbed": "Incorpora", + "PE.ApplicationView.txtFullScreen": "Schermo intero", + "PE.ApplicationView.txtShare": "Condividi" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/ja.json b/apps/presentationeditor/embed/locale/ja.json new file mode 100644 index 000000000..9960fcec0 --- /dev/null +++ b/apps/presentationeditor/embed/locale/ja.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtHeight": "高さ", + "common.view.modals.txtWidth": "幅", + "PE.ApplicationController.convertationErrorText": "変換に失敗しました", + "PE.ApplicationController.convertationTimeoutText": "変換のタイムアウトを超過しました。", + "PE.ApplicationController.criticalErrorTitle": "エラー", + "PE.ApplicationController.downloadErrorText": "ダウンロードに失敗しました", + "PE.ApplicationController.downloadTextText": "プレゼンテーションのダウンロード中...", + "PE.ApplicationController.errorDefaultMessage": "エラー コード: %1", + "PE.ApplicationController.errorFilePassProtect": "ドキュメントがパスワードで保護されているため開くことができません", + "PE.ApplicationController.errorUserDrop": "今、ファイルにアクセスすることはできません。", + "PE.ApplicationController.notcriticalErrorTitle": "警告", + "PE.ApplicationController.textLoadingDocument": "プレゼンテーションを読み込み中...", + "PE.ApplicationController.textOf": "から", + "PE.ApplicationController.txtClose": "閉じる", + "PE.ApplicationController.unknownErrorText": "不明なエラー", + "PE.ApplicationController.unsupportedBrowserErrorText": "お使いのブラウザがサポートされていません。", + "PE.ApplicationView.txtDownload": "ダウンロード", + "PE.ApplicationView.txtFullScreen": "全画面表示", + "PE.ApplicationView.txtShare": "シェア" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/ko.json b/apps/presentationeditor/embed/locale/ko.json new file mode 100644 index 000000000..09d3d28b4 --- /dev/null +++ b/apps/presentationeditor/embed/locale/ko.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtHeight": "높이", + "common.view.modals.txtWidth": "너비", + "PE.ApplicationController.convertationTimeoutText": "전환 시간 초과를 초과했습니다.", + "PE.ApplicationController.criticalErrorTitle": "오류", + "PE.ApplicationController.downloadErrorText": "다운로드하지 못했습니다.", + "PE.ApplicationController.downloadTextText": "프리젠 테이션 다운로드 중 ...", + "PE.ApplicationController.errorAccessDeny": "권한이없는 작업을 수행하려고합니다.
Document Server 관리자에게 문의하십시오.", + "PE.ApplicationController.errorDefaultMessage": "오류 코드 : %1", + "PE.ApplicationController.errorFilePassProtect": "이 문서는 암호로 보호되어있어 열 수 없습니다.", + "PE.ApplicationController.errorUserDrop": "파일에 지금 액세스 할 수 없습니다.", + "PE.ApplicationController.notcriticalErrorTitle": "경고", + "PE.ApplicationController.textLoadingDocument": "프레젠테이션로드 중", + "PE.ApplicationController.textOf": "중", + "PE.ApplicationController.txtClose": "완료", + "PE.ApplicationController.unknownErrorText": "알 수없는 오류.", + "PE.ApplicationController.unsupportedBrowserErrorText": "사용중인 브라우저가 지원되지 않습니다.", + "PE.ApplicationView.txtDownload": "다운로드", + "PE.ApplicationView.txtFullScreen": "전체 화면", + "PE.ApplicationView.txtShare": "공유" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/lv.json b/apps/presentationeditor/embed/locale/lv.json new file mode 100644 index 000000000..143befd86 --- /dev/null +++ b/apps/presentationeditor/embed/locale/lv.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Nokopēts starpliktuvē", + "common.view.modals.txtHeight": "Augstums", + "common.view.modals.txtWidth": "Platums", + "PE.ApplicationController.convertationErrorText": "Konversija neizdevās.", + "PE.ApplicationController.convertationTimeoutText": "Konversijas taimauts pārsniegts.", + "PE.ApplicationController.criticalErrorTitle": "Kļūda", + "PE.ApplicationController.downloadErrorText": "Lejuplāde neizdevās.", + "PE.ApplicationController.downloadTextText": "Lejupielādē dokumentu...", + "PE.ApplicationController.errorAccessDeny": "Jūs mēģināt veikt darbību, kuru nedrīkstat veikt.
Lūdzu, sazinieties ar savu dokumentu servera administratoru.", + "PE.ApplicationController.errorDefaultMessage": "Kļūdas kods: %1", + "PE.ApplicationController.errorFilePassProtect": "Fails ir aizsargāts ar paroli un to nevar atvērt.", + "PE.ApplicationController.errorUserDrop": "Failam šobrīd nevar piekļūt.", + "PE.ApplicationController.notcriticalErrorTitle": "Brīdinājums", + "PE.ApplicationController.textLoadingDocument": "Ielādē prezentāciju", + "PE.ApplicationController.textOf": "no", + "PE.ApplicationController.txtClose": "Aizvērt", + "PE.ApplicationController.unknownErrorText": "Nezināma kļūda.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Jūsu pārlūkprogramma nav atbalstīta.", + "PE.ApplicationView.txtDownload": "Lejupielādēt", + "PE.ApplicationView.txtShare": "Dalīties" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/nl.json b/apps/presentationeditor/embed/locale/nl.json new file mode 100644 index 000000000..5b96f398b --- /dev/null +++ b/apps/presentationeditor/embed/locale/nl.json @@ -0,0 +1,23 @@ +{ + "common.view.modals.txtCopy": "Kopieer naar klembord", + "common.view.modals.txtHeight": "Hoogte", + "common.view.modals.txtWidth": "Breedte", + "PE.ApplicationController.convertationTimeoutText": "Time-out voor conversie overschreden.", + "PE.ApplicationController.criticalErrorTitle": "Fout", + "PE.ApplicationController.downloadErrorText": "Download mislukt.", + "PE.ApplicationController.downloadTextText": "Presentatie wordt gedownload...", + "PE.ApplicationController.errorAccessDeny": "U probeert een actie uit te voeren waarvoor u geen rechten hebt.
Neem contact op met de beheerder van de documentserver.", + "PE.ApplicationController.errorDefaultMessage": "Foutcode: %1", + "PE.ApplicationController.errorFilePassProtect": "Het bestand is beschermd met een wachtwoord en kan niet worden geopend.", + "PE.ApplicationController.errorUserDrop": "Toegang tot het bestand is op dit moment niet mogelijk.", + "PE.ApplicationController.notcriticalErrorTitle": "Waarschuwing", + "PE.ApplicationController.scriptLoadError": "De verbinding is te langzaam, sommige componenten konden niet geladen worden. Laad de pagina opnieuw.", + "PE.ApplicationController.textLoadingDocument": "Presentatie wordt geladen", + "PE.ApplicationController.textOf": "van", + "PE.ApplicationController.txtClose": "Sluiten", + "PE.ApplicationController.unknownErrorText": "Onbekende fout.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Uw browser wordt niet ondersteund.", + "PE.ApplicationView.txtDownload": "Downloaden", + "PE.ApplicationView.txtFullScreen": "Volledig scherm", + "PE.ApplicationView.txtShare": "Delen" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/pl.json b/apps/presentationeditor/embed/locale/pl.json new file mode 100644 index 000000000..5f2f27b6a --- /dev/null +++ b/apps/presentationeditor/embed/locale/pl.json @@ -0,0 +1,23 @@ +{ + "common.view.modals.txtCopy": "Skopiuj do schowka", + "common.view.modals.txtHeight": "Wysokość", + "common.view.modals.txtWidth": "Szerokość", + "PE.ApplicationController.convertationTimeoutText": "Przekroczono limit czasu konwersji.", + "PE.ApplicationController.criticalErrorTitle": "Błąd", + "PE.ApplicationController.downloadErrorText": "Pobieranie nieudane.", + "PE.ApplicationController.downloadTextText": "Pobieranie prezentacji...", + "PE.ApplicationController.errorAccessDeny": "Próbujesz wykonać działanie, na które nie masz uprawnień.
Proszę skontaktować się z administratorem serwera dokumentów.", + "PE.ApplicationController.errorDefaultMessage": "Kod błędu: %1", + "PE.ApplicationController.errorFilePassProtect": "Dokument jest chroniony hasłem i nie może być otwarty.", + "PE.ApplicationController.errorUserDrop": "Nie można uzyskać dostępu do tego pliku.", + "PE.ApplicationController.notcriticalErrorTitle": "Ostrzeżenie", + "PE.ApplicationController.textLoadingDocument": "Ładowanie prezentacji", + "PE.ApplicationController.textOf": "z", + "PE.ApplicationController.txtClose": "Zamknij", + "PE.ApplicationController.unknownErrorText": "Nieznany błąd.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Twoja przeglądarka nie jest wspierana.", + "PE.ApplicationController.waitText": "Proszę czekać...", + "PE.ApplicationView.txtDownload": "Pobierz", + "PE.ApplicationView.txtFullScreen": "Pełny ekran", + "PE.ApplicationView.txtShare": "Udostępnij" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/pt.json b/apps/presentationeditor/embed/locale/pt.json new file mode 100644 index 000000000..455dea2fe --- /dev/null +++ b/apps/presentationeditor/embed/locale/pt.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Copiar para a área de transferência", + "common.view.modals.txtHeight": "Altura", + "common.view.modals.txtWidth": "Largura", + "PE.ApplicationController.convertationTimeoutText": "Tempo limite de conversão excedido.", + "PE.ApplicationController.criticalErrorTitle": "Erro", + "PE.ApplicationController.downloadErrorText": "Falha ao baixar", + "PE.ApplicationController.downloadTextText": "Baixando apresentação...", + "PE.ApplicationController.errorAccessDeny": "Você está tentando executar uma ação para a qual não tem direitos.
Entre em contato com o administrador do Document Server.", + "PE.ApplicationController.errorDefaultMessage": "Código do erro: %1", + "PE.ApplicationController.errorFilePassProtect": "O documento é protegido por senha e não pode ser aberto.", + "PE.ApplicationController.errorUserDrop": "O arquivo não pode ser acessado agora.", + "PE.ApplicationController.notcriticalErrorTitle": "Aviso", + "PE.ApplicationController.textLoadingDocument": "Carregando apresentação", + "PE.ApplicationController.textOf": "de", + "PE.ApplicationController.txtClose": "Fechar", + "PE.ApplicationController.unknownErrorText": "Erro desconhecido.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Seu navegador não é suportado.", + "PE.ApplicationController.waitText": "Aguarde...", + "PE.ApplicationView.txtDownload": "Baixar", + "PE.ApplicationView.txtShare": "Compartilhar" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/ru.json b/apps/presentationeditor/embed/locale/ru.json index 05f511301..e40b0b493 100644 --- a/apps/presentationeditor/embed/locale/ru.json +++ b/apps/presentationeditor/embed/locale/ru.json @@ -1,28 +1,28 @@ { - "common.view.modals.txtWidth": "Ширина", - "common.view.modals.txtHeight": "Высота", - "common.view.modals.txtShare": "Поделиться ссылкой", "common.view.modals.txtCopy": "Скопировать в буфер", "common.view.modals.txtEmbed": "Встроить", - "PE.ApplicationView.txtDownload": "Скачать файл", - "PE.ApplicationView.txtShare": "Поделиться", - "PE.ApplicationView.txtEmbed": "Встроить", - "PE.ApplicationView.txtFullScreen": "Во весь экран", - "PE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", - "PE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", - "PE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", + "common.view.modals.txtHeight": "Высота", + "common.view.modals.txtShare": "Поделиться ссылкой", + "common.view.modals.txtWidth": "Ширина", "PE.ApplicationController.convertationErrorText": "Конвертация не удалась.", - "PE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "PE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", "PE.ApplicationController.criticalErrorTitle": "Ошибка", + "PE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "PE.ApplicationController.downloadTextText": "Загрузка презентации...", + "PE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", + "PE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", + "PE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", + "PE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", "PE.ApplicationController.notcriticalErrorTitle": "Внимание", "PE.ApplicationController.scriptLoadError": "Слишком медленное подключение, некоторые компоненты не удалось загрузить. Пожалуйста, обновите страницу.", - "PE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", - "PE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", - "PE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", - "PE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.", - "PE.ApplicationController.textOf": "из", - "PE.ApplicationController.downloadTextText": "Загрузка презентации...", - "PE.ApplicationController.waitText": "Пожалуйста, подождите...", "PE.ApplicationController.textLoadingDocument": "Загрузка презентации", - "PE.ApplicationController.txtClose": "Закрыть" + "PE.ApplicationController.textOf": "из", + "PE.ApplicationController.txtClose": "Закрыть", + "PE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.", + "PE.ApplicationController.waitText": "Пожалуйста, подождите...", + "PE.ApplicationView.txtDownload": "Скачать файл", + "PE.ApplicationView.txtEmbed": "Встроить", + "PE.ApplicationView.txtFullScreen": "Во весь экран", + "PE.ApplicationView.txtShare": "Поделиться" } \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/sk.json b/apps/presentationeditor/embed/locale/sk.json new file mode 100644 index 000000000..3aefda143 --- /dev/null +++ b/apps/presentationeditor/embed/locale/sk.json @@ -0,0 +1,23 @@ +{ + "common.view.modals.txtCopy": "Skopírovať do schránky", + "common.view.modals.txtHeight": "Výška", + "common.view.modals.txtWidth": "Šírka", + "PE.ApplicationController.convertationTimeoutText": "Prekročený čas konverzie.", + "PE.ApplicationController.criticalErrorTitle": "Chyba", + "PE.ApplicationController.downloadErrorText": "Sťahovanie zlyhalo.", + "PE.ApplicationController.downloadTextText": "Sťahovanie dokumentu...", + "PE.ApplicationController.errorAccessDeny": "Pokúšate sa vykonať akciu, na ktorú nemáte práva.
Prosím, kontaktujte svojho správcu dokumentového servera.", + "PE.ApplicationController.errorDefaultMessage": "Kód chyby: %1", + "PE.ApplicationController.errorFilePassProtect": "Dokument je chránený heslom a nie je možné ho otvoriť.", + "PE.ApplicationController.errorUserDrop": "K súboru nie je možné práve teraz získať prístup.", + "PE.ApplicationController.notcriticalErrorTitle": "Upozornenie", + "PE.ApplicationController.textLoadingDocument": "Načítavanie prezentácie", + "PE.ApplicationController.textOf": "z", + "PE.ApplicationController.txtClose": "Zatvoriť", + "PE.ApplicationController.unknownErrorText": "Neznáma chyba.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Váš prehliadač nie je podporovaný.", + "PE.ApplicationController.waitText": "Prosím čakajte...", + "PE.ApplicationView.txtDownload": "Stiahnuť", + "PE.ApplicationView.txtFullScreen": "Celá obrazovka", + "PE.ApplicationView.txtShare": "Zdieľať" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/sl.json b/apps/presentationeditor/embed/locale/sl.json new file mode 100644 index 000000000..3435fc8c7 --- /dev/null +++ b/apps/presentationeditor/embed/locale/sl.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtCopy": "Kopiraj v odložišče", + "common.view.modals.txtHeight": "Višina", + "common.view.modals.txtWidth": "Širina", + "PE.ApplicationController.convertationErrorText": "Pretvorba ni uspela.", + "PE.ApplicationController.convertationTimeoutText": "Pretvorbena prekinitev presežena.", + "PE.ApplicationController.criticalErrorTitle": "Napaka", + "PE.ApplicationController.downloadErrorText": "Prenos ni uspel.", + "PE.ApplicationController.downloadTextText": "Prenašanje predstavitve...", + "PE.ApplicationController.errorDefaultMessage": "Koda napake: %1", + "PE.ApplicationController.errorFilePassProtect": "Dokument je zaščiten z geslom in ga ni mogoče odpreti.", + "PE.ApplicationController.errorUserDrop": "Do datoteke v tem trenutku ni možno dostopati.", + "PE.ApplicationController.notcriticalErrorTitle": "Opozorilo", + "PE.ApplicationController.textLoadingDocument": "Nalaganje predstavitve", + "PE.ApplicationController.textOf": "od", + "PE.ApplicationController.txtClose": "Zapri", + "PE.ApplicationController.unknownErrorText": "Neznana napaka.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Vaš brskalnik ni podprt.", + "PE.ApplicationView.txtDownload": "Prenesi", + "PE.ApplicationView.txtShare": "Deli" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/tr.json b/apps/presentationeditor/embed/locale/tr.json new file mode 100644 index 000000000..79c1d1686 --- /dev/null +++ b/apps/presentationeditor/embed/locale/tr.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Panoya kopyala", + "common.view.modals.txtHeight": "Yükseklik", + "common.view.modals.txtWidth": "Genişlik", + "PE.ApplicationController.convertationErrorText": "Değişim başarısız oldu.", + "PE.ApplicationController.convertationTimeoutText": "Değişim süresi aşıldı.", + "PE.ApplicationController.criticalErrorTitle": "Hata", + "PE.ApplicationController.downloadErrorText": "Yükleme başarısız oldu.", + "PE.ApplicationController.downloadTextText": "Sunum yükleniyor...", + "PE.ApplicationController.errorAccessDeny": "Hakkınız olmayan bir eylem gerçekleştirmeye çalışıyorsunuz.
Lütfen Belge Sunucu yöneticinize başvurun.", + "PE.ApplicationController.errorDefaultMessage": "Hata kodu: %1", + "PE.ApplicationController.errorFilePassProtect": "Döküman şifre korumalı ve açılamadı", + "PE.ApplicationController.errorUserDrop": "Belgeye şu an erişilemiyor.", + "PE.ApplicationController.notcriticalErrorTitle": "Uyarı", + "PE.ApplicationController.textLoadingDocument": "Sunum yükleniyor", + "PE.ApplicationController.textOf": "'in", + "PE.ApplicationController.txtClose": "Kapat", + "PE.ApplicationController.unknownErrorText": "Bilinmeyen hata.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Tarayıcınız desteklenmiyor.", + "PE.ApplicationView.txtDownload": "İndir", + "PE.ApplicationView.txtShare": "Paylaş" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/uk.json b/apps/presentationeditor/embed/locale/uk.json new file mode 100644 index 000000000..6c23bb573 --- /dev/null +++ b/apps/presentationeditor/embed/locale/uk.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Копіювати в буфер обміну", + "common.view.modals.txtHeight": "Висота", + "common.view.modals.txtWidth": "Ширина", + "PE.ApplicationController.convertationTimeoutText": "Термін переходу перевищено.", + "PE.ApplicationController.criticalErrorTitle": "Помилка", + "PE.ApplicationController.downloadErrorText": "Завантаження не вдалося", + "PE.ApplicationController.downloadTextText": "Завантаження презентації...", + "PE.ApplicationController.errorAccessDeny": "Ви намагаєтеся виконати дію, на яку у вас немає прав.
Будь ласка, зв'яжіться з адміністратором вашого Сервера документів.", + "PE.ApplicationController.errorDefaultMessage": "Код помилки: %1", + "PE.ApplicationController.errorFilePassProtect": "Документ захищений паролем і його неможливо відкрити.", + "PE.ApplicationController.errorUserDrop": "На даний момент файл не доступний.", + "PE.ApplicationController.notcriticalErrorTitle": "Застереження", + "PE.ApplicationController.textLoadingDocument": "Завантаження презентації", + "PE.ApplicationController.textOf": "з", + "PE.ApplicationController.txtClose": "Закрити", + "PE.ApplicationController.unknownErrorText": "Невідома помилка.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не підтримується", + "PE.ApplicationView.txtDownload": "Завантажити", + "PE.ApplicationView.txtFullScreen": "Повноекранний режим", + "PE.ApplicationView.txtShare": "Доступ" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/vi.json b/apps/presentationeditor/embed/locale/vi.json new file mode 100644 index 000000000..43b608c4c --- /dev/null +++ b/apps/presentationeditor/embed/locale/vi.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Sao chép vào khay nhớ tạm", + "common.view.modals.txtHeight": "Chiều cao", + "common.view.modals.txtWidth": "Chiều rộng", + "PE.ApplicationController.convertationTimeoutText": "Đã quá thời gian chờ chuyển đổi.", + "PE.ApplicationController.criticalErrorTitle": "Lỗi", + "PE.ApplicationController.downloadErrorText": "Tải về không thành công.", + "PE.ApplicationController.downloadTextText": "Đang tải trình chiếu...", + "PE.ApplicationController.errorAccessDeny": "Bạn đang cố gắng thực hiện hành động mà bạn không có quyền.
Vui lòng liên hệ với quản trị viên Server Tài liệu của bạn.", + "PE.ApplicationController.errorDefaultMessage": "Mã lỗi: %1", + "PE.ApplicationController.errorFilePassProtect": "Tài liệu được bảo vệ bằng mật khẩu và không thể mở được.", + "PE.ApplicationController.errorUserDrop": "Không thể truy cập file ngay lúc này.", + "PE.ApplicationController.notcriticalErrorTitle": "Cảnh báo", + "PE.ApplicationController.textLoadingDocument": "Đang tải trình chiếu", + "PE.ApplicationController.textOf": "trên", + "PE.ApplicationController.txtClose": "Đóng", + "PE.ApplicationController.unknownErrorText": "Lỗi không xác định.", + "PE.ApplicationController.unsupportedBrowserErrorText": "Trình duyệt của bạn không được hỗ trợ.", + "PE.ApplicationView.txtDownload": "Tải về", + "PE.ApplicationView.txtFullScreen": "Toàn màn hình", + "PE.ApplicationView.txtShare": "Chia sẻ" +} \ No newline at end of file diff --git a/apps/presentationeditor/embed/locale/zh.json b/apps/presentationeditor/embed/locale/zh.json new file mode 100644 index 000000000..e60a70f5b --- /dev/null +++ b/apps/presentationeditor/embed/locale/zh.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "复制到剪贴板", + "common.view.modals.txtEmbed": "嵌入", + "common.view.modals.txtHeight": "高度", + "common.view.modals.txtShare": "分享链接", + "common.view.modals.txtWidth": "宽度", + "PE.ApplicationController.convertationErrorText": "转换失败", + "PE.ApplicationController.convertationTimeoutText": "转换超时", + "PE.ApplicationController.criticalErrorTitle": "错误", + "PE.ApplicationController.downloadErrorText": "下载失败", + "PE.ApplicationController.downloadTextText": "正在下载演示文稿...", + "PE.ApplicationController.errorAccessDeny": "您正在尝试执行您没有权限的操作。
请联系您的文档服务器管理员.", + "PE.ApplicationController.errorDefaultMessage": "错误代码:%1", + "PE.ApplicationController.errorFilePassProtect": "该文档受密码保护,无法被打开。", + "PE.ApplicationController.errorUserDrop": "该文件现在无法访问。", + "PE.ApplicationController.notcriticalErrorTitle": "警告", + "PE.ApplicationController.scriptLoadError": "连接速度过慢,部分组件无法被加载。请重新加载页面。", + "PE.ApplicationController.textLoadingDocument": "载入演示", + "PE.ApplicationController.textOf": "的", + "PE.ApplicationController.txtClose": "关闭", + "PE.ApplicationController.unknownErrorText": "示知错误", + "PE.ApplicationController.unsupportedBrowserErrorText": "你的浏览器不支持", + "PE.ApplicationController.waitText": "请稍候...", + "PE.ApplicationView.txtDownload": "下载", + "PE.ApplicationView.txtEmbed": "嵌入", + "PE.ApplicationView.txtFullScreen": "全屏", + "PE.ApplicationView.txtShare": "共享" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/bg.json b/apps/spreadsheeteditor/embed/locale/bg.json new file mode 100644 index 000000000..2f540768d --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/bg.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Копиране в клипборда", + "common.view.modals.txtEmbed": "Вграждане", + "common.view.modals.txtHeight": "Височина", + "common.view.modals.txtShare": "Споделяне на връзка", + "common.view.modals.txtWidth": "Широчина", + "SSE.ApplicationController.convertationErrorText": "Конвертирането е неуспешно.", + "SSE.ApplicationController.convertationTimeoutText": "Превишава се времето на изтичане на реализациите.", + "SSE.ApplicationController.criticalErrorTitle": "Грешка", + "SSE.ApplicationController.downloadErrorText": "Изтеглянето се провали.", + "SSE.ApplicationController.downloadTextText": "Електронната таблица се изтегли ...", + "SSE.ApplicationController.errorAccessDeny": "Опитвате се да извършите действие, за което нямате права.
Моля, свържете се с администратора на сървъра за документи.", + "SSE.ApplicationController.errorDefaultMessage": "Код на грешка: %1", + "SSE.ApplicationController.errorFilePassProtect": "Файлът е защитен с парола и не може да бъде отворен.", + "SSE.ApplicationController.errorUserDrop": "Файлът не може да бъде достъпен в момента.", + "SSE.ApplicationController.notcriticalErrorTitle": "Внимание", + "SSE.ApplicationController.scriptLoadError": "Връзката е твърде бавна, някои от компонентите не могат да бъдат заредени. Моля, презаредете страницата.", + "SSE.ApplicationController.textLoadingDocument": "Електронната таблица се зарежда", + "SSE.ApplicationController.textOf": "на", + "SSE.ApplicationController.txtClose": "Затвори", + "SSE.ApplicationController.unknownErrorText": "Неизвестна грешка.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Вашият браузър не се поддържа.", + "SSE.ApplicationController.waitText": "Моля изчакай...", + "SSE.ApplicationView.txtDownload": "Изтегли", + "SSE.ApplicationView.txtEmbed": "Вграждане", + "SSE.ApplicationView.txtFullScreen": "Цял екран", + "SSE.ApplicationView.txtShare": "Дял" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/cs.json b/apps/spreadsheeteditor/embed/locale/cs.json new file mode 100644 index 000000000..17dfbc3cf --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/cs.json @@ -0,0 +1,24 @@ +{ + "common.view.modals.txtCopy": "Zkopírovat do schránky", + "common.view.modals.txtHeight": "Výška", + "common.view.modals.txtWidth": "Šířka", + "SSE.ApplicationController.convertationErrorText": "Konverze selhala.", + "SSE.ApplicationController.convertationTimeoutText": "Vypršel čas konverze.", + "SSE.ApplicationController.criticalErrorTitle": "Chyba", + "SSE.ApplicationController.downloadErrorText": "Stahování selhalo.", + "SSE.ApplicationController.downloadTextText": "Stahování sešitu...", + "SSE.ApplicationController.errorAccessDeny": "Pokoušíte se provést akci, na kterou nemáte oprávnění.
Prosím, kontaktujte administrátora vašeho Dokumentového serveru.", + "SSE.ApplicationController.errorDefaultMessage": "Kód chyby: %1", + "SSE.ApplicationController.errorFilePassProtect": "Dokument je chráněn heslem a nelze otevřít.", + "SSE.ApplicationController.errorUserDrop": "Tento soubor není nyní přístupný.", + "SSE.ApplicationController.notcriticalErrorTitle": "Varování", + "SSE.ApplicationController.textLoadingDocument": "Načítání sešitu", + "SSE.ApplicationController.textOf": "z", + "SSE.ApplicationController.txtClose": "Zavřít", + "SSE.ApplicationController.unknownErrorText": "Neznámá chyba.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Váš prohlížeč není podporován.", + "SSE.ApplicationController.waitText": "Prosím, čekejte...", + "SSE.ApplicationView.txtDownload": "Stáhnout", + "SSE.ApplicationView.txtFullScreen": "Celá obrazovka", + "SSE.ApplicationView.txtShare": "Sdílet" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/de.json b/apps/spreadsheeteditor/embed/locale/de.json new file mode 100644 index 000000000..3fdd98801 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/de.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "In die Zwischenablage kopieren", + "common.view.modals.txtEmbed": "Einbetten", + "common.view.modals.txtHeight": "Höhe", + "common.view.modals.txtShare": "Link teilen", + "common.view.modals.txtWidth": "Breite", + "SSE.ApplicationController.convertationErrorText": "Konvertierung ist fehlgeschlagen.", + "SSE.ApplicationController.convertationTimeoutText": "Timeout für die Konvertierung wurde überschritten.", + "SSE.ApplicationController.criticalErrorTitle": "Fehler", + "SSE.ApplicationController.downloadErrorText": "Herunterladen ist fehlgeschlagen.", + "SSE.ApplicationController.downloadTextText": "Kalkulationstabelle wird heruntergeladen...", + "SSE.ApplicationController.errorAccessDeny": "Sie haben versucht die Änderungen im Dokument, zu dem Sie keine Berechtigungen haben, vorzunehemen.
Wenden Sie sich an Ihren Serveradministrator.", + "SSE.ApplicationController.errorDefaultMessage": "Fehlercode: %1", + "SSE.ApplicationController.errorFilePassProtect": "Das Dokument ist kennwortgeschützt und kann nicht geöffnet werden.", + "SSE.ApplicationController.errorUserDrop": "Kein Zugriff auf diese Datei ist möglich.", + "SSE.ApplicationController.notcriticalErrorTitle": "Warnung", + "SSE.ApplicationController.scriptLoadError": "Die Verbindung ist zu langsam, einige der Komponenten konnten nicht geladen werden. Bitte laden Sie die Seite erneut.", + "SSE.ApplicationController.textLoadingDocument": "Tabelle wird geladen", + "SSE.ApplicationController.textOf": "von", + "SSE.ApplicationController.txtClose": "Schließen", + "SSE.ApplicationController.unknownErrorText": "Unbekannter Fehler.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Ihr Webbrowser wird nicht unterstützt.", + "SSE.ApplicationController.waitText": "Bitte warten...", + "SSE.ApplicationView.txtDownload": "Herunterladen", + "SSE.ApplicationView.txtEmbed": "Einbetten", + "SSE.ApplicationView.txtFullScreen": "Vollbild-Modus", + "SSE.ApplicationView.txtShare": "Freigeben" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/en.json b/apps/spreadsheeteditor/embed/locale/en.json index 0d4322a23..f94d807ac 100644 --- a/apps/spreadsheeteditor/embed/locale/en.json +++ b/apps/spreadsheeteditor/embed/locale/en.json @@ -1,28 +1,28 @@ { - "common.view.modals.txtWidth": "Width", - "common.view.modals.txtHeight": "Height", - "common.view.modals.txtShare": "Share Link", "common.view.modals.txtCopy": "Copy to clipboard", "common.view.modals.txtEmbed": "Embed", - "SSE.ApplicationView.txtDownload": "Download", - "SSE.ApplicationView.txtShare": "Share", - "SSE.ApplicationView.txtEmbed": "Embed", - "SSE.ApplicationView.txtFullScreen": "Full Screen", - "SSE.ApplicationController.errorDefaultMessage": "Error code: %1", - "SSE.ApplicationController.unknownErrorText": "Unknown error.", - "SSE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", + "common.view.modals.txtHeight": "Height", + "common.view.modals.txtShare": "Share Link", + "common.view.modals.txtWidth": "Width", "SSE.ApplicationController.convertationErrorText": "Conversion failed.", - "SSE.ApplicationController.downloadErrorText": "Download failed.", + "SSE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", "SSE.ApplicationController.criticalErrorTitle": "Error", + "SSE.ApplicationController.downloadErrorText": "Download failed.", + "SSE.ApplicationController.downloadTextText": "Downloading spreadsheet...", + "SSE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", + "SSE.ApplicationController.errorDefaultMessage": "Error code: %1", + "SSE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", + "SSE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", "SSE.ApplicationController.notcriticalErrorTitle": "Warning", "SSE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", - "SSE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", - "SSE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", - "SSE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", - "SSE.ApplicationController.textOf": "of", - "SSE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", - "SSE.ApplicationController.downloadTextText": "Downloading spreadsheet...", - "SSE.ApplicationController.waitText": "Please, wait...", "SSE.ApplicationController.textLoadingDocument": "Loading spreadsheet", - "SSE.ApplicationController.txtClose": "Close" + "SSE.ApplicationController.textOf": "of", + "SSE.ApplicationController.txtClose": "Close", + "SSE.ApplicationController.unknownErrorText": "Unknown error.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", + "SSE.ApplicationController.waitText": "Please, wait...", + "SSE.ApplicationView.txtDownload": "Download", + "SSE.ApplicationView.txtEmbed": "Embed", + "SSE.ApplicationView.txtFullScreen": "Full Screen", + "SSE.ApplicationView.txtShare": "Share" } \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/es.json b/apps/spreadsheeteditor/embed/locale/es.json new file mode 100644 index 000000000..bf17d0ca9 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/es.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Copiar al portapapeles", + "common.view.modals.txtEmbed": "Incorporar", + "common.view.modals.txtHeight": "Altura", + "common.view.modals.txtShare": "Compartir enlace", + "common.view.modals.txtWidth": "Ancho", + "SSE.ApplicationController.convertationErrorText": "Fallo de conversión.", + "SSE.ApplicationController.convertationTimeoutText": "Límite de tiempo de conversión está superado.", + "SSE.ApplicationController.criticalErrorTitle": "Error", + "SSE.ApplicationController.downloadErrorText": "Fallo en descarga.", + "SSE.ApplicationController.downloadTextText": "Descargando hoja de cálculo...", + "SSE.ApplicationController.errorAccessDeny": "Usted no tiene permisos para realizar la acción que está intentando hacer.
Por favor, contacte con su Administrador del Servidor de Documentos.", + "SSE.ApplicationController.errorDefaultMessage": "Código de error: %1", + "SSE.ApplicationController.errorFilePassProtect": "El archivo está protegido por una contraseña y no puede ser abierto.", + "SSE.ApplicationController.errorUserDrop": "No se puede acceder al archivo ahora mismo.", + "SSE.ApplicationController.notcriticalErrorTitle": "Aviso", + "SSE.ApplicationController.scriptLoadError": "La conexión a Internet es demasiado lenta, no se podía cargar algunos componentes. Por favor, recargue la página.", + "SSE.ApplicationController.textLoadingDocument": "Cargando hoja de cálculo", + "SSE.ApplicationController.textOf": "de", + "SSE.ApplicationController.txtClose": "Cerrar", + "SSE.ApplicationController.unknownErrorText": "Error desconocido.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Su navegador no está soportado.", + "SSE.ApplicationController.waitText": "Por favor, espere...", + "SSE.ApplicationView.txtDownload": "Descargar", + "SSE.ApplicationView.txtEmbed": "Incorporar", + "SSE.ApplicationView.txtFullScreen": "Pantalla Completa", + "SSE.ApplicationView.txtShare": "Compartir" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/fr.json b/apps/spreadsheeteditor/embed/locale/fr.json new file mode 100644 index 000000000..c8cd03921 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/fr.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Copier dans le Presse-papiers", + "common.view.modals.txtEmbed": "Incorporer", + "common.view.modals.txtHeight": "Hauteur", + "common.view.modals.txtShare": "Partager un lien", + "common.view.modals.txtWidth": "Largeur", + "SSE.ApplicationController.convertationErrorText": "Échec de la conversion.", + "SSE.ApplicationController.convertationTimeoutText": "Délai d'attente de la conversion dépassé ", + "SSE.ApplicationController.criticalErrorTitle": "Erreur", + "SSE.ApplicationController.downloadErrorText": "Échec du téléchargement.", + "SSE.ApplicationController.downloadTextText": "Téléchargement de la feuille de calcul en cours...", + "SSE.ApplicationController.errorAccessDeny": "Vous tentez d'exéсuter une action pour laquelle vous ne disposez pas des droits.
Veuillez contacter l'administrateur de Document Server.", + "SSE.ApplicationController.errorDefaultMessage": "Code d'erreur: %1", + "SSE.ApplicationController.errorFilePassProtect": "Le fichier est protégé par le mot de passe et ne peut pas être ouvert.", + "SSE.ApplicationController.errorUserDrop": "Impossible d'accéder au fichier.", + "SSE.ApplicationController.notcriticalErrorTitle": "Avertissement", + "SSE.ApplicationController.scriptLoadError": "La connexion est trop lente, certains éléments ne peuvent pas être chargés. Veuillez recharger la page.", + "SSE.ApplicationController.textLoadingDocument": "Chargement d'une feuille de calcul", + "SSE.ApplicationController.textOf": "de", + "SSE.ApplicationController.txtClose": "Fermer", + "SSE.ApplicationController.unknownErrorText": "Erreur inconnue.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Votre navigateur n'est pas pris en charge.", + "SSE.ApplicationController.waitText": "Veuillez patienter...", + "SSE.ApplicationView.txtDownload": "Télécharger", + "SSE.ApplicationView.txtEmbed": "Incorporer", + "SSE.ApplicationView.txtFullScreen": "Plein écran", + "SSE.ApplicationView.txtShare": "Partager" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/hu.json b/apps/spreadsheeteditor/embed/locale/hu.json new file mode 100644 index 000000000..43fd34d68 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/hu.json @@ -0,0 +1,19 @@ +{ + "common.view.modals.txtHeight": "Magasság", + "common.view.modals.txtWidth": "Szélesség", + "SSE.ApplicationController.convertationTimeoutText": "Időtúllépés az átalakítás során.", + "SSE.ApplicationController.criticalErrorTitle": "Hiba", + "SSE.ApplicationController.downloadErrorText": "Sikertelen letöltés.", + "SSE.ApplicationController.downloadTextText": "Munkafüzet letöltése...", + "SSE.ApplicationController.errorAccessDeny": "Olyan műveletet próbál végrehajtani, melyre nincs jogosultsága.
Vegye fel a kapcsolatot a Document Server adminisztrátorával.", + "SSE.ApplicationController.errorDefaultMessage": "Hibakód: %1", + "SSE.ApplicationController.errorFilePassProtect": "A dokumentum jelszóval védett, és nem nyitható meg.", + "SSE.ApplicationController.errorUserDrop": "A dokumentum jelenleg nem elérhető", + "SSE.ApplicationController.notcriticalErrorTitle": "Figyelmeztetés", + "SSE.ApplicationController.scriptLoadError": "A kapcsolat túl lassú, néhány komponens nem töltődött be. Frissítse az oldalt.", + "SSE.ApplicationController.textLoadingDocument": "Munkafüzet betöltése", + "SSE.ApplicationController.txtClose": "Bezár", + "SSE.ApplicationController.unknownErrorText": "Ismeretlen hiba.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "A böngészője nem támogatott.", + "SSE.ApplicationView.txtDownload": "Letöltés" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/it.json b/apps/spreadsheeteditor/embed/locale/it.json new file mode 100644 index 000000000..12c35d15d --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/it.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "Copia negli appunti", + "common.view.modals.txtEmbed": "Incorpora", + "common.view.modals.txtHeight": "Altezza", + "common.view.modals.txtShare": "Condividi collegamento", + "common.view.modals.txtWidth": "Larghezza", + "SSE.ApplicationController.convertationErrorText": "Conversione fallita.", + "SSE.ApplicationController.convertationTimeoutText": "È stato superato il tempo limite della conversione.", + "SSE.ApplicationController.criticalErrorTitle": "Errore", + "SSE.ApplicationController.downloadErrorText": "Scaricamento fallito", + "SSE.ApplicationController.downloadTextText": "Download del foglio di calcolo in corso...", + "SSE.ApplicationController.errorAccessDeny": "Stai tentando di eseguire un'azione per la quale non disponi di permessi sufficienti.
Si prega di contattare l'amministratore del Server dei Documenti.", + "SSE.ApplicationController.errorDefaultMessage": "Codice errore: %1", + "SSE.ApplicationController.errorFilePassProtect": "Il file è protetto da una password. Impossibile aprirlo.", + "SSE.ApplicationController.errorUserDrop": "Impossibile accedere al file subito.", + "SSE.ApplicationController.notcriticalErrorTitle": "Avviso", + "SSE.ApplicationController.scriptLoadError": "La connessione è troppo lenta, alcuni componenti non possono essere caricati. Si prega di ricaricare la pagina.", + "SSE.ApplicationController.textLoadingDocument": "Caricamento del foglio di calcolo", + "SSE.ApplicationController.textOf": "di", + "SSE.ApplicationController.txtClose": "Chiudi", + "SSE.ApplicationController.unknownErrorText": "Errore sconosciuto.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Il tuo browser non è supportato.", + "SSE.ApplicationController.waitText": "Per favore, attendi...", + "SSE.ApplicationView.txtDownload": "Scarica", + "SSE.ApplicationView.txtEmbed": "Incorpora", + "SSE.ApplicationView.txtFullScreen": "Schermo intero", + "SSE.ApplicationView.txtShare": "Condividi" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/ja.json b/apps/spreadsheeteditor/embed/locale/ja.json new file mode 100644 index 000000000..75d18e360 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/ja.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtHeight": "高さ", + "common.view.modals.txtWidth": "幅", + "SSE.ApplicationController.convertationErrorText": "変換に失敗しました", + "SSE.ApplicationController.convertationTimeoutText": "変換のタイムアウトを超過しました。", + "SSE.ApplicationController.criticalErrorTitle": "エラー", + "SSE.ApplicationController.downloadErrorText": "ダウンロードに失敗しました", + "SSE.ApplicationController.downloadTextText": "スプレッドシートのダウンロード中...", + "SSE.ApplicationController.errorDefaultMessage": "エラー コード: %1", + "SSE.ApplicationController.errorFilePassProtect": "ドキュメントがパスワードで保護されているため開くことができません", + "SSE.ApplicationController.errorUserDrop": "今、ファイルにアクセスすることはできません。", + "SSE.ApplicationController.notcriticalErrorTitle": "警告", + "SSE.ApplicationController.textLoadingDocument": "スプレッドシートの読み込み中", + "SSE.ApplicationController.textOf": "から", + "SSE.ApplicationController.txtClose": "閉じる", + "SSE.ApplicationController.unknownErrorText": "不明なエラー", + "SSE.ApplicationController.unsupportedBrowserErrorText": "お使いのブラウザがサポートされていません。", + "SSE.ApplicationView.txtDownload": "ダウンロード", + "SSE.ApplicationView.txtFullScreen": "全画面表示", + "SSE.ApplicationView.txtShare": "シェア" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/ko.json b/apps/spreadsheeteditor/embed/locale/ko.json new file mode 100644 index 000000000..d4289b62f --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/ko.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtHeight": "높이", + "common.view.modals.txtWidth": "너비", + "SSE.ApplicationController.convertationTimeoutText": "전환 시간 초과를 초과했습니다.", + "SSE.ApplicationController.criticalErrorTitle": "오류", + "SSE.ApplicationController.downloadErrorText": "다운로드하지 못했습니다.", + "SSE.ApplicationController.downloadTextText": "스프레드 시트 다운로드 중 ...", + "SSE.ApplicationController.errorAccessDeny": "권한이없는 작업을 수행하려고합니다.
Document Server 관리자에게 문의하십시오.", + "SSE.ApplicationController.errorDefaultMessage": "오류 코드 : %1", + "SSE.ApplicationController.errorFilePassProtect": "이 문서는 암호로 보호되어있어 열 수 없습니다.", + "SSE.ApplicationController.errorUserDrop": "파일에 지금 액세스 할 수 없습니다.", + "SSE.ApplicationController.notcriticalErrorTitle": "경고", + "SSE.ApplicationController.textLoadingDocument": "스프레드 시트로드 중", + "SSE.ApplicationController.textOf": "중", + "SSE.ApplicationController.txtClose": "완료", + "SSE.ApplicationController.unknownErrorText": "알 수없는 오류.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "사용중인 브라우저가 지원되지 않습니다.", + "SSE.ApplicationView.txtDownload": "다운로드", + "SSE.ApplicationView.txtFullScreen": "전체 화면", + "SSE.ApplicationView.txtShare": "공유" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/lv.json b/apps/spreadsheeteditor/embed/locale/lv.json new file mode 100644 index 000000000..8cda6dc4f --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/lv.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Nokopēts starpliktuvē", + "common.view.modals.txtHeight": "Augstums", + "common.view.modals.txtWidth": "Platums", + "SSE.ApplicationController.convertationErrorText": "Konversija neizdevās.", + "SSE.ApplicationController.convertationTimeoutText": "Konversijas taimauts pārsniegts.", + "SSE.ApplicationController.criticalErrorTitle": "Kļūda", + "SSE.ApplicationController.downloadErrorText": "Lejuplāde neizdevās.", + "SSE.ApplicationController.downloadTextText": "Lejuplādē izklājlapu...", + "SSE.ApplicationController.errorAccessDeny": "Jūs mēģināt veikt darbību, kuru nedrīkstat veikt.
Lūdzu, sazinieties ar savu dokumentu servera administratoru.", + "SSE.ApplicationController.errorDefaultMessage": "Kļūdas kods: %1", + "SSE.ApplicationController.errorFilePassProtect": "Fails ir aizsargāts ar paroli un to nevar atvērt.", + "SSE.ApplicationController.errorUserDrop": "Failam šobrīd nevar piekļūt.", + "SSE.ApplicationController.notcriticalErrorTitle": "Brīdinājums", + "SSE.ApplicationController.textLoadingDocument": "Ielādē izklājlapu", + "SSE.ApplicationController.textOf": "no", + "SSE.ApplicationController.txtClose": "Aizvērt", + "SSE.ApplicationController.unknownErrorText": "Nezināma kļūda.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Jūsu pārlūkprogramma nav atbalstīta.", + "SSE.ApplicationView.txtDownload": "Lejupielādēt", + "SSE.ApplicationView.txtShare": "Dalīties" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/nl.json b/apps/spreadsheeteditor/embed/locale/nl.json new file mode 100644 index 000000000..bee107e8d --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/nl.json @@ -0,0 +1,23 @@ +{ + "common.view.modals.txtCopy": "Kopieer naar klembord", + "common.view.modals.txtHeight": "Hoogte", + "common.view.modals.txtWidth": "Breedte", + "SSE.ApplicationController.convertationTimeoutText": "Time-out voor conversie overschreden.", + "SSE.ApplicationController.criticalErrorTitle": "Fout", + "SSE.ApplicationController.downloadErrorText": "Download mislukt.", + "SSE.ApplicationController.downloadTextText": "Spreadsheet wordt gedownload...", + "SSE.ApplicationController.errorAccessDeny": "U probeert een actie uit te voeren waarvoor u geen rechten hebt.
Neem contact op met de beheerder van de documentserver.", + "SSE.ApplicationController.errorDefaultMessage": "Foutcode: %1", + "SSE.ApplicationController.errorFilePassProtect": "Het bestand is beschermd met een wachtwoord en kan niet worden geopend.", + "SSE.ApplicationController.errorUserDrop": "Toegang tot het bestand is op dit moment niet mogelijk.", + "SSE.ApplicationController.notcriticalErrorTitle": "Waarschuwing", + "SSE.ApplicationController.scriptLoadError": "De verbinding is te langzaam, sommige componenten konden niet geladen worden. Laad de pagina opnieuw.", + "SSE.ApplicationController.textLoadingDocument": "Spreadsheet wordt geladen", + "SSE.ApplicationController.textOf": "van", + "SSE.ApplicationController.txtClose": "Sluiten", + "SSE.ApplicationController.unknownErrorText": "Onbekende fout.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Uw browser wordt niet ondersteund.", + "SSE.ApplicationView.txtDownload": "Downloaden", + "SSE.ApplicationView.txtFullScreen": "Volledig scherm", + "SSE.ApplicationView.txtShare": "Delen" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/pl.json b/apps/spreadsheeteditor/embed/locale/pl.json new file mode 100644 index 000000000..6a3baea66 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/pl.json @@ -0,0 +1,23 @@ +{ + "common.view.modals.txtCopy": "Skopiuj do schowka", + "common.view.modals.txtHeight": "Wysokość", + "common.view.modals.txtWidth": "Szerokość", + "SSE.ApplicationController.convertationTimeoutText": "Przekroczono limit czasu konwersji.", + "SSE.ApplicationController.criticalErrorTitle": "Błąd", + "SSE.ApplicationController.downloadErrorText": "Pobieranie nieudane.", + "SSE.ApplicationController.downloadTextText": "Pobieranie arkusza kalkulacyjnego...", + "SSE.ApplicationController.errorAccessDeny": "Próbujesz wykonać działanie, na które nie masz uprawnień.
Proszę skontaktować się z administratorem serwera dokumentów.", + "SSE.ApplicationController.errorDefaultMessage": "Kod błędu: %1", + "SSE.ApplicationController.errorFilePassProtect": "Dokument jest chroniony hasłem i nie może być otwarty.", + "SSE.ApplicationController.errorUserDrop": "Nie można uzyskać dostępu do tego pliku.", + "SSE.ApplicationController.notcriticalErrorTitle": "Ostrzeżenie", + "SSE.ApplicationController.textLoadingDocument": "Ładowanie arkusza kalkulacyjnego", + "SSE.ApplicationController.textOf": "z", + "SSE.ApplicationController.txtClose": "Zamknij", + "SSE.ApplicationController.unknownErrorText": "Nieznany błąd.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Twoja przeglądarka nie jest wspierana.", + "SSE.ApplicationController.waitText": "Proszę czekać...", + "SSE.ApplicationView.txtDownload": "Pobierz", + "SSE.ApplicationView.txtFullScreen": "Pełny ekran", + "SSE.ApplicationView.txtShare": "Udostępnij" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/pt.json b/apps/spreadsheeteditor/embed/locale/pt.json new file mode 100644 index 000000000..f11455b60 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/pt.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Copiar para a área de transferência", + "common.view.modals.txtHeight": "Altura", + "common.view.modals.txtWidth": "Largura", + "SSE.ApplicationController.convertationTimeoutText": "Tempo limite de conversão excedido.", + "SSE.ApplicationController.criticalErrorTitle": "Erro", + "SSE.ApplicationController.downloadErrorText": "Falha ao baixar", + "SSE.ApplicationController.downloadTextText": "Baixando planilha...", + "SSE.ApplicationController.errorAccessDeny": "Você está tentando executar uma ação para a qual não tem direitos.
Entre em contato com o administrador do Document Server.", + "SSE.ApplicationController.errorDefaultMessage": "Código do erro: %1", + "SSE.ApplicationController.errorFilePassProtect": "O documento é protegido por senha e não pode ser aberto.", + "SSE.ApplicationController.errorUserDrop": "O arquivo não pode ser acessado agora.", + "SSE.ApplicationController.notcriticalErrorTitle": "Aviso", + "SSE.ApplicationController.textLoadingDocument": "Carregando planilha", + "SSE.ApplicationController.textOf": "de", + "SSE.ApplicationController.txtClose": "Fechar", + "SSE.ApplicationController.unknownErrorText": "Erro desconhecido.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Seu navegador não é suportado.", + "SSE.ApplicationController.waitText": "Aguarde...", + "SSE.ApplicationView.txtDownload": "Baixar", + "SSE.ApplicationView.txtShare": "Compartilhar" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/ru.json b/apps/spreadsheeteditor/embed/locale/ru.json index 4d6de4902..0b85d4938 100644 --- a/apps/spreadsheeteditor/embed/locale/ru.json +++ b/apps/spreadsheeteditor/embed/locale/ru.json @@ -1,28 +1,28 @@ { - "common.view.modals.txtWidth": "Ширина", - "common.view.modals.txtHeight": "Высота", - "common.view.modals.txtShare": "Поделиться ссылкой", "common.view.modals.txtCopy": "Скопировать в буфер", "common.view.modals.txtEmbed": "Встроить", - "SSE.ApplicationView.txtDownload": "Скачать файл", - "SSE.ApplicationView.txtShare": "Поделиться", - "SSE.ApplicationView.txtEmbed": "Встроить", - "SSE.ApplicationView.txtFullScreen": "Во весь экран", - "SSE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", - "SSE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", - "SSE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", + "common.view.modals.txtHeight": "Высота", + "common.view.modals.txtShare": "Поделиться ссылкой", + "common.view.modals.txtWidth": "Ширина", "SSE.ApplicationController.convertationErrorText": "Конвертация не удалась.", - "SSE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "SSE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", "SSE.ApplicationController.criticalErrorTitle": "Ошибка", + "SSE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "SSE.ApplicationController.downloadTextText": "Загрузка таблицы...", + "SSE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", + "SSE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", + "SSE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", + "SSE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", "SSE.ApplicationController.notcriticalErrorTitle": "Внимание", "SSE.ApplicationController.scriptLoadError": "Слишком медленное подключение, некоторые компоненты не удалось загрузить. Пожалуйста, обновите страницу.", - "SSE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", - "SSE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", - "SSE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", - "SSE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.", - "SSE.ApplicationController.textOf": "из", - "SSE.ApplicationController.downloadTextText": "Загрузка таблицы...", - "SSE.ApplicationController.waitText": "Пожалуйста, подождите...", "SSE.ApplicationController.textLoadingDocument": "Загрузка таблицы", - "SSE.ApplicationController.txtClose": "Закрыть" + "SSE.ApplicationController.textOf": "из", + "SSE.ApplicationController.txtClose": "Закрыть", + "SSE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.", + "SSE.ApplicationController.waitText": "Пожалуйста, подождите...", + "SSE.ApplicationView.txtDownload": "Скачать файл", + "SSE.ApplicationView.txtEmbed": "Встроить", + "SSE.ApplicationView.txtFullScreen": "Во весь экран", + "SSE.ApplicationView.txtShare": "Поделиться" } \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/sk.json b/apps/spreadsheeteditor/embed/locale/sk.json new file mode 100644 index 000000000..27b078a3b --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/sk.json @@ -0,0 +1,23 @@ +{ + "common.view.modals.txtCopy": "Skopírovať do schránky", + "common.view.modals.txtHeight": "Výška", + "common.view.modals.txtWidth": "Šírka", + "SSE.ApplicationController.convertationTimeoutText": "Prekročený čas konverzie.", + "SSE.ApplicationController.criticalErrorTitle": "Chyba", + "SSE.ApplicationController.downloadErrorText": "Sťahovanie zlyhalo.", + "SSE.ApplicationController.downloadTextText": "Sťahovanie dokumentu...", + "SSE.ApplicationController.errorAccessDeny": "Pokúšate sa vykonať akciu, na ktorú nemáte práva.
Prosím, kontaktujte svojho správcu dokumentového servera.", + "SSE.ApplicationController.errorDefaultMessage": "Kód chyby: %1", + "SSE.ApplicationController.errorFilePassProtect": "Dokument je chránený heslom a nie je možné ho otvoriť.", + "SSE.ApplicationController.errorUserDrop": "K súboru nie je možné práve teraz získať prístup.", + "SSE.ApplicationController.notcriticalErrorTitle": "Upozornenie", + "SSE.ApplicationController.textLoadingDocument": "Načítavanie dokumentu", + "SSE.ApplicationController.textOf": "z", + "SSE.ApplicationController.txtClose": "Zatvoriť", + "SSE.ApplicationController.unknownErrorText": "Neznáma chyba.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Váš prehliadač nie je podporovaný.", + "SSE.ApplicationController.waitText": "Prosím čakajte...", + "SSE.ApplicationView.txtDownload": "Stiahnuť", + "SSE.ApplicationView.txtFullScreen": "Celá obrazovka", + "SSE.ApplicationView.txtShare": "Zdieľať" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/sl.json b/apps/spreadsheeteditor/embed/locale/sl.json new file mode 100644 index 000000000..3d0bf9571 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/sl.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtCopy": "Kopiraj v odložišče", + "common.view.modals.txtHeight": "Višina", + "common.view.modals.txtWidth": "Širina", + "SSE.ApplicationController.convertationErrorText": "Pretvorba ni uspela.", + "SSE.ApplicationController.convertationTimeoutText": "Pretvorbena prekinitev presežena.", + "SSE.ApplicationController.criticalErrorTitle": "Napaka", + "SSE.ApplicationController.downloadErrorText": "Prenos ni uspel.", + "SSE.ApplicationController.downloadTextText": "Prenašanje razpredelnice...", + "SSE.ApplicationController.errorDefaultMessage": "Koda napake: %1", + "SSE.ApplicationController.errorFilePassProtect": "Dokument je zaščiten z geslom in ga ni mogoče odpreti.", + "SSE.ApplicationController.errorUserDrop": "Do datoteke v tem trenutku ni možno dostopati.", + "SSE.ApplicationController.notcriticalErrorTitle": "Opozorilo", + "SSE.ApplicationController.textLoadingDocument": "Nalaganje razpredelnice", + "SSE.ApplicationController.textOf": "od", + "SSE.ApplicationController.txtClose": "Zapri", + "SSE.ApplicationController.unknownErrorText": "Neznana napaka.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Vaš brskalnik ni podprt.", + "SSE.ApplicationView.txtDownload": "Prenesi", + "SSE.ApplicationView.txtShare": "Deli" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/tr.json b/apps/spreadsheeteditor/embed/locale/tr.json new file mode 100644 index 000000000..ba9ae7e81 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/tr.json @@ -0,0 +1,21 @@ +{ + "common.view.modals.txtHeight": "Yükseklik", + "common.view.modals.txtWidth": "Genişlik", + "SSE.ApplicationController.convertationErrorText": "Değişim başarısız oldu.", + "SSE.ApplicationController.convertationTimeoutText": "Değişim süresi aşıldı.", + "SSE.ApplicationController.criticalErrorTitle": "Hata", + "SSE.ApplicationController.downloadErrorText": "Yükleme başarısız oldu.", + "SSE.ApplicationController.downloadTextText": "Spreadsheet yükleniyor...", + "SSE.ApplicationController.errorAccessDeny": "Hakkınız olmayan bir eylem gerçekleştirmeye çalışıyorsunuz.
Lütfen Belge Sunucu yöneticinize başvurun.", + "SSE.ApplicationController.errorDefaultMessage": "Hata kodu: %1", + "SSE.ApplicationController.errorFilePassProtect": "Döküman şifre korumalı ve açılamadı", + "SSE.ApplicationController.errorUserDrop": "Belgeye şu an erişilemiyor.", + "SSE.ApplicationController.notcriticalErrorTitle": "Uyarı", + "SSE.ApplicationController.textLoadingDocument": "Spreadsheet yükleniyor", + "SSE.ApplicationController.textOf": "'in", + "SSE.ApplicationController.txtClose": "Kapat", + "SSE.ApplicationController.unknownErrorText": "Bilinmeyen hata.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Tarayıcınız desteklenmiyor.", + "SSE.ApplicationView.txtDownload": "İndir", + "SSE.ApplicationView.txtShare": "Paylaş" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/uk.json b/apps/spreadsheeteditor/embed/locale/uk.json new file mode 100644 index 000000000..b89b6aecd --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/uk.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Копіювати в буфер обміну", + "common.view.modals.txtHeight": "Висота", + "common.view.modals.txtWidth": "Ширина", + "SSE.ApplicationController.convertationTimeoutText": "Термін переходу перевищено.", + "SSE.ApplicationController.criticalErrorTitle": "Помилка", + "SSE.ApplicationController.downloadErrorText": "Завантаження не вдалося", + "SSE.ApplicationController.downloadTextText": "Завантаження електронної таблиці...", + "SSE.ApplicationController.errorAccessDeny": "Ви намагаєтеся виконати дію, на яку у вас немає прав.
Будь ласка, зв'яжіться з адміністратором вашого Сервера документів.", + "SSE.ApplicationController.errorDefaultMessage": "Код помилки: %1", + "SSE.ApplicationController.errorFilePassProtect": "Документ захищений паролем і його неможливо відкрити.", + "SSE.ApplicationController.errorUserDrop": "На даний момент файл не доступний.", + "SSE.ApplicationController.notcriticalErrorTitle": "Застереження", + "SSE.ApplicationController.textLoadingDocument": "Завантаження електронної таблиці", + "SSE.ApplicationController.textOf": "з", + "SSE.ApplicationController.txtClose": "Закрити", + "SSE.ApplicationController.unknownErrorText": "Невідома помилка.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не підтримується", + "SSE.ApplicationView.txtDownload": "Завантажити", + "SSE.ApplicationView.txtFullScreen": "Повноекранний режим", + "SSE.ApplicationView.txtShare": "Доступ" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/vi.json b/apps/spreadsheeteditor/embed/locale/vi.json new file mode 100644 index 000000000..0ce35919d --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/vi.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Sao chép vào khay nhớ tạm", + "common.view.modals.txtHeight": "Chiều cao", + "common.view.modals.txtWidth": "Chiều rộng", + "SSE.ApplicationController.convertationTimeoutText": "Đã quá thời gian chờ chuyển đổi.", + "SSE.ApplicationController.criticalErrorTitle": "Lỗi", + "SSE.ApplicationController.downloadErrorText": "Tải về không thành công.", + "SSE.ApplicationController.downloadTextText": "Đang tải về bảng tính...", + "SSE.ApplicationController.errorAccessDeny": "Bạn đang cố gắng thực hiện hành động mà bạn không có quyền.
Vui lòng liên hệ với quản trị viên Server Tài liệu của bạn.", + "SSE.ApplicationController.errorDefaultMessage": "Mã lỗi: %1", + "SSE.ApplicationController.errorFilePassProtect": "Tài liệu được bảo vệ bằng mật khẩu và không thể mở được.", + "SSE.ApplicationController.errorUserDrop": "Không thể truy cập file ngay lúc này.", + "SSE.ApplicationController.notcriticalErrorTitle": "Cảnh báo", + "SSE.ApplicationController.textLoadingDocument": "Đang tải bảng tính", + "SSE.ApplicationController.textOf": "trên", + "SSE.ApplicationController.txtClose": "Đóng", + "SSE.ApplicationController.unknownErrorText": "Lỗi không xác định.", + "SSE.ApplicationController.unsupportedBrowserErrorText": "Trình duyệt của bạn không được hỗ trợ.", + "SSE.ApplicationView.txtDownload": "Tải về", + "SSE.ApplicationView.txtFullScreen": "Toàn màn hình", + "SSE.ApplicationView.txtShare": "Chia sẻ" +} \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/zh.json b/apps/spreadsheeteditor/embed/locale/zh.json new file mode 100644 index 000000000..693515932 --- /dev/null +++ b/apps/spreadsheeteditor/embed/locale/zh.json @@ -0,0 +1,28 @@ +{ + "common.view.modals.txtCopy": "复制到剪贴板", + "common.view.modals.txtEmbed": "嵌入", + "common.view.modals.txtHeight": "高度", + "common.view.modals.txtShare": "分享链接", + "common.view.modals.txtWidth": "宽度", + "SSE.ApplicationController.convertationErrorText": "转换失败", + "SSE.ApplicationController.convertationTimeoutText": "转换超时", + "SSE.ApplicationController.criticalErrorTitle": "错误", + "SSE.ApplicationController.downloadErrorText": "下载失败", + "SSE.ApplicationController.downloadTextText": "电子表格下载中...", + "SSE.ApplicationController.errorAccessDeny": "您正在尝试执行您没有权限的操作。
请联系您的文档服务器管理员.", + "SSE.ApplicationController.errorDefaultMessage": "错误代码:%1", + "SSE.ApplicationController.errorFilePassProtect": "该文档受密码保护,无法被打开。", + "SSE.ApplicationController.errorUserDrop": "该文件现在无法访问。", + "SSE.ApplicationController.notcriticalErrorTitle": "警告", + "SSE.ApplicationController.scriptLoadError": "连接速度过慢,部分组件无法被加载。请重新加载页面。", + "SSE.ApplicationController.textLoadingDocument": "正在加载电子表格…", + "SSE.ApplicationController.textOf": "的", + "SSE.ApplicationController.txtClose": "关闭", + "SSE.ApplicationController.unknownErrorText": "示知错误", + "SSE.ApplicationController.unsupportedBrowserErrorText": "你的浏览器不支持", + "SSE.ApplicationController.waitText": "请稍候...", + "SSE.ApplicationView.txtDownload": "下载", + "SSE.ApplicationView.txtEmbed": "嵌入", + "SSE.ApplicationView.txtFullScreen": "全屏", + "SSE.ApplicationView.txtShare": "共享" +} \ No newline at end of file From c7a5162e8052b6b39ad4ef9079c6be31de40da9b Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 15 May 2019 14:48:38 +0300 Subject: [PATCH 104/510] [DE mobile] Add modal window collaboration, add Track Changes --- apps/documenteditor/mobile/app-dev.js | 6 +- apps/documenteditor/mobile/app.js | 6 +- .../mobile/app/controller/Collaboration.js | 191 ++++++++++++++++++ .../mobile/app/controller/Settings.js | 8 +- .../app/template/Collaboration.template | 81 ++++++++ .../mobile/app/template/Settings.template | 10 + .../mobile/app/view/Collaboration.js | 153 ++++++++++++++ .../mobile/app/view/Settings.js | 3 +- 8 files changed, 452 insertions(+), 6 deletions(-) create mode 100644 apps/documenteditor/mobile/app/controller/Collaboration.js create mode 100644 apps/documenteditor/mobile/app/template/Collaboration.template create mode 100644 apps/documenteditor/mobile/app/view/Collaboration.js diff --git a/apps/documenteditor/mobile/app-dev.js b/apps/documenteditor/mobile/app-dev.js index 653bd9b8c..95ac0d284 100644 --- a/apps/documenteditor/mobile/app-dev.js +++ b/apps/documenteditor/mobile/app-dev.js @@ -149,7 +149,8 @@ require([ 'AddTable', 'AddShape', 'AddImage', - 'AddOther' + 'AddOther', + 'Collaboration' ] }); @@ -218,7 +219,8 @@ require([ 'documenteditor/mobile/app/controller/add/AddTable', 'documenteditor/mobile/app/controller/add/AddShape', 'documenteditor/mobile/app/controller/add/AddImage', - 'documenteditor/mobile/app/controller/add/AddOther' + 'documenteditor/mobile/app/controller/add/AddOther', + 'documenteditor/mobile/app/controller/Collaboration' ], function() { window.compareVersions = true; app.start(); diff --git a/apps/documenteditor/mobile/app.js b/apps/documenteditor/mobile/app.js index e434c4546..4b139e5f6 100644 --- a/apps/documenteditor/mobile/app.js +++ b/apps/documenteditor/mobile/app.js @@ -160,7 +160,8 @@ require([ 'AddTable', 'AddShape', 'AddImage', - 'AddOther' + 'AddOther', + 'Collaboration' ] }); @@ -229,7 +230,8 @@ require([ 'documenteditor/mobile/app/controller/add/AddTable', 'documenteditor/mobile/app/controller/add/AddShape', 'documenteditor/mobile/app/controller/add/AddImage', - 'documenteditor/mobile/app/controller/add/AddOther' + 'documenteditor/mobile/app/controller/add/AddOther', + 'documenteditor/mobile/app/controller/Collaboration' ], function() { app.start(); }); diff --git a/apps/documenteditor/mobile/app/controller/Collaboration.js b/apps/documenteditor/mobile/app/controller/Collaboration.js new file mode 100644 index 000000000..1a7257cdd --- /dev/null +++ b/apps/documenteditor/mobile/app/controller/Collaboration.js @@ -0,0 +1,191 @@ +/* + * + * (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 + * + */ + +/** + * Collaboration.js + * Document Editor + * + * Created by Julia Svinareva on 14/5/19 + * Copyright (c) 2019 Ascensio System SIA. All rights reserved. + * + */ +define([ + 'core', + 'jquery', + 'underscore', + 'backbone', + 'documenteditor/mobile/app/view/Collaboration' +], function (core, $, _, Backbone) { + 'use strict'; + + DE.Controllers.Collaboration = Backbone.Controller.extend(_.extend((function() { + // Private + var _settings = [], + _headerType = 1, + rootView, + _isReviewOnly = false, + _fileKey, + _canReview = false; + + return { + models: [], + collections: [], + views: [ + 'Collaboration' + ], + + initialize: function() { + var me = this; + me.addListeners({ + 'Collaboration': { + 'page:show' : me.onPageShow + } + }); + }, + + setApi: function(api) { + this.api = api; + }, + + onLaunch: function () { + this.createView('Collaboration').render(); + }, + + setMode: function (mode) { + _isReviewOnly = mode.isReviewOnly; + _fileKey = mode.fileKey; + _canReview = mode.canReview; + }, + + + showModal: function() { + var me = this, + isAndroid = Framework7.prototype.device.android === true, + modalView, + mainView = DE.getController('Editor').getView('Editor').f7View; + + uiApp.closeModal(); + + /*me._showByStack(Common.SharedSettings.get('phone'));*/ + + if (Common.SharedSettings.get('phone')) { + modalView = $$(uiApp.pickerModal( + '
' + + '' + + '
' + )).on('opened', function () { + if (_.isFunction(me.api.asc_OnShowContextMenu)) { + me.api.asc_OnShowContextMenu() + } + }).on('close', function (e) { + mainView.showNavbar(); + }).on('closed', function () { + if (_.isFunction(me.api.asc_OnHideContextMenu)) { + me.api.asc_OnHideContextMenu() + } + }); + mainView.hideNavbar(); + } else { + modalView = uiApp.popover( + '
' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
', + $$('#toolbar-edit') + ); + } + + if (Framework7.prototype.device.android === true) { + $$('.view.collaboration-root-view.navbar-through').removeClass('navbar-through').addClass('navbar-fixed'); + $$('.view.collaboration-root-view .navbar').prependTo('.view.collaboration-root-view > .pages > .page'); + } + + rootView = uiApp.addView('.collaboration-root-view', { + dynamicNavbar: true, + domCache: true + }); + + Common.NotificationCenter.trigger('collaborationcontainer:show'); + this.onPageShow(this.getView('Collaboration')); + + DE.getController('Toolbar').getView('Toolbar').hideSearch(); + }, + + rootView : function() { + return rootView; + }, + + onPageShow: function(view, pageId) { + var me = this; + + if ('#reviewing-settings-view' == pageId) { + me.initReviewingSettingsView(); + Common.Utils.addScrollIfNeed('.page[data-page=reviewing-settings-view]', '.page[data-page=reviewing-settings-view] .page-content'); + } else { + + } + }, + + initReviewingSettingsView: function () { + var me = this; + $('#settings-review input:checkbox').attr('checked', _isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes-" + (_fileKey || ''))); + $('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me)); + if (_isReviewOnly) $layour.find('#settings-review').addClass('disabled'); + }, + + onTrackChanges: function(e) { + var $checkbox = $(e.currentTarget), + state = $checkbox.is(':checked'); + if ( _isReviewOnly ) { + $checkbox.attr('checked', true); + } else if ( _canReview ) { + this.api.asc_SetTrackRevisions(state); + Common.localStorage.setItem("de-mobile-track-changes-" + (_fileKey || ''), state ? 1 : 0); + } + }, + + + + text: '' + + } + })(), DE.Controllers.Collaboration || {})) +}); \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index d135ce7f2..49f377c25 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -46,7 +46,8 @@ define([ 'jquery', 'underscore', 'backbone', - 'documenteditor/mobile/app/view/Settings' + 'documenteditor/mobile/app/view/Settings', + 'documenteditor/mobile/app/controller/Collaboration' ], function (core, $, _, Backbone) { 'use strict'; @@ -249,9 +250,14 @@ define([ $('#settings-help').single('click', _.bind(me.onShowHelp, me)); $('#settings-download').single('click', _.bind(me.onDownloadOrigin, me)); $('#settings-print').single('click', _.bind(me.onPrint, me)); + $('#settings-collaboration').single('click', _.bind(me.clickCollaboration, me)); } }, + clickCollaboration: function() { + DE.getController('Collaboration').showModal(); + }, + onNoCharacters: function(e) { var me = this; var $checkbox = $(e.currentTarget), diff --git a/apps/documenteditor/mobile/app/template/Collaboration.template b/apps/documenteditor/mobile/app/template/Collaboration.template new file mode 100644 index 000000000..ffdd94803 --- /dev/null +++ b/apps/documenteditor/mobile/app/template/Collaboration.template @@ -0,0 +1,81 @@ + +
+ + +
+ + +
+ +
+
+
+
+
    +
  • +
    +
    + +
    +
    +
    <%= scope.textReview %>
    +
    + +
    +
    +
    +
  • + +
+
+ +
+
+
+
\ No newline at end of file diff --git a/apps/documenteditor/mobile/app/template/Settings.template b/apps/documenteditor/mobile/app/template/Settings.template index 7da79a08a..3c0dfa3ea 100644 --- a/apps/documenteditor/mobile/app/template/Settings.template +++ b/apps/documenteditor/mobile/app/template/Settings.template @@ -71,6 +71,16 @@
+
  • +
    +
    + +
    +
    +
    <%= scope.textCollaboration %>
    +
    +
    +
  • diff --git a/apps/documenteditor/mobile/app/view/Collaboration.js b/apps/documenteditor/mobile/app/view/Collaboration.js new file mode 100644 index 000000000..0bb12a2d2 --- /dev/null +++ b/apps/documenteditor/mobile/app/view/Collaboration.js @@ -0,0 +1,153 @@ +/* + * + * (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 + * + */ + +/** + * Collaboration.js + * Document Editor + * + * Created by Julia Svinareva on 14/5/19 + * Copyright (c) 2019 Ascensio System SIA. All rights reserved. + * + */ + +define([ + 'text!documenteditor/mobile/app/template/Collaboration.template', + 'jquery', + 'underscore', + 'backbone' +], function (settingsTemplate, $, _, Backbone) { + 'use strict'; + + DE.Views.Collaboration = Backbone.View.extend(_.extend((function() { + // private + + return { + + template: _.template(settingsTemplate), + + events: { + // + }, + + initialize: function() { + Common.NotificationCenter.on('collaborationcontainer:show', _.bind(this.initEvents, this)); + this.on('page:show', _.bind(this.updateItemHandlers, this)); + }, + + initEvents: function () { + var me = this; + + Common.Utils.addScrollIfNeed('.view[data-page=collaboration-root-view] .pages', '.view[data-page=collaboration-root-view] .page'); + me.updateItemHandlers(); + }, + + initControls: function() { + // + }, + + // Render layout + render: function() { + this.layout = $('
    ').append(this.template({ + android : Common.SharedSettings.get('android'), + phone : Common.SharedSettings.get('phone'), + orthography: Common.SharedSettings.get('sailfish'), + scope : this + })); + + return this; + }, + + updateItemHandlers: function () { + var selectorsDynamicPage = [ + '.page[data-page=collaboration-root-view]', + '.page[data-page=reviewing-settings-view]' + ].map(function (selector) { + return selector + ' a.item-link[data-page]'; + }).join(', '); + + $(selectorsDynamicPage).single('click', _.bind(this.onItemClick, this)); + }, + + onItemClick: function (e) { + var $target = $(e.currentTarget), + page = $target.data('page'); + + if (page && page.length > 0 ) { + this.showPage(page); + } + }, + + rootLayout: function () { + if (this.layout) { + var $layour = this.layout.find('#collaboration-root-view'), + isPhone = Common.SharedSettings.get('phone'); + + return $layour.html(); + } + + return ''; + }, + + showPage: function(templateId, suspendEvent) { + var rootView = DE.getController('Collaboration').rootView(); + + if (rootView && this.layout) { + var $content = this.layout.find(templateId); + + // Android fix for navigation + if (Framework7.prototype.device.android) { + $content.find('.page').append($content.find('.navbar')); + } + + rootView.router.load({ + content: $content.html() + }); + + if (suspendEvent !== true) { + this.fireEvent('page:show', [this, templateId]); + } + } + }, + + + + + textCollaboration: 'Collaboration', + textReviewing: 'Reviewing', + textСomments: 'Сomments', + textBack: 'Back', + textReview: 'Track Changes', + + } + })(), DE.Views.Collaboration || {})) +}); \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/view/Settings.js b/apps/documenteditor/mobile/app/view/Settings.js index b49d816bc..eb85b01ca 100644 --- a/apps/documenteditor/mobile/app/view/Settings.js +++ b/apps/documenteditor/mobile/app/view/Settings.js @@ -286,7 +286,8 @@ define([ textInch: 'Inch', textColorSchemes: 'Color Schemes', textNoCharacters: 'Nonprinting Characters', - textHiddenTableBorders: 'Hidden Table Borders' + textHiddenTableBorders: 'Hidden Table Borders', + textCollaboration: 'Collaboration' } })(), DE.Views.Settings || {})) From 63762a25bd36e935ae575fcc845935ba6c1687d4 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 15 May 2019 16:28:18 +0300 Subject: [PATCH 105/510] [DE] Doc info: get editing time and authors --- .../main/app/view/FileMenuPanels.js | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 26180b49c..45bd78631 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -916,11 +916,20 @@ define([ return; var me = this, - props = (this.api) ? this.api.asc_getCoreProps() : null; + props = (this.api) ? this.api.asc_getCoreProps() : null, + app = (this.api) ? this.api.asc_getAppProps() : null, + value; + + if (app) { + value = app.asc_getTotalTime(); + if (value) + this.lblEditTime.text(value + ' ' + this.txtMinutes); + } + this._ShowHideInfoItem(this.lblEditTime, !!value); + if (props) { var visible = false; - - var value = props.asc_getModified(); + value = props.asc_getModified(); if (value) this.lblModifyDate.text(value.toLocaleString()); visible = visible || this._ShowHideInfoItem(this.lblModifyDate, !!value); @@ -930,10 +939,6 @@ define([ visible = visible || this._ShowHideInfoItem(this.lblModifyBy, !!value); $('tr.divider.modify', this.el)[visible?'show':'hide'](); - value = '';//props.asc_getEditingTime(); - if (value) - this.lblEditTime.text(value); - this._ShowHideInfoItem(this.lblEditTime, !!value); value = props.asc_getTitle(); this.inputTitle.setValue(value || ''); value = props.asc_getSubject(); @@ -942,8 +947,8 @@ define([ this.inputComment.setValue(value || ''); this.tblAuthor.find('tr:not(:last-of-type)').remove(); - value = ['123"""<>', '456'];//props.asc_getAuthor(); - value && value.forEach(function(item) { + value = props.asc_getCreator();//"123\"\"\"\<\>,456"; + value && value.split(/\s*[,;]\s*/).forEach(function(item) { var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(item))); me.trAuthor.before(div); }); @@ -1050,7 +1055,8 @@ define([ txtDate: 'Created', txtAuthor: 'Author', txtAddAuthor: 'Add Author', - txtAddText: 'Add Text' + txtAddText: 'Add Text', + txtMinutes: 'min' }, DE.Views.FileMenuPanels.DocumentInfo || {})); DE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({ From bd8e1861edba37c777bee478a32eef72b8722d40 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 15 May 2019 16:49:11 +0300 Subject: [PATCH 106/510] [DE] Doc info: hide total editing time --- .../main/app/view/FileMenuPanels.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 45bd78631..8f66b889d 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -708,10 +708,10 @@ define([ '', '', '', - '', - '', - '', - '', + // '', + // '', + // '', + // '', '', '', '
    ', @@ -778,7 +778,7 @@ define([ this.lblStatParagraphs = $('#id-info-paragraphs'); this.lblStatSymbols = $('#id-info-symbols'); this.lblStatSpaces = $('#id-info-spaces'); - this.lblEditTime = $('#id-info-edittime'); + // this.lblEditTime = $('#id-info-edittime'); // edited info this.inputTitle = new Common.UI.InputField({ @@ -917,15 +917,15 @@ define([ var me = this, props = (this.api) ? this.api.asc_getCoreProps() : null, - app = (this.api) ? this.api.asc_getAppProps() : null, value; - if (app) { - value = app.asc_getTotalTime(); - if (value) - this.lblEditTime.text(value + ' ' + this.txtMinutes); - } - this._ShowHideInfoItem(this.lblEditTime, !!value); + // var app = (this.api) ? this.api.asc_getAppProps() : null; + // if (app) { + // value = app.asc_getTotalTime(); + // if (value) + // this.lblEditTime.text(value + ' ' + this.txtMinutes); + // } + // this._ShowHideInfoItem(this.lblEditTime, !!value); if (props) { var visible = false; From 08bdb152a778747c879e854a02a4e0301e5cc27d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 16 May 2019 11:49:13 +0300 Subject: [PATCH 107/510] [DE] Fix loading document info, add translation --- .../documenteditor/main/app/view/FileMenuPanels.js | 14 +++++++------- apps/documenteditor/main/locale/en.json | 13 +++++++++++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 3d448c87e..eb317991a 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -737,7 +737,7 @@ define([ '', '', '', - '', + '', '', '', '', @@ -885,13 +885,13 @@ define([ // server info if (doc.info.folder ) this.lblPlacement.text( doc.info.folder ); - visible = visible || this._ShowHideInfoItem(this.lblPlacement, doc.info.folder!==undefined && doc.info.folder!==null); + visible = this._ShowHideInfoItem(this.lblPlacement, doc.info.folder!==undefined && doc.info.folder!==null) || visible; if (doc.info.author) this.lblOwner.text(doc.info.author); - visible = visible || this._ShowHideInfoItem(this.lblOwner, doc.info.author!==undefined && doc.info.author!==null); + visible = this._ShowHideInfoItem(this.lblOwner, doc.info.author!==undefined && doc.info.author!==null) || visible; if (doc.info.uploaded) this.lblUploaded.text(doc.info.uploaded.toLocaleString()); - visible = visible || this._ShowHideInfoItem(this.lblUploaded, doc.info.uploaded!==undefined && doc.info.uploaded!==null); + visible = this._ShowHideInfoItem(this.lblUploaded, doc.info.uploaded!==undefined && doc.info.uploaded!==null) || visible; } else this._ShowHideDocInfo(false); $('tr.divider.general', this.el)[visible?'show':'hide'](); @@ -932,11 +932,11 @@ define([ value = props.asc_getModified(); if (value) this.lblModifyDate.text(value.toLocaleString()); - visible = visible || this._ShowHideInfoItem(this.lblModifyDate, !!value); + visible = this._ShowHideInfoItem(this.lblModifyDate, !!value) || visible; value = props.asc_getLastModifiedBy(); if (value) this.lblModifyBy.text(value); - visible = visible || this._ShowHideInfoItem(this.lblModifyBy, !!value); + visible = this._ShowHideInfoItem(this.lblModifyBy, !!value) || visible; $('tr.divider.modify', this.el)[visible?'show':'hide'](); value = props.asc_getTitle(); @@ -1052,7 +1052,7 @@ define([ txtComment: 'Comment', txtModifyDate: 'Last Modified', txtModifyBy: 'Last Modified By', - txtDate: 'Created', + txtCreated: 'Created', txtAuthor: 'Author', txtAddAuthor: 'Add Author', txtAddText: 'Add Text', diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 4d158c05b..6fa41b503 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1345,18 +1345,27 @@ "DE.Views.FileMenuPanels.CreateNew.newDocumentText": "New Text Document", "DE.Views.FileMenuPanels.CreateNew.noTemplatesText": "There are no templates", "DE.Views.FileMenuPanels.DocumentInfo.txtAppName": "Application", + "DE.Views.FileMenuPanels.DocumentInfo.txtAddAuthor": "Add Author", + "DE.Views.FileMenuPanels.DocumentInfo.txtAddText": "Add Text", "DE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Author", "DE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Change access rights", - "DE.Views.FileMenuPanels.DocumentInfo.txtDate": "Creation Date", + "DE.Views.FileMenuPanels.DocumentInfo.txtComment": "Comment", + "del_DE.Views.FileMenuPanels.DocumentInfo.txtDate": "Creation Date", + "DE.Views.FileMenuPanels.DocumentInfo.txtCreated": "Created", "DE.Views.FileMenuPanels.DocumentInfo.txtLoading": "Loading...", + "DE.Views.FileMenuPanels.DocumentInfo.txtModifyDate": "Last Modified", + "DE.Views.FileMenuPanels.DocumentInfo.txtModifyBy": "Last Modified By", + "DE.Views.FileMenuPanels.DocumentInfo.txtOwner": "Owner", "DE.Views.FileMenuPanels.DocumentInfo.txtPages": "Pages", "DE.Views.FileMenuPanels.DocumentInfo.txtParagraphs": "Paragraphs", "DE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Location", "DE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persons who have rights", "DE.Views.FileMenuPanels.DocumentInfo.txtSpaces": "Symbols with spaces", "DE.Views.FileMenuPanels.DocumentInfo.txtStatistics": "Statistics", + "DE.Views.FileMenuPanels.DocumentInfo.txtSubject": "Subject", "DE.Views.FileMenuPanels.DocumentInfo.txtSymbols": "Symbols", - "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Document Title", + "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Title", + "DE.Views.FileMenuPanels.DocumentInfo.txtUploaded": "Uploaded", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Words", "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights", "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights", From 59fb4182fbf1aee28ee26b019f1f723be4135c46 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 16 May 2019 11:52:49 +0300 Subject: [PATCH 108/510] [SSE] Add document info --- .../main/app/view/FileMenuPanels.js | 3 +- .../main/app/view/FileMenuPanels.js | 240 +++++++++++++++--- apps/spreadsheeteditor/main/locale/en.json | 14 +- .../main/resources/less/leftmenu.less | 16 ++ 4 files changed, 235 insertions(+), 38 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index eb317991a..d1833d4df 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -900,8 +900,9 @@ define([ if (appname) { appname = (appname.asc_getApplication() || '') + ' ' + (appname.asc_getAppVersion() || ''); this.lblApplication.text(appname); - this._ShowHideInfoItem(this.lblApplication, !!appname); } + this._ShowHideInfoItem(this.lblApplication, !!appname); + var props = (this.api) ? this.api.asc_getCoreProps() : null; if (props) { var value = props.asc_getCreated(); diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 65731d5a8..07bd8f72b 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1050,26 +1050,61 @@ define([ this.template = _.template([ '', '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', - '', - '', + '', + '', + '', '', - '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', - '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', - '', '
    -
    ', + '', + '', + '', + '', + '
    ', + '
    ' ].join('')); @@ -1079,11 +1114,79 @@ define([ render: function() { $(this.el).html(this.template()); - this.lblTitle = $('#id-info-title'); + var me = this; + + // server info this.lblPlacement = $('#id-info-placement'); + this.lblOwner = $('#id-info-owner'); + this.lblUploaded = $('#id-info-uploaded'); + + // edited info + this.inputTitle = new Common.UI.InputField({ + el : $('#id-info-title'), + style : 'width: 200px;', + placeHolder : this.txtAddText, + validateOnBlur: false + }).on('changed:after', function() { + // me.api && me.api.asc_setDocumentTitle(me.inputTitle.getValue()); + }); + this.inputSubject = new Common.UI.InputField({ + el : $('#id-info-subject'), + style : 'width: 200px;', + placeHolder : this.txtAddText, + validateOnBlur: false + }).on('changed:after', function() { + // me.api && me.api.asc_setDocumentSubject(me.inputSubject.getValue()); + }); + this.inputComment = new Common.UI.InputField({ + el : $('#id-info-comment'), + style : 'width: 200px;', + placeHolder : this.txtAddText, + validateOnBlur: false + }).on('changed:after', function() { + // me.api && me.api.asc_setDocumentComment(me.inputComment.getValue()); + }); + + // modify info + this.lblModifyDate = $('#id-info-modify-date'); + this.lblModifyBy = $('#id-info-modify-by'); + + // creation info this.lblDate = $('#id-info-date'); - this.lblAuthor = $('#id-info-author'); this.lblApplication = $('#id-info-appname'); + this.tblAuthor = $('#id-info-author table'); + this.trAuthor = $('#id-info-add-author').closest('tr'); + this.authorTpl = '
    '; + + this.tblAuthor.on('click', function(e) { + var btn = $(e.target); + if (btn.hasClass('close')) { + var el = btn.closest('tr'), + idx = me.tblAuthor.find('tr').index(el); + el.remove(); + // remove idx author from info + } + }); + + this.inputAuthor = new Common.UI.InputField({ + el : $('#id-info-add-author'), + style : 'width: 200px;', + validateOnBlur: false, + placeHolder: this.txtAddAuthor + }).on('changed:after', function(input, newValue, oldValue) { + var val = newValue.trim(); + if (!!val && val !== oldValue.trim()) { + val.split(/\s*[,;]\s*/).forEach(function(item){ + var str = item.trim(); + if (str) { + var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(str))); + me.trAuthor.before(div); + // add str author to info + } + }); + me.inputAuthor.setValue(''); + } + }); this.rendered = true; @@ -1101,6 +1204,8 @@ define([ show: function() { Common.UI.BaseView.prototype.show.call(this,arguments); + + this.updateFileInfo(); }, hide: function() { @@ -1112,37 +1217,92 @@ define([ if (!this.rendered) return; + var visible = false; doc = doc || {}; - this.lblTitle.text((doc.title) ? doc.title : '-'); - if (doc.info) { - if (doc.info.author) - this.lblAuthor.text(doc.info.author); - this._ShowHideInfoItem('author', doc.info.author!==undefined && doc.info.author!==null); - if (doc.info.created ) - this.lblDate.text( doc.info.created ); - this._ShowHideInfoItem('date', doc.info.created!==undefined && doc.info.created!==null); + // server info if (doc.info.folder ) this.lblPlacement.text( doc.info.folder ); - this._ShowHideInfoItem('placement', doc.info.folder!==undefined && doc.info.folder!==null); + visible = this._ShowHideInfoItem(this.lblPlacement, doc.info.folder!==undefined && doc.info.folder!==null) || visible; + if (doc.info.author) + this.lblOwner.text(doc.info.author); + visible = this._ShowHideInfoItem(this.lblOwner, doc.info.author!==undefined && doc.info.author!==null) || visible; + if (doc.info.uploaded) + this.lblUploaded.text(doc.info.uploaded.toLocaleString()); + visible = this._ShowHideInfoItem(this.lblUploaded, doc.info.uploaded!==undefined && doc.info.uploaded!==null) || visible; } else this._ShowHideDocInfo(false); + $('tr.divider.general', this.el)[visible?'show':'hide'](); + var appname = (this.api) ? this.api.asc_getAppProps() : null; if (appname) { appname = (appname.asc_getApplication() || '') + ' ' + (appname.asc_getAppVersion() || ''); this.lblApplication.text(appname); } - this._ShowHideInfoItem('appname', !!appname); + this._ShowHideInfoItem(this.lblApplication, !!appname); + + var props = (this.api) ? this.api.asc_getCoreProps() : null; + if (props) { + var value = props.asc_getCreated(); + if (value) + this.lblDate.text(value.toLocaleString()); + this._ShowHideInfoItem(this.lblDate, !!value); + } }, - _ShowHideInfoItem: function(cls, visible) { - $('tr.'+cls, this.el)[visible?'show':'hide'](); + updateFileInfo: function() { + if (!this.rendered) + return; + + var me = this, + props = (this.api) ? this.api.asc_getCoreProps() : null, + value; + + // var app = (this.api) ? this.api.asc_getAppProps() : null; + // if (app) { + // value = app.asc_getTotalTime(); + // if (value) + // this.lblEditTime.text(value + ' ' + this.txtMinutes); + // } + // this._ShowHideInfoItem(this.lblEditTime, !!value); + + if (props) { + var visible = false; + value = props.asc_getModified(); + if (value) + this.lblModifyDate.text(value.toLocaleString()); + visible = this._ShowHideInfoItem(this.lblModifyDate, !!value) || visible; + value = props.asc_getLastModifiedBy(); + if (value) + this.lblModifyBy.text(value); + visible = this._ShowHideInfoItem(this.lblModifyBy, !!value) || visible; + $('tr.divider.modify', this.el)[visible?'show':'hide'](); + + value = props.asc_getTitle(); + this.inputTitle.setValue(value || ''); + value = props.asc_getSubject(); + this.inputSubject.setValue(value || ''); + value = props.asc_getDescription(); + this.inputComment.setValue(value || ''); + + this.tblAuthor.find('tr:not(:last-of-type)').remove(); + value = props.asc_getCreator();//"123\"\"\"\<\>,456"; + value && value.split(/\s*[,;]\s*/).forEach(function(item) { + var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(item))); + me.trAuthor.before(div); + }); + } + }, + + _ShowHideInfoItem: function(el, visible) { + el.closest('tr')[visible?'show':'hide'](); + return visible; }, _ShowHideDocInfo: function(visible) { - this._ShowHideInfoItem('date', visible); - this._ShowHideInfoItem('placement', visible); - this._ShowHideInfoItem('author', visible); + this._ShowHideInfoItem(this.lblPlacement, visible); + this._ShowHideInfoItem(this.lblOwner, visible); + this._ShowHideInfoItem(this.lblUploaded, visible); }, setMode: function(mode) { @@ -1155,11 +1315,21 @@ define([ return this; }, - txtTitle: 'Document Title', + txtPlacement: 'Location', + txtOwner: 'Owner', + txtUploaded: 'Uploaded', + txtLoading: 'Loading...', + txtAppName: 'Application', + txtTitle: 'Title', + txtSubject: 'Subject', + txtComment: 'Comment', + txtModifyDate: 'Last Modified', + txtModifyBy: 'Last Modified By', + txtDate: 'Created', txtAuthor: 'Author', - txtPlacement: 'Placement', - txtDate: 'Creation Date', - txtAppName: 'Application' + txtAddAuthor: 'Add Author', + txtAddText: 'Add Text', + txtMinutes: 'min' }, SSE.Views.FileMenuPanels.DocumentInfo || {})); SSE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({ diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 832fc77c5..5b6ada2ea 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1482,12 +1482,22 @@ "SSE.Views.FileMenuPanels.CreateNew.newDescriptionText": "Create a new blank spreadsheet which you will be able to style and format after it is created during the editing. Or choose one of the templates to start a spreadsheet of a certain type or purpose where some styles have already been pre-applied.", "SSE.Views.FileMenuPanels.CreateNew.newDocumentText": "New Spreadsheet", "SSE.Views.FileMenuPanels.DocumentInfo.txtAppName": "Application", + "SSE.Views.FileMenuPanels.DocumentInfo.txtAddAuthor": "Add Author", + "SSE.Views.FileMenuPanels.DocumentInfo.txtAddText": "Add Text", "SSE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Author", "SSE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Change access rights", - "SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Creation Date", + "SSE.Views.FileMenuPanels.DocumentInfo.txtComment": "Comment", + "del_SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Creation Date", + "SSE.Views.FileMenuPanels.DocumentInfo.txtCreated": "Created", + "SSE.Views.FileMenuPanels.DocumentInfo.txtLoading": "Loading...", + "SSE.Views.FileMenuPanels.DocumentInfo.txtModifyDate": "Last Modified", + "SSE.Views.FileMenuPanels.DocumentInfo.txtModifyBy": "Last Modified By", + "SSE.Views.FileMenuPanels.DocumentInfo.txtOwner": "Owner", "SSE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Location", "SSE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persons who have rights", - "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Spreadsheet Title", + "SSE.Views.FileMenuPanels.DocumentInfo.txtSubject": "Subject", + "SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Title", + "SSE.Views.FileMenuPanels.DocumentInfo.txtUploaded": "Uploaded", "SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights", "SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights", "SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Apply", diff --git a/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/apps/spreadsheeteditor/main/resources/less/leftmenu.less index 2e10d4039..c048950d8 100644 --- a/apps/spreadsheeteditor/main/resources/less/leftmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/leftmenu.less @@ -500,6 +500,22 @@ label, span { font-size: 12px; } + + .close { + width: 16px; + height: 16px; + cursor: pointer; + display: inline-block; + vertical-align: middle; + margin-left: 5px; + + background-position: @but-close-offset-x @but-close-offset-y; + + &.over, + &:hover { + background-position: @but-close-offset-x @but-close-offset-y - 16px; + } + } } #panel-protect { From fceec132060953973e380f50eda25ccf948a6dc0 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 16 May 2019 15:59:39 +0300 Subject: [PATCH 109/510] [PE] Add document info --- .../main/app/view/FileMenuPanels.js | 2 +- .../main/app/view/FileMenuPanels.js | 244 +++++++++++++++--- apps/presentationeditor/main/locale/en.json | 13 +- .../main/resources/less/leftmenu.less | 16 ++ .../main/app/view/FileMenuPanels.js | 1 - apps/spreadsheeteditor/main/locale/en.json | 1 - 6 files changed, 237 insertions(+), 40 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index d1833d4df..d671c1583 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -1034,7 +1034,7 @@ define([ }, onDocumentName: function(name) { - this.lblTitle.text((name) ? name : '-'); + // this.lblTitle.text((name) ? name : '-'); }, txtPlacement: 'Location', diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 3a7d31bd7..808f55dae 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -595,26 +595,65 @@ define([ this.template = _.template([ '', '', - '', - '', - '', - '', - '', - '', - '', - '', '', '', '', - '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + // '', + // '', + // '', + // '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', '', - '', + '', '', - '', - '', - '', + '', + '', + '', '', - '', '
    -
    ', + '', + '', + '', + '', + '
    ', + '
    ' ].join('')); @@ -624,11 +663,79 @@ define([ render: function() { $(this.el).html(this.template()); - this.lblTitle = $('#id-info-title'); + var me = this; + + // server info this.lblPlacement = $('#id-info-placement'); + this.lblOwner = $('#id-info-owner'); + this.lblUploaded = $('#id-info-uploaded'); + + // edited info + this.inputTitle = new Common.UI.InputField({ + el : $('#id-info-title'), + style : 'width: 200px;', + placeHolder : this.txtAddText, + validateOnBlur: false + }).on('changed:after', function() { + // me.api && me.api.asc_setDocumentTitle(me.inputTitle.getValue()); + }); + this.inputSubject = new Common.UI.InputField({ + el : $('#id-info-subject'), + style : 'width: 200px;', + placeHolder : this.txtAddText, + validateOnBlur: false + }).on('changed:after', function() { + // me.api && me.api.asc_setDocumentSubject(me.inputSubject.getValue()); + }); + this.inputComment = new Common.UI.InputField({ + el : $('#id-info-comment'), + style : 'width: 200px;', + placeHolder : this.txtAddText, + validateOnBlur: false + }).on('changed:after', function() { + // me.api && me.api.asc_setDocumentComment(me.inputComment.getValue()); + }); + + // modify info + this.lblModifyDate = $('#id-info-modify-date'); + this.lblModifyBy = $('#id-info-modify-by'); + + // creation info this.lblDate = $('#id-info-date'); - this.lblAuthor = $('#id-info-author'); this.lblApplication = $('#id-info-appname'); + this.tblAuthor = $('#id-info-author table'); + this.trAuthor = $('#id-info-add-author').closest('tr'); + this.authorTpl = '
    '; + + this.tblAuthor.on('click', function(e) { + var btn = $(e.target); + if (btn.hasClass('close')) { + var el = btn.closest('tr'), + idx = me.tblAuthor.find('tr').index(el); + el.remove(); + // remove idx author from info + } + }); + + this.inputAuthor = new Common.UI.InputField({ + el : $('#id-info-add-author'), + style : 'width: 200px;', + validateOnBlur: false, + placeHolder: this.txtAddAuthor + }).on('changed:after', function(input, newValue, oldValue) { + var val = newValue.trim(); + if (!!val && val !== oldValue.trim()) { + val.split(/\s*[,;]\s*/).forEach(function(item){ + var str = item.trim(); + if (str) { + var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(str))); + me.trAuthor.before(div); + // add str author to info + } + }); + me.inputAuthor.setValue(''); + } + }); this.rendered = true; @@ -646,6 +753,8 @@ define([ show: function() { Common.UI.BaseView.prototype.show.call(this,arguments); + + this.updateFileInfo(); }, hide: function() { @@ -657,37 +766,92 @@ define([ if (!this.rendered) return; + var visible = false; doc = doc || {}; - this.lblTitle.text((doc.title) ? doc.title : '-'); - if (doc.info) { - if (doc.info.author) - this.lblAuthor.text(doc.info.author); - this._ShowHideInfoItem('author', doc.info.author!==undefined && doc.info.author!==null); - if (doc.info.created ) - this.lblDate.text( doc.info.created ); - this._ShowHideInfoItem('date', doc.info.created!==undefined && doc.info.created!==null); + // server info if (doc.info.folder ) this.lblPlacement.text( doc.info.folder ); - this._ShowHideInfoItem('placement', doc.info.folder!==undefined && doc.info.folder!==null); + visible = this._ShowHideInfoItem(this.lblPlacement, doc.info.folder!==undefined && doc.info.folder!==null) || visible; + if (doc.info.author) + this.lblOwner.text(doc.info.author); + visible = this._ShowHideInfoItem(this.lblOwner, doc.info.author!==undefined && doc.info.author!==null) || visible; + if (doc.info.uploaded) + this.lblUploaded.text(doc.info.uploaded.toLocaleString()); + visible = this._ShowHideInfoItem(this.lblUploaded, doc.info.uploaded!==undefined && doc.info.uploaded!==null) || visible; } else this._ShowHideDocInfo(false); + $('tr.divider.general', this.el)[visible?'show':'hide'](); + var appname = (this.api) ? this.api.asc_getAppProps() : null; if (appname) { appname = (appname.asc_getApplication() || '') + ' ' + (appname.asc_getAppVersion() || ''); this.lblApplication.text(appname); } - this._ShowHideInfoItem('appname', !!appname); + this._ShowHideInfoItem(this.lblApplication, !!appname); + + var props = (this.api) ? this.api.asc_getCoreProps() : null; + if (props) { + var value = props.asc_getCreated(); + if (value) + this.lblDate.text(value.toLocaleString()); + this._ShowHideInfoItem(this.lblDate, !!value); + } }, - _ShowHideInfoItem: function(cls, visible) { - $('tr.'+cls, this.el)[visible?'show':'hide'](); + updateFileInfo: function() { + if (!this.rendered) + return; + + var me = this, + props = (this.api) ? this.api.asc_getCoreProps() : null, + value; + + // var app = (this.api) ? this.api.asc_getAppProps() : null; + // if (app) { + // value = app.asc_getTotalTime(); + // if (value) + // this.lblEditTime.text(value + ' ' + this.txtMinutes); + // } + // this._ShowHideInfoItem(this.lblEditTime, !!value); + + if (props) { + var visible = false; + value = props.asc_getModified(); + if (value) + this.lblModifyDate.text(value.toLocaleString()); + visible = this._ShowHideInfoItem(this.lblModifyDate, !!value) || visible; + value = props.asc_getLastModifiedBy(); + if (value) + this.lblModifyBy.text(value); + visible = this._ShowHideInfoItem(this.lblModifyBy, !!value) || visible; + $('tr.divider.modify', this.el)[visible?'show':'hide'](); + + value = props.asc_getTitle(); + this.inputTitle.setValue(value || ''); + value = props.asc_getSubject(); + this.inputSubject.setValue(value || ''); + value = props.asc_getDescription(); + this.inputComment.setValue(value || ''); + + this.tblAuthor.find('tr:not(:last-of-type)').remove(); + value = props.asc_getCreator();//"123\"\"\"\<\>,456"; + value && value.split(/\s*[,;]\s*/).forEach(function(item) { + var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(item))); + me.trAuthor.before(div); + }); + } + }, + + _ShowHideInfoItem: function(el, visible) { + el.closest('tr')[visible?'show':'hide'](); + return visible; }, _ShowHideDocInfo: function(visible) { - this._ShowHideInfoItem('date', visible); - this._ShowHideInfoItem('placement', visible); - this._ShowHideInfoItem('author', visible); + this._ShowHideInfoItem(this.lblPlacement, visible); + this._ShowHideInfoItem(this.lblOwner, visible); + this._ShowHideInfoItem(this.lblUploaded, visible); }, setMode: function(mode) { @@ -700,11 +864,21 @@ define([ return this; }, - txtTitle: 'Document Title', + txtPlacement: 'Location', + txtOwner: 'Owner', + txtUploaded: 'Uploaded', + txtAppName: 'Application', + txtEditTime: 'Total Editing time', + txtTitle: 'Title', + txtSubject: 'Subject', + txtComment: 'Comment', + txtModifyDate: 'Last Modified', + txtModifyBy: 'Last Modified By', + txtCreated: 'Created', txtAuthor: 'Author', - txtPlacement: 'Placement', - txtDate: 'Creation Date', - txtAppName: 'Application' + txtAddAuthor: 'Add Author', + txtAddText: 'Add Text', + txtMinutes: 'min' }, PE.Views.FileMenuPanels.DocumentInfo || {})); PE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({ diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 59ac33b4a..65c47f68d 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1152,12 +1152,21 @@ "PE.Views.FileMenuPanels.CreateNew.newDocumentText": "New Presentation", "PE.Views.FileMenuPanels.CreateNew.noTemplatesText": "There are no templates", "PE.Views.FileMenuPanels.DocumentInfo.txtAppName": "Application", + "PE.Views.FileMenuPanels.DocumentInfo.txtAddAuthor": "Add Author", + "PE.Views.FileMenuPanels.DocumentInfo.txtAddText": "Add Text", "PE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Author", "PE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Change access rights", - "PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Creation Date", + "PE.Views.FileMenuPanels.DocumentInfo.txtComment": "Comment", + "del_PE.Views.FileMenuPanels.DocumentInfo.txtDate": "Creation Date", + "PE.Views.FileMenuPanels.DocumentInfo.txtCreated": "Created", + "PE.Views.FileMenuPanels.DocumentInfo.txtModifyDate": "Last Modified", + "PE.Views.FileMenuPanels.DocumentInfo.txtModifyBy": "Last Modified By", + "PE.Views.FileMenuPanels.DocumentInfo.txtOwner": "Owner", "PE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Location", "PE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persons who have rights", - "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Presentation Title", + "PE.Views.FileMenuPanels.DocumentInfo.txtSubject": "Subject", + "PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Title", + "PE.Views.FileMenuPanels.DocumentInfo.txtUploaded": "Uploaded", "PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights", "PE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights", "PE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Warning", diff --git a/apps/presentationeditor/main/resources/less/leftmenu.less b/apps/presentationeditor/main/resources/less/leftmenu.less index 206dbcc46..9c0244e73 100644 --- a/apps/presentationeditor/main/resources/less/leftmenu.less +++ b/apps/presentationeditor/main/resources/less/leftmenu.less @@ -433,6 +433,22 @@ label, span { font-size: 12px; } + + .close { + width: 16px; + height: 16px; + cursor: pointer; + display: inline-block; + vertical-align: middle; + margin-left: 5px; + + background-position: @but-close-offset-x @but-close-offset-y; + + &.over, + &:hover { + background-position: @but-close-offset-x @but-close-offset-y - 16px; + } + } } #panel-protect { diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 07bd8f72b..3100b1d7a 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1318,7 +1318,6 @@ define([ txtPlacement: 'Location', txtOwner: 'Owner', txtUploaded: 'Uploaded', - txtLoading: 'Loading...', txtAppName: 'Application', txtTitle: 'Title', txtSubject: 'Subject', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 5b6ada2ea..203fd7a0d 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1489,7 +1489,6 @@ "SSE.Views.FileMenuPanels.DocumentInfo.txtComment": "Comment", "del_SSE.Views.FileMenuPanels.DocumentInfo.txtDate": "Creation Date", "SSE.Views.FileMenuPanels.DocumentInfo.txtCreated": "Created", - "SSE.Views.FileMenuPanels.DocumentInfo.txtLoading": "Loading...", "SSE.Views.FileMenuPanels.DocumentInfo.txtModifyDate": "Last Modified", "SSE.Views.FileMenuPanels.DocumentInfo.txtModifyBy": "Last Modified By", "SSE.Views.FileMenuPanels.DocumentInfo.txtOwner": "Owner", From 0a1d46176314c6be59fecd3d2314a532281168a1 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Thu, 16 May 2019 19:15:12 +0300 Subject: [PATCH 110/510] [DE mobile] Add settings: Display Mode, Accept All Changes, Reject All Changes, Next Change, Previous Change, Accept Change, Reject Change, Description Change in Collaboration. --- .../mobile/app/controller/Collaboration.js | 370 +++++++++++++++++- .../app/template/Collaboration.template | 131 ++++++- .../mobile/app/view/Collaboration.js | 7 + 3 files changed, 491 insertions(+), 17 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Collaboration.js b/apps/documenteditor/mobile/app/controller/Collaboration.js index 1a7257cdd..daf3ba54e 100644 --- a/apps/documenteditor/mobile/app/controller/Collaboration.js +++ b/apps/documenteditor/mobile/app/controller/Collaboration.js @@ -55,7 +55,9 @@ define([ rootView, _isReviewOnly = false, _fileKey, - _canReview = false; + _canReview = false, + displayMode = "Markup", + arrChangeReview = []; return { models: [], @@ -75,6 +77,7 @@ define([ setApi: function(api) { this.api = api; + this.api.asc_registerCallback('asc_onShowRevisionsChange', _.bind(this.changeReview, this)); }, onLaunch: function () { @@ -159,16 +162,22 @@ define([ if ('#reviewing-settings-view' == pageId) { me.initReviewingSettingsView(); Common.Utils.addScrollIfNeed('.page[data-page=reviewing-settings-view]', '.page[data-page=reviewing-settings-view] .page-content'); - } else { - + } else if ('#display-mode-view' == pageId) { + me.initDisplayMode(); + Common.Utils.addScrollIfNeed('.page[data-page=display-mode-view]', '.page[data-page=display-mode-view] .page-content'); + } else if('#change-view' == pageId) { + me.initChange(); + Common.Utils.addScrollIfNeed('.page[data-page=change-view]', '.page[data-page=change-view] .page-content'); } }, initReviewingSettingsView: function () { var me = this; $('#settings-review input:checkbox').attr('checked', _isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes-" + (_fileKey || ''))); - $('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me)); + $('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me)); if (_isReviewOnly) $layour.find('#settings-review').addClass('disabled'); + $('#settings-accept-all').single('click', _.bind(me.onAcceptAllClick, me)); + $('#settings-reject-all').single('click', _.bind(me.onRejectAllClick, me)); }, onTrackChanges: function(e) { @@ -182,9 +191,360 @@ define([ } }, + onAcceptAllClick: function() { + if (this.api) { + this.api.asc_AcceptAllChanges(); + } + }, + + onRejectAllClick: function() { + if (this.api) { + this.api.asc_RejectAllChanges(); + } + }, + + initDisplayMode: function() { + var me = this; + $('input:radio').single('change', _.bind(me.onReviewViewClick, me)); + var value = displayMode; + if (value == null || value === "Markup") { + $('input[value="Markup"]').attr('checked', true); + } else if (value === 'Final') { + $('input[value="Final"]').attr('checked', true); + } else if (value === 'Original') { + $('input[value="Original"]').attr('checked', true); + } + }, + + onReviewViewClick: function(event) { + var value = $(event.currentTarget).val(); + this.turnDisplayMode(value); + }, + + turnDisplayMode: function(value) { + displayMode = value; + if (this.api) { + if (value === 'Final') + this.api.asc_BeginViewModeInReview(true); + + else if (value === 'Original') + this.api.asc_BeginViewModeInReview(false); + else + this.api.asc_EndViewModeInReview(); + } + }, + + initChange: function() { + if(arrChangeReview.length == 0) { + this.api.asc_GetNextRevisionsChange(); + } + $('#current-change #date-change').html(arrChangeReview[0]); + $('#current-change #user-name').html(arrChangeReview[1]); + $('#current-change #text-change').html(arrChangeReview[2]); + $('#btn-prev-change').single('click', _.bind(this.onPrevChange, this)); + $('#btn-next-change').single('click', _.bind(this.onNextChange, this)); + $('#btn-accept-change').single('click', _.bind(this.onAcceptCurrentChange, this)); + $('#btn-reject-change').single('click', _.bind(this.onRejectCurrentChange, this)); + + }, + + onPrevChange: function() { + this.api.asc_GetPrevRevisionsChange(); + this.updateInfoChange(); + }, + + onNextChange: function() { + this.api.asc_GetNextRevisionsChange(); + this.updateInfoChange(); + }, + + onAcceptCurrentChange: function() { + if (this.api) { + this.api.asc_AcceptChanges(); + } + this.updateInfoChange(); + }, + + onRejectCurrentChange: function() { + if (this.api) { + this.api.asc_RejectChanges(); + } + this.updateInfoChange(); + }, + + updateInfoChange: function() { + if(arrChangeReview.length == 0) { + $('#current-change #date-change').empty(); + $('#current-change #user-name').empty(); + $('#current-change #text-change').empty(); + } else { + this.initChange(); + } + }, + + changeReview: function (data) { + if (data && data.length>0) { + var me = this, arr = []; + _.each(data, function (item) { + var changetext = '', proptext = '', + value = item.get_Value(), + settings = false; + switch (item.get_Type()) { + case Asc.c_oAscRevisionsChangeType.TextAdd: + changetext = me.textInserted; + if (typeof value == 'object') { + _.each(value, function (obj) { + if (typeof obj === 'string') + changetext += (' ' + Common.Utils.String.htmlEncode(obj)); + else { + switch (obj) { + case 0: + changetext += (' <' + me.textImage + '>'); + break; + case 1: + changetext += (' <' + me.textShape + '>'); + break; + case 2: + changetext += (' <' + me.textChart + '>'); + break; + case 3: + changetext += (' <' + me.textEquation + '>'); + break; + } + } + }) + } else if (typeof value === 'string') { + changetext += (' ' + Common.Utils.String.htmlEncode(value)); + } + break; + case Asc.c_oAscRevisionsChangeType.TextRem: + changetext = me.textDeleted; + if (typeof value == 'object') { + _.each(value, function (obj) { + if (typeof obj === 'string') + changetext += (' ' + Common.Utils.String.htmlEncode(obj)); + else { + switch (obj) { + case 0: + changetext += (' <' + me.textImage + '>'); + break; + case 1: + changetext += (' <' + me.textShape + '>'); + break; + case 2: + changetext += (' <' + me.textChart + '>'); + break; + case 3: + changetext += (' <' + me.textEquation + '>'); + break; + } + } + }) + } else if (typeof value === 'string') { + changetext += (' ' + Common.Utils.String.htmlEncode(value)); + } + break; + case Asc.c_oAscRevisionsChangeType.ParaAdd: + changetext = me.textParaInserted; + break; + case Asc.c_oAscRevisionsChangeType.ParaRem: + changetext = me.textParaDeleted; + break; + case Asc.c_oAscRevisionsChangeType.TextPr: + changetext = '' + me.textFormatted; + if (value.Get_Bold() !== undefined) + proptext += ((value.Get_Bold() ? '' : me.textNot) + me.textBold + ', '); + if (value.Get_Italic() !== undefined) + proptext += ((value.Get_Italic() ? '' : me.textNot) + me.textItalic + ', '); + if (value.Get_Underline() !== undefined) + proptext += ((value.Get_Underline() ? '' : me.textNot) + me.textUnderline + ', '); + if (value.Get_Strikeout() !== undefined) + proptext += ((value.Get_Strikeout() ? '' : me.textNot) + me.textStrikeout + ', '); + if (value.Get_DStrikeout() !== undefined) + proptext += ((value.Get_DStrikeout() ? '' : me.textNot) + me.textDStrikeout + ', '); + if (value.Get_Caps() !== undefined) + proptext += ((value.Get_Caps() ? '' : me.textNot) + me.textCaps + ', '); + if (value.Get_SmallCaps() !== undefined) + proptext += ((value.Get_SmallCaps() ? '' : me.textNot) + me.textSmallCaps + ', '); + if (value.Get_VertAlign() !== undefined) + proptext += (((value.Get_VertAlign() == 1) ? me.textSuperScript : ((value.Get_VertAlign() == 2) ? me.textSubScript : me.textBaseline)) + ', '); + if (value.Get_Color() !== undefined) + proptext += (me.textColor + ', '); + if (value.Get_Highlight() !== undefined) + proptext += (me.textHighlight + ', '); + if (value.Get_Shd() !== undefined) + proptext += (me.textShd + ', '); + if (value.Get_FontFamily() !== undefined) + proptext += (value.Get_FontFamily() + ', '); + if (value.Get_FontSize() !== undefined) + proptext += (value.Get_FontSize() + ', '); + if (value.Get_Spacing() !== undefined) + proptext += (me.textSpacing + ' ' + Common.Utils.Metric.fnRecalcFromMM(value.Get_Spacing()).toFixed(2) + ' ' + Common.Utils.Metric.getCurrentMetricName() + ', '); + if (value.Get_Position() !== undefined) + proptext += (me.textPosition + ' ' + Common.Utils.Metric.fnRecalcFromMM(value.Get_Position()).toFixed(2) + ' ' + Common.Utils.Metric.getCurrentMetricName() + ', '); + if (value.Get_Lang() !== undefined) + proptext += (Common.util.LanguageInfo.getLocalLanguageName(value.Get_Lang())[1] + ', '); + + if (!_.isEmpty(proptext)) { + changetext += ': '; + proptext = proptext.substring(0, proptext.length - 2); + } + changetext += ''; + changetext += proptext; + break; + case Asc.c_oAscRevisionsChangeType.ParaPr: + changetext = '' + me.textParaFormatted; + if (value.Get_ContextualSpacing()) + proptext += ((value.Get_ContextualSpacing() ? me.textContextual : me.textNoContextual) + ', '); + if (value.Get_IndLeft() !== undefined) + proptext += (me.textIndentLeft + ' ' + Common.Utils.Metric.fnRecalcFromMM(value.Get_IndLeft()).toFixed(2) + ' ' + Common.Utils.Metric.getCurrentMetricName() + ', '); + if (value.Get_IndRight() !== undefined) + proptext += (me.textIndentRight + ' ' + Common.Utils.Metric.fnRecalcFromMM(value.Get_IndRight()).toFixed(2) + ' ' + Common.Utils.Metric.getCurrentMetricName() + ', '); + if (value.Get_IndFirstLine() !== undefined) + proptext += (me.textFirstLine + ' ' + Common.Utils.Metric.fnRecalcFromMM(value.Get_IndFirstLine()).toFixed(2) + ' ' + Common.Utils.Metric.getCurrentMetricName() + ', '); + if (value.Get_Jc() !== undefined) { + switch (value.Get_Jc()) { + case 0: + proptext += (me.textRight + ', '); + break; + case 1: + proptext += (me.textLeft + ', '); + break; + case 2: + proptext += (me.textCenter + ', '); + break; + case 3: + proptext += (me.textJustify + ', '); + break; + + } + } + if (value.Get_KeepLines() !== undefined) + proptext += ((value.Get_KeepLines() ? me.textKeepLines : me.textNoKeepLines) + ', '); + if (value.Get_KeepNext()) + proptext += ((value.Get_KeepNext() ? me.textKeepNext : me.textNoKeepNext) + ', '); + if (value.Get_PageBreakBefore()) + proptext += ((value.Get_PageBreakBefore() ? me.textBreakBefore : me.textNoBreakBefore) + ', '); + if (value.Get_SpacingLineRule() !== undefined && value.Get_SpacingLine() !== undefined) { + proptext += me.textLineSpacing; + proptext += (((value.Get_SpacingLineRule() == c_paragraphLinerule.LINERULE_LEAST) ? me.textAtLeast : ((value.Get_SpacingLineRule() == c_paragraphLinerule.LINERULE_AUTO) ? me.textMultiple : me.textExact)) + ' '); + proptext += (((value.Get_SpacingLineRule() == c_paragraphLinerule.LINERULE_AUTO) ? value.Get_SpacingLine() : Common.Utils.Metric.fnRecalcFromMM(value.Get_SpacingLine()).toFixed(2) + ' ' + Common.Utils.Metric.getCurrentMetricName()) + ', '); + } + if (value.Get_SpacingBeforeAutoSpacing()) + proptext += (me.textSpacingBefore + ' ' + me.textAuto + ', '); + else if (value.Get_SpacingBefore() !== undefined) + proptext += (me.textSpacingBefore + ' ' + Common.Utils.Metric.fnRecalcFromMM(value.Get_SpacingBefore()).toFixed(2) + ' ' + Common.Utils.Metric.getCurrentMetricName() + ', '); + if (value.Get_SpacingAfterAutoSpacing()) + proptext += (me.textSpacingAfter + ' ' + me.textAuto + ', '); + else if (value.Get_SpacingAfter() !== undefined) + proptext += (me.textSpacingAfter + ' ' + Common.Utils.Metric.fnRecalcFromMM(value.Get_SpacingAfter()).toFixed(2) + ' ' + Common.Utils.Metric.getCurrentMetricName() + ', '); + if (value.Get_WidowControl()) + proptext += ((value.Get_WidowControl() ? me.textWidow : me.textNoWidow) + ', '); + if (value.Get_Tabs() !== undefined) + proptext += proptext += (me.textTabs + ', '); + if (value.Get_NumPr() !== undefined) + proptext += proptext += (me.textNum + ', '); + if (value.Get_PStyle() !== undefined) { + var style = me.api.asc_GetStyleNameById(value.Get_PStyle()); + if (!_.isEmpty(style)) proptext += (style + ', '); + } + + if (!_.isEmpty(proptext)) { + changetext += ': '; + proptext = proptext.substring(0, proptext.length - 2); + } + changetext += ''; + changetext += proptext; + break; + + } + var date = (item.get_DateTime() == '') ? new Date() : new Date(item.get_DateTime()), + user = item.get_UserName(); + date = me.dateToLocaleTimeString(date); - text: '' + arr.push(date, user, changetext); + }); + arrChangeReview = arr; + } else { + arrChangeReview = []; + } + }, + + dateToLocaleTimeString: function (date) { + function format(date) { + var strTime, + hours = date.getHours(), + minutes = date.getMinutes(), + ampm = hours >= 12 ? 'pm' : 'am'; + + hours = hours % 12; + hours = hours ? hours : 12; // the hour '0' should be '12' + minutes = minutes < 10 ? '0'+minutes : minutes; + strTime = hours + ':' + minutes + ' ' + ampm; + + return strTime; + } + + // MM/dd/yyyy hh:mm AM + return (date.getMonth() + 1) + '/' + (date.getDate()) + '/' + date.getFullYear() + ' ' + format(date); + }, + + + + + textInserted: 'Inserted:
    ', + textDeleted: 'Deleted:
    ', + textParaInserted: 'Paragraph Inserted
    ', + textParaDeleted: 'Paragraph Deleted
    ', + textFormatted: 'Formatted', + textParaFormatted: 'Paragraph Formatted', + textNot: 'Not ', + textBold: 'Bold', + textItalic: 'Italic', + textStrikeout: 'Strikeout', + textUnderline: 'Underline', + textColor: 'Font color', + textBaseline: 'Baseline', + textSuperScript: 'Superscript', + textSubScript: 'Subscript', + textHighlight: 'Highlight color', + textSpacing: 'Spacing', + textDStrikeout: 'Double strikeout', + textCaps: 'All caps', + textSmallCaps: 'Small caps', + textPosition: 'Position', + textShd: 'Background color', + textContextual: 'Don\'t add interval between paragraphs of the same style', + textNoContextual: 'Add interval between paragraphs of the same style', + textIndentLeft: 'Indent left', + textIndentRight: 'Indent right', + textFirstLine: 'First line', + textRight: 'Align right', + textLeft: 'Align left', + textCenter: 'Align center', + textJustify: 'Align justify', + textBreakBefore: 'Page break before', + textKeepNext: 'Keep with next', + textKeepLines: 'Keep lines together', + textNoBreakBefore: 'No page break before', + textNoKeepNext: 'Don\'t keep with next', + textNoKeepLines: 'Don\'t keep lines together', + textLineSpacing: 'Line Spacing: ', + textMultiple: 'multiple', + textAtLeast: 'at least', + textExact: 'exactly', + textSpacingBefore: 'Spacing before', + textSpacingAfter: 'Spacing after', + textAuto: 'auto', + textWidow: 'Widow control', + textNoWidow: 'No widow control', + textTabs: 'Change tabs', + textNum: 'Change numbering', + textEquation: 'Equation', + textImage: 'Image', + textChart: 'Chart', + textShape: 'Shape' } })(), DE.Controllers.Collaboration || {})) diff --git a/apps/documenteditor/mobile/app/template/Collaboration.template b/apps/documenteditor/mobile/app/template/Collaboration.template index ffdd94803..53b61d022 100644 --- a/apps/documenteditor/mobile/app/template/Collaboration.template +++ b/apps/documenteditor/mobile/app/template/Collaboration.template @@ -23,18 +23,6 @@
  • -
  • - -
    -
    - -
    -
    -
    <%= scope.textСomments %>
    -
    -
    -
    -
  • @@ -71,6 +59,50 @@
    +
  • + +
    +
    + +
    +
    +
    <%= scope.textDisplayMode %>
    +
    +
    +
    +
  • +
  • + +
    +
    + +
    +
    +
    <%= scope.textChange %>
    +
    +
    +
    +
  • +
  • +
    +
    + +
    +
    +
    <%= scope.textAcceptAllChanges %>
    +
    +
    +
  • +
  • +
    +
    + +
    +
    +
    <%= scope.textRejectAllChanges %>
    +
    +
    +
  • @@ -78,4 +110,79 @@
    +
    + + +
    + +
    +
    +
    +
    +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    +
    + +
    +
    +
    +
    + + +
    + +
    +
    +
    +
    + + + Accept + Reject +
    +
    +

    +

    +

    +
    +
    +
    +
    \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/view/Collaboration.js b/apps/documenteditor/mobile/app/view/Collaboration.js index 0bb12a2d2..01d350e8e 100644 --- a/apps/documenteditor/mobile/app/view/Collaboration.js +++ b/apps/documenteditor/mobile/app/view/Collaboration.js @@ -147,6 +147,13 @@ define([ textСomments: 'Сomments', textBack: 'Back', textReview: 'Track Changes', + textAcceptAllChanges: 'Accept All Changes', + textRejectAllChanges: 'Reject All Changes', + textDisplayMode: 'Display Mode', + textMarkup: 'Markup', + textFinal: 'Final', + textOriginal: 'Original', + textChange: 'Change' } })(), DE.Views.Collaboration || {})) From f82711473165a08739fb23f4498ad3f11837370e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 17 May 2019 13:03:19 +0300 Subject: [PATCH 111/510] Refactoring --- apps/common/locale.js | 88 ------------------------------------------- 1 file changed, 88 deletions(-) diff --git a/apps/common/locale.js b/apps/common/locale.js index f96f2e5cf..3e3bdda3b 100644 --- a/apps/common/locale.js +++ b/apps/common/locale.js @@ -38,25 +38,6 @@ Common.Locale = new(function() { "use strict"; var l10n = {}; - // var _createXMLHTTPObject = function() { - // var xmlhttp; - // try { - // xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); - // } - // catch (e) { - // try { - // xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); - // } - // catch (E) { - // xmlhttp = false; - // } - // } - // if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { - // xmlhttp = new XMLHttpRequest(); - // } - // return xmlhttp; - // }; - var _applyLocalization = function() { try { for (var prop in l10n) { @@ -97,55 +78,6 @@ Common.Locale = new(function() { return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); }; - // { - // let lang = (_getUrlParameterByName('lang') || 'en').split(/[\-_]/)[0]; - // let httpGet = function(url) { - // return new Promise( - // function (resolve, reject) { - // var request = new XMLHttpRequest(); - // request.onload = function() { - // if ( this.readyState === 4 ) - // if ( this.status == 200 ) { - // resolve(this.responseText); - // } else { - // resolve('failed'); - // } - // else reject('error: ' + this.readyState); - // }; - // request.onerror = function () { - // reject(new Error( - // 'XMLHttpRequest Error: '+this.statusText)); - // }; - // request.open('GET', url); - // request.send(null); - // }); - // } - // - // httpGet('locale/' + lang + '.json') - // .then(function(result) { - // // console.log('httpget result: ' + result); - // - // if ( result == 'failed' ) { - // if ( lang != 'en' ) - // return httpGet('locale/en.json'); - // - // return result; - // } - // - // return result; - // }).then(function(result) { - // if (result == 'failed') - // throw new Error('server error'); - // else { - // let _l10n = JSON.parse(result); - // // console.log('ok: ' + _l10n); - // console.log('ok: '); - // } - // }).catch(function(e) { - // console.log('httpget error: ' + e); - // }); - // } - var _requireLang = function () { var lang = (_getUrlParameterByName('lang') || 'en').split(/[\-_]/)[0]; fetch('locale/' + lang + '.json') @@ -181,26 +113,6 @@ Common.Locale = new(function() { require(['../vendor/fetch/fetch.umd'], _requireLang); } else _requireLang(); - try { - // var langParam = _getUrlParameterByName('lang'); - // var xhrObj = _createXMLHTTPObject(); - // if (xhrObj && langParam) { - // var lang = langParam.split(/[\-\_]/)[0]; - // xhrObj.open('GET', 'locale/' + lang + '.json', false); - // xhrObj.send(''); - // l10n = eval("(" + xhrObj.responseText + ")"); - // } - } - catch (e) { - try { - // xhrObj.open('GET', 'locale/en.json', false); - // xhrObj.send(''); - // l10n = eval("(" + xhrObj.responseText + ")"); - } - catch (e) { - } - } - return { apply: _applyLocalization, get: _get From 1723da332490171e53bf381fc8a0ed2c2484c9ab Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 17 May 2019 15:00:52 +0300 Subject: [PATCH 112/510] [DE mobile] Add check for mode = review into collaboration settings --- .../mobile/app/controller/Collaboration.js | 29 +++++++++++-------- .../app/template/Collaboration.template | 4 +-- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Collaboration.js b/apps/documenteditor/mobile/app/controller/Collaboration.js index daf3ba54e..0962553f0 100644 --- a/apps/documenteditor/mobile/app/controller/Collaboration.js +++ b/apps/documenteditor/mobile/app/controller/Collaboration.js @@ -53,9 +53,6 @@ define([ var _settings = [], _headerType = 1, rootView, - _isReviewOnly = false, - _fileKey, - _canReview = false, displayMode = "Markup", arrChangeReview = []; @@ -84,10 +81,9 @@ define([ this.createView('Collaboration').render(); }, - setMode: function (mode) { - _isReviewOnly = mode.isReviewOnly; - _fileKey = mode.fileKey; - _canReview = mode.canReview; + setMode: function(mode) { + this.appConfig = mode; + return this; }, @@ -173,21 +169,25 @@ define([ initReviewingSettingsView: function () { var me = this; - $('#settings-review input:checkbox').attr('checked', _isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes-" + (_fileKey || ''))); + $('#settings-review input:checkbox').attr('checked', this.appConfig.isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes")); $('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me)); - if (_isReviewOnly) $layour.find('#settings-review').addClass('disabled'); $('#settings-accept-all').single('click', _.bind(me.onAcceptAllClick, me)); $('#settings-reject-all').single('click', _.bind(me.onRejectAllClick, me)); + if(this.appConfig.isReviewOnly) { + $('#settings-accept-all').addClass('disabled'); + $('#settings-reject-all').addClass('disabled'); + $('#settings-review').addClass('disabled'); + } }, onTrackChanges: function(e) { var $checkbox = $(e.currentTarget), state = $checkbox.is(':checked'); - if ( _isReviewOnly ) { + if ( this.appConfig.isReviewOnly ) { $checkbox.attr('checked', true); - } else if ( _canReview ) { + } else { this.api.asc_SetTrackRevisions(state); - Common.localStorage.setItem("de-mobile-track-changes-" + (_fileKey || ''), state ? 1 : 0); + Common.localStorage.setItem("de-mobile-track-changes", state ? 1 : 0); } }, @@ -234,6 +234,7 @@ define([ } }, + initChange: function() { if(arrChangeReview.length == 0) { this.api.asc_GetNextRevisionsChange(); @@ -245,6 +246,10 @@ define([ $('#btn-next-change').single('click', _.bind(this.onNextChange, this)); $('#btn-accept-change').single('click', _.bind(this.onAcceptCurrentChange, this)); $('#btn-reject-change').single('click', _.bind(this.onRejectCurrentChange, this)); + if(!this.appConfig.isReviewOnly) { + $('#btn-accept-change').removeClass('disabled'); + $('#btn-reject-change').removeClass('disabled'); + } }, diff --git a/apps/documenteditor/mobile/app/template/Collaboration.template b/apps/documenteditor/mobile/app/template/Collaboration.template index 53b61d022..1cda4cd3c 100644 --- a/apps/documenteditor/mobile/app/template/Collaboration.template +++ b/apps/documenteditor/mobile/app/template/Collaboration.template @@ -174,8 +174,8 @@

    From 4f9d1e85f3887790b771f7a5f54d9275e7e795d5 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 17 May 2019 17:18:56 +0300 Subject: [PATCH 113/510] [DE mobile] Add styles collaboration. --- .../resources/less/ios/_collaboration.less | 54 +++++++++++++++++++ .../less/material/_collaboration.less | 54 +++++++++++++++++++ .../mobile/app/controller/Collaboration.js | 5 ++ .../app/template/Collaboration.template | 20 ++++--- .../mobile/resources/css/app-ios.css | 51 ++++++++++++++++++ .../mobile/resources/css/app-material.css | 50 +++++++++++++++++ .../mobile/resources/less/app-ios.less | 1 + .../mobile/resources/less/app-material.less | 1 + 8 files changed, 228 insertions(+), 8 deletions(-) create mode 100644 apps/common/mobile/resources/less/ios/_collaboration.less create mode 100644 apps/common/mobile/resources/less/material/_collaboration.less diff --git a/apps/common/mobile/resources/less/ios/_collaboration.less b/apps/common/mobile/resources/less/ios/_collaboration.less new file mode 100644 index 000000000..98b14edf7 --- /dev/null +++ b/apps/common/mobile/resources/less/ios/_collaboration.less @@ -0,0 +1,54 @@ +.page-change { + .block-description { + background-color: #fff; + padding-top: 15px; + padding-bottom: 15px; + margin: 0; + } + #user-name { + font-size: 17px; + line-height: 22px; + color: #000000; + margin: 0; + } + #date-change { + font-size: 14px; + line-height: 18px; + color: #8C8C8C; + margin: 0; + margin-top: 3px; + } + #text-change { + color: #000000; + font-size: 15px; + line-height: 18px; + margin: 0; + margin-top: 10px; + } + .block-btn { + display: flex; + flex-direction: row; + justify-content: space-around; + margin: 26px 0; + + #btn-next-change, #btn-reject-change { + margin-left: 20px; + } + + .link { + height: 48px; + width: 48px; + display: inline-block; + .icon { + background-position: center; + height: 48px; + width: 48px; + } + } + } +} +.navbar .center-collaboration { + display: flex; + justify-content: space-around; + margin-left: 45px; +} \ No newline at end of file diff --git a/apps/common/mobile/resources/less/material/_collaboration.less b/apps/common/mobile/resources/less/material/_collaboration.less new file mode 100644 index 000000000..1bc3ca662 --- /dev/null +++ b/apps/common/mobile/resources/less/material/_collaboration.less @@ -0,0 +1,54 @@ +.page-change { + .block-description { + background-color: #fff; + padding-top: 15px; + padding-bottom: 15px; + margin: 0; + } + #user-name { + font-size: 17px; + line-height: 22px; + color: #000000; + margin: 0; + } + #date-change { + font-size: 14px; + line-height: 18px; + color: #8C8C8C; + margin: 0; + margin-top: 3px; + } + #text-change { + color: #000000; + font-size: 15px; + line-height: 18px; + margin: 0; + margin-top: 10px; + } + .block-btn { + display: flex; + flex-direction: row; + justify-content: space-around; + margin: 0; + padding: 26px 0; + background-color: #EFEFF4; + + #btn-next-change, #btn-reject-change { + margin-left: 20px; + } + + .link { + display: inline-block; + + .icon { + background-position: center; + height: 48px; + width: 48px; + } + } + } +} +.navbar .center-collaboration { + text-align: center; + margin-left: 54px; +} \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/controller/Collaboration.js b/apps/documenteditor/mobile/app/controller/Collaboration.js index 0962553f0..cd47d56f3 100644 --- a/apps/documenteditor/mobile/app/controller/Collaboration.js +++ b/apps/documenteditor/mobile/app/controller/Collaboration.js @@ -239,6 +239,9 @@ define([ if(arrChangeReview.length == 0) { this.api.asc_GetNextRevisionsChange(); } + if(arrChangeReview.length == 0) { + $('#current-change').css('display','none'); + } $('#current-change #date-change').html(arrChangeReview[0]); $('#current-change #user-name').html(arrChangeReview[1]); $('#current-change #text-change').html(arrChangeReview[2]); @@ -282,7 +285,9 @@ define([ $('#current-change #date-change').empty(); $('#current-change #user-name').empty(); $('#current-change #text-change').empty(); + $('#current-change').css('display','none'); } else { + $('#current-change').css('display','block'); this.initChange(); } }, diff --git a/apps/documenteditor/mobile/app/template/Collaboration.template b/apps/documenteditor/mobile/app/template/Collaboration.template index 1cda4cd3c..0581f4343 100644 --- a/apps/documenteditor/mobile/app/template/Collaboration.template +++ b/apps/documenteditor/mobile/app/template/Collaboration.template @@ -2,7 +2,7 @@
    @@ -169,15 +169,19 @@
    -
    +
    -
    - - - Accept - Reject +
    + + + + + + + +
    -
    +

    diff --git a/apps/documenteditor/mobile/resources/css/app-ios.css b/apps/documenteditor/mobile/resources/css/app-ios.css index 635aa35b5..8e0e18863 100644 --- a/apps/documenteditor/mobile/resources/css/app-ios.css +++ b/apps/documenteditor/mobile/resources/css/app-ios.css @@ -6264,6 +6264,57 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after margin-left: 20px; color: #212121; } +.page-change .block-description { + background-color: #fff; + padding-top: 15px; + padding-bottom: 15px; + margin: 0; +} +.page-change #user-name { + font-size: 17px; + line-height: 22px; + color: #000000; + margin: 0; +} +.page-change #date-change { + font-size: 14px; + line-height: 18px; + color: #8C8C8C; + margin: 0; + margin-top: 3px; +} +.page-change #text-change { + color: #000000; + font-size: 15px; + line-height: 18px; + margin: 0; + margin-top: 10px; +} +.page-change .block-btn { + display: flex; + flex-direction: row; + justify-content: space-around; + margin: 26px 0; +} +.page-change .block-btn #btn-next-change, +.page-change .block-btn #btn-reject-change { + margin-left: 20px; +} +.page-change .block-btn .link { + height: 48px; + width: 48px; + display: inline-block; +} +.page-change .block-btn .link .icon { + background-position: center; + height: 48px; + width: 48px; +} +.navbar .center-collaboration { + display: flex; + justify-content: space-around; + margin-left: 45px; +} .tablet .searchbar.document.replace .center .searchbar:first-child { margin-right: 10px; } diff --git a/apps/documenteditor/mobile/resources/css/app-material.css b/apps/documenteditor/mobile/resources/css/app-material.css index 6fe7b8da6..ccd260710 100644 --- a/apps/documenteditor/mobile/resources/css/app-material.css +++ b/apps/documenteditor/mobile/resources/css/app-material.css @@ -5863,6 +5863,56 @@ html.phone .document-menu .list-block .item-link { margin-left: 20px; color: #212121; } +.page-change .block-description { + background-color: #fff; + padding-top: 15px; + padding-bottom: 15px; + margin: 0; +} +.page-change #user-name { + font-size: 17px; + line-height: 22px; + color: #000000; + margin: 0; +} +.page-change #date-change { + font-size: 14px; + line-height: 18px; + color: #8C8C8C; + margin: 0; + margin-top: 3px; +} +.page-change #text-change { + color: #000000; + font-size: 15px; + line-height: 18px; + margin: 0; + margin-top: 10px; +} +.page-change .block-btn { + display: flex; + flex-direction: row; + justify-content: space-around; + margin: 0; + padding: 26px 0; + background-color: #EFEFF4; +} +.page-change .block-btn #btn-next-change, +.page-change .block-btn #btn-reject-change { + margin-left: 20px; +} +.page-change .block-btn .link { + display: inline-block; +} +.page-change .block-btn .link .icon { + background-position: center; + height: 48px; + width: 48px; +} +.navbar .center-collaboration { + text-align: center; + margin-left: 54px; +} .tablet .searchbar.document.replace .center > .replace { display: flex; } diff --git a/apps/documenteditor/mobile/resources/less/app-ios.less b/apps/documenteditor/mobile/resources/less/app-ios.less index 4b6a4d160..f36d5fc97 100644 --- a/apps/documenteditor/mobile/resources/less/app-ios.less +++ b/apps/documenteditor/mobile/resources/less/app-ios.less @@ -72,6 +72,7 @@ input, textarea { @import url('../../../../common/mobile/resources/less/ios/_color-palette.less'); @import url('../../../../common/mobile/resources/less/ios/_about.less'); @import url('../../../../common/mobile/resources/less/ios/_color-schema.less'); +@import url('../../../../common/mobile/resources/less/ios/_collaboration.less'); @import url('ios/_search.less'); diff --git a/apps/documenteditor/mobile/resources/less/app-material.less b/apps/documenteditor/mobile/resources/less/app-material.less index 87cbc32a5..37a4adfd3 100644 --- a/apps/documenteditor/mobile/resources/less/app-material.less +++ b/apps/documenteditor/mobile/resources/less/app-material.less @@ -54,6 +54,7 @@ @import url('../../../../common/mobile/resources/less/material/_color-palette.less'); @import url('../../../../common/mobile/resources/less/material/_about.less'); @import url('../../../../common/mobile/resources/less/material/_color-schema.less'); +@import url('../../../../common/mobile/resources/less/material/_collaboration.less'); @import url('material/_search.less'); @import url('material/_icons.less'); From a0337e4302634e384306b1cf5741329097f601ea Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 17 May 2019 18:56:58 +0300 Subject: [PATCH 114/510] [DE mobile] Add button exit modal window, delete track changes from settings. --- .../mobile/app/controller/Collaboration.js | 8 +++++--- .../mobile/app/controller/Settings.js | 13 ------------- .../mobile/app/template/Collaboration.template | 3 +++ .../mobile/app/template/Settings.template | 16 ---------------- 4 files changed, 8 insertions(+), 32 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Collaboration.js b/apps/documenteditor/mobile/app/controller/Collaboration.js index cd47d56f3..9877ad798 100644 --- a/apps/documenteditor/mobile/app/controller/Collaboration.js +++ b/apps/documenteditor/mobile/app/controller/Collaboration.js @@ -54,7 +54,8 @@ define([ _headerType = 1, rootView, displayMode = "Markup", - arrChangeReview = []; + arrChangeReview = [], + _fileKey; return { models: [], @@ -83,6 +84,7 @@ define([ setMode: function(mode) { this.appConfig = mode; + _fileKey = mode.fileKey; return this; }, @@ -169,7 +171,7 @@ define([ initReviewingSettingsView: function () { var me = this; - $('#settings-review input:checkbox').attr('checked', this.appConfig.isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes")); + $('#settings-review input:checkbox').attr('checked', this.appConfig.isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes-" + (_fileKey || ''))); $('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me)); $('#settings-accept-all').single('click', _.bind(me.onAcceptAllClick, me)); $('#settings-reject-all').single('click', _.bind(me.onRejectAllClick, me)); @@ -187,7 +189,7 @@ define([ $checkbox.attr('checked', true); } else { this.api.asc_SetTrackRevisions(state); - Common.localStorage.setItem("de-mobile-track-changes", state ? 1 : 0); + Common.localStorage.setItem("de-mobile-track-changes-" + (_fileKey || ''), state ? 1 : 0); } }, diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index 49f377c25..ffdc04af3 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -243,10 +243,8 @@ define([ Common.Utils.addScrollIfNeed('.page[data-page=margin-view]', '.page[data-page=margin-view] .page-content'); } else { $('#settings-readermode input:checkbox').attr('checked', Common.SharedSettings.get('readerMode')); - $('#settings-review input:checkbox').attr('checked', _isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes-" + (_fileKey || ''))); $('#settings-search').single('click', _.bind(me.onSearch, me)); $('#settings-readermode input:checkbox').single('change', _.bind(me.onReaderMode, me)); - $('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me)); $('#settings-help').single('click', _.bind(me.onShowHelp, me)); $('#settings-download').single('click', _.bind(me.onDownloadOrigin, me)); $('#settings-print').single('click', _.bind(me.onPrint, me)); @@ -470,17 +468,6 @@ define([ this.api && this.api.asc_pluginRun("asc.{B631E142-E40B-4B4C-90B9-2D00222A286E}", 0); }, - onTrackChanges: function(e) { - var $checkbox = $(e.currentTarget), - state = $checkbox.is(':checked'); - if ( _isReviewOnly ) { - $checkbox.attr('checked', true); - } else if ( _canReview ) { - this.api.asc_SetTrackRevisions(state); - Common.localStorage.setItem("de-mobile-track-changes-" + (_fileKey || ''), state ? 1 : 0); - } - }, - onShowHelp: function () { window.open('{{SUPPORT_URL}}', "_blank"); this.hideModal(); diff --git a/apps/documenteditor/mobile/app/template/Collaboration.template b/apps/documenteditor/mobile/app/template/Collaboration.template index 0581f4343..af3fbdf5b 100644 --- a/apps/documenteditor/mobile/app/template/Collaboration.template +++ b/apps/documenteditor/mobile/app/template/Collaboration.template @@ -36,6 +36,7 @@
    @@ -118,6 +119,7 @@
    @@ -166,6 +168,7 @@
    diff --git a/apps/documenteditor/mobile/app/template/Settings.template b/apps/documenteditor/mobile/app/template/Settings.template index 3c0dfa3ea..41deaec18 100644 --- a/apps/documenteditor/mobile/app/template/Settings.template +++ b/apps/documenteditor/mobile/app/template/Settings.template @@ -55,22 +55,6 @@ <% } %> -
  • -
    -
    - -
    -
    -
    <%= scope.textReview %>
    -
    - -
    -
    -
    -
  • From 4c3e134b1187a95eaaeb023e9eb9038ac05238e5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 20 May 2019 12:08:55 +0300 Subject: [PATCH 115/510] [SSE] Header/Footer: scroll canvas to top when select different pages --- .../main/app/view/HeaderFooterDialog.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index ec003b4d6..7403f82d0 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -701,6 +701,12 @@ define([ } }, + scrollerScrollTop: function() { + for (var name in this.scrollers) { + this.scrollers[name] && this.scrollers[name].scrollTop(0); + } + }, + onCanvasClick: function(id, event){ if (!this.HFObject) return; id = id || '#header-left-img'; @@ -817,7 +823,6 @@ define([ } }, - onTextColor: function() { var mnuTextColorPicker = this.mnuTextColorPicker[this.isFooter ? 1 : 0]; mnuTextColorPicker.trigger('select', mnuTextColorPicker, mnuTextColorPicker.currentColor, true); @@ -836,7 +841,8 @@ define([ onPageTypeToggle: function(type, btn, state) { if (state && this.HFObject) { this.HFObject.switchHeaderFooterType(type); - this.onCanvasClick(this.currentCanvas); + this.scrollerScrollTop(); + this.onCanvasClick(this.currentCanvas, undefined, true); } }, From 039d15c233a545b569a3ef53a8d368fe4620e249 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Tue, 21 May 2019 11:00:00 +0300 Subject: [PATCH 116/510] [DE mobile] Fix disabled settings when change Display Mode --- .../mobile/app/controller/Collaboration.js | 37 +++++++++++++------ .../mobile/app/controller/Settings.js | 9 +++++ .../mobile/app/controller/Toolbar.js | 11 +++++- .../app/template/Collaboration.template | 4 +- 4 files changed, 46 insertions(+), 15 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Collaboration.js b/apps/documenteditor/mobile/app/controller/Collaboration.js index 9877ad798..a7302470c 100644 --- a/apps/documenteditor/mobile/app/controller/Collaboration.js +++ b/apps/documenteditor/mobile/app/controller/Collaboration.js @@ -129,8 +129,7 @@ define([ '
    ' + '
    ' + '
  • ' + - '
    ', - $$('#toolbar-edit') + '
    ' ); } @@ -175,10 +174,14 @@ define([ $('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me)); $('#settings-accept-all').single('click', _.bind(me.onAcceptAllClick, me)); $('#settings-reject-all').single('click', _.bind(me.onRejectAllClick, me)); - if(this.appConfig.isReviewOnly) { + if(this.appConfig.isReviewOnly || displayMode == "Final" || displayMode == "Original" ) { $('#settings-accept-all').addClass('disabled'); $('#settings-reject-all').addClass('disabled'); $('#settings-review').addClass('disabled'); + } else { + $('#settings-accept-all').removeClass('disabled'); + $('#settings-reject-all').removeClass('disabled'); + $('#settings-review').removeClass('disabled'); } }, @@ -218,6 +221,10 @@ define([ } }, + getDisplayMode: function() { + return displayMode; + }, + onReviewViewClick: function(event) { var value = $(event.currentTarget).val(); this.turnDisplayMode(value); @@ -234,6 +241,8 @@ define([ else this.api.asc_EndViewModeInReview(); } + this.initReviewingSettingsView(); + DE.getController('Toolbar').setDisplayMode(value); }, @@ -251,9 +260,15 @@ define([ $('#btn-next-change').single('click', _.bind(this.onNextChange, this)); $('#btn-accept-change').single('click', _.bind(this.onAcceptCurrentChange, this)); $('#btn-reject-change').single('click', _.bind(this.onRejectCurrentChange, this)); - if(!this.appConfig.isReviewOnly) { - $('#btn-accept-change').removeClass('disabled'); - $('#btn-reject-change').removeClass('disabled'); + if(this.appConfig.isReviewOnly) { + $('#btn-accept-change').addClass('disabled'); + $('#btn-reject-change').addClass('disabled'); + } + if(displayMode == "Final" || displayMode == "Original") { + $('#btn-accept-change').addClass('disabled'); + $('#btn-reject-change').addClass('disabled'); + $('#btn-prev-change').addClass('disabled'); + $('#btn-next-change').addClass('disabled'); } }, @@ -505,12 +520,12 @@ define([ - textInserted: 'Inserted:
    ', - textDeleted: 'Deleted:
    ', - textParaInserted: 'Paragraph Inserted
    ', - textParaDeleted: 'Paragraph Deleted
    ', + textInserted: 'Inserted:', + textDeleted: 'Deleted:', + textParaInserted: 'Paragraph Inserted ', + textParaDeleted: 'Paragraph Deleted ', textFormatted: 'Formatted', - textParaFormatted: 'Paragraph Formatted', + textParaFormatted: 'Paragraph Formatted', textNot: 'Not ', textBold: 'Bold', textItalic: 'Italic', diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index ffdc04af3..bf6192291 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -249,6 +249,10 @@ define([ $('#settings-download').single('click', _.bind(me.onDownloadOrigin, me)); $('#settings-print').single('click', _.bind(me.onPrint, me)); $('#settings-collaboration').single('click', _.bind(me.clickCollaboration, me)); + var _stateDisplayMode = DE.getController('Collaboration').getDisplayMode(); + if(_stateDisplayMode == "Final" || _stateDisplayMode == "Original") { + $('#settings-document').addClass('disabled'); + } } }, @@ -331,6 +335,11 @@ define([ var value = Common.localStorage.getItem('de-mobile-settings-unit'); value = (value!==null) ? parseInt(value) : Common.Utils.Metric.getDefaultMetric(); $unitMeasurement.val([value]); + var _stateDisplayMode = DE.getController('Collaboration').getDisplayMode(); + if(_stateDisplayMode == "Final" || _stateDisplayMode == "Original") { + $('#settings-no-characters').addClass('disabled'); + $('#settings-hidden-borders').addClass('disabled'); + } }, initPageDocumentSettings: function () { diff --git a/apps/documenteditor/mobile/app/controller/Toolbar.js b/apps/documenteditor/mobile/app/controller/Toolbar.js index e1d1ed5b4..1bbb6344a 100644 --- a/apps/documenteditor/mobile/app/controller/Toolbar.js +++ b/apps/documenteditor/mobile/app/controller/Toolbar.js @@ -51,7 +51,8 @@ define([ DE.Controllers.Toolbar = Backbone.Controller.extend(_.extend((function() { // private - var _backUrl; + var _backUrl, + stateDisplayMode = false; return { models: [], @@ -149,6 +150,12 @@ define([ } }, + setDisplayMode: function(displayMode) { + stateDisplayMode = displayMode == "Final" || displayMode == "Original" ? true : false; + var selected = this.api.getSelectedElements(); + this.onApiFocusObject(selected); + }, + onApiFocusObject: function (objects) { if (this.isDisconnected) return; @@ -159,7 +166,7 @@ define([ topObjectValue = topObject.get_ObjectValue(), objectLocked = _.isFunction(topObjectValue.get_Locked) ? topObjectValue.get_Locked() : false; - $('#toolbar-add, #toolbar-edit').toggleClass('disabled', objectLocked); + $('#toolbar-add, #toolbar-edit').toggleClass('disabled', objectLocked || stateDisplayMode); } }, diff --git a/apps/documenteditor/mobile/app/template/Collaboration.template b/apps/documenteditor/mobile/app/template/Collaboration.template index af3fbdf5b..ad199f58f 100644 --- a/apps/documenteditor/mobile/app/template/Collaboration.template +++ b/apps/documenteditor/mobile/app/template/Collaboration.template @@ -180,8 +180,8 @@ - - + +
    From 3eb99a778a8c8867b1258ba8f2fdc686ef771212 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Tue, 21 May 2019 11:02:03 +0300 Subject: [PATCH 117/510] [DE mobile] Fix text --- apps/common/mobile/resources/less/ios/_collaboration.less | 2 +- apps/common/mobile/resources/less/material/_collaboration.less | 2 +- apps/documenteditor/mobile/app/view/Collaboration.js | 2 +- apps/documenteditor/mobile/resources/css/app-ios.css | 2 +- apps/documenteditor/mobile/resources/css/app-material.css | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/common/mobile/resources/less/ios/_collaboration.less b/apps/common/mobile/resources/less/ios/_collaboration.less index 98b14edf7..442a8a4d1 100644 --- a/apps/common/mobile/resources/less/ios/_collaboration.less +++ b/apps/common/mobile/resources/less/ios/_collaboration.less @@ -14,7 +14,7 @@ #date-change { font-size: 14px; line-height: 18px; - color: #8C8C8C; + color: #6d6d72; margin: 0; margin-top: 3px; } diff --git a/apps/common/mobile/resources/less/material/_collaboration.less b/apps/common/mobile/resources/less/material/_collaboration.less index 1bc3ca662..1652b4ec4 100644 --- a/apps/common/mobile/resources/less/material/_collaboration.less +++ b/apps/common/mobile/resources/less/material/_collaboration.less @@ -14,7 +14,7 @@ #date-change { font-size: 14px; line-height: 18px; - color: #8C8C8C; + color: #6d6d72; margin: 0; margin-top: 3px; } diff --git a/apps/documenteditor/mobile/app/view/Collaboration.js b/apps/documenteditor/mobile/app/view/Collaboration.js index 01d350e8e..c7ad39177 100644 --- a/apps/documenteditor/mobile/app/view/Collaboration.js +++ b/apps/documenteditor/mobile/app/view/Collaboration.js @@ -143,7 +143,7 @@ define([ textCollaboration: 'Collaboration', - textReviewing: 'Reviewing', + textReviewing: 'Review', textСomments: 'Сomments', textBack: 'Back', textReview: 'Track Changes', diff --git a/apps/documenteditor/mobile/resources/css/app-ios.css b/apps/documenteditor/mobile/resources/css/app-ios.css index 8e0e18863..b600fd1d2 100644 --- a/apps/documenteditor/mobile/resources/css/app-ios.css +++ b/apps/documenteditor/mobile/resources/css/app-ios.css @@ -6279,7 +6279,7 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after .page-change #date-change { font-size: 14px; line-height: 18px; - color: #8C8C8C; + color: #6d6d72; margin: 0; margin-top: 3px; } diff --git a/apps/documenteditor/mobile/resources/css/app-material.css b/apps/documenteditor/mobile/resources/css/app-material.css index ccd260710..ce43babc0 100644 --- a/apps/documenteditor/mobile/resources/css/app-material.css +++ b/apps/documenteditor/mobile/resources/css/app-material.css @@ -5878,7 +5878,7 @@ html.phone .document-menu .list-block .item-link { .page-change #date-change { font-size: 14px; line-height: 18px; - color: #8C8C8C; + color: #6d6d72; margin: 0; margin-top: 3px; } From 2d8059a61d67be56178344806de6ca4390c15183 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 21 May 2019 13:02:55 +0300 Subject: [PATCH 118/510] Plugins refactoring --- apps/common/main/lib/controller/Plugins.js | 178 +++++++++++++----- .../main/app/controller/Main.js | 21 ++- apps/documenteditor/main/index.html | 2 +- apps/documenteditor/main/index.html.deploy | 2 +- .../main/app/controller/Main.js | 21 ++- apps/presentationeditor/main/index.html | 2 +- .../presentationeditor/main/index.html.deploy | 2 +- .../main/app/controller/Main.js | 22 ++- apps/spreadsheeteditor/main/index.html | 2 +- apps/spreadsheeteditor/main/index.html.deploy | 2 +- 10 files changed, 180 insertions(+), 74 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index f64bbb731..c7be9642c 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -105,27 +105,26 @@ define([ loadConfig: function(data) { var me = this; - me.appOptions.lang = data.config.lang; - me.appOptions.plugins = data.config.plugins; - me.appOptions.editor = !!window.DE ? 'word' : !!window.PE ? 'slide' : 'cell'; + me.configPlugins = data.config.plugins; + me.editor = !!window.DE ? 'word' : !!window.PE ? 'slide' : 'cell'; + }, - if ( me.appOptions.plugins ) { - me.plugins.autostart = me.appOptions.plugins.autostart; - me.getAppConfigPlugins(me.appOptions.plugins); - } + loadPlugins: function() { + if (this.configPlugins && this.configPlugins.pluginsData && this.configPlugins.pluginsData.length>0) + this.getAppConfigPlugins(this.configPlugins, false); + else + this.plugins.configpluginsdata = false; - var server_plugins_url = '../../../../plugins.json'; + var server_plugins_url = '../../../../plugins.json', + me = this; Common.Utils.loadConfig(server_plugins_url, function (obj) { if ( obj != 'error' ) { - me.plugins.autostart = _.union(me.plugins.autostart, obj.autostart); me.getServerPlugins(obj); } }); }, onAppShowed: function (config) { - this.appOptions.isEdit = config.isEdit; - // this.appOptions.canPlugins = config.canPlugins; }, setApi: function(api) { @@ -137,28 +136,30 @@ define([ this.api.asc_registerCallback("asc_onPluginMouseUp", _.bind(this.onPluginMouseUp, this)); this.api.asc_registerCallback("asc_onPluginMouseMove", _.bind(this.onPluginMouseMove, this)); this.api.asc_registerCallback('asc_onPluginsReset', _.bind(this.resetPluginsList, this)); - // this.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me)); + this.api.asc_registerCallback('asc_onPluginsInit', _.bind(this.parsePlugins, this)); /** * sometime plugins info from server can be received after * AppShowed event, so try to parse info there **/ - if ( this.plugins.serverpluginsdata == undefined ) { - console.log('set api: plugins data from server is late') - } else - if ( this.plugins.serverpluginsdata === false ) { - console.log('set api: error for plugins data from server'); - } else { - this.parsePlugins(this.plugins.serverpluginsdata); - } - - if ( this.appOptions.canPlugins ) - this.refreshPluginsList(); + // if ( this.plugins.serverpluginsdata == undefined ) { + // console.log('set api: plugins data from server is late') + // } else + // if ( this.plugins.serverpluginsdata === false ) { + // console.log('set api: error for plugins data from server'); + // } else { + // this.parsePlugins(this.plugins.serverpluginsdata); + // } + this.loadPlugins(); return this; }, setMode: function(mode) { + this.appOptions = mode; + this.customPluginsComplete = !this.appOptions.canBrandingExt; + if (this.appOptions.canBrandingExt) + this.getAppCustomPlugins(this.configPlugins); return this; }, @@ -462,18 +463,20 @@ define([ applyUICustomization: function () { var me = this; - if ( me.plugins.uicustom ) { + if ( me.customPluginsComplete && me.plugins.uicustom ) { me.plugins.uicustom.forEach(function (c) { if ( c.code ) eval(c.code); }); + return true; } + return false; }, - parsePlugins: function(pluginsdata, silent/*, uiCustomize*/) { + parsePlugins: function(pluginsdata, uiCustomize) { var me = this; var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'), isEdit = me.appOptions.isEdit, - editor = me.appOptions.editor; + editor = me.editor; if ( pluginsdata instanceof Array ) { var arr = [], arrUI = [], lang = me.appOptions.lang.split(/[\-_]/)[0]; @@ -539,12 +542,10 @@ define([ } }); - // if ( uiCustomize!==false ) // from ui customizer in editor config or desktop event - // this.UICustomizePlugins = arrUI; - if ( arrUI.length ) - me.plugins.uicustom = _.union(me.plugins.uicustom, arrUI); + if ( uiCustomize!==false ) // from ui customizer in editor config or desktop event + me.plugins.uicustom = arrUI; - // if ( !uiCustomize && pluginStore) + if ( !uiCustomize && pluginStore) { arr = pluginStore.models.concat(arr); arr.sort(function(a, b){ @@ -556,20 +557,21 @@ define([ return (rank_b==0) ? -1 : 1; return 0; }); - pluginStore.reset(arr, {silent: !!silent}); - // this.appOptions.canPlugins = !pluginStore.isEmpty(); + pluginStore.reset(arr); + this.appOptions.canPlugins = !pluginStore.isEmpty(); } } - // else if (!uiCustomize){ - // this.appOptions.canPlugins = false; - // } + else if (!uiCustomize){ + this.appOptions.canPlugins = false; + } - // if (!uiCustomize) - // this.getApplication().getController('LeftMenu').enablePlugins(); + if (!uiCustomize) + this.getApplication().getController('LeftMenu').enablePlugins(); - // if (this.appOptions.canPlugins) { - // this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions).runAutoStartPlugins(plugins.autostart); - // } + if (this.appOptions.canPlugins) { + this.refreshPluginsList(); + this.runAutoStartPlugins(); + } }, getServerPlugins: function (config) { @@ -586,6 +588,26 @@ define([ })).then(function(values) { me.plugins.serverpluginsdata = values; // console.log('server plugins data received'); + var autostart = []; + if (values.length>0) { + var val = config.autostart || config.autoStartGuid; + if (typeof (val) == 'string') + val = [val]; + config.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); + autostart = val || []; + } + if (me.plugins.configpluginsdata === undefined) { + // loading config plugins + me.plugins.autostart = autostart; + } else if (me.plugins.configpluginsdata===false) { + //load only server plugins + me.plugins.autostart = autostart; + me.parsePlugins(me.plugins.serverpluginsdata, false); + } else { + me.plugins.autostart = me.plugins.autostart.concat(autostart); + me.parsePlugins((me.plugins.configpluginsdata ? me.plugins.configpluginsdata : []).concat(me.plugins.serverpluginsdata ? me.plugins.serverpluginsdata : []), false); + } + }).catch(function(e) { me.plugins.serverpluginsdata = false; console.log('getServerPlugins error: ' + e.message); @@ -593,11 +615,55 @@ define([ }, getAppConfigPlugins: function (config) { - if ( config.UIpluginsData ) { + var me = this; + Promise.all(config.pluginsData.map(function(url) { + return fetch(url) + .then(function(response) { + if ( response.ok ) return response.json(); + else return 'error'; + }).then(function(json) { + json.baseUrl = url.substring(0, url.lastIndexOf("config.json")); + return json; + }); + })).then(function(values) { + me.plugins.configpluginsdata = values; + var autostart = []; + if (values.length>0) { + var val = config.autostart || config.autoStartGuid; + if (typeof (val) == 'string') + val = [val]; + config.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); + autostart = val || []; + } + + // console.log('config plugins data received'); + if (me.plugins.serverpluginsdata === undefined) { + // loading server plugins + me.plugins.autostart = autostart; + } else if (me.plugins.serverpluginsdata===false) { + //load only config plugins + me.plugins.autostart = autostart; + me.parsePlugins(me.plugins.configpluginsdata, false); + } else { + me.plugins.autostart = autostart.concat(me.plugins.autostart); + me.parsePlugins((me.plugins.configpluginsdata ? me.plugins.configpluginsdata : []).concat(me.plugins.serverpluginsdata ? me.plugins.serverpluginsdata : []), false); + } + + }).catch(function(e) { + me.plugins.configpluginsdata = false; + console.log('getServerPlugins error: ' + e.message); + }); + }, + + getAppCustomPlugins: function (config) { + if ( config && config.UIpluginsData ) { var me = this; Promise.all(config.UIpluginsData.map(function(url) { return fetch(url) - .then(function(response) {return response.json();}) + .then(function(response) { + // console.log('1: ' + response); + return response.json(); + }) .then(function(json) { json.baseUrl = url.substring(0, url.lastIndexOf("config.json")); return json; @@ -606,17 +672,31 @@ define([ me.parsePlugins(values, true); if ( me.plugins.uicustom ) { - me.plugins.uicustom.forEach(function (c) { - fetch(c.url) - .then(function (response) {return response.text();}) - .then(function (text) {c.code = text;}); + Promise.all(me.plugins.uicustom.map(function(c) { + return fetch(c.url) + .then(function(response) { + // console.log('2: ' + response); + return response.text(); + }) + .then(function(text) { + // console.log('3: ' + text); + c.code = text; + return text; + }); + })).then(function(values) { + me.customPluginsComplete = true; + }).catch(function(e) { + console.log('error: ' + e.message); + me.customPluginsComplete = true; }); } }).catch(function(e) { console.log('error: ' + e.message); + me.customPluginsComplete = true; }); - } - }, + } else + this.customPluginsComplete = true; + } }, Common.Controllers.Plugins || {})); }); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index a069c83fd..6863c13f0 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -953,9 +953,9 @@ define([ application.getController('Common.Controllers.ExternalMergeEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization}); pluginsController.setApi(me.api); - if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) - pluginsController.runAutoStartPlugins(); - leftmenuController.enablePlugins(); + // if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) + // pluginsController.runAutoStartPlugins(); + // leftmenuController.enablePlugins(); documentHolderController.setApi(me.api); documentHolderController.createDelayedElements(); @@ -1186,6 +1186,7 @@ define([ this.appOptions.canRename && appHeader.setCanRename(true); this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); + this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); this.applyModeCommonElements(); this.applyModeEditorElements(); @@ -1661,6 +1662,7 @@ define([ }, hidePreloader: function() { + var UICustomizationComplete = true; if (!this._state.customizationDone) { this._state.customizationDone = true; if (this.appOptions.customization) { @@ -1672,14 +1674,21 @@ define([ Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); - this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); + UICustomizationComplete = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); } } Common.NotificationCenter.trigger('layout:changed', 'main'); - $('#loading-mask').hide().remove(); - Common.Controllers.Desktop.process('preloader:hide'); + var me = this; + var timer_sl = setInterval(function() { + (!UICustomizationComplete) && (UICustomizationComplete = me.getApplication().getController('Common.Controllers.Plugins').applyUICustomization()); + if (UICustomizationComplete) { + clearInterval(timer_sl); + $('#loading-mask').hide().remove(); + Common.Controllers.Desktop.process('preloader:hide'); + } + }, 10); }, onDownloadUrl: function(url) { diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index 442aff941..5254ed0f1 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -19,7 +19,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 100; + z-index: 10000; } .loader-page { diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy index b02b7ed29..46fafdc1a 100644 --- a/apps/documenteditor/main/index.html.deploy +++ b/apps/documenteditor/main/index.html.deploy @@ -20,7 +20,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 100; + z-index: 10000; } .loader-page { diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 6d20583d7..3e2154b79 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -704,9 +704,9 @@ define([ application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization}); pluginsController.setApi(me.api); - if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) - pluginsController.runAutoStartPlugins(); - leftmenuController.enablePlugins(); + // if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) + // pluginsController.runAutoStartPlugins(); + // leftmenuController.enablePlugins(); documentHolderController.setApi(me.api); documentHolderController.createDelayedElements(); @@ -917,6 +917,7 @@ define([ this.appOptions.canRename && appHeader.setCanRename(true); this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); + this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); this.applyModeCommonElements(); this.applyModeEditorElements(); @@ -1386,6 +1387,7 @@ define([ }, hidePreloader: function() { + var UICustomizationComplete = true; if (!this._state.customizationDone) { this._state.customizationDone = true; if (this.appOptions.customization) { @@ -1397,14 +1399,21 @@ define([ Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); - this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); + UICustomizationComplete = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); } } Common.NotificationCenter.trigger('layout:changed', 'main'); - $('#loading-mask').hide().remove(); - Common.Controllers.Desktop.process('preloader:hide'); + var me = this; + var timer_sl = setInterval(function() { + (!UICustomizationComplete) && (UICustomizationComplete = me.getApplication().getController('Common.Controllers.Plugins').applyUICustomization()); + if (UICustomizationComplete) { + clearInterval(timer_sl); + $('#loading-mask').hide().remove(); + Common.Controllers.Desktop.process('preloader:hide'); + } + }, 10); }, onDownloadUrl: function(url) { diff --git a/apps/presentationeditor/main/index.html b/apps/presentationeditor/main/index.html index 58e91ad76..2562c817e 100644 --- a/apps/presentationeditor/main/index.html +++ b/apps/presentationeditor/main/index.html @@ -18,7 +18,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 100; + z-index: 10000; } .loader-page { diff --git a/apps/presentationeditor/main/index.html.deploy b/apps/presentationeditor/main/index.html.deploy index 8a9e7601a..0972d760f 100644 --- a/apps/presentationeditor/main/index.html.deploy +++ b/apps/presentationeditor/main/index.html.deploy @@ -20,7 +20,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 100; + z-index: 10000; } .loader-page { diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 49cb7a07c..037e0c2ef 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -682,9 +682,9 @@ define([ if (!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram) { pluginsController.setApi(me.api); - if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) - pluginsController.runAutoStartPlugins(); - leftmenuController.enablePlugins(); + // if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) + // pluginsController.runAutoStartPlugins(); + // leftmenuController.enablePlugins(); } leftMenuView.disableMenu('all',false); @@ -941,6 +941,7 @@ define([ if (!this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge) { this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); + this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); } this.applyModeCommonElements(); @@ -1519,6 +1520,7 @@ define([ }, hidePreloader: function() { + var UICustomizationComplete = true; if (!this._state.customizationDone) { this._state.customizationDone = true; if (this.appOptions.customization) { @@ -1530,15 +1532,21 @@ define([ Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); - this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); + UICustomizationComplete = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); } } this.stackLongActions.pop({id: InitApplication, type: Asc.c_oAscAsyncActionType.BlockInteraction}); Common.NotificationCenter.trigger('layout:changed', 'main'); - $('#loading-mask').hide().remove(); - - Common.Controllers.Desktop.process('preloader:hide'); + var me = this; + var timer_sl = setInterval(function() { + (!UICustomizationComplete) && (UICustomizationComplete = me.getApplication().getController('Common.Controllers.Plugins').applyUICustomization()); + if (UICustomizationComplete) { + clearInterval(timer_sl); + $('#loading-mask').hide().remove(); + Common.Controllers.Desktop.process('preloader:hide'); + } + }, 10); }, onDownloadUrl: function(url) { diff --git a/apps/spreadsheeteditor/main/index.html b/apps/spreadsheeteditor/main/index.html index ad8587846..4bf6f8c5c 100644 --- a/apps/spreadsheeteditor/main/index.html +++ b/apps/spreadsheeteditor/main/index.html @@ -17,7 +17,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 100; + z-index: 10000; } .loader-page { diff --git a/apps/spreadsheeteditor/main/index.html.deploy b/apps/spreadsheeteditor/main/index.html.deploy index b220fe864..53415f73d 100644 --- a/apps/spreadsheeteditor/main/index.html.deploy +++ b/apps/spreadsheeteditor/main/index.html.deploy @@ -19,7 +19,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 100; + z-index: 10000; } .loader-page { From 0d74c6d33415c49d30337423d6269be4ba4292f5 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Tue, 21 May 2019 17:43:42 +0300 Subject: [PATCH 119/510] [DE mobile] Review: add delete current change in review mode and fix update description current change. --- .../mobile/app/controller/Collaboration.js | 58 +++++++++++-------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Collaboration.js b/apps/documenteditor/mobile/app/controller/Collaboration.js index a7302470c..35c1a6cdc 100644 --- a/apps/documenteditor/mobile/app/controller/Collaboration.js +++ b/apps/documenteditor/mobile/app/controller/Collaboration.js @@ -55,6 +55,7 @@ define([ rootView, displayMode = "Markup", arrChangeReview = [], + dateChange = [], _fileKey; return { @@ -97,8 +98,6 @@ define([ uiApp.closeModal(); - /*me._showByStack(Common.SharedSettings.get('phone'));*/ - if (Common.SharedSettings.get('phone')) { modalView = $$(uiApp.pickerModal( '
    ' + @@ -129,7 +128,8 @@ define([ '
    ' + '
    ' + '
    ' + - '
    ' + '
    ', + $$('#toolbar-settings') ); } @@ -252,17 +252,20 @@ define([ } if(arrChangeReview.length == 0) { $('#current-change').css('display','none'); + } else { + $('#current-change #date-change').html(arrChangeReview[0].date); + $('#current-change #user-name').html(arrChangeReview[0].user); + $('#current-change #text-change').html(arrChangeReview[0].changetext); } - $('#current-change #date-change').html(arrChangeReview[0]); - $('#current-change #user-name').html(arrChangeReview[1]); - $('#current-change #text-change').html(arrChangeReview[2]); $('#btn-prev-change').single('click', _.bind(this.onPrevChange, this)); $('#btn-next-change').single('click', _.bind(this.onNextChange, this)); $('#btn-accept-change').single('click', _.bind(this.onAcceptCurrentChange, this)); $('#btn-reject-change').single('click', _.bind(this.onRejectCurrentChange, this)); if(this.appConfig.isReviewOnly) { - $('#btn-accept-change').addClass('disabled'); - $('#btn-reject-change').addClass('disabled'); + $('#btn-accept-change').remove(); + $('#btn-reject-change').remove(); + $('.accept-reject').html('
    '); + $('#btn-delete-change').single('click', _.bind(this.onDeleteChange, this)); } if(displayMode == "Final" || displayMode == "Original") { $('#btn-accept-change').addClass('disabled'); @@ -275,37 +278,37 @@ define([ onPrevChange: function() { this.api.asc_GetPrevRevisionsChange(); - this.updateInfoChange(); }, onNextChange: function() { this.api.asc_GetNextRevisionsChange(); - this.updateInfoChange(); }, onAcceptCurrentChange: function() { if (this.api) { - this.api.asc_AcceptChanges(); + this.api.asc_AcceptChanges(dateChange[0]); } - this.updateInfoChange(); + this.api.asc_GetNextRevisionsChange(); }, onRejectCurrentChange: function() { if (this.api) { - this.api.asc_RejectChanges(); + this.api.asc_RejectChanges(dateChange[0]); } - this.updateInfoChange(); + this.api.asc_GetNextRevisionsChange(); }, updateInfoChange: function() { - if(arrChangeReview.length == 0) { - $('#current-change #date-change').empty(); - $('#current-change #user-name').empty(); - $('#current-change #text-change').empty(); - $('#current-change').css('display','none'); - } else { - $('#current-change').css('display','block'); - this.initChange(); + if($("[data-page=change-view]").length > 0) { + if (arrChangeReview.length == 0) { + $('#current-change #date-change').empty(); + $('#current-change #user-name').empty(); + $('#current-change #text-change').empty(); + $('#current-change').css('display', 'none'); + } else { + $('#current-change').css('display', 'block'); + this.initChange(); + } } }, @@ -490,12 +493,15 @@ define([ date = me.dateToLocaleTimeString(date); - arr.push(date, user, changetext); + arr.push({date: date, user: user, changetext: changetext}); }); arrChangeReview = arr; + dateChange = data; } else { arrChangeReview = []; + dateChange = []; } + this.updateInfoChange(); }, dateToLocaleTimeString: function (date) { @@ -517,6 +523,12 @@ define([ return (date.getMonth() + 1) + '/' + (date.getDate()) + '/' + date.getFullYear() + ' ' + format(date); }, + onDeleteChange: function() { + if (this.api) { + this.api.asc_RejectChanges(dateChange[0]); + } + }, + From 6f0c48fc5e8cb79f569db1190591d41758dc636d Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 22 May 2019 09:59:21 +0300 Subject: [PATCH 120/510] [DE mobile] Add check canReview --- apps/documenteditor/mobile/app/controller/Collaboration.js | 4 ++++ apps/documenteditor/mobile/app/controller/Settings.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/apps/documenteditor/mobile/app/controller/Collaboration.js b/apps/documenteditor/mobile/app/controller/Collaboration.js index 35c1a6cdc..bccdf31c6 100644 --- a/apps/documenteditor/mobile/app/controller/Collaboration.js +++ b/apps/documenteditor/mobile/app/controller/Collaboration.js @@ -165,6 +165,10 @@ define([ } else if('#change-view' == pageId) { me.initChange(); Common.Utils.addScrollIfNeed('.page[data-page=change-view]', '.page[data-page=change-view] .page-content'); + } else { + if(!this.appConfig.canReview) { + $('#reviewing-settings').hide(); + } } }, diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index bf6192291..c9dce5c1d 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -253,6 +253,9 @@ define([ if(_stateDisplayMode == "Final" || _stateDisplayMode == "Original") { $('#settings-document').addClass('disabled'); } + if(!_canReview) { + $('#settings-collaboration').hide(); + } } }, From 88ee14544c156dbe8fbb52c030d7ee5412eda7eb Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 22 May 2019 10:20:49 +0300 Subject: [PATCH 121/510] [DE mobile] Change review --- .../mobile/app/controller/DocumentHolder.js | 53 ++----------------- 1 file changed, 3 insertions(+), 50 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/DocumentHolder.js b/apps/documenteditor/mobile/app/controller/DocumentHolder.js index a5541cfa1..9eb1b5516 100644 --- a/apps/documenteditor/mobile/app/controller/DocumentHolder.js +++ b/apps/documenteditor/mobile/app/controller/DocumentHolder.js @@ -148,26 +148,10 @@ define([ return true; } }); - } else if ('accept' == eventName) { - me.api.asc_GetNextRevisionsChange(); - me.api.asc_AcceptChanges(); - } else if ('acceptall' == eventName) { - me.api.asc_AcceptAllChanges(); - } else if ('reject' == eventName) { - me.api.asc_GetNextRevisionsChange(); - me.api.asc_RejectChanges(); - } else if ('rejectall' == eventName) { - me.api.asc_RejectAllChanges(); } else if ('review' == eventName) { - if (Common.SharedSettings.get('phone')) { - _actionSheets = me._initReviewMenu(); - me.onContextMenuClick(view, 'showActionSheet'); - } else { - _.delay(function () { - _view.showMenu(me._initReviewMenu(), _menuPos[0] || 0, _menuPos[1] || 0); - _timer = (new Date).getTime(); - }, 100); - } + var getCollaboration = DE.getController('Collaboration'); + getCollaboration.showModal(); + getCollaboration.getView('Collaboration').showPage('#reviewing-settings-view'); } else if ('showActionSheet' == eventName && _actionSheets.length > 0) { _.delay(function () { _.each(_actionSheets, function (action) { @@ -536,33 +520,6 @@ define([ return menuItems; }, - _initReviewMenu: function (stack) { - var me = this, - menuItems = []; - - menuItems.push({ - caption: me.menuAccept, - event: 'accept' - }); - - menuItems.push({ - caption: me.menuReject, - event: 'reject' - }); - - menuItems.push({ - caption: me.menuAcceptAll, - event: 'acceptall' - }); - - menuItems.push({ - caption: me.menuRejectAll, - event: 'rejectall' - }); - - return menuItems; - }, - onCoAuthoringDisconnect: function() { this.isDisconnected = true; }, @@ -581,10 +538,6 @@ define([ menuMore: 'More', sheetCancel: 'Cancel', menuReview: 'Review', - menuAccept: 'Accept', - menuAcceptAll: 'Accept All', - menuReject: 'Reject', - menuRejectAll: 'Reject All', menuMerge: 'Merge Cells', menuSplit: 'Split Cell', menuDeleteTable: 'Delete Table' From 840bd61c4b6b6ac7a1d868d79ba89fccb08c8305 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 22 May 2019 11:44:45 +0300 Subject: [PATCH 122/510] [DE mobile] Remove animation when review open --- .../mobile/app/controller/DocumentHolder.js | 2 +- apps/documenteditor/mobile/app/view/Collaboration.js | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/DocumentHolder.js b/apps/documenteditor/mobile/app/controller/DocumentHolder.js index 9eb1b5516..2e126ea84 100644 --- a/apps/documenteditor/mobile/app/controller/DocumentHolder.js +++ b/apps/documenteditor/mobile/app/controller/DocumentHolder.js @@ -151,7 +151,7 @@ define([ } else if ('review' == eventName) { var getCollaboration = DE.getController('Collaboration'); getCollaboration.showModal(); - getCollaboration.getView('Collaboration').showPage('#reviewing-settings-view'); + getCollaboration.getView('Collaboration').showPage('#reviewing-settings-view', false); } else if ('showActionSheet' == eventName && _actionSheets.length > 0) { _.delay(function () { _.each(_actionSheets, function (action) { diff --git a/apps/documenteditor/mobile/app/view/Collaboration.js b/apps/documenteditor/mobile/app/view/Collaboration.js index c7ad39177..ed19a7e40 100644 --- a/apps/documenteditor/mobile/app/view/Collaboration.js +++ b/apps/documenteditor/mobile/app/view/Collaboration.js @@ -118,7 +118,7 @@ define([ return ''; }, - showPage: function(templateId, suspendEvent) { + showPage: function(templateId, animate) { var rootView = DE.getController('Collaboration').rootView(); if (rootView && this.layout) { @@ -130,18 +130,16 @@ define([ } rootView.router.load({ - content: $content.html() + content: $content.html(), + animatePages: animate !== false }); - if (suspendEvent !== true) { - this.fireEvent('page:show', [this, templateId]); - } + this.fireEvent('page:show', [this, templateId]); } }, - textCollaboration: 'Collaboration', textReviewing: 'Review', textСomments: 'Сomments', From ee7f41196bdeffca5333e0a3288a3ba596ea9915 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 22 May 2019 12:45:38 +0300 Subject: [PATCH 123/510] [DE mobile] Add translate --- apps/documenteditor/mobile/locale/en.json | 70 +++++++++++++++++++++-- 1 file changed, 65 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 910a5c3ab..9d21aa9c4 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -14,8 +14,6 @@ "DE.Controllers.AddTable.textColumns": "Columns", "DE.Controllers.AddTable.textRows": "Rows", "DE.Controllers.AddTable.textTableSize": "Table Size", - "DE.Controllers.DocumentHolder.menuAccept": "Accept", - "DE.Controllers.DocumentHolder.menuAcceptAll": "Accept All", "DE.Controllers.DocumentHolder.menuAddLink": "Add Link", "DE.Controllers.DocumentHolder.menuCopy": "Copy", "DE.Controllers.DocumentHolder.menuCut": "Cut", @@ -24,8 +22,6 @@ "DE.Controllers.DocumentHolder.menuMore": "More", "DE.Controllers.DocumentHolder.menuOpenLink": "Open Link", "DE.Controllers.DocumentHolder.menuPaste": "Paste", - "DE.Controllers.DocumentHolder.menuReject": "Reject", - "DE.Controllers.DocumentHolder.menuRejectAll": "Reject All", "DE.Controllers.DocumentHolder.menuReview": "Review", "DE.Controllers.DocumentHolder.sheetCancel": "Cancel", "DE.Controllers.DocumentHolder.textGuest": "Guest", @@ -185,6 +181,58 @@ "DE.Controllers.Toolbar.dlgLeaveTitleText": "You leave the application", "DE.Controllers.Toolbar.leaveButtonText": "Leave this Page", "DE.Controllers.Toolbar.stayButtonText": "Stay on this Page", + "DE.Controllers.Collaboration.textInserted": "Inserted:", + "DE.Controllers.Collaboration.textDeleted": ",Deleted:", + "DE.Controllers.Collaboration.textParaInserted": ",Paragraph Inserted", + "DE.Controllers.Collaboration.textParaDeleted": ",Paragraph Deleted", + "DE.Controllers.Collaboration.textFormatted": "Formatted", + "DE.Controllers.Collaboration.textParaFormatted": ",Paragraph Formatted", + "DE.Controllers.Collaboration.textNot": "Not", + "DE.Controllers.Collaboration.textBold": "Bold", + "DE.Controllers.Collaboration.textItalic": "Italic", + "DE.Controllers.Collaboration.textStrikeout": "Strikeout", + "DE.Controllers.Collaboration.textUnderline": "Underline", + "DE.Controllers.Collaboration.textColor": "Font color", + "DE.Controllers.Collaboration.textBaseline": "Baseline", + "DE.Controllers.Collaboration.textSuperScript": "Superscript", + "DE.Controllers.Collaboration.textSubScript": "Subscript", + "DE.Controllers.Collaboration.textHighlight": "Highlight color", + "DE.Controllers.Collaboration.textSpacing": "Spacing", + "DE.Controllers.Collaboration.textDStrikeout": "Double strikeout", + "DE.Controllers.Collaboration.textCaps": "All caps", + "DE.Controllers.Collaboration.textSmallCaps": "Small caps", + "DE.Controllers.Collaboration.textPosition": "Position", + "DE.Controllers.Collaboration.textShd": "Background color", + "DE.Controllers.Collaboration.textContextual": "Don\'t add interval between paragraphs of the same style", + "DE.Controllers.Collaboration.textNoContextual": "Add interval between paragraphs of the same style", + "DE.Controllers.Collaboration.textIndentLeft": "Indent left", + "DE.Controllers.Collaboration.textIndentRight": "Indent right", + "DE.Controllers.Collaboration.textFirstLine": "First line", + "DE.Controllers.Collaboration.textRight": "Align right", + "DE.Controllers.Collaboration.textLeft": "Align left", + "DE.Controllers.Collaboration.textCenter": "Align center", + "DE.Controllers.Collaboration.textJustify": "Align justify", + "DE.Controllers.Collaboration.textBreakBefore": "Page break before", + "DE.Controllers.Collaboration.textKeepNext": "Keep with next", + "DE.Controllers.Collaboration.textKeepLines": "Keep lines together", + "DE.Controllers.Collaboration.textNoBreakBefore": "No page break before", + "DE.Controllers.Collaboration.textNoKeepNext": "Don\'t keep with next", + "DE.Controllers.Collaboration.textNoKeepLines": "Don\'t keep lines together", + "DE.Controllers.Collaboration.textLineSpacing": "Line Spacing: ", + "DE.Controllers.Collaboration.textMultiple": "multiple", + "DE.Controllers.Collaboration.textAtLeast": "at least", + "DE.Controllers.Collaboration.textExact": "exactly", + "DE.Controllers.Collaboration.textSpacingBefore": "Spacing before", + "DE.Controllers.Collaboration.textSpacingAfter": "Spacing after", + "DE.Controllers.Collaboration.textAuto": "auto", + "DE.Controllers.Collaboration.textWidow": "Widow control", + "DE.Controllers.Collaboration.textNoWidow": "No widow control", + "DE.Controllers.Collaboration.textTabs": "Change tabs", + "DE.Controllers.Collaboration.textNum": "Change numbering", + "DE.Controllers.Collaboration.textEquation": "Equation", + "DE.Controllers.Collaboration.textImage": "Image", + "DE.Controllers.Collaboration.textChart": "Chart", + "DE.Controllers.Collaboration.textShape": "Shape", "DE.Views.AddImage.textAddress": "Address", "DE.Views.AddImage.textBack": "Back", "DE.Views.AddImage.textFromLibrary": "Picture from Library", @@ -428,5 +476,17 @@ "DE.Views.Settings.textColorSchemes": "Color Schemes", "DE.Views.Settings.textNoCharacters": "Nonprinting Characters", "DE.Views.Settings.textHiddenTableBorders": "Hidden Table Borders", - "DE.Views.Toolbar.textBack": "Back" + "DE.Views.Toolbar.textBack": "Back", + "DE.Views.Collaboration.textCollaboration": "Collaboration", + "DE.Views.Collaboration.textReviewing": "Review", + "DE.Views.Collaboration.textСomments": "Сomments", + "DE.Views.Collaboration.textBack": "Back", + "DE.Views.Collaboration.textReview": "Track Changes", + "DE.Views.Collaboration.textAcceptAllChanges": "Accept All Changes", + "DE.Views.Collaboration.textRejectAllChanges": "Reject All Changes", + "DE.Views.Collaboration.textDisplayMode": "Display Mode", + "DE.Views.Collaboration.textMarkup": "Markup", + "DE.Views.Collaboration.textFinal": "Final", + "DE.Views.Collaboration.textOriginal": "Original", + "DE.Views.Collaboration.textChange": "Change" } \ No newline at end of file From 06d71b464b06ae40dd22dc3f47d830d39a2aa5f7 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 22 May 2019 14:44:30 +0300 Subject: [PATCH 124/510] Fix loading plugins --- apps/common/main/lib/controller/Plugins.js | 257 ++++++++---------- .../main/app/controller/Main.js | 5 - .../main/app/controller/Main.js | 5 - .../main/app/controller/Main.js | 5 - 4 files changed, 117 insertions(+), 155 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index c7be9642c..78b5983ae 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -46,7 +46,8 @@ define([ Common.Controllers.Plugins = Backbone.Controller.extend(_.extend({ models: [], appOptions: {}, - plugins: { autostart:[] }, + configPlugins: {autostart:[]},// {config: 'from editor config', plugins: 'loaded plugins', UIplugins: 'loaded customization plugins', autostart: 'autostart guids'} + serverPlugins: {autostart:[]},// {config: 'from editor config', plugins: 'loaded plugins', autostart: 'autostart guids'} collections: [ 'Common.Collections.Plugins' ], @@ -97,7 +98,7 @@ define([ this._moveOffset = {x:0, y:0}; - this.autostart = null; + this.autostart = []; Common.Gateway.on('init', this.loadConfig.bind(this)); Common.NotificationCenter.on('app:face', this.onAppShowed.bind(this)); @@ -105,22 +106,42 @@ define([ loadConfig: function(data) { var me = this; - me.configPlugins = data.config.plugins; + me.configPlugins.config = data.config.plugins; me.editor = !!window.DE ? 'word' : !!window.PE ? 'slide' : 'cell'; }, loadPlugins: function() { - if (this.configPlugins && this.configPlugins.pluginsData && this.configPlugins.pluginsData.length>0) - this.getAppConfigPlugins(this.configPlugins, false); - else - this.plugins.configpluginsdata = false; + if (this.configPlugins.config) { + this.getPlugins(this.configPlugins.config.pluginsData) + .then(function(loaded) + { + me.configPlugins.plugins = loaded; + me.mergePlugins(); + }) + .catch(function(err) + { + me.configPlugins.plugins = false; + }); + } else + this.configPlugins.plugins = false; var server_plugins_url = '../../../../plugins.json', me = this; Common.Utils.loadConfig(server_plugins_url, function (obj) { if ( obj != 'error' ) { - me.getServerPlugins(obj); - } + me.serverPlugins.config = obj; + me.getPlugins(me.serverPlugins.config.pluginsData) + .then(function(loaded) + { + me.serverPlugins.plugins = loaded; + me.mergePlugins(); + }) + .catch(function(err) + { + me.serverPlugins.plugins = false; + }); + } else + me.serverPlugins.plugins = false; }); }, @@ -138,19 +159,6 @@ define([ this.api.asc_registerCallback('asc_onPluginsReset', _.bind(this.resetPluginsList, this)); this.api.asc_registerCallback('asc_onPluginsInit', _.bind(this.parsePlugins, this)); - /** - * sometime plugins info from server can be received after - * AppShowed event, so try to parse info there - **/ - // if ( this.plugins.serverpluginsdata == undefined ) { - // console.log('set api: plugins data from server is late') - // } else - // if ( this.plugins.serverpluginsdata === false ) { - // console.log('set api: error for plugins data from server'); - // } else { - // this.parsePlugins(this.plugins.serverpluginsdata); - // } - this.loadPlugins(); return this; }, @@ -409,7 +417,7 @@ define([ else if (this.panelPlugins.iframePlugin) this.panelPlugins.closeInsideMode(); this.panelPlugins.closedPluginMode(plugin.get_Guid()); - this.runAutoStartPlugins(this.autostart); + this.runAutoStartPlugins(); }, onPluginResize: function(size, minSize, maxSize, callback ) { @@ -448,12 +456,9 @@ define([ Common.NotificationCenter.trigger('frame:mousemove', { pageX: x*Common.Utils.zoom()+this._moveOffset.x, pageY: y*Common.Utils.zoom()+this._moveOffset.y }); }, - runAutoStartPlugins: function(autostart) { - autostart = this.plugins.autostart; - if (autostart && autostart.length > 0) { - // var guid = autostart.shift(); - // this.autostart = autostart; - this.api.asc_pluginRun(autostart.shift(), 0, ''); + runAutoStartPlugins: function() { + if (this.autostart && this.autostart.length > 0) { + this.api.asc_pluginRun(this.autostart.shift(), 0, ''); } }, @@ -462,9 +467,8 @@ define([ }, applyUICustomization: function () { - var me = this; - if ( me.customPluginsComplete && me.plugins.uicustom ) { - me.plugins.uicustom.forEach(function (c) { + if ( this.customPluginsComplete && this.configPlugins.UIplugins ) { + this.configPlugins.UIplugins.forEach(function (c) { if ( c.code ) eval(c.code); }); return true; @@ -543,7 +547,7 @@ define([ }); if ( uiCustomize!==false ) // from ui customizer in editor config or desktop event - me.plugins.uicustom = arrUI; + me.configPlugins.UIplugins = arrUI; if ( !uiCustomize && pluginStore) { @@ -574,129 +578,102 @@ define([ } }, - getServerPlugins: function (config) { - var me = this; - Promise.all(config.pluginsData.map(function(url) { - return fetch(url) - .then(function(response) { - if ( response.ok ) return response.json(); - else return 'error'; - }).then(function(json) { - json.baseUrl = url.substring(0, url.lastIndexOf("config.json")); - return json; - }); - })).then(function(values) { - me.plugins.serverpluginsdata = values; - // console.log('server plugins data received'); - var autostart = []; - if (values.length>0) { - var val = config.autostart || config.autoStartGuid; - if (typeof (val) == 'string') - val = [val]; - config.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); - autostart = val || []; - } - if (me.plugins.configpluginsdata === undefined) { - // loading config plugins - me.plugins.autostart = autostart; - } else if (me.plugins.configpluginsdata===false) { - //load only server plugins - me.plugins.autostart = autostart; - me.parsePlugins(me.plugins.serverpluginsdata, false); - } else { - me.plugins.autostart = me.plugins.autostart.concat(autostart); - me.parsePlugins((me.plugins.configpluginsdata ? me.plugins.configpluginsdata : []).concat(me.plugins.serverpluginsdata ? me.plugins.serverpluginsdata : []), false); - } + getPlugins: function(pluginsData, fetchFunction) { + if (!pluginsData || pluginsData.length<1) + return Promise.reject(); - }).catch(function(e) { - me.plugins.serverpluginsdata = false; - console.log('getServerPlugins error: ' + e.message); - }); - }, - - getAppConfigPlugins: function (config) { - var me = this; - Promise.all(config.pluginsData.map(function(url) { - return fetch(url) - .then(function(response) { - if ( response.ok ) return response.json(); - else return 'error'; - }).then(function(json) { - json.baseUrl = url.substring(0, url.lastIndexOf("config.json")); - return json; - }); - })).then(function(values) { - me.plugins.configpluginsdata = values; - var autostart = []; - if (values.length>0) { - var val = config.autostart || config.autoStartGuid; - if (typeof (val) == 'string') - val = [val]; - config.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); - autostart = val || []; - } - - // console.log('config plugins data received'); - if (me.plugins.serverpluginsdata === undefined) { - // loading server plugins - me.plugins.autostart = autostart; - } else if (me.plugins.serverpluginsdata===false) { - //load only config plugins - me.plugins.autostart = autostart; - me.parsePlugins(me.plugins.configpluginsdata, false); - } else { - me.plugins.autostart = autostart.concat(me.plugins.autostart); - me.parsePlugins((me.plugins.configpluginsdata ? me.plugins.configpluginsdata : []).concat(me.plugins.serverpluginsdata ? me.plugins.serverpluginsdata : []), false); - } - - }).catch(function(e) { - me.plugins.configpluginsdata = false; - console.log('getServerPlugins error: ' + e.message); - }); - }, - - getAppCustomPlugins: function (config) { - if ( config && config.UIpluginsData ) { - var me = this; - Promise.all(config.UIpluginsData.map(function(url) { + fetchFunction = fetchFunction || function (url) { return fetch(url) .then(function(response) { - // console.log('1: ' + response); - return response.json(); - }) - .then(function(json) { + if ( response.ok ) return response.json(); + else return Promise.reject(url); + }).then(function(json) { json.baseUrl = url.substring(0, url.lastIndexOf("config.json")); return json; }); - })).then(function(values) { - me.parsePlugins(values, true); + }; - if ( me.plugins.uicustom ) { - Promise.all(me.plugins.uicustom.map(function(c) { - return fetch(c.url) + var loaded = []; + return pluginsData.map(fetchFunction).reduce(function (previousPromise, currentPromise) { + return previousPromise + .then(function() + { + return currentPromise; + }) + .then(function(item) + { + loaded.push(item); + return Promise.resolve(item); + }) + .catch(function(item) + { + return Promise.resolve(item); + }); + + }, Promise.resolve()) + .then(function () + { + return Promise.resolve(loaded); + }); + }, + + mergePlugins: function() { + if (this.serverPlugins.plugins !== undefined && this.configPlugins.plugins !== undefined) { // undefined - plugins are loading + var autostart = [], + arr = [], + plugins = this.configPlugins, + warn = false; + if (plugins.plugins && plugins.plugins.length>0) { + arr = plugins.plugins; + var val = plugins.config.autostart || plugins.config.autoStartGuid; + if (typeof (val) == 'string') + val = [val]; + warn = !!plugins.config.autoStartGuid; + autostart = val || []; + } + plugins = this.serverPlugins; + if (plugins.plugins && plugins.plugins.length>0) { + arr = arr.concat(plugins.plugins); + var val = plugins.config.autostart || plugins.config.autoStartGuid; + if (typeof (val) == 'string') + val = [val]; + (warn || plugins.config.autoStartGuid) && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration."); + autostart = autostart.concat(val || []); + } + this.autostart = autostart; + this.parsePlugins(arr, false); + } + }, + + getAppCustomPlugins: function (plugins) { + if ( plugins.config ) { + var me = this; + this.getPlugins(plugins.config.UIpluginsData) + .then(function(loaded) + { + me.parsePlugins(loaded, true); + me.getPlugins(plugins.UIplugins, function(item) { + return fetch(item.url) .then(function(response) { - // console.log('2: ' + response); - return response.text(); + if ( response.ok ) return response.text(); + else return Promise.reject(); }) .then(function(text) { - // console.log('3: ' + text); - c.code = text; + item.code = text; return text; }); - })).then(function(values) { - me.customPluginsComplete = true; - }).catch(function(e) { - console.log('error: ' + e.message); + }).then(function () + { me.customPluginsComplete = true; }); - } - }).catch(function(e) { - console.log('error: ' + e.message); - me.customPluginsComplete = true; - }); + }) + .catch(function(err) + { + me.customPluginsComplete = true; + }); + } else this.customPluginsComplete = true; } - }, Common.Controllers.Plugins || {})); }); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 6863c13f0..ec1b49f9d 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -200,7 +200,6 @@ define([ // Initialize api gateway this.editorConfig = {}; this.appOptions = {}; - this.plugins = undefined; Common.Gateway.on('init', _.bind(this.loadConfig, this)); Common.Gateway.on('showmessage', _.bind(this.onExternalMessage, this)); Common.Gateway.on('opendocument', _.bind(this.loadDocument, this)); @@ -334,7 +333,6 @@ define([ && (typeof (this.editorConfig.customization.goback) == 'object') && !_.isEmpty(this.editorConfig.customization.goback.url); this.appOptions.canBack = this.appOptions.canBackToFolder === true; this.appOptions.canPlugins = false; - this.plugins = this.editorConfig.plugins; this.appOptions.canMakeActionLink = this.editorConfig.canMakeActionLink; appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); @@ -953,9 +951,6 @@ define([ application.getController('Common.Controllers.ExternalMergeEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization}); pluginsController.setApi(me.api); - // if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) - // pluginsController.runAutoStartPlugins(); - // leftmenuController.enablePlugins(); documentHolderController.setApi(me.api); documentHolderController.createDelayedElements(); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 3e2154b79..e8b038842 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -186,7 +186,6 @@ define([ // Initialize api gateway this.editorConfig = {}; this.appOptions = {}; - this.plugins = undefined; Common.Gateway.on('init', _.bind(this.loadConfig, this)); Common.Gateway.on('showmessage', _.bind(this.onExternalMessage, this)); Common.Gateway.on('opendocument', _.bind(this.loadDocument, this)); @@ -314,7 +313,6 @@ define([ && (typeof (this.editorConfig.customization.goback) == 'object') && !_.isEmpty(this.editorConfig.customization.goback.url); this.appOptions.canBack = this.editorConfig.nativeApp !== true && this.appOptions.canBackToFolder === true; this.appOptions.canPlugins = false; - this.plugins = this.editorConfig.plugins; appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); appHeader.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : '') @@ -704,9 +702,6 @@ define([ application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization}); pluginsController.setApi(me.api); - // if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) - // pluginsController.runAutoStartPlugins(); - // leftmenuController.enablePlugins(); documentHolderController.setApi(me.api); documentHolderController.createDelayedElements(); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 037e0c2ef..6bc886c3b 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -180,7 +180,6 @@ define([ // Initialize api gateway this.editorConfig = {}; - this.plugins = undefined; Common.Gateway.on('init', _.bind(this.loadConfig, this)); Common.Gateway.on('showmessage', _.bind(this.onExternalMessage, this)); Common.Gateway.on('opendocument', _.bind(this.loadDocument, this)); @@ -319,7 +318,6 @@ define([ && (typeof (this.editorConfig.customization.goback) == 'object') && !_.isEmpty(this.editorConfig.customization.goback.url); this.appOptions.canBack = this.editorConfig.nativeApp !== true && this.appOptions.canBackToFolder === true; this.appOptions.canPlugins = false; - this.plugins = this.editorConfig.plugins; this.headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header'); this.headerView.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : '') @@ -682,9 +680,6 @@ define([ if (!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram) { pluginsController.setApi(me.api); - // if ( (me.appOptions.canPlugins = pluginsController.appOptions.canPlugins) ) - // pluginsController.runAutoStartPlugins(); - // leftmenuController.enablePlugins(); } leftMenuView.disableMenu('all',false); From dc6402c41a243005af63332e19ab1e3fc29689bb Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 22 May 2019 15:36:43 +0300 Subject: [PATCH 125/510] [DE mobile] Add Collaboration icon into toolbar, fix less --- .../mobile/resources/less/ios/_collaboration.less | 7 ++++++- .../mobile/resources/less/material/_collaboration.less | 7 ++++++- .../mobile/app/controller/Collaboration.js | 6 +++--- .../mobile/app/template/Collaboration.template | 2 +- .../mobile/app/template/Settings.template | 2 ++ .../mobile/app/template/Toolbar.template | 5 +++++ apps/documenteditor/mobile/app/view/Toolbar.js | 10 ++++++++-- apps/documenteditor/mobile/resources/css/app-ios.css | 5 ++++- .../mobile/resources/css/app-material.css | 5 ++++- 9 files changed, 39 insertions(+), 10 deletions(-) diff --git a/apps/common/mobile/resources/less/ios/_collaboration.less b/apps/common/mobile/resources/less/ios/_collaboration.less index 442a8a4d1..5ccf0840d 100644 --- a/apps/common/mobile/resources/less/ios/_collaboration.less +++ b/apps/common/mobile/resources/less/ios/_collaboration.less @@ -50,5 +50,10 @@ .navbar .center-collaboration { display: flex; justify-content: space-around; - margin-left: 45px; +} +.container-collaboration { + .navbar .right.close-collaboration { + position: absolute; + right: 10px; + } } \ No newline at end of file diff --git a/apps/common/mobile/resources/less/material/_collaboration.less b/apps/common/mobile/resources/less/material/_collaboration.less index 1652b4ec4..3b3132690 100644 --- a/apps/common/mobile/resources/less/material/_collaboration.less +++ b/apps/common/mobile/resources/less/material/_collaboration.less @@ -50,5 +50,10 @@ } .navbar .center-collaboration { text-align: center; - margin-left: 54px; +} +.container-collaboration { + .navbar .right.close-collaboration { + position: absolute; + right: 5px; + } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/controller/Collaboration.js b/apps/documenteditor/mobile/app/controller/Collaboration.js index bccdf31c6..c5ce3c2bb 100644 --- a/apps/documenteditor/mobile/app/controller/Collaboration.js +++ b/apps/documenteditor/mobile/app/controller/Collaboration.js @@ -100,7 +100,7 @@ define([ if (Common.SharedSettings.get('phone')) { modalView = $$(uiApp.pickerModal( - '
    ' + + '
    ' + '' + @@ -119,7 +119,7 @@ define([ mainView.hideNavbar(); } else { modalView = uiApp.popover( - '
    ' + + '
    ' + '
    ' + '
    ' + '
    ' + @@ -129,7 +129,7 @@ define([ '
    ' + '
    ' + '
    ', - $$('#toolbar-settings') + $$('#toolbar-collaboration') ); } diff --git a/apps/documenteditor/mobile/app/template/Collaboration.template b/apps/documenteditor/mobile/app/template/Collaboration.template index ad199f58f..532c869b4 100644 --- a/apps/documenteditor/mobile/app/template/Collaboration.template +++ b/apps/documenteditor/mobile/app/template/Collaboration.template @@ -3,7 +3,7 @@
    diff --git a/apps/documenteditor/mobile/app/template/Settings.template b/apps/documenteditor/mobile/app/template/Settings.template index 41deaec18..004ca88ff 100644 --- a/apps/documenteditor/mobile/app/template/Settings.template +++ b/apps/documenteditor/mobile/app/template/Settings.template @@ -55,6 +55,7 @@ <% } %> + <% if(phone) {%>
  • @@ -65,6 +66,7 @@
  • + <% } %>
  • diff --git a/apps/documenteditor/mobile/app/template/Toolbar.template b/apps/documenteditor/mobile/app/template/Toolbar.template index 92137c8a0..dcb188e8c 100644 --- a/apps/documenteditor/mobile/app/template/Toolbar.template +++ b/apps/documenteditor/mobile/app/template/Toolbar.template @@ -20,6 +20,11 @@
    <% } %>
    + <% if (!phone) { %> + + <% } %> <% if (android) { %>