made the spacer height configurable. set to 0 by default.
--- a/src/js/layout.js Mon Nov 21 11:34:07 2011 +0100
+++ b/src/js/layout.js Mon Nov 21 11:46:29 2011 +0100
@@ -52,10 +52,10 @@
this._widgets.push(newDiv);
var divTempl = "<div id='{{id}}' style='width: 100%; position: relative;'></div";
- var spacerTempl = "<div id='{{spacer_id}}' style='width: 100%; position: relative; height: 5px;'></div";
+ var spacerTempl = "<div id='{{spacer_id}}' style='width: 100%; position: relative; height: {{spacer_div_height}};'></div";
var divCode = Mustache.to_html(divTempl, {id: newDiv});
- var spacerCode = Mustache.to_html(spacerTempl, {spacer_id: spacerDiv});
+ var spacerCode = Mustache.to_html(spacerTempl, {spacer_id: spacerDiv, spacer_div_height: IriSP.widgetsDefaults.LayoutManager.spacer_div_height });
this.selector.append(spacerCode);
this.selector.append(divCode);
--- a/src/js/site.js Mon Nov 21 11:34:07 2011 +0100
+++ b/src/js/site.js Mon Nov 21 11:46:29 2011 +0100
@@ -19,6 +19,7 @@
IriSP.config = undefined;
IriSP.widgetsDefaults = {
+ "LayoutManager" : {spacer_div_height : "0px" },
"PlayerWidget" : {},
"AnnotationsWidget": {},
"TweetsWidget" : {
--- a/unittests/tests/layout.js Mon Nov 21 11:34:07 2011 +0100
+++ b/unittests/tests/layout.js Mon Nov 21 11:46:29 2011 +0100
@@ -33,6 +33,7 @@
equal(lay.selector.children("#" + divId).length, 1, "check that a subdiv container is created");
equal(lay.selector.children("#" + spacerId).length, 1, "check that a spacer subdiv is created");
+ equal(lay.selector.children("#" + spacerId).height() + "px", IriSP.widgetsDefaults.LayoutManager.spacer_div_height, "check that spacer height is set");
});