transistor 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 285f53c281cb9bbd5807c07c975c3af2d522a4c0
4
- data.tar.gz: 5ee6e658e25e58a75223c85f5d83878aa6af4fe2
3
+ metadata.gz: a1641a3740232c97ce8ac3901f5306f58282646d
4
+ data.tar.gz: c0f4cbd489f54a6b2f6718d28a292533a6fd70c9
5
5
  SHA512:
6
- metadata.gz: 93bb735044b2cf4a1a7a0ff4b71e67e6c6fada8ddf6805f67ef4b738a88055a0b2823ee79fa7628c4caf0dbb720df25043edc6b900ee829419f78599aaa67c6b
7
- data.tar.gz: 9ca251dcb8b271695de6cef5ab718e8e6af6ef99ab09f912f33f9198e8260d9520c5b6e140f6d33f83d334cfae7765838fb51dbd79fe6d256efa4fec0e30f33b
6
+ metadata.gz: 81585516570999a3c5b3f2b31b6f7e881e064f30d955ba1a1037b19a43562439f5f6d5fb0d789c5ee7c578e9d787098ab689cb2fe19bef6131de6a61c625cf63
7
+ data.tar.gz: bdf0f286f2d7209f262e1ff279e06ce91b4bea74337a90bf4de6ce70c74fb157e9cddaf4a0a10457b6a41dcf5c454c78e3b8cf158095d5327d69b711ebece21d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- transistor (0.1.10)
4
+ transistor (0.1.11)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1 +1 @@
1
- if(window.Transistor===undefined){window.Transistor={}}(function(j){var q=(function(){return function(h){var k,n,g,o,e,r,b,f,i,p;k=h.backbone;n=h.underscore;g=h.channel;o=h.radio;e=h.control;r=(function(){return{}}());b=new k.Collection();b.on('change',function(a){var c=n.clone(a.attributes),d=a.id;if(!e){throw"BackboneCollection is not mutable by user. The model with id "+a.id+" has been changed";}else{delete c.id;e.update(g,d,c)}});f={add:b.add,remove:b.remove,reset:b.reset,set:b.set};i={add:function(a){e.insert(g,a)},remove:function(a){e.remove(g,a.id)},set:function(a){e.set(g,a)}};i.reset=i.set;(function(d){var m=true,l=function(c){d[c]=(function(a){return function(){if(m){if(!e){throw"BackboneCollection is not mutable by user.";}else{i[a].apply(i,arguments)}}else{return f[a].apply(b,arguments)}}}(c))};f.asPublic=function(a){m=false;a();m=true};l('add');l('remove');l('reset');l('set')}(b));p=j.Binder({set:function(d){f.asPublic(function(){var a=[],c;for(c=0;c<d.length;c+=1){a.push(new k.Model(d[c]))}b.set(a)})},insert:function(a){f.asPublic(function(){b.add(new k.Model(a))})},update:function(c,d){f.asPublic(function(){var a=b.get(c);a.clear({silent:true});a.set(d,{silent:true})})},remove:function(c){f.asPublic(function(){var a=b.get(c);b.remove(a)})}});o.tune(g,p);return b}}());if(j.Backbone===undefined){j.Backbone={}}j.Backbone.Collection=q}(window.Transistor));
1
+ if(window.Transistor===undefined){window.Transistor={}}(function(k){var q=(function(){return function(h){var l,n,g,o,e,r,b,f,i,p;l=h.backbone;n=h.underscore;g=h.channel;o=h.radio;e=h.control;r=(function(){return{}}());b=new l.Collection();b.on('change',function(a,c){var d=n.clone(a.attributes),j=a.id;if(c.from_radiotower===undefined){if(!e){throw"BackboneCollection is not mutable by user. The model with id "+a.id+" has been changed";}else{delete d.id;e.update(g,j,d)}}});f={add:b.add,remove:b.remove,reset:b.reset,set:b.set};i={add:function(a){e.insert(g,a)},remove:function(a){e.remove(g,a.id)},set:function(a){e.set(g,a)}};i.reset=i.set;(function(d){var j=true,m=function(c){d[c]=(function(a){return function(){if(j){if(!e){throw"BackboneCollection is not mutable by user.";}else{i[a].apply(i,arguments)}}else{return f[a].apply(b,arguments)}}}(c))};f.asPublic=function(a){j=false;a();j=true};m('add');m('remove');m('reset');m('set')}(b));p=k.Binder({set:function(d){f.asPublic(function(){var a=[],c;for(c=0;c<d.length;c+=1){a.push(new l.Model(d[c]))}b.set(a)})},insert:function(a){f.asPublic(function(){b.add(new l.Model(a))})},update:function(c,d){f.asPublic(function(){var a=b.get(c);a.clear({silent:true});a.set(d,{from_radiotower:true})})},remove:function(c){f.asPublic(function(){var a=b.get(c);b.remove(a)})}});o.tune(g,p);return b}}());if(k.Backbone===undefined){k.Backbone={}}k.Backbone.Collection=q}(window.Transistor));
@@ -22,15 +22,17 @@ if (window.Transistor === undefined) {
22
22
  }());
23
23
 
24
24
  backbone_collection = new Backbone.Collection();
25
- backbone_collection.on('change', function (model) {
25
+ backbone_collection.on('change', function (model, options) {
26
26
  var entry = U.clone(model.attributes),
27
27
  id = model.id;
28
28
 
29
- if (!control) {
30
- throw "BackboneCollection is not mutable by user. The model with id "+model.id+" has been changed";
31
- } else {
32
- delete entry.id;
33
- control.update(channel, id, entry);
29
+ if (options.from_radiotower === undefined) {
30
+ if (!control) {
31
+ throw "BackboneCollection is not mutable by user. The model with id "+model.id+" has been changed";
32
+ } else {
33
+ delete entry.id;
34
+ control.update(channel, id, entry);
35
+ }
34
36
  }
35
37
  });
36
38
 
@@ -99,7 +101,7 @@ if (window.Transistor === undefined) {
99
101
  collection_interface.asPublic(function () {
100
102
  var model = backbone_collection.get(id);
101
103
  model.clear({silent: true});
102
- model.set(entry, {silent: true});
104
+ model.set(entry, {from_radiotower: true});
103
105
  });
104
106
  },
105
107
  remove: function (id) {
@@ -22,15 +22,17 @@ if (window.Transistor === undefined) {
22
22
  }());
23
23
 
24
24
  backbone_collection = new Backbone.Collection();
25
- backbone_collection.on('change', function (model) {
25
+ backbone_collection.on('change', function (model, options) {
26
26
  var entry = U.clone(model.attributes),
27
27
  id = model.id;
28
28
 
29
- if (!control) {
30
- throw "BackboneCollection is not mutable by user. The model with id "+model.id+" has been changed";
31
- } else {
32
- delete entry.id;
33
- control.update(channel, id, entry);
29
+ if (options.from_radiotower === undefined) {
30
+ if (!control) {
31
+ throw "BackboneCollection is not mutable by user. The model with id "+model.id+" has been changed";
32
+ } else {
33
+ delete entry.id;
34
+ control.update(channel, id, entry);
35
+ }
34
36
  }
35
37
  });
36
38
 
@@ -99,7 +101,7 @@ if (window.Transistor === undefined) {
99
101
  collection_interface.asPublic(function () {
100
102
  var model = backbone_collection.get(id);
101
103
  model.clear({silent: true});
102
- model.set(entry, {silent: true});
104
+ model.set(entry, {from_radiotower: true});
103
105
  });
104
106
  },
105
107
  remove: function (id) {
@@ -22,15 +22,17 @@ if (window.Transistor === undefined) {
22
22
  }());
23
23
 
24
24
  backbone_collection = new Backbone.Collection();
25
- backbone_collection.on('change', function (model) {
25
+ backbone_collection.on('change', function (model, options) {
26
26
  var entry = U.clone(model.attributes),
27
27
  id = model.id;
28
28
 
29
- if (!control) {
30
- throw "BackboneCollection is not mutable by user. The model with id "+model.id+" has been changed";
31
- } else {
32
- delete entry.id;
33
- control.update(channel, id, entry);
29
+ if (options.from_radiotower === undefined) {
30
+ if (!control) {
31
+ throw "BackboneCollection is not mutable by user. The model with id "+model.id+" has been changed";
32
+ } else {
33
+ delete entry.id;
34
+ control.update(channel, id, entry);
35
+ }
34
36
  }
35
37
  });
36
38
 
@@ -99,7 +101,7 @@ if (window.Transistor === undefined) {
99
101
  collection_interface.asPublic(function () {
100
102
  var model = backbone_collection.get(id);
101
103
  model.clear({silent: true});
102
- model.set(entry, {silent: true});
104
+ model.set(entry, {from_radiotower: true});
103
105
  });
104
106
  },
105
107
  remove: function (id) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "transistor"
5
- spec.version = "0.1.10"
5
+ spec.version = "0.1.11"
6
6
 
7
7
  spec.authors = ["Jakob Holderbaum"]
8
8
  spec.email = ["jakob@featurefabrik.de"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transistor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Holderbaum