sudojs-rails 0.5.1 → 0.5.2
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/lib/sudojs/version.rb +1 -1
- data/vendor/assets/javascripts/sudojs/sudo.js +10 -7
- 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: 6409eeebdaf24d9b416362ec4503acaf22089eeb
|
4
|
+
data.tar.gz: a39ba527ca084cbaecf6678c8c2b6d9eb058819c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e738a60eecd736a811536b5108fae2d48e33e0f4692682f283eebe31ac6e10459e248399918ed9f51cd64d089b05e80f6643e705ac6d7d88a808f6abe531681f
|
7
|
+
data.tar.gz: c020fb704fbce01d0fc2e541f5d96ef861fa6699599555d9ba53d60f041823807ac624b138ec99190f1d452d4e25893488b83c0badb2055d7006b609e1117b45
|
data/lib/sudojs/version.rb
CHANGED
@@ -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
|
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} `
|
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(
|
943
|
+
sudo.DataView.prototype.removeFromParent = function removeFromParent(keep) {
|
941
944
|
this.parent.removeChild(this);
|
942
|
-
this.unbindEvents().$el[
|
945
|
+
this.unbindEvents().$el[keep ? 'detach' : 'remove']();
|
943
946
|
return this;
|
944
947
|
};
|
945
948
|
// ###render
|