javascript - Dynamic layout in JS/CSS/HTML -
in application users define documents layouts. these layouts logically tables of time, users specify "property" going displayed in cell. can define number of rows , columns how many rows or columns property take (collspan , rowspan in html terminology).
now given document layout, , set of documents need display in browser.
i on client side, possibly using jquery or/and knockout.js, or other framework/library.
before start reinventing wheel, can point me in right direction of doing it?
not sure if counts question. it's quite open interpretation here goes.
define layoutviewmodel
set of multi-dimensional observablearrays. each index in multidimentional array corresponds property
object holds data rowspan, colspan etc (not sure data need).
display layout foreach
bindings. have 2 of these, 1 selection , 1 display. below attempt @ display one.
<table data-bind="foreach: rows"> <tr data-bind="foreach: columns"> <td data-bind="attr: { colspan: colspan, rowspan: rowspan }, text: name"> </td> </tr> </table>
hope helps.
Comments
Post a Comment