Enhance timer countdown to use javascript (when js is available)

douggreen - March 7, 2007 - 01:32
Project:Countdown
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

The attached patch will add a javascript countdown to the block, honoring the block accuracy setting.

It tries to be efficient by (1) firing the timer only as often as the block accuracy demands, (2) doesn't do any fancy math in the timer. The side effect of this is that the timer is not a "real-time" application.

For example, if the browser timer doesn't run when it should (which is bound to happen occassionally), the timer will decrement the interval (second) when in reality a little more time may have elapsed. If the accuracy is set to seconds and if the browser window is left open a long time, these mis-fires can add up to. That said, don't count on the timer to be exact! Other than that, it's a nice extension.

AttachmentSize
countdown.patch3.77 KB

#1

douggreen - March 7, 2007 - 12:45

Attached is an improved patch that also counts up, and properly switches from counting down to counting up.

AttachmentSize
countdown_0.patch 5.21 KB

#2

stella - January 23, 2008 - 10:43

The attached patch works perfectly for me. Thanks Doug.

Cheers,
Stella

#3

deekayen - May 12, 2008 - 14:16
Status:needs review» needs work

[dumb question removed]

#4

deekayen - May 12, 2008 - 15:30
Status:needs work» fixed

#5

Anonymous (not verified) - May 26, 2008 - 15:31
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.