• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Grid-Templating

Page history last edited by BorisMoore 12 years, 10 months ago

See Template-Comparison for current implementations and status.

 

jquery-tmpl usage in grid TODOs

  • should we provide a dataitem instance or just an object representing the data
  • for grid should we use a template that expects a single item or many items
  • should we use nested templates for rows and fields
  • deal with general performance issues (rewrite planned for next beta) 

 

To further evaluate jquery-tmpl for use in jQuery UI widgets, including the grid, we've started an experimental rewrite of the datepicker. It renders a default datepicker and allows basic interaction (switch month, select date, popup datepicker (very limited), switch culture). We're using this to research a good approach to handle more complex template logic, here for rendering lead days, highlighting today, weekends and custom highlighters, e.g. holidays. We're also research different options for template packaging and customizations.

 

TODOs based on datepicker prototype   

  • how can we package builtin templates?
  • should we have just a single template, or multiple ones to make it possible to customize just one while reusing the rest?
    • Replacing a top-level template via a tmpl-option is easy enough
    • But how could we tell the default template to use a different nested template? 
  • what parts of date.js could be moved to jquery-global?
  • are there other features in jquery-tmpl that we can use to improve the template?

 

Datepicker Demo

http://view.jqueryui.com/datepicker/datepicker-rewrite/index.html

Note: The actual datepicker implementation is just a draft and nowhere near complete. For example, selecting dates in other months then the current will produce the wrong result. The prototype is just for testing the jquery-tmpl plugin, but should be provide a good starting point for an actual rewrite.

 

Alternative template engine: KiTE
http://code.google.com/p/kite/
demos: http://terrainformatica.com/kite/test-kite.htm

Comments (0)

You don't have permission to comment on this page.