Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Citronalco
zpbase
Commits
791b3089
Commit
791b3089
authored
Jul 25, 2022
by
Bernhard Geier
Browse files
galleria: calculate box size
parent
ce10ec93
Changes
1
Hide whitespace changes
Inline
Side-by-side
zpbase/inc/galleria-jscall.php
View file @
791b3089
...
...
@@ -18,7 +18,7 @@
<?php
}
else
{
?>
clicknext
:
<?php
if
(
getOption
(
'zpbase_galclicknext'
))
{
echo
'true'
;
}
else
{
echo
'false'
;
}
?>
,
autoplay
:
<?php
if
(
getOption
(
'zpbase_galautoplay'
)
&&
(
is_numeric
(
getOption
(
'zpbase_galinterval'
))))
{
echo
getOption
(
'zpbase_galinterval'
);
}
elseif
(
getOption
(
'zpbase_galautoplay'
))
{
echo
'4000'
;
}
else
{
echo
'false'
;
}
?>
,
height
:
0.81
,
height
:
$
(
window
).
height
()
-
$
(
'
#top
'
).
outerHeight
(
true
)
-
$
(
'
#object-info
'
).
outerHeight
(
true
)
,
<?php
}
?>
<?php
if
(
$isMobile
)
{
?>
thumbnails
:
false
,
...
...
@@ -84,6 +84,15 @@
<?php
if
((
getOption
(
'zpbase_galcaption'
))
||
(
$isMobile
))
echo
'this.$(\'info-link\').click();'
;
?>
$
(
'
.galleria-container
'
).
append
(
'
<div id="galleria-custom-controls">
<?php
if
(
$sspage
)
{
?>
<a id="galleria-control-return" title="
<?php
echo
html_encode
(
$albumtitle
)
.
'» '
.
gettext
(
'Return'
);
?>
" href="
<?php
echo
html_encode
(
$returnpath
);
?>
"><span></span></a>
<?php
}
?>
<a id="galleria-control-play" href="#"><span></span></a><a id="galleria-control-pause" href="#"><span></span></a><a href="#" id="galleria-control-fullscreen"><span></span></a></div>
'
);
});
function
resizeGalleria
()
{
var
h
=
$
(
window
).
height
()
-
$
(
'
#top
'
).
outerHeight
(
true
)
-
$
(
'
#object-info
'
).
outerHeight
(
true
);
Galleria
.
get
(
0
).
setOptions
(
'
height
'
,
h
).
rescale
();
}
window
.
onresize
=
function
(
event
)
{
resizeGalleria
();
}
</script>
<?php
if
((
getOption
(
'zpbase_galautoplay'
))
||
(
$sspage
))
{
?>
<style>
#galleria-custom-controls
a
#galleria-control-play
{
display
:
none
;}
#galleria-custom-controls
a
#galleria-control-pause
{
display
:
block
;}
</style>
<?php
}
?>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment