sudojs-rails 0.4.7 → 0.4.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbb644c09ab21d3500df93cbede3023bacfacfba
4
- data.tar.gz: 6e0fe9702b729f16025cd3b23be6e580271a86d6
3
+ metadata.gz: 749b82adc40d69bcf3d577ee8eb1823ab0227672
4
+ data.tar.gz: 2b780d7060f01ecfb6a3e60abeac11c3e34767e3
5
5
  SHA512:
6
- metadata.gz: 48ac70d1f915348c625b572da7eab797407dbc1bddbf6c497c534c9c8c626411e6baf40008ea14a625ec9180c390b1ea64a755b3ae015744585864650e871858
7
- data.tar.gz: 500391e74e1dead14ba65d771c311c8e1bbfcdbc399f01b0235614327564e2e40dead59ace1547619f26794fb0a6fbe2f563f8025394eb35b628fde53341c8dd
6
+ metadata.gz: 5d5e9b10cc795e4799a9037e5dce5af4cc0b45eae28c9c2e1b5940c7001122d280eb56f34b484f02b05ab466d1516a0beb10696a5c07120b76e9e66397e38974
7
+ data.tar.gz: 6109a38157cab48e991c27e7d41ce6be4630b1da9d992bf01e70a65912aabc25f22c4142a5ee5152a9cff6a98e499f351f7da5dd124baeff13a987e14cef66c1
@@ -1,3 +1,3 @@
1
1
  module Sudojs
2
- VERSION = '0.4.7'
2
+ VERSION = '0.4.8'
3
3
  end
@@ -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
- this.$el.remove();
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.7
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-23 00:00:00.000000000 Z
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.