From a1095fb8888a1650e02f5f07afa93ab00a6220a2 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 8 Sep 2017 12:06:17 +0300 Subject: [PATCH] [Mobile] Bug with loading protected files. --- apps/documenteditor/mobile/app/controller/Main.js | 9 +++++++++ apps/presentationeditor/mobile/app/controller/Main.js | 9 +++++++++ apps/spreadsheeteditor/mobile/app/controller/Main.js | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 64ddf5482..9dfd11ee4 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -1042,6 +1042,10 @@ define([ }); } else if (type == Asc.c_oAscAdvancedOptionsID.DRM) { + $(me.loadMask).hasClass('modal-in') && uiApp.closeModal(me.loadMask); + + me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); + modal = uiApp.modal({ title: me.advDRMOptions, text: me.advDRMEnterPassword, @@ -1061,6 +1065,11 @@ define([ } ] }); + + // Vertical align + $$(modal).css({ + marginTop: - Math.round($$(modal).outerHeight() / 2) + 'px' + }); } }, diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 4573fa85e..59a3d1945 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -997,6 +997,10 @@ define([ me = this, modal; if (type == Asc.c_oAscAdvancedOptionsID.DRM) { + $(me.loadMask).hasClass('modal-in') && uiApp.closeModal(me.loadMask); + + me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); + modal = uiApp.modal({ title: me.advDRMOptions, text: me.advDRMEnterPassword, @@ -1016,6 +1020,11 @@ define([ } ] }); + + // Vertical align + $$(modal).css({ + marginTop: - Math.round($$(modal).outerHeight() / 2) + 'px' + }); } }, diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 0f9d0798a..fda935b09 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -1173,6 +1173,10 @@ define([ marginTop: - Math.round($$(modal).outerHeight() / 2) + 'px' }); } else if (type == Asc.c_oAscAdvancedOptionsID.DRM) { + $(me.loadMask).hasClass('modal-in') && uiApp.closeModal(me.loadMask); + + me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); + modal = uiApp.modal({ title: me.advDRMOptions, text: me.advDRMEnterPassword, @@ -1192,6 +1196,11 @@ define([ } ] }); + + // Vertical align + $$(modal).css({ + marginTop: - Math.round($$(modal).outerHeight() / 2) + 'px' + }); } },