From e03a441deda0f6259423b4285faa67cd5739fb40 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Fri, 30 Jul 2010 14:41:05 -0500 Subject: [PATCH] add method to close the modal dialog --- www/extras/admin/admin.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/www/extras/admin/admin.js b/www/extras/admin/admin.js index 5b895f08d..509d7cd48 100644 --- a/www/extras/admin/admin.js +++ b/www/extras/admin/admin.js @@ -454,6 +454,20 @@ WebGUI.Admin.prototype.openModalDialog this.modalDialog = dialog; }; +/** + * closeModalDialog( ) + * Close the current modal dialog + */ +WebGUI.Admin.prototype.closeModalDialog += function ( ) { + if ( !this.modalDialog ) { + return; // Can't close what isn't open + } + + this.modalDialog.destroy(); + this.modalDialog = null; +}; + /**************************************************************************** * WebGUI.Admin.LocationBar */