[web] There is no global noop(), use jQuery's instead (closes #4487832)
authorRémi Cardona <remi.cardona@logilab.fr>
Wed, 15 Oct 2014 17:29:29 +0200
changeset 10027 292c81246347
parent 10026 621646d5f010
child 10028 326fbc5c92b0
[web] There is no global noop(), use jQuery's instead (closes #4487832)
web/data/cubicweb.preferences.js
web/data/cubicweb.widgets.js
--- a/web/data/cubicweb.preferences.js	Fri Oct 10 09:18:28 2014 +0200
+++ b/web/data/cubicweb.preferences.js	Wed Oct 15 17:29:29 2014 +0200
@@ -25,7 +25,7 @@
 function _toggleFieldset(fieldsetid, closeaction, linklabel, linkhref) {
     jQuery('#' + fieldsetid).find('div.openlink').each(function() {
         var link = A({
-            'href': "javascript:noop();",
+            'href': "javascript:$.noop();",
             'onclick': linkhref
         },
         linklabel);
--- a/web/data/cubicweb.widgets.js	Fri Oct 10 09:18:28 2014 +0200
+++ b/web/data/cubicweb.widgets.js	Wed Oct 15 17:29:29 2014 +0200
@@ -355,7 +355,7 @@
 Widgets.SuggestForm = defclass("SuggestForm", null, {
 
     __init__: function(inputid, initfunc, varargs, validatefunc, options) {
-        this.validatefunc = validatefunc || noop;
+        this.validatefunc = validatefunc || $.noop;
         this.sgfield = new Widgets.BaseSuggestField(inputid, initfunc, varargs, options);
         this.oklabel = options.oklabel || 'ok';
         this.cancellabel = options.cancellabel || 'cancel';
@@ -369,11 +369,11 @@
             'class': "sgformbuttons"
         },
         [A({
-            'href': "javascript: noop();",
+            'href': "javascript: $.noop();",
             'onclick': this.onValidateClicked
         },
         this.oklabel), ' / ', A({
-            'href': "javascript: noop();",
+            'href': "javascript: $.noop();",
             'onclick': this.destroy
         },
         escapeHTML(this.cancellabel))]);