File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed
Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 1717 < div class ="panel-body ">
1818 @if(!dataset.thumbnail_id.isEmpty){
1919 < a href ="@(routes.Datasets.dataset(dataset.id,space)) ">
20- < img class ="img-responsive fit-in-space " src ="@(routes.Files.thumbnail(UUID(dataset.thumbnail_id.toString().substring(5,dataset.thumbnail_id.toString().length-1)))) " alt ="Thumbnail of @Html(dataset.name) ">
20+ < img class ="img-responsive fit-in-space tiled-image " src ="@(routes.Files.thumbnail(UUID(dataset.thumbnail_id.toString().substring(5,dataset.thumbnail_id.toString().length-1)))) " alt ="Thumbnail of @Html(dataset.name) ">
2121 </ a >
2222 }
2323 < div class ="caption break-word ">
Original file line number Diff line number Diff line change @@ -128,18 +128,21 @@ <h3>@Messages("collections.title")</h3>
128128 < script >
129129 function activateOne ( id ) {
130130 // initialize Masonry
131- var items = $ ( "#" + id ) ;
132- if ( items . length ) {
133- var $container = $ ( "#" + id ) . masonry ( ) ;
134- // layout Masonry again after all images have loaded
135- imagesLoaded ( '#masonry' , function ( ) {
136- $container . masonry ( {
137- itemSelector : '.post-box' ,
138- columnWidth : '.post-box' ,
139- transitionDuration : 4
140- } ) ;
141- } ) ;
131+ var match = $ ( "#" + id ) ;
132+ if ( ! match ) {
133+ return ;
142134 }
135+
136+ match . masonry ( ) ;
137+
138+ // layout Masonry again after all images have loaded
139+ imagesLoaded ( '.tiled-image' , function ( ) {
140+ match . masonry ( {
141+ itemSelector : '.tiled-image' ,
142+ columnWidth : '.tiled-image' ,
143+ transitionDuration : 4
144+ } ) ;
145+ } ) ;
143146 }
144147
145148 function activate ( ) {
You can’t perform that action at this time.
0 commit comments