# HG changeset patch # User hamidouk # Date 1322064929 -3600 # Node ID 4466bf448426b4907ed9f6b188e9c07c449dc9cf # Parent da3eafabe9cea1a3efe4aa97b86e24771ed0e6a5 updated layout and init to give more meaningful names to the widgets divs. diff -r da3eafabe9ce -r 4466bf448426 src/js/init.js --- a/src/js/init.js Wed Nov 23 15:49:51 2011 +0100 +++ b/src/js/init.js Wed Nov 23 17:15:29 2011 +0100 @@ -67,7 +67,7 @@ IriSP.instantiateWidget = function(popcornInstance, serialFactory, layoutManager, widgetConfig) { /* create div returns us a container for the widget and a spacer */ - var ret = layoutManager.createDiv(); + var ret = layoutManager.createDiv(widgetConfig.type); var container = ret[0]; var spacer = ret[1]; diff -r da3eafabe9ce -r 4466bf448426 src/js/layout.js --- a/src/js/layout.js Wed Nov 23 15:49:51 2011 +0100 +++ b/src/js/layout.js Wed Nov 23 17:15:29 2011 +0100 @@ -46,9 +46,13 @@ this._Popcorn = popcorn; } -IriSP.LayoutManager.prototype.createDiv = function() { - var newDiv = Popcorn.guid(this._div + "_widget_"); - var spacerDiv = Popcorn.guid("_spacer_"); +/* stem is a string to append to the id of the widget */ +IriSP.LayoutManager.prototype.createDiv = function(stem) { + if (typeof(stem) === "undefined") + stem = ""; + + var newDiv = Popcorn.guid(this._div + "_widget_" + stem + "_"); + var spacerDiv = Popcorn.guid("LdtPlayer_spacer_"); this._widgets.push(newDiv); var divTempl = "