summaryrefslogtreecommitdiffstats
path: root/application/views/file/fragments
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-01-03 18:19:19 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-01-03 18:19:19 +0100
commit1bf36e3c13a534a94b38e9bce50589ea59a7aee6 (patch)
tree80f5817eb5ab7174dd569cfa566a172d132fe4e7 /application/views/file/fragments
parent08ab0a51e77e99f0318ebd198d9569679e4a24f8 (diff)
Lazyload thumbnails
Apparently there are users with >500 images and they view their thumbnail history on mobile phones. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/views/file/fragments')
-rw-r--r--application/views/file/fragments/thumbnail.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/application/views/file/fragments/thumbnail.php b/application/views/file/fragments/thumbnail.php
index 61d15f325..4bdf5be80 100644
--- a/application/views/file/fragments/thumbnail.php
+++ b/application/views/file/fragments/thumbnail.php
@@ -1,9 +1,10 @@
<?php register_js_include("/data/js/jquery.colorbox.js"); ?>
+<?php register_js_include("/data/js/jquery.lazyload.js"); ?>
<!-- Comment markers background: http://stackoverflow.com/a/14776780/953022 -->
<div class="container container-wide">
<div class="upload_thumbnails"><!--
<?php foreach($items as $key => $item): ?>
- --><a rel="gallery" class="colorbox" data-orientation="<?php echo $item["orientation"]; ?>" href="<?php echo site_url("/".$item["id"])."/"; ?>" title="<?php echo htmlentities($item["filename"]); ?>" data-content="<?php echo htmlentities($item["tooltip"]); ?>" data-id="<?php echo $item["id"]; ?>"><img class="thumb" src="<?php echo site_url("file/thumbnail/".$item["id"]); ?>"></a><!--
+ --><a rel="gallery" class="colorbox" data-orientation="<?php echo $item["orientation"]; ?>" href="<?php echo site_url("/".$item["id"])."/"; ?>" title="<?php echo htmlentities($item["filename"]); ?>" data-content="<?php echo htmlentities($item["tooltip"]); ?>" data-id="<?php echo $item["id"]; ?>"><img class="thumb lazyload" data-original="<?php echo site_url("file/thumbnail/".$item["id"]); ?>"><noscript><img class="thumb" src="<?php echo site_url("file/thumbnail/".$item["id"]); ?>"></noscript></a><!--
<?php endforeach; ?>
-->
</div>