js_stack 1.2.2 → 1.2.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33417a98914df0c29f0366cc92b33fcb56adcdc9
4
- data.tar.gz: a84af44932b4b450f53de35837111b6115d62c3f
3
+ metadata.gz: d9f603311866504b9b463fdd55ecb2a6b8643acd
4
+ data.tar.gz: b91820141e0ed714afa4b096682fe79e35535fcb
5
5
  SHA512:
6
- metadata.gz: c1febad1e16971d9d3d6560bec7688fb118dc3b247523412a72c0a43e076394e2049c21d5085d1a502ccfaeffc3fbe8cd509601fb95658af4044302444d10429
7
- data.tar.gz: d3d99f95e85b3e328036a195a71474a77fa26b69ba62aa3e4b106c293809c506b312098c584ba90e21fb06115f14ca4a32d0893257ce9500b02b9b67b58ea388
6
+ metadata.gz: b590e0d01b3105c868b46e1369a416d7e53abfa7fd95dae06cee18c5bf67e9f516e8a7be34ae49751712d3f40980b1d2d4e911ad9963a4e40944390b3fbd10eb
7
+ data.tar.gz: 37633f97fb6f965852a4d68d83ee608dde32b2a032edff59f5b1e47cdc689f810eeeb438ef7d3cc75b3474088d1fcc5550ebacb2aef16369fc11b06de6608441
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ # 1.2.3
4
+
5
+ * update marionette 2.2.1 -> 2.2.2 [@gvl]
6
+
3
7
  # 1.2.2
4
8
 
5
9
  * update backbone.virtualcollection 0.5.1 -> 0.5.2 [@gvl]
data/README.md CHANGED
@@ -48,7 +48,7 @@ Examples:
48
48
  | Library | Versions | Changelog | Homepage |
49
49
  | :-----: | :------: | :-------: | :------: |
50
50
  | backbone | **1.1.2**, 1.0.0 | [changelog](http://backbonejs.org/#changelog) | [homepage](http://backbonejs.org/) |
51
- | marionette | **2.2.1**, 2.1.0, 2.0.3, 1.8.8, 1.7.4, 1.6.4, 1.5.1, 1.4.1, 1.1.0 | [changelog](https://github.com/marionettejs/backbone.marionette/blob/master/changelog.md) | [homepage](http://marionettejs.com/) |
51
+ | marionette | **2.2.2**, 2.1.0, 2.0.3, 1.8.8, 1.7.4, 1.6.4, 1.5.1, 1.4.1, 1.1.0 | [changelog](https://github.com/marionettejs/backbone.marionette/blob/master/changelog.md) | [homepage](http://marionettejs.com/) |
52
52
  | underscore | **1.7.0**, 1.6.0, 1.5.2 | [changelog](http://underscorejs.org/#changelog) | [homepage](http://underscorejs.org/) |
53
53
  | hamlcoffee | **1.16** | [changelog](https://github.com/netzpirat/haml_coffee_assets/blob/master/CHANGELOG.md) | [homepage](https://github.com/netzpirat/haml_coffee_assets) |
54
54
  | js-routes | **0.9.9** | [changelog](https://github.com/railsware/js-routes/blob/master/CHANGELOG.md) | [homepage](https://github.com/railsware/js-routes) |
@@ -1,3 +1,3 @@
1
1
  module JsStack
2
- VERSION = '1.2.2'
2
+ VERSION = '1.2.3'
3
3
  end
@@ -1,6 +1,6 @@
1
1
  // MarionetteJS (Backbone.Marionette)
2
2
  // ----------------------------------
3
- // v2.2.1
3
+ // v2.2.2
4
4
  //
5
5
  // Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
6
6
  // Distributed under MIT license
@@ -493,7 +493,7 @@
493
493
 
494
494
  var Marionette = Backbone.Marionette = {};
495
495
 
496
- Marionette.VERSION = '2.2.1';
496
+ Marionette.VERSION = '2.2.2';
497
497
 
498
498
  Marionette.noConflict = function() {
499
499
  root.Marionette = previousMarionette;
@@ -843,7 +843,7 @@
843
843
  var errorProps = ['description', 'fileName', 'lineNumber', 'name', 'message', 'number'];
844
844
 
845
845
  Marionette.Error = Marionette.extend.call(Error, {
846
- urlRoot: 'http://marionettejs.com/docs/' + Marionette.VERSION + '/',
846
+ urlRoot: 'http://marionettejs.com/docs/v' + Marionette.VERSION + '/',
847
847
 
848
848
  constructor: function(message, options) {
849
849
  if (_.isObject(message)) {
@@ -1145,18 +1145,21 @@
1145
1145
  show: function(view, options){
1146
1146
  this._ensureElement();
1147
1147
 
1148
- var showOptions = options || {};
1148
+ var showOptions = options || {};
1149
1149
  var isDifferentView = view !== this.currentView;
1150
- var preventDestroy = !!showOptions.preventDestroy;
1151
- var forceShow = !!showOptions.forceShow;
1150
+ var preventDestroy = !!showOptions.preventDestroy;
1151
+ var forceShow = !!showOptions.forceShow;
1152
1152
 
1153
- // we are only changing the view if there is a view to change to begin with
1153
+ // We are only changing the view if there is a current view to change to begin with
1154
1154
  var isChangingView = !!this.currentView;
1155
1155
 
1156
- // only destroy the view if we don't want to preventDestroy and the view is different
1157
- var _shouldDestroyView = !preventDestroy && isDifferentView;
1156
+ // Only destroy the current view if we don't want to `preventDestroy` and if
1157
+ // the view given in the first argument is different than `currentView`
1158
+ var _shouldDestroyView = isDifferentView && !preventDestroy;
1158
1159
 
1159
- // show the view if the view is different or if you want to re-show the view
1160
+ // Only show the view given in the first argument if it is different than
1161
+ // the current view or if we want to re-show the view. Note that if
1162
+ // `_shouldDestroyView` is true, then `_shouldShowView` is also necessarily true.
1160
1163
  var _shouldShowView = isDifferentView || forceShow;
1161
1164
 
1162
1165
  if (isChangingView) {
@@ -1174,7 +1177,7 @@
1174
1177
  // If this happens we need to remove the reference
1175
1178
  // to the currentView since once a view has been destroyed
1176
1179
  // we can not reuse it.
1177
- view.once('destroy', _.bind(this.empty, this));
1180
+ view.once('destroy', this.empty, this);
1178
1181
  view.render();
1179
1182
 
1180
1183
  if (isChangingView) {
@@ -1184,11 +1187,12 @@
1184
1187
  this.triggerMethod('before:show', view);
1185
1188
  Marionette.triggerMethodOn(view, 'before:show');
1186
1189
 
1190
+ this.attachHtml(view);
1191
+
1187
1192
  if (isChangingView) {
1188
1193
  this.triggerMethod('swapOut', this.currentView);
1189
1194
  }
1190
1195
 
1191
- this.attachHtml(view);
1192
1196
  this.currentView = view;
1193
1197
 
1194
1198
  if (isChangingView) {
@@ -1238,6 +1242,7 @@
1238
1242
  // we should not remove anything
1239
1243
  if (!view) { return; }
1240
1244
 
1245
+ view.off('destroy', this.empty, this);
1241
1246
  this.triggerMethod('before:empty', view);
1242
1247
  this._destroyView();
1243
1248
  this.triggerMethod('empty', view);
@@ -1 +1 @@
1
- //= require js_stack/base/marionette/2.2.1
1
+ //= require js_stack/base/marionette/2.2.2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js_stack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Pewiński
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-19 00:00:00.000000000 Z
12
+ date: 2014-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: haml_coffee_assets
@@ -114,7 +114,7 @@ files:
114
114
  - vendor/assets/javascripts/js_stack/base/marionette/1.8.8.js
115
115
  - vendor/assets/javascripts/js_stack/base/marionette/2.0.3.js
116
116
  - vendor/assets/javascripts/js_stack/base/marionette/2.1.0.js
117
- - vendor/assets/javascripts/js_stack/base/marionette/2.2.1.js
117
+ - vendor/assets/javascripts/js_stack/base/marionette/2.2.2.js
118
118
  - vendor/assets/javascripts/js_stack/base/underscore.js
119
119
  - vendor/assets/javascripts/js_stack/base/underscore/1.5.2.js
120
120
  - vendor/assets/javascripts/js_stack/base/underscore/1.6.0.js