spinner.js | |
bbop. | BBOP object to produce a self-constructing/self-destructing spinner. |
Functions | |
spinner | Contructor for the bbop.widget.spinner object. |
show | Show the spinner if it is hidden (regardless of current waits). |
hide | Hide the spinner if it is showing (regardless of current waits). |
start_wait | Displays the initial spinner if it is not already displayed and adds one to the wait count. |
finish_wait | Removes one from the wait count and hides the spinner if the number of outstanding waits has reached zero. |
clear_waits | Hides the spinner and resets all the waiting counters. |
BBOP object to produce a self-constructing/self-destructing spinner. It can display various spinner/throbber images and can have a set timeout to deal with annoying servers and exotic race conditions.
The class of the spinner image is “bbop-widget-spinner”.
Visibility is controlled by the application and removal of “bbop-js-spinner-hidden”.
This is a completely self-contained UI.
Functions | |
spinner | Contructor for the bbop.widget.spinner object. |
show | Show the spinner if it is hidden (regardless of current waits). |
hide | Hide the spinner if it is showing (regardless of current waits). |
start_wait | Displays the initial spinner if it is not already displayed and adds one to the wait count. |
finish_wait | Removes one from the wait count and hides the spinner if the number of outstanding waits has reached zero. |
clear_waits | Hides the spinner and resets all the waiting counters. |
bbop.widget.spinner = function( host_elt_id, img_src, argument_hash )
Contructor for the bbop.widget.spinner object.
var s = new bbop.widget.spinner("inf01", "http://localhost/amigo2/images/waiting_ajax.gif"); s.hide(); s.show();
var s = new bbop.widget.spinner("inf01", "http://localhost/amigo2/images/waiting_ajax.gif", {'timout': 5}); s.start_wait();
timeout | the number of seconds to wait before invoking clear_waits; 0 indicates waiting forever; defaults to 5 |
visible_p | whether or not the spinner is visible on initialization; true|false; defaults to true |
classes | a string of space-separated classes that you want added to the spinner image |
host_elt_id | string id of the place to place the widget |
img_src | the URL for the image to use in the spinner |
argument_hash | [optional] optional hash of optional arguments |
self
Contructor for the bbop.widget.spinner object.
bbop.widget.spinner = function( host_elt_id, img_src, argument_hash )
Show the spinner if it is hidden (regardless of current waits).
this.show = function()
Hide the spinner if it is showing (regardless of current waits).
this.hide = function()
Displays the initial spinner if it is not already displayed and adds one to the wait count.
this.start_wait = function()
Removes one from the wait count and hides the spinner if the number of outstanding waits has reached zero.
this.finish_wait = function()
Hides the spinner and resets all the waiting counters.
this.clear_waits = function()