web/data/cubicweb.lazy.js
changeset 522 385ce5e0b30b
parent 485 0f830732be19
child 543 c0f2b6378f70
equal deleted inserted replaced
521:b3430af22580 522:385ce5e0b30b
     2 function load_now(eltsel, holesel) {
     2 function load_now(eltsel, holesel) {
     3   var lazydiv = jQuery(eltsel);
     3   var lazydiv = jQuery(eltsel);
     4   var hole = lazydiv.children(holesel);
     4   var hole = lazydiv.children(holesel);
     5   if (hole.length == 0) /* the hole is already filled */
     5   if (hole.length == 0) /* the hole is already filled */
     6     return;
     6     return;
     7   var vid_eid = lazydiv.attr('cubicweb__loadurl');
     7   var vid_eid = lazydiv.attr('cubicweb:lazyloadurl');
     8   /* XXX see what could be done with jquery.loadxhtml(...)   */
     8   /* XXX see what could be done with jquery.loadxhtml(...)   */
     9   var later = async_rawremote_exec('lazily', vid_eid);
     9   var later = async_rawremote_exec('lazily', vid_eid);
    10   later.addCallback(function(req) {
    10   later.addCallback(function(req) {
    11     var div = lazydiv[0];
    11     var div = lazydiv[0];
    12     div.appendChild(getDomFromResponse(req));
    12     div.appendChild(getDomFromResponse(req));