[#145,view/multiview,fields][s]: much nicer sidebar layout for fields.

This commit is contained in:
Rufus Pollock
2012-06-05 00:19:01 +01:00
parent 58cac002dc
commit 91ec4ee6b9
3 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,9 @@
.recline-data-explorer .data-view-container { .recline-data-explorer .data-view-container {
display: block; display: block;
clear: both; }
.recline-data-explorer .data-view-sidebar {
float: right;
} }
.recline-data-explorer .header .navigation, .recline-data-explorer .header .navigation,

View File

@@ -88,12 +88,13 @@ my.MultiView = Backbone.View.extend({
<div class="menu-right"> \ <div class="menu-right"> \
<div class="btn-group" data-toggle="buttons-checkbox"> \ <div class="btn-group" data-toggle="buttons-checkbox"> \
<a href="#" class="btn" data-action="filters">Filters</a> \ <a href="#" class="btn" data-action="filters">Filters</a> \
<a href="#" class="btn" data-action="fields">Fields</a> \ <a href="#" class="btn active" data-action="fields">Fields</a> \
</div> \ </div> \
</div> \ </div> \
<div class="query-editor-here" style="display:inline;"></div> \ <div class="query-editor-here" style="display:inline;"></div> \
<div class="clearfix"></div> \ <div class="clearfix"></div> \
</div> \ </div> \
<div class="data-view-sidebar"></div> \
<div class="data-view-container"></div> \ <div class="data-view-container"></div> \
</div> \ </div> \
', ',
@@ -220,7 +221,7 @@ my.MultiView = Backbone.View.extend({
model: this.model model: this.model
}); });
this.$fieldsView = fieldsView.el; this.$fieldsView = fieldsView.el;
this.el.find('.header').append(fieldsView.el); this.el.find('.data-view-sidebar').append(fieldsView.el);
}, },
updateNav: function(pageName) { updateNav: function(pageName) {

View File

@@ -85,7 +85,7 @@ my.Fields = Backbone.View.extend({
}); });
var templated = Mustache.render(this.template, tmplData); var templated = Mustache.render(this.template, tmplData);
this.el.html(templated); this.el.html(templated);
this.el.find('.collapse').collapse(); this.el.find('.collapse').collapse('hide');
} }
}); });