From 4f8ca40d36319b403c63bfa9301781722fe97dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 17 Dec 2019 10:30:44 +0000 Subject: [PATCH 1/2] hide and show buttons to create/copy link --- customize.dist/src/less2/include/modals-ui-elements.less | 3 +++ www/common/common-ui-elements.js | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/customize.dist/src/less2/include/modals-ui-elements.less b/customize.dist/src/less2/include/modals-ui-elements.less index 79964e888..90f0d9272 100644 --- a/customize.dist/src/less2/include/modals-ui-elements.less +++ b/customize.dist/src/less2/include/modals-ui-elements.less @@ -50,4 +50,7 @@ margin-right: 10px;; } } + .cp-teams-invite-create { + margin-right: 0px !important; + } } diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 366931b24..a8f47c372 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1718,7 +1718,8 @@ define([ NThen(function (waitFor) { $(linkForm).hide(); $(linkSpin).show(); - $nav.find('button.cp-teams-invite-create').prop('disabled', 'disabled'); + $nav.find('button.cp-teams-invite-create').hide(); + $nav.find('button.cp-teams-invite-copy').show() setTimeout(waitFor(), 150); }).nThen(function (waitFor) { InviteInner.deriveBytes(seeds.scrypt, salt, waitFor(function (_bytes) { @@ -1738,7 +1739,7 @@ define([ if (obj && obj.error) { waitFor.abort(); $(linkSpin).hide(); - return void $(linkError).text('ERROR '+obj.error).show(); // XXX + return void $(linkError).text(Messages.team_inviteLinkError+obj.error).show(); // XXX } // Display result here $(linkSpin).hide(); @@ -1774,7 +1775,7 @@ define([ var frameLink = UI.dialog.customModal(linkContent, { buttons: linkButtons, }); - $(frameLink).find('.cp-teams-invite-copy').prop('disabled', 'disabled'); + $(frameLink).find('.cp-teams-invite-copy').prop('disabled', 'disabled').hide(); // Create modal var tabs = [{ From 3cd957a55225c3fd9ecc69866827af95c98d41fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 17 Dec 2019 10:51:17 +0000 Subject: [PATCH 2/2] fix button margins --- customize.dist/src/less2/include/alertify.less | 4 ++-- customize.dist/src/less2/include/modals-ui-elements.less | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/customize.dist/src/less2/include/alertify.less b/customize.dist/src/less2/include/alertify.less index 0a589a9de..923561a41 100644 --- a/customize.dist/src/less2/include/alertify.less +++ b/customize.dist/src/less2/include/alertify.less @@ -375,8 +375,8 @@ text-align: right; button { margin: 0px !important; - &:not(:last-child) { - margin-right: @alertify_padding-base !important; + &:not(:first-child) { + margin-left: @alertify_padding-base !important; } } } diff --git a/customize.dist/src/less2/include/modals-ui-elements.less b/customize.dist/src/less2/include/modals-ui-elements.less index 90f0d9272..79964e888 100644 --- a/customize.dist/src/less2/include/modals-ui-elements.less +++ b/customize.dist/src/less2/include/modals-ui-elements.less @@ -50,7 +50,4 @@ margin-right: 10px;; } } - .cp-teams-invite-create { - margin-right: 0px !important; - } }