From cd2eabe42727f4dc94b4292e2f8dc34030db4f09 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 11 Sep 2019 13:38:02 +0300 Subject: [PATCH 01/17] Fix for rev. 1f315318168c134a42d66a4303a00a7c65f2d7ad ([SSE] Open advanced settings, set units, ctrl+v to canvas -> text isn't entered to cell) --- apps/documenteditor/main/app/controller/Main.js | 4 +++- apps/presentationeditor/main/app/controller/Main.js | 4 +++- apps/spreadsheeteditor/main/app/controller/Main.js | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 25986829a..2476a50ba 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -229,9 +229,11 @@ define([ }); $(document.body).on('blur', 'input, textarea', function(e) { - if (!me.isModalShowed && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) { + if (!me.isModalShowed) { if (/form-control/.test(e.target.className)) me.inFormControl = false; + if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) + return; if (!e.relatedTarget || !/area_id/.test(e.target.id) && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index cc4ef086d..a4eb0b592 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -207,9 +207,11 @@ define([ }); $(document.body).on('blur', 'input, textarea', function(e) { - if (!me.isModalShowed && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) { + if (!me.isModalShowed) { if (/form-control/.test(e.target.className)) me.inFormControl = false; + if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) + return; if (!e.relatedTarget || !/area_id/.test(e.target.id) && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index f382175bc..74e292259 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -216,9 +216,11 @@ define([ $(document.body).on('blur', 'input, textarea', function(e) { if (me.isAppDisabled === true || me.isFrameClosed) return; - if ((!me.isModalShowed || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible()) && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) { + if ((!me.isModalShowed || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible())) { if (/form-control/.test(e.target.className)) me.inFormControl = false; + if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) + return; if (!e.relatedTarget || !/area_id/.test(e.target.id) && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ From 0f6a2c99e39fd7461bbe7c1acc88fb044a1f84f7 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 11 Sep 2019 16:21:12 +0300 Subject: [PATCH 02/17] [SSE] Fix Bug 42789 --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 3ca475bb1..50ff2e0a3 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -831,6 +831,7 @@ define([ }, onInsertImageMenu: function(menu, item, e) { + var me = this; if (item.value === 'file') { this.toolbar.fireEvent('insertimage', this.toolbar); @@ -840,8 +841,6 @@ define([ Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.component.Analytics.trackEvent('ToolBar', 'Image'); } else if (item.value === 'url') { - var me = this; - (new Common.Views.ImageFromUrlDialog({ handler: function(result, value) { if (result == 'ok') { From fdff13a7f0498bf81eae937aec65561b938fea16 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 12 Sep 2019 11:39:50 +0300 Subject: [PATCH 03/17] [DE] Fix Bug 42799 --- apps/documenteditor/main/app/view/StyleTitleDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/StyleTitleDialog.js b/apps/documenteditor/main/app/view/StyleTitleDialog.js index 238efe689..fff6a3779 100644 --- a/apps/documenteditor/main/app/view/StyleTitleDialog.js +++ b/apps/documenteditor/main/app/view/StyleTitleDialog.js @@ -105,7 +105,7 @@ define([ this.cmbNextStyle = new Common.UI.ComboBox({ el : $('#id-dlg-style-next-par'), style : 'width: 100%;', - menuStyle : 'width: 100%; max-height: 290px;', + menuStyle : 'width: 100%; max-height: 210px;', editable : false, cls : 'input-group-nr', data : this.options.formats, From 7c8828cb13c19d6a53f1205d845783fab6a7ae2e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 17 Sep 2019 18:22:45 +0300 Subject: [PATCH 04/17] [Common] Fix loading translations (for IE) --- apps/common/locale.js | 54 ++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/apps/common/locale.js b/apps/common/locale.js index 3e3bdda3b..64f75666c 100644 --- a/apps/common/locale.js +++ b/apps/common/locale.js @@ -36,27 +36,36 @@ if (Common === undefined) { Common.Locale = new(function() { "use strict"; - var l10n = {}; + var l10n = null; + var loadcallback, + apply = false; - var _applyLocalization = function() { + var _applyLocalization = function(callback) { try { - for (var prop in l10n) { - var p = prop.split('.'); - if (p && p.length > 2) { + console.log('_applyLocalization'); + callback && (loadcallback = callback); + if (l10n) { + console.log('_apply ok'); + for (var prop in l10n) { + var p = prop.split('.'); + if (p && p.length > 2) { - var obj = window; - for (var i = 0; i < p.length - 1; ++i) { - if (obj[p[i]] === undefined) { - obj[p[i]] = new Object(); + var obj = window; + for (var i = 0; i < p.length - 1; ++i) { + if (obj[p[i]] === undefined) { + obj[p[i]] = new Object(); + } + obj = obj[p[i]]; } - obj = obj[p[i]]; - } - if (obj) { - obj[p[p.length - 1]] = l10n[prop]; + if (obj) { + obj[p[p.length - 1]] = l10n[prop]; + } } } - } + loadcallback && loadcallback(); + } else + apply = true; } catch (e) { } @@ -64,7 +73,7 @@ Common.Locale = new(function() { var _get = function(prop, scope) { var res = ''; - if (scope && scope.name) { + if (l10n && scope && scope.name) { res = l10n[scope.name + '.' + prop]; } @@ -99,10 +108,13 @@ Common.Locale = new(function() { throw new Error('loaded'); } }).then(function(json) { - if ( !!json ) l10n = json; + l10n = json || {}; + apply && _applyLocalization(); }).catch(function(e) { + l10n = l10n || {}; + apply && _applyLocalization(); if ( e.message == 'loaded' ) { - + console.log('loaded'); } else console.log('fetch error: ' + e); }); @@ -110,7 +122,13 @@ Common.Locale = new(function() { if ( !window.fetch ) { /* use fetch polifill if native method isn't supported */ - require(['../vendor/fetch/fetch.umd'], _requireLang); + var polyfills = ['../vendor/fetch/fetch.umd']; + if ( !window.Promise ) { + require(['//cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js'], + function () { + require(polyfills, _requireLang); + }); + } else require(polyfills, _requireLang); } else _requireLang(); return { From cca8f2aa12f6a5a756488ecef4bdb5384acbe6a7 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 17 Sep 2019 18:23:35 +0300 Subject: [PATCH 05/17] [Embedded] Fix loading translations --- apps/documenteditor/embed/index.html | 9 ++++++++- apps/documenteditor/embed/index.html.deploy | 8 +++++++- apps/documenteditor/embed/js/application.js | 7 ++++--- apps/presentationeditor/embed/index.html | 9 ++++++++- apps/presentationeditor/embed/index.html.deploy | 9 +++++++-- apps/presentationeditor/embed/js/application.js | 8 ++++---- apps/spreadsheeteditor/embed/index.html | 9 ++++++++- apps/spreadsheeteditor/embed/index.html.deploy | 9 +++++++-- apps/spreadsheeteditor/embed/js/application.js | 7 ++++--- 9 files changed, 57 insertions(+), 18 deletions(-) diff --git a/apps/documenteditor/embed/index.html b/apps/documenteditor/embed/index.html index 4042fb812..7b276bdb1 100644 --- a/apps/documenteditor/embed/index.html +++ b/apps/documenteditor/embed/index.html @@ -190,7 +190,7 @@ - + + + + - + + + diff --git a/apps/documenteditor/embed/js/application.js b/apps/documenteditor/embed/js/application.js index 9045fe155..63d642fb2 100644 --- a/apps/documenteditor/embed/js/application.js +++ b/apps/documenteditor/embed/js/application.js @@ -31,7 +31,8 @@ * */ +function ($) { - Common.Locale.apply(); - DE.ApplicationView.create(); - DE.ApplicationController.create(); + Common.Locale.apply(function() { + DE.ApplicationView.create(); + DE.ApplicationController.create(); + }); }(); diff --git a/apps/presentationeditor/embed/index.html b/apps/presentationeditor/embed/index.html index e82a7d950..53212081e 100644 --- a/apps/presentationeditor/embed/index.html +++ b/apps/presentationeditor/embed/index.html @@ -189,7 +189,7 @@ - + + + + - + - + + diff --git a/apps/presentationeditor/embed/js/application.js b/apps/presentationeditor/embed/js/application.js index 73a13c863..bbff1ddfe 100644 --- a/apps/presentationeditor/embed/js/application.js +++ b/apps/presentationeditor/embed/js/application.js @@ -31,8 +31,8 @@ * */ (function ($) { - Common.Locale.apply(); - PE.ApplicationView.create(); - PE.ApplicationController.create(); - + Common.Locale.apply(function() { + PE.ApplicationView.create(); + PE.ApplicationController.create(); + }); })(window.jQuery); diff --git a/apps/spreadsheeteditor/embed/index.html b/apps/spreadsheeteditor/embed/index.html index 746b49971..4cf8f08ef 100644 --- a/apps/spreadsheeteditor/embed/index.html +++ b/apps/spreadsheeteditor/embed/index.html @@ -190,7 +190,7 @@ - + + + + - + - + + diff --git a/apps/spreadsheeteditor/embed/js/application.js b/apps/spreadsheeteditor/embed/js/application.js index 4327c07ca..4d4a37bf3 100644 --- a/apps/spreadsheeteditor/embed/js/application.js +++ b/apps/spreadsheeteditor/embed/js/application.js @@ -33,9 +33,10 @@ (function ($) { $(function(){ - Common.Locale.apply(); - SSE.ApplicationView.create(); - SSE.ApplicationController.create(); + Common.Locale.apply(function() { + SSE.ApplicationView.create(); + SSE.ApplicationController.create(); + }); }) })(window.jQuery); From 6061d0f2d1733dcd4595a52e90b3f2a230e67296 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 17 Sep 2019 18:24:43 +0300 Subject: [PATCH 06/17] [DE] Fix loading translations on IE and minimized version --- apps/documenteditor/main/app.js | 78 ++++++++++++++-------------- apps/documenteditor/main/app_dev.js | 80 +++++++++++++++-------------- 2 files changed, 81 insertions(+), 77 deletions(-) diff --git a/apps/documenteditor/main/app.js b/apps/documenteditor/main/app.js index 963a99082..bd53d3271 100644 --- a/apps/documenteditor/main/app.js +++ b/apps/documenteditor/main/app.js @@ -169,44 +169,46 @@ require([ ] }); - Common.Locale.apply(); - - require([ - 'documenteditor/main/app/controller/Viewport', - 'documenteditor/main/app/controller/DocumentHolder', - 'documenteditor/main/app/controller/Toolbar', - 'documenteditor/main/app/controller/Statusbar', - 'documenteditor/main/app/controller/Links', - 'documenteditor/main/app/controller/Navigation', - 'documenteditor/main/app/controller/RightMenu', - 'documenteditor/main/app/controller/LeftMenu', - 'documenteditor/main/app/controller/Main', - 'documenteditor/main/app/view/FileMenuPanels', - 'documenteditor/main/app/view/ParagraphSettings', - 'documenteditor/main/app/view/HeaderFooterSettings', - 'documenteditor/main/app/view/ImageSettings', - 'documenteditor/main/app/view/TableSettings', - 'documenteditor/main/app/view/ShapeSettings', - 'documenteditor/main/app/view/TextArtSettings', - 'documenteditor/main/app/view/SignatureSettings', - 'common/main/lib/util/utils', - 'common/main/lib/util/LocalStorage', - 'common/main/lib/controller/Fonts', - 'common/main/lib/controller/History' - /** coauthoring begin **/ - ,'common/main/lib/controller/Comments' - ,'common/main/lib/controller/Chat' - /** coauthoring end **/ - ,'common/main/lib/controller/Plugins' - ,'documenteditor/main/app/view/ChartSettings' - ,'common/main/lib/controller/ExternalDiagramEditor' - ,'common/main/lib/controller/ExternalMergeEditor' - ,'common/main/lib/controller/ReviewChanges' - ,'common/main/lib/controller/Protection' - ,'common/main/lib/controller/Desktop' - ], function() { - app.start(); - }); + Common.Locale.apply( + function() { + require([ + 'documenteditor/main/app/controller/Viewport', + 'documenteditor/main/app/controller/DocumentHolder', + 'documenteditor/main/app/controller/Toolbar', + 'documenteditor/main/app/controller/Statusbar', + 'documenteditor/main/app/controller/Links', + 'documenteditor/main/app/controller/Navigation', + 'documenteditor/main/app/controller/RightMenu', + 'documenteditor/main/app/controller/LeftMenu', + 'documenteditor/main/app/controller/Main', + 'documenteditor/main/app/view/FileMenuPanels', + 'documenteditor/main/app/view/ParagraphSettings', + 'documenteditor/main/app/view/HeaderFooterSettings', + 'documenteditor/main/app/view/ImageSettings', + 'documenteditor/main/app/view/TableSettings', + 'documenteditor/main/app/view/ShapeSettings', + 'documenteditor/main/app/view/TextArtSettings', + 'documenteditor/main/app/view/SignatureSettings', + 'common/main/lib/util/utils', + 'common/main/lib/util/LocalStorage', + 'common/main/lib/controller/Fonts', + 'common/main/lib/controller/History' + /** coauthoring begin **/ + ,'common/main/lib/controller/Comments' + ,'common/main/lib/controller/Chat' + /** coauthoring end **/ + ,'common/main/lib/controller/Plugins' + ,'documenteditor/main/app/view/ChartSettings' + ,'common/main/lib/controller/ExternalDiagramEditor' + ,'common/main/lib/controller/ExternalMergeEditor' + ,'common/main/lib/controller/ReviewChanges' + ,'common/main/lib/controller/Protection' + ,'common/main/lib/controller/Desktop' + ], function() { + app.start(); + }); + } + ); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { reqerr = window.requireTimeourError(); diff --git a/apps/documenteditor/main/app_dev.js b/apps/documenteditor/main/app_dev.js index feb54f25a..ea9a07eba 100644 --- a/apps/documenteditor/main/app_dev.js +++ b/apps/documenteditor/main/app_dev.js @@ -159,45 +159,47 @@ require([ ] }); - Common.Locale.apply(); - - require([ - 'documenteditor/main/app/controller/Viewport', - 'documenteditor/main/app/controller/DocumentHolder', - 'documenteditor/main/app/controller/Toolbar', - 'documenteditor/main/app/controller/Links', - 'documenteditor/main/app/controller/Navigation', - 'documenteditor/main/app/controller/Statusbar', - 'documenteditor/main/app/controller/RightMenu', - 'documenteditor/main/app/controller/LeftMenu', - 'documenteditor/main/app/controller/Main', - 'documenteditor/main/app/view/FileMenuPanels', - 'documenteditor/main/app/view/ParagraphSettings', - 'documenteditor/main/app/view/HeaderFooterSettings', - 'documenteditor/main/app/view/ImageSettings', - 'documenteditor/main/app/view/TableSettings', - 'documenteditor/main/app/view/ShapeSettings', - 'documenteditor/main/app/view/TextArtSettings', - 'documenteditor/main/app/view/SignatureSettings', - 'common/main/lib/util/utils', - 'common/main/lib/util/LocalStorage', - 'common/main/lib/controller/Fonts', - 'common/main/lib/controller/History' - /** coauthoring begin **/ - ,'common/main/lib/controller/Comments' - ,'common/main/lib/controller/Chat' - /** coauthoring end **/ - ,'common/main/lib/controller/Plugins' - ,'documenteditor/main/app/view/ChartSettings' - ,'common/main/lib/controller/ExternalDiagramEditor' - ,'common/main/lib/controller/ExternalMergeEditor' - ,'common/main/lib/controller/ReviewChanges' - ,'common/main/lib/controller/Protection' - ,'common/main/lib/controller/Desktop' - ], function() { - window.compareVersions = true; - app.start(); - }); + Common.Locale.apply( + function() { + require([ + 'documenteditor/main/app/controller/Viewport', + 'documenteditor/main/app/controller/DocumentHolder', + 'documenteditor/main/app/controller/Toolbar', + 'documenteditor/main/app/controller/Links', + 'documenteditor/main/app/controller/Navigation', + 'documenteditor/main/app/controller/Statusbar', + 'documenteditor/main/app/controller/RightMenu', + 'documenteditor/main/app/controller/LeftMenu', + 'documenteditor/main/app/controller/Main', + 'documenteditor/main/app/view/FileMenuPanels', + 'documenteditor/main/app/view/ParagraphSettings', + 'documenteditor/main/app/view/HeaderFooterSettings', + 'documenteditor/main/app/view/ImageSettings', + 'documenteditor/main/app/view/TableSettings', + 'documenteditor/main/app/view/ShapeSettings', + 'documenteditor/main/app/view/TextArtSettings', + 'documenteditor/main/app/view/SignatureSettings', + 'common/main/lib/util/utils', + 'common/main/lib/util/LocalStorage', + 'common/main/lib/controller/Fonts', + 'common/main/lib/controller/History' + /** coauthoring begin **/ + ,'common/main/lib/controller/Comments' + ,'common/main/lib/controller/Chat' + /** coauthoring end **/ + ,'common/main/lib/controller/Plugins' + ,'documenteditor/main/app/view/ChartSettings' + ,'common/main/lib/controller/ExternalDiagramEditor' + ,'common/main/lib/controller/ExternalMergeEditor' + ,'common/main/lib/controller/ReviewChanges' + ,'common/main/lib/controller/Protection' + ,'common/main/lib/controller/Desktop' + ], function() { + window.compareVersions = true; + app.start(); + }); + } + ); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { reqerr = window.requireTimeourError(); From 614109a26fc0bd09e683ecdee1556d85ab79ea29 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 18 Sep 2019 10:32:29 +0300 Subject: [PATCH 07/17] Fix bug for desktop --- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 2476a50ba..d4744a57b 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -692,7 +692,7 @@ define([ var action = {id: id, type: type}; this.stackLongActions.pop(action); - appHeader.setDocumentCaption(this.api.asc_getDocumentName()); + appHeader && appHeader.setDocumentCaption(this.api.asc_getDocumentName()); this.updateWindowTitle(true); action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information}); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index a4eb0b592..d93a72b86 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -475,7 +475,7 @@ define([ var action = {id: id, type: type}; this.stackLongActions.pop(action); - appHeader.setDocumentCaption(this.api.asc_getDocumentName()); + appHeader && appHeader.setDocumentCaption(this.api.asc_getDocumentName()); this.updateWindowTitle(true); action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information}); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 74e292259..20d62500b 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -509,7 +509,7 @@ define([ var action = {id: id, type: type}; this.stackLongActions.pop(action); - this.headerView.setDocumentCaption(this.api.asc_getDocumentName()); + this.headerView && this.headerView.setDocumentCaption(this.api.asc_getDocumentName()); this.updateWindowTitle(this.api.asc_isDocumentModified(), true); if (type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open) { From 3cc0e9b5bdd2f4d433463dca6492387dfad03d6e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 18 Sep 2019 11:08:01 +0300 Subject: [PATCH 08/17] Fix bug for desktop --- .../main/app/controller/Main.js | 2 +- .../main/app/controller/Main.js | 2 +- .../main/app/controller/Main.js | 41 ++++++++++--------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index d4744a57b..aed29897b 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1600,7 +1600,7 @@ define([ if (this._state.isDocModified !== isModified || force) { var title = this.defaultTitleText; - if (!_.isEmpty(appHeader.getDocumentCaption())) + if (appHeader && !_.isEmpty(appHeader.getDocumentCaption())) title = appHeader.getDocumentCaption() + ' - ' + title; if (isModified) { diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index d93a72b86..20b123b3b 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1311,7 +1311,7 @@ define([ if (this._state.isDocModified !== isModified || force) { var title = this.defaultTitleText; - if (!_.isEmpty(appHeader.getDocumentCaption())) + if (appHeader && !_.isEmpty(appHeader.getDocumentCaption())) title = appHeader.getDocumentCaption() + ' - ' + title; if (isModified) { diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 20d62500b..8de80cf02 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -393,7 +393,7 @@ define([ docInfo.put_Token(data.doc.token); docInfo.put_Permissions(_permissions); - this.headerView.setDocumentCaption(data.doc.title); + this.headerView && this.headerView.setDocumentCaption(data.doc.title); } this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); @@ -1494,30 +1494,31 @@ define([ updateWindowTitle: function(change, force) { if (this._state.isDocModified !== change || force) { - var title = this.defaultTitleText; + if (this.headerView) { + var title = this.defaultTitleText; - if (!_.isEmpty(this.headerView.getDocumentCaption())) - title = this.headerView.getDocumentCaption() + ' - ' + title; + if (!_.isEmpty(this.headerView.getDocumentCaption())) + title = this.headerView.getDocumentCaption() + ' - ' + title; - if (change) { - clearTimeout(this._state.timerCaption); - if (!_.isUndefined(title)) { - title = '* ' + title; - this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), true); + if (change) { + clearTimeout(this._state.timerCaption); + if (!_.isUndefined(title)) { + title = '* ' + title; + this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), true); + } + } else { + if (this._state.fastCoauth && this._state.usersCount>1) { + var me = this; + this._state.timerCaption = setTimeout(function () { + me.headerView.setDocumentCaption(me.headerView.getDocumentCaption(), false); + }, 500); + } else + this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), false); } - } else { - if (this._state.fastCoauth && this._state.usersCount>1) { - var me = this; - this._state.timerCaption = setTimeout(function () { - me.headerView.setDocumentCaption(me.headerView.getDocumentCaption(), false); - }, 500); - } else - this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), false); + if (window.document.title != title) + window.document.title = title; } - if (window.document.title != title) - window.document.title = title; - Common.Gateway.setDocumentModified(change); this._state.isDocModified = change; From 4f8c4945637e7aad8f19ccbdcb04f85a01d305eb Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 18 Sep 2019 11:27:12 +0300 Subject: [PATCH 09/17] [Mobile] Fix comments loading --- apps/common/mobile/lib/controller/Collaboration.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/common/mobile/lib/controller/Collaboration.js b/apps/common/mobile/lib/controller/Collaboration.js index f4b57afb3..bd0338bd0 100644 --- a/apps/common/mobile/lib/controller/Collaboration.js +++ b/apps/common/mobile/lib/controller/Collaboration.js @@ -734,7 +734,7 @@ define([ time : date.getTime(), replys : [], groupName : (groupname && groupname.length>1) ? groupname[1] : null - } + }; if (comment) { var replies = this.readSDKReplies(data); if (replies.length) { @@ -821,6 +821,13 @@ define([ return 0; }, + stringUtcToLocalDate: function (date) { + if (typeof date === 'string') + return parseInt(date) + this.timeZoneOffsetInMs; + + return 0; + }, + addCommentToGroupCollection: function (comment) { var groupname = comment.groupName; if (!this.groupCollectionComments[groupname]) From fe2d9f515446d2d45df036a46923c67fdf186a95 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 18 Sep 2019 13:53:29 +0300 Subject: [PATCH 10/17] [PE][SSE][Mobile] Fix loading translations on IE and minimized version --- apps/documenteditor/mobile/app-dev.js | 60 +++++++++--------- apps/documenteditor/mobile/app.js | 58 +++++++++--------- apps/presentationeditor/main/app.js | 66 ++++++++++---------- apps/presentationeditor/main/app_dev.js | 68 ++++++++++----------- apps/presentationeditor/mobile/app-dev.js | 62 +++++++++---------- apps/presentationeditor/mobile/app.js | 60 +++++++++--------- apps/spreadsheeteditor/main/app.js | 72 +++++++++++----------- apps/spreadsheeteditor/main/app_dev.js | 74 +++++++++++------------ apps/spreadsheeteditor/mobile/app-dev.js | 64 ++++++++++---------- apps/spreadsheeteditor/mobile/app.js | 62 +++++++++---------- 10 files changed, 323 insertions(+), 323 deletions(-) diff --git a/apps/documenteditor/mobile/app-dev.js b/apps/documenteditor/mobile/app-dev.js index db28adc5d..b5ab49951 100644 --- a/apps/documenteditor/mobile/app-dev.js +++ b/apps/documenteditor/mobile/app-dev.js @@ -155,8 +155,6 @@ require([ ] }); - Common.Locale.apply(); - var device = Framework7.prototype.device; var loadPlatformCss = function (filename, opt){ var fileref = document.createElement('link'); @@ -198,34 +196,36 @@ require([ //Load platform styles loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); - require([ - 'common/main/lib/util/LocalStorage', - 'common/main/lib/util/utils', - 'common/mobile/lib/controller/Plugins', - 'documenteditor/mobile/app/controller/Editor', - 'documenteditor/mobile/app/controller/Toolbar', - 'documenteditor/mobile/app/controller/Search', - 'documenteditor/mobile/app/controller/Main', - 'documenteditor/mobile/app/controller/DocumentHolder', - 'documenteditor/mobile/app/controller/Settings', - 'documenteditor/mobile/app/controller/edit/EditContainer', - 'documenteditor/mobile/app/controller/edit/EditText', - 'documenteditor/mobile/app/controller/edit/EditParagraph', - 'documenteditor/mobile/app/controller/edit/EditHeader', - 'documenteditor/mobile/app/controller/edit/EditTable', - 'documenteditor/mobile/app/controller/edit/EditImage', - 'documenteditor/mobile/app/controller/edit/EditShape', - 'documenteditor/mobile/app/controller/edit/EditChart', - 'documenteditor/mobile/app/controller/edit/EditHyperlink', - 'documenteditor/mobile/app/controller/add/AddContainer', - 'documenteditor/mobile/app/controller/add/AddTable', - 'documenteditor/mobile/app/controller/add/AddShape', - 'documenteditor/mobile/app/controller/add/AddImage', - 'documenteditor/mobile/app/controller/add/AddOther', - 'common/mobile/lib/controller/Collaboration' - ], function() { - window.compareVersions = true; - app.start(); + Common.Locale.apply(function() { + require([ + 'common/main/lib/util/LocalStorage', + 'common/main/lib/util/utils', + 'common/mobile/lib/controller/Plugins', + 'documenteditor/mobile/app/controller/Editor', + 'documenteditor/mobile/app/controller/Toolbar', + 'documenteditor/mobile/app/controller/Search', + 'documenteditor/mobile/app/controller/Main', + 'documenteditor/mobile/app/controller/DocumentHolder', + 'documenteditor/mobile/app/controller/Settings', + 'documenteditor/mobile/app/controller/edit/EditContainer', + 'documenteditor/mobile/app/controller/edit/EditText', + 'documenteditor/mobile/app/controller/edit/EditParagraph', + 'documenteditor/mobile/app/controller/edit/EditHeader', + 'documenteditor/mobile/app/controller/edit/EditTable', + 'documenteditor/mobile/app/controller/edit/EditImage', + 'documenteditor/mobile/app/controller/edit/EditShape', + 'documenteditor/mobile/app/controller/edit/EditChart', + 'documenteditor/mobile/app/controller/edit/EditHyperlink', + 'documenteditor/mobile/app/controller/add/AddContainer', + 'documenteditor/mobile/app/controller/add/AddTable', + 'documenteditor/mobile/app/controller/add/AddShape', + 'documenteditor/mobile/app/controller/add/AddImage', + 'documenteditor/mobile/app/controller/add/AddOther', + 'common/mobile/lib/controller/Collaboration' + ], function() { + window.compareVersions = true; + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { diff --git a/apps/documenteditor/mobile/app.js b/apps/documenteditor/mobile/app.js index cfd2b1b40..dba0a47b4 100644 --- a/apps/documenteditor/mobile/app.js +++ b/apps/documenteditor/mobile/app.js @@ -166,8 +166,6 @@ require([ ] }); - Common.Locale.apply(); - var device = Framework7.prototype.device; var loadPlatformCss = function (filename, opt){ var fileref = document.createElement('link'); @@ -209,33 +207,35 @@ require([ //Load platform styles loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); - require([ - 'common/main/lib/util/LocalStorage', - 'common/main/lib/util/utils', - 'common/mobile/lib/controller/Plugins', - 'documenteditor/mobile/app/controller/Editor', - 'documenteditor/mobile/app/controller/Toolbar', - 'documenteditor/mobile/app/controller/Search', - 'documenteditor/mobile/app/controller/Main', - 'documenteditor/mobile/app/controller/DocumentHolder', - 'documenteditor/mobile/app/controller/Settings', - 'documenteditor/mobile/app/controller/edit/EditContainer', - 'documenteditor/mobile/app/controller/edit/EditText', - 'documenteditor/mobile/app/controller/edit/EditParagraph', - 'documenteditor/mobile/app/controller/edit/EditHeader', - 'documenteditor/mobile/app/controller/edit/EditTable', - 'documenteditor/mobile/app/controller/edit/EditImage', - 'documenteditor/mobile/app/controller/edit/EditShape', - 'documenteditor/mobile/app/controller/edit/EditChart', - 'documenteditor/mobile/app/controller/edit/EditHyperlink', - 'documenteditor/mobile/app/controller/add/AddContainer', - 'documenteditor/mobile/app/controller/add/AddTable', - 'documenteditor/mobile/app/controller/add/AddShape', - 'documenteditor/mobile/app/controller/add/AddImage', - 'documenteditor/mobile/app/controller/add/AddOther', - 'common/mobile/lib/controller/Collaboration' - ], function() { - app.start(); + Common.Locale.apply(function() { + require([ + 'common/main/lib/util/LocalStorage', + 'common/main/lib/util/utils', + 'common/mobile/lib/controller/Plugins', + 'documenteditor/mobile/app/controller/Editor', + 'documenteditor/mobile/app/controller/Toolbar', + 'documenteditor/mobile/app/controller/Search', + 'documenteditor/mobile/app/controller/Main', + 'documenteditor/mobile/app/controller/DocumentHolder', + 'documenteditor/mobile/app/controller/Settings', + 'documenteditor/mobile/app/controller/edit/EditContainer', + 'documenteditor/mobile/app/controller/edit/EditText', + 'documenteditor/mobile/app/controller/edit/EditParagraph', + 'documenteditor/mobile/app/controller/edit/EditHeader', + 'documenteditor/mobile/app/controller/edit/EditTable', + 'documenteditor/mobile/app/controller/edit/EditImage', + 'documenteditor/mobile/app/controller/edit/EditShape', + 'documenteditor/mobile/app/controller/edit/EditChart', + 'documenteditor/mobile/app/controller/edit/EditHyperlink', + 'documenteditor/mobile/app/controller/add/AddContainer', + 'documenteditor/mobile/app/controller/add/AddTable', + 'documenteditor/mobile/app/controller/add/AddShape', + 'documenteditor/mobile/app/controller/add/AddImage', + 'documenteditor/mobile/app/controller/add/AddOther', + 'common/mobile/lib/controller/Collaboration' + ], function() { + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { diff --git a/apps/presentationeditor/main/app.js b/apps/presentationeditor/main/app.js index f7b37369f..99ea4dc01 100644 --- a/apps/presentationeditor/main/app.js +++ b/apps/presentationeditor/main/app.js @@ -160,39 +160,39 @@ require([ ] }); - Common.Locale.apply(); - - require([ - 'presentationeditor/main/app/controller/Viewport', - 'presentationeditor/main/app/controller/DocumentHolder', - 'presentationeditor/main/app/controller/Toolbar', - 'presentationeditor/main/app/controller/Statusbar', - 'presentationeditor/main/app/controller/RightMenu', - 'presentationeditor/main/app/controller/LeftMenu', - 'presentationeditor/main/app/controller/Main', - 'presentationeditor/main/app/view/FileMenuPanels', - 'presentationeditor/main/app/view/ParagraphSettings', - 'presentationeditor/main/app/view/ImageSettings', - 'presentationeditor/main/app/view/ShapeSettings', - 'presentationeditor/main/app/view/SlideSettings', - 'presentationeditor/main/app/view/TableSettings', - 'presentationeditor/main/app/view/TextArtSettings', - 'presentationeditor/main/app/view/SignatureSettings', - 'common/main/lib/util/utils', - 'common/main/lib/util/LocalStorage', - 'common/main/lib/controller/Fonts' - /** coauthoring begin **/ - ,'common/main/lib/controller/Comments', - 'common/main/lib/controller/Chat', - /** coauthoring end **/ - 'common/main/lib/controller/Plugins', - 'presentationeditor/main/app/view/ChartSettings', - 'common/main/lib/controller/ExternalDiagramEditor' - ,'common/main/lib/controller/ReviewChanges' - ,'common/main/lib/controller/Protection' - ,'common/main/lib/controller/Desktop' - ], function() { - app.start(); + Common.Locale.apply(function(){ + require([ + 'presentationeditor/main/app/controller/Viewport', + 'presentationeditor/main/app/controller/DocumentHolder', + 'presentationeditor/main/app/controller/Toolbar', + 'presentationeditor/main/app/controller/Statusbar', + 'presentationeditor/main/app/controller/RightMenu', + 'presentationeditor/main/app/controller/LeftMenu', + 'presentationeditor/main/app/controller/Main', + 'presentationeditor/main/app/view/FileMenuPanels', + 'presentationeditor/main/app/view/ParagraphSettings', + 'presentationeditor/main/app/view/ImageSettings', + 'presentationeditor/main/app/view/ShapeSettings', + 'presentationeditor/main/app/view/SlideSettings', + 'presentationeditor/main/app/view/TableSettings', + 'presentationeditor/main/app/view/TextArtSettings', + 'presentationeditor/main/app/view/SignatureSettings', + 'common/main/lib/util/utils', + 'common/main/lib/util/LocalStorage', + 'common/main/lib/controller/Fonts' + /** coauthoring begin **/ + ,'common/main/lib/controller/Comments', + 'common/main/lib/controller/Chat', + /** coauthoring end **/ + 'common/main/lib/controller/Plugins', + 'presentationeditor/main/app/view/ChartSettings', + 'common/main/lib/controller/ExternalDiagramEditor' + ,'common/main/lib/controller/ReviewChanges' + ,'common/main/lib/controller/Protection' + ,'common/main/lib/controller/Desktop' + ], function() { + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { diff --git a/apps/presentationeditor/main/app_dev.js b/apps/presentationeditor/main/app_dev.js index ef7679451..278c6bcf0 100644 --- a/apps/presentationeditor/main/app_dev.js +++ b/apps/presentationeditor/main/app_dev.js @@ -151,40 +151,40 @@ require([ ] }); - Common.Locale.apply(); - - require([ - 'presentationeditor/main/app/controller/Viewport', - 'presentationeditor/main/app/controller/DocumentHolder', - 'presentationeditor/main/app/controller/Toolbar', - 'presentationeditor/main/app/controller/Statusbar', - 'presentationeditor/main/app/controller/RightMenu', - 'presentationeditor/main/app/controller/LeftMenu', - 'presentationeditor/main/app/controller/Main', - 'presentationeditor/main/app/view/FileMenuPanels', - 'presentationeditor/main/app/view/ParagraphSettings', - 'presentationeditor/main/app/view/ImageSettings', - 'presentationeditor/main/app/view/ShapeSettings', - 'presentationeditor/main/app/view/SlideSettings', - 'presentationeditor/main/app/view/TableSettings', - 'presentationeditor/main/app/view/TextArtSettings', - 'presentationeditor/main/app/view/SignatureSettings', - 'common/main/lib/util/utils', - 'common/main/lib/util/LocalStorage', - 'common/main/lib/controller/Fonts' - /** coauthoring begin **/ - ,'common/main/lib/controller/Comments', - 'common/main/lib/controller/Chat', - /** coauthoring end **/ - 'common/main/lib/controller/Plugins', - 'presentationeditor/main/app/view/ChartSettings', - 'common/main/lib/controller/ExternalDiagramEditor' - ,'common/main/lib/controller/ReviewChanges' - ,'common/main/lib/controller/Protection' - ,'common/main/lib/controller/Desktop' - ], function() { - window.compareVersions = true; - app.start(); + Common.Locale.apply(function(){ + require([ + 'presentationeditor/main/app/controller/Viewport', + 'presentationeditor/main/app/controller/DocumentHolder', + 'presentationeditor/main/app/controller/Toolbar', + 'presentationeditor/main/app/controller/Statusbar', + 'presentationeditor/main/app/controller/RightMenu', + 'presentationeditor/main/app/controller/LeftMenu', + 'presentationeditor/main/app/controller/Main', + 'presentationeditor/main/app/view/FileMenuPanels', + 'presentationeditor/main/app/view/ParagraphSettings', + 'presentationeditor/main/app/view/ImageSettings', + 'presentationeditor/main/app/view/ShapeSettings', + 'presentationeditor/main/app/view/SlideSettings', + 'presentationeditor/main/app/view/TableSettings', + 'presentationeditor/main/app/view/TextArtSettings', + 'presentationeditor/main/app/view/SignatureSettings', + 'common/main/lib/util/utils', + 'common/main/lib/util/LocalStorage', + 'common/main/lib/controller/Fonts' + /** coauthoring begin **/ + ,'common/main/lib/controller/Comments', + 'common/main/lib/controller/Chat', + /** coauthoring end **/ + 'common/main/lib/controller/Plugins', + 'presentationeditor/main/app/view/ChartSettings', + 'common/main/lib/controller/ExternalDiagramEditor' + ,'common/main/lib/controller/ReviewChanges' + ,'common/main/lib/controller/Protection' + ,'common/main/lib/controller/Desktop' + ], function() { + window.compareVersions = true; + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { diff --git a/apps/presentationeditor/mobile/app-dev.js b/apps/presentationeditor/mobile/app-dev.js index 575778b44..4870f02af 100644 --- a/apps/presentationeditor/mobile/app-dev.js +++ b/apps/presentationeditor/mobile/app-dev.js @@ -153,8 +153,6 @@ require([ ] }); - Common.Locale.apply(); - var device = Framework7.prototype.device; var loadPlatformCss = function (filename, opt){ var fileref = document.createElement('link'); @@ -193,36 +191,38 @@ require([ //Load platform styles loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); - require([ - 'common/main/lib/util/LocalStorage', - 'common/main/lib/util/utils', - 'common/mobile/lib/controller/Plugins', - 'presentationeditor/mobile/app/controller/Editor', - 'presentationeditor/mobile/app/controller/Toolbar', - 'presentationeditor/mobile/app/controller/Search', - 'presentationeditor/mobile/app/controller/Main', - 'presentationeditor/mobile/app/controller/DocumentHolder', - 'presentationeditor/mobile/app/controller/DocumentPreview', - 'presentationeditor/mobile/app/controller/Settings', - 'presentationeditor/mobile/app/controller/edit/EditContainer', - 'presentationeditor/mobile/app/controller/edit/EditText', - 'presentationeditor/mobile/app/controller/edit/EditTable', - 'presentationeditor/mobile/app/controller/edit/EditImage', - 'presentationeditor/mobile/app/controller/edit/EditShape', - 'presentationeditor/mobile/app/controller/edit/EditSlide', - 'presentationeditor/mobile/app/controller/edit/EditChart', - 'presentationeditor/mobile/app/controller/edit/EditLink', - 'presentationeditor/mobile/app/controller/add/AddContainer', - 'presentationeditor/mobile/app/controller/add/AddTable', - 'presentationeditor/mobile/app/controller/add/AddShape', - 'presentationeditor/mobile/app/controller/add/AddImage', - 'presentationeditor/mobile/app/controller/add/AddLink', - 'presentationeditor/mobile/app/controller/add/AddSlide', - 'common/mobile/lib/controller/Collaboration' + Common.Locale.apply(function(){ + require([ + 'common/main/lib/util/LocalStorage', + 'common/main/lib/util/utils', + 'common/mobile/lib/controller/Plugins', + 'presentationeditor/mobile/app/controller/Editor', + 'presentationeditor/mobile/app/controller/Toolbar', + 'presentationeditor/mobile/app/controller/Search', + 'presentationeditor/mobile/app/controller/Main', + 'presentationeditor/mobile/app/controller/DocumentHolder', + 'presentationeditor/mobile/app/controller/DocumentPreview', + 'presentationeditor/mobile/app/controller/Settings', + 'presentationeditor/mobile/app/controller/edit/EditContainer', + 'presentationeditor/mobile/app/controller/edit/EditText', + 'presentationeditor/mobile/app/controller/edit/EditTable', + 'presentationeditor/mobile/app/controller/edit/EditImage', + 'presentationeditor/mobile/app/controller/edit/EditShape', + 'presentationeditor/mobile/app/controller/edit/EditSlide', + 'presentationeditor/mobile/app/controller/edit/EditChart', + 'presentationeditor/mobile/app/controller/edit/EditLink', + 'presentationeditor/mobile/app/controller/add/AddContainer', + 'presentationeditor/mobile/app/controller/add/AddTable', + 'presentationeditor/mobile/app/controller/add/AddShape', + 'presentationeditor/mobile/app/controller/add/AddImage', + 'presentationeditor/mobile/app/controller/add/AddLink', + 'presentationeditor/mobile/app/controller/add/AddSlide', + 'common/mobile/lib/controller/Collaboration' - ], function() { - window.compareVersions = true; - app.start(); + ], function() { + window.compareVersions = true; + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { diff --git a/apps/presentationeditor/mobile/app.js b/apps/presentationeditor/mobile/app.js index ec416bc5e..abcec73a8 100644 --- a/apps/presentationeditor/mobile/app.js +++ b/apps/presentationeditor/mobile/app.js @@ -164,8 +164,6 @@ require([ ] }); - Common.Locale.apply(); - var device = Framework7.prototype.device; var loadPlatformCss = function (filename, opt){ var fileref = document.createElement('link'); @@ -204,34 +202,36 @@ require([ //Load platform styles loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); - require([ - 'common/main/lib/util/LocalStorage', - 'common/main/lib/util/utils', - 'common/mobile/lib/controller/Plugins', - 'presentationeditor/mobile/app/controller/Editor', - 'presentationeditor/mobile/app/controller/Toolbar', - 'presentationeditor/mobile/app/controller/Search', - 'presentationeditor/mobile/app/controller/Main', - 'presentationeditor/mobile/app/controller/DocumentHolder', - 'presentationeditor/mobile/app/controller/DocumentPreview', - 'presentationeditor/mobile/app/controller/Settings', - 'presentationeditor/mobile/app/controller/edit/EditContainer', - 'presentationeditor/mobile/app/controller/edit/EditText', - 'presentationeditor/mobile/app/controller/edit/EditTable', - 'presentationeditor/mobile/app/controller/edit/EditImage', - 'presentationeditor/mobile/app/controller/edit/EditShape', - 'presentationeditor/mobile/app/controller/edit/EditSlide', - 'presentationeditor/mobile/app/controller/edit/EditChart', - 'presentationeditor/mobile/app/controller/edit/EditLink', - 'presentationeditor/mobile/app/controller/add/AddContainer', - 'presentationeditor/mobile/app/controller/add/AddTable', - 'presentationeditor/mobile/app/controller/add/AddShape', - 'presentationeditor/mobile/app/controller/add/AddImage', - 'presentationeditor/mobile/app/controller/add/AddLink', - 'presentationeditor/mobile/app/controller/add/AddSlide', - 'common/mobile/lib/controller/Collaboration' - ], function() { - app.start(); + Common.Locale.apply(function(){ + require([ + 'common/main/lib/util/LocalStorage', + 'common/main/lib/util/utils', + 'common/mobile/lib/controller/Plugins', + 'presentationeditor/mobile/app/controller/Editor', + 'presentationeditor/mobile/app/controller/Toolbar', + 'presentationeditor/mobile/app/controller/Search', + 'presentationeditor/mobile/app/controller/Main', + 'presentationeditor/mobile/app/controller/DocumentHolder', + 'presentationeditor/mobile/app/controller/DocumentPreview', + 'presentationeditor/mobile/app/controller/Settings', + 'presentationeditor/mobile/app/controller/edit/EditContainer', + 'presentationeditor/mobile/app/controller/edit/EditText', + 'presentationeditor/mobile/app/controller/edit/EditTable', + 'presentationeditor/mobile/app/controller/edit/EditImage', + 'presentationeditor/mobile/app/controller/edit/EditShape', + 'presentationeditor/mobile/app/controller/edit/EditSlide', + 'presentationeditor/mobile/app/controller/edit/EditChart', + 'presentationeditor/mobile/app/controller/edit/EditLink', + 'presentationeditor/mobile/app/controller/add/AddContainer', + 'presentationeditor/mobile/app/controller/add/AddTable', + 'presentationeditor/mobile/app/controller/add/AddShape', + 'presentationeditor/mobile/app/controller/add/AddImage', + 'presentationeditor/mobile/app/controller/add/AddLink', + 'presentationeditor/mobile/app/controller/add/AddSlide', + 'common/mobile/lib/controller/Collaboration' + ], function() { + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { diff --git a/apps/spreadsheeteditor/main/app.js b/apps/spreadsheeteditor/main/app.js index f68d2b4f7..f274e5365 100644 --- a/apps/spreadsheeteditor/main/app.js +++ b/apps/spreadsheeteditor/main/app.js @@ -167,42 +167,42 @@ require([ ] }); - Common.Locale.apply(); - - require([ - 'spreadsheeteditor/main/app/controller/Viewport', - 'spreadsheeteditor/main/app/controller/DocumentHolder', - 'spreadsheeteditor/main/app/controller/CellEditor', - 'spreadsheeteditor/main/app/controller/Toolbar', - 'spreadsheeteditor/main/app/controller/Statusbar', - 'spreadsheeteditor/main/app/controller/Spellcheck', - 'spreadsheeteditor/main/app/controller/RightMenu', - 'spreadsheeteditor/main/app/controller/LeftMenu', - 'spreadsheeteditor/main/app/controller/Main', - 'spreadsheeteditor/main/app/controller/Print', - 'spreadsheeteditor/main/app/controller/PivotTable', - 'spreadsheeteditor/main/app/controller/DataTab', - 'spreadsheeteditor/main/app/view/FileMenuPanels', - 'spreadsheeteditor/main/app/view/ParagraphSettings', - 'spreadsheeteditor/main/app/view/ImageSettings', - 'spreadsheeteditor/main/app/view/ChartSettings', - 'spreadsheeteditor/main/app/view/ShapeSettings', - 'spreadsheeteditor/main/app/view/TextArtSettings', - 'spreadsheeteditor/main/app/view/PivotSettings', - 'spreadsheeteditor/main/app/view/FieldSettingsDialog', - 'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog', - 'spreadsheeteditor/main/app/view/SignatureSettings', - 'common/main/lib/util/utils', - 'common/main/lib/util/LocalStorage', - 'common/main/lib/controller/Fonts', - 'common/main/lib/controller/Comments', - 'common/main/lib/controller/Chat', - 'common/main/lib/controller/Plugins' - ,'common/main/lib/controller/ReviewChanges' - ,'common/main/lib/controller/Protection' - ,'common/main/lib/controller/Desktop' - ], function() { - app.start(); + Common.Locale.apply(function(){ + require([ + 'spreadsheeteditor/main/app/controller/Viewport', + 'spreadsheeteditor/main/app/controller/DocumentHolder', + 'spreadsheeteditor/main/app/controller/CellEditor', + 'spreadsheeteditor/main/app/controller/Toolbar', + 'spreadsheeteditor/main/app/controller/Statusbar', + 'spreadsheeteditor/main/app/controller/Spellcheck', + 'spreadsheeteditor/main/app/controller/RightMenu', + 'spreadsheeteditor/main/app/controller/LeftMenu', + 'spreadsheeteditor/main/app/controller/Main', + 'spreadsheeteditor/main/app/controller/Print', + 'spreadsheeteditor/main/app/controller/PivotTable', + 'spreadsheeteditor/main/app/controller/DataTab', + 'spreadsheeteditor/main/app/view/FileMenuPanels', + 'spreadsheeteditor/main/app/view/ParagraphSettings', + 'spreadsheeteditor/main/app/view/ImageSettings', + 'spreadsheeteditor/main/app/view/ChartSettings', + 'spreadsheeteditor/main/app/view/ShapeSettings', + 'spreadsheeteditor/main/app/view/TextArtSettings', + 'spreadsheeteditor/main/app/view/PivotSettings', + 'spreadsheeteditor/main/app/view/FieldSettingsDialog', + 'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog', + 'spreadsheeteditor/main/app/view/SignatureSettings', + 'common/main/lib/util/utils', + 'common/main/lib/util/LocalStorage', + 'common/main/lib/controller/Fonts', + 'common/main/lib/controller/Comments', + 'common/main/lib/controller/Chat', + 'common/main/lib/controller/Plugins' + ,'common/main/lib/controller/ReviewChanges' + ,'common/main/lib/controller/Protection' + ,'common/main/lib/controller/Desktop' + ], function() { + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { diff --git a/apps/spreadsheeteditor/main/app_dev.js b/apps/spreadsheeteditor/main/app_dev.js index f2feab9a3..d3b10623a 100644 --- a/apps/spreadsheeteditor/main/app_dev.js +++ b/apps/spreadsheeteditor/main/app_dev.js @@ -157,43 +157,43 @@ require([ ] }); - Common.Locale.apply(); - - require([ - 'spreadsheeteditor/main/app/controller/Viewport', - 'spreadsheeteditor/main/app/controller/DocumentHolder', - 'spreadsheeteditor/main/app/controller/CellEditor', - 'spreadsheeteditor/main/app/controller/Toolbar', - 'spreadsheeteditor/main/app/controller/Statusbar', - 'spreadsheeteditor/main/app/controller/Spellcheck', - 'spreadsheeteditor/main/app/controller/RightMenu', - 'spreadsheeteditor/main/app/controller/LeftMenu', - 'spreadsheeteditor/main/app/controller/Main', - 'spreadsheeteditor/main/app/controller/Print', - 'spreadsheeteditor/main/app/controller/PivotTable', - 'spreadsheeteditor/main/app/controller/DataTab', - 'spreadsheeteditor/main/app/view/FileMenuPanels', - 'spreadsheeteditor/main/app/view/ParagraphSettings', - 'spreadsheeteditor/main/app/view/ImageSettings', - 'spreadsheeteditor/main/app/view/ChartSettings', - 'spreadsheeteditor/main/app/view/ShapeSettings', - 'spreadsheeteditor/main/app/view/TextArtSettings', - 'spreadsheeteditor/main/app/view/PivotSettings', - 'spreadsheeteditor/main/app/view/FieldSettingsDialog', - 'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog', - 'spreadsheeteditor/main/app/view/SignatureSettings', - 'common/main/lib/util/utils', - 'common/main/lib/util/LocalStorage', - 'common/main/lib/controller/Fonts', - 'common/main/lib/controller/Comments', - 'common/main/lib/controller/Chat', - 'common/main/lib/controller/Plugins' - ,'common/main/lib/controller/ReviewChanges' - ,'common/main/lib/controller/Protection' - ,'common/main/lib/controller/Desktop' - ], function() { - window.compareVersions = true; - app.start(); + Common.Locale.apply(function(){ + require([ + 'spreadsheeteditor/main/app/controller/Viewport', + 'spreadsheeteditor/main/app/controller/DocumentHolder', + 'spreadsheeteditor/main/app/controller/CellEditor', + 'spreadsheeteditor/main/app/controller/Toolbar', + 'spreadsheeteditor/main/app/controller/Statusbar', + 'spreadsheeteditor/main/app/controller/Spellcheck', + 'spreadsheeteditor/main/app/controller/RightMenu', + 'spreadsheeteditor/main/app/controller/LeftMenu', + 'spreadsheeteditor/main/app/controller/Main', + 'spreadsheeteditor/main/app/controller/Print', + 'spreadsheeteditor/main/app/controller/PivotTable', + 'spreadsheeteditor/main/app/controller/DataTab', + 'spreadsheeteditor/main/app/view/FileMenuPanels', + 'spreadsheeteditor/main/app/view/ParagraphSettings', + 'spreadsheeteditor/main/app/view/ImageSettings', + 'spreadsheeteditor/main/app/view/ChartSettings', + 'spreadsheeteditor/main/app/view/ShapeSettings', + 'spreadsheeteditor/main/app/view/TextArtSettings', + 'spreadsheeteditor/main/app/view/PivotSettings', + 'spreadsheeteditor/main/app/view/FieldSettingsDialog', + 'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog', + 'spreadsheeteditor/main/app/view/SignatureSettings', + 'common/main/lib/util/utils', + 'common/main/lib/util/LocalStorage', + 'common/main/lib/controller/Fonts', + 'common/main/lib/controller/Comments', + 'common/main/lib/controller/Chat', + 'common/main/lib/controller/Plugins' + ,'common/main/lib/controller/ReviewChanges' + ,'common/main/lib/controller/Protection' + ,'common/main/lib/controller/Desktop' + ], function() { + window.compareVersions = true; + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { diff --git a/apps/spreadsheeteditor/mobile/app-dev.js b/apps/spreadsheeteditor/mobile/app-dev.js index 1a92b9ba2..b19dcb0bf 100644 --- a/apps/spreadsheeteditor/mobile/app-dev.js +++ b/apps/spreadsheeteditor/mobile/app-dev.js @@ -139,8 +139,6 @@ require([ ] }); - Common.Locale.apply(); - var device = Framework7.prototype.device; var loadPlatformCss = function (filename, opt){ var fileref = document.createElement('link'); @@ -182,36 +180,38 @@ require([ //Load platform styles loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); - require([ - 'common/main/lib/util/LocalStorage', - 'common/main/lib/util/utils', - 'common/mobile/lib/controller/Plugins', - 'spreadsheeteditor/mobile/app/controller/Editor', - 'spreadsheeteditor/mobile/app/controller/Toolbar', - 'spreadsheeteditor/mobile/app/controller/Search', - 'spreadsheeteditor/mobile/app/controller/Main', - 'spreadsheeteditor/mobile/app/controller/DocumentHolder' - ,'spreadsheeteditor/mobile/app/controller/CellEditor' - ,'spreadsheeteditor/mobile/app/controller/Statusbar' - ,'spreadsheeteditor/mobile/app/controller/Settings' - ,'spreadsheeteditor/mobile/app/controller/edit/EditContainer' - ,'spreadsheeteditor/mobile/app/controller/edit/EditCell' - ,'spreadsheeteditor/mobile/app/controller/edit/EditText' - ,'spreadsheeteditor/mobile/app/controller/edit/EditImage' - ,'spreadsheeteditor/mobile/app/controller/edit/EditShape' - ,'spreadsheeteditor/mobile/app/controller/edit/EditChart' - ,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink' - ,'spreadsheeteditor/mobile/app/controller/add/AddContainer' - ,'spreadsheeteditor/mobile/app/controller/add/AddChart' - ,'spreadsheeteditor/mobile/app/controller/add/AddFunction' - ,'spreadsheeteditor/mobile/app/controller/add/AddShape' - ,'spreadsheeteditor/mobile/app/controller/add/AddOther' - ,'spreadsheeteditor/mobile/app/controller/add/AddLink' - ,'spreadsheeteditor/mobile/app/controller/FilterOptions' - ,'common/mobile/lib/controller/Collaboration' - ], function() { - window.compareVersions = true; - app.start(); + Common.Locale.apply(function(){ + require([ + 'common/main/lib/util/LocalStorage', + 'common/main/lib/util/utils', + 'common/mobile/lib/controller/Plugins', + 'spreadsheeteditor/mobile/app/controller/Editor', + 'spreadsheeteditor/mobile/app/controller/Toolbar', + 'spreadsheeteditor/mobile/app/controller/Search', + 'spreadsheeteditor/mobile/app/controller/Main', + 'spreadsheeteditor/mobile/app/controller/DocumentHolder' + ,'spreadsheeteditor/mobile/app/controller/CellEditor' + ,'spreadsheeteditor/mobile/app/controller/Statusbar' + ,'spreadsheeteditor/mobile/app/controller/Settings' + ,'spreadsheeteditor/mobile/app/controller/edit/EditContainer' + ,'spreadsheeteditor/mobile/app/controller/edit/EditCell' + ,'spreadsheeteditor/mobile/app/controller/edit/EditText' + ,'spreadsheeteditor/mobile/app/controller/edit/EditImage' + ,'spreadsheeteditor/mobile/app/controller/edit/EditShape' + ,'spreadsheeteditor/mobile/app/controller/edit/EditChart' + ,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink' + ,'spreadsheeteditor/mobile/app/controller/add/AddContainer' + ,'spreadsheeteditor/mobile/app/controller/add/AddChart' + ,'spreadsheeteditor/mobile/app/controller/add/AddFunction' + ,'spreadsheeteditor/mobile/app/controller/add/AddShape' + ,'spreadsheeteditor/mobile/app/controller/add/AddOther' + ,'spreadsheeteditor/mobile/app/controller/add/AddLink' + ,'spreadsheeteditor/mobile/app/controller/FilterOptions' + ,'common/mobile/lib/controller/Collaboration' + ], function() { + window.compareVersions = true; + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { diff --git a/apps/spreadsheeteditor/mobile/app.js b/apps/spreadsheeteditor/mobile/app.js index 582f07fd7..9536367dd 100644 --- a/apps/spreadsheeteditor/mobile/app.js +++ b/apps/spreadsheeteditor/mobile/app.js @@ -150,8 +150,6 @@ require([ ] }); - Common.Locale.apply(); - var device = Framework7.prototype.device; var loadPlatformCss = function (filename, opt){ var fileref = document.createElement('link'); @@ -193,35 +191,37 @@ require([ //Load platform styles loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css'); - require([ - 'common/main/lib/util/LocalStorage', - 'common/main/lib/util/utils', - 'common/mobile/lib/controller/Plugins', - 'spreadsheeteditor/mobile/app/controller/Editor', - 'spreadsheeteditor/mobile/app/controller/Toolbar', - 'spreadsheeteditor/mobile/app/controller/Search', - 'spreadsheeteditor/mobile/app/controller/Main', - 'spreadsheeteditor/mobile/app/controller/DocumentHolder' - ,'spreadsheeteditor/mobile/app/controller/CellEditor' - ,'spreadsheeteditor/mobile/app/controller/Statusbar' - ,'spreadsheeteditor/mobile/app/controller/Settings' - ,'spreadsheeteditor/mobile/app/controller/edit/EditContainer' - ,'spreadsheeteditor/mobile/app/controller/edit/EditCell' - ,'spreadsheeteditor/mobile/app/controller/edit/EditText' - ,'spreadsheeteditor/mobile/app/controller/edit/EditImage' - ,'spreadsheeteditor/mobile/app/controller/edit/EditShape' - ,'spreadsheeteditor/mobile/app/controller/edit/EditChart' - ,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink' - ,'spreadsheeteditor/mobile/app/controller/add/AddContainer' - ,'spreadsheeteditor/mobile/app/controller/add/AddChart' - ,'spreadsheeteditor/mobile/app/controller/add/AddFunction' - ,'spreadsheeteditor/mobile/app/controller/add/AddShape' - ,'spreadsheeteditor/mobile/app/controller/add/AddOther' - ,'spreadsheeteditor/mobile/app/controller/add/AddLink' - ,'spreadsheeteditor/mobile/app/controller/FilterOptions' - ,'common/mobile/lib/controller/Collaboration' - ], function() { - app.start(); + Common.Locale.apply(function(){ + require([ + 'common/main/lib/util/LocalStorage', + 'common/main/lib/util/utils', + 'common/mobile/lib/controller/Plugins', + 'spreadsheeteditor/mobile/app/controller/Editor', + 'spreadsheeteditor/mobile/app/controller/Toolbar', + 'spreadsheeteditor/mobile/app/controller/Search', + 'spreadsheeteditor/mobile/app/controller/Main', + 'spreadsheeteditor/mobile/app/controller/DocumentHolder' + ,'spreadsheeteditor/mobile/app/controller/CellEditor' + ,'spreadsheeteditor/mobile/app/controller/Statusbar' + ,'spreadsheeteditor/mobile/app/controller/Settings' + ,'spreadsheeteditor/mobile/app/controller/edit/EditContainer' + ,'spreadsheeteditor/mobile/app/controller/edit/EditCell' + ,'spreadsheeteditor/mobile/app/controller/edit/EditText' + ,'spreadsheeteditor/mobile/app/controller/edit/EditImage' + ,'spreadsheeteditor/mobile/app/controller/edit/EditShape' + ,'spreadsheeteditor/mobile/app/controller/edit/EditChart' + ,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink' + ,'spreadsheeteditor/mobile/app/controller/add/AddContainer' + ,'spreadsheeteditor/mobile/app/controller/add/AddChart' + ,'spreadsheeteditor/mobile/app/controller/add/AddFunction' + ,'spreadsheeteditor/mobile/app/controller/add/AddShape' + ,'spreadsheeteditor/mobile/app/controller/add/AddOther' + ,'spreadsheeteditor/mobile/app/controller/add/AddLink' + ,'spreadsheeteditor/mobile/app/controller/FilterOptions' + ,'common/mobile/lib/controller/Collaboration' + ], function() { + app.start(); + }); }); }, function(err) { if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { From 8ec738fa18793b4433b3b4ea525bb54d3c7eeabb Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 18 Sep 2019 14:15:31 +0300 Subject: [PATCH 11/17] Add es6-promise to vendor --- vendor/es6-promise/CHANGELOG.md | 1318 +++++++++++++++++++ vendor/es6-promise/LICENSE.htm | 1383 ++++++++++++++++++++ vendor/es6-promise/README.md | 1303 ++++++++++++++++++ vendor/es6-promise/es6-promise.auto.js | 1176 +++++++++++++++++ vendor/es6-promise/es6-promise.auto.min.js | 1 + vendor/es6-promise/es6-promise.js | 1174 +++++++++++++++++ vendor/es6-promise/es6-promise.min.js | 1 + 7 files changed, 6356 insertions(+) create mode 100644 vendor/es6-promise/CHANGELOG.md create mode 100644 vendor/es6-promise/LICENSE.htm create mode 100644 vendor/es6-promise/README.md create mode 100644 vendor/es6-promise/es6-promise.auto.js create mode 100644 vendor/es6-promise/es6-promise.auto.min.js create mode 100644 vendor/es6-promise/es6-promise.js create mode 100644 vendor/es6-promise/es6-promise.min.js diff --git a/vendor/es6-promise/CHANGELOG.md b/vendor/es6-promise/CHANGELOG.md new file mode 100644 index 000000000..8d775e9e2 --- /dev/null +++ b/vendor/es6-promise/CHANGELOG.md @@ -0,0 +1,1318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + es6-promise/CHANGELOG.md at master · stefanpenner/es6-promise + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + + +
+
+ +
    + + + +
  • + + + + +
  • + +
  • + +
    + +
    + + + Watch + + +
    + Notifications +
    +
    + + + + + + + +
    +
    +
    + +
    +
  • + +
  • +
    +
    + + +
    +
    + + +
    + +
  • + +
  • +
    + + Fork + +
    + +

    Fork es6-promise

    +
    +
    + +
    +

    If this dialog fails to load, you can visit the fork page directly.

    +
    +
    +
    +
    + + +
  • +
+ +

+ + /es6-promise + + +

+ +
+ + + + + + +
+
+
+ + + + + + + + + Permalink + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+ Fetching contributors… +
+ +
+ + Cannot retrieve contributors at this time +
+
+ + + + +
+ +
+ +
+ 156 lines (98 sloc) + + 3.53 KB +
+ +
+ +
+ Raw + Blame + History +
+ + +
+ + + + +
+ +
+
+ +
+
+
+ + + + + +
+

Master

+

4.2.5

+
    +
  • remove old try/catch performance hacks, modern runtimes do not require these tricks
  • +
+

4.2.4

+
    +
  • [Fixes #305] Confuse webpack
  • +
+

4.2.3

+
    +
  • Cleanup testem related build configuration
  • +
  • Use prepublishOnly instead of prepublish (thanks @rhysd)
  • +
  • Add Node.js 9, 8 to testing matrix
  • +
  • drop now unused s3 deployment files
  • +
  • internal cleanup (thanks to @bekzod, @mariusschulz)
  • +
  • Fixup Changelog
  • +
+

4.2.2

+
    +
  • Ensure PROMISE_ID works correctly
  • +
  • internal cleanup (thanks yo @mariusschulz)
  • +
+

4.2.1

+
    +
  • drop bower support
  • +
+

4.2.0

+
    +
  • drop dist from git repo
  • +
  • add Promise.prototype.finally
  • +
  • update various build related dependencies
  • +
  • add CDN links
  • +
+

4.1.0

+
    +
  • [BUGFIX] Fix memory leak [#269]
  • +
  • [BUGFIX] Auto Bundles within an AMD Environment [#263]
  • +
+

4.0.5

+
    +
  • fix require('es6-promise/auto') for Node < 4
  • +
+

4.0.4

+ +

4.0.3

+
    +
  • fix Readme links
  • +
+

4.0.2

+
    +
  • fix require('es6-promise/auto');
  • +
+

4.0.0

+
    +
  • no longer polyfill automatically, if needed one can still invoke +require('es6-promise/auto') directly.
  • +
+

3.3.1

+
    +
  • fix links in readme
  • +
+

3.3.0

+
    +
  • support polyfil on WebMAF (playstation env)
  • +
  • fix tampering related bug global constructor was referenced by mistake.
  • +
  • provide TS Typings
  • +
  • increase compatibliity with sinon.useFakeTimers();
  • +
  • update build tools (use rollup)
  • +
  • directly export promise;
  • +
+

3.2.2

+
    +
  • IE8: use isArray
  • +
  • update build dependencies
  • +
+

3.2.1

+
    +
  • fix race tampering issue
  • +
  • use eslint
  • +
  • fix Promise.all tampering
  • +
  • remove unused code
  • +
  • fix issues with NWJS/electron
  • +
+

3.2.0

+
    +
  • improve tamper resistence of Promise.all Promise.race and +Promise.prototype.then (note, this isn't complete, but addresses an exception +when used \w core-js, follow up work will address entirely)
  • +
  • remove spec incompatible then chaining fast-path
  • +
  • add eslint
  • +
  • update build deps
  • +
+

3.1.2

+
    +
  • fix node detection issues with NWJS/electron
  • +
+

3.1.0

+
    +
  • improve performance of Promise.all when it encounters a non-promise input object input
  • +
  • then/resolve tamper protection
  • +
  • reduce AST size of promise constructor, to facilitate more inlining
  • +
  • Update README.md with details about PhantomJS requirement for running tests
  • +
  • Mangle and compress the minified version
  • +
+

3.0.2

+
    +
  • correctly bump both bower and package.json versions
  • +
+

3.0.1

+
    +
  • no longer include dist/test in npm releases
  • +
+

3.0.0

+
    +
  • +

    use nextTick() instead of setImmediate() to schedule microtasks with node 0.10. Later versions of +nodes are not affected as they were already using nextTick(). Note that using nextTick() might +trigger a depreciation warning on 0.10 as described at https://github.com/cujojs/when/issues/410. +The reason why nextTick() is preferred is that is setImmediate() would schedule a macrotask +instead of a microtask and might result in a different scheduling. +If needed you can revert to the former behavior as follow:

    +

    var Promise = require('es6-promise').Promise; +Promise._setScheduler(setImmediate);

    +
  • +
+

2.3.0

+
    +
  • #121: Ability to override the internal asap implementation
  • +
  • #120: Use an ascii character for an apostrophe, for source maps
  • +
+

2.2.0

+
    +
  • #116: Expose asap() and a way to override the scheduling mechanism on Promise
  • +
  • Lock to v0.2.3 of ember-cli
  • +
+

2.1.1

+
    +
  • Fix #100 via #105: tell browserify to ignore vertx require
  • +
  • Fix #101 via #102: "follow thenable state, not own state"
  • +
+

2.1.0

+
    +
  • #59: Automatic polyfill. No need to invoke ES6Promise.polyfill() anymore.
  • +
  • ... (see the commit log)
  • +
+

2.0.0

+
    +
  • re-sync with RSVP. Many large performance improvements and bugfixes.
  • +
+

1.0.0

+
    +
  • first subset of RSVP
  • +
+
+
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/vendor/es6-promise/LICENSE.htm b/vendor/es6-promise/LICENSE.htm new file mode 100644 index 000000000..23fa137a4 --- /dev/null +++ b/vendor/es6-promise/LICENSE.htm @@ -0,0 +1,1383 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + es6-promise/LICENSE at master · stefanpenner/es6-promise + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + + +
+
+ +
    + + + +
  • + + + + +
  • + +
  • + +
    + +
    + + + Watch + + +
    + Notifications +
    +
    + + + + + + + +
    +
    +
    + +
    +
  • + +
  • +
    +
    + + +
    +
    + + +
    + +
  • + +
  • +
    + + Fork + +
    + +

    Fork es6-promise

    +
    +
    + +
    +

    If this dialog fails to load, you can visit the fork page directly.

    +
    +
    +
    +
    + + +
  • +
+ +

+ + /es6-promise + + +

+ +
+ + + + + + +
+
+
+ + + + + + + + + Permalink + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ +
+
+
+ +

+ stefanpenner/es6-promise is licensed under the +

+

MIT License

+

A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

+
+ +
+
+

Permissions

+
    +
  • + + + Commercial use + +
  • +
  • + + + Modification + +
  • +
  • + + + Distribution + +
  • +
  • + + + Private use + +
  • +
+
+
+

Limitations

+
    +
  • + + + Liability + +
  • +
  • + + + Warranty + +
  • +
+
+
+

Conditions

+
    +
  • + + + License and copyright notice + +
  • +
+
+
+
+

+ This is not legal advice. + Learn more about repository licenses. +

+
+ + + + +
+
+ + @jakearchibald + jakearchibald + + Adding @stefanpenner to licence + + + + 99a48d0 + Apr 29, 2014 + +
+ +
+
+ + 3 contributors + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+ + + @wagenet + + @nmn + + @jakearchibald + + + +
+
+ + + + + +
+ +
+ +
+ 20 lines (16 sloc) + + 1.07 KB +
+ +
+ +
+ Raw + Blame + History +
+ + +
+ + + + +
+ +
+
+ +
+
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
+
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+ + + +
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/vendor/es6-promise/README.md b/vendor/es6-promise/README.md new file mode 100644 index 000000000..09b78595f --- /dev/null +++ b/vendor/es6-promise/README.md @@ -0,0 +1,1303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + es6-promise/README.md at master · stefanpenner/es6-promise + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + + + +
+ +
+ + +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + + +
+
+ +
    + + + +
  • + + + + +
  • + +
  • + +
    + +
    + + + Watch + + +
    + Notifications +
    +
    + + + + + + + +
    +
    +
    + +
    +
  • + +
  • +
    +
    + + +
    +
    + + +
    + +
  • + +
  • +
    + + Fork + +
    + +

    Fork es6-promise

    +
    +
    + +
    +

    If this dialog fails to load, you can visit the fork page directly.

    +
    +
    +
    +
    + + +
  • +
+ +

+ + /es6-promise + + +

+ +
+ + + + + + +
+
+
+ + + + + + + + + Permalink + + + + +
+ + +
+ + Branch: + master + + + + + + + +
+ +
+ + Find file + + + Copy path + +
+
+ + +
+ + Find file + + + Copy path + +
+
+ + + + +
+
+ + + + + remove bower support + + + + c9ac00c + Dec 22, 2017 + +
+ +
+
+ + 31 contributors + + +
+ +

+ Users who have contributed to this file +

+
+ +
+
+ + + @stefanpenner + + @jakearchibald + + @wycats + + @rwjblue + + @wKovacs64 + + @WebReflection + + @twokul + + @sandstrom + + @tomdale + + @MrP + + @mikepmunroe + + @thomasboyt + + @matthew-andrews + + @wibblymat + + @machty + + @LukasDrgon + + @kevinoid + + @jimt + + @joshnesbitt + + @joseluisq + + @snuggs + + @cyril-sf + + @domenic + + @dmitrylebedev + + @dgeb + + @daliwali + + + + +
+
+ + + + + +
+ +
+ +
+ 98 lines (65 sloc) + + 3.16 KB +
+ +
+ +
+ Raw + Blame + History +
+ + +
+ + + + +
+ +
+
+ +
+
+
+ + + + + +
+

ES6-Promise (subset of rsvp.js) Build Status

+

This is a polyfill of the ES6 Promise. The implementation is a subset of rsvp.js extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the full library.

+

For API details and how to use promises, see the JavaScript Promises HTML5Rocks article.

+

Downloads

+ +

CDN

+

To use via a CDN include this in your html:

+
<!-- Automatically provides/replaces `Promise` if missing or broken. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script> 
+
+<!-- Minified version of `es6-promise-auto` below. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script> 
+
+

Node.js

+

To install:

+
yarn add es6-promise
+

or

+
npm install es6-promise
+

To use:

+
var Promise = require('es6-promise').Promise;
+

Usage in IE<9

+

catch and finally are reserved keywords in IE<9, meaning +promise.catch(func) or promise.finally(func) throw a syntax error. To work +around this, you can use a string to access the property as shown in the +following example.

+

However most minifiers will automatically fix this for you, making the +resulting code safe for old browsers and production:

+
promise['catch'](function(err) {
+  // ...
+});
+
promise['finally'](function() {
+  // ...
+});
+

Auto-polyfill

+

To polyfill the global environment (either in Node or in the browser via CommonJS) use the following code snippet:

+
require('es6-promise').polyfill();
+

Alternatively

+
require('es6-promise/auto');
+

Notice that we don't assign the result of polyfill() to any variable. The polyfill() method will patch the global environment (in this case to the Promise name) when called.

+

Building & Testing

+

You will need to have PhantomJS installed globally in order to run the tests.

+

npm install -g phantomjs

+
    +
  • npm run build to build
  • +
  • npm test to run tests
  • +
  • npm start to run a build watcher, and webserver to test
  • +
  • npm run test:server for a testem test runner and watching builder
  • +
+
+
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+
+ +
+
+ + +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + + + + + + +
+ + + + diff --git a/vendor/es6-promise/es6-promise.auto.js b/vendor/es6-promise/es6-promise.auto.js new file mode 100644 index 000000000..7ad1de569 --- /dev/null +++ b/vendor/es6-promise/es6-promise.auto.js @@ -0,0 +1,1176 @@ +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.8+1e68dce6 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.ES6Promise = factory()); +}(this, (function () { 'use strict'; + +function objectOrFunction(x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} + +function isFunction(x) { + return typeof x === 'function'; +} + + + +var _isArray = void 0; +if (Array.isArray) { + _isArray = Array.isArray; +} else { + _isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; +} + +var isArray = _isArray; + +var len = 0; +var vertxNext = void 0; +var customSchedulerFn = void 0; + +var asap = function asap(callback, arg) { + queue[len] = callback; + queue[len + 1] = arg; + len += 2; + if (len === 2) { + // If len is 2, that means that we need to schedule an async flush. + // If additional callbacks are queued before the queue is flushed, they + // will be processed by this flush that we are scheduling. + if (customSchedulerFn) { + customSchedulerFn(flush); + } else { + scheduleFlush(); + } + } +}; + +function setScheduler(scheduleFn) { + customSchedulerFn = scheduleFn; +} + +function setAsap(asapFn) { + asap = asapFn; +} + +var browserWindow = typeof window !== 'undefined' ? window : undefined; +var browserGlobal = browserWindow || {}; +var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; +var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + +// test for web worker but not in IE10 +var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; + +// node +function useNextTick() { + // node version 0.10.x displays a deprecation warning when nextTick is used recursively + // see https://github.com/cujojs/when/issues/410 for details + return function () { + return process.nextTick(flush); + }; +} + +// vertx +function useVertxTimer() { + if (typeof vertxNext !== 'undefined') { + return function () { + vertxNext(flush); + }; + } + + return useSetTimeout(); +} + +function useMutationObserver() { + var iterations = 0; + var observer = new BrowserMutationObserver(flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + + return function () { + node.data = iterations = ++iterations % 2; + }; +} + +// web worker +function useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = flush; + return function () { + return channel.port2.postMessage(0); + }; +} + +function useSetTimeout() { + // Store setTimeout reference so es6-promise will be unaffected by + // other code modifying setTimeout (like sinon.useFakeTimers()) + var globalSetTimeout = setTimeout; + return function () { + return globalSetTimeout(flush, 1); + }; +} + +var queue = new Array(1000); +function flush() { + for (var i = 0; i < len; i += 2) { + var callback = queue[i]; + var arg = queue[i + 1]; + + callback(arg); + + queue[i] = undefined; + queue[i + 1] = undefined; + } + + len = 0; +} + +function attemptVertx() { + try { + var vertx = Function('return this')().require('vertx'); + vertxNext = vertx.runOnLoop || vertx.runOnContext; + return useVertxTimer(); + } catch (e) { + return useSetTimeout(); + } +} + +var scheduleFlush = void 0; +// Decide what async method to use to triggering processing of queued callbacks: +if (isNode) { + scheduleFlush = useNextTick(); +} else if (BrowserMutationObserver) { + scheduleFlush = useMutationObserver(); +} else if (isWorker) { + scheduleFlush = useMessageChannel(); +} else if (browserWindow === undefined && typeof require === 'function') { + scheduleFlush = attemptVertx(); +} else { + scheduleFlush = useSetTimeout(); +} + +function then(onFulfillment, onRejection) { + var parent = this; + + var child = new this.constructor(noop); + + if (child[PROMISE_ID] === undefined) { + makePromise(child); + } + + var _state = parent._state; + + + if (_state) { + var callback = arguments[_state - 1]; + asap(function () { + return invokeCallback(_state, child, callback, parent._result); + }); + } else { + subscribe(parent, child, onFulfillment, onRejection); + } + + return child; +} + +/** + `Promise.resolve` returns a promise that will become resolved with the + passed `value`. It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + resolve(1); + }); + + promise.then(function(value){ + // value === 1 + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.resolve(1); + + promise.then(function(value){ + // value === 1 + }); + ``` + + @method resolve + @static + @param {Any} value value that the returned promise will be resolved with + Useful for tooling. + @return {Promise} a promise that will become fulfilled with the given + `value` +*/ +function resolve$1(object) { + /*jshint validthis:true */ + var Constructor = this; + + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + + var promise = new Constructor(noop); + resolve(promise, object); + return promise; +} + +var PROMISE_ID = Math.random().toString(36).substring(2); + +function noop() {} + +var PENDING = void 0; +var FULFILLED = 1; +var REJECTED = 2; + +function selfFulfillment() { + return new TypeError("You cannot resolve a promise with itself"); +} + +function cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); +} + +function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { + try { + then$$1.call(value, fulfillmentHandler, rejectionHandler); + } catch (e) { + return e; + } +} + +function handleForeignThenable(promise, thenable, then$$1) { + asap(function (promise) { + var sealed = false; + var error = tryThen(then$$1, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + resolve(promise, value); + } else { + fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + + reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + + if (!sealed && error) { + sealed = true; + reject(promise, error); + } + }, promise); +} + +function handleOwnThenable(promise, thenable) { + if (thenable._state === FULFILLED) { + fulfill(promise, thenable._result); + } else if (thenable._state === REJECTED) { + reject(promise, thenable._result); + } else { + subscribe(thenable, undefined, function (value) { + return resolve(promise, value); + }, function (reason) { + return reject(promise, reason); + }); + } +} + +function handleMaybeThenable(promise, maybeThenable, then$$1) { + if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { + handleOwnThenable(promise, maybeThenable); + } else { + if (then$$1 === undefined) { + fulfill(promise, maybeThenable); + } else if (isFunction(then$$1)) { + handleForeignThenable(promise, maybeThenable, then$$1); + } else { + fulfill(promise, maybeThenable); + } + } +} + +function resolve(promise, value) { + if (promise === value) { + reject(promise, selfFulfillment()); + } else if (objectOrFunction(value)) { + var then$$1 = void 0; + try { + then$$1 = value.then; + } catch (error) { + reject(promise, error); + return; + } + handleMaybeThenable(promise, value, then$$1); + } else { + fulfill(promise, value); + } +} + +function publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + + publish(promise); +} + +function fulfill(promise, value) { + if (promise._state !== PENDING) { + return; + } + + promise._result = value; + promise._state = FULFILLED; + + if (promise._subscribers.length !== 0) { + asap(publish, promise); + } +} + +function reject(promise, reason) { + if (promise._state !== PENDING) { + return; + } + promise._state = REJECTED; + promise._result = reason; + + asap(publishRejection, promise); +} + +function subscribe(parent, child, onFulfillment, onRejection) { + var _subscribers = parent._subscribers; + var length = _subscribers.length; + + + parent._onerror = null; + + _subscribers[length] = child; + _subscribers[length + FULFILLED] = onFulfillment; + _subscribers[length + REJECTED] = onRejection; + + if (length === 0 && parent._state) { + asap(publish, parent); + } +} + +function publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + + if (subscribers.length === 0) { + return; + } + + var child = void 0, + callback = void 0, + detail = promise._result; + + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + + if (child) { + invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } + } + + promise._subscribers.length = 0; +} + +function invokeCallback(settled, promise, callback, detail) { + var hasCallback = isFunction(callback), + value = void 0, + error = void 0, + succeeded = true; + + if (hasCallback) { + try { + value = callback(detail); + } catch (e) { + succeeded = false; + error = e; + } + + if (promise === value) { + reject(promise, cannotReturnOwn()); + return; + } + } else { + value = detail; + } + + if (promise._state !== PENDING) { + // noop + } else if (hasCallback && succeeded) { + resolve(promise, value); + } else if (succeeded === false) { + reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + reject(promise, value); + } +} + +function initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + resolve(promise, value); + }, function rejectPromise(reason) { + reject(promise, reason); + }); + } catch (e) { + reject(promise, e); + } +} + +var id = 0; +function nextId() { + return id++; +} + +function makePromise(promise) { + promise[PROMISE_ID] = id++; + promise._state = undefined; + promise._result = undefined; + promise._subscribers = []; +} + +function validationError() { + return new Error('Array Methods must be provided an Array'); +} + +var Enumerator = function () { + function Enumerator(Constructor, input) { + this._instanceConstructor = Constructor; + this.promise = new Constructor(noop); + + if (!this.promise[PROMISE_ID]) { + makePromise(this.promise); + } + + if (isArray(input)) { + this.length = input.length; + this._remaining = input.length; + + this._result = new Array(this.length); + + if (this.length === 0) { + fulfill(this.promise, this._result); + } else { + this.length = this.length || 0; + this._enumerate(input); + if (this._remaining === 0) { + fulfill(this.promise, this._result); + } + } + } else { + reject(this.promise, validationError()); + } + } + + Enumerator.prototype._enumerate = function _enumerate(input) { + for (var i = 0; this._state === PENDING && i < input.length; i++) { + this._eachEntry(input[i], i); + } + }; + + Enumerator.prototype._eachEntry = function _eachEntry(entry, i) { + var c = this._instanceConstructor; + var resolve$$1 = c.resolve; + + + if (resolve$$1 === resolve$1) { + var _then = void 0; + var error = void 0; + var didError = false; + try { + _then = entry.then; + } catch (e) { + didError = true; + error = e; + } + + if (_then === then && entry._state !== PENDING) { + this._settledAt(entry._state, i, entry._result); + } else if (typeof _then !== 'function') { + this._remaining--; + this._result[i] = entry; + } else if (c === Promise$2) { + var promise = new c(noop); + if (didError) { + reject(promise, error); + } else { + handleMaybeThenable(promise, entry, _then); + } + this._willSettleAt(promise, i); + } else { + this._willSettleAt(new c(function (resolve$$1) { + return resolve$$1(entry); + }), i); + } + } else { + this._willSettleAt(resolve$$1(entry), i); + } + }; + + Enumerator.prototype._settledAt = function _settledAt(state, i, value) { + var promise = this.promise; + + + if (promise._state === PENDING) { + this._remaining--; + + if (state === REJECTED) { + reject(promise, value); + } else { + this._result[i] = value; + } + } + + if (this._remaining === 0) { + fulfill(promise, this._result); + } + }; + + Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) { + var enumerator = this; + + subscribe(promise, undefined, function (value) { + return enumerator._settledAt(FULFILLED, i, value); + }, function (reason) { + return enumerator._settledAt(REJECTED, i, reason); + }); + }; + + return Enumerator; +}(); + +/** + `Promise.all` accepts an array of promises, and returns a new promise which + is fulfilled with an array of fulfillment values for the passed promises, or + rejected with the reason of the first passed promise to be rejected. It casts all + elements of the passed iterable to promises as it runs this algorithm. + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = resolve(2); + let promise3 = resolve(3); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // The array here would be [ 1, 2, 3 ]; + }); + ``` + + If any of the `promises` given to `all` are rejected, the first promise + that is rejected will be given as an argument to the returned promises's + rejection handler. For example: + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = reject(new Error("2")); + let promise3 = reject(new Error("3")); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // Code here never runs because there are rejected promises! + }, function(error) { + // error.message === "2" + }); + ``` + + @method all + @static + @param {Array} entries array of promises + @param {String} label optional string for labeling the promise. + Useful for tooling. + @return {Promise} promise that is fulfilled when all `promises` have been + fulfilled, or rejected if any of them become rejected. + @static +*/ +function all(entries) { + return new Enumerator(this, entries).promise; +} + +/** + `Promise.race` returns a new promise which is settled in the same way as the + first passed promise to settle. + + Example: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 2'); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // result === 'promise 2' because it was resolved before promise1 + // was resolved. + }); + ``` + + `Promise.race` is deterministic in that only the state of the first + settled promise matters. For example, even if other promises given to the + `promises` array argument are resolved, but the first settled promise has + become rejected before the other promises became fulfilled, the returned + promise will become rejected: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + reject(new Error('promise 2')); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // Code here never runs + }, function(reason){ + // reason.message === 'promise 2' because promise 2 became rejected before + // promise 1 became fulfilled + }); + ``` + + An example real-world use case is implementing timeouts: + + ```javascript + Promise.race([ajax('foo.json'), timeout(5000)]) + ``` + + @method race + @static + @param {Array} promises array of promises to observe + Useful for tooling. + @return {Promise} a promise which settles in the same way as the first passed + promise to settle. +*/ +function race(entries) { + /*jshint validthis:true */ + var Constructor = this; + + if (!isArray(entries)) { + return new Constructor(function (_, reject) { + return reject(new TypeError('You must pass an array to race.')); + }); + } else { + return new Constructor(function (resolve, reject) { + var length = entries.length; + for (var i = 0; i < length; i++) { + Constructor.resolve(entries[i]).then(resolve, reject); + } + }); + } +} + +/** + `Promise.reject` returns a promise rejected with the passed `reason`. + It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + reject(new Error('WHOOPS')); + }); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.reject(new Error('WHOOPS')); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + @method reject + @static + @param {Any} reason value that the returned promise will be rejected with. + Useful for tooling. + @return {Promise} a promise rejected with the given `reason`. +*/ +function reject$1(reason) { + /*jshint validthis:true */ + var Constructor = this; + var promise = new Constructor(noop); + reject(promise, reason); + return promise; +} + +function needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); +} + +function needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); +} + +/** + Promise objects represent the eventual result of an asynchronous operation. The + primary way of interacting with a promise is through its `then` method, which + registers callbacks to receive either a promise's eventual value or the reason + why the promise cannot be fulfilled. + + Terminology + ----------- + + - `promise` is an object or function with a `then` method whose behavior conforms to this specification. + - `thenable` is an object or function that defines a `then` method. + - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). + - `exception` is a value that is thrown using the throw statement. + - `reason` is a value that indicates why a promise was rejected. + - `settled` the final resting state of a promise, fulfilled or rejected. + + A promise can be in one of three states: pending, fulfilled, or rejected. + + Promises that are fulfilled have a fulfillment value and are in the fulfilled + state. Promises that are rejected have a rejection reason and are in the + rejected state. A fulfillment value is never a thenable. + + Promises can also be said to *resolve* a value. If this value is also a + promise, then the original promise's settled state will match the value's + settled state. So a promise that *resolves* a promise that rejects will + itself reject, and a promise that *resolves* a promise that fulfills will + itself fulfill. + + + Basic Usage: + ------------ + + ```js + let promise = new Promise(function(resolve, reject) { + // on success + resolve(value); + + // on failure + reject(reason); + }); + + promise.then(function(value) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Advanced Usage: + --------------- + + Promises shine when abstracting away asynchronous interactions such as + `XMLHttpRequest`s. + + ```js + function getJSON(url) { + return new Promise(function(resolve, reject){ + let xhr = new XMLHttpRequest(); + + xhr.open('GET', url); + xhr.onreadystatechange = handler; + xhr.responseType = 'json'; + xhr.setRequestHeader('Accept', 'application/json'); + xhr.send(); + + function handler() { + if (this.readyState === this.DONE) { + if (this.status === 200) { + resolve(this.response); + } else { + reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); + } + } + }; + }); + } + + getJSON('/posts.json').then(function(json) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Unlike callbacks, promises are great composable primitives. + + ```js + Promise.all([ + getJSON('/posts'), + getJSON('/comments') + ]).then(function(values){ + values[0] // => postsJSON + values[1] // => commentsJSON + + return values; + }); + ``` + + @class Promise + @param {Function} resolver + Useful for tooling. + @constructor +*/ + +var Promise$2 = function () { + function Promise(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = undefined; + this._subscribers = []; + + if (noop !== resolver) { + typeof resolver !== 'function' && needsResolver(); + this instanceof Promise ? initializePromise(this, resolver) : needsNew(); + } + } + + /** + The primary way of interacting with a promise is through its `then` method, + which registers callbacks to receive either a promise's eventual value or the + reason why the promise cannot be fulfilled. + ```js + findUser().then(function(user){ + // user is available + }, function(reason){ + // user is unavailable, and you are given the reason why + }); + ``` + Chaining + -------- + The return value of `then` is itself a promise. This second, 'downstream' + promise is resolved with the return value of the first promise's fulfillment + or rejection handler, or rejected if the handler throws an exception. + ```js + findUser().then(function (user) { + return user.name; + }, function (reason) { + return 'default name'; + }).then(function (userName) { + // If `findUser` fulfilled, `userName` will be the user's name, otherwise it + // will be `'default name'` + }); + findUser().then(function (user) { + throw new Error('Found user, but still unhappy'); + }, function (reason) { + throw new Error('`findUser` rejected and we're unhappy'); + }).then(function (value) { + // never reached + }, function (reason) { + // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. + // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. + }); + ``` + If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. + ```js + findUser().then(function (user) { + throw new PedagogicalException('Upstream error'); + }).then(function (value) { + // never reached + }).then(function (value) { + // never reached + }, function (reason) { + // The `PedgagocialException` is propagated all the way down to here + }); + ``` + Assimilation + ------------ + Sometimes the value you want to propagate to a downstream promise can only be + retrieved asynchronously. This can be achieved by returning a promise in the + fulfillment or rejection handler. The downstream promise will then be pending + until the returned promise is settled. This is called *assimilation*. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // The user's comments are now available + }); + ``` + If the assimliated promise rejects, then the downstream promise will also reject. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // If `findCommentsByAuthor` fulfills, we'll have the value here + }, function (reason) { + // If `findCommentsByAuthor` rejects, we'll have the reason here + }); + ``` + Simple Example + -------------- + Synchronous Example + ```javascript + let result; + try { + result = findResult(); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + findResult(function(result, err){ + if (err) { + // failure + } else { + // success + } + }); + ``` + Promise Example; + ```javascript + findResult().then(function(result){ + // success + }, function(reason){ + // failure + }); + ``` + Advanced Example + -------------- + Synchronous Example + ```javascript + let author, books; + try { + author = findAuthor(); + books = findBooksByAuthor(author); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + function foundBooks(books) { + } + function failure(reason) { + } + findAuthor(function(author, err){ + if (err) { + failure(err); + // failure + } else { + try { + findBoooksByAuthor(author, function(books, err) { + if (err) { + failure(err); + } else { + try { + foundBooks(books); + } catch(reason) { + failure(reason); + } + } + }); + } catch(error) { + failure(err); + } + // success + } + }); + ``` + Promise Example; + ```javascript + findAuthor(). + then(findBooksByAuthor). + then(function(books){ + // found books + }).catch(function(reason){ + // something went wrong + }); + ``` + @method then + @param {Function} onFulfilled + @param {Function} onRejected + Useful for tooling. + @return {Promise} + */ + + /** + `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same + as the catch block of a try/catch statement. + ```js + function findAuthor(){ + throw new Error('couldn't find that author'); + } + // synchronous + try { + findAuthor(); + } catch(reason) { + // something went wrong + } + // async with promises + findAuthor().catch(function(reason){ + // something went wrong + }); + ``` + @method catch + @param {Function} onRejection + Useful for tooling. + @return {Promise} + */ + + + Promise.prototype.catch = function _catch(onRejection) { + return this.then(null, onRejection); + }; + + /** + `finally` will be invoked regardless of the promise's fate just as native + try/catch/finally behaves + + Synchronous example: + + ```js + findAuthor() { + if (Math.random() > 0.5) { + throw new Error(); + } + return new Author(); + } + + try { + return findAuthor(); // succeed or fail + } catch(error) { + return findOtherAuther(); + } finally { + // always runs + // doesn't affect the return value + } + ``` + + Asynchronous example: + + ```js + findAuthor().catch(function(reason){ + return findOtherAuther(); + }).finally(function(){ + // author was either found, or not + }); + ``` + + @method finally + @param {Function} callback + @return {Promise} + */ + + + Promise.prototype.finally = function _finally(callback) { + var promise = this; + var constructor = promise.constructor; + + if (isFunction(callback)) { + return promise.then(function (value) { + return constructor.resolve(callback()).then(function () { + return value; + }); + }, function (reason) { + return constructor.resolve(callback()).then(function () { + throw reason; + }); + }); + } + + return promise.then(callback, callback); + }; + + return Promise; +}(); + +Promise$2.prototype.then = then; +Promise$2.all = all; +Promise$2.race = race; +Promise$2.resolve = resolve$1; +Promise$2.reject = reject$1; +Promise$2._setScheduler = setScheduler; +Promise$2._setAsap = setAsap; +Promise$2._asap = asap; + +/*global self*/ +function polyfill() { + var local = void 0; + + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + + var P = local.Promise; + + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch (e) { + // silently ignored + } + + if (promiseToString === '[object Promise]' && !P.cast) { + return; + } + } + + local.Promise = Promise$2; +} + +// Strange compat.. +Promise$2.polyfill = polyfill; +Promise$2.Promise = Promise$2; + +Promise$2.polyfill(); + +return Promise$2; + +}))); + + + +//# sourceMappingURL=es6-promise.auto.map diff --git a/vendor/es6-promise/es6-promise.auto.min.js b/vendor/es6-promise/es6-promise.auto.min.js new file mode 100644 index 000000000..5a44a3b08 --- /dev/null +++ b/vendor/es6-promise/es6-promise.auto.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){W=t}function r(t){z=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof U?function(){U(a)}:c()}function s(){var t=0,e=new H(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t postsJSON + values[1] // => commentsJSON + + return values; + }); + ``` + + @class Promise + @param {Function} resolver + Useful for tooling. + @constructor +*/ + +var Promise$1 = function () { + function Promise(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = undefined; + this._subscribers = []; + + if (noop !== resolver) { + typeof resolver !== 'function' && needsResolver(); + this instanceof Promise ? initializePromise(this, resolver) : needsNew(); + } + } + + /** + The primary way of interacting with a promise is through its `then` method, + which registers callbacks to receive either a promise's eventual value or the + reason why the promise cannot be fulfilled. + ```js + findUser().then(function(user){ + // user is available + }, function(reason){ + // user is unavailable, and you are given the reason why + }); + ``` + Chaining + -------- + The return value of `then` is itself a promise. This second, 'downstream' + promise is resolved with the return value of the first promise's fulfillment + or rejection handler, or rejected if the handler throws an exception. + ```js + findUser().then(function (user) { + return user.name; + }, function (reason) { + return 'default name'; + }).then(function (userName) { + // If `findUser` fulfilled, `userName` will be the user's name, otherwise it + // will be `'default name'` + }); + findUser().then(function (user) { + throw new Error('Found user, but still unhappy'); + }, function (reason) { + throw new Error('`findUser` rejected and we're unhappy'); + }).then(function (value) { + // never reached + }, function (reason) { + // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. + // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. + }); + ``` + If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. + ```js + findUser().then(function (user) { + throw new PedagogicalException('Upstream error'); + }).then(function (value) { + // never reached + }).then(function (value) { + // never reached + }, function (reason) { + // The `PedgagocialException` is propagated all the way down to here + }); + ``` + Assimilation + ------------ + Sometimes the value you want to propagate to a downstream promise can only be + retrieved asynchronously. This can be achieved by returning a promise in the + fulfillment or rejection handler. The downstream promise will then be pending + until the returned promise is settled. This is called *assimilation*. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // The user's comments are now available + }); + ``` + If the assimliated promise rejects, then the downstream promise will also reject. + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // If `findCommentsByAuthor` fulfills, we'll have the value here + }, function (reason) { + // If `findCommentsByAuthor` rejects, we'll have the reason here + }); + ``` + Simple Example + -------------- + Synchronous Example + ```javascript + let result; + try { + result = findResult(); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + findResult(function(result, err){ + if (err) { + // failure + } else { + // success + } + }); + ``` + Promise Example; + ```javascript + findResult().then(function(result){ + // success + }, function(reason){ + // failure + }); + ``` + Advanced Example + -------------- + Synchronous Example + ```javascript + let author, books; + try { + author = findAuthor(); + books = findBooksByAuthor(author); + // success + } catch(reason) { + // failure + } + ``` + Errback Example + ```js + function foundBooks(books) { + } + function failure(reason) { + } + findAuthor(function(author, err){ + if (err) { + failure(err); + // failure + } else { + try { + findBoooksByAuthor(author, function(books, err) { + if (err) { + failure(err); + } else { + try { + foundBooks(books); + } catch(reason) { + failure(reason); + } + } + }); + } catch(error) { + failure(err); + } + // success + } + }); + ``` + Promise Example; + ```javascript + findAuthor(). + then(findBooksByAuthor). + then(function(books){ + // found books + }).catch(function(reason){ + // something went wrong + }); + ``` + @method then + @param {Function} onFulfilled + @param {Function} onRejected + Useful for tooling. + @return {Promise} + */ + + /** + `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same + as the catch block of a try/catch statement. + ```js + function findAuthor(){ + throw new Error('couldn't find that author'); + } + // synchronous + try { + findAuthor(); + } catch(reason) { + // something went wrong + } + // async with promises + findAuthor().catch(function(reason){ + // something went wrong + }); + ``` + @method catch + @param {Function} onRejection + Useful for tooling. + @return {Promise} + */ + + + Promise.prototype.catch = function _catch(onRejection) { + return this.then(null, onRejection); + }; + + /** + `finally` will be invoked regardless of the promise's fate just as native + try/catch/finally behaves + + Synchronous example: + + ```js + findAuthor() { + if (Math.random() > 0.5) { + throw new Error(); + } + return new Author(); + } + + try { + return findAuthor(); // succeed or fail + } catch(error) { + return findOtherAuther(); + } finally { + // always runs + // doesn't affect the return value + } + ``` + + Asynchronous example: + + ```js + findAuthor().catch(function(reason){ + return findOtherAuther(); + }).finally(function(){ + // author was either found, or not + }); + ``` + + @method finally + @param {Function} callback + @return {Promise} + */ + + + Promise.prototype.finally = function _finally(callback) { + var promise = this; + var constructor = promise.constructor; + + if (isFunction(callback)) { + return promise.then(function (value) { + return constructor.resolve(callback()).then(function () { + return value; + }); + }, function (reason) { + return constructor.resolve(callback()).then(function () { + throw reason; + }); + }); + } + + return promise.then(callback, callback); + }; + + return Promise; +}(); + +Promise$1.prototype.then = then; +Promise$1.all = all; +Promise$1.race = race; +Promise$1.resolve = resolve$1; +Promise$1.reject = reject$1; +Promise$1._setScheduler = setScheduler; +Promise$1._setAsap = setAsap; +Promise$1._asap = asap; + +/*global self*/ +function polyfill() { + var local = void 0; + + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + + var P = local.Promise; + + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch (e) { + // silently ignored + } + + if (promiseToString === '[object Promise]' && !P.cast) { + return; + } + } + + local.Promise = Promise$1; +} + +// Strange compat.. +Promise$1.polyfill = polyfill; +Promise$1.Promise = Promise$1; + +return Promise$1; + +}))); + + + +//# sourceMappingURL=es6-promise.map diff --git a/vendor/es6-promise/es6-promise.min.js b/vendor/es6-promise/es6-promise.min.js new file mode 100644 index 000000000..6af5903ab --- /dev/null +++ b/vendor/es6-promise/es6-promise.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){W=t}function r(t){z=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof U?function(){U(a)}:c()}function s(){var t=0,e=new H(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t Date: Wed, 18 Sep 2019 14:16:37 +0300 Subject: [PATCH 12/17] Use vendor/es6-promise for loading translations --- apps/common/locale.js | 5 +---- build/Gruntfile.js | 2 ++ build/common.json | 14 +++++++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/apps/common/locale.js b/apps/common/locale.js index 64f75666c..e7ce8cd71 100644 --- a/apps/common/locale.js +++ b/apps/common/locale.js @@ -42,10 +42,8 @@ Common.Locale = new(function() { var _applyLocalization = function(callback) { try { - console.log('_applyLocalization'); callback && (loadcallback = callback); if (l10n) { - console.log('_apply ok'); for (var prop in l10n) { var p = prop.split('.'); if (p && p.length > 2) { @@ -114,7 +112,6 @@ Common.Locale = new(function() { l10n = l10n || {}; apply && _applyLocalization(); if ( e.message == 'loaded' ) { - console.log('loaded'); } else console.log('fetch error: ' + e); }); @@ -124,7 +121,7 @@ Common.Locale = new(function() { /* use fetch polifill if native method isn't supported */ var polyfills = ['../vendor/fetch/fetch.umd']; if ( !window.Promise ) { - require(['//cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js'], + require(['../vendor/es6-promise/es6-promise.auto.min.js'], function () { require(polyfills, _requireLang); }); diff --git a/build/Gruntfile.js b/build/Gruntfile.js index 6cf6ff6a0..ff4862b6b 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -165,6 +165,7 @@ module.exports = function(grunt) { doRegisterTask('bootstrap'); doRegisterTask('iscroll'); doRegisterTask('fetch'); + doRegisterTask('es6-promise'); doRegisterTask('jszip'); doRegisterTask('jsziputils'); doRegisterTask('requirejs', function(defaultConfig, packageFile) { @@ -511,6 +512,7 @@ module.exports = function(grunt) { grunt.registerTask('deploy-jszip', ['jszip-init', 'clean', 'copy']); grunt.registerTask('deploy-jsziputils', ['jsziputils-init', 'clean', 'copy']); grunt.registerTask('deploy-requirejs', ['requirejs-init', 'clean', 'uglify']); + grunt.registerTask('deploy-es6-promise', ['es6-promise-init', 'clean', 'copy']); grunt.registerTask('deploy-app-main', ['main-app-init', 'clean:prebuild', 'imagemin', 'less', 'requirejs', 'concat', 'copy', 'svgmin', 'inline', 'json-minify', diff --git a/build/common.json b/build/common.json index e7acf0326..d95ebafde 100644 --- a/build/common.json +++ b/build/common.json @@ -205,6 +205,17 @@ } } }, + "es6-promise": { + "clean": [ + "../deploy/web-apps/vendor/es6-promise" + ], + "copy": { + "script": { + "src": "../vendor/es6-promise/es6-promise.auto.min.js", + "dest": "../deploy/web-apps/vendor/es6-promise/es6-promise.auto.min.js" + } + } + }, "requirejs": { "clean": [ "../deploy/web-apps/vendor/requirejs" @@ -229,7 +240,8 @@ "deploy-iscroll", "deploy-fetch", "deploy-jszip", - "deploy-jsziputils" + "deploy-jsziputils", + "deploy-es6-promise" ] } } \ No newline at end of file From 92e56f78153b23e00bbfa68a1a7f9a1237f7493c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 19 Sep 2019 12:45:40 +0300 Subject: [PATCH 13/17] Fix Bug 42882 --- apps/common/main/resources/less/comments.less | 4 ++++ apps/common/main/resources/less/input.less | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/apps/common/main/resources/less/comments.less b/apps/common/main/resources/less/comments.less index 33a0e6c1c..ca3b3b5b4 100644 --- a/apps/common/main/resources/less/comments.less +++ b/apps/common/main/resources/less/comments.less @@ -187,6 +187,10 @@ &.user-select { cursor: text; } + &.user-select::selection { + background: #3494fb; + color: white; + } } .user-reply { diff --git a/apps/common/main/resources/less/input.less b/apps/common/main/resources/less/input.less index 60220b42f..a529b2ae2 100644 --- a/apps/common/main/resources/less/input.less +++ b/apps/common/main/resources/less/input.less @@ -80,3 +80,8 @@ input.error { input[type="password"] { font-size: 16px; } + +input[type="text"]::selection, textarea::selection { + background: #3494fb; + color: white; +} From 0153af839d3fbb184177114fa0dcd24a3bc7779c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 20 Sep 2019 13:33:35 +0300 Subject: [PATCH 14/17] [SSE] Fix autosum icon --- apps/common/main/resources/less/toolbar.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index 76220cbc1..73006083d 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -520,7 +520,7 @@ .button-normal-icon(btn-watermark, 63, @toolbar-big-icon-size); .button-normal-icon(btn-color-schema, 64, @toolbar-big-icon-size); .button-normal-icon(btn-ins-formula, 65, @toolbar-big-icon-size); -.button-normal-icon(btn-autosumm, 66, @toolbar-big-icon-size); +.button-normal-icon(btn-autosum, 66, @toolbar-big-icon-size); .button-normal-icon(btn-recent, 67, @toolbar-big-icon-size); .button-normal-icon(btn-finance, 68, @toolbar-big-icon-size); .button-normal-icon(btn-logic, 69, @toolbar-big-icon-size); From 6f8950111853b13ff81d20fcac0f6f1940415153 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 25 Sep 2019 16:15:09 +0300 Subject: [PATCH 15/17] Fix Bug 42933 (fix rev.c823cb38fe55456f0c84886acfda459cba7cdf43, Bug 41193) --- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index aed29897b..c4ddc9092 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -237,7 +237,7 @@ define([ if (!e.relatedTarget || !/area_id/.test(e.target.id) && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ - && !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */ + && !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find('.dropdown-menu').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */ && (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */ && (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ { if (Common.Utils.isIE && e.originalEvent && e.originalEvent.target && /area_id/.test(e.originalEvent.target.id) && (e.originalEvent.target === e.originalEvent.srcElement)) diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 20b123b3b..67c58fc25 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -215,7 +215,7 @@ define([ if (!e.relatedTarget || !/area_id/.test(e.target.id) && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ - && !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */ + && !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find('.dropdown-menu').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */ && (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */ && (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ { if (Common.Utils.isIE && e.originalEvent && e.originalEvent.target && /area_id/.test(e.originalEvent.target.id) && (e.originalEvent.target === e.originalEvent.srcElement)) diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 8de80cf02..821dfc3a4 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -224,7 +224,7 @@ define([ if (!e.relatedTarget || !/area_id/.test(e.target.id) && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ - && !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */ + && !(e.target.localName == 'textarea' && $(e.target).closest('.asc-window').find('.dropdown-menu').find(e.relatedTarget).length>0) /* Check if focus in comment goes from textarea to it's email menu */ && (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */ && (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ { if (Common.Utils.isIE && e.originalEvent && e.originalEvent.target && /area_id/.test(e.originalEvent.target.id) && (e.originalEvent.target === e.originalEvent.srcElement)) From 03fb7e883c0bf44d0928879f987ca8917f7b4381 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 25 Sep 2019 16:18:38 +0300 Subject: [PATCH 16/17] [DE] Fix changing display mode for track changes (without plugins tab) --- apps/common/main/lib/view/Plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/main/lib/view/Plugins.js b/apps/common/main/lib/view/Plugins.js index 36c163b9b..0430cd768 100644 --- a/apps/common/main/lib/view/Plugins.js +++ b/apps/common/main/lib/view/Plugins.js @@ -190,7 +190,7 @@ define([ item.setDisabled(disable); }); - this.pluginsMask.css('display', disable ? 'block' : 'none'); + this.pluginsMask && this.pluginsMask.css('display', disable ? 'block' : 'none'); } }, From 3b82ac999d58354d6f57ae665247425970b4f21c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 26 Sep 2019 18:15:59 +0300 Subject: [PATCH 17/17] [SSE] Fix button icons (chat, comments) --- apps/spreadsheeteditor/main/resources/less/leftmenu.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/apps/spreadsheeteditor/main/resources/less/leftmenu.less index 7a666f012..8ceea12aa 100644 --- a/apps/spreadsheeteditor/main/resources/less/leftmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/leftmenu.less @@ -11,8 +11,8 @@ } } -button.notify .btn-menu-chat {background-position: -0*@toolbar-icon-size -63*@toolbar-icon-size;} -button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -60*@toolbar-icon-size;} +button.notify .btn-menu-chat {background-position: -0*@toolbar-icon-size -60*@toolbar-icon-size;} +button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -2*@toolbar-icon-size;} .button-normal-icon(btn-menu-file, 61, @toolbar-icon-size); .button-normal-icon(btn-menu-search, 62, @toolbar-icon-size);