js_stack 0.5.7 → 0.6.0
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 +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +7 -7
- data/lib/js_stack/version.rb +1 -1
- data/vendor/assets/javascripts/js_stack/base/marionette/{1.8.0.js → 1.8.3.js} +173 -8
- data/vendor/assets/javascripts/js_stack/base/marionette.js +1 -1
- data/vendor/assets/javascripts/js_stack/plugins/backbone/stickit/0.8.0.js +595 -0
- data/vendor/assets/javascripts/js_stack/plugins/backbone.stickit.js +1 -1
- metadata +4 -17
- data/vendor/assets/javascripts/js_stack/base/backbone/1.1.0.js +0 -1581
- data/vendor/assets/javascripts/js_stack/base/backbone/1.1.1.js +0 -1609
- data/vendor/assets/javascripts/js_stack/base/marionette/1.6.2.js +0 -2555
- data/vendor/assets/javascripts/js_stack/base/marionette/1.7.0.js +0 -2746
- data/vendor/assets/javascripts/js_stack/base/marionette/1.7.3.js +0 -2765
- data/vendor/assets/javascripts/js_stack/plugins/backbone/associations/0.5.1.js +0 -533
- data/vendor/assets/javascripts/js_stack/plugins/backbone/associations/0.5.4.js +0 -574
- data/vendor/assets/javascripts/js_stack/plugins/backbone/mutators/0.4.1.js +0 -207
- data/vendor/assets/javascripts/js_stack/plugins/backbone/pageable/1.4.5.js +0 -1318
- data/vendor/assets/javascripts/js_stack/plugins/backbone/virtualcollection/0.4.11.js +0 -345
- data/vendor/assets/javascripts/js_stack/plugins/backbone/virtualcollection/0.4.12.js +0 -351
- data/vendor/assets/javascripts/js_stack/plugins/backbone/virtualcollection/0.4.14.js +0 -398
- data/vendor/assets/javascripts/js_stack/plugins/backbone/virtualcollection/0.4.5.js +0 -293
- data/vendor/assets/javascripts/js_stack/plugins/backbone/virtualcollection/0.4.8.js +0 -340
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f87011c7e5cdd4e900935680eb1f2e7868e43bd
|
4
|
+
data.tar.gz: ecbe6fd21b26ac04f51ee37ee123f2a29ee2324c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4966b0243e1d965f633a8b4bcd75d0efa7fb00be739d807e782b7ed2fdb7a77beaecfb0a454318220eecf3968991c961f965e868f3b1615bf088671130c54d85
|
7
|
+
data.tar.gz: 44aa356339e13797c395f999582744513ad9d318f575408d8522057999d8875e6ac9f85e87ad9a415f6a404e880c4e0a4f9291823b0e14dac4ccec13e40d33cf
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
# 0.6.0
|
4
|
+
|
5
|
+
* remove old libraries versions and leave only the latest patch version for each minor version. Removed:
|
6
|
+
- backbone 1.1.1, 1.1.0
|
7
|
+
- marionette: 1.6.2, 1.7.3, 1.7.0
|
8
|
+
- backbone.associations: 0.5.1, 0.5.4
|
9
|
+
- backbone.mutators: 0.4.1
|
10
|
+
- backbone.pageable: 1.4.5
|
11
|
+
- backbone.virtualcollection: 0.4.14, 0.4.12, 0.4.11, 0.4.8, 0.4.5
|
12
|
+
* update marionette 1.8.0 -> 1.8.3 and remove 1.8.0 version [@gvl]
|
13
|
+
* update backbone.stickit 0.7.0 -> 0.8.0 [@gvl]
|
14
|
+
|
3
15
|
# 0.5.7
|
4
16
|
|
5
17
|
* update marionette 1.7.4 -> 1.8.0 [@gvl]
|
data/README.md
CHANGED
@@ -52,8 +52,8 @@ Examples:
|
|
52
52
|
|
53
53
|
| Library | Versions | Changelog | Homepage |
|
54
54
|
| :-----: | :------: | :-------: | :------: |
|
55
|
-
| backbone | **1.1.2**, 1.
|
56
|
-
| marionette | **1.8.
|
55
|
+
| backbone | **1.1.2**, 1.0.0 | [changelog](http://backbonejs.org/#changelog) | [homepage](http://backbonejs.org/) |
|
56
|
+
| marionette | **1.8.3**, 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/) |
|
57
57
|
| underscore | **1.6.0**, 1.5.2 | [changelog](http://underscorejs.org/#changelog) | [homepage](http://underscorejs.org/) |
|
58
58
|
| hamlcoffee | **1.16** | [changelog](https://github.com/netzpirat/haml_coffee_assets/blob/master/CHANGELOG.md) | [homepage](https://github.com/netzpirat/haml_coffee_assets) |
|
59
59
|
| js-routes | **0.9.7** | none | [homepage](https://github.com/railsware/js-routes) |
|
@@ -62,14 +62,14 @@ Examples:
|
|
62
62
|
|
63
63
|
| Library | Versions | Changelog | Homepage | Default |
|
64
64
|
| :-----: | :------: | :-------: | :------: | :-----: |
|
65
|
-
| backbone associations | **0.6.1**, 0.5.5
|
65
|
+
| backbone associations | **0.6.1**, 0.5.5 | [changelog](https://github.com/dhruvaray/backbone-associations/blob/master/CHANGELOG.md) | [homepage](http://dhruvaray.github.io/backbone-associations/) | Yes
|
66
66
|
| backbone deepmodel | **0.10.4** | [changelog](https://github.com/powmedia/backbone-deep-model#changelog) | [homepage](https://github.com/powmedia/backbone-deep-model) | Yes
|
67
|
-
| backbone mutators | **0.4.2
|
68
|
-
| backbone pageable | **1.4.8**, 1.
|
67
|
+
| backbone mutators | **0.4.2** | [changelog](https://github.com/asciidisco/Backbone.Mutators#changelog) | [homepage](https://github.com/asciidisco/Backbone.Mutators) | No
|
68
|
+
| backbone pageable | **1.4.8**, 1.3.2 | [changelog](https://github.com/backbone-paginator/backbone-pageable#change-log) | [homepage](https://github.com/wyuenho/backbone-pageable) | Yes
|
69
69
|
| backbone routefilter | **0.2.0** | [changelog](https://github.com/boazsender/backbone.routefilter#release-history) | [homepage](https://github.com/boazsender/backbone.routefilter) | No
|
70
|
-
| backbone stickit | **0.
|
70
|
+
| backbone stickit | **0.8.0**, 0.7.0, 0.6.3 | [changelog](http://nytimes.github.io/backbone.stickit/#change-log) | [homepage](http://nytimes.github.io/backbone.stickit/) | Yes
|
71
71
|
| backbone validation | **0.9.1**, 0.8.1 | [changelog](https://github.com/thedersen/backbone.validation#release-notes) | [homepage](https://github.com/thedersen/backbone.validation) | Yes
|
72
|
-
| backbone virtualcollection | **0.4.15
|
72
|
+
| backbone virtualcollection | **0.4.15** | [changelog](https://github.com/p3drosola/Backbone.VirtualCollection#changelog) | [homepage](https://github.com/p3drosola/Backbone.VirtualCollection) | Yes
|
73
73
|
| cocktail | **0.5.3** | none | [homepage](https://github.com/onsi/cocktail) | No
|
74
74
|
| momentjs | **2.5.1** | [changelog](https://github.com/moment/moment/#changelog) | [homepage](https://github.com/derekprior/momentjs-rails) | No
|
75
75
|
| underscore inflections | **0.2.1** | none | [homepage](https://github.com/geetarista/underscore.inflections) | No
|
data/lib/js_stack/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// MarionetteJS (Backbone.Marionette)
|
2
2
|
// ----------------------------------
|
3
|
-
// v1.8.
|
3
|
+
// v1.8.3
|
4
4
|
//
|
5
5
|
// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
|
6
6
|
// Distributed under MIT license
|
@@ -441,6 +441,154 @@ Wreqr.EventAggregator = (function(Backbone, _){
|
|
441
441
|
return EA;
|
442
442
|
})(Backbone, _);
|
443
443
|
|
444
|
+
// Wreqr.Channel
|
445
|
+
// --------------
|
446
|
+
//
|
447
|
+
// An object that wraps the three messaging systems:
|
448
|
+
// EventAggregator, RequestResponse, Commands
|
449
|
+
Wreqr.Channel = (function(Wreqr){
|
450
|
+
"use strict";
|
451
|
+
|
452
|
+
var Channel = function(channelName) {
|
453
|
+
this.vent = new Backbone.Wreqr.EventAggregator();
|
454
|
+
this.reqres = new Backbone.Wreqr.RequestResponse();
|
455
|
+
this.commands = new Backbone.Wreqr.Commands();
|
456
|
+
this.channelName = channelName;
|
457
|
+
};
|
458
|
+
|
459
|
+
_.extend(Channel.prototype, {
|
460
|
+
|
461
|
+
// Remove all handlers from the messaging systems of this channel
|
462
|
+
reset: function() {
|
463
|
+
this.vent.off();
|
464
|
+
this.vent.stopListening();
|
465
|
+
this.reqres.removeAllHandlers();
|
466
|
+
this.commands.removeAllHandlers();
|
467
|
+
return this;
|
468
|
+
},
|
469
|
+
|
470
|
+
// Connect a hash of events; one for each messaging system
|
471
|
+
connectEvents: function(hash, context) {
|
472
|
+
this._connect('vent', hash, context);
|
473
|
+
return this;
|
474
|
+
},
|
475
|
+
|
476
|
+
connectCommands: function(hash, context) {
|
477
|
+
this._connect('commands', hash, context);
|
478
|
+
return this;
|
479
|
+
},
|
480
|
+
|
481
|
+
connectRequests: function(hash, context) {
|
482
|
+
this._connect('reqres', hash, context);
|
483
|
+
return this;
|
484
|
+
},
|
485
|
+
|
486
|
+
// Attach the handlers to a given message system `type`
|
487
|
+
_connect: function(type, hash, context) {
|
488
|
+
if (!hash) {
|
489
|
+
return;
|
490
|
+
}
|
491
|
+
|
492
|
+
context = context || this;
|
493
|
+
var method = (type === 'vent') ? 'on' : 'setHandler';
|
494
|
+
|
495
|
+
_.each(hash, function(fn, eventName) {
|
496
|
+
this[type][method](eventName, _.bind(fn, context));
|
497
|
+
}, this);
|
498
|
+
}
|
499
|
+
});
|
500
|
+
|
501
|
+
|
502
|
+
return Channel;
|
503
|
+
})(Wreqr);
|
504
|
+
|
505
|
+
// Wreqr.Radio
|
506
|
+
// --------------
|
507
|
+
//
|
508
|
+
// An object that lets you communicate with many channels.
|
509
|
+
Wreqr.radio = (function(Wreqr){
|
510
|
+
"use strict";
|
511
|
+
|
512
|
+
var Radio = function() {
|
513
|
+
this._channels = {};
|
514
|
+
this.vent = {};
|
515
|
+
this.commands = {};
|
516
|
+
this.reqres = {};
|
517
|
+
this._proxyMethods();
|
518
|
+
};
|
519
|
+
|
520
|
+
_.extend(Radio.prototype, {
|
521
|
+
|
522
|
+
channel: function(channelName) {
|
523
|
+
if (!channelName) {
|
524
|
+
throw new Error('Channel must receive a name');
|
525
|
+
}
|
526
|
+
|
527
|
+
return this._getChannel( channelName );
|
528
|
+
},
|
529
|
+
|
530
|
+
_getChannel: function(channelName) {
|
531
|
+
var channel = this._channels[channelName];
|
532
|
+
|
533
|
+
if(!channel) {
|
534
|
+
channel = new Wreqr.Channel(channelName);
|
535
|
+
this._channels[channelName] = channel;
|
536
|
+
}
|
537
|
+
|
538
|
+
return channel;
|
539
|
+
},
|
540
|
+
|
541
|
+
_proxyMethods: function() {
|
542
|
+
_.each(['vent', 'commands', 'reqres'], function(system) {
|
543
|
+
_.each( messageSystems[system], function(method) {
|
544
|
+
this[system][method] = proxyMethod(this, system, method);
|
545
|
+
}, this);
|
546
|
+
}, this);
|
547
|
+
}
|
548
|
+
});
|
549
|
+
|
550
|
+
|
551
|
+
var messageSystems = {
|
552
|
+
vent: [
|
553
|
+
'on',
|
554
|
+
'off',
|
555
|
+
'trigger',
|
556
|
+
'once',
|
557
|
+
'stopListening',
|
558
|
+
'listenTo',
|
559
|
+
'listenToOnce'
|
560
|
+
],
|
561
|
+
|
562
|
+
commands: [
|
563
|
+
'execute',
|
564
|
+
'setHandler',
|
565
|
+
'setHandlers',
|
566
|
+
'removeHandler',
|
567
|
+
'removeAllHandlers'
|
568
|
+
],
|
569
|
+
|
570
|
+
reqres: [
|
571
|
+
'request',
|
572
|
+
'setHandler',
|
573
|
+
'setHandlers',
|
574
|
+
'removeHandler',
|
575
|
+
'removeAllHandlers'
|
576
|
+
]
|
577
|
+
};
|
578
|
+
|
579
|
+
var proxyMethod = function(radio, system, method) {
|
580
|
+
return function(channelName) {
|
581
|
+
var messageSystem = radio._getChannel(channelName)[system];
|
582
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
583
|
+
|
584
|
+
messageSystem[method].apply(messageSystem, args);
|
585
|
+
};
|
586
|
+
};
|
587
|
+
|
588
|
+
return new Radio();
|
589
|
+
|
590
|
+
})(Wreqr);
|
591
|
+
|
444
592
|
|
445
593
|
return Wreqr;
|
446
594
|
})(Backbone, Backbone.Marionette, _);
|
@@ -1257,10 +1405,6 @@ Marionette.View = Backbone.View.extend({
|
|
1257
1405
|
constructor: function(options){
|
1258
1406
|
_.bindAll(this, "render");
|
1259
1407
|
|
1260
|
-
if (_.isObject(this.behaviors)) {
|
1261
|
-
new Marionette.Behaviors(this);
|
1262
|
-
}
|
1263
|
-
|
1264
1408
|
// this exposes view options to the view initializer
|
1265
1409
|
// this is a backfill since backbone removed the assignment
|
1266
1410
|
// of this.options
|
@@ -1269,6 +1413,11 @@ Marionette.View = Backbone.View.extend({
|
|
1269
1413
|
|
1270
1414
|
// parses out the @ui DSL for events
|
1271
1415
|
this.events = this.normalizeUIKeys(_.result(this, 'events'));
|
1416
|
+
|
1417
|
+
if (_.isObject(this.behaviors)) {
|
1418
|
+
new Marionette.Behaviors(this);
|
1419
|
+
}
|
1420
|
+
|
1272
1421
|
Backbone.View.prototype.constructor.apply(this, arguments);
|
1273
1422
|
|
1274
1423
|
Marionette.MonitorDOMRefresh(this);
|
@@ -2208,6 +2357,11 @@ Marionette.Behavior = (function(_, Backbone){
|
|
2208
2357
|
_.extend(Behavior.prototype, Backbone.Events, {
|
2209
2358
|
initialize: function(){},
|
2210
2359
|
|
2360
|
+
// stopListening to behavior `onListen` events.
|
2361
|
+
close: function() {
|
2362
|
+
this.stopListening();
|
2363
|
+
},
|
2364
|
+
|
2211
2365
|
// Setup class level proxy for triggerMethod.
|
2212
2366
|
triggerMethod: Marionette.triggerMethod
|
2213
2367
|
});
|
@@ -2245,7 +2399,7 @@ Marionette.Behaviors = (function(Marionette, _) {
|
|
2245
2399
|
'delegateEvents', 'undelegateEvents',
|
2246
2400
|
'onShow', 'onClose',
|
2247
2401
|
'behaviorEvents', 'triggerMethod',
|
2248
|
-
'setElement'
|
2402
|
+
'setElement', 'close'
|
2249
2403
|
]);
|
2250
2404
|
}
|
2251
2405
|
|
@@ -2261,6 +2415,17 @@ Marionette.Behaviors = (function(Marionette, _) {
|
|
2261
2415
|
}, this);
|
2262
2416
|
},
|
2263
2417
|
|
2418
|
+
close: function(close, behaviors) {
|
2419
|
+
var args = _.tail(arguments, 2);
|
2420
|
+
close.apply(this, args);
|
2421
|
+
|
2422
|
+
// Call close on each behavior after
|
2423
|
+
// closing down the view.
|
2424
|
+
// This unbinds event listeners
|
2425
|
+
// that behaviors have registerd for.
|
2426
|
+
_.invoke(behaviors, 'close', args);
|
2427
|
+
},
|
2428
|
+
|
2264
2429
|
onShow: function(onShow, behaviors) {
|
2265
2430
|
var args = _.tail(arguments, 2);
|
2266
2431
|
|
@@ -2319,8 +2484,8 @@ Marionette.Behaviors = (function(Marionette, _) {
|
|
2319
2484
|
undelegateEvents.apply(this, args);
|
2320
2485
|
|
2321
2486
|
_.each(behaviors, function(b) {
|
2322
|
-
Marionette.unbindEntityEvents(
|
2323
|
-
Marionette.unbindEntityEvents(
|
2487
|
+
Marionette.unbindEntityEvents(b, this.model, Marionette.getOption(b, "modelEvents"));
|
2488
|
+
Marionette.unbindEntityEvents(b, this.collection, Marionette.getOption(b, "collectionEvents"));
|
2324
2489
|
}, this);
|
2325
2490
|
},
|
2326
2491
|
|
@@ -1 +1 @@
|
|
1
|
-
//= require js_stack/base/marionette/1.8.
|
1
|
+
//= require js_stack/base/marionette/1.8.3
|