]> BookStack Code Mirror - bookstack/commitdiff
Thumbnail toggle function.
authorNilesh Deepak <redacted>
Wed, 5 Jul 2017 07:18:41 +0000 (12:48 +0530)
committerNilesh Deepak <redacted>
Wed, 5 Jul 2017 07:18:41 +0000 (12:48 +0530)
resources/assets/js/global.js

index dc6802e12ba6646be4099f759773f2368e2c5ffe..0e82c23d865afbc26db9c93e98286254b513a555 100644 (file)
@@ -153,6 +153,14 @@ $('[data-action="expand-entity-list-details"]').click(function() {
     $('.entity-list.compact').find('p').not('.empty-text').slideToggle(240);
 });
 
+// Toggle thumbnail::hide image and reduce grid size
+$(document).ready(function(){
+   $('[data-action="expand-thumbnail"]').click(function(){
+     $('.galleryItem').toggleClass("collapse");
+     $('.galleryItem').find('img').slideToggle(50);
+   });
+});
+
 // Popup close
 $('.popup-close').click(function() {
     $(this).closest('.overlay').fadeOut(240);
Morty Proxy This is a proxified and sanitized view of the page, visit original site.