equal
deleted
inserted
replaced
294 }); |
294 }); |
295 return form; |
295 return form; |
296 } |
296 } |
297 |
297 |
298 /** |
298 /** |
299 * .. function:: loadxhtml(url, form, reqtype='get', mode='replace', cursor=true) |
299 * .. function:: loadxhtml(url, form, reqtype='get', mode='replace', cursor=false) |
300 * |
300 * |
301 * build url given by absolute or relative `url` and `form` parameters |
301 * build url given by absolute or relative `url` and `form` parameters |
302 * (dictionary), fetch it using `reqtype` method, then evaluate the |
302 * (dictionary), fetch it using `reqtype` method, then evaluate the |
303 * returned XHTML and insert it according to `mode` in the |
303 * returned XHTML and insert it according to `mode` in the |
304 * document. Possible modes are : |
304 * document. Possible modes are : |
310 * If `cursor`, turn mouse cursor into 'progress' cursor until the remote call |
310 * If `cursor`, turn mouse cursor into 'progress' cursor until the remote call |
311 * is back. |
311 * is back. |
312 */ |
312 */ |
313 jQuery.fn.loadxhtml = function(url, form, reqtype, mode, cursor) { |
313 jQuery.fn.loadxhtml = function(url, form, reqtype, mode, cursor) { |
314 if (this.size() > 1) { |
314 if (this.size() > 1) { |
315 cw.log('loadxhtml was called with more than one element'); |
315 cw.log('loadxhtml called with more than one element'); |
|
316 } else if (this.size() < 1) { |
|
317 cw.log('loadxhtml called without an element'); |
316 } |
318 } |
317 var callback = null; |
319 var callback = null; |
318 if (form && form.callback) { |
320 if (form && form.callback) { |
319 cw.log('[3.9] callback given through form.callback is deprecated, add ' + 'callback on the defered'); |
321 cw.log('[3.9] callback given through form.callback is deprecated, add ' + 'callback on the defered'); |
320 callback = form.callback; |
322 callback = form.callback; |