]> BookStack Code Mirror - bookstack/blobdiff - resources/assets/js/global.js
Merge branch 'BookStackApp-master' of git://github.com/OsmosysSoftware/BookStack...
[bookstack] / resources / assets / js / global.js
index 352616c5a2e00c73a7b88e521f84e9eca414b76c..f746b28612dff39befb3f6b53b0f07e5bebc7549 100644 (file)
@@ -119,6 +119,19 @@ jQuery.expr[":"].contains = $.expr.createPseudo(function (arg) {
     };
 });
 
+// Common jQuery actions
+$('[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(){
+     $('.gallery-item').toggleClass("collapse").find('img').slideToggle(50);
+   });
+});
+
+
 // Detect IE for css
 if(navigator.userAgent.indexOf('MSIE')!==-1
     || navigator.appVersion.indexOf('Trident/') > 0