in this past few months i've been working with martijn fassen (grok/libxml) and guido wesdorp on a project for martijn's client.
Along the way, guido and us developed a set of library for doing ajax view rendering based on json objects passed from the server to the browser. https://bitbucket.org/obviel/obviel example of simple usage: if in in the js file: ----------------------------------------------- obviel.view({ iface: 'my-view', html: '<button>Click Me</button>', render: function (el, obj) { $('button', el).click(function (event) { alert(obj.message); }; }; }); $(document).ready(function() { var url = 'http://path/to/server/json'; $('#container').render(url); }); ---------------------------------------------- and the json returned by 'http://path/to/server/json' ---------------------------------------------- {'ifaces': ['my-view'], 'message': 'Hello World'} ---------------------------------------------- will render a button which when you click it will popup an alert with 'Hello World' message in it There will be a few days sprint with martijn around may to refactor this, write docs and setup a proper home for it. The sprint will possibly be at singapore at martijn's in-law's place. those who are interested are invited to join in :D -- Mohd Izhar Firdaus Bin Ismail / KageSenshi Inigo Consulting (FOSS/Plone Development, Training & Services) http://www.inigo-tech.com Fedora Malaysia Contributor & Ambassador http://blog.kagesenshi.org 92C2 B295 B40B B3DC 6866 5011 5BD2 584A 8A5D 7331 _______________________________________________ general mailing list [email protected] http://lists.foss.org.my/mailman/listinfo/general
