backbone-marionette-rails 1.0.0.1 → 1.0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Backbone::Marionette::Rails
2
2
 
3
- TODO: Write a gem description
3
+ A Backbone.Marionette wrapper for rails.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,12 +18,13 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ Import Backbone.Marionette into your mainfeast.
22
+
23
+ #= require backbone.marionette
22
24
 
23
- ## Contributing
25
+ or
24
26
 
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
27
+ //= require backbone.marionette
28
+
29
+
30
+ Visit [Marionette Home Page](https://github.com/marionettejs/backbone.marionette) for more info.
@@ -1,7 +1,7 @@
1
1
  module Backbone
2
2
  module Marionette
3
3
  module Rails
4
- VERSION = "1.0.0.1"
4
+ VERSION = "1.0.0.6"
5
5
  end
6
6
  end
7
7
  end
@@ -1,4 +1,4 @@
1
- // Backbone.Marionette, v1.0.0-rc5
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.renderCollection, 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.renderCollection();
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: backbone-marionette-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.1
4
+ version: 1.0.0.6
5
5
  prerelease:
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-06 00:00:00.000000000 Z
12
+ date: 2013-02-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Vendors Backbone.Marionette Library to Rails
15
15
  email: