HTML_Progress2 : The Definitive Guide |
After we have seen how to modify layout presentation, and how to link monitor with the main user task. We will now see how to combine a work to do (task) and listen events when they are triggered.
In this example we will simulate pictures upload monitoring. Here is a preview of final result.
Main task (upload pictures simulation) is combined with events
observation. User callback is not attached to the progress meter
but as an observer (myObserver()
method of myObservatory
class).
Progress meter linked to the monitor is retrieved in observer
user callback as instance $notifyObj
. Smooth animation with HTML_Progress2::sleep()
is then possible.
Cascading style sheet and javascript code are merged into template file itdynamic.html for a good progress meter presentation and handling.
This time we use QF ITDynamic renderer and Sigma as template engine.
Template file itdynamic.html used by Sigma is:
HTML_Progress2 : The Definitive Guide | v 2.4.0 : April 20, 2007 |