equal
deleted
inserted
replaced
64 } |
64 } |
65 loadDynamicFragments(node); |
65 loadDynamicFragments(node); |
66 jQuery(CubicWeb).trigger('ajax-loaded'); |
66 jQuery(CubicWeb).trigger('ajax-loaded'); |
67 } |
67 } |
68 |
68 |
69 // cubicweb loadxhtml plugin to make jquery handle xhtml response |
69 /* cubicweb loadxhtml plugin to make jquery handle xhtml response |
|
70 * |
|
71 * fetches `url` and replaces this's content with the result |
|
72 * |
|
73 * @param mode how the replacement should be done (default is 'replace') |
|
74 * Possible values are : |
|
75 * - 'replace' to replace the node's content with the generated HTML |
|
76 * - 'swap' to replace the node itself with the generated HTML |
|
77 * - 'append' to append the generated HTML to the node's content |
|
78 */ |
70 jQuery.fn.loadxhtml = function(url, data, reqtype, mode) { |
79 jQuery.fn.loadxhtml = function(url, data, reqtype, mode) { |
71 var ajax = null; |
80 var ajax = null; |
72 if (reqtype == 'post') { |
81 if (reqtype == 'post') { |
73 ajax = jQuery.post; |
82 ajax = jQuery.post; |
74 } else { |
83 } else { |
321 } else { |
330 } else { |
322 log('Node', nodeId, 'not found'); |
331 log('Node', nodeId, 'not found'); |
323 } |
332 } |
324 } |
333 } |
325 |
334 |
326 /* |
335 /* XXX deprecates? |
327 * fetches `url` and replaces `nodeid`'s content with the result |
336 * fetches `url` and replaces `nodeid`'s content with the result |
328 * @param replacemode how the replacement should be done (default is 'replace') |
337 * @param replacemode how the replacement should be done (default is 'replace') |
329 * Possible values are : |
338 * Possible values are : |
330 * - 'replace' to replace the node's content with the generated HTML |
339 * - 'replace' to replace the node's content with the generated HTML |
331 * - 'swap' to replace the node itself with the generated HTML |
340 * - 'swap' to replace the node itself with the generated HTML |