Skip to content

Commit

Permalink
Bump and build v1.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
samccone committed May 21, 2014
1 parent 855fef3 commit 5295822
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 94 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"./lib/backbone.marionette.js",
"./lib/core/amd/backbone.marionette.js"
],
"version": "1.8.5",
"version": "1.8.6",
"keywords": [
"backbone",
"framework",
Expand Down
11 changes: 11 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
### v1.8.6 [view commit logs](https://github.com/marionettejs/backbone.marionette/compare/v1.8.5...v1.8.6)

* Regions
* `Region.show` now returns the region instance to allow for region operation chaining.
* `Region.show` triggers the view's native `triggerMethod` if it exists. This is to handle the case that triggerMethod is wrapped by a `Marionette.Behavior`.

* General
* Update jquery 2.x upper bound dependency restrictions.
* The grunt test command will now complain if you do not have bower components installed.
* Readme cleanups.

### v1.8.5 [view commit logs](https://github.com/marionettejs/backbone.marionette/compare/v1.8.4...v1.8.5)

* Fixes
Expand Down
2 changes: 1 addition & 1 deletion component.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": "1.8.5",
"version": "1.8.6",
"repo": "marionettejs/backbone.marionette",
"main": "lib/core/amd/backbone.marionette.js",
"keywords": [
Expand Down
43 changes: 15 additions & 28 deletions lib/backbone.marionette.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v1.8.5
// v1.8.6
//
// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
Expand Down Expand Up @@ -964,7 +964,12 @@ _.extend(Marionette.Region.prototype, Backbone.Events, {

view.render();
Marionette.triggerMethod.call(this, "before:show", view);
Marionette.triggerMethod.call(view, "before:show");

if (_.isFunction(view.triggerMethod)) {
view.triggerMethod("before:show");
} else {
Marionette.triggerMethod.call(view, "before:show");
}

if (isDifferentView || isViewClosed) {
this.open(view);
Expand All @@ -973,7 +978,14 @@ _.extend(Marionette.Region.prototype, Backbone.Events, {
this.currentView = view;

Marionette.triggerMethod.call(this, "show", view);
Marionette.triggerMethod.call(view, "show");

if (_.isFunction(view.triggerMethod)) {
view.triggerMethod("show");
} else {
Marionette.triggerMethod.call(view, "show");
}

return this;
},

ensureEl: function(){
Expand Down Expand Up @@ -2272,7 +2284,6 @@ Marionette.Behaviors = (function(Marionette, _) {
Behaviors.wrap(view, this.behaviors, [
'bindUIElements', 'unbindUIElements',
'delegateEvents', 'undelegateEvents',
'onShow', 'onClose',
'behaviorEvents', 'triggerMethod',
'setElement', 'close'
]);
Expand Down Expand Up @@ -2301,30 +2312,6 @@ Marionette.Behaviors = (function(Marionette, _) {
_.invoke(behaviors, 'close', args);
},

onShow: function(onShow, behaviors) {
var args = _.tail(arguments, 2);

_.each(behaviors, function(b) {
Marionette.triggerMethod.apply(b, ["show"].concat(args));
});

if (_.isFunction(onShow)) {
onShow.apply(this, args);
}
},

onClose: function(onClose, behaviors){
var args = _.tail(arguments, 2);

_.each(behaviors, function(b) {
Marionette.triggerMethod.apply(b, ["close"].concat(args));
});

if (_.isFunction(onClose)) {
onClose.apply(this, args);
}
},

bindUIElements: function(bindUIElements, behaviors) {
bindUIElements.apply(this);
_.invoke(behaviors, bindUIElements);
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.

43 changes: 15 additions & 28 deletions lib/core/amd/backbone.marionette.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v1.8.5
// v1.8.6
//
// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
Expand Down Expand Up @@ -520,7 +520,12 @@

view.render();
Marionette.triggerMethod.call(this, "before:show", view);
Marionette.triggerMethod.call(view, "before:show");

if (_.isFunction(view.triggerMethod)) {
view.triggerMethod("before:show");
} else {
Marionette.triggerMethod.call(view, "before:show");
}

if (isDifferentView || isViewClosed) {
this.open(view);
Expand All @@ -529,7 +534,14 @@
this.currentView = view;

Marionette.triggerMethod.call(this, "show", view);
Marionette.triggerMethod.call(view, "show");

if (_.isFunction(view.triggerMethod)) {
view.triggerMethod("show");
} else {
Marionette.triggerMethod.call(view, "show");
}

return this;
},

ensureEl: function(){
Expand Down Expand Up @@ -1828,7 +1840,6 @@
Behaviors.wrap(view, this.behaviors, [
'bindUIElements', 'unbindUIElements',
'delegateEvents', 'undelegateEvents',
'onShow', 'onClose',
'behaviorEvents', 'triggerMethod',
'setElement', 'close'
]);
Expand Down Expand Up @@ -1857,30 +1868,6 @@
_.invoke(behaviors, 'close', args);
},

onShow: function(onShow, behaviors) {
var args = _.tail(arguments, 2);

_.each(behaviors, function(b) {
Marionette.triggerMethod.apply(b, ["show"].concat(args));
});

if (_.isFunction(onShow)) {
onShow.apply(this, args);
}
},

onClose: function(onClose, behaviors){
var args = _.tail(arguments, 2);

_.each(behaviors, function(b) {
Marionette.triggerMethod.apply(b, ["close"].concat(args));
});

if (_.isFunction(onClose)) {
onClose.apply(this, args);
}
},

bindUIElements: function(bindUIElements, behaviors) {
bindUIElements.apply(this);
_.invoke(behaviors, bindUIElements);
Expand Down
4 changes: 2 additions & 2 deletions lib/core/amd/backbone.marionette.min.js

Large diffs are not rendered by default.

43 changes: 15 additions & 28 deletions lib/core/backbone.marionette.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v1.8.5
// v1.8.6
//
// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
Expand Down Expand Up @@ -954,7 +954,12 @@ _.extend(Marionette.Region.prototype, Backbone.Events, {

view.render();
Marionette.triggerMethod.call(this, "before:show", view);
Marionette.triggerMethod.call(view, "before:show");

if (_.isFunction(view.triggerMethod)) {
view.triggerMethod("before:show");
} else {
Marionette.triggerMethod.call(view, "before:show");
}

if (isDifferentView || isViewClosed) {
this.open(view);
Expand All @@ -963,7 +968,14 @@ _.extend(Marionette.Region.prototype, Backbone.Events, {
this.currentView = view;

Marionette.triggerMethod.call(this, "show", view);
Marionette.triggerMethod.call(view, "show");

if (_.isFunction(view.triggerMethod)) {
view.triggerMethod("show");
} else {
Marionette.triggerMethod.call(view, "show");
}

return this;
},

ensureEl: function(){
Expand Down Expand Up @@ -2262,7 +2274,6 @@ Marionette.Behaviors = (function(Marionette, _) {
Behaviors.wrap(view, this.behaviors, [
'bindUIElements', 'unbindUIElements',
'delegateEvents', 'undelegateEvents',
'onShow', 'onClose',
'behaviorEvents', 'triggerMethod',
'setElement', 'close'
]);
Expand Down Expand Up @@ -2291,30 +2302,6 @@ Marionette.Behaviors = (function(Marionette, _) {
_.invoke(behaviors, 'close', args);
},

onShow: function(onShow, behaviors) {
var args = _.tail(arguments, 2);

_.each(behaviors, function(b) {
Marionette.triggerMethod.apply(b, ["show"].concat(args));
});

if (_.isFunction(onShow)) {
onShow.apply(this, args);
}
},

onClose: function(onClose, behaviors){
var args = _.tail(arguments, 2);

_.each(behaviors, function(b) {
Marionette.triggerMethod.apply(b, ["close"].concat(args));
});

if (_.isFunction(onClose)) {
onClose.apply(this, args);
}
},

bindUIElements: function(bindUIElements, behaviors) {
bindUIElements.apply(this);
_.invoke(behaviors, bindUIElements);
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": "1.8.5",
"version": "1.8.6",
"homepage": "https://github.com/marionettejs/backbone.marionette",
"main": "lib/core/amd/backbone.marionette.js",
"keywords": [
Expand Down

0 comments on commit 5295822

Please sign in to comment.