I was able to get it to work by changing the value of _countdown_direction to 1, instead of -1 in the countdown.js file. Should the code do this automatically if the date set is in the past?
Did anyone got this working? It seems that the whole .js is prepared to work with a negative _countdown_direction, it just have to be set somewhere.
I'm not sure how to compare the current time and the displayed time in JS thought. Anyone?
I changed the output of my html by overriding countdown.tpl.php
And in that file I changed the default string '@hours, @minutes, @seconds since @event' to 'You are @hours, @minutes and @seconds overdue'.
Changing the word since to overdue solved my problem, but it would be much better if the JS doesn't rely on textual strings in the code..
Comments
Comment #1
ogiebobo commentedI was able to get it to work by changing the value of _countdown_direction to 1, instead of -1 in the countdown.js file. Should the code do this automatically if the date set is in the past?
Comment #2
BarisW commentedDid anyone got this working? It seems that the whole .js is prepared to work with a negative _countdown_direction, it just have to be set somewhere.
I'm not sure how to compare the current time and the displayed time in JS thought. Anyone?
Comment #3
BarisW commentedAh, I found the bug.
The problem is that countdown.js checks for a string in the html..
I changed the output of my html by overriding countdown.tpl.php
And in that file I changed the default string '@hours, @minutes, @seconds since @event' to 'You are @hours, @minutes and @seconds overdue'.
Changing the word since to overdue solved my problem, but it would be much better if the JS doesn't rely on textual strings in the code..
Comment #4
BarisW commentedAt least... you should wrap a Drupal.t() around it so these strings are translatable and the countup still works in all languages.
Comment #5
usingsession commented