Skip to content

Commit 3761df5

Browse files
committed
v1.2.3 bump and build
1 parent cf0491e commit 3761df5

36 files changed

+166
-126
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description" : "Make your Backbone.js apps dance with a composite application architecture!",
44
"url" : "http://marionettejs.org",
55
"main" : "./lib/backbone.marionette.js",
6-
"version" : "1.2.2",
6+
"version" : "1.2.3",
77

88
"keywords" : [
99
"backbone",

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### v1.2.3 [view commit logs](https://github.com/marionettejs/backbone.marionette/compare/v1.2.2...v1.2.3)
2+
* CompositeView
3+
* Fixed bug where ```child views``` were being added before the initial render, thus raising errors.
4+
15
### v1.2.2 [view commit logs](https://github.com/marionettejs/backbone.marionette/compare/v1.2.1...v1.2.2)
26
* Views
37
* Move the instantiation of ```view``` options above the ```constructor``` This allows for view options to be accessed from within the ```initialize``` method for a given ```view```

lib/backbone.marionette.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// MarionetteJS (Backbone.Marionette)
22
// ----------------------------------
3-
// v1.2.2
3+
// v1.2.3
44
//
55
// Copyright (c)2013 Derick Bailey, Muted Solutions, LLC.
66
// Distributed under MIT license
@@ -1750,11 +1750,17 @@ Marionette.CompositeView = Marionette.CollectionView.extend({
17501750
// binds to. Override this method to prevent the initial
17511751
// events, or to add your own initial events.
17521752
_initialEvents: function(){
1753-
if (this.collection){
1754-
this.listenTo(this.collection, "add", this.addChildView, this);
1755-
this.listenTo(this.collection, "remove", this.removeItemView, this);
1756-
this.listenTo(this.collection, "reset", this._renderChildren, this);
1757-
}
1753+
1754+
// Bind only after composite view in rendered to avoid adding child views
1755+
// to unexisting itemViewContainer
1756+
this.once('render', function () {
1757+
if (this.collection){
1758+
this.listenTo(this.collection, "add", this.addChildView, this);
1759+
this.listenTo(this.collection, "remove", this.removeItemView, this);
1760+
this.listenTo(this.collection, "reset", this._renderChildren, this);
1761+
}
1762+
});
1763+
17581764
},
17591765

17601766
// Retrieve the `itemView` to be used when rendering each of

lib/backbone.marionette.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/backbone.marionette.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/amd/backbone.marionette.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// MarionetteJS (Backbone.Marionette)
22
// ----------------------------------
3-
// v1.2.2
3+
// v1.2.3
44
//
55
// Copyright (c)2013 Derick Bailey, Muted Solutions, LLC.
66
// Distributed under MIT license
@@ -1342,11 +1342,17 @@ Marionette.CompositeView = Marionette.CollectionView.extend({
13421342
// binds to. Override this method to prevent the initial
13431343
// events, or to add your own initial events.
13441344
_initialEvents: function(){
1345-
if (this.collection){
1346-
this.listenTo(this.collection, "add", this.addChildView, this);
1347-
this.listenTo(this.collection, "remove", this.removeItemView, this);
1348-
this.listenTo(this.collection, "reset", this._renderChildren, this);
1349-
}
1345+
1346+
// Bind only after composite view in rendered to avoid adding child views
1347+
// to unexisting itemViewContainer
1348+
this.once('render', function () {
1349+
if (this.collection){
1350+
this.listenTo(this.collection, "add", this.addChildView, this);
1351+
this.listenTo(this.collection, "remove", this.removeItemView, this);
1352+
this.listenTo(this.collection, "reset", this._renderChildren, this);
1353+
}
1354+
});
1355+
13501356
},
13511357

13521358
// Retrieve the `itemView` to be used when rendering each of

lib/core/amd/backbone.marionette.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/backbone.marionette.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,11 +1306,17 @@ Marionette.CompositeView = Marionette.CollectionView.extend({
13061306
// binds to. Override this method to prevent the initial
13071307
// events, or to add your own initial events.
13081308
_initialEvents: function(){
1309-
if (this.collection){
1310-
this.listenTo(this.collection, "add", this.addChildView, this);
1311-
this.listenTo(this.collection, "remove", this.removeItemView, this);
1312-
this.listenTo(this.collection, "reset", this._renderChildren, this);
1313-
}
1309+
1310+
// Bind only after composite view in rendered to avoid adding child views
1311+
// to unexisting itemViewContainer
1312+
this.once('render', function () {
1313+
if (this.collection){
1314+
this.listenTo(this.collection, "add", this.addChildView, this);
1315+
this.listenTo(this.collection, "remove", this.removeItemView, this);
1316+
this.listenTo(this.collection, "reset", this._renderChildren, this);
1317+
}
1318+
});
1319+
13141320
},
13151321

13161322
// Retrieve the `itemView` to be used when rendering each of

lib/core/backbone.marionette.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/backbone.marionette.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "backbone.marionette",
33
"description": "Make your Backbone.js apps dance!",
4-
"version": "1.2.2",
4+
"version": "1.2.3",
55
"homepage": "https://github.com/marionettejs/backbone.marionette",
66
"main": "lib/core/amd/backbone.marionette.js",
77
"keywords": [

reports/coverage.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

reports/coverage/index.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,16 @@
183183
<h1>Code coverage report for <span class="entity">All files</span></h1>
184184
<h2>
185185

186-
Statements: <span class="metric">98.33% <small>(648 / 659)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
186+
Statements: <span class="metric">98.33% <small>(649 / 660)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
187187

188188

189-
Branches: <span class="metric">94.38% <small>(235 / 249)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
189+
Branches: <span class="metric">93.98% <small>(234 / 249)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
190190

191191

192-
Functions: <span class="metric">98.84% <small>(170 / 172)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
192+
Functions: <span class="metric">98.84% <small>(171 / 173)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
193193

194194

195-
Lines: <span class="metric">98.9% <small>(629 / 636)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
195+
Lines: <span class="metric">98.9% <small>(630 / 637)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
196196

197197
</h2>
198198
<div class="path"></div>
@@ -231,13 +231,13 @@ <h2>
231231
<td class="file high" data-value="src/"><a href="src/index.html">src/</a></td>
232232
<td data-value="98.32" class="pic high"><span class="cover-fill" style="width: 98px;"></span><span class="cover-empty" style="width:2px;"></span></td>
233233
<td data-value="98.32" class="pct high">98.32%</td>
234-
<td data-value="653" class="abs high">(642&nbsp;/&nbsp;653)</td>
235-
<td data-value="94.38" class="pct high">94.38%</td>
236-
<td data-value="249" class="abs high">(235&nbsp;/&nbsp;249)</td>
237-
<td data-value="98.83" class="pct high">98.83%</td>
238-
<td data-value="171" class="abs high">(169&nbsp;/&nbsp;171)</td>
234+
<td data-value="654" class="abs high">(643&nbsp;/&nbsp;654)</td>
235+
<td data-value="93.98" class="pct high">93.98%</td>
236+
<td data-value="249" class="abs high">(234&nbsp;/&nbsp;249)</td>
237+
<td data-value="98.84" class="pct high">98.84%</td>
238+
<td data-value="172" class="abs high">(170&nbsp;/&nbsp;172)</td>
239239
<td data-value="98.89" class="pct high">98.89%</td>
240-
<td data-value="630" class="abs high">(623&nbsp;/&nbsp;630)</td>
240+
<td data-value="631" class="abs high">(624&nbsp;/&nbsp;631)</td>
241241
</tr>
242242

243243
<tr>
@@ -258,7 +258,7 @@ <h2>
258258
</div>
259259
</div>
260260
<div class="footer">
261-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
261+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
262262
</div>
263263

264264
<script src="prettify.js"></script>

reports/coverage/spec/javascripts/support/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ <h2>
232232
</div>
233233
</div>
234234
<div class="footer">
235-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
235+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
236236
</div>
237237

238238
<script src="../../../prettify.js"></script>

reports/coverage/spec/javascripts/support/marionette.support.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ <h2>
207207

208208
</div>
209209
<div class="footer">
210-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
210+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
211211
</div>
212212

213213
<script src="../../../prettify.js"></script>

reports/coverage/src/build/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ <h2>
232232
</div>
233233
</div>
234234
<div class="footer">
235-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
235+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
236236
</div>
237237

238238
<script src="../../prettify.js"></script>

reports/coverage/src/build/marionette.core.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ <h2>
312312

313313
</div>
314314
<div class="footer">
315-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
315+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
316316
</div>
317317

318318
<script src="../../prettify.js"></script>

reports/coverage/src/index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,16 @@
183183
<h1>Code coverage report for <span class="entity">src/</span></h1>
184184
<h2>
185185

186-
Statements: <span class="metric">98.32% <small>(642 / 653)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
186+
Statements: <span class="metric">98.32% <small>(643 / 654)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
187187

188188

189-
Branches: <span class="metric">94.38% <small>(235 / 249)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
189+
Branches: <span class="metric">93.98% <small>(234 / 249)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
190190

191191

192-
Functions: <span class="metric">98.83% <small>(169 / 171)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
192+
Functions: <span class="metric">98.84% <small>(170 / 172)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
193193

194194

195-
Lines: <span class="metric">98.89% <small>(623 / 630)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
195+
Lines: <span class="metric">98.89% <small>(624 / 631)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
196196

197197
</h2>
198198
<div class="path"><a href="../index.html">All files</a> &#187; src/</div>
@@ -281,15 +281,15 @@ <h2>
281281

282282
<tr>
283283
<td class="file high" data-value="marionette.compositeview.js"><a href="marionette.compositeview.js.html">marionette.compositeview.js</a></td>
284-
<td data-value="98" class="pic high"><span class="cover-fill" style="width: 98px;"></span><span class="cover-empty" style="width:2px;"></span></td>
285-
<td data-value="98" class="pct high">98%</td>
286-
<td data-value="50" class="abs high">(49&nbsp;/&nbsp;50)</td>
287-
<td data-value="90" class="pct high">90%</td>
288-
<td data-value="20" class="abs high">(18&nbsp;/&nbsp;20)</td>
284+
<td data-value="98.04" class="pic high"><span class="cover-fill" style="width: 98px;"></span><span class="cover-empty" style="width:2px;"></span></td>
285+
<td data-value="98.04" class="pct high">98.04%</td>
286+
<td data-value="51" class="abs high">(50&nbsp;/&nbsp;51)</td>
287+
<td data-value="85" class="pct high">85%</td>
288+
<td data-value="20" class="abs high">(17&nbsp;/&nbsp;20)</td>
289289
<td data-value="100" class="pct high">100%</td>
290-
<td data-value="10" class="abs high">(10&nbsp;/&nbsp;10)</td>
291-
<td data-value="98" class="pct high">98%</td>
292-
<td data-value="50" class="abs high">(49&nbsp;/&nbsp;50)</td>
290+
<td data-value="11" class="abs high">(11&nbsp;/&nbsp;11)</td>
291+
<td data-value="98.04" class="pct high">98.04%</td>
292+
<td data-value="51" class="abs high">(50&nbsp;/&nbsp;51)</td>
293293
</tr>
294294

295295
<tr>
@@ -453,7 +453,7 @@ <h2>
453453
</div>
454454
</div>
455455
<div class="footer">
456-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
456+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
457457
</div>
458458

459459
<script src="../prettify.js"></script>

reports/coverage/src/marionette.application.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ <h2>
516516

517517
</div>
518518
<div class="footer">
519-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
519+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
520520
</div>
521521

522522
<script src="../prettify.js"></script>

reports/coverage/src/marionette.approuter.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ <h2>
399399

400400
</div>
401401
<div class="footer">
402-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
402+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
403403
</div>
404404

405405
<script src="../prettify.js"></script>

reports/coverage/src/marionette.bindEntityEvents.js.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ <h2>
348348
<span class="cline-any cline-neutral">&nbsp;</span>
349349
<span class="cline-any cline-neutral">&nbsp;</span>
350350
<span class="cline-any cline-yes">1</span>
351-
<span class="cline-any cline-yes">2015</span>
351+
<span class="cline-any cline-yes">2031</span>
352352
<span class="cline-any cline-neutral">&nbsp;</span>
353353
<span class="cline-any cline-neutral">&nbsp;</span>
354354
<span class="cline-any cline-yes">74</span>
@@ -371,11 +371,11 @@ <h2>
371371
<span class="cline-any cline-neutral">&nbsp;</span>
372372
<span class="cline-any cline-neutral">&nbsp;</span>
373373
<span class="cline-any cline-yes">1</span>
374-
<span class="cline-any cline-yes">1003</span>
374+
<span class="cline-any cline-yes">1011</span>
375375
<span class="cline-any cline-neutral">&nbsp;</span>
376376
<span class="cline-any cline-neutral">&nbsp;</span>
377377
<span class="cline-any cline-yes">1</span>
378-
<span class="cline-any cline-yes">1012</span>
378+
<span class="cline-any cline-yes">1020</span>
379379
<span class="cline-any cline-neutral">&nbsp;</span>
380380
<span class="cline-any cline-neutral">&nbsp;</span>
381381
<span class="cline-any cline-neutral">&nbsp;</span>
@@ -474,7 +474,7 @@ <h2>
474474

475475
</div>
476476
<div class="footer">
477-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
477+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
478478
</div>
479479

480480
<script src="../prettify.js"></script>

reports/coverage/src/marionette.callbacks.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ <h2>
339339

340340
</div>
341341
<div class="footer">
342-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
342+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
343343
</div>
344344

345345
<script src="../prettify.js"></script>

reports/coverage/src/marionette.collectionview.js.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,11 @@ <h2>
479479
<span class="cline-any cline-neutral">&nbsp;</span>
480480
<span class="cline-any cline-neutral">&nbsp;</span>
481481
<span class="cline-any cline-neutral">&nbsp;</span>
482-
<span class="cline-any cline-yes">139</span>
482+
<span class="cline-any cline-yes">143</span>
483483
<span class="cline-any cline-neutral">&nbsp;</span>
484-
<span class="cline-any cline-yes">139</span>
484+
<span class="cline-any cline-yes">143</span>
485485
<span class="cline-any cline-neutral">&nbsp;</span>
486-
<span class="cline-any cline-yes">139</span>
486+
<span class="cline-any cline-yes">143</span>
487487
<span class="cline-any cline-neutral">&nbsp;</span>
488488
<span class="cline-any cline-neutral">&nbsp;</span>
489489
<span class="cline-any cline-neutral">&nbsp;</span>
@@ -710,7 +710,7 @@ <h2>
710710
<span class="cline-any cline-neutral">&nbsp;</span>
711711
<span class="cline-any cline-neutral">&nbsp;</span>
712712
<span class="cline-any cline-neutral">&nbsp;</span>
713-
<span class="cline-any cline-yes">139</span>
713+
<span class="cline-any cline-yes">143</span>
714714
<span class="cline-any cline-neutral">&nbsp;</span>
715715
<span class="cline-any cline-neutral">&nbsp;</span>
716716
<span class="cline-any cline-neutral">&nbsp;</span>
@@ -1008,7 +1008,7 @@ <h2>
10081008

10091009
</div>
10101010
<div class="footer">
1011-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Oct 31 2013 17:36:07 GMT-0400 (EDT)</div>
1011+
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Nov 13 2013 22:13:46 GMT-0500 (EST)</div>
10121012
</div>
10131013

10141014
<script src="../prettify.js"></script>

0 commit comments

Comments
 (0)