adding navigation bar to gallery
This commit is contained in:
parent
6b0a2ae60e
commit
8bc22907b8
|
@ -27,6 +27,7 @@ OCP\User::checkLoggedIn();
|
||||||
OCP\App::checkAppEnabled('gallery');
|
OCP\App::checkAppEnabled('gallery');
|
||||||
OCP\App::setActiveNavigationEntry( 'gallery_index' );
|
OCP\App::setActiveNavigationEntry( 'gallery_index' );
|
||||||
|
|
||||||
|
OCP\Util::addStyle('files', 'files');
|
||||||
OCP\Util::addStyle('gallery', 'styles');
|
OCP\Util::addStyle('gallery', 'styles');
|
||||||
OCP\Util::addScript('gallery', 'pictures');
|
OCP\Util::addScript('gallery', 'pictures');
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$l = OC_L10N::get('gallery');
|
$l = OC_L10N::get('gallery');
|
||||||
|
$root = !empty($_GET['root']) ? $_GET['root'] : '/';
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
div.gallery_div {position:relative; display: inline-block; height: 152px; width: 150px; margin: 5px;}
|
div.gallery_div {position:relative; display: inline-block; height: 152px; width: 150px; margin: 5px;}
|
||||||
div.miniature_border {position:absolute; height: 150px; -webkit-transition-duration: .2s; background-position: 50%;}
|
div.miniature_border {position:absolute; height: 150px; -moz-transition-duration: 0.2s; -o-transition-duration:0.2s; -webkit-transition-duration: .2s; background-position: 50%;}
|
||||||
div.line {display:inline-block; border: 0; width: auto; height: 160px}
|
div.line {display:inline-block; border: 0; width: auto; height: 160px}
|
||||||
div.gallery_div img{position:absolute; top: 1; left: 0; -webkit-transition-duration: 0.3s; height:150px; width: auto;}
|
div.gallery_div img{position:absolute; top: 1; left: 0; -moz-transition-duration: 0.3s; -o-transition-duration:0.3s; -webkit-transition-duration: 0.3s; height:150px; width: auto;}
|
||||||
div.gallery_div img.shrinker {width:80px !important;}
|
div.gallery_div img.shrinker {width:80px !important;}
|
||||||
div.title { opacity: 0; text-align: center; vertical-align: middle; font-family: Arial; font-size: 12px; border: 0; position: absolute; text-overflow: ellipsis; bottom: 20px; left:5px; height:auto; padding: 5px; width: 140px; background-color: black; color: white; -webkit-transition: opacity 0.5s; z-index:1000; border-radius: 7px}
|
div.title { opacity: 0; text-align: center; vertical-align: middle; font-family: Arial; font-size: 12px; border: 0; position: absolute; text-overflow: ellipsis; bottom: 20px; left:5px; height:auto; padding: 5px; width: 140px; background-color: black; color: white; -webkit-transition: opacity 0.5s; z-index:1000; border-radius: 7px}
|
||||||
div.visible { opacity: 0.8;}
|
div.visible { opacity: 0.8;}
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var root = "<?php echo !empty($_GET['root']) ? $_GET['root'] : '/'; ?>";
|
var root = "<?php echo $root; ?>";
|
||||||
|
|
||||||
function explode(element) {
|
function explode(element) {
|
||||||
$('div', element).each(function(index, elem) {
|
$('div', element).each(function(index, elem) {
|
||||||
|
@ -55,8 +56,19 @@ $(document).ready(function() {
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="controls">
|
<div id="controls"><?php
|
||||||
<a href="javascript:shareGallery();"><input type="button" value="<?php echo $l->t('Share');?>" /></a><br/>
|
$sr = trim($root, '/');
|
||||||
|
if (!empty($sr)) {
|
||||||
|
$paths = explode('/', $sr);
|
||||||
|
$path = '/';
|
||||||
|
for ($i = 0; $i < count($paths); $i++) {
|
||||||
|
$path .= urlencode($paths[$i]).'/';
|
||||||
|
$classess = 'crumb'.($i == count($paths)-1?' last':'');
|
||||||
|
echo '<div class="'.$classess.'" style="background-image:url(\''.\OCP\image_path('core','breadcrumb.png').'\')"><a href="'.\OCP\Util::linkTo('gallery', 'index.php').'&root='.$path.'">'.$paths[$i].'</a></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?> <a href="javascript:shareGallery();"><input type="button" value="<?php echo $l->t('Share');?>" /></a><br/>
|
||||||
</div>
|
</div>
|
||||||
<div id="gallerycontent">
|
<div id="gallerycontent">
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue