This documentation is currently being moved to our new documentation site.
Please view or edit the documentation there, instead.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.
Progress API
This page has not yet been updated to reflect the latest API changes.
Creating a Progress bar
To instantiate a new Progress component on your page:
var myProgressBar = fluid.progress(container, options);
Returns: The Progress component object.
Note: the initial state of a progress element is assumed to be hidden with the minimum amount of progress.
Parameters
container: a CSS-based selector, single-element jQuery object, or DOM element that identifies the root DOM node of the Progress markup.
options: an optional data structure that configures the Progress component, as described in the Options section of this page.
Supported Events
The Progress component fires the following events (for more information about events in the Infusion Framework, see Events):
Event | Type | Description | Parameters | Parameter Description |
|---|---|---|---|---|
DEPRECATED | default | This event fires once the progress display has appeared. Note that this is not a 'preventable' event. | none |
|
DEPRECATED | default | This event fires once the progress display has been removed after progress is complete. | none |
|
To add listeners to the firers one can use two approaches:
1) Using the listeners option to the component creator function (see Options below for more information):
//onProgressBegin:
var myProgress = fluid.progress("#progress-container", {
listeners: {
onProgressBegin: myProgressShow //callback function
}
});
//afterProgressHidden:
var myProgress = fluid.progress("#progress-container", {
listeners: {
afterProgressHidden: myProgressHide //callback function
}
});
2) Programmatically:
//onProgressBegin:
myProgress.events.onProgressBegin.addListener(myProgressShow);
//afterProgressHidden:
myProgress.events.afterProgressHidden.addListener(myProgressHide);
Methods
Method | Description | Parameters |
|---|---|---|
| Shows the element defined by the |
|
| Hides the element defined by the |
|
| Updates the |
|
| Resets the position and size of the | none |
Options
Name | Description | Values | Default |
|---|---|---|---|
| Javascript object containing selectors for various fragments of the Progress markup | The object must contain a subset of the following keys: | selectors: {
displayElement: ".flc-progress",
progressBar: ".flc-progress-bar",
indicator: ".flc-progress-indicator",
label: ".flc-progress-label",
ariaElement: ".flc-progress-bar"
}
See Selectors below for requirement details |
| The strings that will be used by the component. This is where localization is handled | The object must contain a subset of the following keys: | strings: {
ariaBusyText: "Progress is %percentComplete percent complete",
ariaDoneText: "Progress is complete."
}
|
| JavaScript object that defines the default animation for displaying the Progress | The structure of the object mirrors and gets mapped to the parameters of jQuery's animate method. | showAnimation: {
params: {
opacity: "show"
},
duration: "slow",
callback: null
}, // equivalent of $().fadeIn("slow")
|
| JavaScript object that defines the default animation for hiding the Progress | The structure of the object mirrors and gets mapped to the parameters of jQuery's animate method. | hideAnimation: {
params: {
opacity: "hide"
},
duration: "slow",
callback: null
}, // equivalent of $().fadeOut("slow")
|
| JavaScript object containing listeners to be attached to the supported events. | Keys in the object are event names, values are functions or arrays of functions. | See Supported Events for more information. |