mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Show and hide menu via Javascript, thanks @skjnldsv
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
This commit is contained in:
parent
f2fadf677c
commit
116cb58c3c
3 changed files with 24 additions and 2 deletions
|
|
@ -46,5 +46,13 @@ table td.filename .nametext {
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
// Hide Download label of 3-dot-menu on public share pages
|
||||
.share-menutoggle-text {
|
||||
display: none;
|
||||
}
|
||||
#header .menutoggle {
|
||||
padding-right: 14px;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -424,4 +424,18 @@ $(document).ready(function () {
|
|||
return App.fileList.generatePreviewUrl(urlSpec);
|
||||
};
|
||||
}
|
||||
|
||||
$('#share-menutoggle').click(function() {
|
||||
$('#share-menu').show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).mouseup(function(e) {
|
||||
var container = $('#share-menu');
|
||||
|
||||
// if the target of the click isn't the container nor a descendant of the container
|
||||
if (!container.is(e.target) && container.has(e.target).length === 0) {
|
||||
container.hide();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
|||
|
||||
<div class="header-right">
|
||||
<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { ?>
|
||||
<a href="#" id="share-menutoggle" class="menutoggle icon-more-white"><?php p($l->t('Download')) ?></a>
|
||||
<div id="share-menu" class="popovermenu menu hidden" style="display: block;">
|
||||
<a href="#" id="share-menutoggle" class="menutoggle icon-more-white"><span class="share-menutoggle-text"><?php p($l->t('Download')) ?></span></a>
|
||||
<div id="share-menu" class="popovermenu menu hidden">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="<?php p($_['downloadURL']); ?>" id="download">
|
||||
|
|
|
|||
Loading…
Reference in a new issue