From 26c681c3cbf62b0380a2fce4cd9968b1626617ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 3 Dec 2019 10:11:52 +0000 Subject: [PATCH] remove padding in prop modal - caused a vertical scrollbar - now constructed like the share modal (customModals inside tabs) --- www/common/common-ui-elements.js | 16 +++++++++++++--- www/common/drive-ui.js | 11 +---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 652b2ab56..4fd9860ff 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -737,12 +737,22 @@ define([ UIElements.getProperties = function (common, data, cb) { var c1; var c2; + var button = [{ + className: 'primary', + name: Messages.okButton, + onClick: function () {}, + keys: [13] + }]; NThen(function (waitFor) { getPadProperties(common, data, waitFor(function (e, c) { - c1 = c[0]; + c1 = UI.dialog.customModal(c[0], { + buttons: button + }); })); getRightsProperties(common, data, waitFor(function (e, c) { - c2 = c[0]; + c2 = UI.dialog.customModal(c[0], { + buttons: button + }); })); }).nThen(function () { var tabs = UI.dialog.tabs([{ @@ -1767,7 +1777,7 @@ define([ if (e) { return void console.error(e); } UIElements.getProperties(common, data, function (e, $prop) { if (e) { return void console.error(e); } - UI.alert($prop[0], undefined, true); + UI.openCustomModal($prop[0]); }); }); }); diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 102ba876b..bdb6144cb 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -4187,16 +4187,7 @@ define([ } getProperties(el, function (e, $prop) { if (e) { return void logError(e); } - var modal = UI.dialog.customModal($prop[0], { - buttons: [{ - className: 'secondary', - name: Messages.okButton, - onClick: function () {}, - keys: [13] - }], - onClose: config.onClose, - }); - UI.openCustomModal(modal); + UI.openCustomModal($prop[0]); }); } else if ($this.hasClass("cp-app-drive-context-hashtag")) {