sudojs-rails 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sudojs/version.rb +1 -1
- data/vendor/assets/javascripts/sudojs/sudo.js +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 749b82adc40d69bcf3d577ee8eb1823ab0227672
|
4
|
+
data.tar.gz: 2b780d7060f01ecfb6a3e60abeac11c3e34767e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d5e9b10cc795e4799a9037e5dce5af4cc0b45eae28c9c2e1b5940c7001122d280eb56f34b484f02b05ab466d1516a0beb10696a5c07120b76e9e66397e38974
|
7
|
+
data.tar.gz: 6109a38157cab48e991c27e7d41ce6be4630b1da9d992bf01e70a65912aabc25f22c4142a5ee5152a9cff6a98e499f351f7da5dd124baeff13a987e14cef66c1
|
data/lib/sudojs/version.rb
CHANGED
@@ -885,7 +885,6 @@ sudo.DataView = function(el, data) {
|
|
885
885
|
// use this ref to unobserve if desired
|
886
886
|
if(this.model.data.autoRender) this.observer = this.model.observe(this.render.bind(this));
|
887
887
|
this.build();
|
888
|
-
this.bindEvents();
|
889
888
|
if(this.role === 'dataview') this.init();
|
890
889
|
};
|
891
890
|
// `private`
|
@@ -893,8 +892,9 @@ sudo.inherit(sudo.View, sudo.DataView);
|
|
893
892
|
// ###addedToParent
|
894
893
|
// Container's will check for the presence of this method and call it if it is present
|
895
894
|
// after adding a child - essentially, this will auto render the dataview when added to a parent
|
895
|
+
// as well as setup the events
|
896
896
|
sudo.DataView.prototype.addedToParent = function(parent) {
|
897
|
-
return this.render();
|
897
|
+
return this.bindEvents().render();
|
898
898
|
};
|
899
899
|
// ###build
|
900
900
|
// Construct the innerHTML of the $el here so that the behavior of the
|
@@ -916,7 +916,8 @@ sudo.DataView.prototype.build = function build() {
|
|
916
916
|
// `returns` {Object} `this`
|
917
917
|
sudo.DataView.prototype.removeFromParent = function removeFromParent() {
|
918
918
|
this.parent.removeChild(this);
|
919
|
-
|
919
|
+
// all events need to be unbound to avoid memory leaks
|
920
|
+
this.unbindEvents().$el.remove();
|
920
921
|
return this;
|
921
922
|
};
|
922
923
|
// ###render
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sudojs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- robrobbins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Install the latest versions of sudo.js and provide generators for fast
|
14
14
|
and easy use.
|