From 2d8d3291c06c36057e24dbe334d0b1461ed190dd Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 22 Jun 2017 12:24:55 +0300 Subject: [PATCH] Fix Bug 35037. --- apps/documenteditor/main/app.js | 33 ++----------------- apps/documenteditor/main/app_dev.js | 33 ++----------------- apps/documenteditor/main/index.html | 12 +++++++ apps/documenteditor/main/index.html.deploy | 26 +++++++++++++-- apps/documenteditor/mobile/app-dev.js | 33 ++----------------- apps/documenteditor/mobile/app.js | 33 ++----------------- apps/documenteditor/mobile/index.html | 12 +++++++ apps/documenteditor/mobile/index.html.deploy | 24 ++++++++++++++ apps/presentationeditor/main/app.js | 33 ++----------------- apps/presentationeditor/main/app_dev.js | 33 ++----------------- apps/presentationeditor/main/index.html | 12 +++++++ .../presentationeditor/main/index.html.deploy | 24 ++++++++++++-- apps/presentationeditor/mobile/app-dev.js | 33 ++----------------- apps/presentationeditor/mobile/app.js | 33 ++----------------- apps/presentationeditor/mobile/index.html | 12 +++++++ .../mobile/index.html.deploy | 24 ++++++++++++++ apps/spreadsheeteditor/main/app.js | 33 ++----------------- apps/spreadsheeteditor/main/app_dev.js | 33 ++----------------- apps/spreadsheeteditor/main/index.html | 12 +++++++ apps/spreadsheeteditor/main/index.html.deploy | 24 ++++++++++++-- apps/spreadsheeteditor/mobile/app-dev.js | 33 ++----------------- apps/spreadsheeteditor/mobile/app.js | 33 ++----------------- apps/spreadsheeteditor/mobile/index.html | 12 +++++++ .../mobile/index.html.deploy | 24 ++++++++++++++ 24 files changed, 235 insertions(+), 379 deletions(-) diff --git a/apps/documenteditor/main/app.js b/apps/documenteditor/main/app.js index 3cb20c44f..471759e72 100644 --- a/apps/documenteditor/main/app.js +++ b/apps/documenteditor/main/app.js @@ -200,37 +200,8 @@ require([ app.start(); }); }, function(err) { - if (err.requireType == 'timeout' && !reqerr) { - var getUrlParams = function() { - var e, - a = /\+/g, // Regex for replacing addition symbol with a space - r = /([^&=]+)=?([^&]*)/g, - d = function (s) { return decodeURIComponent(s.replace(a, " ")); }, - q = window.location.search.substring(1), - urlParams = {}; - - while (e = r.exec(q)) - urlParams[d(e[1])] = d(e[2]); - - return urlParams; - }; - - var encodeUrlParam = function(str) { - return str.replace(/&/g, '&') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(//g, '>'); - }; - - var lang = (getUrlParams()["lang"] || 'en').split("-")[0]; - - if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.'; - else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.'; - else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.'; - else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.'; - else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.'; - + if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { + reqerr = window.requireTimeourError(); window.alert(reqerr); window.location.reload(); } diff --git a/apps/documenteditor/main/app_dev.js b/apps/documenteditor/main/app_dev.js index 49d9e8fa0..ff894fd0b 100644 --- a/apps/documenteditor/main/app_dev.js +++ b/apps/documenteditor/main/app_dev.js @@ -191,37 +191,8 @@ require([ app.start(); }); }, function(err) { - if (err.requireType == 'timeout' && !reqerr) { - var getUrlParams = function() { - var e, - a = /\+/g, // Regex for replacing addition symbol with a space - r = /([^&=]+)=?([^&]*)/g, - d = function (s) { return decodeURIComponent(s.replace(a, " ")); }, - q = window.location.search.substring(1), - urlParams = {}; - - while (e = r.exec(q)) - urlParams[d(e[1])] = d(e[2]); - - return urlParams; - }; - - var encodeUrlParam = function(str) { - return str.replace(/&/g, '&') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(//g, '>'); - }; - - var lang = (getUrlParams()["lang"] || 'en').split("-")[0]; - - if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.'; - else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.'; - else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.'; - else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.'; - else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.'; - + if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) { + reqerr = window.requireTimeourError(); window.alert(reqerr); window.location.reload(); } diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index ff57f1872..8b7823fe0 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -270,6 +270,18 @@ window.sdk_dev_scrpipts.forEach(function(item){ document.write(' diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy index 6a2e70bef..861c557f8 100644 --- a/apps/documenteditor/main/index.html.deploy +++ b/apps/documenteditor/main/index.html.deploy @@ -9,7 +9,7 @@ - +