shindig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddum...@apache.org
Subject svn commit: r1211478 - /shindig/trunk/features/src/main/javascript/features/open-views/viewenhancements-container.js
Date Wed, 07 Dec 2011 15:42:14 GMT
Author: ddumont
Date: Wed Dec  7 15:42:14 2011
New Revision: 1211478

URL: http://svn.apache.org/viewvc?rev=1211478&view=rev
Log:
Support passing null or nothing to gadgets.views.close in support of explicit spec language
and suggested intent

Modified:
    shindig/trunk/features/src/main/javascript/features/open-views/viewenhancements-container.js

Modified: shindig/trunk/features/src/main/javascript/features/open-views/viewenhancements-container.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/open-views/viewenhancements-container.js?rev=1211478&r1=1211477&r2=1211478&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/open-views/viewenhancements-container.js
(original)
+++ shindig/trunk/features/src/main/javascript/features/open-views/viewenhancements-container.js
Wed Dec  7 15:42:14 2011
@@ -253,12 +253,13 @@
    *
    * @param {Object=}
    *          opt_site: Optional parameter which specifies what site to close.
-   *          If null it will close the current gadget site.
+   *          If not provided or null, it will close the current gadget site.
    */
   function close(opt_site) {
     // opt_site may be 0, do not do a truthy test on the value.
     var orig_site = context.getGadgetSiteByIframeId_(this.f),
-        site = typeof(opt_site) != 'undefined' ? context.getSiteById(opt_site) : orig_site;
+        site = typeof(opt_site) != 'undefined' && opt_site != null ? 
+          context.getSiteById(opt_site) : orig_site;
 
     if (!site) {
       return;



Mime
View raw message