jquery_datetimepick 1.3.4 → 1.3.5

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: 49693dc7849afe540aa873ce5c1c9543e72d50d6
4
- data.tar.gz: 30ee4f95788beb90a6ce84b06d67b4e765a3680a
3
+ metadata.gz: ce342ecbee517565558edb8a39cb6e93acdf1f34
4
+ data.tar.gz: 69ecc0693b3adf6da1fda1861ec0aa8b9f239564
5
5
  SHA512:
6
- metadata.gz: 9c4dc1d5bb28f80d590a471ac974a005a1a3278d3ec68db84111dfbcd02859656a4a7272255300d14f6638722ca7a5e001c668df853c2b1a75bb12ecce3f0831
7
- data.tar.gz: f92a586e8caddd8f4139588fc6b5bac5e899d1bb30aa8027f1779a2adf62530e7f6a8e37b4523ce5c401525fa26beea9513268c593348d5577d6e4d8a2273a68
6
+ metadata.gz: 2050e61fb3637522db69961b18f3a0c76feb9361cfb684dd4c2d28662c1baeb3aee7f512a097398a0eccdca79f9b539578e121964b4365159fb90f5cf2f07621
7
+ data.tar.gz: 288b3f65579a2d5814d11bc885ecc633769b1dddb09850531e54e33539654164ee73f8b15144e17a061159421fcf7b02ba72c2faf5e1cb0b213daec0af2939d7
@@ -2,7 +2,7 @@ require 'date'
2
2
 
3
3
  module JqueryDatetimepick
4
4
  module FormHelper
5
-
5
+
6
6
  include ActionView::Helpers::JavaScriptHelper
7
7
 
8
8
  # Mehtod that generates datetimepicker input field inside a form
@@ -30,7 +30,7 @@ module JqueryDatetimepick
30
30
  html += javascript_tag("jQuery(document).ready(function(){jQuery('##{input_tag.get_name_and_id["id"]}').datetimepicker($.extend(#{json}, $.timepicker.regional[#{I18n.locale}]))});")
31
31
  html.html_safe
32
32
  end
33
-
33
+
34
34
  end
35
35
 
36
36
  end
@@ -42,45 +42,45 @@ module JqueryDatetimepick::FormBuilder
42
42
  end
43
43
 
44
44
  module JqueryDatetimepick_instance
45
- FORMAT_REPLACEMENTES = { "yy" => "%Y", "mm" => "%m", "dd" => "%d", "d" => "%-d", "m" => "%-m", "y" => "%y", "M" => "%b", "hh" => "%H", "h" => "%I", "mm" => "%M"}
46
-
45
+ FORMAT_REPLACEMENTES = { "yy" => "%Y", "mm" => "%m", "dd" => "%d", "d" => "%-d", "m" => "%-m", "y" => "%y", "M" => "%b", "hh" => "%H", "h" => "%I", "MM" => "%M"}
46
+
47
47
  # Extending ActionView::Helpers::InstanceTag module to make Rails build the name and id
48
48
  # Just returns the options before generate the HTML in order to use the same id and name (see to_input_field_tag mehtod)
49
-
49
+
50
50
  def get_name_and_id(options = {})
51
51
  add_default_name_and_id(options)
52
52
  options
53
53
  end
54
-
54
+
55
55
  def available_datetimepicker_options
56
- [ :altField, :altFormat, :appendText, :autoSize, :alwaysSetTime, :altFieldTimeOnly, :altTimeFormat, :altSeparator,
56
+ [ :altField, :altFormat, :appendText, :autoSize, :alwaysSetTime, :altFieldTimeOnly, :altTimeFormat, :altSeparator,
57
57
  :altTimeSuffix, :addSliderAccess,
58
- :buttonImage, :buttonImageOnly, :buttonText,
59
- :calculateWeek, :changeMonth, :changeYear, :closeText, :constrainInput, :currentText, :controlType,
58
+ :buttonImage, :buttonImageOnly, :buttonText,
59
+ :calculateWeek, :changeMonth, :changeYear, :closeText, :constrainInput, :currentText, :controlType,
60
60
  :disabled, :dateFormat, :dayNames, :dayNamesMin, :dayNamesShort, :defaultDate, :duration, :defaultValue,
61
- :firstDay,
62
- :gotoCurrent,
61
+ :firstDay,
62
+ :gotoCurrent,
63
63
  :hideIfNoPrevNext, :hourMin, :hourMax, :hourGrid,
64
- :isRTL,
64
+ :isRTL,
65
65
  :maxDate, :minDate, :monthNames, :monthNamesShort, :minuteMin, :millisecMin, :microsecMin, :minuteMax, :millisecMax, :microsecMax,
66
66
  :minuteGrid, :millisecGrid, :microsecGrid, :minDateTime, :maxDateTime,
67
- :navigationAsDateFormat, :nextText, :numberOfMonths,
68
- :prevText,
69
- :selectOtherMonths, :shortYearCutoff, :showAnim, :showButtonPanel, :showCurrentAtPos,
67
+ :navigationAsDateFormat, :nextText, :numberOfMonths,
68
+ :prevText,
69
+ :selectOtherMonths, :shortYearCutoff, :showAnim, :showButtonPanel, :showCurrentAtPos,
70
70
  :showMonthAfterYear, :showOn, :showOptions, :showOtherMonths, :showWeek, :stepMonths,
71
71
  :showHour, :showMinute, :showSecond, :showMilliSecond, :showMicrosec, :showTimewone,
72
- :showTime,:stepHour, :stepMinute, :stepSecond, :stepMillisec, :stepMicrosec, :secondMin, :secondMax,
72
+ :showTime,:stepHour, :stepMinute, :stepSecond, :stepMillisec, :stepMicrosec, :secondMin, :secondMax,
73
73
  :secondGrid, :separator, :showTimepicker,
74
74
  :timeOnly, :timezonelist,
75
- :weekHeader,
75
+ :weekHeader,
76
76
  :yearRange, :yearSuffix]
77
77
  end
78
-
78
+
79
79
  def split_options(options)
80
80
  tf_options = options.slice!(*available_datetimepicker_options)
81
81
  return options, tf_options
82
82
  end
83
-
83
+
84
84
  def format_datetime(tb_formatted, format)
85
85
  new_format = translate_format(format)
86
86
  DateTime.parse(tb_formatted).strftime(new_format)
@@ -89,7 +89,7 @@ module JqueryDatetimepick_instance
89
89
  # Method that translates the datepicker date formats, defined in (http://docs.jquery.com/UI/Datepicker/formatDate)
90
90
  # to the ruby standard format (http://www.ruby-doc.org/core-1.9.3/Time.html#method-i-strftime).
91
91
  # This gem is not going to support all the options, just the most used.
92
-
92
+
93
93
  def translate_format(format)
94
94
  format.gsub!(/#{FORMAT_REPLACEMENTES.keys.join("|")}/) { |match| FORMAT_REPLACEMENTES[match] }
95
95
  end
@@ -1,3 +1,3 @@
1
1
  module JqueryDatetimepick
2
- VERSION = "1.3.4"
2
+ VERSION = "1.3.5"
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery_datetimepick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Herman verschooten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-25 00:00:00.000000000 Z
11
+ date: 2015-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery_datepick
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: '0'
34
34
  type: :development
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: '0'
41
41
  description: Rails form helpers for jQuery DateTime picker
@@ -45,7 +45,7 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - .gitignore
48
+ - ".gitignore"
49
49
  - Gemfile
50
50
  - LICENSE.txt
51
51
  - README.md
@@ -105,17 +105,17 @@ require_paths:
105
105
  - lib
106
106
  required_ruby_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - '>='
113
+ - - ">="
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
117
  rubyforge_project:
118
- rubygems_version: 2.0.3
118
+ rubygems_version: 2.4.5.1
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: This gem requires the jquery_datepick gem and adds the necessary styles and