Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions core/css/public.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions core/js/public/publicpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down
2 changes: 1 addition & 1 deletion core/templates/layout.public.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@ public function __construct(string $label, string $icon, string $owner, string $
*/
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>';
}
}