dummy ultra minimalist implementation of deferred for jQuery
inspect dom response (as returned by getDomFromResponse), search for a <div class=”ajaxHtmlHead”> node and put its content into the real document’s head. This enables dynamic css and js loading and is used by replacePageChunk
extend form parameters to call the js_`fname` function of the json controller with args arguments.
build url given by absolute or relative url and form parameters (dictionary), fetch it using reqtype method, then evaluate the returned XHTML and insert it according to mode in the document. Possible modes are :
- ‘replace’ to replace the node’s content with the generated HTML
- ‘swap’ to replace the node itself with the generated HTML
- ‘append’ to append the generated HTML to the node’s content
If cursor, turn mouse cursor into ‘progress’ cursor until the remote call is back.
Asynchronously (unless async argument is set to false) load an url or path and return a deferred whose callbacks args are decoded according to the Content-Type response header. form should be additional form params dictionary, reqtype the HTTP request type (get ‘GET’ or ‘POST’).
emulation of gettext’s _ shortcut
finds each dynamic fragment in the page and executes the the associated RQL to build them (Async call)
unregisters the python function registered on the server’s side while the page was generated.
XXX: this function should go in edition.js but as for now, htmlReplace references it.
replace all textareas with fckeditors.
takes a list of DOM nodes and removes all empty text nodes
convenience function that returns a DOM node based on req’s result. XXX clarify the need to clone