[jquery] className doesn't exist anymore in 1.4
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 19 Oct 2010 13:13:13 +0200
changeset 6544 e0d20fb46389
parent 6543 66145280a7e6
child 6545 5cea387a5667
[jquery] className doesn't exist anymore in 1.4
web/data/cubicweb.compat.js
web/data/cubicweb.edition.js
--- a/web/data/cubicweb.compat.js	Tue Oct 19 12:01:35 2010 +0200
+++ b/web/data/cubicweb.compat.js	Tue Oct 19 13:13:13 2010 +0200
@@ -80,9 +80,9 @@
 );
 
 hasElementClass = cw.utils.deprecatedFunction(
-    '[3.9] hasElementClass(node, cls) is depcreated, use $.className.has(node, cls)',
+    '[3.9] hasElementClass(node, cls) is deprecated, use $(node).hasClass(cls)',
     function(node, klass) {
-        return $.className.has(node, klass);
+        return $(node).hasClass(klass);
     }
 );
 
--- a/web/data/cubicweb.edition.js	Tue Oct 19 12:01:35 2010 +0200
+++ b/web/data/cubicweb.edition.js	Tue Oct 19 13:13:13 2010 +0200
@@ -265,7 +265,7 @@
  */
 function togglePendingDelete(nodeId, eid) {
     // node found means we should cancel deletion
-    if (jQuery.className.has(cw.getNode('span' + nodeId), 'pendingDelete')) {
+    if (jQuery(cw.getNode('span' + nodeId)).hasClass('pendingDelete')) {
         cancelPendingDelete(nodeId, eid);
     } else {
         addPendingDelete(nodeId, eid);