timepiece 0.1.1 → 0.1.2

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: 7988876cb63edcc687f8622dd61acb1246fe81e3
4
- data.tar.gz: ca69fd7980c09311268d8888394bdfcea50fef9d
3
+ metadata.gz: 0ca9f94a35c0ae355e6f8ad7f12ca5c6a88d90fd
4
+ data.tar.gz: dad6b9ec23757434e6867f20d32a44d45d110403
5
5
  SHA512:
6
- metadata.gz: e22b8e474607ee36a4a2893d2b997b16e6157f8da82552a62f6dc6cc6e16f06452f6a182d30ad623dcd12157d9342d5f1bd29d06846a417a4d4381d368626538
7
- data.tar.gz: 5e0422adbf7c7cfaaacdd016fde7a7b731b2d66cab80661085771e463f04140b04184c94d0a4c3720b5e72ea6c48e819bd8c3e01655caf476ef9b45326119410
6
+ metadata.gz: 8aa986e4724d935119c8382ac45c93ae5324c517cd21ad0ab97e0177c214faa78ee1f316df3a69ce83cab03f247b7a10fd46b3d74cbb82dab804d2acc268037c
7
+ data.tar.gz: 3678591c6d6af7f2c24050282041f1ccdda34c53788c347e6049461c726006c8f8a8612861ea5dffbaf7291c90f293bb194822a842ad2d00027e40277b6f2e54
data/README.rdoc CHANGED
@@ -27,5 +27,3 @@ Timepiece is a Rails plugin providing a simple digital clock, accurate to your s
27
27
  * By default, Timepiece shows a 24 hour digital clock. You can show a 12 hour clock by specifying it explicitly.
28
28
 
29
29
  <%= timepiece('London', '12') %>
30
-
31
- * Timepiece will automatically generate a digital clock and keep it updated.
@@ -57,6 +57,13 @@ function show_time(){
57
57
  $('.timepiece-minutes', $(e)).html(( minutes[i] < 10 ? "0" : "" ) + minutes[i]);
58
58
  $('.timepiece-seconds', $(e)).html(( seconds[i] < 10 ? "0" : "" ) + seconds[i]);
59
59
  $('.timepiece-abbr', $(e)).html(abbr);
60
+ if(abbr == 'am'){
61
+ $('.timepiece-abbr', $(e)).removeClass('timepiece-abbr-pm');
62
+ $('.timepiece-abbr', $(e)).addClass('timepiece-abbr-am');
63
+ } else {
64
+ $('.timepiece-abbr', $(e)).removeClass('timepiece-abbr-am');
65
+ $('.timepiece-abbr', $(e)).addClass('timepiece-abbr-pm');
66
+ }
60
67
  }else{
61
68
  $('.timepiece-hours', $(e)).html(( hours[i] < 10 ? "0" : "" ) + hours[i]);
62
69
  $('.timepiece-minutes', $(e)).html(( minutes[i] < 10 ? "0" : "" ) + minutes[i]);
@@ -24,13 +24,8 @@ module TimepieceHelper
24
24
  "<span class='timepiece-separator tp-separator-2'>:</span>"\
25
25
  "<span class='timepiece-seconds'>#{seconds}</span>"
26
26
  if type == '12'
27
- time = time + "<span class='timepiece-abbr'>#{var}</span>"
27
+ time = time + "<span class='timepiece-abbr timepiece-abbr-#{var}'>#{var}</span>"
28
28
  end
29
29
  content_tag(:span, time.html_safe, class: 'timepiece', 'data-timezone' => location, 'data-tptype' => type)
30
30
  end
31
- end
32
-
33
-
34
- # Note: add class to timepiece-abbr: timepiece-abbr-#{var} . Working this on the JS side shouldn't be too difficult just...
35
- # element.addClass('timepiece-abbr-' + var) right? Except, you have to remove old and add new, toggle or something-something.
36
- # Therein lies the difficulty.
31
+ end
@@ -1,3 +1,3 @@
1
1
  module Timepiece
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timepiece
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom Bruce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-02 00:00:00.000000000 Z
11
+ date: 2014-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-rails