elementaljs-rails 0.0.1 → 0.0.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.
@@ -1,5 +1,5 @@
1
1
  module Elementaljs
2
2
  module Rails
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This behavior adds a class of 'js' to the element.
3
+ *
4
+ * Although simple, this technique is useful when applied to the BODY element in the DOM.
5
+ * Stylesheets can then target the page if the page has Javascript enabled (as the new class
6
+ * will be applied), or target a Javascript less environment where the class will not be applied.
7
+ */
8
+ Elemental.JavascriptEnabled = function(el){
9
+ el.addClass('js');
10
+ };
@@ -0,0 +1,14 @@
1
+ Elemental.Reload = function(element){
2
+ setInterval(function(){
3
+ var options = {
4
+ dataType: 'html',
5
+ beforeSend: function(xhr){
6
+ xhr.setRequestHeader('X-PJAX', 'true');
7
+ },
8
+ success: function(data) {
9
+ $(element).html(data);
10
+ }
11
+ };
12
+ $.ajax(options);
13
+ }, 30000)
14
+ };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elementaljs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-03 00:00:00.000000000 Z
12
+ date: 2012-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jquery-rails
@@ -52,6 +52,8 @@ extra_rdoc_files: []
52
52
  files:
53
53
  - lib/elementaljs-rails/version.rb
54
54
  - lib/elementaljs-rails.rb
55
+ - vendor/assets/javascripts/elemental-javascript_enabled.js
56
+ - vendor/assets/javascripts/elemental-reload.js
55
57
  - vendor/assets/javascripts/elemental.js
56
58
  - LICENSE
57
59
  - README.md
@@ -70,7 +72,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
72
  version: '0'
71
73
  segments:
72
74
  - 0
73
- hash: -3273581459257528898
75
+ hash: 3360750349577102486
74
76
  required_rubygems_version: !ruby/object:Gem::Requirement
75
77
  none: false
76
78
  requirements:
@@ -79,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
81
  version: '0'
80
82
  segments:
81
83
  - 0
82
- hash: -3273581459257528898
84
+ hash: 3360750349577102486
83
85
  requirements: []
84
86
  rubyforge_project:
85
87
  rubygems_version: 1.8.24