From dba74df53233764f351f6e9ca329050d440be09f Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 18 Mar 2020 15:03:44 +0100 Subject: [PATCH] Fix lock modal --- www/common/common-interface.js | 1 + www/common/onlyoffice/inner.js | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index d7fafec99..735d3fb37 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -380,6 +380,7 @@ define([ }; dialog.getButtons = function (buttons, onClose) { + if (!buttons) { return; } if (!Array.isArray(buttons)) { return void console.error('Not an array'); } if (!buttons.length) { return; } var navs = []; diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 43ec06b82..8faa82503 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -599,10 +599,11 @@ define([ // Add a lock var isLockedModal = { - content: UI.customModal(h('div', [ + content: UI.dialog.customModal(h('div.cp-oo-x2tXls', [ h('span.fa.fa-spin.fa-spinner'), - "pewpewpew" + h('span', Messages.oo_isLocked) ])) + }; var handleLock = function (obj, send) { if (content.saveLock) { if (!isLockedModal.modal) { @@ -633,7 +634,7 @@ define([ if (!content.saveLock) { if (isLockedModal.modal) { isLockedModal.modal.closeModal(); - delete isLockedModal.modal(); + delete isLockedModal.modal; } send({ type: "getLock",