marionette-rails 1.0.0.rc5 → 1.0.0.rc6
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
|
|
1
|
-
// Backbone.Marionette, v1.0.0-
|
1
|
+
// Backbone.Marionette, v1.0.0-rc6
|
2
2
|
// Copyright (c)2013 Derick Bailey, Muted Solutions, LLC.
|
3
3
|
// Distributed under MIT license
|
4
4
|
// http://github.com/marionettejs/backbone.marionette
|
@@ -1240,8 +1240,16 @@ Marionette.CollectionView = Marionette.View.extend({
|
|
1240
1240
|
// the collection view.
|
1241
1241
|
render: function(){
|
1242
1242
|
this.isClosed = false;
|
1243
|
-
|
1244
1243
|
this.triggerBeforeRender();
|
1244
|
+
this._renderChildren();
|
1245
|
+
this.triggerRendered();
|
1246
|
+
return this;
|
1247
|
+
},
|
1248
|
+
|
1249
|
+
// Internal method. Separated so that CompositeView can have
|
1250
|
+
// more control over events being triggered, around the rendering
|
1251
|
+
// process
|
1252
|
+
_renderChildren: function(){
|
1245
1253
|
this.closeEmptyView();
|
1246
1254
|
this.closeChildren();
|
1247
1255
|
|
@@ -1250,9 +1258,6 @@ Marionette.CollectionView = Marionette.View.extend({
|
|
1250
1258
|
} else {
|
1251
1259
|
this.showEmptyView();
|
1252
1260
|
}
|
1253
|
-
|
1254
|
-
this.triggerRendered();
|
1255
|
-
return this;
|
1256
1261
|
},
|
1257
1262
|
|
1258
1263
|
// Internal method to loop through each item in the
|
@@ -1462,7 +1467,7 @@ Marionette.CompositeView = Marionette.CollectionView.extend({
|
|
1462
1467
|
if (this.collection){
|
1463
1468
|
this.listenTo(this.collection, "add", this.addChildView, this);
|
1464
1469
|
this.listenTo(this.collection, "remove", this.removeItemView, this);
|
1465
|
-
this.listenTo(this.collection, "reset", this.
|
1470
|
+
this.listenTo(this.collection, "reset", this._renderChildren, this);
|
1466
1471
|
}
|
1467
1472
|
},
|
1468
1473
|
|
@@ -1500,30 +1505,34 @@ Marionette.CompositeView = Marionette.CollectionView.extend({
|
|
1500
1505
|
// but the collection will not re-render.
|
1501
1506
|
render: function(){
|
1502
1507
|
this.isClosed = false;
|
1503
|
-
|
1504
1508
|
this.resetItemViewContainer();
|
1505
1509
|
|
1510
|
+
this.triggerBeforeRender();
|
1506
1511
|
var html = this.renderModel();
|
1507
1512
|
this.$el.html(html);
|
1508
|
-
|
1509
1513
|
// the ui bindings is done here and not at the end of render since they
|
1510
1514
|
// will not be available until after the model is rendered, but should be
|
1511
1515
|
// available before the collection is rendered.
|
1512
1516
|
this.bindUIElements();
|
1513
|
-
|
1514
1517
|
this.triggerMethod("composite:model:rendered");
|
1515
1518
|
|
1516
|
-
this.
|
1519
|
+
this._renderChildren();
|
1520
|
+
|
1517
1521
|
this.triggerMethod("composite:rendered");
|
1522
|
+
this.triggerRendered();
|
1518
1523
|
return this;
|
1519
1524
|
},
|
1520
1525
|
|
1526
|
+
_renderChildren: function(){
|
1527
|
+
Marionette.CollectionView.prototype._renderChildren.call(this);
|
1528
|
+
this.triggerMethod("composite:collection:rendered");
|
1529
|
+
},
|
1530
|
+
|
1521
1531
|
// Render the collection for the composite view
|
1522
1532
|
renderCollection: function(){
|
1523
1533
|
var args = Array.prototype.slice.apply(arguments);
|
1524
1534
|
Marionette.CollectionView.prototype.render.apply(this, args);
|
1525
1535
|
|
1526
|
-
this.triggerMethod("composite:collection:rendered");
|
1527
1536
|
},
|
1528
1537
|
|
1529
1538
|
// Render an individual model, if we have one, as
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marionette-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc6
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|