diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 7e18427efd..ded11e2c86 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -170,7 +170,8 @@ 'onAppReady': , 'onBack': , 'onError': , - 'onDocumentReady': + 'onDocumentReady': , + 'onWarning': } } */ diff --git a/apps/common/Gateway.js b/apps/common/Gateway.js index 1fe9537001..9a2c6000c7 100644 --- a/apps/common/Gateway.js +++ b/apps/common/Gateway.js @@ -189,6 +189,16 @@ if (Common === undefined) { }); }, + reportWarning: function(code, description) { + _postMessage({ + event: 'onWarning', + data: { + warningCode: code, + warningDescription: description + } + }); + }, + sendInfo: function(info) { _postMessage({ event: 'onInfo', diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 12dc6f7eae..22b0216a80 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -398,6 +398,8 @@ var ApplicationController = new(function(){ }); } else { + Common.Gateway.reportWarning(id, message); + $('#id-critical-error-title').text(me.notcriticalErrorTitle); $('#id-critical-error-message').text(message); $('#id-critical-error-close').off(); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index e6ff4095c8..33fccd7dcd 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1340,6 +1340,8 @@ define([ } } else { + Common.Gateway.reportWarning(id, config.msg); + config.title = this.notcriticalErrorTitle; config.iconCls = 'warn'; config.buttons = ['ok']; diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 8076ecf8f4..64b3052029 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -866,6 +866,8 @@ define([ } } else { + Common.Gateway.reportWarning(id, config.msg); + config.title = this.notcriticalErrorTitle; config.callback = _.bind(function(btn){ if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && (this.appOptions.canDownload || this.appOptions.canDownloadOrigin)) { diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index bec396de74..d598967e45 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -497,6 +497,8 @@ var ApplicationController = new(function(){ }); } else { + Common.Gateway.reportWarning(id, message); + $('#id-critical-error-title').text(me.notcriticalErrorTitle); $('#id-critical-error-message').text(message); $('#id-critical-error-close').off(); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 7df2dbad65..bad011c7cf 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1099,6 +1099,8 @@ define([ } } else { + Common.Gateway.reportWarning(id, config.msg); + config.title = this.notcriticalErrorTitle; config.iconCls = 'warn'; config.buttons = ['ok']; diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index af79c3c0bf..69d23b5c16 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -821,6 +821,8 @@ define([ } } } else { + Common.Gateway.reportWarning(id, config.msg); + config.title = this.notcriticalErrorTitle; config.callback = _.bind(function(btn){ if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && (this.appOptions.canDownload || this.appOptions.canDownloadOrigin)) { diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 2fb85a6835..f02790f27d 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -405,6 +405,8 @@ var ApplicationController = new(function(){ }); } else { + Common.Gateway.reportWarning(id, message); + $('#id-critical-error-title').text(me.notcriticalErrorTitle); $('#id-critical-error-message').text(message); $('#id-critical-error-close').off(); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 3c2c2ec8a7..4b00058697 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1256,6 +1256,8 @@ define([ } } } else { + Common.Gateway.reportWarning(id, config.msg); + config.title = this.notcriticalErrorTitle; config.iconCls = 'warn'; config.buttons = ['ok']; diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index d750dae1d8..5c2bb4b176 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -962,6 +962,8 @@ define([ } } else { + Common.Gateway.reportWarning(id, config.msg); + config.title = this.notcriticalErrorTitle; // config.iconCls = 'warn'; // config.buttons = ['ok'];