Macro Widgets now take a style, defaulting to the users.

This commit is contained in:
Kaleb Murphy 2009-01-23 19:50:49 +00:00
parent 0c91491ed0
commit d8127aec73
3 changed files with 29 additions and 13 deletions

View file

@ -30,7 +30,7 @@ WebGUI.widgetBox = {
return widgetFrame;
},
widget : function( url, parentId, width, height, templateId ) {
widget : function( url, parentId, width, height, templateId, styleTemplateId ) {
if(url == "") {
return "<iframe scrolling='no'><body>No content available from "+url+"</body></iframe>";
}
@ -49,6 +49,7 @@ WebGUI.widgetBox = {
this.url = url + "?func=widgetView&templateId=" + templateId;
this.url += ";width=" + width;
this.url += ";height=" + height;
this.url += ";styleTemplateId=" + styleTemplateId;
}
this.parentNodeId = parentId;
@ -111,7 +112,7 @@ WebGUI.widgetBox = {
var jsCode = "";
jsCode += "&lt;script type='text/javascript' src='" + params.wgWidgetPath + "'&gt; &lt;/script&gt;";
jsCode += "&lt;script type='text/javascript'&gt;";
jsCode += "document.write(WebGUI.widgetBox.widget('" + params.fullUrl + "', '" + params.assetId + "', " + params.width + ", " + params.height + ", '" + params.templateId + "')); &lt;/script&gt;";
jsCode += "document.write(WebGUI.widgetBox.widget('" + params.fullUrl + "', '" + params.assetId + "', " + params.width + ", " + params.height + ", '" + params.templateId + "', '" + params.styleTemplateId + "')); &lt;/script&gt;";
// Instantiate the Dialog
codeGeneratorButton = new YAHOO.widget.SimpleDialog("codeGeneratorButton", {