src/js/layout.js
branchpopcorn-port
changeset 840 ac66e2240e1e
parent 542 b33516ab03e8
child 842 4ae2247a59f4
equal deleted inserted replaced
839:4357aac4eb19 840:ac66e2240e1e
    28     } 
    28     } 
    29     
    29     
    30     /* this is a shortcut */
    30     /* this is a shortcut */
    31     this.selector = IriSP.jQuery("#" + this._div);
    31     this.selector = IriSP.jQuery("#" + this._div);
    32     
    32     
    33     this.selector.css("width", this._width);
    33     this.selector.css({
       
    34         "width": this._width,
       
    35         "clear": "both"
       
    36     });
    34     
    37     
    35     if (this._height !== undefined)
    38     if (this._height !== undefined)
    36       this.selector.css("height", this._height);
    39       this.selector.css("height", this._height);
    37 };
    40 };
    38 
    41 
    58 
    61 
    59     var newDiv = IriSP.guid(this._div + "_widget_" + widgetName + "_");
    62     var newDiv = IriSP.guid(this._div + "_widget_" + widgetName + "_");
    60     var spacerDiv = IriSP.guid("LdtPlayer_spacer_");
    63     var spacerDiv = IriSP.guid("LdtPlayer_spacer_");
    61     this._widgets.push([widgetName, newDiv]);    
    64     this._widgets.push([widgetName, newDiv]);    
    62 
    65 
    63     var divTempl = "<div id='{{id}}' style='width: {{width}}px; position: relative;'></div";
    66     var divTempl = "<div id='{{id}}' style='width: {{width}}px; position: relative; clear: both;'></div";
    64     var spacerTempl = "<div id='{{spacer_id}}' style='width: {{width}}px; position: relative; height: {{spacer_div_height}};'></div";
    67     var spacerTempl = "<div id='{{spacer_id}}' style='width: {{width}}px; position: relative; height: {{spacer_div_height}};'></div";
    65     
    68     
    66     var divCode = Mustache.to_html(divTempl, {id: newDiv, width: this._width});
    69     var divCode = Mustache.to_html(divTempl, {id: newDiv, width: this._width});
    67     var spacerCode = Mustache.to_html(spacerTempl, {spacer_id: spacerDiv, width: this._width,
    70     var spacerCode = Mustache.to_html(spacerTempl, {spacer_id: spacerDiv, width: this._width,
    68                                                     spacer_div_height: IriSP.widgetsDefaults.LayoutManager.spacer_div_height });
    71                                                     spacer_div_height: IriSP.widgetsDefaults.LayoutManager.spacer_div_height });