LP#1482400: when activating a PO, provide better progress updates
[working/Evergreen.git] / Open-ILS / web / js / dojo / openils / widget / ProgressDialog.js
index 7d2d43d..977d490 100644 (file)
@@ -48,6 +48,22 @@ if(!dojo._hasResource['openils.widget.ProgressDialog']) {
                 }
                     
                 this.inherited(arguments);
+            },
+
+            update_message : function(msg) {
+                if(msg || (msg = this.message) ) {
+                    if(!this.msgDiv) {
+                        this.msgDiv = dojo.create('div', {innerHTML : msg});
+                        this.containerNode.insertBefore(this.msgDiv, this.progress.domNode);
+                    } else {
+                        this.msgDiv.innerHTML = msg;
+                    }
+                } else {
+                    if(this.msgDiv) {
+                        this.containerNode.removeChild(this.msgDiv);
+                        this.msgDiv = null;
+                    }
+                }
             }
         }
     );