timepiece 0.1.14 → 0.1.15
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 +4 -4
- data/app/assets/javascripts/timepiece.js +40 -0
- data/lib/timepiece/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1e584988953124848cdb4cd36198545a6ee41ab
|
4
|
+
data.tar.gz: 3f0b0d776815b79cca35a3834340909bc790aec9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/timepiece/version.rb
CHANGED
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.
|
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-
|
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: {}
|