diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-04-06 13:16:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 13:16:26 +0200 |
commit | 2a2ab1b871d3b262c9d17a0ebb12e10d12c1e9f2 (patch) | |
tree | 56b7caf2d54851f61cd8fab2be512f2507ed7c76 /core | |
parent | 4a6e31c91dcbdc2cfd2cae44bf64243c5005fa13 (diff) | |
parent | 5598d30ef1bf1f4b4dc763b9528cf8bc2b6e34ed (diff) | |
download | nextcloud-server-2a2ab1b871d3b262c9d17a0ebb12e10d12c1e9f2.tar.gz nextcloud-server-2a2ab1b871d3b262c9d17a0ebb12e10d12c1e9f2.zip |
Merge pull request #9084 from nextcloud/public-page-template-extend
Public page template enhancements
Diffstat (limited to 'core')
-rw-r--r-- | core/css/public.scss | 27 | ||||
-rw-r--r-- | core/js/public/publicpage.js | 22 | ||||
-rw-r--r-- | core/templates/layout.public.php | 9 |
3 files changed, 53 insertions, 5 deletions
diff --git a/core/css/public.scss b/core/css/public.scss index 6a175de6431..cc2c6bd0826 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,32 @@ #header-secondary-action { margin-right: 13px; + + ul li { + min-width: 270px; + } + #save-external-share { + form { + display: flex; + margin: 0; + } + .hidden { + display: none; + } + #save-button-confirm { + flex-grow: 0; + } + } } + } + + #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..e71bdff12ae 100644 --- a/core/js/public/publicpage.js +++ b/core/js/public/publicpage.js @@ -22,8 +22,26 @@ $(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'); }); + + $('#save-external-share').find('label').click(function () { + $(this).toggleClass('hidden'); + $('.save-form').toggleClass('hidden') + $('#remote_address').focus(); + }); + +}); + +$(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..2317a7b36ef 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 */ @@ -76,6 +76,11 @@ <div id="content" class="app-<?php p($_['appid']) ?>" role="main"> <?php print_unescaped($_['content']); ?> </div> + <?php if($template->getFooterVisible()) { ?> + <footer> + <p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p> + </footer> + <?php } ?> </div> </body> |