transistor 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/build/min/transistor-backbone.js +1 -1
- data/build/src/transistor-backbone.js +6 -3
- data/js/transistor/backbone-collection.js +6 -3
- data/lib/assets/javascripts/transistor-backbone.js +6 -3
- data/spec/javascripts/TransistorBackboneCollectionSpec.js +2 -1
- data/transistor.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5242812c3750c6ee59145051f4c6d2d59acd23fa
|
4
|
+
data.tar.gz: 846c98563b15147ca787ae4e404cbaddb48f31ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81d53501ae3943a0a11d1e6f17b19df1987488a971d7a94fea45aa5b36275c3b1a4a07c717108ecb6b2ec617b483af284c9b11486228ed0b9d86ef39216882fe
|
7
|
+
data.tar.gz: 599a2d62bdf1b622b5016deed58c637dc0c5a9929221d8905f0eac4b27cb47b678c230e6d0204422a251b0bc8db8f2af80ad9fcc5484b18d7401a28ce7d9e1c0
|
data/Gemfile.lock
CHANGED
@@ -1 +1 @@
|
|
1
|
-
if(window.Transistor===undefined){window.Transistor={}}(function(i){var p=(function(){return function(j){var k,
|
1
|
+
if(window.Transistor===undefined){window.Transistor={}}(function(i){var p=(function(){return function(j){var k,f,n,g,q,b,d,h,o;k=j.backbone;f=j.channel;n=j.radio;g=j.control;q=(function(){return{}}());b=new k.Collection();d={add:b.add,remove:b.remove,reset:b.reset,set:b.set};h={add:function(a){g.insert(f,a)},remove:function(a){g.remove(f,a.id)},set:function(a){g.set(f,a)}};h.reset=h.set;(function(e){var m=true,l=function(c){e[c]=(function(a){return function(){if(m){if(!g){throw"BackboneCollection is not mutable by user.";}else{h[a].apply(h,arguments)}}else{return d[a].apply(b,arguments)}}}(c))};d.asPublic=function(a){m=false;a();m=true};l('add');l('remove');l('reset');l('set')}(b));o=i.Binder({set:function(e){d.asPublic(function(){var a=[],c;for(c=0;c<e.length;c+=1){a.push(new k.Model(e[c]))}b.set(a)})},insert:function(a){d.asPublic(function(){b.add(new k.Model(a))})},update:function(c,e){d.asPublic(function(){var a=b.get(c);a.clear({silent:true});a.set(e)})},remove:function(c){d.asPublic(function(){var a=b.get(c);b.remove(a)})}});n.tune(f,o);return b}}());if(i.Backbone===undefined){i.Backbone={}}i.Backbone.Collection=p}(window.Transistor));
|
@@ -69,9 +69,12 @@ if (window.Transistor === undefined) {
|
|
69
69
|
binder = transistor.Binder({
|
70
70
|
set: function (collection) {
|
71
71
|
collection_interface.asPublic(function () {
|
72
|
-
var models =
|
73
|
-
|
74
|
-
|
72
|
+
var models = [], i;
|
73
|
+
|
74
|
+
for (i = 0; i < collection.length; i += 1) {
|
75
|
+
models.push(new Backbone.Model(collection[i]));
|
76
|
+
}
|
77
|
+
|
75
78
|
backbone_collection.set(models);
|
76
79
|
});
|
77
80
|
},
|
@@ -69,9 +69,12 @@ if (window.Transistor === undefined) {
|
|
69
69
|
binder = transistor.Binder({
|
70
70
|
set: function (collection) {
|
71
71
|
collection_interface.asPublic(function () {
|
72
|
-
var models =
|
73
|
-
|
74
|
-
|
72
|
+
var models = [], i;
|
73
|
+
|
74
|
+
for (i = 0; i < collection.length; i += 1) {
|
75
|
+
models.push(new Backbone.Model(collection[i]));
|
76
|
+
}
|
77
|
+
|
75
78
|
backbone_collection.set(models);
|
76
79
|
});
|
77
80
|
},
|
@@ -69,9 +69,12 @@ if (window.Transistor === undefined) {
|
|
69
69
|
binder = transistor.Binder({
|
70
70
|
set: function (collection) {
|
71
71
|
collection_interface.asPublic(function () {
|
72
|
-
var models =
|
73
|
-
|
74
|
-
|
72
|
+
var models = [], i;
|
73
|
+
|
74
|
+
for (i = 0; i < collection.length; i += 1) {
|
75
|
+
models.push(new Backbone.Model(collection[i]));
|
76
|
+
}
|
77
|
+
|
75
78
|
backbone_collection.set(models);
|
76
79
|
});
|
77
80
|
},
|
@@ -20,7 +20,7 @@ describe("Transistor.Backbone.Collection", function () {
|
|
20
20
|
}());
|
21
21
|
|
22
22
|
collection = new Transistor.Backbone.Collection({
|
23
|
-
backbone: Backbone
|
23
|
+
backbone: Backbone,
|
24
24
|
channel: 'news',
|
25
25
|
radio: radio
|
26
26
|
})
|
@@ -62,6 +62,7 @@ describe("Transistor.Backbone.Collection", function () {
|
|
62
62
|
}());
|
63
63
|
|
64
64
|
collection = Transistor.Backbone.Collection({
|
65
|
+
backbone: Backbone,
|
65
66
|
channel: 'news',
|
66
67
|
radio: radio,
|
67
68
|
control: control
|
data/transistor.gemspec
CHANGED