606 ajaxArgs = ajaxArgs.concat(cw.utils.sliceList(arguments, 4)); |
606 ajaxArgs = ajaxArgs.concat(cw.utils.sliceList(arguments, 4)); |
607 var params = ajaxFuncArgs.apply(null, ajaxArgs); |
607 var params = ajaxFuncArgs.apply(null, ajaxArgs); |
608 $('#'+domid).loadxhtml('json', params, null, 'swap'); |
608 $('#'+domid).loadxhtml('json', params, null, 'swap'); |
609 } |
609 } |
610 |
610 |
|
611 /* ajax tabs ******************************************************************/ |
|
612 |
|
613 function setTab(tabname, cookiename) { |
|
614 // set appropriate cookie |
|
615 loadRemote('json', ajaxFuncArgs('set_cookie', null, cookiename, tabname)); |
|
616 // trigger show + tabname event |
|
617 triggerLoad(tabname); |
|
618 } |
|
619 |
|
620 function loadNow(eltsel, holesel, reloadable) { |
|
621 var lazydiv = jQuery(eltsel); |
|
622 var hole = lazydiv.children(holesel); |
|
623 if ((hole.length == 0) && ! reloadable) { |
|
624 /* the hole is already filed */ |
|
625 return; |
|
626 } |
|
627 lazydiv.loadxhtml(lazydiv.attr('cubicweb:loadurl'), {'pageid': pageid}); |
|
628 } |
|
629 |
|
630 function triggerLoad(divid) { |
|
631 jQuery('#lazy-' + divid).trigger('load_' + divid); |
|
632 } |
|
633 |
611 /* DEPRECATED *****************************************************************/ |
634 /* DEPRECATED *****************************************************************/ |
612 |
635 |
613 preprocessAjaxLoad = cw.utils.deprecatedFunction( |
636 preprocessAjaxLoad = cw.utils.deprecatedFunction( |
614 '[3.9] preprocessAjaxLoad() is deprecated, use loadAjaxHtmlHead instead', |
637 '[3.9] preprocessAjaxLoad() is deprecated, use loadAjaxHtmlHead instead', |
615 function(node, newdomnode) { |
638 function(node, newdomnode) { |