add justified-gallery to fbrowser
This commit is contained in:
parent
af8bd4b45f
commit
9acfbae6ea
2 changed files with 19 additions and 7 deletions
|
@ -217,10 +217,12 @@ var FileBrowser = {
|
||||||
},
|
},
|
||||||
|
|
||||||
postLoad: function() {
|
postLoad: function() {
|
||||||
|
FileBrowser.initGallery();
|
||||||
$(".fbrowser .fbswitcher .btn").removeClass("active");
|
$(".fbrowser .fbswitcher .btn").removeClass("active");
|
||||||
$(".fbrowser .fbswitcher [data-mode=" + FileBrowser.type + "]").addClass("active");
|
$(".fbrowser .fbswitcher [data-mode=" + FileBrowser.type + "]").addClass("active");
|
||||||
// We need to add the AjaxUpload to the button
|
// We need to add the AjaxUpload to the button
|
||||||
FileBrowser.uploadButtons();
|
FileBrowser.uploadButtons();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
loadContent: function(url) {
|
loadContent: function(url) {
|
||||||
|
@ -235,5 +237,13 @@ var FileBrowser = {
|
||||||
FileBrowser.postLoad();
|
FileBrowser.postLoad();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
initGallery: function() {
|
||||||
|
$(".fbrowser.image .fbrowser-content-container").justifiedGallery({
|
||||||
|
'rowHeight': 80,
|
||||||
|
'margins': 3,
|
||||||
|
'border': 0
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,16 +34,18 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="list {{$type}} media-body">
|
<div class="list {{$type}} media-body">
|
||||||
|
<div class="fbrowser-content-container">
|
||||||
{{foreach $files as $f}}
|
{{foreach $files as $f}}
|
||||||
<div class="photo-album-image-wrapper">
|
<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}}">
|
<a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}">
|
||||||
<img src="{{$f.2}}">
|
<img src="{{$f.2}}" alt="{{$f.1}}">
|
||||||
<p>{{$f.1}}</p>
|
<p>{{$f.1}}</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="upload">
|
<div class="upload">
|
||||||
<button id="upload-{{$type}}"><img id="profile-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait|escape:'html'}}" style="display: none;" /> {{"Upload"|t}}</button>
|
<button id="upload-{{$type}}"><img id="profile-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait|escape:'html'}}" style="display: none;" /> {{"Upload"|t}}</button>
|
||||||
|
|
Loading…
Reference in a new issue