]> BookStack Code Mirror - bookstack/blobdiff - resources/assets/js/global.js
Added migration file.
[bookstack] / resources / assets / js / global.js
index 85f9f77a6867504572d4ba206f83a255c648ea21..26dbf9a5eaab58859b777b1ddc892a55963ceb6a 100644 (file)
@@ -102,6 +102,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