diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 179c2eeb96..78223ee1e9 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -180,6 +180,7 @@ _config.editorConfig.canHistoryRestore = _config.events && !!_config.events.onRequestRestore; _config.editorConfig.canSendEmailAddresses = _config.events && !!_config.events.onRequestEmailAddresses; _config.editorConfig.canRequestEditRights = _config.events && !!_config.events.onRequestEditRights; + _config.frameEditorId = placeholderId; var onMouseUp = function (evt) { _processMouse(evt); @@ -257,7 +258,7 @@ }; var _onMessage = function(msg) { - if (msg) { + if (msg && msg.frameEditorId == placeholderId) { var events = _config.events || {}, handler = events[msg.event], res; @@ -662,6 +663,9 @@ if (config.editorConfig.customization.loaderLogo !== '') params += "&logo=" + config.editorConfig.customization.loaderLogo; } } + + if (config.frameEditorId) + params += "&frameEditorId=" + config.frameEditorId; return params; } diff --git a/apps/common/Gateway.js b/apps/common/Gateway.js index 7cb8cab20e..bae3f3f93b 100644 --- a/apps/common/Gateway.js +++ b/apps/common/Gateway.js @@ -99,6 +99,7 @@ Common.Gateway = new(function() { var _postMessage = function(msg) { // TODO: specify explicit origin if (window.parent && window.JSON) { + msg.frameEditorId = window.frameEditorId; window.parent.postMessage(window.JSON.stringify(msg), "*"); } }; diff --git a/apps/documenteditor/embed/index.html b/apps/documenteditor/embed/index.html index e913f189a1..9bf9f202b8 100644 --- a/apps/documenteditor/embed/index.html +++ b/apps/documenteditor/embed/index.html @@ -239,6 +239,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/documenteditor/embed/index.html.deploy b/apps/documenteditor/embed/index.html.deploy index bba1d74280..0737ebcea4 100644 --- a/apps/documenteditor/embed/index.html.deploy +++ b/apps/documenteditor/embed/index.html.deploy @@ -231,6 +231,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index d9e29af74a..ff57f18720 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -227,6 +227,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy index 618e4c6580..6a2e70befb 100644 --- a/apps/documenteditor/main/index.html.deploy +++ b/apps/documenteditor/main/index.html.deploy @@ -227,6 +227,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/documenteditor/mobile/index.html b/apps/documenteditor/mobile/index.html index 0511a8cf38..a337cf9bc3 100644 --- a/apps/documenteditor/mobile/index.html +++ b/apps/documenteditor/mobile/index.html @@ -264,6 +264,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/documenteditor/mobile/index.html.deploy b/apps/documenteditor/mobile/index.html.deploy index b0068f2913..da68f5a76b 100644 --- a/apps/documenteditor/mobile/index.html.deploy +++ b/apps/documenteditor/mobile/index.html.deploy @@ -255,6 +255,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/presentationeditor/embed/index.html b/apps/presentationeditor/embed/index.html index 58055d2ae7..aa4c5f04bb 100644 --- a/apps/presentationeditor/embed/index.html +++ b/apps/presentationeditor/embed/index.html @@ -238,6 +238,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/presentationeditor/embed/index.html.deploy b/apps/presentationeditor/embed/index.html.deploy index 88aee4b7c2..405f0a9b93 100644 --- a/apps/presentationeditor/embed/index.html.deploy +++ b/apps/presentationeditor/embed/index.html.deploy @@ -231,6 +231,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/presentationeditor/main/index.html b/apps/presentationeditor/main/index.html index f17afdb607..b7fbec434d 100644 --- a/apps/presentationeditor/main/index.html +++ b/apps/presentationeditor/main/index.html @@ -228,6 +228,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/presentationeditor/main/index.html.deploy b/apps/presentationeditor/main/index.html.deploy index 187e8c64b1..02842f74fc 100644 --- a/apps/presentationeditor/main/index.html.deploy +++ b/apps/presentationeditor/main/index.html.deploy @@ -227,6 +227,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/presentationeditor/mobile/index.html b/apps/presentationeditor/mobile/index.html index 42c71ee658..645d13fa67 100644 --- a/apps/presentationeditor/mobile/index.html +++ b/apps/presentationeditor/mobile/index.html @@ -263,6 +263,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/presentationeditor/mobile/index.html.deploy b/apps/presentationeditor/mobile/index.html.deploy index 57e3d46218..2de37649bf 100644 --- a/apps/presentationeditor/mobile/index.html.deploy +++ b/apps/presentationeditor/mobile/index.html.deploy @@ -254,6 +254,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/spreadsheeteditor/embed/index.html b/apps/spreadsheeteditor/embed/index.html index 3ecdfd954d..0695c7f3d1 100644 --- a/apps/spreadsheeteditor/embed/index.html +++ b/apps/spreadsheeteditor/embed/index.html @@ -239,6 +239,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/spreadsheeteditor/embed/index.html.deploy b/apps/spreadsheeteditor/embed/index.html.deploy index 63446a8db6..2e34330cef 100644 --- a/apps/spreadsheeteditor/embed/index.html.deploy +++ b/apps/spreadsheeteditor/embed/index.html.deploy @@ -231,6 +231,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/spreadsheeteditor/main/index.html b/apps/spreadsheeteditor/main/index.html index 0167ba7e22..44bd96271e 100644 --- a/apps/spreadsheeteditor/main/index.html +++ b/apps/spreadsheeteditor/main/index.html @@ -230,6 +230,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/spreadsheeteditor/main/index.html.deploy b/apps/spreadsheeteditor/main/index.html.deploy index 75c72c5c7c..a6e3b81b30 100644 --- a/apps/spreadsheeteditor/main/index.html.deploy +++ b/apps/spreadsheeteditor/main/index.html.deploy @@ -228,6 +228,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/spreadsheeteditor/mobile/index.html b/apps/spreadsheeteditor/mobile/index.html index d9a5f176a3..500afab898 100644 --- a/apps/spreadsheeteditor/mobile/index.html +++ b/apps/spreadsheeteditor/mobile/index.html @@ -270,6 +270,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...'; diff --git a/apps/spreadsheeteditor/mobile/index.html.deploy b/apps/spreadsheeteditor/mobile/index.html.deploy index 9014275678..47e1fd2fe4 100644 --- a/apps/spreadsheeteditor/mobile/index.html.deploy +++ b/apps/spreadsheeteditor/mobile/index.html.deploy @@ -255,6 +255,8 @@ loading = 'Loading...', logo = params["logo"] ? ((params["logo"] !== 'none') ? ('') : '') : null; + window.frameEditorId = params["frameEditorId"]; + if ( lang == 'de') loading = 'Ladevorgang...'; else if ( lang == 'es') loading = 'Cargando...'; else if ( lang == 'fr') loading = 'Chargement en cours...';