[js/ajax] undeprecate (async)remoteExec. closes #1381205 stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 24 May 2011 08:56:55 +0200
branchstable
changeset 7422 9948cdd21b36
parent 7421 5115daeeb2ff
child 7424 2c72bfbbf1a3
[js/ajax] undeprecate (async)remoteExec. closes #1381205
web/data/cubicweb.ajax.js
--- a/web/data/cubicweb.ajax.js	Tue May 24 08:49:58 2011 +0200
+++ b/web/data/cubicweb.ajax.js	Tue May 24 08:56:55 2011 +0200
@@ -700,43 +700,37 @@
     }
 );
 
-remoteExec = cw.utils.deprecatedFunction(
-    '[3.9] remoteExec() is deprecated, use loadRemote instead',
-    function(fname /* ... */) {
-        setProgressCursor();
-        var props = {
-            fname: fname,
-            pageid: pageid,
-            arg: $.map(cw.utils.sliceList(arguments, 1), jQuery.toJSON)
-        };
-        var result = jQuery.ajax({
-            url: JSON_BASE_URL,
-            data: props,
-            async: false,
-            traditional: true
-        }).responseText;
-        if (result) {
-            result = cw.evalJSON(result);
-        }
-        resetCursor();
-        return result;
+function remoteExec(fname /* ... */) {
+    setProgressCursor();
+    var props = {
+        fname: fname,
+        pageid: pageid,
+        arg: $.map(cw.utils.sliceList(arguments, 1), jQuery.toJSON)
+    };
+    var result = jQuery.ajax({
+        url: JSON_BASE_URL,
+        data: props,
+        async: false,
+        traditional: true
+    }).responseText;
+    if (result) {
+        result = cw.evalJSON(result);
     }
-);
+    resetCursor();
+    return result;
+}
 
-asyncRemoteExec = cw.utils.deprecatedFunction(
-    '[3.9] asyncRemoteExec() is deprecated, use loadRemote instead',
-    function(fname /* ... */) {
-        setProgressCursor();
-        var props = {
-            fname: fname,
-            pageid: pageid,
-            arg: $.map(cw.utils.sliceList(arguments, 1), jQuery.toJSON)
-        };
-        // XXX we should inline the content of loadRemote here
-        var deferred = loadRemote(JSON_BASE_URL, props, 'POST');
-        deferred = deferred.addErrback(remoteCallFailed);
-        deferred = deferred.addErrback(resetCursor);
-        deferred = deferred.addCallback(resetCursor);
-        return deferred;
-    }
-);
+function asyncRemoteExec(fname /* ... */) {
+    setProgressCursor();
+    var props = {
+        fname: fname,
+        pageid: pageid,
+        arg: $.map(cw.utils.sliceList(arguments, 1), jQuery.toJSON)
+    };
+    // XXX we should inline the content of loadRemote here
+    var deferred = loadRemote(JSON_BASE_URL, props, 'POST');
+    deferred = deferred.addErrback(remoteCallFailed);
+    deferred = deferred.addErrback(resetCursor);
+    deferred = deferred.addCallback(resetCursor);
+    return deferred;
+}