Author: jmorliaguet
Date: Fri Feb 10 21:26:56 2006
New Revision: 2340

Modified:
   cpsskins/branches/jmo-perspectives/ui/framework/ctal.js
Log:

- fixed the declaration of local variables



Modified: cpsskins/branches/jmo-perspectives/ui/framework/ctal.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/ctal.js     (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/ctal.js     Fri Feb 10 
21:26:56 2006
@@ -43,7 +43,7 @@
     // decide if we are a DomNode or a DomNodeList
     if (typeof value.nodeName == "undefined") {
       // a DomNodeList
-      for (i=0; i<value.length; i++) {
+      for (var i=0; i<value.length; i++) {
         nodes[i] = value[i];
       }
     } else {
@@ -91,14 +91,15 @@
 ctal.content_or_replace  = function(tmpl, expr, data, func) {
   var expr = expr.split(' ').join(' ');
   var colpos = expr.indexOf(' ')
+  var qual;
   if (colpos > -1) {
-    var qual = expr.substring(0, colpos);
+    qual = expr.substring(0, colpos);
     qual = qual.split(' ').join(' ');
   }
   if (colpos > -1 && qual.indexOf(':') == -1) {
     var value = expr.substring(colpos + 1);
   } else {
-    var qual = null;
+    qual = null;
     var value = expr;
   }
   if (qual == 'dom') {
@@ -163,7 +164,7 @@
 ctal.process_ctal = function(tmpl, data) {
   var recurse = true;
   if (tmpl.nodeType == 1) {
-    for (i=0; i<tmpl.attributes.length; i++) {
+    for (var i=0; i<tmpl.attributes.length; i++) {
       var attrnode = tmpl.attributes.item(i);
       var splitname = attrnode.nodeName.split(':');
       if (splitname.length == 2 && splitname[0] == 'ctal') {
@@ -203,14 +204,15 @@
 /* expression handling */
 
 ctal.eval_expr = function(data, expr) {
-  colpos = expr.indexOf(':')
+  var colpos = expr.indexOf(':')
+  var etype, value;
   if (colpos > -1) {
-    var etype = expr.substring(0, colpos);
+    etype = expr.substring(0, colpos);
     etype = etype.split(' ').join(' ');
-    var value = expr.substring(colpos + 1);
+    value = expr.substring(colpos + 1);
   } else {
-    var etype = 'path';
-    var value = expr;
+    etype = 'path';
+    value = expr;
   }
   if (etype == 'string') {
     return value
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to