]> git.mxchange.org Git - friendica.git/commitdiff
add justified-gallery to fbrowser
authorrabuzarus <>
Tue, 21 Mar 2017 19:39:31 +0000 (20:39 +0100)
committerrabuzarus <>
Tue, 21 Mar 2017 19:39:31 +0000 (20:39 +0100)
view/theme/frio/js/filebrowser.js
view/theme/frio/templates/filebrowser.tpl

index 5c60c44cadaf19f025012602b52aea0645239216..d18bf8e7964aaa93388484fe0f024cf3629f27f5 100644 (file)
@@ -217,10 +217,12 @@ var FileBrowser = {
        },\r
 \r
        postLoad: function() {\r
+               FileBrowser.initGallery();\r
                $(".fbrowser .fbswitcher .btn").removeClass("active");\r
                $(".fbrowser .fbswitcher [data-mode=" + FileBrowser.type + "]").addClass("active");\r
                // We need to add the AjaxUpload to the button\r
                FileBrowser.uploadButtons();\r
+               \r
        },\r
 \r
        loadContent: function(url) {\r
@@ -235,5 +237,13 @@ var FileBrowser = {
                                FileBrowser.postLoad();\r
                        }\r
                });\r
+       },\r
+\r
+       initGallery: function() {\r
+               $(".fbrowser.image .fbrowser-content-container").justifiedGallery({\r
+                       'rowHeight': 80,\r
+                       'margins': 3,\r
+                       'border': 0\r
+               });\r
        }\r
 };\r
index dc8a9593a3934e9ba74824a08a60cb5d603a174b..cb05348951d4d89abf9f26a8861805d06d49a64a 100644 (file)
                        {{/if}}
 
                        <div class="list {{$type}} media-body">
-                               {{foreach $files as $f}}
-                               <div class="photo-album-image-wrapper">
-                                       <a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}">
-                                               <img src="{{$f.2}}">
-                                               <p>{{$f.1}}</p>
-                                       </a>
+                               <div class="fbrowser-content-container">
+                                       {{foreach $files as $f}}
+                                       <div class="photo-album-image-wrapper">
+                                               <a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}">
+                                                       <img src="{{$f.2}}" alt="{{$f.1}}">
+                                                       <p>{{$f.1}}</p>
+                                               </a>
+                                       </div>
+                                       {{/foreach}}
                                </div>
-                               {{/foreach}}
                        </div>
                </div>