Skip to content

Commit

Permalink
Bump and build v2.2.0-pre.2
Browse files Browse the repository at this point in the history
  • Loading branch information
samccone committed Sep 3, 2014
1 parent 4ef73e8 commit 3feb126
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 55 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Make your Backbone.js apps dance with a composite application architecture!",
"homepage": "http://marionettejs.org",
"main": "./lib/core/backbone.marionette.js",
"version": "2.2.0-pre",
"version": "2.2.0-pre.2",
"keywords": [
"backbone",
"framework",
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
### v2.2.0-pre.2 [view commit logs](https://github.com/marionettejs/backbone.marionette/compare/v2.1.0...v2.2.0-pre.2)

### v2.2.0-pre [view commit logs](https://github.com/marionettejs/backbone.marionette/compare/v2.1.0...v2.2.0-pre)

### v2.1.0 [view commit logs](https://github.com/marionettejs/backbone.marionette/compare/v2.0.3...v2.1.0)
Expand Down
61 changes: 37 additions & 24 deletions lib/backbone.marionette.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v2.2.0-pre
// v2.2.0-pre.2
//
// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
Expand Down Expand Up @@ -493,7 +493,7 @@

var Marionette = Backbone.Marionette = {};

Marionette.VERSION = '2.2.0-pre';
Marionette.VERSION = '2.2.0-pre.2';

Marionette.noConflict = function() {
root.Marionette = previousMarionette;
Expand Down Expand Up @@ -1019,10 +1019,8 @@
// http://lostechies.com/derickbailey/2011/12/12/composite-js-apps-regions-and-region-managers/

Marionette.Region = function(options) {
this.options = options || {};
this.el = this.getOption('el');
this._parentEl = this.getOption('parentEl');
this._el = this.el;
this.options = options || {};
this.el = this.getOption('el');

// Handle when this.el is passed in as a $ wrapped element.
this.el = this.el instanceof Backbone.$ ? this.el[0] : this.el;
Expand Down Expand Up @@ -1098,7 +1096,28 @@
options.el = regionConfig.selector;
}

return new RegionClass(options);
var region = new RegionClass(options);

// override the `getEl` function if we have a parentEl
// this must be overridden to ensure the selector is found
// on the first use of the region. if we try to assign the
// region's `el` to `parentEl.find(selector)` in the object
// literal to build the region, the element will not be
// guaranteed to be in the DOM already, and will cause problems
if (regionConfig.parentEl) {
region.getEl = function(el) {
if (_.isObject(el)) {
return Backbone.$(el);
}
var parentEl = regionConfig.parentEl;
if (_.isFunction(parentEl)) {
parentEl = parentEl();
}
return parentEl.find(el);
};
}

return region;
},

// Build the region directly from a given `RegionClass`
Expand Down Expand Up @@ -1199,14 +1218,7 @@
// Override this method to change how the region finds the
// DOM element that it manages. Return a jQuery selector object.
getEl: function(el) {
if (!this._parentEl || _.isObject(el)) {
return Backbone.$(el);
}

// If we have a `parentEl`, then we attempt to find the
// region within it.
var parentEl = _.result(this, '_parentEl');
return parentEl.find(el);
return Backbone.$(el);
},

// Override this method to change how the new view is
Expand Down Expand Up @@ -1271,7 +1283,7 @@
this.empty();

if (this.$el) {
this.el = this._el;
this.el = this.$el.selector;
}

delete this.$el;
Expand Down Expand Up @@ -1946,7 +1958,7 @@
},

// Attaches the content of a given view.
// This method can be overriden to optimize rendering,
// This method can be overridden to optimize rendering,
// or to render in a non standard way.
//
// For example, using `innerHTML` instead of `$el.html`
Expand Down Expand Up @@ -2566,7 +2578,7 @@
},

// Attaches the content of the root.
// This method can be overriden to optimize rendering,
// This method can be overridden to optimize rendering,
// or to render in a non standard way.
//
// For example, using `innerHTML` instead of `$el.html`
Expand Down Expand Up @@ -2655,9 +2667,11 @@
// is called.
constructor: function(options) {
options = options || {};

this._firstRender = true;
Marionette.ItemView.call(this, options);
this._initializeRegions(options);

Marionette.ItemView.call(this, options);
},

// LayoutView's render will use the existing region objects the
Expand Down Expand Up @@ -2771,8 +2785,8 @@
});
},

// Enable easy overiding of the default `RegionManager`
// for customized region interactions and buisness specific
// Enable easy overriding of the default `RegionManager`
// for customized region interactions and business specific
// view logic for better control over single regions.
getRegionManager: function() {
return new Marionette.RegionManager();
Expand Down Expand Up @@ -2863,7 +2877,7 @@

// Borrow Backbones extend implementation
// this allows us to setup a proper
// inheritence pattern that follow in suite
// inheritance pattern that follows suit
// with the rest of Marionette views.
Behavior.extend = Marionette.extend;

Expand All @@ -2875,7 +2889,7 @@
// --------

// Behaviors is a utility class that takes care of
// glueing your behavior instances to their given View.
// gluing your behavior instances to their given View.
// The most important part of this class is that you
// **MUST** override the class level behaviorsLookup
// method for things to work properly.
Expand All @@ -2900,7 +2914,6 @@
}

var methods = {

behaviorTriggers: function(behaviorTriggers, behaviors) {
var triggerBuilder = new BehaviorTriggersBuilder(this, behaviors);
return triggerBuilder.buildBehaviorTriggers();
Expand Down
2 changes: 1 addition & 1 deletion lib/backbone.marionette.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/backbone.marionette.min.js

Large diffs are not rendered by default.

61 changes: 37 additions & 24 deletions lib/core/backbone.marionette.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v2.2.0-pre
// v2.2.0-pre.2
//
// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
Expand Down Expand Up @@ -30,7 +30,7 @@

var Marionette = Backbone.Marionette = {};

Marionette.VERSION = '2.2.0-pre';
Marionette.VERSION = '2.2.0-pre.2';

Marionette.noConflict = function() {
root.Marionette = previousMarionette;
Expand Down Expand Up @@ -554,10 +554,8 @@
// http://lostechies.com/derickbailey/2011/12/12/composite-js-apps-regions-and-region-managers/

Marionette.Region = function(options) {
this.options = options || {};
this.el = this.getOption('el');
this._parentEl = this.getOption('parentEl');
this._el = this.el;
this.options = options || {};
this.el = this.getOption('el');

// Handle when this.el is passed in as a $ wrapped element.
this.el = this.el instanceof Backbone.$ ? this.el[0] : this.el;
Expand Down Expand Up @@ -633,7 +631,28 @@
options.el = regionConfig.selector;
}

return new RegionClass(options);
var region = new RegionClass(options);

// override the `getEl` function if we have a parentEl
// this must be overridden to ensure the selector is found
// on the first use of the region. if we try to assign the
// region's `el` to `parentEl.find(selector)` in the object
// literal to build the region, the element will not be
// guaranteed to be in the DOM already, and will cause problems
if (regionConfig.parentEl) {
region.getEl = function(el) {
if (_.isObject(el)) {
return Backbone.$(el);
}
var parentEl = regionConfig.parentEl;
if (_.isFunction(parentEl)) {
parentEl = parentEl();
}
return parentEl.find(el);
};
}

return region;
},

// Build the region directly from a given `RegionClass`
Expand Down Expand Up @@ -734,14 +753,7 @@
// Override this method to change how the region finds the
// DOM element that it manages. Return a jQuery selector object.
getEl: function(el) {
if (!this._parentEl || _.isObject(el)) {
return Backbone.$(el);
}

// If we have a `parentEl`, then we attempt to find the
// region within it.
var parentEl = _.result(this, '_parentEl');
return parentEl.find(el);
return Backbone.$(el);
},

// Override this method to change how the new view is
Expand Down Expand Up @@ -806,7 +818,7 @@
this.empty();

if (this.$el) {
this.el = this._el;
this.el = this.$el.selector;
}

delete this.$el;
Expand Down Expand Up @@ -1481,7 +1493,7 @@
},

// Attaches the content of a given view.
// This method can be overriden to optimize rendering,
// This method can be overridden to optimize rendering,
// or to render in a non standard way.
//
// For example, using `innerHTML` instead of `$el.html`
Expand Down Expand Up @@ -2101,7 +2113,7 @@
},

// Attaches the content of the root.
// This method can be overriden to optimize rendering,
// This method can be overridden to optimize rendering,
// or to render in a non standard way.
//
// For example, using `innerHTML` instead of `$el.html`
Expand Down Expand Up @@ -2190,9 +2202,11 @@
// is called.
constructor: function(options) {
options = options || {};

this._firstRender = true;
Marionette.ItemView.call(this, options);
this._initializeRegions(options);

Marionette.ItemView.call(this, options);
},

// LayoutView's render will use the existing region objects the
Expand Down Expand Up @@ -2306,8 +2320,8 @@
});
},

// Enable easy overiding of the default `RegionManager`
// for customized region interactions and buisness specific
// Enable easy overriding of the default `RegionManager`
// for customized region interactions and business specific
// view logic for better control over single regions.
getRegionManager: function() {
return new Marionette.RegionManager();
Expand Down Expand Up @@ -2398,7 +2412,7 @@

// Borrow Backbones extend implementation
// this allows us to setup a proper
// inheritence pattern that follow in suite
// inheritance pattern that follows suit
// with the rest of Marionette views.
Behavior.extend = Marionette.extend;

Expand All @@ -2410,7 +2424,7 @@
// --------

// Behaviors is a utility class that takes care of
// glueing your behavior instances to their given View.
// gluing your behavior instances to their given View.
// The most important part of this class is that you
// **MUST** override the class level behaviorsLookup
// method for things to work properly.
Expand All @@ -2435,7 +2449,6 @@
}

var methods = {

behaviorTriggers: function(behaviorTriggers, behaviors) {
var triggerBuilder = new BehaviorTriggersBuilder(this, behaviors);
return triggerBuilder.buildBehaviorTriggers();
Expand Down
2 changes: 1 addition & 1 deletion lib/core/backbone.marionette.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/core/backbone.marionette.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "backbone.marionette",
"description": "Make your Backbone.js apps dance!",
"version": "2.2.0-pre",
"version": "2.2.0-pre.2",
"homepage": "https://github.com/marionettejs/backbone.marionette",
"main": "lib/core/backbone.marionette.js",
"keywords": [
Expand Down

0 comments on commit 3feb126

Please sign in to comment.