Move styling and menu handling to publicpage.js
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
cc3b1179fc
commit
bbeb3402b6
|
@ -1,13 +1,3 @@
|
||||||
#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;
|
|
||||||
}
|
|
||||||
|
|
||||||
#preview {
|
#preview {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -105,10 +95,6 @@ thead {
|
||||||
border-color: rgba(0,0,0,0.3) !important;
|
border-color: rgba(0,0,0,0.3) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#share-menu input[type='text'] {
|
|
||||||
width: 200px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#public-upload .avatardiv {
|
#public-upload .avatardiv {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -423,20 +423,4 @@ $(document).ready(function () {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#share-menutoggle').click(function() {
|
|
||||||
$('#share-menu').toggleClass('open');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$(document).mouseup(function(e) {
|
|
||||||
var toggle = $('#share-menutoggle');
|
|
||||||
var container = $('#share-menu');
|
|
||||||
|
|
||||||
// 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');
|
|
||||||
}
|
|
||||||
});
|
});
|
|
@ -30,7 +30,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<input type="hidden" name="maxSizeAnimateGif" value="<?php p($_['maxSizeAnimateGif']); ?>" id="maxSizeAnimateGif">
|
<input type="hidden" name="maxSizeAnimateGif" value="<?php p($_['maxSizeAnimateGif']); ?>" id="maxSizeAnimateGif">
|
||||||
<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { ?>
|
<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { ?>
|
||||||
<div id="content">
|
<div id="files-public-content">
|
||||||
<div id="preview">
|
<div id="preview">
|
||||||
<?php if (isset($_['folder'])): ?>
|
<?php if (isset($_['folder'])): ?>
|
||||||
<?php print_unescaped($_['folder']); ?>
|
<?php print_unescaped($_['folder']); ?>
|
||||||
|
@ -84,9 +84,3 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
||||||
data-url="<?php p(\OC::$server->getURLGenerator()->linkTo('files', 'ajax/upload.php')); ?>" />
|
data-url="<?php p(\OC::$server->getURLGenerator()->linkTo('files', 'ajax/upload.php')); ?>" />
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<footer>
|
|
||||||
<p class="info">
|
|
||||||
<?php print_unescaped($theme->getLongFooter()); ?>
|
|
||||||
</p>
|
|
||||||
</footer>
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#body-public {
|
#body-public {
|
||||||
.header-right {
|
.header-right {
|
||||||
|
|
||||||
span:not(.popovermenu) a {
|
#header-primary-action a {
|
||||||
color: $color-primary-text;
|
color: $color-primary-text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,21 @@
|
||||||
|
|
||||||
#header-secondary-action {
|
#header-secondary-action {
|
||||||
margin-right: 13px;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,19 @@
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
console.log('public');
|
$('#body-public').find('.header-right .menutoggle').click(function() {
|
||||||
$('#body-public .header-right .menutoggle').click(function() {
|
|
||||||
$(this).next('.popovermenu').toggleClass('open');
|
$(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');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
@ -50,13 +50,13 @@
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<span id="header-primary-action" class="<?php if($template->getActionCount() === 1) { p($primary->getIcon()); } ?>">
|
<span id="header-primary-action" class="<?php if($template->getActionCount() === 1) { p($primary->getIcon()); } ?>">
|
||||||
<a href="<?php p($primary->getLink()); ?>">
|
<a href="<?php p($primary->getLink()); ?>">
|
||||||
<span class="share-menutoggle-text"><?php p($primary->getLabel()) ?></span>
|
<span><?php p($primary->getLabel()) ?></span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<?php if($template->getActionCount()>1) { ?>
|
<?php if($template->getActionCount()>1) { ?>
|
||||||
<div id="header-secondary-action">
|
<div id="header-secondary-action">
|
||||||
<span id="header-actions-toggle" class="menutoggle icon-more-white"></span>
|
<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>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
/** @var \OCP\AppFramework\Http\Template\IMenuAction $action */
|
/** @var \OCP\AppFramework\Http\Template\IMenuAction $action */
|
||||||
|
|
|
@ -64,7 +64,7 @@ class FilesSharingAppContext implements Context, ActorAwareInterface {
|
||||||
* @return Locator
|
* @return Locator
|
||||||
*/
|
*/
|
||||||
public static function shareMenu() {
|
public static function shareMenu() {
|
||||||
return Locator::forThe()->id("share-menu")->
|
return Locator::forThe()->id("header-actions-menu")->
|
||||||
describedAs("Share menu in Shared file page");
|
describedAs("Share menu in Shared file page");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue