Author: jmorliaguet
Date: Sat Jan  7 00:32:50 2006
New Revision: 2171

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

- fixed stupid bug



Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Sat Jan  7 
00:32:50 2006
@@ -250,9 +250,8 @@
       var type = node.nodeType;
       if (type == 1) return null;
       if (type == 8) {
-        var comment = node.nodeValue;
-        if (comment && comment.match(this.json_regexp)) {
-          return comment;
+        if (node && node.nodeValue.match(this.json_regexp)) {
+          return node;
         }
       }
     }
@@ -262,7 +261,7 @@
   getNodeData: function(element) {
     var comment = this._getCommentNode(element);
     if (comment) {
-      comment = comment.replace(this.json_regexp, "");
+      comment = comment.nodeValue.replace(this.json_regexp, "");
       try {
         return JSON.parse(comment);
       } catch(e) {
@@ -278,7 +277,7 @@
     comment = document.createComment(comment);
     var old = this._getCommentNode(element);
     if (old) {
-      //node.parentNode.removeChild(old);
+      node.parentNode.removeChild(old);
     }
     node.parentNode.insertBefore(comment, node);
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to