You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by li...@apache.org on 2008/03/03 22:59:31 UTC
svn commit: r633291 - in /incubator/shindig/trunk/javascript/container:
gadgets.js sample6.html
Author: lindner
Date: Mon Mar 3 13:59:29 2008
New Revision: 633291
URL: http://svn.apache.org/viewvc?rev=633291&view=rev
Log:
Cherry pick patches from SHINDIG-2, add title, width, and height params
to gadget object. Add sample usage to sample6.html. Thanks to Martin Webb
Modified:
incubator/shindig/trunk/javascript/container/gadgets.js
incubator/shindig/trunk/javascript/container/sample6.html
Modified: incubator/shindig/trunk/javascript/container/gadgets.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/gadgets.js?rev=633291&r1=633290&r2=633291&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/gadgets.js (original)
+++ incubator/shindig/trunk/javascript/container/gadgets.js Mon Mar 3 13:59:29 2008
@@ -359,6 +359,9 @@
* "secureToken": an encoded token that is passed on the URL hash
* "hashData": Query-string like data that will be added to the
* hash portion of the URL.
+ * "title": the default title to use for the title bar.
+ * "height": height of the gadget
+ * "width": width of the gadget
*/
gadgets.Gadget = function(params) {
this.userPrefs_ = {};
@@ -493,7 +496,10 @@
continuation('<div class="' + this.cssClassGadgetContent + '"><iframe id="' +
iframeId + '" name="' + iframeId + '" class="' + this.cssClassGadget +
'" src="' + this.getIframeUrl() +
- '" frameborder="0" scrolling="no"></iframe></div>');
+ '" frameborder="no" scrolling="no"' +
+ (this.height ? ' height="' + this.height + '"' : '') +
+ (this.width ? ' width="' + this.width + '"' : '') +
+ '></iframe></div>');
};
gadgets.IfrGadget.prototype.getIframeId = function() {
Modified: incubator/shindig/trunk/javascript/container/sample6.html
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/sample6.html?rev=633291&r1=633290&r2=633291&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/sample6.html (original)
+++ incubator/shindig/trunk/javascript/container/sample6.html Mon Mar 3 13:59:29 2008
@@ -14,7 +14,7 @@
gadgets.container.layoutManager =
new gadgets.FloatLeftLayoutManager('gadget-parent');
- var gadget = gadgets.container.createGadget({specUrl: specUrl0});
+ var gadget = gadgets.container.createGadget({specUrl: specUrl0, title: "Dynamic Height Demo", width: 500});
gadgets.container.addGadget(gadget);
};