Module: siteKiosk.system.progress

A module which allows to create a system progress dialog. The dialog may be cancelable and indeterminate.

Example

 var progress = new siteKiosk.system.progress("Please Wait", "A complicated operation takes place, wait a moment");
 progress.show();

 // here could be some actual work
 setTimeout(function() {
     progress.hide();
     progress.remove();
 }, 5000);

new siteKiosk.system.progress(title, message, indeterminate, cancelable, cancelListener)

Creates an system progress dialog.
Parameters:
Name Type Argument Default Description
title string The title of the progress dialog
message string The message to be shown on the progress dialog
indeterminate boolean <optional>
false Whether this dialog should indicate an indeterminate progress
cancelable boolean <optional>
false Whether this dialog should be cancelable
cancelListener siteKiosk.system.progress~cancelListener <optional>
A callback, being invoked when the dialog has been canceled

Methods

getMax() → {number}

Gets the max progress.
Returns:
The max progress value
Type
number

getProgress() → {number}

Gets the current progress.
Returns:
The current progress value
Type
number

hide()

Hides the progress dialog.

remove()

Removes the progress dialog.

setMax(value)

Sets the max progress.
Parameters:
Name Type Description
value number The max progress value

setProgress(value)

Sets the current progress.
Parameters:
Name Type Description
value number The current progress value

show()

Shows the progress dialog.

Type Definitions

cancelListener()

This callback is being invoked then the dialog has been canceled.