You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mc...@apache.org on 2011/04/22 20:22:13 UTC

svn commit: r1095977 - /myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PanelPopup.js

Author: mcooper
Date: Fri Apr 22 18:22:12 2011
New Revision: 1095977

URL: http://svn.apache.org/viewvc?rev=1095977&view=rev
Log:
Use good practice of explicitly specifying a radix for the parseInt function so it doesn't accidentally get interpreted as hex (string starting with 0x or -0x) or octal (string starting with 0 or -0).

Modified:
    myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PanelPopup.js

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PanelPopup.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PanelPopup.js?rev=1095977&r1=1095976&r2=1095977&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PanelPopup.js (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/PanelPopup.js Fri Apr 22 18:22:12 2011
@@ -185,7 +185,7 @@ TrPanelPopup.prototype.setModal = functi
  **/
 TrPanelPopup.prototype.setRelativeOffsetX = function(x)
 {
-  this._relativeOffsetX = parseInt(x);
+  this._relativeOffsetX = parseInt(x, 10);
 }
 
 /**
@@ -203,7 +203,7 @@ TrPanelPopup.prototype.getRelativeOffset
  **/
 TrPanelPopup.prototype.setRelativeOffsetY = function(y)
 {
-  this._relativeOffsetY = parseInt(y);
+  this._relativeOffsetY = parseInt(y, 10);
 }
 
 /**
@@ -320,13 +320,13 @@ TrPanelPopup.prototype.setSize = functio
 {
   if (width)
   {
-    var i = parseInt(width);
+    var i = parseInt(width, 10);
     if (i > 0)
       this.getContent().style.width = i + "px";
   }
   if (height)
   {
-    var i = parseInt(height);
+    var i = parseInt(height, 10);
     if (i > 0)
       this.getContent().style.height = i + "px";
   }
@@ -609,7 +609,7 @@ TrPanelPopup.prototype._getSideOffset = 
   for (var i = 0; i < arr.length; ++i)
   {
     var o = TrUIUtils._getStyle(elem, arr[i] + side);
-    o = parseInt(o);
+    o = parseInt(o, 10);
     if (!isNaN(o))
     {
       val += o;