anjlab-widgets 3.0.6 → 3.0.7

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: 6f6403ded9a72cc1b163af2bb883f19b6d0019a6
4
- data.tar.gz: 0cd05fd418bfb7e3e0a196c45616e9564382aa56
3
+ metadata.gz: b28cad81dd959212c38fee9995139ba90bc1fad1
4
+ data.tar.gz: b9e9619dd628e85f3b5168e2565cd750ea7982d4
5
5
  SHA512:
6
- metadata.gz: c68e174a16a5f11e581cd32144e0a8f3db0d6e836a4163bd29d4bd21993ba4bd278618bc7bb304acff57f8c4ea35134ef832eaabaa3ebf61c6471f2366429648
7
- data.tar.gz: cd71e62b53fb950fdc7a64a1fa3799972b2784113070436eaadab6b05734467f467caff0150f1b70c34eef79fa55a9fef14b8fa1e26f5dadb4d2fb998a10a39c
6
+ metadata.gz: 453d5864f433f2c27c4894a6878af0ce2b5bc06a46bd6d1655967853f4a37ba45c19e455081793b4b5ac727ad4de2c3b7665640500eebc4ab1f0231bcf2008d5
7
+ data.tar.gz: f32c486fac38bf9c8b0adeddc202a2288d094822ec98b27a4de1eaecef9b203eeb8adb7c67ad2dc805350d3976a9eac0ed84fb1e721acf126a62234c43a946e6
data/.gitignore CHANGED
@@ -17,3 +17,4 @@ test/version_tmp
17
17
  tmp
18
18
  .sass-cache
19
19
  log
20
+ .idea
@@ -6,31 +6,32 @@ module Anjlab
6
6
  attribute_name
7
7
  end
8
8
 
9
- def input
9
+ def input(wrapper_options)
10
10
  time = options[:value] || @builder.object.send(attribute_name)
11
11
 
12
12
  html = ''.html_safe
13
13
 
14
14
  allow_blank = !options[:required]
15
+ source_options = merge_wrapper_options(input_html_options, wrapper_options)
15
16
 
16
17
  date_data = {
17
18
  "data-widget" => "datepicker",
18
19
  "data-rails" => true,
19
20
  "data-date-allow-blank" => allow_blank,
20
21
  :value => Widgets::format_date(time),
21
- :required => input_html_options[:required],
22
- :class => "#{input_html_options[:date_class] || 'input-small'}",
23
- :placeholder => "#{input_html_options[:date_placeholder]}"
24
- }.merge(input_html_options)
22
+ :required => source_options[:required],
23
+ :class => "#{source_options[:date_class] || 'input-small'}",
24
+ :placeholder => "#{source_options[:date_placeholder]}"
25
+ }.merge(source_options)
25
26
 
26
27
  time_data = {
27
28
  "data-widget" => "timepicker",
28
29
  "data-rails" => true,
29
30
  :value => Widgets::format_time(time),
30
- :required => input_html_options[:required],
31
- :class => "#{input_html_options[:time_class] || 'input-small'}",
32
- :placeholder => "#{input_html_options[:time_placeholder]}"
33
- }.merge(input_html_options)
31
+ :required => source_options[:required],
32
+ :class => "#{source_options[:time_class] || 'input-small'}",
33
+ :placeholder => "#{source_options[:time_placeholder]}"
34
+ }.merge(source_options)
34
35
 
35
36
  case input_type
36
37
  when :datetime, :anjlab_datetime
@@ -1,5 +1,5 @@
1
1
  module Anjlab
2
2
  module Widgets
3
- VERSION = '3.0.6'
3
+ VERSION = '3.0.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anjlab-widgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.6
4
+ version: 3.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Korolev