bootstrap-timepicker-rails-addon 0.2.6.2 → 0.3.0
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: 9c43149fd64f5a73bfac3fabf476ba171f611fec
|
4
|
+
data.tar.gz: 6574c731da5c59d6d19b6f3a4bff706e4b78d2d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b336fca9f09bb8f2bc2af8681341a118da95b4cbcf4106ed214652df218964a674ee843999a69170a1b89c192b6f192d86aeb1afcc8b2db775fd0085cb58c2ab
|
7
|
+
data.tar.gz: 678ffdfc30c0fd73e8d93936a7b192cd705941e7175ba679e56d78c71bded94be9f9e9614965d8198b19a224de4672e176292b1461578302e4347dbd8f235a5e
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Bootstrap::Timepicker::Rails::Addon
|
2
2
|
This is the GEMified version of [bootstrap-timepicker](https://github.com/jdewit/bootstrap-timepicker)
|
3
3
|
|
4
|
-
bootstrap-timepicker-rails-addon project integrates Timepicker for Twitter Bootstrap
|
4
|
+
bootstrap-timepicker-rails-addon project integrates Timepicker for Twitter Bootstrap with Rails 3 and 4 assets pipeline.
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
@@ -29,6 +29,7 @@
|
|
29
29
|
this.template = options.template;
|
30
30
|
this.appendWidgetTo = options.appendWidgetTo;
|
31
31
|
this.showWidgetOnAddonClick = options.showWidgetOnAddonClick;
|
32
|
+
this.maxHours = options.maxHours-1;
|
32
33
|
|
33
34
|
this._init();
|
34
35
|
};
|
@@ -119,7 +120,7 @@
|
|
119
120
|
}
|
120
121
|
} else {
|
121
122
|
if (this.hour <= 0) {
|
122
|
-
this.hour =
|
123
|
+
this.hour = this.maxHours;
|
123
124
|
} else {
|
124
125
|
this.hour--;
|
125
126
|
}
|
@@ -255,16 +256,16 @@
|
|
255
256
|
|
256
257
|
templateContent = '<table>'+
|
257
258
|
'<tr>'+
|
258
|
-
'<td><a href="#" data-action="incrementHour"><
|
259
|
+
'<td><a href="#" data-action="incrementHour"><span class="glyphicon glyphicon-chevron-up"></span></a></td>'+
|
259
260
|
'<td class="separator"> </td>'+
|
260
|
-
'<td><a href="#" data-action="incrementMinute"><
|
261
|
+
'<td><a href="#" data-action="incrementMinute"><span class="glyphicon glyphicon-chevron-up"></span></a></td>'+
|
261
262
|
(this.showSeconds ?
|
262
263
|
'<td class="separator"> </td>'+
|
263
|
-
'<td><a href="#" data-action="incrementSecond"><
|
264
|
+
'<td><a href="#" data-action="incrementSecond"><span class="glyphicon glyphicon-chevron-up"></span></a></td>'
|
264
265
|
: '') +
|
265
266
|
(this.showMeridian ?
|
266
267
|
'<td class="separator"> </td>'+
|
267
|
-
'<td class="meridian-column"><a href="#" data-action="toggleMeridian"><
|
268
|
+
'<td class="meridian-column"><a href="#" data-action="toggleMeridian"><span class="glyphicon glyphicon-chevron-up"></span></a></td>'
|
268
269
|
: '') +
|
269
270
|
'</tr>'+
|
270
271
|
'<tr>'+
|
@@ -281,16 +282,16 @@
|
|
281
282
|
: '') +
|
282
283
|
'</tr>'+
|
283
284
|
'<tr>'+
|
284
|
-
'<td><a href="#" data-action="decrementHour"><
|
285
|
+
'<td><a href="#" data-action="decrementHour"><span class="glyphicon glyphicon-chevron-down"></span></a></td>'+
|
285
286
|
'<td class="separator"></td>'+
|
286
|
-
'<td><a href="#" data-action="decrementMinute"><
|
287
|
+
'<td><a href="#" data-action="decrementMinute"><span class="glyphicon glyphicon-chevron-down"></span></a></td>'+
|
287
288
|
(this.showSeconds ?
|
288
289
|
'<td class="separator"> </td>'+
|
289
|
-
'<td><a href="#" data-action="decrementSecond"><
|
290
|
+
'<td><a href="#" data-action="decrementSecond"><span class="glyphicon glyphicon-chevron-down"></span></a></td>'
|
290
291
|
: '') +
|
291
292
|
(this.showMeridian ?
|
292
293
|
'<td class="separator"> </td>'+
|
293
|
-
'<td><a href="#" data-action="toggleMeridian"><
|
294
|
+
'<td><a href="#" data-action="toggleMeridian"><span class="glyphicon glyphicon-chevron-down"></span></a></td>'
|
294
295
|
: '') +
|
295
296
|
'</tr>'+
|
296
297
|
'</table>';
|
@@ -513,7 +514,7 @@
|
|
513
514
|
this.hour = 0;
|
514
515
|
}
|
515
516
|
}
|
516
|
-
if (this.hour ===
|
517
|
+
if (this.hour === this.maxHours) {
|
517
518
|
this.hour = 0;
|
518
519
|
|
519
520
|
return;
|
@@ -809,8 +810,8 @@
|
|
809
810
|
hour = 12;
|
810
811
|
}
|
811
812
|
} else {
|
812
|
-
if (hour
|
813
|
-
hour =
|
813
|
+
if (hour > this.maxHours) {
|
814
|
+
hour = this.maxHours;
|
814
815
|
} else if (hour < 0) {
|
815
816
|
hour = 0;
|
816
817
|
}
|
@@ -1089,7 +1090,8 @@
|
|
1089
1090
|
showMeridian: true,
|
1090
1091
|
template: 'dropdown',
|
1091
1092
|
appendWidgetTo: 'body',
|
1092
|
-
showWidgetOnAddonClick: true
|
1093
|
+
showWidgetOnAddonClick: true,
|
1094
|
+
maxHours: 24
|
1093
1095
|
};
|
1094
1096
|
|
1095
1097
|
$.fn.timepicker.Constructor = Timepicker;
|
@@ -23,10 +23,10 @@
|
|
23
23
|
left: auto;
|
24
24
|
right: 13px;
|
25
25
|
}
|
26
|
-
.bootstrap-timepicker .
|
26
|
+
.bootstrap-timepicker .input-group-addon {
|
27
27
|
cursor: pointer;
|
28
28
|
}
|
29
|
-
.bootstrap-timepicker .
|
29
|
+
.bootstrap-timepicker .input-group-addon i {
|
30
30
|
display: inline-block;
|
31
31
|
width: 16px;
|
32
32
|
height: 16px;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-timepicker-rails-addon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Yang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|