From d2c86d33a8fed858ac27dc91bed67fbc01705904 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 12 Mar 2010 05:02:59 +0000 Subject: [PATCH] added option for displaying a message inside the progressdialog git-svn-id: svn://svn.open-ils.org/ILS/trunk@15816 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/widget/ProgressDialog.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/dojo/openils/widget/ProgressDialog.js b/Open-ILS/web/js/dojo/openils/widget/ProgressDialog.js index 8429ca38fb..9b344d15fe 100644 --- a/Open-ILS/web/js/dojo/openils/widget/ProgressDialog.js +++ b/Open-ILS/web/js/dojo/openils/widget/ProgressDialog.js @@ -26,13 +26,25 @@ if(!dojo._hasResource['openils.widget.ProgressDialog']) { this.progress.update.apply(this.progress, arguments); }, - show : function(ind) { + show : function(ind, msg) { if(ind || this.indeterminate) { this.progress.indeterminate = true; this.update(); } else { this.progress.indeterminate = false; } + + if(msg) { + if(!this.msgDiv) { + this.msgDiv = dojo.create('div', {innerHTML : msg}); + } + this.containerNode.insertBefore(this.msgDiv, this.progress.domNode); + } else { + if(this.msgDiv) { + this.containerNode.removeChild(this.msgDiv); + this.msgDiv = null; + } + } this.inherited(arguments); }, -- 2.11.0