Skip to content

Commit

Permalink
Fix Equal Heights usage to work properly
Browse files Browse the repository at this point in the history
- remove useless classes
- limit [div-organize] columns to size/matches control value
- only run .matchHeight() on the first div child
  • Loading branch information
jlav1n committed Oct 11, 2016
1 parent 00eec7a commit cd905a5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/strap/templates/components/cross
Expand Up @@ -77,7 +77,7 @@ buttons:
return;
[/calc]
<h4 class="text-muted">[control name=banner default="[L]See also...[/L]"]</h4>
[div-organize embed=lc pretty=1 cols="12" filler_class="[control cols col-sm-3]" row_attr='class="row equal-height-container"']
[div-organize embed=lc pretty=1 cols="[control size 12]" filler_class="[control cols col-sm-3]" row_attr='class="row equal-height-container"']
[loop random="[scratch random]" list="[strip interpolate=1][scratch cross_codes][/strip]"]
<div class="[control cols col-sm-3]">
<DIV class="thumbnail">
Expand Down
4 changes: 2 additions & 2 deletions dist/strap/templates/components/promo
Expand Up @@ -45,8 +45,8 @@ banner:
| prefix="loop"]
[div-organize embed=lc pretty=1 cols="12" filler_class="[control cols col-sm-3]" row_attr='class="row equal-height-container"']
[list]
<div class="[control cols col-sm-3] equal-height-column">
<DIV class="thumbnail equal-height-column">
<div class="[control cols col-sm-3]">
<DIV class="thumbnail">
<a href="[area [loop-code]]">[image src="thumb/[loop-field thumb]" default="thumb.gif"]</a>
<DIV class="caption text-center">
[if-loop-param blurb_begin]
Expand Down
6 changes: 3 additions & 3 deletions dist/strap/templates/components/random
Expand Up @@ -35,7 +35,7 @@ buttons:
<!-- BEGIN COMPONENT [control component random] -->

<h4 class="text-muted">[control name=banner default="[L]Random Items[/L]"]</h4>
[div-organize embed=lc pretty=1 cols="12" filler_class="[control cols col-sm-3]" row_attr='class="row equal-height-container"']
[div-organize embed=lc pretty=1 cols="[control matches 12]" filler_class="[control cols col-sm-3]" row_attr='class="row equal-height-container"']
[loop
random="[control matches 2]"
search="
Expand All @@ -44,8 +44,8 @@ buttons:
ra=yes
ml=[control pool 1000]
"]
<div class="[control cols col-sm-3] equal-height-column">
<DIV class="thumbnail equal-height-column">
<div class="[control cols col-sm-3]">
<DIV class="thumbnail">
<a href="[area [loop-code]]">[image src="thumb/[loop-field thumb]" default="thumb.gif"]</a>
<DIV class="caption text-center">
<h5><a href="[area [loop-code]]">[loop-description]</a></h5>
Expand Down
2 changes: 1 addition & 1 deletion dist/strap/variables/JS
Expand Up @@ -3,7 +3,7 @@
<script src="[var WWW_DIR]/js/jquery.matchHeight.js"></script>
<script>
$(document).ready(function() {
$('.equal-height-container').matchHeight();
$('.equal-height-container > div').matchHeight();
});
</script>

Expand Down

0 comments on commit cd905a5

Please sign in to comment.