From 8fc2977d12592a36a1bc0cd8c7bf25946938f268 Mon Sep 17 00:00:00 2001 From: pines Date: Wed, 20 Sep 2006 14:56:45 +0000 Subject: [PATCH] confirmation dialog on exit program git-svn-id: svn://svn.open-ils.org/ILS/trunk@6160 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/chrome/content/auth/controller.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js index 7658aabc4f..482c98ec54 100644 --- a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js +++ b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js @@ -454,18 +454,15 @@ auth.controller.prototype = { 'close' : function() { this.error.sdump('D_AUTH','close' + this.w + '\n'); - this.logoff(); - //Basically, we want to close all the windows for this application (and in case we're running this as - //a firefox extension, we don't want to merely shutdown mozilla). I'll probably create an XPCOM for - //tracking the windows. - //for (var w in this.G.window.appshell_list) { - // this.G.window.appshell_list[w].close(); - //} - this.w.close(); /* Probably won't go any further */ - - if (typeof this.on_close == 'function') { - this.error.sdump('D_AUTH','auth.controller.on_close()\n'); - this.on_close(); + + if (window.confirm('Are you sure you would like to exit the program completely?')) { + this.logoff(); + this.w.close(); /* Probably won't go any further */ + + if (typeof this.on_close == 'function') { + this.error.sdump('D_AUTH','auth.controller.on_close()\n'); + this.on_close(); + } } } -- 2.11.0