bjornblomqvist-input_chronic 1.0.3 → 1.0.5

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/input_chronic.rb +15 -14
  3. metadata +2 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.5
@@ -17,26 +17,27 @@ class InputChronic
17
17
  @javascript = %Q{
18
18
 
19
19
  if (jQuery) {
20
+
21
+ function requestChronic(dateType,self) {
22
+ var params = {};
23
+ params[dateType] = self.value;
24
+ $.get('/gems.github.com/bjornblomqvist/input_chronic/parse', params, function(result) {
25
+ $(self).removeClass("chronic_error")
26
+ if(result)
27
+ self.value = result;
28
+ else
29
+ $(self).addClass("chronic_error");
30
+ });
31
+ }
32
+
20
33
  $(document).ready(function() {
21
34
 
22
- function requestChronic(dateType,self) {
23
- var params = {};
24
- params[dateType] = self.value;
25
- $.get('/gems.github.com/bjornblomqvist/input_chronic/parse', params, function(result) {
26
- $(self).removeClass("chronic_error")
27
- if(result)
28
- self.value = result;
29
- else
30
- $(self).addClass("chronic_error");
31
- });
32
- }
33
-
34
35
  $('input.chronic_date').live("change", function() {
35
- requestChronic(date,this);
36
+ requestChronic("date",this);
36
37
  });
37
38
 
38
39
  $('input.chronic_datetime').live("change", function() {
39
- requestChronic(datetime,this);
40
+ requestChronic("datetime",this);
40
41
  });
41
42
 
42
43
  });
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bjornblomqvist-input_chronic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Hansson
@@ -44,7 +44,6 @@ files:
44
44
  - spec/spec_helper.rb
45
45
  has_rdoc: true
46
46
  homepage: http://github.com/bjornblomqvist/input_chronic
47
- licenses:
48
47
  post_install_message:
49
48
  rdoc_options:
50
49
  - --charset=UTF-8
@@ -65,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
64
  requirements: []
66
65
 
67
66
  rubyforge_project:
68
- rubygems_version: 1.3.5
67
+ rubygems_version: 1.2.0
69
68
  signing_key:
70
69
  specification_version: 2
71
70
  summary: A simple Rack-middleware for parsing dates with Chronic