fixed a couple layout bugs that didn't appear in integration testing. popcorn-port
authorhamidouk
Thu, 15 Dec 2011 12:02:45 +0100
branchpopcorn-port
changeset 468 651528a4f795
parent 467 79173b75e97c
child 469 154c049e0c06
fixed a couple layout bugs that didn't appear in integration testing.
src/js/layout.js
src/js/widgets/playerWidget.js
--- a/src/js/layout.js	Thu Dec 15 10:45:41 2011 +0100
+++ b/src/js/layout.js	Thu Dec 15 12:02:45 2011 +0100
@@ -55,11 +55,12 @@
     var spacerDiv = Popcorn.guid("LdtPlayer_spacer_");
     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: {{spacer_div_height}};'></div";
+    var divTempl = "<div id='{{id}}' style='width: {{width}}px; position: relative;'></div";
+    var spacerTempl = "<div id='{{spacer_id}}' style='width: {{width}}px; position: relative; height: {{spacer_div_height}};'></div";
     
-    var divCode = Mustache.to_html(divTempl, {id: newDiv});
-    var spacerCode = Mustache.to_html(spacerTempl, {spacer_id: spacerDiv, spacer_div_height: IriSP.widgetsDefaults.LayoutManager.spacer_div_height });
+    var divCode = Mustache.to_html(divTempl, {id: newDiv, width: this._width});
+    var spacerCode = Mustache.to_html(spacerTempl, {spacer_id: spacerDiv, width: this._width,
+                                                    spacer_div_height: IriSP.widgetsDefaults.LayoutManager.spacer_div_height });
 
     this.selector.append(divCode);
     this.selector.append(spacerCode);
--- a/src/js/widgets/playerWidget.js	Thu Dec 15 10:45:41 2011 +0100
+++ b/src/js/widgets/playerWidget.js	Thu Dec 15 12:02:45 2011 +0100
@@ -15,9 +15,7 @@
 	  
 	var Player_templ = Mustache.to_html(IriSP.player_template, {"share_template" : IriSP.share_template});
   this.selector.append(Player_templ);		
-    
-	this.selector.children(".Ldt-controler").width(width - 10);
-	  		
+	
   this.selector.children(".Ldt-controler").show();
     
   // handle clicks by the user on the video.