| a | b | |
|---|
| 0 | + | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" |
|---|
| 0 | + | "http://www.w3.org/TR/html4/strict.dtd"> |
|---|
| 0 | + | <html> |
|---|
| 0 | + | <head> |
|---|
| 0 | + | <script src="../libs/jquery.js" type="text/javascript" charset="utf-8"></script> |
|---|
| 0 | + | <script src="../libs/pure2.js" type="text/javascript" charset="utf-8"></script> |
|---|
| 0 | + | </head> |
|---|
| 0 | + | <body> |
|---|
| 0 | + | <table id="sale_items"> |
|---|
| 0 | + | <tr class="sale_items"> |
|---|
| 0 | + | <td><button class="void_item">X</button></td> |
|---|
| 0 | + | <td> |
|---|
| 0 | + | <span class="inventory_number"></span><br> |
|---|
| 0 | + | <span class="category"></span> |
|---|
| 0 | + | </td> |
|---|
| 0 | + | <td><span class="description"></span></td> |
|---|
| 0 | + | <td> |
|---|
| 0 | + | <input class="quantity@value"> |
|---|
| 0 | + | @ |
|---|
| 0 | + | <input class="selling_price@value"> |
|---|
| 0 | + | </td> |
|---|
| 0 | + | </tr> |
|---|
| 0 | + | </table> |
|---|
| 0 | + | <input type="button" onclick="test()" value="test" /> |
|---|
| 0 | + | <script> |
|---|
| 0 | + | var data = [ |
|---|
| 0 | + | { |
|---|
| 0 | + | inventory_number: "I-9000", |
|---|
| 0 | + | category: "[INV]", |
|---|
| 0 | + | description: "testing", |
|---|
| 0 | + | quantity: "1", |
|---|
| 0 | + | selling_price: "19.99" |
|---|
| 0 | + | }, |
|---|
| 0 | + | { |
|---|
| 0 | + | inventory_number: "I-9000", |
|---|
| 0 | + | category: "[INV]", |
|---|
| 0 | + | description: "testing", |
|---|
| 0 | + | quantity: "1", |
|---|
| 0 | + | selling_price: "19.99" |
|---|
| 0 | + | }], |
|---|
| 0 | + | template = $("#sale_items").compile(false, {sale_items:data}), |
|---|
| 0 | + | test = function(){ |
|---|
| 0 | + | $("#sale_items").render({sale_items:data}, template); |
|---|
| 0 | + | }; |
|---|
| 0 | + | </script> |
|---|
| 0 | + | </body> |
|---|
| 0 | + | </html> |
|---|
| ... | |
|---|