YiiBooster
YiiBooster copied to clipboard
Create Bootstrap Ticker widget
Hi Antonio & co.,
is this ticker meant to be a news ticker or a time/countdown ticker? If the latter, I will try doing a countdown ticker this week and like to hear your feedback about it.
Scenario (as per client request): Given a multiple choice online test, the user will see 1 question per page/view with a certain amount of time per question and for the entire time: 10 questions, 45 seconds per question, but only 5 minutes for the entire test.
The countdown starts when page is loaded. The widget itself is part of TbActiveForm (... though ultimately there could be a standalone version that will raise an event upon time-out).
attributes
- model
- attribute //that stores the time of the current question
- size // default=normal, large, hero
- type //primary, etc.
- placement // not sure about this one... the how and where to place it? what would be the feasible options?
options
- countdown //default true meaning time counts down; e.g 45-0 seconds; if set to false, time counts up 0-45.
- autoStart //default true; when page is loaded
- autoSubmit //if the form is submit when time out; default true
- showSeconds //true
- showMinutes //true
There should be an option to fire an event or redirect to an url when time run out and to replace the autoSubmit, but this is not needed in my client's scenario.
htmlOptions (as usual)
This is it for know. I'm sure some things will come up once I'm actually doing it.
ANY FEEDBACK is highly appreciated!
Cheers, Felipe
Additional options for later versions (if feasible and not too much overload):
- type of clock (digital, circular, analog); definitely starting with analog first and only
- extend to hours, days, weeks, months, years
- audioClick (click)
- audioStart (signal when click on start button)
- audioEnd (signal when time out)
This will be done in next milestone.