diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 018d6ea63..2b0f80187 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 1fe953700..9a2c6000c 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 f83d3505d..6016df2bb 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -391,6 +391,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 b6e9a5b75..83a4c3983 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1331,6 +1331,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 338ea1ca3..e8ea1172a 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -842,6 +842,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 0078648a8..b4022ddfe 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -495,6 +495,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 a0e6492ab..04570c1a1 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1085,6 +1085,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 75d5103d1..a709f2ec2 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -802,6 +802,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 8fcead9b4..30ff3ae95 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -403,6 +403,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 6e112d051..f3fc70bf3 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1242,6 +1242,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 5d648339a..9febca35d 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -941,6 +941,8 @@ define([ } } else { + Common.Gateway.reportWarning(id, config.msg); + config.title = this.notcriticalErrorTitle; // config.iconCls = 'warn'; // config.buttons = ['ok'];