diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-01-07 21:00:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-07 21:00:00 +0100 |
commit | 86bccde9c7341a8925a5039bd05f0b10c01c0b3d (patch) | |
tree | fac90b5dce92c07e40b68955fef2c2a1e9bde0ee | |
parent | dd0979c6516d621bb5c1cdd299f0a3b4b8048778 (diff) | |
parent | 883a71ce8e00d317e1827deacf46ee0c37934485 (diff) | |
download | nextcloud-server-86bccde9c7341a8925a5039bd05f0b10c01c0b3d.tar.gz nextcloud-server-86bccde9c7341a8925a5039bd05f0b10c01c0b3d.zip |
Merge pull request #17861 from nextcloud/fix-tab-navigation-of-menu-in-public-share-pages
Fix tab navigation of menu in public share pages
-rw-r--r-- | core/css/public.scss | 13 | ||||
-rw-r--r-- | core/js/public/publicpage.js | 5 | ||||
-rw-r--r-- | core/templates/layout.public.php | 2 | ||||
-rw-r--r-- | lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php | 17 |
4 files changed, 23 insertions, 14 deletions
diff --git a/core/css/public.scss b/core/css/public.scss index 1b55d9d12db..b171dd4970d 100644 --- a/core/css/public.scss +++ b/core/css/public.scss @@ -11,10 +11,19 @@ $footer-height: 65px; ul li { min-width: 270px; } - #save-external-share { + #header-actions-toggle { + background-color: transparent; + border-color: transparent; + + &:hover, + &:focus, + &:active { + opacity: 1; + } + } + #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/core/templates/layout.public.php b/core/templates/layout.public.php index bbfa264d171..996b78a922b 100644 --- a/core/templates/layout.public.php +++ b/core/templates/layout.public.php @@ -61,7 +61,7 @@ </span> <?php if($template->getActionCount() > 1) { ?> <div id="header-secondary-action"> - <span id="header-actions-toggle" class="menutoggle icon-more-white"></span> + <button id="header-actions-toggle" class="menutoggle icon-more-white"></button> <div id="header-actions-menu" class="popovermenu menu"> <ul> <?php diff --git a/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php b/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php index 5e1387ac853..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 '<li>' . - '<a id="save-external-share" data-protected="false" data-owner-display-name="' . Util::sanitizeHTML($this->displayname) . '" data-owner="' . Util::sanitizeHTML($this->owner) . '" data-name="' . Util::sanitizeHTML($this->shareName) . '">' . - '<span class="icon ' . Util::sanitizeHTML($this->getIcon()) . '"></span>' . - '<label for="remote_address">' . Util::sanitizeHTML($this->getLabel()) . '</label>' . - '<form class="save-form hidden" action="#">' . - '<input type="text" id="remote_address" placeholder="user@yourNextcloud.org">' . - '<input type="submit" value=" " id="save-button-confirm" class="icon-confirm" disabled="disabled"></button>' . - '</form>' . - '</a>' . + ' <button id="save-external-share" class="icon ' . Util::sanitizeHTML($this->getIcon()) . '" data-protected="false" data-owner-display-name="' . Util::sanitizeHTML($this->displayname) . '" data-owner="' . Util::sanitizeHTML($this->owner) . '" data-name="' . Util::sanitizeHTML($this->shareName) . '">' . Util::sanitizeHTML($this->getLabel()) . '</button>' . + '</li>' . + '<li id="external-share-menu-item" class="hidden">' . + ' <span class="menuitem">' . + ' <form class="save-form" action="#">' . + ' <input type="text" id="remote_address" placeholder="user@yourNextcloud.org">' . + ' <input type="submit" value=" " id="save-button-confirm" class="icon-confirm" disabled="disabled"></button>' . + ' </form>' . + ' </span>' . '</li>'; } } |