anjlab-widgets 1.0.7 → 1.0.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ec99f00a18ca6d9718827c73d21a1c16ac0f7f0
|
4
|
+
data.tar.gz: 3fee3300ceb57043fd3bae398c700deb8802324f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 722c8309b76f2466c26dad4ece94b3e79aaa912bb83e1cd5b45ba7cd99ad3c921f095dce616514527397e1b1585d946b1236eb669f39b04f3f55857608d3fc69
|
7
|
+
data.tar.gz: 9140eeaa92907c37f0b282a5dd22e4e4acf756f71b11899328d7b83cb67511503aef8b739cfc596d1b134a214f0e5986861ecd368a0f193ff5758c658eefefec
|
@@ -42,10 +42,12 @@ class Timepicker extends NativeRailsTimepicker
|
|
42
42
|
blur: $.proxy(@hide, this)
|
43
43
|
}
|
44
44
|
|
45
|
-
@step
|
46
|
-
@
|
47
|
-
@
|
48
|
-
|
45
|
+
@step = options.step || @element.data('date-time-step') || 30
|
46
|
+
@startTime = options.startTime || (@element.data('date-time-start') || 0) * 60
|
47
|
+
@endTime = options.endTime || (@element.data('date-time-end') || 24) * 60
|
48
|
+
@minTime = options.minTime || (@element.data('date-time-min') || 9) * 60
|
49
|
+
@maxTime = options.maxTime || (@element.data('date-time-max') || 20) * 60
|
50
|
+
|
49
51
|
@fillTimes()
|
50
52
|
@update()
|
51
53
|
@scrollPlaced = false
|
@@ -85,9 +87,9 @@ class Timepicker extends NativeRailsTimepicker
|
|
85
87
|
@element.prop('value', @time)
|
86
88
|
|
87
89
|
fillTimes: ->
|
88
|
-
timeCnt =
|
90
|
+
timeCnt = @startTime
|
89
91
|
html = []
|
90
|
-
while timeCnt <
|
92
|
+
while timeCnt < @endTime
|
91
93
|
mm = timeCnt % 60
|
92
94
|
hh = Math.floor(timeCnt / 60)
|
93
95
|
mm = (if mm < 10 then '0' else '') + mm
|
@@ -20,7 +20,7 @@ module Anjlab
|
|
20
20
|
:value => Widgets::format_date(time),
|
21
21
|
:required => input_html_options[:required],
|
22
22
|
:class => "#{input_html_options[:date_class] || 'input-small'}"
|
23
|
-
}
|
23
|
+
}.merge(input_html_options)
|
24
24
|
|
25
25
|
time_data = {
|
26
26
|
"data-widget" => "timepicker",
|
@@ -28,7 +28,7 @@ module Anjlab
|
|
28
28
|
:value => Widgets::format_time(time),
|
29
29
|
:required => input_html_options[:required],
|
30
30
|
:class => "#{input_html_options[:time_class] || 'input-small'}"
|
31
|
-
}
|
31
|
+
}.merge(input_html_options)
|
32
32
|
|
33
33
|
case input_type
|
34
34
|
when :datetime, :anjlab_datetime
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anjlab-widgets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Korolev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anjlab-bootstrap-rails
|