timepiece 0.1.14 → 0.1.15

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: 960f646557b7dd2720cc2036019f04eaead7e5c6
4
- data.tar.gz: ef5bc790d40e916e59e6bc1c30c49fec517544d9
3
+ metadata.gz: c1e584988953124848cdb4cd36198545a6ee41ab
4
+ data.tar.gz: 3f0b0d776815b79cca35a3834340909bc790aec9
5
5
  SHA512:
6
- metadata.gz: 88f1909545d0a7567254631f6216e4e68772b2b48f835ab377311a00c8d23c827bae3f40960407e84ed73c8e9b43b1448ffd008ff016eddca324649a84f4b67e
7
- data.tar.gz: 5de42a9cb66c49adfb1ba3f2d201a77c81fd790ddf938b99d9c8a112f69f403f854c2bc36fae486c1b6985ec9ce551ac637acc877e512bab7ec6bbb48bcf0e45
6
+ metadata.gz: a5b920ef03111091d44683e3a6cbd4b70b6a4b2e02836e8a03b7ffe1308d4b84daeb56515f478aafdab81eae65e22e5a7cbaba91fb8ddf03864d7e4e21f1cc3c
7
+ data.tar.gz: 24c852eed717ec68fbd3e146ba2c48b11e582b5f2b13e0e1b53561fa13d8189ad52e4760ade51f2e43f5ddb186f6c50f3b0aac5f0543303d7285dc683dca419c
@@ -126,9 +126,29 @@ function show_timer(){
126
126
  $(".timepiece-timer").each(function(i, e){
127
127
  $(e).html(function(){
128
128
  $('.timepiece-days', $(e)).html(timer_days[i]);
129
+ if (timer_days[i] == 1){
130
+ $('.tp-descriptor-days', $(e)).html(' day ');
131
+ } else {
132
+ $('.tp-descriptor-days', $(e)).html(' days ');
133
+ }
129
134
  $('.timepiece-hours', $(e)).html(timer_hours[i]);
135
+ if (timer_hours[i] == 1){
136
+ $('.tp-descriptor-hours', $(e)).html(' hour ');
137
+ } else {
138
+ $('.tp-descriptor-hours', $(e)).html(' hours ');
139
+ }
130
140
  $('.timepiece-minutes', $(e)).html(timer_minutes[i]);
141
+ if (timer_minutes[i] == 1){
142
+ $('.tp-descriptor-minutes', $(e)).html(' minute ');
143
+ } else {
144
+ $('.tp-descriptor-minutes', $(e)).html(' minutes ');
145
+ }
131
146
  $('.timepiece-seconds', $(e)).html(timer_seconds[i]);
147
+ if (timer_seconds[i] == 1){
148
+ $('.tp-descriptor-seconds', $(e)).html(' second ');
149
+ } else {
150
+ $('.tp-descriptor-seconds', $(e)).html(' seconds ');
151
+ }
132
152
  })
133
153
  })
134
154
  }, 1000)
@@ -183,9 +203,29 @@ function show_countdown(){
183
203
  $(".timepiece-countdown").each(function(i, e){
184
204
  $(e).html(function(){
185
205
  $('.timepiece-days', $(e)).html(countdown_days[i]);
206
+ if (countdown_days[i] == 1){
207
+ $('.tp-descriptor-days', $(e)).html(' day ');
208
+ } else {
209
+ $('.tp-descriptor-days', $(e)).html(' days ');
210
+ }
186
211
  $('.timepiece-hours', $(e)).html(countdown_hours[i]);
212
+ if (countdown_hours[i] == 1){
213
+ $('.tp-descriptor-hours', $(e)).html(' hour ');
214
+ } else {
215
+ $('.tp-descriptor-hours', $(e)).html(' hours ');
216
+ }
187
217
  $('.timepiece-minutes', $(e)).html(countdown_minutes[i]);
218
+ if (countdown_minutes[i] == 1){
219
+ $('.tp-descriptor-minutes', $(e)).html(' minute ');
220
+ } else {
221
+ $('.tp-descriptor-minutes', $(e)).html(' minutes ');
222
+ }
188
223
  $('.timepiece-seconds', $(e)).html(countdown_seconds[i]);
224
+ if (countdown_seconds[i] == 1){
225
+ $('.tp-descriptor-seconds', $(e)).html(' second ');
226
+ } else {
227
+ $('.tp-descriptor-seconds', $(e)).html(' seconds ');
228
+ }
189
229
  })
190
230
  })
191
231
  }, 1000)
@@ -1,3 +1,3 @@
1
1
  module Timepiece
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
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.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom Bruce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2015-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-rails
@@ -80,7 +80,7 @@ files:
80
80
  - test/integration/navigation_test.rb
81
81
  - test/test_helper.rb
82
82
  - test/timepiece_test.rb
83
- homepage: http://thombruce.com/
83
+ homepage: http://thombruce.com/timepiece
84
84
  licenses:
85
85
  - MIT
86
86
  metadata: {}