[Cubicweb] annotating divs with rql and vid

Nicolas Chauvat nicolas.chauvat at logilab.fr
Thu May 24 14:51:17 CEST 2012


Hi List,

My latest patch to CW is http://www.cubicweb.org/patch/2375100

As you can see, it adds two data attributes to the main div:
data-cw_rql and data-cw_vid.

I contemplate making this the default behaviour. All the divs that are
generated with rql+vid would be annotated with these two attributes
and client-side js code could modify the values of these attributes
before calling a js function similar to _loadDynamicFragment() that
would take a div as an argument and replace it with the result of the
query rql+vid.

That would give us a clear design for client-side manipulation of the
UI in javascript: look for the data-rql/div attributes, modify if
needed, then call reloadDiv().

Facets could be reimplemented on this basis. Instead of modifying
several links, they would modify only the data-cw_rql attribute of the
div they affect.

It would also allow new features like "zoom". Some overlay could
appear when the mouse enters a div that has data-cw_rql/vid
attributes. Clicking on the "zoom" icon shown by that overlay would
make the value of cw_rql the new query.

Would anyone that knows better than I do the javascript side of
CubicWeb please comment on the above ?

-- 
Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  



More information about the Cubicweb mailing list