From cc7b233a6a8918a721465e16b0f49d42691b5034 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 28 Jun 2018 15:56:44 +0300 Subject: [PATCH] Disable editing on Asc.c_oAscError.ID.DataEncrypted error --- apps/documenteditor/main/app/controller/Main.js | 4 ++++ apps/documenteditor/mobile/app/controller/Main.js | 4 ++++ apps/presentationeditor/main/app/controller/Main.js | 4 ++++ apps/presentationeditor/mobile/app/controller/Main.js | 4 ++++ apps/spreadsheeteditor/main/app/controller/Main.js | 4 ++++ apps/spreadsheeteditor/mobile/app/controller/Main.js | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 75b0f3564..964f1060f 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1417,6 +1417,10 @@ define([ Common.NotificationCenter.trigger('goback'); } } + if (id == Asc.c_oAscError.ID.DataEncrypted) { + this.api.asc_coAuthoringDisconnect(); + Common.NotificationCenter.trigger('api:disconnect'); + } } else { Common.Gateway.reportWarning(id, config.msg); diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index afb8c46f2..5daf5bfce 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -897,6 +897,10 @@ define([ Common.NotificationCenter.trigger('goback'); } } + if (id == Asc.c_oAscError.ID.DataEncrypted) { + this.api.asc_coAuthoringDisconnect(); + Common.NotificationCenter.trigger('api:disconnect'); + } } else { Common.Gateway.reportWarning(id, config.msg); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 9d96c1e06..bf5d12e62 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1161,6 +1161,10 @@ define([ } } } + if (id == Asc.c_oAscError.ID.DataEncrypted) { + this.api.asc_coAuthoringDisconnect(); + Common.NotificationCenter.trigger('api:disconnect'); + } } else { Common.Gateway.reportWarning(id, config.msg); diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 735784fcb..c46d969ce 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -848,6 +848,10 @@ define([ Common.NotificationCenter.trigger('goback'); } } + if (id == Asc.c_oAscError.ID.DataEncrypted) { + this.api.asc_coAuthoringDisconnect(); + Common.NotificationCenter.trigger('api:disconnect'); + } } else { Common.Gateway.reportWarning(id, config.msg); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 78970757c..a989b5dff 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1325,6 +1325,10 @@ define([ } } } + if (id == Asc.c_oAscError.ID.DataEncrypted) { + this.api.asc_coAuthoringDisconnect(); + Common.NotificationCenter.trigger('api:disconnect'); + } } else { Common.Gateway.reportWarning(id, config.msg); diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index ffaa7e846..cc8293464 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -992,6 +992,10 @@ define([ Common.NotificationCenter.trigger('goback'); } } + if (id == Asc.c_oAscError.ID.DataEncrypted) { + this.api.asc_coAuthoringDisconnect(); + Common.NotificationCenter.trigger('api:disconnect'); + } } else { Common.Gateway.reportWarning(id, config.msg);