Use jQuery to eliminate pageloads on timer start/stop
matt@antinomia - October 10, 2007 - 04:15
| Project: | Timer |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
Description
This code isn't production ready, but it's a proof of concept for using jQuery on timer start/stop.
Problems with the code now:
- needs to be generalized to work with any timer field (now only works if the field is named 'field_timer'
- needs to start/stop the dhtml clock if it's enabled (right now the click keeps on ticking on timer stop, or doesn't start ticking on timer start)
- needs access permissions on jquery timer start/stop callbacks
- code could probably be cleaner/reduced
But it works ;)
| Attachment | Size |
|---|---|
| timer.jquery.patch | 2.64 KB |

#1
Great idea, Matt!
I had written Timer for workflow time tracking, so the on-screen controls were originally just for testing and then cleaned up some for release. Having jQuery calls would certainly be useful if you're going to use the buttons as the primary interface.
I'll definitely take a look at the code and get it into next release when I have a chance.