From 33b2f4e29589e6a415612f7d15525659847f3a8a Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Thu, 7 Nov 2019 14:19:04 +0100 Subject: Format HTML elements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- .../Http/Template/ExternalShareMenuAction.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php b/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php index 5e1387ac853..47f62d9f8fd 100644 --- a/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php +++ b/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php @@ -67,14 +67,14 @@ class ExternalShareMenuAction extends SimpleMenuAction { */ public function render(): string { return '
  • ' . - '' . - '' . - '' . - '' . - '' . + ' ' . + ' ' . + ' ' . + ' ' . + ' ' . '
  • '; } } -- cgit v1.2.3 From 883a71ce8e00d317e1827deacf46ee0c37934485 Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Thu, 7 Nov 2019 21:30:56 +0100 Subject: Split the menu entry for external shares in two MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The external shares entry showed a "button" that, when pressed, replaced the button with the input to set the remote share address. The "button" was actually a label for the input, so when the label was focused it transferred the focus to the input and thus pressing enter or space did not show the input. Moreover, inputs inside links are not valid HTML, and once shown there was no way to hide the input again. Due to all this, and for consistency with the direct link input, the external share input was moved to a different menu item that is shown and hidden when the button, which nows is also a real button, is clicked. Signed-off-by: Daniel Calviño Sánchez --- core/css/public.scss | 3 +-- core/js/public/publicpage.js | 5 ++--- .../AppFramework/Http/Template/ExternalShareMenuAction.php | 11 ++++++----- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/core/css/public.scss b/core/css/public.scss index 6ec22cbc6d2..b171dd4970d 100644 --- a/core/css/public.scss +++ b/core/css/public.scss @@ -21,10 +21,9 @@ $footer-height: 65px; opacity: 1; } } - #save-external-share { + #external-share-menu-item { form { display: flex; - margin: 0; } .hidden { display: none; diff --git a/core/js/public/publicpage.js b/core/js/public/publicpage.js index e71bdff12ae..4fb9c67bfee 100644 --- a/core/js/public/publicpage.js +++ b/core/js/public/publicpage.js @@ -26,9 +26,8 @@ $(document).ready(function () { $(this).next('.popovermenu').toggleClass('open'); }); - $('#save-external-share').find('label').click(function () { - $(this).toggleClass('hidden'); - $('.save-form').toggleClass('hidden') + $('#save-external-share').click(function () { + $('#external-share-menu-item').toggleClass('hidden') $('#remote_address').focus(); }); diff --git a/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php b/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php index 47f62d9f8fd..33ca3be94aa 100644 --- a/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php +++ b/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php @@ -67,14 +67,15 @@ class ExternalShareMenuAction extends SimpleMenuAction { */ public function render(): string { return '
  • ' . - ' ' . - ' ' . - ' ' . - '
  • ' . + ''; } } -- cgit v1.2.3