Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
adjust template and style to allow thumbnail rows to justify
Browse files Browse the repository at this point in the history
  • Loading branch information
swilliams committed Nov 15, 2014
1 parent 07b7a47 commit 6971a97
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
7 changes: 4 additions & 3 deletions js/repeater-thumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// -- BEGIN UMD WRAPPER PREFACE --

// For more information on UMD visit:
// For more information on UMD visit:
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js

(function (factory) {
Expand Down Expand Up @@ -90,7 +90,8 @@
thumbnail_infiniteScroll: false,
thumbnail_itemRendered: null,
thumbnail_selectable: false,
thumbnail_template: '<div class="thumbnail repeater-thumbnail"><img height="75" src="{{src}}" width="65"><span>{{name}}</span></div>'
// span space required for justified rows
thumbnail_template: '<div class="thumbnail repeater-thumbnail"><img height="75" src="{{src}}" width="65"><span>{{name}}</span></div><span>&nbsp;</span>'
});

//EXTENSION DEFINITION
Expand Down Expand Up @@ -203,4 +204,4 @@

// -- BEGIN UMD WRAPPER AFTERWORD --
}));
// -- END UMD WRAPPER AFTERWORD --
// -- END UMD WRAPPER AFTERWORD --
18 changes: 16 additions & 2 deletions less/repeater-thumbnail.less
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
.repeater-thumbnail {
border: 1px solid #ddd;
color: #666;
float: left;
display: inline-block;
min-height: 110px;
min-width: 100px;
margin: 8px 7px;
text-align: center;

&:after {
content: ' ';
}

&.selectable {
&:hover {
background: #d9edf7;
Expand Down Expand Up @@ -35,10 +39,20 @@
padding: 6px;
width: 100%;

position: relative;
text-align: justify;
text-size: 0.1px;

&:after {
display: inline-block;
width: 100%;
content: '';
}

div.empty {
font-style: italic;
padding: 20px 10px;
text-align: center;
}
}
}
}

0 comments on commit 6971a97

Please sign in to comment.