Skip to content

Commit

Permalink
Bump and build v2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
samccone committed Oct 22, 2014
1 parent 490b9ff commit d0244db
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 32 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.1",
"version": "2.2.2",
"keywords": [
"backbone",
"framework",
Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### v2.2.2 [view commit logs](https://github.com/marionettejs/backbone.marionette/compare/v2.2.1...v2.2.2)

* Fixes

* Remove duplicate call to region.empty on view destroy.
* Fix call time of `swapOut`.
* Fix broken link in Marionette Error messages

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

* 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": "2.1.0",
"version": "2.2.2",
"repo": "marionettejs/backbone.marionette",
"main": "lib/core/backbone.marionette.js",
"keywords": [
Expand Down
29 changes: 17 additions & 12 deletions lib/backbone.marionette.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v2.2.1
// v2.2.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.1';
Marionette.VERSION = '2.2.2';

Marionette.noConflict = function() {
root.Marionette = previousMarionette;
Expand Down Expand Up @@ -843,7 +843,7 @@
var errorProps = ['description', 'fileName', 'lineNumber', 'name', 'message', 'number'];

Marionette.Error = Marionette.extend.call(Error, {
urlRoot: 'http://marionettejs.com/docs/' + Marionette.VERSION + '/',
urlRoot: 'http://marionettejs.com/docs/v' + Marionette.VERSION + '/',

constructor: function(message, options) {
if (_.isObject(message)) {
Expand Down Expand Up @@ -1145,18 +1145,21 @@
show: function(view, options){
this._ensureElement();

var showOptions = options || {};
var showOptions = options || {};
var isDifferentView = view !== this.currentView;
var preventDestroy = !!showOptions.preventDestroy;
var forceShow = !!showOptions.forceShow;
var preventDestroy = !!showOptions.preventDestroy;
var forceShow = !!showOptions.forceShow;

// we are only changing the view if there is a view to change to begin with
// We are only changing the view if there is a current view to change to begin with
var isChangingView = !!this.currentView;

// only destroy the view if we don't want to preventDestroy and the view is different
var _shouldDestroyView = !preventDestroy && isDifferentView;
// Only destroy the current view if we don't want to `preventDestroy` and if
// the view given in the first argument is different than `currentView`
var _shouldDestroyView = isDifferentView && !preventDestroy;

// show the view if the view is different or if you want to re-show the view
// Only show the view given in the first argument if it is different than
// the current view or if we want to re-show the view. Note that if
// `_shouldDestroyView` is true, then `_shouldShowView` is also necessarily true.
var _shouldShowView = isDifferentView || forceShow;

if (isChangingView) {
Expand All @@ -1174,7 +1177,7 @@
// If this happens we need to remove the reference
// to the currentView since once a view has been destroyed
// we can not reuse it.
view.once('destroy', _.bind(this.empty, this));
view.once('destroy', this.empty, this);
view.render();

if (isChangingView) {
Expand All @@ -1184,11 +1187,12 @@
this.triggerMethod('before:show', view);
Marionette.triggerMethodOn(view, 'before:show');

this.attachHtml(view);

if (isChangingView) {
this.triggerMethod('swapOut', this.currentView);
}

this.attachHtml(view);
this.currentView = view;

if (isChangingView) {
Expand Down Expand Up @@ -1238,6 +1242,7 @@
// we should not remove anything
if (!view) { return; }

view.off('destroy', this.empty, this);
this.triggerMethod('before:empty', view);
this._destroyView();
this.triggerMethod('empty', view);
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.

29 changes: 17 additions & 12 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.1
// v2.2.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.1';
Marionette.VERSION = '2.2.2';

Marionette.noConflict = function() {
root.Marionette = previousMarionette;
Expand Down Expand Up @@ -378,7 +378,7 @@
var errorProps = ['description', 'fileName', 'lineNumber', 'name', 'message', 'number'];

Marionette.Error = Marionette.extend.call(Error, {
urlRoot: 'http://marionettejs.com/docs/' + Marionette.VERSION + '/',
urlRoot: 'http://marionettejs.com/docs/v' + Marionette.VERSION + '/',

constructor: function(message, options) {
if (_.isObject(message)) {
Expand Down Expand Up @@ -680,18 +680,21 @@
show: function(view, options){
this._ensureElement();

var showOptions = options || {};
var showOptions = options || {};
var isDifferentView = view !== this.currentView;
var preventDestroy = !!showOptions.preventDestroy;
var forceShow = !!showOptions.forceShow;
var preventDestroy = !!showOptions.preventDestroy;
var forceShow = !!showOptions.forceShow;

// we are only changing the view if there is a view to change to begin with
// We are only changing the view if there is a current view to change to begin with
var isChangingView = !!this.currentView;

// only destroy the view if we don't want to preventDestroy and the view is different
var _shouldDestroyView = !preventDestroy && isDifferentView;
// Only destroy the current view if we don't want to `preventDestroy` and if
// the view given in the first argument is different than `currentView`
var _shouldDestroyView = isDifferentView && !preventDestroy;

// show the view if the view is different or if you want to re-show the view
// Only show the view given in the first argument if it is different than
// the current view or if we want to re-show the view. Note that if
// `_shouldDestroyView` is true, then `_shouldShowView` is also necessarily true.
var _shouldShowView = isDifferentView || forceShow;

if (isChangingView) {
Expand All @@ -709,7 +712,7 @@
// If this happens we need to remove the reference
// to the currentView since once a view has been destroyed
// we can not reuse it.
view.once('destroy', _.bind(this.empty, this));
view.once('destroy', this.empty, this);
view.render();

if (isChangingView) {
Expand All @@ -719,11 +722,12 @@
this.triggerMethod('before:show', view);
Marionette.triggerMethodOn(view, 'before:show');

this.attachHtml(view);

if (isChangingView) {
this.triggerMethod('swapOut', this.currentView);
}

this.attachHtml(view);
this.currentView = view;

if (isChangingView) {
Expand Down Expand Up @@ -773,6 +777,7 @@
// we should not remove anything
if (!view) { return; }

view.off('destroy', this.empty, this);
this.triggerMethod('before:empty', view);
this._destroyView();
this.triggerMethod('empty', view);
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.1",
"version": "2.2.2",
"homepage": "https://github.com/marionettejs/backbone.marionette",
"main": "lib/core/backbone.marionette.js",
"keywords": [
Expand Down

0 comments on commit d0244db

Please sign in to comment.