elementaljs-rails 0.0.11 → 0.0.12

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: e99fc8cdf16b5047860557ed3cbc35af52b2f27f
4
- data.tar.gz: 8b83176d1a4fabf5e326727cf46ed282b7ae8b56
3
+ metadata.gz: 8f204b8e7c8df0f68d7948096a70541f600da891
4
+ data.tar.gz: 761c6833b5a5d5d96f768fccdf8ef6dea0d8ce49
5
5
  SHA512:
6
- metadata.gz: 6d2b1674d179bdcb82e6d7fe8d4c1c6e57a94e861911841752bee26136983d7ea7f7afe5137f01eb59476852ddfc3b4a784a6f0ef31eef524dc2e32719354afb
7
- data.tar.gz: 76adba4f01d83b9c6399eb78c9221290f845237869fe4239512478076cdfe119582670992426383b44b0b30f5a24c25489ddd8346dd9b610efab0c4e59cb77de
6
+ metadata.gz: b2e61448f3c001963610aaa8cb03921077444eba3284670253d40eb424167c733dfd06028805983b7a813fc11c530c80cad014f67a89d03f22b6044373824a72
7
+ data.tar.gz: 6655e7dd48c8c3b3deb96516923c54e66236bc10ad9cfeaaef9e653b145878c18965070e2b7f2123dfe65d76481da34632ab0c6f2a8cf39d645ee7b8b3265f49
data/README.md CHANGED
@@ -30,7 +30,7 @@ If you are also using the behaviours that come with the Gem, you can use by incl
30
30
 
31
31
  //= require elemental-reload
32
32
  //= require elemental-javascript_enabled
33
- //= require elemental-jquery_plugin
33
+ //= require elemental-jquery_plugin
34
34
 
35
35
  ## Contributing
36
36
 
@@ -1,5 +1,5 @@
1
1
  module Elementaljs
2
2
  module Rails
3
- VERSION = "0.0.11"
3
+ VERSION = "0.0.12"
4
4
  end
5
5
  end
@@ -28,15 +28,23 @@
28
28
  }
29
29
  };
30
30
 
31
+ var attachBehaviorsToElement = function(element) {
32
+ var $element = $(element);
33
+ var behaviors = $element.data('behavior');
34
+ behaviors.replace(/([^ ]+)/g, function(behavior) {
35
+ attachBehavior($element, behavior);
36
+ });
37
+ };
38
+
39
+ ns.loadOnly = function(element) {
40
+ attachBehaviorsToElement(element);
41
+ };
42
+
31
43
  ns.load = function(container) {
32
44
  var $selector = $('[data-behavior]', container).add($(container).filter('[data-behavior]'));
33
45
 
34
46
  $selector.each(function(index, element) {
35
- var $element = $(element);
36
- var behaviors = $element.data('behavior');
37
- behaviors.replace(/([^ ]+)/g, function(behavior) {
38
- attachBehavior($element, behavior);
39
- });
47
+ attachBehaviorsToElement(element);
40
48
  });
41
49
  };
42
50
 
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elementaljs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robbie Clutton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-02 00:00:00.000000000 Z
11
+ date: 2015-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.1'
41
41
  description: A Gem wrapper for ElementalJS
@@ -45,15 +45,15 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - lib/elementaljs-rails/version.rb
48
+ - LICENSE
49
+ - README.md
49
50
  - lib/elementaljs-rails.rb
51
+ - lib/elementaljs-rails/version.rb
50
52
  - vendor/assets/javascripts/elemental-javascript_enabled.js
51
53
  - vendor/assets/javascripts/elemental-jquery_plugin.js
52
54
  - vendor/assets/javascripts/elemental-onload.js
53
55
  - vendor/assets/javascripts/elemental-reload.js
54
56
  - vendor/assets/javascripts/elemental.js
55
- - LICENSE
56
- - README.md
57
57
  homepage: ''
58
58
  licenses:
59
59
  - MIT
@@ -65,17 +65,17 @@ require_paths:
65
65
  - vendor
66
66
  required_ruby_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - '>='
68
+ - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.0.3
78
+ rubygems_version: 2.2.2
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: A Gem wrapper for ElementalJS