popup progress bar
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Apr 2009 18:26:09 +0000 (18:26 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Apr 2009 18:26:09 +0000 (18:26 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12778 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/ProgressDialog.js [new file with mode: 0644]

diff --git a/Open-ILS/web/js/dojo/openils/widget/ProgressDialog.js b/Open-ILS/web/js/dojo/openils/widget/ProgressDialog.js
new file mode 100644 (file)
index 0000000..e0ffbcb
--- /dev/null
@@ -0,0 +1,33 @@
+if(!dojo._hasResource['openils.widget.ProgressDialog']) {
+    dojo.provide('openils.widget.ProgressDialog');
+    dojo.require('dijit.ProgressBar');
+    dojo.require('dijit.Dialog');
+    dojo.require('openils.Util');
+
+    /**
+     * A popup dialog with an embedded progress bar.  imagine that.
+     */
+
+    dojo.declare(
+        'openils.widget.ProgressDialog',
+        [dijit.Dialog],
+        {
+            indeterminate : false,
+
+            startup : function() {
+                this.inherited(arguments);
+                this.progress = new dijit.ProgressBar();
+                this.progress.indeterminate = this.indeterminate;
+                this.progress.startup();
+                openils.Util.addCSSClass(this.progress.domNode, 'oils-progress-dialog');
+                this.containerNode.appendChild(this.progress.domNode);
+                if(this.indeterminate) this.update();
+            },
+
+            update : function() {
+                this.progress.update.apply(this.progress, arguments);
+            }
+        }
+    );
+}