web/data/cubicweb.lazy.js
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 30 Jan 2009 16:57:20 +0100
changeset 543 c0f2b6378f70
parent 522 385ce5e0b30b
child 559 7cfd3d11edc8
permissions -rw-r--r--
simplification of lazy tabs mechanism


function load_now(eltsel, holesel) {
    var lazydiv = jQuery(eltsel);
    var hole = lazydiv.children(holesel);
    if (hole.length == 0) {
	/* the hole is already filled */
	return;
    }
    lazydiv.loadxhtml(lazydiv.attr('cubicweb:loadurl'));
}

function trigger_load(divid) {
    jQuery('#lazy-' + divid).trigger('load_' + divid);
}