I am creating a dynamic dashboard and currently trying to achieve that with an ContainerView and childViews for the Widgets. What I want to do now, is group, or rather wrap a div around a subset of childs. To give the proper example: So lets say I create 4 childviews
App.IndexView = Ember.ContainerView.extend({
classNames: ['dashboard'],
childViews: ['LinechartView', 'TableView', 'BarchartView', 'TabletwoView'],
...
So that works fine, as expected and it simply creates 4 divs around each. But what I want to do now, is put a div around the first two and the second two, so I can put them in the same "row" (using bootstrap). Am I right in thinking that I would have to create a childview for each row, that is another containerview with each elements or columns being childviews of that? Or is there a simpler way?
To clarify, currently my DOM structure looks like this:
<div id="ember308" class="ember-view dashboard">
<div id="ember311" class="ember-view">LinechartView</div>
<div id="ember314" class="ember-view">TableView</div>
<div id="ember317" class="ember-view">BarChartView</div>
<div id="ember320" class="ember-view">TabletwoView</div>
</div>
and I want my DOM Structure to be like this:
<div id="ember308" class="ember-view dashboard">
<div class="row">
<div id="ember311" class="ember-view span6">LinechartView</div>
<div id="ember314" class="ember-view span6">TableView</div>
</div>
<div class="row">
<div id="ember317" class="ember-view span6">BarChartView</div>
<div id="ember320" class="ember-view span6">TabletwoView</div>
</div>
</div>
It is more about wrapping the row around the views rather than the additional span6 classes. Any more help is really appreciated. Cheers.