You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by do...@apache.org on 2008/03/27 12:35:39 UTC

svn commit: r641787 - in /incubator/shindig/trunk: features/core/json.js features/core/legacy.js javascript/container/gadgets.js

Author: doll
Date: Thu Mar 27 04:35:33 2008
New Revision: 641787

URL: http://svn.apache.org/viewvc?rev=641787&view=rev
Log:
Made some small js changes to be more compatible with js compilers. 
Also moved the JSON definition into the legacy.js file where it really belongs.


Modified:
    incubator/shindig/trunk/features/core/json.js
    incubator/shindig/trunk/features/core/legacy.js
    incubator/shindig/trunk/javascript/container/gadgets.js

Modified: incubator/shindig/trunk/features/core/json.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/core/json.js?rev=641787&r1=641786&r2=641787&view=diff
==============================================================================
--- incubator/shindig/trunk/features/core/json.js (original)
+++ incubator/shindig/trunk/features/core/json.js Thu Mar 27 04:35:33 2008
@@ -165,5 +165,3 @@
   };
 }();
 
-var JSON = gadgets.json;
-

Modified: incubator/shindig/trunk/features/core/legacy.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/core/legacy.js?rev=641787&r1=641786&r2=641787&view=diff
==============================================================================
--- incubator/shindig/trunk/features/core/legacy.js (original)
+++ incubator/shindig/trunk/features/core/legacy.js Thu Mar 27 04:35:33 2008
@@ -20,6 +20,7 @@
  // All functions in this file should be treated as deprecated legacy routines.
  // Gadget authors are explicitly discouraged from using any of them.
 
+var JSON = gadgets.json;
 var _IG_Prefs = gadgets.Prefs;
 
 // Yes, these technically modifiy gadget.Prefs as well. Unfortunately,

Modified: incubator/shindig/trunk/javascript/container/gadgets.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/container/gadgets.js?rev=641787&r1=641786&r2=641787&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/container/gadgets.js (original)
+++ incubator/shindig/trunk/javascript/container/gadgets.js Thu Mar 27 04:35:33 2008
@@ -543,7 +543,8 @@
     this.showUserPrefsDialog();
   } else {
     var gadget = this;
-    window['ig_callback_' + this.id] = function(userPrefsDialogContent) {
+    var igCallbackName = 'ig_callback_' + this.id;
+    window[igCallbackName] = function(userPrefsDialogContent) {
       gadget.userPrefsDialogContentLoaded = true;
       gadget.buildUserPrefsDialog(userPrefsDialogContent);
       gadget.showUserPrefsDialog();
@@ -566,9 +567,10 @@
   userPrefsDialog.childNodes[0].style.display = '';
 };
 
-gadgets.IfrGadget.prototype.showUserPrefsDialog = function(show) {
+gadgets.IfrGadget.prototype.showUserPrefsDialog = function(opt_show) {
   var userPrefsDialog = document.getElementById(this.getUserPrefsDialogId());
-  userPrefsDialog.style.display = (show || show == undefined) ? '' : 'none';
+  userPrefsDialog.style.display = (opt_show || opt_show == undefined)
+      ? '' : 'none';
 }
 
 gadgets.IfrGadget.prototype.hideUserPrefsDialog = function() {