aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-18 16:50:21 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-18 16:50:21 +0000
commitd02c6134835e6b3b0a4e3f84da472f931b25f8a5 (patch)
tree280823947ce9d60793a973e49c59130b5481733e
parent41ee1c61bd216abf72127457f574ca3259ebf947 (diff)
Force min-height to deal with more results in HTML than then come in via AJAX.
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 65c738a8c..b9506c78a 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -10,14 +10,14 @@
* elem2: target element
* offset: this will be added (if present) to the final value, useful for height errors
*/
-function heightFix(elem1, elem2, offset){
+function heightFix(elem1, elem2, offset, force) {
var h1 = $(elem1).height(),
h2 = $(elem2).height();
- if(offset === undefined){
+ if (offset === undefined) {
offset = 0;
}
- if(h1 > h2){
- $(elem2).css({'min-height':h1+offset});
+ if (h1 > h2 || force) {
+ $(elem2).css( { 'min-height': h1+offset } );
}
}
@@ -437,7 +437,7 @@ $.fn.drawer = function(id, ajax) {
if (cobrand == 'bromley') {
offset = -110;
}
- heightFix(window, '.content', offset);
+ heightFix(window, '.content', offset, 1);
// in case we have a map that isn't full screen
map_fix();
}