web/data/cubicweb.lazy.js
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 20 May 2010 20:50:00 +0200 (2010-05-20)
changeset 5557 1a534c596bff
parent 559 7cfd3d11edc8
child 5658 7b9553a9db65
permissions -rw-r--r--
[entity] continue cleanup of Entity/AnyEntity namespace * prefix by cw_ or _cw all '2nd zone' attributes / methods, other most commonly used will be done later (some methods used by client are made private anyway when they are for internal purpose anyway) * kill set_eid, use direct affectation instead * kill the auto-transmutation feature (pre_add_hook), hence releasing 3.9 will require releasing file cube as well

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

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