sudojs-rails 0.5.1 → 0.5.2

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: 553db92bb2ee2ed98365673edf8054cb63ac3a4b
4
- data.tar.gz: 03aba52cdb5d416496d6b7cbc3c19ea916b5c3e8
3
+ metadata.gz: 6409eeebdaf24d9b416362ec4503acaf22089eeb
4
+ data.tar.gz: a39ba527ca084cbaecf6678c8c2b6d9eb058819c
5
5
  SHA512:
6
- metadata.gz: 183d02ba8ef72b089fee1886e4308ec941eec2ce67e68609d3bced539b89e775ac7ea2c8c70683a686c50dcbeb93b5f8fc123cd9dec23e6a40c6b8e3a6d5ce39
7
- data.tar.gz: ba2d0d8cb2407cdb2514c615f54e6e34c3e138be7c7db82893ba13acab4741c8d8ec260837014820b70c2693a5b9ae326eb9ea668fe395974253adb361fee7d0
6
+ metadata.gz: e738a60eecd736a811536b5108fae2d48e33e0f4692682f283eebe31ac6e10459e248399918ed9f51cd64d089b05e80f6643e705ac6d7d88a808f6abe531681f
7
+ data.tar.gz: c020fb704fbce01d0fc2e541f5d96ef861fa6699599555d9ba53d60f041823807ac624b138ec99190f1d452d4e25893488b83c0badb2055d7006b609e1117b45
@@ -1,3 +1,3 @@
1
1
  module Sudojs
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
@@ -475,10 +475,12 @@ sudo.Container.prototype.removeChild = function removeChild(arg) {
475
475
  //
476
476
  // see `removeChild`
477
477
  //
478
+ // `param` {bool} `keep` Optional arg to instruct the parent to `detach` its $el
479
+ // rather than the default `remove` if truthy
478
480
  // `returns` {object} `this`
479
- sudo.Container.prototype.removeChildren = function removeChildren() {
481
+ sudo.Container.prototype.removeChildren = function removeChildren(keep) {
480
482
  while(this.children.length) {
481
- this.children.shift().removeFromParent();
483
+ this.children.shift().removeFromParent(keep);
482
484
  }
483
485
  return this;
484
486
  };
@@ -932,14 +934,15 @@ sudo.DataView.prototype.build = function build() {
932
934
 
933
935
  // ###removeFromParent
934
936
  // Remove this object from the DOM and its parent's list of children.
935
- // Overrides `sudo.View.removeFromParent` to unbind events and remove its $el
936
- // as well if passed a truthy value otherwise will $.detach its $el
937
+ // Overrides `sudo.View.removeFromParent` to unbind events and `remove` its $el
938
+ // as well if not passed a truthy value as 'keep', will `detach` its $el in that case
937
939
  //
938
- // `param` {bool} `remove` should this Object $el.remove or $el.detach?
940
+ // `param` {bool} `keep` Optional arg to Call `detach` if truthy, `remove` by default
941
+ // (if omitted or falsy)
939
942
  // `returns` {Object} `this`
940
- sudo.DataView.prototype.removeFromParent = function removeFromParent(remove) {
943
+ sudo.DataView.prototype.removeFromParent = function removeFromParent(keep) {
941
944
  this.parent.removeChild(this);
942
- this.unbindEvents().$el[remove ? 'remove' : 'detach']();
945
+ this.unbindEvents().$el[keep ? 'detach' : 'remove']();
943
946
  return this;
944
947
  };
945
948
  // ###render
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sudojs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - robrobbins