timepiece 0.1.12 → 0.1.13
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 +28 -4
- data/lib/timepiece/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff5251b8b6973a70f024d871dc54fce5bf0aed45
|
4
|
+
data.tar.gz: 289fb35868381acec7933c2d8245336f0ed3eb35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36859e08b891ab87139500eefa4f2a3012180d753cf5557c501b374aeddf7cdd462b712e1c21460ea1bcf9859b604c9176e0587a476f21e1332cb7737f2e95b1
|
7
|
+
data.tar.gz: ed9a736eea145fdcbea072c6f5bc51acf1252a771dda514f03f3e52507a1aac38d1766524ba4a7693a3a6b20a739afeb3985c7e793df3c15f64171c7d42bc190
|
@@ -195,6 +195,22 @@ function reset_time(){
|
|
195
195
|
get_time()
|
196
196
|
}
|
197
197
|
|
198
|
+
function reset_timer(){
|
199
|
+
get_timer_days = []
|
200
|
+
get_timer_hours = []
|
201
|
+
get_timer_minutes = []
|
202
|
+
get_timer_seconds = []
|
203
|
+
set_timer()
|
204
|
+
}
|
205
|
+
|
206
|
+
function reset_countdown(){
|
207
|
+
get_countdown_days = []
|
208
|
+
get_countdown_hours = []
|
209
|
+
get_countdown_minutes = []
|
210
|
+
get_countdown_seconds = []
|
211
|
+
set_countdown()
|
212
|
+
}
|
213
|
+
|
198
214
|
$(document).ready(function(){
|
199
215
|
// Might want to reformat to move if-statement : should also be performed before 'reset_time' so as not to make a blank AJAX request.
|
200
216
|
if ($(".timepiece").length > 0){
|
@@ -211,10 +227,18 @@ $(document).ready(function(){
|
|
211
227
|
}
|
212
228
|
})
|
213
229
|
$(document).on('page:load', function(){
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
230
|
+
if ($(".timepiece").length > 0){
|
231
|
+
clearInterval(clock);
|
232
|
+
reset_time();
|
233
|
+
}
|
234
|
+
if ($(".timepiece-timer").length > 0){
|
235
|
+
clearInterval(timer);
|
236
|
+
reset_timer();
|
237
|
+
}
|
238
|
+
if ($(".timepiece-countdown").length > 0){
|
239
|
+
clearInterval(countdown);
|
240
|
+
reset_countdown();
|
241
|
+
}
|
218
242
|
// Quickfix for Turbolinks. We should revisit this.
|
219
243
|
// Note we also need jquery-turbolinks to be installed (should at least make users aware of this)
|
220
244
|
// And currently navigation via browser history buttons will break our clocks. FIXME:
|
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.13
|
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-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jquery-rails
|