Commit 63094e99 authored by Tino Goratsch's avatar Tino Goratsch

- updated fancybox to version 3.0.*

- minor fixes and improvements
parent 11a22940
......@@ -31,7 +31,7 @@ class Libraries
'enabled' => false,
'dependencies' => ['jquery'],
'css' => 'jquery.fancybox.css',
'js' => 'jquery.fancybox.pack.js'
'js' => 'jquery.fancybox.min.js'
],
'bootstrap' => [
'enabled' => false,
......
......@@ -54,6 +54,10 @@ class IncludeJs extends AbstractFunction
*/
public function process(array $params, \Smarty_Internal_Template $smarty)
{
if (!empty($params['depends'])) {
$this->assets->enableLibraries(explode(',', $params['depends']));
}
if (isset($params['module'], $params['file']) === true &&
(bool)preg_match('=/=', $params['module']) === false &&
(bool)preg_match('=\./=', $params['file']) === false
......@@ -61,10 +65,6 @@ class IncludeJs extends AbstractFunction
// Do not include the same file multiple times
$key = $params['module'] . '/' . $params['file'];
if (isset($this->alreadyIncluded[$key]) === false) {
if (!empty($params['depends'])) {
$this->assets->enableLibraries(explode(',', $params['depends']));
}
$this->alreadyIncluded[$key] = true;
$script = '<script type="text/javascript" src="%s"></script>';
......@@ -80,9 +80,14 @@ class IncludeJs extends AbstractFunction
}
return sprintf($script, $path . '?v=' . Core\Application\BootstrapInterface::VERSION);
}
return '';
}
throw new \Exception('Not all necessary arguments for the function ' . __FUNCTION__ . ' were passed!');
if (empty($params['depends'])) {
throw new \Exception('Not all necessary arguments for the function ' . __FUNCTION__ . ' were passed!');
}
return '';
}
}
......@@ -87,7 +87,7 @@ class GeneratePictureUriAliasOnModelAfterSaveListener
$seoDescription = $this->metaStatements->getDescription(
sprintf(Gallery\Helpers::URL_KEY_PATTERN_GALLERY, $galleryId)
);
$seoRobots = $this->metaStatements->getRobots(
$seoRobots = $this->metaStatements->getRobotsSetting(
sprintf(Gallery\Helpers::URL_KEY_PATTERN_GALLERY, $galleryId)
);
......
jQuery(document).ready(function ($) {
$('[data-fancybox-group="gallery"]').fancybox({
type: 'image',
padding: 0,
nextClick: true,
arrows: true,
loop: true
});
});
......@@ -5,18 +5,25 @@
{if $overlay == 1}
{foreach $pictures as $row}
<a href="{uri args="gallery/index/image/id_`$row.id`/action_normal"}"
data-fancybox-group="gallery"
{if !empty($row.description)}title="{$row.description|strip_tags}"{/if}>
<img src="{uri args="gallery/index/image/id_`$row.id`/action_thumb"}" alt="" class="img-thumbnail">
class="gallery-picture-thumb"
data-fancybox="gallery"
data-type="image"
{if !empty($row.description)}data-caption="{$row.description|strip_tags|trim}"{/if}>
<img src="{uri args="gallery/index/image/id_`$row.id`/action_thumb"}"
alt="{$row.description|strip_tags|trim}"
class="img-thumbnail">
</a>
{/foreach}
{javascripts}
{include_js module="gallery" file="frontend/index.pics" depends="fancybox"}
{include_js depends="fancybox"}
{/javascripts}
{else}
{foreach $pictures as $row}
<a href="{uri args="gallery/index/details/id_`$row.id`"}">
<img src="{uri args="gallery/index/image/id_`$row.id`/action_thumb"}" alt="" class="img-thumbnail">
<a href="{uri args="gallery/index/details/id_`$row.id`"}"
class="gallery-picture-thumb">
<img src="{uri args="gallery/index/image/id_`$row.id`/action_thumb"}"
alt="{$row.description|strip_tags|trim}"
class="img-thumbnail">
</a>
{/foreach}
{/if}
......
/*!
* Datetimepicker for Bootstrap 3
* version : 4.17.46
* version : 4.17.47
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
.bootstrap-datetimepicker-widget {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,7 +3,7 @@
* See the LICENCE file at the top-level module directory for licencing details.
*/
module.exports = function (gulp, plugins) {
module.exports = function (gulp) {
"use strict";
return function () {
......@@ -12,13 +12,13 @@ module.exports = function (gulp, plugins) {
paths = [
{
'src': [
nodeBasePath + '/@fancyapps/fancybox/dist/jquery.fancybox.min.js',
nodeBasePath + '/jquery/dist/jquery.min.js',
nodeBasePath + '/bootbox/bootbox.js',
nodeBasePath + '/moment/min/moment.min.js',
nodeBasePath + '/datatables.net/js/jquery.dataTables.js',
nodeBasePath + '/datatables.net-bs/js/dataTables.bootstrap.js',
nodeBasePath + '/bootstrap/dist/js/bootstrap.min.js',
nodeBasePath + '/fancybox/source/jquery.fancybox.pack.js',
nodeBasePath + '/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js',
nodeBasePath + '/html5shiv/dist/html5shiv.min.js',
nodeBasePath + '/js-cookie/src/js.cookie.js'
......@@ -31,13 +31,7 @@ module.exports = function (gulp, plugins) {
},
{
'src': [
nodeBasePath + '/fancybox/source/*.gif',
nodeBasePath + '/fancybox/source/*.png'
],
'dest': systemBasePath + '/images/fancybox'
},
{
'src': [
nodeBasePath + '/@fancyapps/fancybox/dist/jquery.fancybox.css',
nodeBasePath + '/bootstrap/dist/css/bootstrap.min.css',
nodeBasePath + '/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css',
nodeBasePath + '/datatables.net-bs/css/dataTables.bootstrap.css'
......@@ -52,10 +46,6 @@ module.exports = function (gulp, plugins) {
.pipe(gulp.dest(paths[i].dest));
}
return gulp.src(nodeBasePath + '/fancybox/source/jquery.fancybox.css')
.pipe(plugins.modifyCssUrls({
prepend: '../images/fancybox/'
}))
.pipe(gulp.dest(systemBasePath + '/css'));
return 0;
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment