[#22,css][s]: add specific div for data explorer to live in in demo (so we are not tied to specific html).
* also minor fix to data table to have th for header row.
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="project-controls"></div>
|
<div class="project-controls"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="data-explorer-here"></div>
|
||||||
<!--
|
<!--
|
||||||
<div class="main_content">
|
<div class="main_content">
|
||||||
<div class="left-panel"></div>
|
<div class="left-panel"></div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
// do not like all these window globals ...
|
// do not like all these window globals ...
|
||||||
// window.$container = $('.container .right-panel');
|
// window.$container = $('.container .right-panel');
|
||||||
window.$container = $('.container');
|
window.$container = $('.data-explorer-here');
|
||||||
var dataset = demoDataset();
|
var dataset = demoDataset();
|
||||||
window.dataExplorer = new recline.View.DataExplorer({
|
window.dataExplorer = new recline.View.DataExplorer({
|
||||||
model: dataset
|
model: dataset
|
||||||
|
|||||||
10
src/view.js
10
src/view.js
@@ -223,15 +223,15 @@ my.DataTable = Backbone.View.extend({
|
|||||||
<table class="data-table" cellspacing="0"> \
|
<table class="data-table" cellspacing="0"> \
|
||||||
<thead> \
|
<thead> \
|
||||||
<tr> \
|
<tr> \
|
||||||
{{#notEmpty}}<td class="column-header"></td>{{/notEmpty}} \
|
{{#notEmpty}}<th class="column-header"></th>{{/notEmpty}} \
|
||||||
{{#headers}} \
|
{{#headers}} \
|
||||||
<td class="column-header"> \
|
<th class="column-header"> \
|
||||||
<div class="column-header-title"> \
|
<div class="column-header-title"> \
|
||||||
<a class="column-header-menu"></a> \
|
<a class="column-header-menu"></a> \
|
||||||
<span class="column-header-name">{{.}}</span> \
|
<span class="column-header-name">{{.}}</span> \
|
||||||
</div> \
|
</div> \
|
||||||
</div> \
|
</div> \
|
||||||
</td> \
|
</th> \
|
||||||
{{/headers}} \
|
{{/headers}} \
|
||||||
</tr> \
|
</tr> \
|
||||||
</thead> \
|
</thead> \
|
||||||
@@ -246,9 +246,7 @@ my.DataTable = Backbone.View.extend({
|
|||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var template = $( ".dataTableTemplate:first" ).html()
|
var htmls = $.mustache(this.template, this.toTemplateJSON());
|
||||||
, htmls = $.mustache(template, this.toTemplateJSON())
|
|
||||||
;
|
|
||||||
this.el.html(htmls);
|
this.el.html(htmls);
|
||||||
this.model.currentDocuments.forEach(function(doc) {
|
this.model.currentDocuments.forEach(function(doc) {
|
||||||
var tr = $('<tr />');
|
var tr = $('<tr />');
|
||||||
|
|||||||
Reference in New Issue
Block a user