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: 73ef986c743ddd07b6efa2abc64c65c3f9888b49
4
- data.tar.gz: e7303c0b0db59c96dd3c51fa9e426b00b321d52d
3
+ metadata.gz: 9c43149fd64f5a73bfac3fabf476ba171f611fec
4
+ data.tar.gz: 6574c731da5c59d6d19b6f3a4bff706e4b78d2d4
5
5
  SHA512:
6
- metadata.gz: c71615436357e27de40230de0cc7ddf2a8d6cf8ae3dae38aad63159aaac6a489494f6c51db06e8228c4e94dcc6c6d15373f234f2e824d160da3555a2d47364c6
7
- data.tar.gz: 0ffdef80c3570637f38f65cbe6e370c9c8bfbf4a84f7f0ebf30df64515c5b0fbde1b0938bb371a93a716481db6ce14f4af704ebb2a6d9af9a5f3e23959f35ac6
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 2.x with Rails 3 and 4 assets pipeline.
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
 
@@ -2,7 +2,7 @@ module Bootstrap
2
2
  module Timepicker
3
3
  module Rails
4
4
  module Addon
5
- VERSION = "0.2.6.2"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
8
8
  end
@@ -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 = 23;
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"><i class="icon-chevron-up"></i></a></td>'+
259
+ '<td><a href="#" data-action="incrementHour"><span class="glyphicon glyphicon-chevron-up"></span></a></td>'+
259
260
  '<td class="separator">&nbsp;</td>'+
260
- '<td><a href="#" data-action="incrementMinute"><i class="icon-chevron-up"></i></a></td>'+
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">&nbsp;</td>'+
263
- '<td><a href="#" data-action="incrementSecond"><i class="icon-chevron-up"></i></a></td>'
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">&nbsp;</td>'+
267
- '<td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="icon-chevron-up"></i></a></td>'
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"><i class="icon-chevron-down"></i></a></td>'+
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"><i class="icon-chevron-down"></i></a></td>'+
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">&nbsp;</td>'+
289
- '<td><a href="#" data-action="decrementSecond"><i class="icon-chevron-down"></i></a></td>'
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">&nbsp;</td>'+
293
- '<td><a href="#" data-action="toggleMeridian"><i class="icon-chevron-down"></i></a></td>'
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 === 23) {
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 >= 24) {
813
- hour = 23;
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 .add-on {
26
+ .bootstrap-timepicker .input-group-addon {
27
27
  cursor: pointer;
28
28
  }
29
- .bootstrap-timepicker .add-on i {
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.2.6.2
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-21 00:00:00.000000000 Z
11
+ date: 2015-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties