web/data/cubicweb.lazy.js
author Laure Bourgois <Laure.Bourgois@logilab.fr>
Mon, 02 Feb 2009 13:32:56 +0100
changeset 550 2300370b8edd
parent 543 c0f2b6378f70
child 559 7cfd3d11edc8
permissions -rw-r--r--
refactoring OWLView (TBOX+ABOX) and OWLABOXView (pseudo-ABOX for a given entity). By now OWLView is using (for cost advantage) OWLABOXLightView.


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);
}