[js/ajax] undeprecate (async)remoteExec. closes #1381205
--- 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;
+}