diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 50848e08f..4c0b2b05f 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -23,9 +23,11 @@ key: 'key', vkey: 'vkey', info: { - author: 'author name', + author: 'author name', // must be deprecated, use owner instead + owner: 'owner name', folder: 'path to document', - created: '', + created: '', // must be deprecated, use uploaded instead + uploaded: '', sharingSettings: [ { user: 'user name', @@ -129,7 +131,6 @@ }, plugins: { autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'], - url: '../../../../sdkjs-plugins/', pluginsData: [ "helloworld/config.json", "chess/config.json", @@ -139,7 +140,6 @@ } }, events: { - 'onReady': , // deprecated 'onAppReady': , 'onBack': , 'onDocumentStateChange': @@ -174,7 +174,6 @@ } }, events: { - 'onReady': , // deprecated 'onAppReady': , 'onBack': , 'onError': , @@ -202,11 +201,11 @@ _config.editorConfig.canRequestUsers = _config.events && !!_config.events.onRequestUsers; _config.editorConfig.canRequestSendNotify = _config.events && !!_config.events.onRequestSendNotify; _config.editorConfig.mergeFolderUrl = _config.editorConfig.mergeFolderUrl || _config.editorConfig.saveAsUrl; + _config.editorConfig.canRequestSaveAs = _config.events && !!_config.events.onRequestSaveAs; + _config.editorConfig.canRequestInsertImage = _config.events && !!_config.events.onRequestInsertImage; + _config.editorConfig.canRequestMailMergeRecipients = _config.events && !!_config.events.onRequestMailMergeRecipients; _config.frameEditorId = placeholderId; - _config.events && !!_config.events.onReady && console.log("Obsolete: The onReady event is deprecated. Please use onAppReady instead."); - _config.events && (_config.events.onAppReady = _config.events.onAppReady || _config.events.onReady); - var onMouseUp = function (evt) { _processMouse(evt); }; @@ -560,6 +559,20 @@ }); }; + var _insertImage = function(data) { + _sendCommand({ + command: 'insertImage', + data: data + }); + }; + + var _setMailMergeRecipients = function(data) { + _sendCommand({ + command: 'setMailMergeRecipients', + data: data + }); + }; + var _processMouse = function(evt) { var r = iframe.getBoundingClientRect(); var data = { @@ -602,7 +615,9 @@ destroyEditor : _destroyEditor, setUsers : _setUsers, showSharingSettings : _showSharingSettings, - setSharingSettings : _setSharingSettings + setSharingSettings : _setSharingSettings, + insertImage : _insertImage, + setMailMergeRecipients: _setMailMergeRecipients } }; diff --git a/apps/common/Gateway.js b/apps/common/Gateway.js index 373c41e58..b8e90ebad 100644 --- a/apps/common/Gateway.js +++ b/apps/common/Gateway.js @@ -110,6 +110,14 @@ if (Common === undefined) { 'setSharingSettings': function(data) { $me.trigger('setsharingsettings', data); + }, + + 'insertImage': function(data) { + $me.trigger('insertimage', data); + }, + + 'setMailMergeRecipients': function(data) { + $me.trigger('setmailmergerecipients', data); } }; @@ -250,6 +258,16 @@ if (Common === undefined) { }); }, + requestSaveAs: function(url, title) { + _postMessage({ + event: 'onRequestSaveAs', + data: { + url: url, + title: title + } + }); + }, + collaborativeChanges: function() { _postMessage({event: 'onCollaborativeChanges'}); }, @@ -282,6 +300,14 @@ if (Common === undefined) { _postMessage({event:'onRequestSendNotify', data: emails}) }, + requestInsertImage: function () { + _postMessage({event:'onRequestInsertImage'}) + }, + + requestMailMergeRecipients: function () { + _postMessage({event:'onRequestMailMergeRecipients'}) + }, + on: function(event, handler){ var localHandler = function(event, data){ handler.call(me, data) diff --git a/apps/common/embed/lib/util/utils.js b/apps/common/embed/lib/util/utils.js index 96b16c173..0ad2ed91e 100644 --- a/apps/common/embed/lib/util/utils.js +++ b/apps/common/embed/lib/util/utils.js @@ -65,7 +65,7 @@ iframePrint.contentWindow.blur(); window.focus(); } catch (e) { - api.asc_DownloadAs(Asc.c_oAscFileType.PDF); + api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF)); } }; diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 752da533e..76432c6f2 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -164,7 +164,7 @@ define([ '<% if (closable!==false) %>' + '
' + '<% %>' + - '<%= title %> ' + + '
<%= title %>
' + '' + '<% } %>' + '
<%= tpl %>
' + diff --git a/apps/common/main/lib/controller/History.js b/apps/common/main/lib/controller/History.js index 8e8978193..056183ee3 100644 --- a/apps/common/main/lib/controller/History.js +++ b/apps/common/main/lib/controller/History.js @@ -113,7 +113,7 @@ define([ Common.Gateway.requestRestore(record.get('revision')); else { this.isFromSelectRevision = record.get('revision'); - this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true)); } return; } diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index b6c6a353b..fe3601e45 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -688,16 +688,7 @@ Common.Utils.applyCustomizationPlugins = function(plugins) { Common.Utils.fillUserInfo = function(info, lang, defname) { var _user = info || {}; !_user.id && (_user.id = ('uid-' + Date.now())); - if (_.isEmpty(_user.name)) { - _.isEmpty(_user.firstname) && _.isEmpty(_user.lastname) && (_user.firstname = defname); - if (_.isEmpty(_user.firstname)) - _user.fullname = _user.lastname; - else if (_.isEmpty(_user.lastname)) - _user.fullname = _user.firstname; - else - _user.fullname = /^ru/.test(lang) ? _user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname; - } else - _user.fullname = _user.name; + _user.fullname = _.isEmpty(_user.name) ? defname : _user.name; return _user; }; diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index 4e54e1690..aa7a80a92 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -339,14 +339,14 @@ define([ switch (this.type) { case Common.Utils.importTextType.CSV: - this.api.asc_decodeBuffer(this.preview, new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this)); + this.api.asc_decodeBuffer(this.preview, new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this)); break; case Common.Utils.importTextType.TXT: - this.api.asc_decodeBuffer(this.preview, new Asc.asc_CTXTAdvancedOptions(encoding), _.bind(this.previewCallback, this)); + this.api.asc_decodeBuffer(this.preview, new Asc.asc_CTextOptions(encoding), _.bind(this.previewCallback, this)); break; case Common.Utils.importTextType.Paste: case Common.Utils.importTextType.Columns: - this.api.asc_TextImport(new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste); + this.api.asc_TextImport(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste); break; } }, diff --git a/apps/common/main/resources/less/window.less b/apps/common/main/resources/less/window.less index f0661610f..77f8bc5e5 100644 --- a/apps/common/main/resources/less/window.less +++ b/apps/common/main/resources/less/window.less @@ -85,6 +85,12 @@ &.resizing { cursor: inherit !important; } + + .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } > .body { diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 87d6b1e47..07d2debb1 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -204,7 +204,7 @@ DE.ApplicationController = new(function(){ function onPrint() { if ( permissions.print!==false ) - api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } function onPrintUrl(url) { @@ -259,7 +259,7 @@ DE.ApplicationController = new(function(){ common.utils.openLink(embedConfig.saveUrl); } else if (api && permissions.print!==false){ - api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } Common.Analytics.trackEvent('Save'); @@ -458,7 +458,7 @@ DE.ApplicationController = new(function(){ Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny); return; } - if (api) api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true); + if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true)); } // Helpers diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index fb82b1432..e361dca68 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -237,7 +237,7 @@ define([ if ( isopts ) close_menu = false; else this.clickSaveCopyAsFormat(undefined); break; - case 'print': this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); break; + case 'print': this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); break; case 'exit': Common.NotificationCenter.trigger('goback'); break; case 'edit': this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText); @@ -302,13 +302,35 @@ define([ buttons: ['ok', 'cancel'], callback: _.bind(function(btn){ if (btn == 'ok') { - this.api.asc_DownloadAs(format); + Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format)); menu.hide(); } }, this) }); + } else if (format == Asc.c_oAscFileType.DOCX) { + if (!Common.Utils.InternalSettings.get("de-settings-compatible") && !Common.localStorage.getBool("de-hide-save-compatible") && this.api.asc_isCompatibilityMode()) { + Common.UI.warning({ + closable: false, + width: 600, + title: this.notcriticalErrorTitle, + msg: this.txtCompatible, + buttons: ['ok', 'cancel'], + dontshow: true, + callback: _.bind(function(btn, dontshow){ + if (dontshow) Common.localStorage.setItem("de-hide-save-compatible", 1); + if (btn == 'ok') { + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); + menu.hide(); + } + }, this) + }); + } else { + var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX); + opts.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible")); + this.api.asc_DownloadAs(opts); + } } else { - this.api.asc_DownloadAs(format); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); menu.hide(); } } else @@ -326,14 +348,38 @@ define([ callback: _.bind(function(btn){ if (btn == 'ok') { this.isFromFileDownloadAs = ext; - this.api.asc_DownloadAs(format, true); + Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.TXT, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format, true)); menu.hide(); } }, this) }); + } else if (format == Asc.c_oAscFileType.DOCX) { + if (!Common.Utils.InternalSettings.get("de-settings-compatible") && !Common.localStorage.getBool("de-hide-save-compatible") && this.api.asc_isCompatibilityMode()) { + Common.UI.warning({ + closable: false, + width: 600, + title: this.notcriticalErrorTitle, + msg: this.txtCompatible, + buttons: ['ok', 'cancel'], + dontshow: true, + callback: _.bind(function(btn, dontshow){ + if (dontshow) Common.localStorage.setItem("de-hide-save-compatible", 1); + if (btn == 'ok') { + this.isFromFileDownloadAs = ext; + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true)); + menu.hide(); + } + }, this) + }); + } else { + this.isFromFileDownloadAs = ext; + var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true); + opts.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible")); + this.api.asc_DownloadAs(opts); + } } else { this.isFromFileDownloadAs = ext; - this.api.asc_DownloadAs(format, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true)); menu.hide(); } } else { @@ -354,27 +400,31 @@ define([ defFileName = defFileName.substring(0, idx) + this.isFromFileDownloadAs; } - me._saveCopyDlg = new Common.Views.SaveAsDlg({ - saveFolderUrl: me.mode.saveAsUrl, - saveFileUrl: url, - defFileName: defFileName - }); - me._saveCopyDlg.on('saveaserror', function(obj, err){ - var config = { - closable: false, - title: me.notcriticalErrorTitle, - msg: err, - iconCls: 'warn', - buttons: ['ok'], - callback: function(btn){ - Common.NotificationCenter.trigger('edit:complete', me); - } - }; - Common.UI.alert(config); - }).on('close', function(obj){ - me._saveCopyDlg = undefined; - }); - me._saveCopyDlg.show(); + if (me.mode.canRequestSaveAs) { + Common.Gateway.requestSaveAs(url, defFileName); + } else { + me._saveCopyDlg = new Common.Views.SaveAsDlg({ + saveFolderUrl: me.mode.saveAsUrl, + saveFileUrl: url, + defFileName: defFileName + }); + me._saveCopyDlg.on('saveaserror', function(obj, err){ + var config = { + closable: false, + title: me.notcriticalErrorTitle, + msg: err, + iconCls: 'warn', + buttons: ['ok'], + callback: function(btn){ + Common.NotificationCenter.trigger('edit:complete', me); + } + }; + Common.UI.alert(config); + }).on('close', function(obj){ + me._saveCopyDlg = undefined; + }); + me._saveCopyDlg.show(); + } } this.isFromFileDownloadAs = false; }, @@ -822,6 +872,8 @@ define([ leavePageText: 'All unsaved changes in this document will be lost.
Click \'Cancel\' then \'Save\' to save them. Click \'OK\' to discard all the unsaved changes.', warnDownloadAs : 'If you continue saving in this format all features except the text will be lost.
Are you sure you want to continue?', warnDownloadAsRTF : 'If you continue saving in this format some of the formatting might be lost.
Are you sure you want to continue?', - txtUntitled: 'Untitled' + txtUntitled: 'Untitled', + txtCompatible: 'The document will be saved to the new format. It will allow to use all the editor features, but might affect the document layout.
Use the \'Compatibility\' option of the advanced settings if you want to make the files compatible with older MS Word versions.' + }, DE.Controllers.LeftMenu || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index a88d2fce4..cb4904416 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -195,6 +195,7 @@ define([ Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this)); this.isShowOpenDialog = false; @@ -348,6 +349,9 @@ define([ this.appOptions.canMakeActionLink = this.editorConfig.canMakeActionLink; this.appOptions.canRequestUsers = this.editorConfig.canRequestUsers; this.appOptions.canRequestSendNotify = this.editorConfig.canRequestSendNotify; + this.appOptions.canRequestSaveAs = this.editorConfig.canRequestSaveAs; + this.appOptions.canRequestInsertImage = this.editorConfig.canRequestInsertImage; + this.appOptions.canRequestMailMergeRecipients = this.editorConfig.canRequestMailMergeRecipients; appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); appHeader.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : '') @@ -463,7 +467,7 @@ define([ if ( !_format || _supported.indexOf(_format) < 0 ) _format = Asc.c_oAscFileType.DOCX; - this.api.asc_DownloadAs(_format, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true)); } }, @@ -890,6 +894,9 @@ define([ Common.Utils.InternalSettings.set("de-settings-spellcheck", value); me.api.asc_setSpellCheck(value); + value = Common.localStorage.getBool("de-settings-compatible", false); + Common.Utils.InternalSettings.set("de-settings-compatible", value); + Common.Utils.InternalSettings.set("de-settings-showsnaplines", me.api.get_ShowSnapLines()); function checkWarns() { @@ -1945,25 +1952,28 @@ define([ this.getApplication().getController('Toolbar').getView().updateMetricUnit(); }, - onAdvancedOptions: function(advOptions, mode) { + onAdvancedOptions: function(type, advOptions, mode, formatOptions) { if (this._state.openDlg) return; - var type = advOptions.asc_getOptionId(), - me = this; + var me = this; if (type == Asc.c_oAscAdvancedOptionsID.TXT) { me._state.openDlg = new Common.Views.OpenDialog({ title: Common.Views.OpenDialog.prototype.txtTitle.replace('%1', 'TXT'), closable: (mode==2), // if save settings type: Common.Utils.importTextType.TXT, - preview: advOptions.asc_getOptions().asc_getData(), - codepages: advOptions.asc_getOptions().asc_getCodePages(), - settings: advOptions.asc_getOptions().asc_getRecommendedSettings(), + preview: advOptions.asc_getData(), + codepages: advOptions.asc_getCodePages(), + settings: advOptions.asc_getRecommendedSettings(), api: me.api, handler: function (result, encoding) { me.isShowOpenDialog = false; if (result == 'ok') { if (me && me.api) { - me.api.asc_setAdvancedOptions(type, new Asc.asc_CTXTAdvancedOptions(encoding)); + if (mode==2) { + formatOptions && formatOptions.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding)); + me.api.asc_DownloadAs(formatOptions); + } else + me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding)); me.loadMask && me.loadMask.show(); } } @@ -2002,7 +2012,7 @@ define([ }, onTryUndoInFastCollaborative: function() { - if (!window.localStorage.getBool("de-hide-try-undoredo")) + if (!Common.localStorage.getBool("de-hide-try-undoredo")) Common.UI.info({ width: 500, msg: this.textTryUndoRedo, @@ -2012,7 +2022,7 @@ define([ customButtonText: this.textStrict, dontshow: true, callback: _.bind(function(btn, dontshow){ - if (dontshow) window.localStorage.setItem("de-hide-try-undoredo", 1); + if (dontshow) Common.localStorage.setItem("de-hide-try-undoredo", 1); if (btn == 'custom') { Common.localStorage.setItem("de-settings-coauthmode", 0); Common.Utils.InternalSettings.set("de-settings-coauthmode", false); @@ -2070,7 +2080,7 @@ define([ if (!this.appOptions.canPrint || this.isModalShowed) return; if (this.api) - this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event + this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event Common.component.Analytics.trackEvent('Print'); }, @@ -2096,7 +2106,7 @@ define([ me.iframePrint.contentWindow.blur(); window.focus(); } catch (e) { - me.api.asc_DownloadAs(Asc.c_oAscFileType.PDF); + me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF)); } }; } diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index dc5c863f6..f093edef4 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -152,7 +152,7 @@ define([ if ( !_format || _supported.indexOf(_format) < 0 ) _format = Asc.c_oAscFileType.PDF; - _main.api.asc_DownloadAs(_format); + _main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format)); }, 'go:editor': function() { Common.Gateway.requestEditRights(); @@ -323,6 +323,8 @@ define([ toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this)); toolbar.mnuNoControlsColor.on('click', _.bind(this.onNoControlsColor, this)); toolbar.mnuControlsColorPicker.on('select', _.bind(this.onSelectControlsColor, this)); + Common.Gateway.on('insertimage', _.bind(this.insertImage, this)); + Common.Gateway.on('setmailmergerecipients', _.bind(this.setMailMergeRecipients, this)); $('#id-toolbar-menu-new-control-color').on('click', _.bind(this.onNewControlsColor, this)); $('#id-save-style-plus, #id-save-style-link', toolbar.$el).on('click', this.onMenuSaveStyle.bind(this)); @@ -966,7 +968,7 @@ define([ onPrint: function(e) { if (this.api) - this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event + this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event Common.NotificationCenter.trigger('edit:complete', this.toolbar); @@ -1427,13 +1429,23 @@ define([ } })).show(); } else if (item.value === 'storage') { - (new Common.Views.SelectFileDlg({ - fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly") - })).on('selectfile', function(obj, file){ - me.toolbar.fireEvent('insertimage', me.toolbar); - me.api.AddImageUrl(file.url, undefined, true);// for loading from storage - Common.component.Analytics.trackEvent('ToolBar', 'Image'); - }).show(); + if (this.toolbar.mode.canRequestInsertImage) { + Common.Gateway.requestInsertImage(); + } else { + (new Common.Views.SelectFileDlg({ + fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly") + })).on('selectfile', function(obj, file){ + me.insertImage(file); + }).show(); + } + } + }, + + insertImage: function(data) { + if (data && data.url) { + this.toolbar.fireEvent('insertimage', this.toolbar); + this.api.AddImageUrl(data.url, undefined, data.token);// for loading from storage + Common.component.Analytics.trackEvent('ToolBar', 'Image'); } }, @@ -2594,7 +2606,7 @@ define([ this.toolbar.btnRedo.setDisabled(this._state.can_redo!==true); this.toolbar.btnCopy.setDisabled(this._state.can_copycut!==true); this.toolbar.btnPrint.setDisabled(!this.toolbar.mode.canPrint); - if (this.toolbar.mode.fileChoiceUrl) + if (this.toolbar.mode.fileChoiceUrl || this.toolbar.mode.canRequestMailMergeRecipients) this.toolbar.btnMailRecepients.setDisabled(false); this._state.activated = true; @@ -2792,22 +2804,28 @@ define([ onSelectRecepientsClick: function() { if (this._mailMergeDlg) return; - var me = this; - me._mailMergeDlg = new Common.Views.SelectFileDlg({ - fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "xlsx").replace("{documentType}", "") - }); - me._mailMergeDlg.on('selectfile', function(obj, recepients){ - me.api.asc_StartMailMerge(recepients); - if (!me.mergeEditor) - me.mergeEditor = me.getApplication().getController('Common.Controllers.ExternalMergeEditor').getView('Common.Views.ExternalMergeEditor'); - if (me.mergeEditor) - me.mergeEditor.setEditMode(false); + if (this.toolbar.mode.canRequestMailMergeRecipients) { + Common.Gateway.requestMailMergeRecipients(); + } else { + var me = this; + me._mailMergeDlg = new Common.Views.SelectFileDlg({ + fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "xlsx").replace("{documentType}", "") + }); + me._mailMergeDlg.on('selectfile', function(obj, recepients){ + me.setMailMergeRecipients(recepients); + }).on('close', function(obj){ + me._mailMergeDlg = undefined; + }); + me._mailMergeDlg.show(); + } + }, - }).on('close', function(obj){ - me._mailMergeDlg = undefined; - }); - - me._mailMergeDlg.show(); + setMailMergeRecipients: function(recepients) { + this.api.asc_StartMailMerge(recepients); + if (!this.mergeEditor) + this.mergeEditor = this.getApplication().getController('Common.Controllers.ExternalMergeEditor').getView('Common.Views.ExternalMergeEditor'); + if (this.mergeEditor) + this.mergeEditor.setEditMode(false); }, createDelayedElements: function() { diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 42b20e6ba..ef6aa6879 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -259,7 +259,7 @@ define([ this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide'](); this.miDownload[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide'](); - this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && this.mode.saveAsUrl ?'show':'hide'](); + this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) ?'show':'hide'](); this.miSaveAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide'](); // this.hkSaveAs[this.mode.canDownload?'enable':'disable'](); @@ -306,7 +306,7 @@ define([ } else if (this.mode.canDownloadOrigin) $('a',this.miDownload.$el).text(this.textDownload); - if (this.mode.canDownload && this.mode.saveAsUrl) { + if (this.mode.canDownload && (this.mode.canRequestSaveAs || this.mode.saveAsUrl)) { this.panels['save-copy'] = ((new DE.Views.FileMenuPanels.ViewSaveCopy({menu: this})).render()); } diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index a32be4c16..c90f4a776 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -198,6 +198,10 @@ define([ '', '', '','', + '', + '', + '', + '','', '', '', '', @@ -270,6 +274,11 @@ define([ labelText: this.strSpellCheckMode }); + this.chCompatible = new Common.UI.CheckBox({ + el: $('#fms-chb-compatible'), + labelText: this.textOldVersions + }); + this.chAutosave = new Common.UI.CheckBox({ el: $('#fms-chb-autosave'), labelText: this.strAutosave @@ -448,6 +457,7 @@ define([ this.chSpell.setValue(Common.Utils.InternalSettings.get("de-settings-spellcheck")); this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("de-settings-showsnaplines")); + this.chCompatible.setValue(Common.Utils.InternalSettings.get("de-settings-compatible")); }, applySettings: function() { @@ -469,6 +479,8 @@ define([ if (this.mode.canForcesave) Common.localStorage.setItem("de-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0); Common.localStorage.setItem("de-settings-spellcheck", this.chSpell.isChecked() ? 1 : 0); + Common.localStorage.setItem("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0); + Common.Utils.InternalSettings.set("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0); Common.Utils.InternalSettings.set("de-settings-showsnaplines", this.chAlignGuides.isChecked()); Common.localStorage.save(); @@ -531,7 +543,9 @@ define([ txtFitWidth: 'Fit to Width', textForceSave: 'Save to Server', strForcesave: 'Always save to server (otherwise save to server on document close)', - strResolvedComment: 'Turn on display of the resolved comments' + strResolvedComment: 'Turn on display of the resolved comments', + textCompatible: 'Compatibility', + textOldVersions: 'Make the files compatible with older MS Word versions when saved as DOCX' }, DE.Views.FileMenuPanels.Settings || {})); DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ @@ -907,6 +921,11 @@ define([ }, updateInfo: function(doc) { + if (!this.doc && doc && doc.info) { + doc.info.author && console.log("Obsolete: The 'author' parameter of the document 'info' section is deprecated. Please use 'owner' instead."); + doc.info.created && console.log("Obsolete: The 'created' parameter of the document 'info' section is deprecated. Please use 'uploaded' instead."); + } + this.doc = doc; if (!this.rendered) return; @@ -918,12 +937,14 @@ define([ if (doc.info.folder ) this.lblPlacement.text( doc.info.folder ); 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; + var value = doc.info.owner || doc.info.author; + if (value) + this.lblOwner.text(value); + visible = this._ShowHideInfoItem(this.lblOwner, !!value) || visible; + value = doc.info.uploaded || doc.info.created; + if (value) + this.lblUploaded.text(value); + visible = this._ShowHideInfoItem(this.lblUploaded, !!value) || visible; } else this._ShowHideDocInfo(false); $('tr.divider.general', this.el)[visible?'show':'hide'](); diff --git a/apps/documenteditor/main/app/view/MailMergeSettings.js b/apps/documenteditor/main/app/view/MailMergeSettings.js index 90b5d27d0..fa32bd838 100644 --- a/apps/documenteditor/main/app/view/MailMergeSettings.js +++ b/apps/documenteditor/main/app/view/MailMergeSettings.js @@ -365,7 +365,7 @@ define([ this.$el.on('click', '#mmerge-readmore-link', _.bind(this.openHelp, this)); if (this.mode) { - if (!this.mode.mergeFolderUrl) + if (!this.mode.canRequestSaveAs && !this.mode.mergeFolderUrl) this.btnPortal.setVisible(false); if (!this.mode.canSendEmailAddresses) { this._arrMergeSrc.pop(); @@ -426,7 +426,7 @@ define([ if (num>this._state.recipientsCount-1) num = this._state.recipientsCount-1; this.lockControls(DE.enumLockMM.noRecipients, this._state.recipientsCount<1, { - array: (this.mode.mergeFolderUrl) ? [this.btnPortal] : [], + array: (this.mode.canRequestSaveAs || this.mode.mergeFolderUrl) ? [this.btnPortal] : [], merge: true }); @@ -537,28 +537,33 @@ define([ if (this._mailMergeDlg) return; var me = this; if (this.cmbMergeTo.getValue() != Asc.c_oAscFileType.HTML) { - me._mailMergeDlg = new Common.Views.SaveAsDlg({ - saveFolderUrl: me.mode.mergeFolderUrl, - saveFileUrl: url, - defFileName: me.defFileName + ((this.cmbMergeTo.getValue() == Asc.c_oAscFileType.PDF) ? '.pdf' : '.docx') - }); - me._mailMergeDlg.on('saveasfolder', function(obj, folder){ // save last folder - }).on('saveaserror', function(obj, err){ // save last folder - var config = { - closable: false, - title: me.notcriticalErrorTitle, - msg: err, - iconCls: 'warn', - buttons: ['ok'], - callback: function(btn){ - me.fireEvent('editcomplete', me); - } - }; - Common.UI.alert(config); - }).on('close', function(obj){ - me._mailMergeDlg = undefined; - }); - me._mailMergeDlg.show(); + var defFileName = me.defFileName + ((this.cmbMergeTo.getValue() == Asc.c_oAscFileType.PDF) ? '.pdf' : '.docx'); + if (me.mode.canRequestSaveAs) { + Common.Gateway.requestSaveAs(url, defFileName); + } else { + me._mailMergeDlg = new Common.Views.SaveAsDlg({ + saveFolderUrl: me.mode.mergeFolderUrl, + saveFileUrl: url, + defFileName: defFileName + }); + me._mailMergeDlg.on('saveasfolder', function(obj, folder){ // save last folder + }).on('saveaserror', function(obj, err){ // save last folder + var config = { + closable: false, + title: me.notcriticalErrorTitle, + msg: err, + iconCls: 'warn', + buttons: ['ok'], + callback: function(btn){ + me.fireEvent('editcomplete', me); + } + }; + Common.UI.alert(config); + }).on('close', function(obj){ + me._mailMergeDlg = undefined; + }); + me._mailMergeDlg.show(); + } } }, @@ -766,7 +771,7 @@ define([ onCmbMergeToSelect: function(combo, record) { var mergeVisible = (record.value == Asc.c_oAscFileType.HTML); this.btnMerge.setVisible(mergeVisible); - this.btnPortal.setVisible(!mergeVisible && this.mode.mergeFolderUrl); + this.btnPortal.setVisible(!mergeVisible && (this.mode.canRequestSaveAs || this.mode.mergeFolderUrl)); this.btnDownload.setVisible(!mergeVisible); }, @@ -778,7 +783,7 @@ define([ if (this._initSettings) return; this.lockControls(DE.enumLockMM.lostConnect, disable, { - array: _.union([this.btnEditData, this.btnInsField, this.chHighlight], (this.mode.mergeFolderUrl) ? [this.btnPortal] : []), + array: _.union([this.btnEditData, this.btnInsField, this.chHighlight], (this.mode.canRequestSaveAs || this.mode.mergeFolderUrl) ? [this.btnPortal] : []), merge: true }); }, diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index ccb569908..f6efa669c 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -2055,7 +2055,7 @@ define([ this.listStylesAdditionalMenuItem.setVisible(mode.canEditStyles); this.btnContentControls.menu.items[4].setVisible(mode.canEditContentControl); this.btnContentControls.menu.items[5].setVisible(mode.canEditContentControl); - this.mnuInsertImage.items[2].setVisible(this.mode.fileChoiceUrl && this.mode.fileChoiceUrl.indexOf("{documentType}")>-1); + this.mnuInsertImage.items[2].setVisible(this.mode.canRequestInsertImage || this.mode.fileChoiceUrl && this.mode.fileChoiceUrl.indexOf("{documentType}")>-1); }, onSendThemeColorSchemes: function (schemas) { diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index 0e92951fb..145a0b453 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: 10000; + z-index: 1001; } .loader-page { diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy index e2bea029e..45faf2f30 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: 10000; + z-index: 1001; } .loader-page { diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 67b29a0fa..084bd5696 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -330,6 +330,7 @@ "DE.Controllers.LeftMenu.txtUntitled": "Untitled", "DE.Controllers.LeftMenu.warnDownloadAs": "If you continue saving in this format all features except the text will be lost.
Are you sure you want to continue?", "DE.Controllers.LeftMenu.warnDownloadAsRTF": "If you continue saving in this format some of the formatting might be lost.
Are you sure you want to continue?", + "DE.Controllers.LeftMenu.txtCompatible": "The document will be saved to the new format. It will allow to use all the editor features, but might affect the document layout.
Use the 'Compatibility' option of the advanced settings if you want to make the files compatible with older MS Word versions.", "DE.Controllers.Main.applyChangesTextText": "Loading the changes...", "DE.Controllers.Main.applyChangesTitleText": "Loading the Changes", "DE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.", @@ -1423,6 +1424,8 @@ "DE.Views.FileMenuPanels.Settings.txtPt": "Point", "DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking", "DE.Views.FileMenuPanels.Settings.txtWin": "as Windows", + "DE.Views.FileMenuPanels.Settings.textCompatible": "Compatibility", + "DE.Views.FileMenuPanels.Settings.textOldVersions": "Make the files compatible with older MS Word versions when saved as DOCX", "DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom center", "DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom left", "DE.Views.HeaderFooterSettings.textBottomPage": "Bottom of Page", diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 10ea23815..ceae90000 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -264,6 +264,10 @@ define([ if (data.doc) { DE.getController('Toolbar').setDocumentTitle(data.doc.title); + if (data.doc.info) { + data.doc.info.author && console.log("Obsolete: The 'author' parameter of the document 'info' section is deprecated. Please use 'owner' instead."); + data.doc.info.created && console.log("Obsolete: The 'created' parameter of the document 'info' section is deprecated. Please use 'uploaded' instead."); + } } }, @@ -322,7 +326,7 @@ define([ if (type && typeof type[1] === 'string') { this.api.asc_DownloadOrigin(true) } else { - this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true)); } }, @@ -1113,17 +1117,16 @@ define([ Common.Utils.ThemeColor.setColors(colors, standart_colors); }, - onAdvancedOptions: function(advOptions) { + onAdvancedOptions: function(type, advOptions) { if (this._state.openDlg) return; - var type = advOptions.asc_getOptionId(), - me = this; + var me = this; if (type == Asc.c_oAscAdvancedOptionsID.TXT) { var picker, pages = [], pagesName = []; - _.each(advOptions.asc_getOptions().asc_getCodePages(), function(page) { + _.each(advOptions.asc_getCodePages(), function(page) { pages.push(page.asc_getCodePage()); pagesName.push(page.asc_getCodePageName()); }); @@ -1150,7 +1153,7 @@ define([ var encoding = picker.value; if (me.api) { - me.api.asc_setAdvancedOptions(type, new Asc.asc_CTXTAdvancedOptions(encoding)); + me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding)); if (!me._isDocReady) { me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); @@ -1166,7 +1169,7 @@ define([ container: '#txt-encoding', toolbar: false, rotateEffect: true, - value: [advOptions.asc_getOptions().asc_getRecommendedSettings().asc_getCodePage()], + value: [advOptions.asc_getRecommendedSettings().asc_getCodePage()], cols: [{ values: pages, displayValues: pagesName diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index ed2c91303..7ac6b5702 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -416,8 +416,10 @@ define([ info = document.info || {}; document.title ? $('#settings-document-title').html(document.title) : $('.display-document-title').remove(); - info.author ? $('#settings-document-owner').html(info.author) : $('.display-owner').remove(); - info.uploaded ? $('#settings-doc-uploaded').html(info.uploaded.toLocaleString()) : $('.display-uploaded').remove(); + var value = info.owner || info.author; + value ? $('#settings-document-owner').html(value) : $('.display-owner').remove(); + value = info.uploaded || info.created; + value ? $('#settings-doc-uploaded').html(value) : $('.display-uploaded').remove(); info.folder ? $('#settings-doc-location').html(info.folder) : $('.display-location').remove(); var appProps = (this.api) ? this.api.asc_getAppProps() : null; @@ -425,8 +427,7 @@ define([ var appName = (appProps.asc_getApplication() || '') + ' ' + (appProps.asc_getAppVersion() || ''); appName ? $('#settings-doc-application').html(appName) : $('.display-application').remove(); } - var props = (this.api) ? this.api.asc_getCoreProps() : null, - value; + var props = (this.api) ? this.api.asc_getCoreProps() : null; if (props) { value = props.asc_getTitle(); value ? $('#settings-doc-title').html(value) : $('.display-title').remove(); @@ -567,13 +568,13 @@ define([ me.warnDownloadAs, me.notcriticalErrorTitle, function () { - me.api.asc_DownloadAs(format); + me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); } ); }); } else { _.defer(function () { - me.api.asc_DownloadAs(format); + me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); }); } diff --git a/apps/documenteditor/mobile/app/controller/Toolbar.js b/apps/documenteditor/mobile/app/controller/Toolbar.js index 1c32ee6c4..ccd784064 100644 --- a/apps/documenteditor/mobile/app/controller/Toolbar.js +++ b/apps/documenteditor/mobile/app/controller/Toolbar.js @@ -81,7 +81,7 @@ define([ this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo')); this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this)); this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this)); - this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.displayCollaboration, this)) + this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.displayCollaboration, this)); this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.displayCollaboration, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); }, diff --git a/apps/documenteditor/mobile/resources/css/app-ios.css b/apps/documenteditor/mobile/resources/css/app-ios.css index 4c600bf19..54cf0486a 100644 --- a/apps/documenteditor/mobile/resources/css/app-ios.css +++ b/apps/documenteditor/mobile/resources/css/app-ios.css @@ -6949,17 +6949,17 @@ i.icon.icon-footnote { i.icon.icon-cut { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20d%3D%22M19.4406%2016.7116C17.8368%2016.7116%2016.4336%2017.76%2015.9825%2019.2576L13.1259%2013.5167L19.4907%200.737143C19.5909%200.487542%2019.4907%200.18802%2019.2902%200.0881796C19.0396%20-0.011661%2018.7389%200.0881795%2018.6387%200.287861L12.5245%2012.3686L6.51049%200.287861C6.41026%200.0382593%206.10956%20-0.0615813%205.85898%200.0382593C5.6084%200.1381%205.50816%200.437622%205.6084%200.687223L11.9732%2013.4668L9.06644%2019.2576C8.61539%2017.8099%207.21213%2016.7116%205.6084%2016.7116C3.60373%2016.7116%202%2018.3091%202%2020.3059C2%2022.3027%203.60373%2023.9002%205.6084%2023.9002C6.91143%2023.9002%208.06411%2023.2013%208.71562%2022.153C8.71562%2022.153%208.71562%2022.1529%208.71562%2022.103C8.81586%2021.9533%208.86597%2021.8035%208.91609%2021.6537L12.5245%2014.615L16.0828%2021.7037C16.1329%2021.8534%2016.2331%2022.0032%2016.2832%2022.153V22.2029C16.2832%2022.2029%2016.2832%2022.2029%2016.2832%2022.2528C16.9347%2023.3011%2018.0874%2024%2019.3905%2024C21.3951%2024%2022.9989%2022.4026%2022.9989%2020.4057C23.049%2018.359%2021.4452%2016.7116%2019.4406%2016.7116ZM5.6084%2022.9517C4.15501%2022.9517%203.00233%2021.8035%203.00233%2020.3558C3.00233%2018.9081%204.15501%2017.76%205.6084%2017.76C7.06178%2017.76%208.21446%2018.9081%208.21446%2020.3558C8.21446%2020.7053%208.16434%2021.0547%208.01399%2021.3542L7.91376%2021.5539C7.51283%2022.3526%206.66084%2022.9517%205.6084%2022.9517ZM19.4406%2022.9517C18.4382%2022.9517%2017.5361%2022.3526%2017.1352%2021.504L17.035%2021.3043C16.9347%2021.0048%2016.8345%2020.6553%2016.8345%2020.3059C16.8345%2018.8582%2017.9872%2017.71%2019.4406%2017.71C20.894%2017.71%2022.0466%2018.8582%2022.0466%2020.3059C22.0466%2021.7536%2020.894%2022.9517%2019.4406%2022.9517Z%22%20fill%3D%22white%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.22427%2022.2702C4.51527%2023.1269%206.52738%2022.7183%207.6592%2021.0127C8.79101%2019.3071%208.38572%2017.2943%207.09472%2016.4376C5.80372%2015.5809%203.79161%2015.9896%202.65979%2017.6952C1.52798%2019.4008%201.93328%2021.4136%203.22427%2022.2702ZM2.67135%2023.1035C4.51208%2024.325%207.11827%2023.6364%208.49243%2021.5656C9.8666%2019.4948%209.48837%2016.8259%207.64764%2015.6044C5.80691%2014.3829%203.20072%2015.0714%201.82656%2017.1422C0.452398%2019.2131%200.830625%2021.882%202.67135%2023.1035Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M20.9158%2022.2702C19.6248%2023.1269%2017.6127%2022.7183%2016.4809%2021.0127C15.349%2019.3071%2015.7543%2017.2943%2017.0453%2016.4376C18.3363%2015.5809%2020.3484%2015.9896%2021.4803%2017.6952C22.6121%2019.4008%2022.2068%2021.4136%2020.9158%2022.2702ZM21.4687%2023.1035C19.628%2024.325%2017.0218%2023.6364%2015.6476%2021.5656C14.2735%2019.4948%2014.6517%2016.8259%2016.4924%2015.6044C18.3331%2014.3829%2020.9393%2015.0714%2022.3135%2017.1422C23.6877%2019.2131%2023.3094%2021.882%2021.4687%2023.1035Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M16.4924%2015.6044L13.9037%2012.4737L19.9552%200.675715C20.0693%200.446914%2019.9552%200.172352%2019.727%200.0808313C19.4416%20-0.0106892%2019.0993%200.0808312%2018.9851%200.263872L12.0233%2011.4212L5.17562%200.263872C5.06149%200.035071%204.71911%20-0.0564496%204.43379%200.035071C4.14847%200.126592%204.03434%200.401153%204.14847%200.629955L10.2001%2012.4279L7.64761%2015.6044L9.2292%2018L12.0233%2013.4804L14.9108%2018L16.4924%2015.6044Z%22%20fill%3D%22white%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); } i.icon.icon-copy { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M3%203.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M3%207.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M3%2011.5H9%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M9%2014.5H0.5V0.5H14.5V9H9.5H9V9.5V14.5ZM15%2010V9.5H23.5V23.5H9.5V15.5H10V15V14.5V10H15Z%22%20stroke%3D%22white%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1%201H15V7H16V0H0V17H8V16H1V1Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M23%208H9V23H23V8ZM8%207V24H24V7H8Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M13%205H3V4H13V5Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%209H3V8H8V9Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%2013H3V12H8V13Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H11V11H21V12Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H11V15H21V16Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H11V19H21V20Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E"); } i.icon.icon-paste { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M13%202.5H4%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%202.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%201.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%203.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%204.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%200.5L5%200.500001%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M9.5%209H9V9.5V19H10V10H23.5V23.5H9.5V20V19.5H9H0.5V2.5H18.5V9H9.5Z%22%20stroke%3D%22white%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%202H0V20H9V24H24V7H19V2H14V3H18V7H9V19H1V3H5V2ZM10%208H23V23H10V8Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M5%200H14V5H5V0Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H12V11H21V12Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H12V15H21V16Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H12V19H21V20Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E"); } .label-switch input[type="checkbox"]:checked + .checkbox { background: #446995; diff --git a/apps/documenteditor/mobile/resources/css/app-material.css b/apps/documenteditor/mobile/resources/css/app-material.css index b830d72e1..5cb814b39 100644 --- a/apps/documenteditor/mobile/resources/css/app-material.css +++ b/apps/documenteditor/mobile/resources/css/app-material.css @@ -6429,17 +6429,17 @@ i.icon.icon-footnote { i.icon.icon-cut { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20d%3D%22M19.4406%2016.7116C17.8368%2016.7116%2016.4336%2017.76%2015.9825%2019.2576L13.1259%2013.5167L19.4907%200.737143C19.5909%200.487542%2019.4907%200.18802%2019.2902%200.0881796C19.0396%20-0.011661%2018.7389%200.0881795%2018.6387%200.287861L12.5245%2012.3686L6.51049%200.287861C6.41026%200.0382593%206.10956%20-0.0615813%205.85898%200.0382593C5.6084%200.1381%205.50816%200.437622%205.6084%200.687223L11.9732%2013.4668L9.06644%2019.2576C8.61539%2017.8099%207.21213%2016.7116%205.6084%2016.7116C3.60373%2016.7116%202%2018.3091%202%2020.3059C2%2022.3027%203.60373%2023.9002%205.6084%2023.9002C6.91143%2023.9002%208.06411%2023.2013%208.71562%2022.153C8.71562%2022.153%208.71562%2022.1529%208.71562%2022.103C8.81586%2021.9533%208.86597%2021.8035%208.91609%2021.6537L12.5245%2014.615L16.0828%2021.7037C16.1329%2021.8534%2016.2331%2022.0032%2016.2832%2022.153V22.2029C16.2832%2022.2029%2016.2832%2022.2029%2016.2832%2022.2528C16.9347%2023.3011%2018.0874%2024%2019.3905%2024C21.3951%2024%2022.9989%2022.4026%2022.9989%2020.4057C23.049%2018.359%2021.4452%2016.7116%2019.4406%2016.7116ZM5.6084%2022.9517C4.15501%2022.9517%203.00233%2021.8035%203.00233%2020.3558C3.00233%2018.9081%204.15501%2017.76%205.6084%2017.76C7.06178%2017.76%208.21446%2018.9081%208.21446%2020.3558C8.21446%2020.7053%208.16434%2021.0547%208.01399%2021.3542L7.91376%2021.5539C7.51283%2022.3526%206.66084%2022.9517%205.6084%2022.9517ZM19.4406%2022.9517C18.4382%2022.9517%2017.5361%2022.3526%2017.1352%2021.504L17.035%2021.3043C16.9347%2021.0048%2016.8345%2020.6553%2016.8345%2020.3059C16.8345%2018.8582%2017.9872%2017.71%2019.4406%2017.71C20.894%2017.71%2022.0466%2018.8582%2022.0466%2020.3059C22.0466%2021.7536%2020.894%2022.9517%2019.4406%2022.9517Z%22%20fill%3D%22black%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22black%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.22427%2022.2702C4.51527%2023.1269%206.52738%2022.7183%207.6592%2021.0127C8.79101%2019.3071%208.38572%2017.2943%207.09472%2016.4376C5.80372%2015.5809%203.79161%2015.9896%202.65979%2017.6952C1.52798%2019.4008%201.93328%2021.4136%203.22427%2022.2702ZM2.67135%2023.1035C4.51208%2024.325%207.11827%2023.6364%208.49243%2021.5656C9.8666%2019.4948%209.48837%2016.8259%207.64764%2015.6044C5.80691%2014.3829%203.20072%2015.0714%201.82656%2017.1422C0.452398%2019.2131%200.830625%2021.882%202.67135%2023.1035Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M20.9158%2022.2702C19.6248%2023.1269%2017.6127%2022.7183%2016.4809%2021.0127C15.349%2019.3071%2015.7543%2017.2943%2017.0453%2016.4376C18.3363%2015.5809%2020.3484%2015.9896%2021.4803%2017.6952C22.6121%2019.4008%2022.2068%2021.4136%2020.9158%2022.2702ZM21.4687%2023.1035C19.628%2024.325%2017.0218%2023.6364%2015.6476%2021.5656C14.2735%2019.4948%2014.6517%2016.8259%2016.4924%2015.6044C18.3331%2014.3829%2020.9393%2015.0714%2022.3135%2017.1422C23.6877%2019.2131%2023.3094%2021.882%2021.4687%2023.1035Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M16.4924%2015.6044L13.9037%2012.4737L19.9552%200.675715C20.0693%200.446914%2019.9552%200.172352%2019.727%200.0808313C19.4416%20-0.0106892%2019.0993%200.0808312%2018.9851%200.263872L12.0233%2011.4212L5.17562%200.263872C5.06149%200.035071%204.71911%20-0.0564496%204.43379%200.035071C4.14847%200.126592%204.03434%200.401153%204.14847%200.629955L10.2001%2012.4279L7.64761%2015.6044L9.2292%2018L12.0233%2013.4804L14.9108%2018L16.4924%2015.6044Z%22%20fill%3D%22black%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22black%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); } i.icon.icon-copy { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M3%203.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M3%207.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M3%2011.5H9%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M9%2014.5H0.5V0.5H14.5V9H9.5H9V9.5V14.5ZM15%2010V9.5H23.5V23.5H9.5V15.5H10V15V14.5V10H15Z%22%20stroke%3D%22black%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1%201H15V7H16V0H0V17H8V16H1V1Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M23%208H9V23H23V8ZM8%207V24H24V7H8Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M13%205H3V4H13V5Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%209H3V8H8V9Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%2013H3V12H8V13Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H11V11H21V12Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H11V15H21V16Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H11V19H21V20Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E"); } i.icon.icon-paste { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M13%202.5H4%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%202.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%201.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%203.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%204.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%200.5L5%200.500001%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M9.5%209H9V9.5V19H10V10H23.5V23.5H9.5V20V19.5H9H0.5V2.5H18.5V9H9.5Z%22%20stroke%3D%22black%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%202H0V20H9V24H24V7H19V2H14V3H18V7H9V19H1V3H5V2ZM10%208H23V23H10V8Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M5%200H14V5H5V0Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H12V11H21V12Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H12V15H21V16Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H12V19H21V20Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E"); } .navbar i.icon.icon-undo { width: 22px; diff --git a/apps/documenteditor/mobile/resources/less/ios/_icons.less b/apps/documenteditor/mobile/resources/less/ios/_icons.less index 03d035167..1d044a02a 100644 --- a/apps/documenteditor/mobile/resources/less/ios/_icons.less +++ b/apps/documenteditor/mobile/resources/less/ios/_icons.less @@ -459,16 +459,16 @@ i.icon { &.icon-cut { width: 24px; height: 24px; - .encoded-svg-background(''); - } + .encoded-svg-background(''); + } &.icon-copy { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-paste { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/resources/less/material/_icons.less b/apps/documenteditor/mobile/resources/less/material/_icons.less index da3252478..0bea41658 100644 --- a/apps/documenteditor/mobile/resources/less/material/_icons.less +++ b/apps/documenteditor/mobile/resources/less/material/_icons.less @@ -386,17 +386,17 @@ i.icon { &.icon-cut { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-copy { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-paste { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } } diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index 6faead079..a425b3840 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -201,7 +201,7 @@ PE.ApplicationController = new(function(){ function onPrint() { if (permissions.print!==false) - api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } function onPrintUrl(url) { @@ -267,7 +267,7 @@ PE.ApplicationController = new(function(){ common.utils.openLink(embedConfig.saveUrl); } else if (api && permissions.print!==false){ - api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } Common.Analytics.trackEvent('Save'); @@ -558,7 +558,7 @@ PE.ApplicationController = new(function(){ Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny); return; } - if (api) api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true); + if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, true)); } // Helpers // ------------------------- diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index d38358c8d..1b65c7a0f 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -215,7 +215,7 @@ define([ case 'back': break; case 'save': this.api.asc_Save(); break; case 'save-desktop': this.api.asc_DownloadAs(); break; - case 'print': this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); break; + case 'print': this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); break; case 'exit': Common.NotificationCenter.trigger('goback'); break; case 'edit': this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText); @@ -247,13 +247,13 @@ define([ }, clickSaveAsFormat: function(menu, format) { - this.api.asc_DownloadAs(format); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); menu.hide(); }, clickSaveCopyAsFormat: function(menu, format, ext) { this.isFromFileDownloadAs = ext; - this.api.asc_DownloadAs(format, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true)); menu.hide(); }, @@ -269,27 +269,31 @@ define([ defFileName = defFileName.substring(0, idx) + this.isFromFileDownloadAs; } - me._saveCopyDlg = new Common.Views.SaveAsDlg({ - saveFolderUrl: me.mode.saveAsUrl, - saveFileUrl: url, - defFileName: defFileName - }); - me._saveCopyDlg.on('saveaserror', function(obj, err){ - var config = { - closable: false, - title: me.notcriticalErrorTitle, - msg: err, - iconCls: 'warn', - buttons: ['ok'], - callback: function(btn){ - Common.NotificationCenter.trigger('edit:complete', me); - } - }; - Common.UI.alert(config); - }).on('close', function(obj){ - me._saveCopyDlg = undefined; - }); - me._saveCopyDlg.show(); + if (me.mode.canRequestSaveAs) { + Common.Gateway.requestSaveAs(url, defFileName); + } else { + me._saveCopyDlg = new Common.Views.SaveAsDlg({ + saveFolderUrl: me.mode.saveAsUrl, + saveFileUrl: url, + defFileName: defFileName + }); + me._saveCopyDlg.on('saveaserror', function(obj, err){ + var config = { + closable: false, + title: me.notcriticalErrorTitle, + msg: err, + iconCls: 'warn', + buttons: ['ok'], + callback: function(btn){ + Common.NotificationCenter.trigger('edit:complete', me); + } + }; + Common.UI.alert(config); + }).on('close', function(obj){ + me._saveCopyDlg = undefined; + }); + me._saveCopyDlg.show(); + } } this.isFromFileDownloadAs = false; }, diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 3bfe5f948..eadff86e7 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -316,6 +316,8 @@ define([ this.appOptions.canPlugins = false; this.appOptions.canRequestUsers = this.editorConfig.canRequestUsers; this.appOptions.canRequestSendNotify = this.editorConfig.canRequestSendNotify; + this.appOptions.canRequestSaveAs = this.editorConfig.canRequestSaveAs; + this.appOptions.canRequestInsertImage = this.editorConfig.canRequestInsertImage; appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); appHeader.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : '') @@ -419,7 +421,7 @@ define([ if ( !_format || _supported.indexOf(_format) < 0 ) _format = Asc.c_oAscFileType.PPTX; - this.api.asc_DownloadAs(_format, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true)); }, onProcessMouse: function(data) { @@ -1758,7 +1760,7 @@ define([ if (!this.appOptions.canPrint || this.isModalShowed) return; if (this.api) - this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event + this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event Common.component.Analytics.trackEvent('Print'); }, @@ -1784,18 +1786,17 @@ define([ me.iframePrint.contentWindow.blur(); window.focus(); } catch (e) { - me.api.asc_DownloadAs(Asc.c_oAscFileType.PDF); + me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF)); } }; } if (url) this.iframePrint.src = url; }, - onAdvancedOptions: function(advOptions) { + onAdvancedOptions: function(type, advOptions) { if (this._state.openDlg) return; - var type = advOptions.asc_getOptionId(), - me = this; + var me = this; if (type == Asc.c_oAscAdvancedOptionsID.DRM) { me._state.openDlg = new Common.Views.OpenDialog({ title: Common.Views.OpenDialog.prototype.txtTitleProtected, diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index e236209f8..c2563c927 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -161,7 +161,7 @@ define([ if ( !_format || _supported.indexOf(_format) < 0 ) _format = Asc.c_oAscFileType.PDF; - _main.api.asc_DownloadAs(_format); + _main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format)); }, 'go:editor': function() { Common.Gateway.requestEditRights(); @@ -314,6 +314,7 @@ define([ toolbar.btnEditHeader.on('click', _.bind(this.onEditHeaderClick, this, 'header')); toolbar.btnInsDateTime.on('click', _.bind(this.onEditHeaderClick, this, 'datetime')); toolbar.btnInsSlideNum.on('click', _.bind(this.onEditHeaderClick, this, 'slidenum')); + Common.Gateway.on('insertimage', _.bind(this.insertImage, this)); this.onSetupCopyStyleButton(); }, @@ -893,7 +894,7 @@ define([ onPrint: function(e) { if (this.api) - this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event + this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event Common.NotificationCenter.trigger('edit:complete', this.toolbar); @@ -1390,13 +1391,23 @@ define([ } })).show(); } else if (opts === 'storage') { - (new Common.Views.SelectFileDlg({ - fileChoiceUrl: me.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly") - })).on('selectfile', function(obj, file){ - me.toolbar.fireEvent('insertimage', me.toolbar); - me.api.AddImageUrl(file.url, undefined, true);// for loading from storage; - Common.component.Analytics.trackEvent('ToolBar', 'Image'); - }).show(); + if (this.toolbar.mode.canRequestInsertImage) { + Common.Gateway.requestInsertImage(); + } else { + (new Common.Views.SelectFileDlg({ + fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly") + })).on('selectfile', function(obj, file){ + me.insertImage(file); + }).show(); + } + } + }, + + insertImage: function(data) { + if (data && data.url) { + this.toolbar.fireEvent('insertimage', this.toolbar); + this.api.AddImageUrl(data.url, undefined, data.token);// for loading from storage + Common.component.Analytics.trackEvent('ToolBar', 'Image'); } }, diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 4cc11dc79..3a7fa0803 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -214,8 +214,6 @@ define([ var me = this; me.panels = { - 'saveas' : (new PE.Views.FileMenuPanels.ViewSaveAs({menu:me})).render(), - 'save-copy' : (new PE.Views.FileMenuPanels.ViewSaveCopy({menu:me})).render(), 'opts' : (new PE.Views.FileMenuPanels.Settings({menu:me})).render(), 'info' : (new PE.Views.FileMenuPanels.DocumentInfo({menu:me})).render(), 'rights' : (new PE.Views.FileMenuPanels.DocumentRights({menu:me})).render() @@ -256,7 +254,7 @@ define([ this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide'](); this.miDownload[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide'](); - this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && this.mode.saveAsUrl ?'show':'hide'](); + this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) ?'show':'hide'](); this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide'](); // this.hkSaveAs[this.mode.canDownload?'enable':'disable'](); @@ -297,6 +295,14 @@ define([ this.panels['protect'].setMode(this.mode); } + if (this.mode.canDownload) { + this.panels['saveas'] = ((new PE.Views.FileMenuPanels.ViewSaveAs({menu: this})).render()); + } + + if (this.mode.canDownload && (this.mode.canRequestSaveAs || this.mode.saveAsUrl)) { + this.panels['save-copy'] = ((new PE.Views.FileMenuPanels.ViewSaveCopy({menu: this})).render()); + } + if (this.mode.canHelp) { this.panels['help'] = ((new PE.Views.FileMenuPanels.Help({menu: this})).render()); this.panels['help'].setLangConfig(this.mode.lang); diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 01bab61b7..17a41d5c8 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -794,6 +794,11 @@ define([ }, updateInfo: function(doc) { + if (!this.doc && doc && doc.info) { + doc.info.author && console.log("Obsolete: The 'author' parameter of the document 'info' section is deprecated. Please use 'owner' instead."); + doc.info.created && console.log("Obsolete: The 'created' parameter of the document 'info' section is deprecated. Please use 'uploaded' instead."); + } + this.doc = doc; if (!this.rendered) return; @@ -805,12 +810,14 @@ define([ if (doc.info.folder ) this.lblPlacement.text( doc.info.folder ); 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; + var value = doc.info.owner || doc.info.author; + if (value) + this.lblOwner.text(value); + visible = this._ShowHideInfoItem(this.lblOwner, !!value) || visible; + value = doc.info.uploaded || doc.info.created; + if (value) + this.lblUploaded.text(value); + visible = this._ShowHideInfoItem(this.lblUploaded, !!value) || visible; } else this._ShowHideDocInfo(false); $('tr.divider.general', this.el)[visible?'show':'hide'](); diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index c71d95291..cd366f3aa 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -983,7 +983,7 @@ define([ me.fireEvent('insert:image', [item.value]); }) ); - btn.menu.items[2].setVisible(config.fileChoiceUrl && config.fileChoiceUrl.indexOf("{documentType}")>-1); + btn.menu.items[2].setVisible(config.canRequestInsertImage || config.fileChoiceUrl && config.fileChoiceUrl.indexOf("{documentType}")>-1); }); me.btnsInsertText.forEach(function (btn) { diff --git a/apps/presentationeditor/main/index.html b/apps/presentationeditor/main/index.html index e8902a029..069ad3a3f 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: 10000; + z-index: 1001; } .loader-page { diff --git a/apps/presentationeditor/main/index.html.deploy b/apps/presentationeditor/main/index.html.deploy index 35b7f18ae..f863038ca 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: 10000; + z-index: 1001; } .loader-page { diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index a3e746c08..6be231f16 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -259,6 +259,10 @@ define([ if (data.doc) { PE.getController('Toolbar').setDocumentTitle(data.doc.title); + if (data.doc.info) { + data.doc.info.author && console.log("Obsolete: The 'author' parameter of the document 'info' section is deprecated. Please use 'owner' instead."); + data.doc.info.created && console.log("Obsolete: The 'created' parameter of the document 'info' section is deprecated. Please use 'uploaded' instead."); + } } }, @@ -311,7 +315,7 @@ define([ return; } this._state.isFromGatewayDownloadAs = true; - this.api.asc_DownloadAs(Asc.c_oAscFileType.PPTX, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, true)); }, goBack: function(current) { @@ -1089,11 +1093,10 @@ define([ this.isThumbnailsShow = isShow; }, - onAdvancedOptions: function(advOptions) { + onAdvancedOptions: function(type, advOptions) { if (this._state.openDlg) return; - var type = advOptions.asc_getOptionId(), - me = this; + var me = this; if (type == Asc.c_oAscAdvancedOptionsID.DRM) { $(me.loadMask).hasClass('modal-in') && uiApp.closeModal(me.loadMask); diff --git a/apps/presentationeditor/mobile/app/controller/Settings.js b/apps/presentationeditor/mobile/app/controller/Settings.js index ba56d02d7..aa85b12be 100644 --- a/apps/presentationeditor/mobile/app/controller/Settings.js +++ b/apps/presentationeditor/mobile/app/controller/Settings.js @@ -200,8 +200,10 @@ define([ info = document.info || {}; document.title ? $('#settings-presentation-title').html(document.title) : $('.display-presentation-title').remove(); - info.author ? $('#settings-pe-owner').html(info.author) : $('.display-owner').remove(); - info.uploaded ? $('#settings-pe-uploaded').html(info.uploaded.toLocaleString()) : $('.display-uploaded').remove(); + var value = info.owner || info.author; + value ? $('#settings-pe-owner').html(value) : $('.display-owner').remove(); + value = info.uploaded || info.created; + value ? $('#settings-pe-uploaded').html(value) : $('.display-uploaded').remove(); info.folder ? $('#settings-pe-location').html(info.folder) : $('.display-location').remove(); var appProps = (this.api) ? this.api.asc_getAppProps() : null; @@ -210,8 +212,7 @@ define([ appName ? $('#settings-pe-application').html(appName) : $('.display-application').remove(); } - var props = (this.api) ? this.api.asc_getCoreProps() : null, - value; + var props = (this.api) ? this.api.asc_getCoreProps() : null; if (props) { value = props.asc_getTitle(); value ? $('#settings-pe-title').html(value) : $('.display-title').remove(); @@ -381,7 +382,7 @@ define([ if (format) { _.defer(function () { - me.api.asc_DownloadAs(format); + me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); }); } diff --git a/apps/presentationeditor/mobile/app/controller/Toolbar.js b/apps/presentationeditor/mobile/app/controller/Toolbar.js index 1f268a8a5..e9f6a53a0 100644 --- a/apps/presentationeditor/mobile/app/controller/Toolbar.js +++ b/apps/presentationeditor/mobile/app/controller/Toolbar.js @@ -80,7 +80,7 @@ define([ this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo')); this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this)); this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this)); - this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.displayCollaboration, this)) + this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.displayCollaboration, this)); this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.displayCollaboration, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); }, diff --git a/apps/presentationeditor/mobile/resources/css/app-ios.css b/apps/presentationeditor/mobile/resources/css/app-ios.css index cbd29c840..73d3feb0d 100644 --- a/apps/presentationeditor/mobile/resources/css/app-ios.css +++ b/apps/presentationeditor/mobile/resources/css/app-ios.css @@ -6895,17 +6895,17 @@ i.icon.icon-app-settings { i.icon.icon-cut { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20d%3D%22M19.4406%2016.7116C17.8368%2016.7116%2016.4336%2017.76%2015.9825%2019.2576L13.1259%2013.5167L19.4907%200.737143C19.5909%200.487542%2019.4907%200.18802%2019.2902%200.0881796C19.0396%20-0.011661%2018.7389%200.0881795%2018.6387%200.287861L12.5245%2012.3686L6.51049%200.287861C6.41026%200.0382593%206.10956%20-0.0615813%205.85898%200.0382593C5.6084%200.1381%205.50816%200.437622%205.6084%200.687223L11.9732%2013.4668L9.06644%2019.2576C8.61539%2017.8099%207.21213%2016.7116%205.6084%2016.7116C3.60373%2016.7116%202%2018.3091%202%2020.3059C2%2022.3027%203.60373%2023.9002%205.6084%2023.9002C6.91143%2023.9002%208.06411%2023.2013%208.71562%2022.153C8.71562%2022.153%208.71562%2022.1529%208.71562%2022.103C8.81586%2021.9533%208.86597%2021.8035%208.91609%2021.6537L12.5245%2014.615L16.0828%2021.7037C16.1329%2021.8534%2016.2331%2022.0032%2016.2832%2022.153V22.2029C16.2832%2022.2029%2016.2832%2022.2029%2016.2832%2022.2528C16.9347%2023.3011%2018.0874%2024%2019.3905%2024C21.3951%2024%2022.9989%2022.4026%2022.9989%2020.4057C23.049%2018.359%2021.4452%2016.7116%2019.4406%2016.7116ZM5.6084%2022.9517C4.15501%2022.9517%203.00233%2021.8035%203.00233%2020.3558C3.00233%2018.9081%204.15501%2017.76%205.6084%2017.76C7.06178%2017.76%208.21446%2018.9081%208.21446%2020.3558C8.21446%2020.7053%208.16434%2021.0547%208.01399%2021.3542L7.91376%2021.5539C7.51283%2022.3526%206.66084%2022.9517%205.6084%2022.9517ZM19.4406%2022.9517C18.4382%2022.9517%2017.5361%2022.3526%2017.1352%2021.504L17.035%2021.3043C16.9347%2021.0048%2016.8345%2020.6553%2016.8345%2020.3059C16.8345%2018.8582%2017.9872%2017.71%2019.4406%2017.71C20.894%2017.71%2022.0466%2018.8582%2022.0466%2020.3059C22.0466%2021.7536%2020.894%2022.9517%2019.4406%2022.9517Z%22%20fill%3D%22white%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.22427%2022.2702C4.51527%2023.1269%206.52738%2022.7183%207.6592%2021.0127C8.79101%2019.3071%208.38572%2017.2943%207.09472%2016.4376C5.80372%2015.5809%203.79161%2015.9896%202.65979%2017.6952C1.52798%2019.4008%201.93328%2021.4136%203.22427%2022.2702ZM2.67135%2023.1035C4.51208%2024.325%207.11827%2023.6364%208.49243%2021.5656C9.8666%2019.4948%209.48837%2016.8259%207.64764%2015.6044C5.80691%2014.3829%203.20072%2015.0714%201.82656%2017.1422C0.452398%2019.2131%200.830625%2021.882%202.67135%2023.1035Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M20.9158%2022.2702C19.6248%2023.1269%2017.6127%2022.7183%2016.4809%2021.0127C15.349%2019.3071%2015.7543%2017.2943%2017.0453%2016.4376C18.3363%2015.5809%2020.3484%2015.9896%2021.4803%2017.6952C22.6121%2019.4008%2022.2068%2021.4136%2020.9158%2022.2702ZM21.4687%2023.1035C19.628%2024.325%2017.0218%2023.6364%2015.6476%2021.5656C14.2735%2019.4948%2014.6517%2016.8259%2016.4924%2015.6044C18.3331%2014.3829%2020.9393%2015.0714%2022.3135%2017.1422C23.6877%2019.2131%2023.3094%2021.882%2021.4687%2023.1035Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M16.4924%2015.6044L13.9037%2012.4737L19.9552%200.675715C20.0693%200.446914%2019.9552%200.172352%2019.727%200.0808313C19.4416%20-0.0106892%2019.0993%200.0808312%2018.9851%200.263872L12.0233%2011.4212L5.17562%200.263872C5.06149%200.035071%204.71911%20-0.0564496%204.43379%200.035071C4.14847%200.126592%204.03434%200.401153%204.14847%200.629955L10.2001%2012.4279L7.64761%2015.6044L9.2292%2018L12.0233%2013.4804L14.9108%2018L16.4924%2015.6044Z%22%20fill%3D%22white%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); } i.icon.icon-copy { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M3%203.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M3%207.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M3%2011.5H9%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M9%2014.5H0.5V0.5H14.5V9H9.5H9V9.5V14.5ZM15%2010V9.5H23.5V23.5H9.5V15.5H10V15V14.5V10H15Z%22%20stroke%3D%22white%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1%201H15V7H16V0H0V17H8V16H1V1Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M23%208H9V23H23V8ZM8%207V24H24V7H8Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M13%205H3V4H13V5Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%209H3V8H8V9Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%2013H3V12H8V13Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H11V11H21V12Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H11V15H21V16Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H11V19H21V20Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E"); } i.icon.icon-paste { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M13%202.5H4%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%202.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%201.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%203.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%204.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%200.5L5%200.500001%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M9.5%209H9V9.5V19H10V10H23.5V23.5H9.5V20V19.5H9H0.5V2.5H18.5V9H9.5Z%22%20stroke%3D%22white%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%202H0V20H9V24H24V7H19V2H14V3H18V7H9V19H1V3H5V2ZM10%208H23V23H10V8Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M5%200H14V5H5V0Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H12V11H21V12Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H12V15H21V16Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H12V19H21V20Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E"); } .label-switch input[type="checkbox"]:checked + .checkbox { background: #aa5252; diff --git a/apps/presentationeditor/mobile/resources/css/app-material.css b/apps/presentationeditor/mobile/resources/css/app-material.css index 2f83aeb7d..e3141f1a9 100644 --- a/apps/presentationeditor/mobile/resources/css/app-material.css +++ b/apps/presentationeditor/mobile/resources/css/app-material.css @@ -6419,17 +6419,17 @@ i.icon.icon-app-settings { i.icon.icon-cut { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20d%3D%22M19.4406%2016.7116C17.8368%2016.7116%2016.4336%2017.76%2015.9825%2019.2576L13.1259%2013.5167L19.4907%200.737143C19.5909%200.487542%2019.4907%200.18802%2019.2902%200.0881796C19.0396%20-0.011661%2018.7389%200.0881795%2018.6387%200.287861L12.5245%2012.3686L6.51049%200.287861C6.41026%200.0382593%206.10956%20-0.0615813%205.85898%200.0382593C5.6084%200.1381%205.50816%200.437622%205.6084%200.687223L11.9732%2013.4668L9.06644%2019.2576C8.61539%2017.8099%207.21213%2016.7116%205.6084%2016.7116C3.60373%2016.7116%202%2018.3091%202%2020.3059C2%2022.3027%203.60373%2023.9002%205.6084%2023.9002C6.91143%2023.9002%208.06411%2023.2013%208.71562%2022.153C8.71562%2022.153%208.71562%2022.1529%208.71562%2022.103C8.81586%2021.9533%208.86597%2021.8035%208.91609%2021.6537L12.5245%2014.615L16.0828%2021.7037C16.1329%2021.8534%2016.2331%2022.0032%2016.2832%2022.153V22.2029C16.2832%2022.2029%2016.2832%2022.2029%2016.2832%2022.2528C16.9347%2023.3011%2018.0874%2024%2019.3905%2024C21.3951%2024%2022.9989%2022.4026%2022.9989%2020.4057C23.049%2018.359%2021.4452%2016.7116%2019.4406%2016.7116ZM5.6084%2022.9517C4.15501%2022.9517%203.00233%2021.8035%203.00233%2020.3558C3.00233%2018.9081%204.15501%2017.76%205.6084%2017.76C7.06178%2017.76%208.21446%2018.9081%208.21446%2020.3558C8.21446%2020.7053%208.16434%2021.0547%208.01399%2021.3542L7.91376%2021.5539C7.51283%2022.3526%206.66084%2022.9517%205.6084%2022.9517ZM19.4406%2022.9517C18.4382%2022.9517%2017.5361%2022.3526%2017.1352%2021.504L17.035%2021.3043C16.9347%2021.0048%2016.8345%2020.6553%2016.8345%2020.3059C16.8345%2018.8582%2017.9872%2017.71%2019.4406%2017.71C20.894%2017.71%2022.0466%2018.8582%2022.0466%2020.3059C22.0466%2021.7536%2020.894%2022.9517%2019.4406%2022.9517Z%22%20fill%3D%22black%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22black%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.22427%2022.2702C4.51527%2023.1269%206.52738%2022.7183%207.6592%2021.0127C8.79101%2019.3071%208.38572%2017.2943%207.09472%2016.4376C5.80372%2015.5809%203.79161%2015.9896%202.65979%2017.6952C1.52798%2019.4008%201.93328%2021.4136%203.22427%2022.2702ZM2.67135%2023.1035C4.51208%2024.325%207.11827%2023.6364%208.49243%2021.5656C9.8666%2019.4948%209.48837%2016.8259%207.64764%2015.6044C5.80691%2014.3829%203.20072%2015.0714%201.82656%2017.1422C0.452398%2019.2131%200.830625%2021.882%202.67135%2023.1035Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M20.9158%2022.2702C19.6248%2023.1269%2017.6127%2022.7183%2016.4809%2021.0127C15.349%2019.3071%2015.7543%2017.2943%2017.0453%2016.4376C18.3363%2015.5809%2020.3484%2015.9896%2021.4803%2017.6952C22.6121%2019.4008%2022.2068%2021.4136%2020.9158%2022.2702ZM21.4687%2023.1035C19.628%2024.325%2017.0218%2023.6364%2015.6476%2021.5656C14.2735%2019.4948%2014.6517%2016.8259%2016.4924%2015.6044C18.3331%2014.3829%2020.9393%2015.0714%2022.3135%2017.1422C23.6877%2019.2131%2023.3094%2021.882%2021.4687%2023.1035Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M16.4924%2015.6044L13.9037%2012.4737L19.9552%200.675715C20.0693%200.446914%2019.9552%200.172352%2019.727%200.0808313C19.4416%20-0.0106892%2019.0993%200.0808312%2018.9851%200.263872L12.0233%2011.4212L5.17562%200.263872C5.06149%200.035071%204.71911%20-0.0564496%204.43379%200.035071C4.14847%200.126592%204.03434%200.401153%204.14847%200.629955L10.2001%2012.4279L7.64761%2015.6044L9.2292%2018L12.0233%2013.4804L14.9108%2018L16.4924%2015.6044Z%22%20fill%3D%22black%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22black%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); } i.icon.icon-copy { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M3%203.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M3%207.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M3%2011.5H9%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M9%2014.5H0.5V0.5H14.5V9H9.5H9V9.5V14.5ZM15%2010V9.5H23.5V23.5H9.5V15.5H10V15V14.5V10H15Z%22%20stroke%3D%22black%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1%201H15V7H16V0H0V17H8V16H1V1Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M23%208H9V23H23V8ZM8%207V24H24V7H8Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M13%205H3V4H13V5Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%209H3V8H8V9Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%2013H3V12H8V13Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H11V11H21V12Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H11V15H21V16Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H11V19H21V20Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E"); } i.icon.icon-paste { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M13%202.5H4%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%202.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%201.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%203.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%204.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%200.5L5%200.500001%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M9.5%209H9V9.5V19H10V10H23.5V23.5H9.5V20V19.5H9H0.5V2.5H18.5V9H9.5Z%22%20stroke%3D%22black%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%202H0V20H9V24H24V7H19V2H14V3H18V7H9V19H1V3H5V2ZM10%208H23V23H10V8Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M5%200H14V5H5V0Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H12V11H21V12Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H12V15H21V16Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H12V19H21V20Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E"); } .navbar i.icon.icon-undo { width: 22px; diff --git a/apps/presentationeditor/mobile/resources/less/ios/_icons.less b/apps/presentationeditor/mobile/resources/less/ios/_icons.less index f18b1a51d..151f6aee8 100644 --- a/apps/presentationeditor/mobile/resources/less/ios/_icons.less +++ b/apps/presentationeditor/mobile/resources/less/ios/_icons.less @@ -413,16 +413,16 @@ i.icon { &.icon-cut { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-copy { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-paste { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } } \ No newline at end of file diff --git a/apps/presentationeditor/mobile/resources/less/material/_icons.less b/apps/presentationeditor/mobile/resources/less/material/_icons.less index c1727bc4f..3fce40fe4 100644 --- a/apps/presentationeditor/mobile/resources/less/material/_icons.less +++ b/apps/presentationeditor/mobile/resources/less/material/_icons.less @@ -383,17 +383,17 @@ i.icon { &.icon-cut { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-copy { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-paste { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } } diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 40235cd48..9dafa9ae0 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -156,7 +156,7 @@ SSE.ApplicationController = new(function(){ function onPrint() { if ( permissions.print!==false ) - api.asc_Print(undefined, $.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } function onPrintUrl(url) { @@ -204,7 +204,7 @@ SSE.ApplicationController = new(function(){ common.utils.openLink(embedConfig.saveUrl); } else if (permissions.print!==false){ - api.asc_Print(undefined, $.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } Common.Analytics.trackEvent('Save'); @@ -464,7 +464,7 @@ SSE.ApplicationController = new(function(){ Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny); return; } - api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true); + api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true)); } function onApiMouseMove(array) { diff --git a/apps/spreadsheeteditor/main/app/controller/DataTab.js b/apps/spreadsheeteditor/main/app/controller/DataTab.js index cf8a5635c..3f967f4ad 100644 --- a/apps/spreadsheeteditor/main/app/controller/DataTab.js +++ b/apps/spreadsheeteditor/main/app/controller/DataTab.js @@ -68,7 +68,7 @@ define([ }); this._state = { - CSVOptions: new Asc.asc_CCSVAdvancedOptions(0, 4, '') + CSVOptions: new Asc.asc_CTextOptions(0, 4, '') }; }, onLaunch: function () { @@ -177,7 +177,7 @@ define([ handler: function (result, encoding, delimiter, delimiterChar) { if (result == 'ok') { if (me && me.api) { - me.api.asc_TextToColumns(new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar)); + me.api.asc_TextToColumns(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar)); } } } diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 1ea24df64..f8ddaa468 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -77,7 +77,8 @@ define([ ttHeight: 20 }, filter: {ttHeight: 40}, - func_arg: {} + func_arg: {}, + input_msg: {} }; me.mouse = {}; me.popupmenu = false; @@ -289,6 +290,7 @@ define([ this.api.asc_registerCallback('asc_onToggleAutoCorrectOptions', _.bind(this.onToggleAutoCorrectOptions, this)); this.api.asc_registerCallback('asc_onFormulaInfo', _.bind(this.onFormulaInfo, this)); this.api.asc_registerCallback('asc_ChangeCropState', _.bind(this.onChangeCropState, this)); + this.api.asc_registerCallback('asc_onInputMessage', _.bind(this.onInputMessage, this)); } return this; }, @@ -2131,6 +2133,63 @@ define([ } }, + onInputMessage: function(title, message) { + var inputtip = this.tooltips.input_msg; + + if (message) { + if (!inputtip.parentEl) { + inputtip.parentEl = $('
'); + this.documentHolder.cmpEl.append(inputtip.parentEl); + } + + var hint = title ? ('' + (title || '') + '
') : ''; + hint += (message || ''); + + if (inputtip.ref && inputtip.ref.isVisible()) { + if (inputtip.text != hint) { + inputtip.ref.hide(); + inputtip.ref = undefined; + inputtip.text = ''; + inputtip.isHidden = true; + } + } + + if (!inputtip.ref || !inputtip.ref.isVisible()) { + inputtip.text = hint; + inputtip.ref = new Common.UI.Tooltip({ + owner : inputtip.parentEl, + html : true, + title : hint + }); + + inputtip.ref.show([-10000, -10000]); + inputtip.isHidden = false; + } + + var pos = [ + this.documentHolder.cmpEl.offset().left - $(window).scrollLeft(), + this.documentHolder.cmpEl.offset().top - $(window).scrollTop() + ], + coord = this.api.asc_getActiveCellCoord(), + showPoint = [coord.asc_getX() + pos[0] - 3, coord.asc_getY() + pos[1] - inputtip.ref.getBSTip().$tip.height() - 5]; + var tipwidth = inputtip.ref.getBSTip().$tip.width(); + if (showPoint[0] + tipwidth > this.tooltips.coauth.bodyWidth ) + showPoint[0] = this.tooltips.coauth.bodyWidth - tipwidth; + + inputtip.ref.getBSTip().$tip.css({ + top : showPoint[1] + 'px', + left: showPoint[0] + 'px' + }); + } else { + if (!inputtip.isHidden && inputtip.ref) { + inputtip.ref.hide(); + inputtip.ref = undefined; + inputtip.text = ''; + inputtip.isHidden = true; + } + } + }, + onShowSpecialPasteOptions: function(specialPasteShowOptions) { var me = this, documentHolderView = me.documentHolder, @@ -2204,7 +2263,7 @@ define([ if (me && me.api) { var props = new Asc.SpecialPasteProps(); props.asc_setProps(Asc.c_oSpecialPasteProps.useTextImport); - props.asc_setAdvancedOptions(new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar)); + props.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar)); me.api.asc_SpecialPaste(props); } me._state.lastSpecPasteChecked = item; diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index 596a68398..4667170d1 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -264,7 +264,7 @@ define([ buttons: ['ok', 'cancel'], callback: _.bind(function(btn){ if (btn == 'ok') { - this.api.asc_DownloadAs(format); + Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format)); menu.hide(); } }, this) @@ -273,7 +273,7 @@ define([ menu.hide(); Common.NotificationCenter.trigger('download:settings', this.leftMenu, format); } else { - this.api.asc_DownloadAs(format); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); menu.hide(); } }, @@ -287,7 +287,7 @@ define([ callback: _.bind(function(btn){ if (btn == 'ok') { this.isFromFileDownloadAs = ext; - this.api.asc_DownloadAs(format, true); + Common.NotificationCenter.trigger('download:advanced', Asc.c_oAscAdvancedOptionsID.CSV, this.api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format, true)); menu.hide(); } }, this) @@ -298,7 +298,7 @@ define([ Common.NotificationCenter.trigger('download:settings', this.leftMenu, format, true); } else { this.isFromFileDownloadAs = ext; - this.api.asc_DownloadAs(format, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true)); menu.hide(); } }, @@ -315,27 +315,31 @@ define([ defFileName = defFileName.substring(0, idx) + this.isFromFileDownloadAs; } - me._saveCopyDlg = new Common.Views.SaveAsDlg({ - saveFolderUrl: me.mode.saveAsUrl, - saveFileUrl: url, - defFileName: defFileName - }); - me._saveCopyDlg.on('saveaserror', function(obj, err){ - var config = { - closable: false, - title: me.textWarning, - msg: err, - iconCls: 'warn', - buttons: ['ok'], - callback: function(btn){ - Common.NotificationCenter.trigger('edit:complete', me); - } - }; - Common.UI.alert(config); - }).on('close', function(obj){ - me._saveCopyDlg = undefined; - }); - me._saveCopyDlg.show(); + if (me.mode.canRequestSaveAs) { + Common.Gateway.requestSaveAs(url, defFileName); + } else { + me._saveCopyDlg = new Common.Views.SaveAsDlg({ + saveFolderUrl: me.mode.saveAsUrl, + saveFileUrl: url, + defFileName: defFileName + }); + me._saveCopyDlg.on('saveaserror', function(obj, err){ + var config = { + closable: false, + title: me.textWarning, + msg: err, + iconCls: 'warn', + buttons: ['ok'], + callback: function(btn){ + Common.NotificationCenter.trigger('edit:complete', me); + } + }; + Common.UI.alert(config); + }).on('close', function(obj){ + me._saveCopyDlg = undefined; + }); + me._saveCopyDlg.show(); + } } this.isFromFileDownloadAs = false; }, diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index c760ad729..8686c02eb 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -168,6 +168,7 @@ define([ Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this)); Common.NotificationCenter.on('download:cancel', _.bind(this.onDownloadCancel, this)); + Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this)); this.stackLongActions = new Common.IrregularStack({ strongCompare : this._compareActionStrong, @@ -321,6 +322,8 @@ define([ this.appOptions.canPlugins = false; this.appOptions.canRequestUsers = this.editorConfig.canRequestUsers; this.appOptions.canRequestSendNotify = this.editorConfig.canRequestSendNotify; + this.appOptions.canRequestSaveAs = this.editorConfig.canRequestSaveAs; + this.appOptions.canRequestInsertImage = this.editorConfig.canRequestInsertImage; 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 : '') @@ -434,7 +437,7 @@ define([ if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA) Common.NotificationCenter.trigger('download:settings', this, _format, true); else - this.api.asc_DownloadAs(_format, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true)); }, onProcessMouse: function(data) { @@ -1364,6 +1367,17 @@ define([ config.msg = this.errorFrmlMaxTextLength; break; + case Asc.c_oAscError.ID.DataValidate: + var icon = errData ? errData.asc_getErrorStyle() : null; + if (icon) { + config.iconCls = (icon==Asc.c_oAscEDataValidationErrorStyle.Stop) ? 'error' : ((icon==Asc.c_oAscEDataValidationErrorStyle.Information) ? 'info' : 'warn'); + } + errData && errData.asc_getErrorTitle() && (config.title = errData.asc_getErrorTitle()); + config.buttons = ['ok', 'cancel']; + config.msg = errData && errData.asc_getError() ? errData.asc_getError() : this.errorDataValidate; + config.maxwidth = 600; + break; + default: config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id); break; @@ -1392,9 +1406,9 @@ define([ } else { Common.Gateway.reportWarning(id, config.msg); - config.title = this.notcriticalErrorTitle; - config.iconCls = 'warn'; - config.buttons = ['ok']; + config.title = config.title || this.notcriticalErrorTitle; + config.iconCls = config.iconCls || 'warn'; + config.buttons = config.buttons || ['ok']; config.callback = _.bind(function(btn){ if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) { Common.UI.Menu.Manager.hideAll(); @@ -1402,6 +1416,8 @@ define([ } else if (id == Asc.c_oAscError.ID.EditingError) { this.disableEditing(true); Common.NotificationCenter.trigger('api:disconnect', true); // enable download and print + } else if (id == Asc.c_oAscError.ID.DataValidate && btn !== 'ok') { + this.api.asc_closeCellEditor(); } this._state.lostEditingRights = false; this.onEditComplete(); @@ -1602,25 +1618,28 @@ define([ return false; }, - onAdvancedOptions: function(advOptions, mode) { + onAdvancedOptions: function(type, advOptions, mode, formatOptions) { if (this._state.openDlg) return; - var type = advOptions.asc_getOptionId(), - me = this; + var me = this; if (type == Asc.c_oAscAdvancedOptionsID.CSV) { me._state.openDlg = new Common.Views.OpenDialog({ title: Common.Views.OpenDialog.prototype.txtTitle.replace('%1', 'CSV'), closable: (mode==2), // if save settings type: Common.Utils.importTextType.CSV, - preview: advOptions.asc_getOptions().asc_getData(), - codepages: advOptions.asc_getOptions().asc_getCodePages(), - settings: advOptions.asc_getOptions().asc_getRecommendedSettings(), + preview: advOptions.asc_getData(), + codepages: advOptions.asc_getCodePages(), + settings: advOptions.asc_getRecommendedSettings(), api: me.api, handler: function (result, encoding, delimiter, delimiterChar) { me.isShowOpenDialog = false; if (result == 'ok') { if (me && me.api) { - me.api.asc_setAdvancedOptions(type, new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar)); + if (mode==2) { + formatOptions && formatOptions.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar)); + me.api.asc_DownloadAs(formatOptions); + } else + me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar)); me.loadMask && me.loadMask.show(); } } @@ -2021,7 +2040,9 @@ define([ me.iframePrint.contentWindow.blur(); window.focus(); } catch (e) { - me.api.asc_DownloadAs(Asc.c_oAscFileType.PDF, false, me.getApplication().getController('Print').getPrintParams()); + var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF); + opts.asc_setAdvancedOptions(me.getApplication().getController('Print').getPrintParams()); + me.api.asc_DownloadAs(opts); } }; } @@ -2368,7 +2389,8 @@ define([ errorNoDataToParse: 'No data was selected to parse.', errorCannotUngroup: 'Cannot ungroup. To start an outline, select the detail rows or columns and group them.', errorFrmlMaxTextLength: 'Text values in formulas are limited to 255 characters.
Use the CONCATENATE function or concatenation operator (&)', - waitText: 'Please, wait...' + waitText: 'Please, wait...', + errorDataValidate: 'The value you entered is not valid.
A user has restricted values that can be entered into this cell.' } })(), SSE.Controllers.Main || {})) }); diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index aba2b4079..df38ffdea 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -266,10 +266,15 @@ define([ this.adjPrintParams.asc_setIgnorePrintArea(this.printSettingsDlg.getIgnorePrintArea()); Common.localStorage.setItem("sse-print-settings-range", printtype); - if ( this.printSettingsDlg.type=='print' ) - this.api.asc_Print(this.adjPrintParams, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); - else - this.api.asc_DownloadAs(this.downloadFormat, this.asUrl, this.adjPrintParams); + if ( this.printSettingsDlg.type=='print' ) { + var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); + opts.asc_setAdvancedOptions(this.adjPrintParams); + this.api.asc_Print(opts); + } else { + var opts = new Asc.asc_CDownloadOptions(this.downloadFormat, this.asUrl); + opts.asc_setAdvancedOptions(this.adjPrintParams); + this.api.asc_DownloadAs(opts); + } Common.component.Analytics.trackEvent((this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs'); Common.component.Analytics.trackEvent('ToolBar', (this.printSettingsDlg.type=='print') ? 'Print' : 'DownloadAs'); Common.NotificationCenter.trigger('edit:complete', view); diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 1c1aedbe2..731856662 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -113,7 +113,7 @@ define([ if (_format == Asc.c_oAscFileType.PDF || _format == Asc.c_oAscFileType.PDFA) Common.NotificationCenter.trigger('download:settings', this.toolbar, _format); else - _main.api.asc_DownloadAs(_format); + _main.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format)); }, 'go:editor': function() { Common.Gateway.requestEditRights(); @@ -365,6 +365,7 @@ define([ toolbar.btnImgForward.on('click', this.onImgArrangeSelect.bind(this, 'forward')); toolbar.btnImgBackward.on('click', this.onImgArrangeSelect.bind(this, 'backward')); toolbar.btnEditHeader.on('click', _.bind(this.onEditHeaderClick, this)); + Common.Gateway.on('insertimage', _.bind(this.insertImage, this)); this.onSetupCopyStyleButton(); } @@ -862,14 +863,23 @@ define([ } })).show(); } else if (item.value === 'storage') { - var me = this; - (new Common.Views.SelectFileDlg({ - fileChoiceUrl: me.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly") - })).on('selectfile', function(obj, file){ - me.toolbar.fireEvent('insertimage', me.toolbar); - me.api.asc_addImageDrawingObject(file.url, undefined, true);// for loading from storage; - Common.component.Analytics.trackEvent('ToolBar', 'Image'); - }).show(); + if (this.toolbar.mode.canRequestInsertImage) { + Common.Gateway.requestInsertImage(); + } else { + (new Common.Views.SelectFileDlg({ + fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly") + })).on('selectfile', function(obj, file){ + me.insertImage(file); + }).show(); + } + } + }, + + insertImage: function(data) { + if (data && data.url) { + this.toolbar.fireEvent('insertimage', this.toolbar); + this.api.asc_addImageDrawingObject(data.url, undefined, data.token);// for loading from storage + Common.component.Analytics.trackEvent('ToolBar', 'Image'); } }, @@ -2324,6 +2334,8 @@ define([ toolbar.lockToolbar(SSE.enumLock.commentLock, (selectionType == Asc.c_oAscSelectionType.RangeCells) && (info.asc_getComments().length>0 || info.asc_getLocked()), { array: this.btnsComment }); + + toolbar.lockToolbar(SSE.enumLock.headerLock, info.asc_getLockedHeaderFooter(), {array: [this.toolbar.btnEditHeader]}); }, onApiSelectionChanged_DiagramEditor: function(info) { diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index b4600ab43..722d725c1 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -203,8 +203,6 @@ define([ var me = this; me.panels = { - 'saveas' : (new SSE.Views.FileMenuPanels.ViewSaveAs({menu:me})).render(), - 'save-copy' : (new SSE.Views.FileMenuPanels.ViewSaveCopy({menu:me})).render(), 'opts' : (new SSE.Views.FileMenuPanels.Settings({menu:me})).render(), 'info' : (new SSE.Views.FileMenuPanels.DocumentInfo({menu:me})).render(), 'rights' : (new SSE.Views.FileMenuPanels.DocumentRights({menu:me})).render() @@ -245,7 +243,7 @@ define([ this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide'](); this.miDownload[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide'](); - this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && this.mode.saveAsUrl ?'show':'hide'](); + this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) ?'show':'hide'](); this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide'](); // this.hkSaveAs[this.mode.canDownload?'enable':'disable'](); @@ -288,6 +286,14 @@ define([ this.panels['protect'].setMode(this.mode); } + if (this.mode.canDownload) { + this.panels['saveas'] = ((new SSE.Views.FileMenuPanels.ViewSaveAs({menu: this})).render()); + } + + if (this.mode.canDownload && (this.mode.canRequestSaveAs || this.mode.saveAsUrl)) { + this.panels['save-copy'] = ((new SSE.Views.FileMenuPanels.ViewSaveCopy({menu: this})).render()); + } + if (this.mode.canHelp) { this.panels['help'] = ((new SSE.Views.FileMenuPanels.Help({menu: this})).render()); this.panels['help'].setLangConfig(this.mode.lang); diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index b11713712..058d0be4b 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1243,6 +1243,11 @@ define([ }, updateInfo: function(doc) { + if (!this.doc && doc && doc.info) { + doc.info.author && console.log("Obsolete: The 'author' parameter of the document 'info' section is deprecated. Please use 'owner' instead."); + doc.info.created && console.log("Obsolete: The 'created' parameter of the document 'info' section is deprecated. Please use 'uploaded' instead."); + } + this.doc = doc; if (!this.rendered) return; @@ -1254,12 +1259,14 @@ define([ if (doc.info.folder ) this.lblPlacement.text( doc.info.folder ); 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; + var value = doc.info.owner || doc.info.author; + if (value) + this.lblOwner.text(value); + visible = this._ShowHideInfoItem(this.lblOwner, !!value) || visible; + value = doc.info.uploaded || doc.info.created; + if (value) + this.lblUploaded.text(value); + visible = this._ShowHideInfoItem(this.lblUploaded, !!value) || visible; } else this._ShowHideDocInfo(false); $('tr.divider.general', this.el)[visible?'show':'hide'](); diff --git a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js index 5914dd12d..5e2a3cbd6 100644 --- a/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HeaderFooterDialog.js @@ -179,8 +179,17 @@ define([ }); this.chFirstPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){ var checked = (field.getValue()=='checked'); - if (this.HFObject) - this.HFObject.setDifferentFirst(checked); + var id = (this.HFObject) ? this.HFObject.setDifferentFirst(checked) : null; + if (id) { + var me = this; + this.showError(function() { + field.setValue(!checked, true); + _.delay(function(){ + me.onCanvasClick(id); + },50); + }); + return; + } this.btnFirst.setVisible(checked); if (!checked && this.btnFirst.isActive()) @@ -193,8 +202,17 @@ define([ }); this.chOddPage.on('change', _.bind(function(field, newValue, oldValue, eOpts){ var checked = (field.getValue()=='checked'); - if (this.HFObject) - this.HFObject.setDifferentOddEven(checked); + var id = (this.HFObject) ? this.HFObject.setDifferentOddEven(checked) : null; + if (id) { + var me = this; + this.showError(function() { + field.setValue(!checked, true); + _.delay(function(){ + me.onCanvasClick(id); + },50); + }); + return; + } this.btnOdd.setVisible(checked); this.btnEven.setVisible(checked); @@ -691,16 +709,33 @@ define([ }, _handleInput: function(state) { + if (this.HFObject) { + var id = this.HFObject.destroy(state=='ok'); + if (id) { + var me = this; + this.showError(function() { + _.delay(function(){ + me.onCanvasClick(id); + },50); + }); + return; + } + this.HFObject = null; + } if (this.options.handler) { this.options.handler.call(this, this, state); } - if (this.HFObject) { - this.HFObject.destroy(state=='ok'); - this.HFObject = null; - } this.close(); }, + showError: function(callback) { + Common.UI.warning({ + title: this.notcriticalErrorTitle, + msg : this.textMaxError, + callback: callback + }); + }, + scrollerUpdate: function() { for (var name in this.scrollers) { this.scrollers[name] && this.scrollers[name].update(); @@ -876,8 +911,34 @@ define([ }, onPageTypeToggle: function(type, btn, state) { + if (this._pagetype) return; + if (state && this.HFObject) { - this.HFObject.switchHeaderFooterType(type); + var prev = this.HFObject.getPageType(), + id = this.HFObject.switchHeaderFooterType(type); + if (id) { + this._pagetype = true; + var me = this; + this.showError(function() { + switch (prev) { + case Asc.c_oAscHeaderFooterType.odd: + me.btnOdd.isVisible() ? me.btnOdd.toggle(true) : me.btnAll.toggle(true); + break; + case Asc.c_oAscHeaderFooterType.even: + me.btnEven.toggle(true); + break; + case Asc.c_oAscHeaderFooterType.first: + me.btnFirst.toggle(true); + break; + } + _.delay(function(){ + me.onCanvasClick(id); + },50); + me._pagetype = false; + }); + return; + } + this.scrollerScrollTop(); this.onCanvasClick(this.currentCanvas, undefined, true); } @@ -987,7 +1048,8 @@ define([ textFirst: 'First page', textOdd: 'Odd page', textEven: 'Even page', - textAll: 'All pages' + textAll: 'All pages', + textMaxError: 'The text string you entered is too long. Reduce the number of characters used.' }, SSE.Views.HeaderFooterDialog || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js b/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js index 7e1db263b..54f6182e0 100644 --- a/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js +++ b/apps/spreadsheeteditor/main/app/view/NameManagerDlg.js @@ -285,7 +285,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template', xy = me.$window.offset(), rec = this.rangeList.getSelectedRec(), idx = _.indexOf(this.rangeList.store.models, rec), - oldname = (isEdit && rec.length>0) ? new Asc.asc_CDefName(rec.get('name'), rec.get('range'), rec.get('scope'), rec.get('isTable'), undefined, undefined, undefined, true) : null; + oldname = (isEdit && rec) ? new Asc.asc_CDefName(rec.get('name'), rec.get('range'), rec.get('scope'), rec.get('isTable'), undefined, undefined, undefined, true) : null; var win = new SSE.Views.NamedRangeEditDlg({ api: me.api, diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 4b2315b72..32cc23def 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -88,7 +88,8 @@ define([ docPropsLock: 'doc-props-lock', printAreaLock: 'print-area-lock', namedRangeLock: 'named-range-lock', - multiselectCols:'is-multiselect-cols' + multiselectCols:'is-multiselect-cols', + headerLock: 'header-lock' }; SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({ @@ -1340,7 +1341,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] + lock : [_set.editCell, _set.selRangeEdit, _set.headerLock, _set.lostConnect, _set.coAuth] }); me.btnImgAlign = new Common.UI.Button({ @@ -1461,7 +1462,7 @@ define([ $(mnu.el).html(mnu.template({id: Common.UI.getId(), caption : mnu.caption, options : mnu.options})); } else this.btnPageMargins.menu.items[0].setVisible(false); - this.btnInsertImage.menu.items[2].setVisible(mode.fileChoiceUrl && mode.fileChoiceUrl.indexOf("{documentType}")>-1); + this.btnInsertImage.menu.items[2].setVisible(mode.canRequestInsertImage || mode.fileChoiceUrl && mode.fileChoiceUrl.indexOf("{documentType}")>-1); } me.setTab('home'); diff --git a/apps/spreadsheeteditor/main/index.html b/apps/spreadsheeteditor/main/index.html index 158ad8d9c..beffffca5 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: 10000; + z-index: 1001; } .loader-page { diff --git a/apps/spreadsheeteditor/main/index.html.deploy b/apps/spreadsheeteditor/main/index.html.deploy index a9b557dd1..e3f5920b7 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: 10000; + z-index: 1001; } .loader-page { diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 300c23075..9c87eab7c 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -471,6 +471,7 @@ "SSE.Controllers.Main.errorWrongBracketsCount": "An error in the entered formula.
Wrong number of brackets is used.", "SSE.Controllers.Main.errorWrongOperator": "An error in the entered formula. Wrong operator is used.
Please correct the error.", "SSE.Controllers.Main.errorFrmlMaxTextLength": "Text values in formulas are limited to 255 characters.
Use the CONCATENATE function or concatenation operator (&).", + "SSE.Controllers.Main.errorDataValidate": "The value you entered is not valid.
A user has restricted values that can be entered into this cell.", "SSE.Controllers.Main.leavePageText": "You have unsaved changes in this spreadsheet. Click 'Stay on this Page' then 'Save' to save them. Click 'Leave this Page' to discard all the unsaved changes.", "SSE.Controllers.Main.loadFontsTextText": "Loading data...", "SSE.Controllers.Main.loadFontsTitleText": "Loading Data", @@ -1662,6 +1663,7 @@ "SSE.Views.HeaderFooterDialog.textOdd": "Odd page", "SSE.Views.HeaderFooterDialog.textEven": "Even page", "SSE.Views.HeaderFooterDialog.textAll": "All pages", + "SSE.Views.HeaderFooterDialog.textMaxError": "The text string you entered is too long. Reduce the number of characters used.", "SSE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel", "SSE.Views.HyperlinkSettingsDialog.strDisplay": "Display", "SSE.Views.HyperlinkSettingsDialog.strLinkTo": "Link to", diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 25a029017..869842c5e 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -265,9 +265,12 @@ define([ Common.SharedSettings.set('document', data.doc); - if (data.doc) { SSE.getController('Toolbar').setDocumentTitle(data.doc.title); + if (data.doc.info) { + data.doc.info.author && console.log("Obsolete: The 'author' parameter of the document 'info' section is deprecated. Please use 'owner' instead."); + data.doc.info.created && console.log("Obsolete: The 'created' parameter of the document 'info' section is deprecated. Please use 'uploaded' instead."); + } } }, @@ -319,7 +322,7 @@ define([ return; } this._state.isFromGatewayDownloadAs = true; - this.api.asc_DownloadAs(Asc.c_oAscFileType.XLSX, true); + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true)); }, goBack: function(current) { @@ -1213,17 +1216,16 @@ define([ Common.Utils.ThemeColor.setColors(colors, standart_colors); }, - onAdvancedOptions: function(advOptions) { + onAdvancedOptions: function(type, advOptions) { if (this._state.openDlg) return; - var type = advOptions.asc_getOptionId(), - me = this; + var me = this; if (type == Asc.c_oAscAdvancedOptionsID.CSV) { var picker, pages = [], pagesName = []; - _.each(advOptions.asc_getOptions().asc_getCodePages(), function(page) { + _.each(advOptions.asc_getCodePages(), function(page) { pages.push(page.asc_getCodePage()); pagesName.push(page.asc_getCodePageName()); }); @@ -1252,7 +1254,7 @@ define([ delimiter = picker.cols[1].value; if (me.api) { - me.api.asc_setAdvancedOptions(type, new Asc.asc_CCSVAdvancedOptions(encoding, delimiter)); + me.api.asc_setAdvancedOptions(type, new Asc.asc_CTextOptions(encoding, delimiter)); if (!me._isDocReady) { me.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); @@ -1264,7 +1266,7 @@ define([ ] }); - var recommendedSettings = advOptions.asc_getOptions().asc_getRecommendedSettings(); + var recommendedSettings = advOptions.asc_getRecommendedSettings(); picker = uiApp.picker({ container: '#txt-encoding', diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index 15d9200c1..0057a3114 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -259,8 +259,10 @@ define([ info = document.info || {}; document.title ? $('#settings-spreadsheet-title').html(document.title) : $('.display-spreadsheet-title').remove(); - info.author ? $('#settings-sse-owner').html(info.author) : $('.display-owner').remove(); - info.uploaded ? $('#settings-sse-uploaded').html(info.uploaded.toLocaleString()) : $('.display-uploaded').remove(); + var value = info.owner || info.author; + value ? $('#settings-sse-owner').html(value) : $('.display-owner').remove(); + value = info.uploaded || info.created; + value ? $('#settings-sse-uploaded').html(value) : $('.display-uploaded').remove(); info.folder ? $('#settings-sse-location').html(info.folder) : $('.display-location').remove(); var appProps = (this.api) ? this.api.asc_getAppProps() : null; @@ -269,8 +271,7 @@ define([ appName ? $('#settings-sse-application').html(appName) : $('.display-application').remove(); } - var props = (this.api) ? this.api.asc_getCoreProps() : null, - value; + var props = (this.api) ? this.api.asc_getCoreProps() : null; if (props) { value = props.asc_getTitle(); value ? $('#settings-sse-title').html(value) : $('.display-title').remove(); @@ -676,11 +677,11 @@ define([ me.warnDownloadAs, me.notcriticalErrorTitle, function () { - me.api.asc_DownloadAs(format); + me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); } ); } else { - me.api.asc_DownloadAs(format); + me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); } me.hideModal(); diff --git a/apps/spreadsheeteditor/mobile/app/controller/Toolbar.js b/apps/spreadsheeteditor/mobile/app/controller/Toolbar.js index e886dce69..6f969e151 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Toolbar.js @@ -87,7 +87,7 @@ define([ this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onApiWorksheetLocked, this)); this.api.asc_registerCallback('asc_onActiveSheetChanged', _.bind(this.onApiActiveSheetChanged, this)); this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this)); - this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.displayCollaboration, this)) + this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.displayCollaboration, this)); this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.displayCollaboration, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); diff --git a/apps/spreadsheeteditor/mobile/resources/css/app-ios.css b/apps/spreadsheeteditor/mobile/resources/css/app-ios.css index ebe1733cd..c24d88b3f 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-ios.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-ios.css @@ -6786,17 +6786,17 @@ i.icon.icon-table-settings { i.icon.icon-cut { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20d%3D%22M19.4406%2016.7116C17.8368%2016.7116%2016.4336%2017.76%2015.9825%2019.2576L13.1259%2013.5167L19.4907%200.737143C19.5909%200.487542%2019.4907%200.18802%2019.2902%200.0881796C19.0396%20-0.011661%2018.7389%200.0881795%2018.6387%200.287861L12.5245%2012.3686L6.51049%200.287861C6.41026%200.0382593%206.10956%20-0.0615813%205.85898%200.0382593C5.6084%200.1381%205.50816%200.437622%205.6084%200.687223L11.9732%2013.4668L9.06644%2019.2576C8.61539%2017.8099%207.21213%2016.7116%205.6084%2016.7116C3.60373%2016.7116%202%2018.3091%202%2020.3059C2%2022.3027%203.60373%2023.9002%205.6084%2023.9002C6.91143%2023.9002%208.06411%2023.2013%208.71562%2022.153C8.71562%2022.153%208.71562%2022.1529%208.71562%2022.103C8.81586%2021.9533%208.86597%2021.8035%208.91609%2021.6537L12.5245%2014.615L16.0828%2021.7037C16.1329%2021.8534%2016.2331%2022.0032%2016.2832%2022.153V22.2029C16.2832%2022.2029%2016.2832%2022.2029%2016.2832%2022.2528C16.9347%2023.3011%2018.0874%2024%2019.3905%2024C21.3951%2024%2022.9989%2022.4026%2022.9989%2020.4057C23.049%2018.359%2021.4452%2016.7116%2019.4406%2016.7116ZM5.6084%2022.9517C4.15501%2022.9517%203.00233%2021.8035%203.00233%2020.3558C3.00233%2018.9081%204.15501%2017.76%205.6084%2017.76C7.06178%2017.76%208.21446%2018.9081%208.21446%2020.3558C8.21446%2020.7053%208.16434%2021.0547%208.01399%2021.3542L7.91376%2021.5539C7.51283%2022.3526%206.66084%2022.9517%205.6084%2022.9517ZM19.4406%2022.9517C18.4382%2022.9517%2017.5361%2022.3526%2017.1352%2021.504L17.035%2021.3043C16.9347%2021.0048%2016.8345%2020.6553%2016.8345%2020.3059C16.8345%2018.8582%2017.9872%2017.71%2019.4406%2017.71C20.894%2017.71%2022.0466%2018.8582%2022.0466%2020.3059C22.0466%2021.7536%2020.894%2022.9517%2019.4406%2022.9517Z%22%20fill%3D%22white%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.22427%2022.2702C4.51527%2023.1269%206.52738%2022.7183%207.6592%2021.0127C8.79101%2019.3071%208.38572%2017.2943%207.09472%2016.4376C5.80372%2015.5809%203.79161%2015.9896%202.65979%2017.6952C1.52798%2019.4008%201.93328%2021.4136%203.22427%2022.2702ZM2.67135%2023.1035C4.51208%2024.325%207.11827%2023.6364%208.49243%2021.5656C9.8666%2019.4948%209.48837%2016.8259%207.64764%2015.6044C5.80691%2014.3829%203.20072%2015.0714%201.82656%2017.1422C0.452398%2019.2131%200.830625%2021.882%202.67135%2023.1035Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M20.9158%2022.2702C19.6248%2023.1269%2017.6127%2022.7183%2016.4809%2021.0127C15.349%2019.3071%2015.7543%2017.2943%2017.0453%2016.4376C18.3363%2015.5809%2020.3484%2015.9896%2021.4803%2017.6952C22.6121%2019.4008%2022.2068%2021.4136%2020.9158%2022.2702ZM21.4687%2023.1035C19.628%2024.325%2017.0218%2023.6364%2015.6476%2021.5656C14.2735%2019.4948%2014.6517%2016.8259%2016.4924%2015.6044C18.3331%2014.3829%2020.9393%2015.0714%2022.3135%2017.1422C23.6877%2019.2131%2023.3094%2021.882%2021.4687%2023.1035Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M16.4924%2015.6044L13.9037%2012.4737L19.9552%200.675715C20.0693%200.446914%2019.9552%200.172352%2019.727%200.0808313C19.4416%20-0.0106892%2019.0993%200.0808312%2018.9851%200.263872L12.0233%2011.4212L5.17562%200.263872C5.06149%200.035071%204.71911%20-0.0564496%204.43379%200.035071C4.14847%200.126592%204.03434%200.401153%204.14847%200.629955L10.2001%2012.4279L7.64761%2015.6044L9.2292%2018L12.0233%2013.4804L14.9108%2018L16.4924%2015.6044Z%22%20fill%3D%22white%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); } i.icon.icon-copy { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M3%203.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M3%207.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M3%2011.5H9%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M9%2014.5H0.5V0.5H14.5V9H9.5H9V9.5V14.5ZM15%2010V9.5H23.5V23.5H9.5V15.5H10V15V14.5V10H15Z%22%20stroke%3D%22white%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1%201H15V7H16V0H0V17H8V16H1V1Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M23%208H9V23H23V8ZM8%207V24H24V7H8Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M13%205H3V4H13V5Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%209H3V8H8V9Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%2013H3V12H8V13Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H11V11H21V12Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H11V15H21V16Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H11V19H21V20Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E"); } i.icon.icon-paste { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M13%202.5H4%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%202.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%201.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%203.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%204.5H5%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M14%200.5L5%200.500001%22%20stroke%3D%22white%22%2F%3E%3Cpath%20d%3D%22M9.5%209H9V9.5V19H10V10H23.5V23.5H9.5V20V19.5H9H0.5V2.5H18.5V9H9.5Z%22%20stroke%3D%22white%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%202H0V20H9V24H24V7H19V2H14V3H18V7H9V19H1V3H5V2ZM10%208H23V23H10V8Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M5%200H14V5H5V0Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H12V11H21V12Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H12V15H21V16Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H12V19H21V20Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E"); } .chart-types .thumb.bar-normal { background-image: url('../img/charts/chart-03.png'); diff --git a/apps/spreadsheeteditor/mobile/resources/css/app-material.css b/apps/spreadsheeteditor/mobile/resources/css/app-material.css index 275f928f6..d6ef3b826 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-material.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-material.css @@ -6412,17 +6412,17 @@ i.icon.icon-collaboration { i.icon.icon-cut { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20d%3D%22M19.4406%2016.7116C17.8368%2016.7116%2016.4336%2017.76%2015.9825%2019.2576L13.1259%2013.5167L19.4907%200.737143C19.5909%200.487542%2019.4907%200.18802%2019.2902%200.0881796C19.0396%20-0.011661%2018.7389%200.0881795%2018.6387%200.287861L12.5245%2012.3686L6.51049%200.287861C6.41026%200.0382593%206.10956%20-0.0615813%205.85898%200.0382593C5.6084%200.1381%205.50816%200.437622%205.6084%200.687223L11.9732%2013.4668L9.06644%2019.2576C8.61539%2017.8099%207.21213%2016.7116%205.6084%2016.7116C3.60373%2016.7116%202%2018.3091%202%2020.3059C2%2022.3027%203.60373%2023.9002%205.6084%2023.9002C6.91143%2023.9002%208.06411%2023.2013%208.71562%2022.153C8.71562%2022.153%208.71562%2022.1529%208.71562%2022.103C8.81586%2021.9533%208.86597%2021.8035%208.91609%2021.6537L12.5245%2014.615L16.0828%2021.7037C16.1329%2021.8534%2016.2331%2022.0032%2016.2832%2022.153V22.2029C16.2832%2022.2029%2016.2832%2022.2029%2016.2832%2022.2528C16.9347%2023.3011%2018.0874%2024%2019.3905%2024C21.3951%2024%2022.9989%2022.4026%2022.9989%2020.4057C23.049%2018.359%2021.4452%2016.7116%2019.4406%2016.7116ZM5.6084%2022.9517C4.15501%2022.9517%203.00233%2021.8035%203.00233%2020.3558C3.00233%2018.9081%204.15501%2017.76%205.6084%2017.76C7.06178%2017.76%208.21446%2018.9081%208.21446%2020.3558C8.21446%2020.7053%208.16434%2021.0547%208.01399%2021.3542L7.91376%2021.5539C7.51283%2022.3526%206.66084%2022.9517%205.6084%2022.9517ZM19.4406%2022.9517C18.4382%2022.9517%2017.5361%2022.3526%2017.1352%2021.504L17.035%2021.3043C16.9347%2021.0048%2016.8345%2020.6553%2016.8345%2020.3059C16.8345%2018.8582%2017.9872%2017.71%2019.4406%2017.71C20.894%2017.71%2022.0466%2018.8582%2022.0466%2020.3059C22.0466%2021.7536%2020.894%2022.9517%2019.4406%2022.9517Z%22%20fill%3D%22black%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22black%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23cut)%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.22427%2022.2702C4.51527%2023.1269%206.52738%2022.7183%207.6592%2021.0127C8.79101%2019.3071%208.38572%2017.2943%207.09472%2016.4376C5.80372%2015.5809%203.79161%2015.9896%202.65979%2017.6952C1.52798%2019.4008%201.93328%2021.4136%203.22427%2022.2702ZM2.67135%2023.1035C4.51208%2024.325%207.11827%2023.6364%208.49243%2021.5656C9.8666%2019.4948%209.48837%2016.8259%207.64764%2015.6044C5.80691%2014.3829%203.20072%2015.0714%201.82656%2017.1422C0.452398%2019.2131%200.830625%2021.882%202.67135%2023.1035Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M20.9158%2022.2702C19.6248%2023.1269%2017.6127%2022.7183%2016.4809%2021.0127C15.349%2019.3071%2015.7543%2017.2943%2017.0453%2016.4376C18.3363%2015.5809%2020.3484%2015.9896%2021.4803%2017.6952C22.6121%2019.4008%2022.2068%2021.4136%2020.9158%2022.2702ZM21.4687%2023.1035C19.628%2024.325%2017.0218%2023.6364%2015.6476%2021.5656C14.2735%2019.4948%2014.6517%2016.8259%2016.4924%2015.6044C18.3331%2014.3829%2020.9393%2015.0714%2022.3135%2017.1422C23.6877%2019.2131%2023.3094%2021.882%2021.4687%2023.1035Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M16.4924%2015.6044L13.9037%2012.4737L19.9552%200.675715C20.0693%200.446914%2019.9552%200.172352%2019.727%200.0808313C19.4416%20-0.0106892%2019.0993%200.0808312%2018.9851%200.263872L12.0233%2011.4212L5.17562%200.263872C5.06149%200.035071%204.71911%20-0.0564496%204.43379%200.035071C4.14847%200.126592%204.03434%200.401153%204.14847%200.629955L10.2001%2012.4279L7.64761%2015.6044L9.2292%2018L12.0233%2013.4804L14.9108%2018L16.4924%2015.6044Z%22%20fill%3D%22black%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22cut%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22black%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"); } i.icon.icon-copy { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M3%203.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M3%207.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M3%2011.5H9%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M9%2014.5H0.5V0.5H14.5V9H9.5H9V9.5V14.5ZM15%2010V9.5H23.5V23.5H9.5V15.5H10V15V14.5V10H15Z%22%20stroke%3D%22black%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1%201H15V7H16V0H0V17H8V16H1V1Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M23%208H9V23H23V8ZM8%207V24H24V7H8Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M13%205H3V4H13V5Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%209H3V8H8V9Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8%2013H3V12H8V13Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H11V11H21V12Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H11V15H21V16Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H11V19H21V20Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E"); } i.icon.icon-paste { width: 24px; height: 24px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%2020.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2016.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M21%2012.5H12%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M13%202.5H4%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%202.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%201.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%203.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%204.5H5%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M14%200.5L5%200.500001%22%20stroke%3D%22black%22%2F%3E%3Cpath%20d%3D%22M9.5%209H9V9.5V19H10V10H23.5V23.5H9.5V20V19.5H9H0.5V2.5H18.5V9H9.5Z%22%20stroke%3D%22black%22%2F%3E%3C%2Fsvg%3E"); + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%202H0V20H9V24H24V7H19V2H14V3H18V7H9V19H1V3H5V2ZM10%208H23V23H10V8Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20d%3D%22M5%200H14V5H5V0Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2012H12V11H21V12Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2016H12V15H21V16Z%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2020H12V19H21V20Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E"); } .navbar i.icon.icon-undo { width: 22px; diff --git a/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less b/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less index 603d5ea4c..b1df25db5 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less +++ b/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less @@ -371,17 +371,17 @@ i.icon { &.icon-cut { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-copy { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-paste { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } } diff --git a/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less b/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less index a6ba74d6b..da8b912fa 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less +++ b/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less @@ -335,17 +335,17 @@ i.icon { &.icon-cut { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-copy { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } &.icon-paste { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-background(''); } } diff --git a/apps/spreadsheeteditor/sdk_dev_scripts.js b/apps/spreadsheeteditor/sdk_dev_scripts.js index 5030f05ec..a2e7f5d1b 100644 --- a/apps/spreadsheeteditor/sdk_dev_scripts.js +++ b/apps/spreadsheeteditor/sdk_dev_scripts.js @@ -86,7 +86,7 @@ var sdk_dev_scrpipts = [ "../../../../sdkjs/vendor/easysax.js", "../../../../sdkjs/common/openxml.js", "../../../../sdkjs/common/intervalTree.js", - "../../../../sdkjs/cell/document/empty-workbook.js", + "../../../../sdkjs/cell/document/empty.js", "../../../../sdkjs/cell/model/UndoRedo.js", "../../../../sdkjs/cell/model/clipboard.js", "../../../../sdkjs/cell/model/autofilters.js", @@ -110,6 +110,7 @@ var sdk_dev_scrpipts = [ "../../../../sdkjs/cell/model/Workbook.js", "../../../../sdkjs/cell/model/Serialize.js", "../../../../sdkjs/cell/model/ConditionalFormatting.js", + "../../../../sdkjs/cell/model/DataValidation.js", "../../../../sdkjs/cell/model/CellInfo.js", "../../../../sdkjs/cell/view/mobileTouch.js", "../../../../sdkjs/cell/view/StringRender.js", diff --git a/build/Gruntfile.js b/build/Gruntfile.js index 206692a1d..37c317e18 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -289,6 +289,11 @@ module.exports = function(grunt) { options: { plugins: [{ cleanupIDs: false + }, + { + convertPathData: { + floatPrecision: 4 + } }] }, dist: {