# HG changeset patch # User Aurelien Campeas # Date 1306220215 -7200 # Node ID 9948cdd21b360d205a7c2be7cc672b27e74f778f # Parent 5115daeeb2ffd2878a121ea704e4f07b6b450c9b [js/ajax] undeprecate (async)remoteExec. closes #1381205 diff -r 5115daeeb2ff -r 9948cdd21b36 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; +}