For the hi5 container we want to surface the country, language and our authtoken parameters to the app developer. The current views.js code doesn't allow for this via the init() method. Here's a change that implements that:
Index: features/views/views.js =================================================================== --- features/views/views.js (revision 619718) +++ features/views/views.js (working copy) @@ -28,7 +28,6 @@ * http://code.google.com/apis/gadgets/docs/reference/gadgets.views.html */ gadgets.views = function() { - /** * Reference to the current view object. */ @@ -79,8 +78,9 @@ * TODO: Use unified configuration when it becomes available. * @param {Map<String, Boolean>} supported The views you support, * where keys = name of the view and values = isOnlyVisible + * @param opt_p extra parameters you want */ - init : function(supported) { + init : function(supported, opt_p) { if (typeof supported["default"] === "undefined") { throw new Error("default view required!"); } @@ -98,6 +98,10 @@ params = tmpParams; } } + // Pull in extra params + for (var i in opt_p) { + params[i] = opt_p[i]; + } currentView = supportedViews[urlParams.view] || supportedViews["default"]; } }; @@ -118,4 +122,4 @@ gadgets.views.ViewType = gadgets.util.makeEnum([ "FULL_PAGE", "DASHBOARD", "POPUP" -]); \ No newline at end of file +]); -- Paul Lindner hi5 Architect [EMAIL PROTECTED]
pgp6gx7jHttiP.pgp
Description: PGP signature

