Friday 30 April 2010 8:03:26 am
I've been wanting to do something like this for a long time. Would be great if someone else did it instead! :P I actually made a tiny start a while ago. I created new template functions equivalent to node_view_gui and attribute_view_gui (you could do a search/replace on the default templates or a template designer could just choose specific areas for enabling inline editing). These functions wrapped their contents with a DIV with classes consisting of object data, node id, object id, class id, parent node id, section etc (everything you need to work out permissions on the client side): <div class="node oid-55 nid-2 pnid-1 sid-6... ">...node_view_gui template here.. </div>
A javascript function would check the user's permissions based on these values and highlight appropriate node/attribute templates on mouseover with the relevant edit/remove/hide... buttons shown. Should be relatively simple to create a custom view that renders the appropriate edit templates which the JS inserts in the page and positions apropriately. I'm not sure you could avoid a page refresh on publishing though. anything can happen to the page when an object is edited, depending on each individual setup. I'll dig out my code when i get a chance. Cheers + g'luck
|