equal
deleted
inserted
replaced
213 }); |
213 }); |
214 return form; |
214 return form; |
215 } |
215 } |
216 |
216 |
217 /** |
217 /** |
218 * .. function:: loadxhtml(url, form, reqtype='get', mode='replace', cursor=true) |
218 * .. function:: loadxhtml(url, form, reqtype='get', mode='replace', cursor=false) |
219 * |
219 * |
220 * build url given by absolute or relative `url` and `form` parameters |
220 * build url given by absolute or relative `url` and `form` parameters |
221 * (dictionary), fetch it using `reqtype` method, then evaluate the |
221 * (dictionary), fetch it using `reqtype` method, then evaluate the |
222 * returned XHTML and insert it according to `mode` in the |
222 * returned XHTML and insert it according to `mode` in the |
223 * document. Possible modes are : |
223 * document. Possible modes are : |
229 * If `cursor`, turn mouse cursor into 'progress' cursor until the remote call |
229 * If `cursor`, turn mouse cursor into 'progress' cursor until the remote call |
230 * is back. |
230 * is back. |
231 */ |
231 */ |
232 jQuery.fn.loadxhtml = function(url, form, reqtype, mode, cursor) { |
232 jQuery.fn.loadxhtml = function(url, form, reqtype, mode, cursor) { |
233 if (this.size() > 1) { |
233 if (this.size() > 1) { |
234 cw.log('loadxhtml was called with more than one element'); |
234 cw.log('loadxhtml called with more than one element'); |
|
235 } else if (this.size() < 1) { |
|
236 cw.log('loadxhtml called without an element'); |
235 } |
237 } |
236 var callback = null; |
238 var callback = null; |
237 if (form && form.callback) { |
239 if (form && form.callback) { |
238 cw.log('[3.9] callback given through form.callback is deprecated, add ' + 'callback on the defered'); |
240 cw.log('[3.9] callback given through form.callback is deprecated, add ' + 'callback on the defered'); |
239 callback = form.callback; |
241 callback = form.callback; |