timepiece 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/timepiece.js +4 -4
- data/app/helpers/timepiece_helper.rb +8 -6
- data/lib/timepiece/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e997e4b727711f3f7d92b83031057177279b0a43
|
4
|
+
data.tar.gz: 8ceacee309c47761dace76374b0ba6fc4420ad3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef1164269db5b52505477edc7050349823e71acca5b53773b48a81dfd349a2a9dd4801a6b5e67932165cf652225bb8f4752ff3f18b69f47586fa2f16b9a59730
|
7
|
+
data.tar.gz: f9fca8463aa8fe0a24bd9235e2219e50022c8d456d614d21e44815694f00ed9e64b6d3149883455cc3e55bdea3c2a5ba8566b7a61c7a46a562c3a68e047776cc
|
@@ -123,10 +123,10 @@ function show_timer(){
|
|
123
123
|
}
|
124
124
|
$(".timepiece-timer").each(function(i, e){
|
125
125
|
$(e).html(function(){
|
126
|
-
$('.timepiece-days', $(e)).html(
|
127
|
-
$('.timepiece-hours', $(e)).html(
|
128
|
-
$('.timepiece-minutes', $(e)).html(
|
129
|
-
$('.timepiece-seconds', $(e)).html(
|
126
|
+
$('.timepiece-days', $(e)).html(timer_days[i]);
|
127
|
+
$('.timepiece-hours', $(e)).html(timer_hours[i]);
|
128
|
+
$('.timepiece-minutes', $(e)).html(timer_minutes[i]);
|
129
|
+
$('.timepiece-seconds', $(e)).html(timer_seconds[i]);
|
130
130
|
})
|
131
131
|
})
|
132
132
|
}, 1000)
|
@@ -53,13 +53,15 @@ module TimepieceHelper
|
|
53
53
|
|
54
54
|
seconds = seconds_diff
|
55
55
|
|
56
|
-
time = "<span class='timepiece-days'>#{days.to_s
|
56
|
+
time = "<span class='timepiece-days'>#{days.to_s}</span>"\
|
57
57
|
"<span class='timepiece-descriptor tp-descriptor-days'> days </span>"\
|
58
|
-
"<span class='timepiece-hours'>#{hours.to_s
|
59
|
-
"<span class='timepiece-
|
60
|
-
"<span class='timepiece-minutes'>#{minutes.to_s
|
61
|
-
"<span class='timepiece-
|
62
|
-
"<span class='timepiece-seconds'>#{seconds.to_s
|
58
|
+
"<span class='timepiece-hours'>#{hours.to_s}</span>"\
|
59
|
+
"<span class='timepiece-descriptor tp-descriptor-hours'> hours </span>"\
|
60
|
+
"<span class='timepiece-minutes'>#{minutes.to_s}</span>"\
|
61
|
+
"<span class='timepiece-descriptor tp-descriptor-minutes'> minutes </span>"\
|
62
|
+
"<span class='timepiece-seconds'>#{seconds.to_s}</span>"\
|
63
|
+
"<span class='timepiece-descriptor tp-descriptor-seconds'> seconds </span>"
|
64
|
+
# "<span class='timepiece-seconds'>#{seconds.to_s.rjust(2, '0')}</span>" # Note: rjust; it might be useful.
|
63
65
|
|
64
66
|
content_tag(:span, time.html_safe, class: 'timepiece-timer', 'data-days' => days, 'data-hours' => hours, 'data-minutes' => minutes, 'data-seconds' => seconds)
|
65
67
|
end
|
data/lib/timepiece/version.rb
CHANGED