jquery-timepicker-rails 1.3.7 → 1.3.8
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58c295d9f0d5754e344f2d3722b1dae65261aadc
|
4
|
+
data.tar.gz: 601935bee43c7788d1fbfd4be3feab4014ce75e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a444ffe6e31b2679ba4ed11fa86df9aa2f20b79eb35792d58250a7239d05cd6fe6f27fed9eb91f786669311b9fba1b0995e59b514b6df4eed2c429b14bccb078
|
7
|
+
data.tar.gz: b388975a0ebdacb844bccabe1956ebc1917cfef49c47a1c03041760419ee00b498c0b5620779d484f99eefae27d9aa361a1cf321bd4e92f57347670ea0c07986
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/************************
|
2
|
-
jquery-timepicker v1.3.
|
2
|
+
jquery-timepicker v1.3.8
|
3
3
|
http://jonthornton.github.com/jquery-timepicker/
|
4
4
|
|
5
5
|
requires jQuery 1.7+
|
@@ -391,6 +391,7 @@ requires jQuery 1.7+
|
|
391
391
|
|
392
392
|
if ((settings.minTime !== null || settings.durationTime !== null) && settings.showDuration) {
|
393
393
|
wrapped_list.addClass('ui-timepicker-with-duration');
|
394
|
+
wrapped_list.addClass('ui-timepicker-step-'+settings.step);
|
394
395
|
}
|
395
396
|
|
396
397
|
var durStart = settings.minTime;
|
@@ -904,17 +905,31 @@ requires jQuery 1.7+
|
|
904
905
|
|
905
906
|
function _int2duration(seconds)
|
906
907
|
{
|
907
|
-
var minutes = Math.round(seconds/60)
|
908
|
-
|
908
|
+
var minutes = Math.round(seconds/60),
|
909
|
+
duration = [],
|
910
|
+
hours, mins;
|
909
911
|
|
910
|
-
if (
|
912
|
+
if (minutes < 60) {
|
913
|
+
// Only show (x mins) under 1 hour
|
911
914
|
duration = [minutes, _lang.mins];
|
912
|
-
} else if (minutes == 60) {
|
913
|
-
duration = ['1', _lang.hr];
|
914
915
|
} else {
|
915
|
-
|
916
|
-
|
917
|
-
|
916
|
+
hours = Math.floor(minutes/60);
|
917
|
+
mins = minutes%60;
|
918
|
+
|
919
|
+
// Show decimal notation (eg: 1.5 hrs) for 30 minute steps
|
920
|
+
if (step == 30 && mins == 30) {
|
921
|
+
hours += _lang.decimal + 5;
|
922
|
+
}
|
923
|
+
|
924
|
+
duration.push(hours);
|
925
|
+
duration.push(hours == 1 ? _lang.hr : _lang.hrs);
|
926
|
+
|
927
|
+
// Show remainder minutes notation (eg: 1 hr 15 mins) for non-30 minute steps
|
928
|
+
// and only if there are remainder minutes to show
|
929
|
+
if (step != 30 && mins) {
|
930
|
+
duration.push(mins);
|
931
|
+
duration.push(_lang.mins);
|
932
|
+
}
|
918
933
|
}
|
919
934
|
|
920
935
|
return duration.join(' ');
|
@@ -13,6 +13,11 @@
|
|
13
13
|
}
|
14
14
|
|
15
15
|
.ui-timepicker-wrapper.ui-timepicker-with-duration {
|
16
|
+
width: 14em;
|
17
|
+
}
|
18
|
+
|
19
|
+
.ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-30,
|
20
|
+
.ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-60 {
|
16
21
|
width: 11em;
|
17
22
|
}
|
18
23
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-timepicker-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanguy Krotoff (jQuery plugin by Jon Thornton)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|