2021-04-17 22:18:36 +02:00
|
|
|
|
|
|
|
|
2021-04-19 16:21:37 +02:00
|
|
|
<?php
|
|
|
|
if ($zoom_type == "wheelzoom") {
|
|
|
|
$this->headScript()->appendFile($this->assetUrl('vendor/wheelzoom/wheelzoom.js',
|
|
|
|
'ImageViewer'));
|
|
|
|
}
|
|
|
|
if ($zoom_type == "zoom") {
|
2021-04-19 13:57:44 +02:00
|
|
|
$this->headScript()->appendFile($this->assetUrl('vendor/zoom/jquery.zoom.min.js',
|
|
|
|
'ImageViewer'));
|
|
|
|
$this->headLink()->appendStylesheet($this->assetUrl('css/zoom.css',
|
2021-04-17 22:18:36 +02:00
|
|
|
'ImageViewer'));
|
2021-04-19 16:21:37 +02:00
|
|
|
}
|
|
|
|
?>
|
2021-04-17 22:18:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
if ($title !== false && $title !== "") {
|
|
|
|
$title = sprintf('<p id="wheelzoom-title">%s</p>', $title);
|
|
|
|
} else {
|
|
|
|
$title = false;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
2021-04-19 16:21:37 +02:00
|
|
|
<?php if ($zoom_type == "zoom") { ?>
|
|
|
|
<div id='<?= $id ?>' class='zoom' style='width:<?= $width ?>%; cursor:grab'>
|
|
|
|
<img src='<?= $image ?>' alt='<?= $title ?>'/>
|
2021-04-18 12:12:26 +02:00
|
|
|
</div>
|
2021-04-19 16:21:37 +02:00
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$('#<?= $id ?>').zoom({on:'grab', 'duration': 200});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php } ?>
|
2021-04-17 22:18:36 +02:00
|
|
|
|
2021-04-19 16:21:37 +02:00
|
|
|
<?php if ($zoom_type == "wheelzoom") { ?>
|
|
|
|
<div class='zoom' style='display:block; width:<?= $width ?>%; cursor:crosshair'>
|
|
|
|
<img id="<?= $id ?>" src="<?= $image ?>" />
|
|
|
|
</div>
|
2021-04-19 13:57:44 +02:00
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
2021-04-19 16:21:37 +02:00
|
|
|
wheelzoom(document.querySelector('#<?= $id ?>'));
|
2021-04-19 13:57:44 +02:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php } ?>
|
|
|
|
|
2021-04-19 16:21:37 +02:00
|
|
|
<?php if ($zoom_type == "") { ?>
|
|
|
|
<div class="archive-img">
|
|
|
|
<img id="<?= $id ?>"
|
|
|
|
style="width: <?= $width ?>%;"
|
|
|
|
src="<?= $image ?>"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|