From 01fa7343ef72b48075afd2e5e28a4644680fae5d Mon Sep 17 00:00:00 2001 From: rgrp Date: Tue, 13 Dec 2011 05:50:45 +0000 Subject: [PATCH] [refactor][xs]: move DataTable template in view from demo/index.html. --- src/view.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/view.js b/src/view.js index 2658ad82..b477b038 100644 --- a/src/view.js +++ b/src/view.js @@ -204,6 +204,37 @@ my.DataTable = Backbone.View.extend({ // ====================================================== // Core Templating + template: ' \ + \ + \ + \ + {{#notEmpty}}{{/notEmpty}} \ + {{#headers}} \ + \ + {{/headers}} \ + \ + {{#rows}} \ + \ + \ + {{#cells}} \ + \ + {{/cells}} \ + \ + {{/rows}} \ + \ +
\ +
\ + \ + {{.}} \ +
\ + \ +
\ +
\ +   \ +
{{value}}
\ +
\ +
\ + ', toTemplateJSON: function() { var modelData = this.model.toJSON()