summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-04-05 12:21:39 +0200
committerJulius Härtl <jus@bitgrid.net>2018-04-05 12:21:39 +0200
commitbbeb3402b6bc778de393b6da1b5fdc214f825b16 (patch)
treec6acabcd87666f34beb3eb59bcf93a09338170fa /core
parentcc3b1179fc2ad0051cb6043ff022cd033144a936 (diff)
downloadnextcloud-server-bbeb3402b6bc778de393b6da1b5fdc214f825b16.tar.gz
nextcloud-server-bbeb3402b6bc778de393b6da1b5fdc214f825b16.zip
Move styling and menu handling to publicpage.js
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core')
-rw-r--r--core/css/public.scss16
-rw-r--r--core/js/public/publicpage.js15
-rw-r--r--core/templates/layout.public.php4
3 files changed, 30 insertions, 5 deletions
diff --git a/core/css/public.scss b/core/css/public.scss
index 6a175de6431..412016bc625 100644
--- a/core/css/public.scss
+++ b/core/css/public.scss
@@ -1,7 +1,7 @@
#body-public {
.header-right {
- span:not(.popovermenu) a {
+ #header-primary-action a {
color: $color-primary-text;
}
@@ -16,7 +16,21 @@
#header-secondary-action {
margin-right: 13px;
+
+ input[type='text'] {
+ width: 200px;
+ }
}
}
+
+ #content {
+ height: initial;
+ min-height: calc(100vh - 160px);
+ }
+
+ /* force layout to make sure the content element's height matches its contents' height */
+ .ie #content {
+ display: inline-block;
+ }
}
diff --git a/core/js/public/publicpage.js b/core/js/public/publicpage.js
index 31b862ba12a..1b37005540f 100644
--- a/core/js/public/publicpage.js
+++ b/core/js/public/publicpage.js
@@ -22,8 +22,19 @@
$(document).ready(function () {
- console.log('public');
- $('#body-public .header-right .menutoggle').click(function() {
+ $('#body-public').find('.header-right .menutoggle').click(function() {
$(this).next('.popovermenu').toggleClass('open');
});
});
+
+$(document).mouseup(function(e) {
+ var toggle = $('#body-public').find('.header-right .menutoggle');
+ var container = toggle.next('.popovermenu');
+
+ // if the target of the click isn't the menu toggle, nor a descendant of the
+ // menu toggle, nor the container nor a descendant of the container
+ if (!toggle.is(e.target) && toggle.has(e.target).length === 0 &&
+ !container.is(e.target) && container.has(e.target).length === 0) {
+ container.removeClass('open');
+ }
+});
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index d3c12f8fd96..61b66144502 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -50,13 +50,13 @@
<div class="header-right">
<span id="header-primary-action" class="<?php if($template->getActionCount() === 1) { p($primary->getIcon()); } ?>">
<a href="<?php p($primary->getLink()); ?>">
- <span class="share-menutoggle-text"><?php p($primary->getLabel()) ?></span>
+ <span><?php p($primary->getLabel()) ?></span>
</a>
</span>
<?php if($template->getActionCount()>1) { ?>
<div id="header-secondary-action">
<span id="header-actions-toggle" class="menutoggle icon-more-white"></span>
- <div id="share-menu" class="popovermenu menu">
+ <div id="header-actions-menu" class="popovermenu menu">
<ul>
<?php
/** @var \OCP\AppFramework\Http\Template\IMenuAction $action */