From: pines Date: Wed, 4 Oct 2006 02:15:36 +0000 (+0000) Subject: had to pull out of the message content X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e7459e18f4f50c20e5affd7f3220945b2a725f1e;p=Evergreen.git had to pull out of the message content git-svn-id: svn://svn.open-ils.org/ILS/trunk@6378 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/util/error.js b/Open-ILS/xul/staff_client/chrome/content/util/error.js index 3507875348..e9ae3140ed 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/error.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/error.js @@ -357,6 +357,63 @@ util.error.prototype = { } }, + 'yns_alert_formatted' : function (s,title,b1,b2,b3,c,image) { + + /* The original purpose of yns_alert was to prevent errors from being scanned through accidentally with a barcode scanner. + However, this can be done in a less annoying manner by rolling our own dialog and not having any of the options in focus */ + + /* + s = Message to display + title = Text in Title Bar + b1 = Text for button 1 + b2 = Text for button 2 + b3 = Text for button 3 + c = Text for confirmation checkbox. null for no confirm + */ + + dump('yns_alert:\n\ts = ' + s + '\n\ttitle = ' + title + '\n\tb1 = ' + b1 + '\n\tb2 = ' + b2 + '\n\tb3 = ' + b3 + '\n\tc = ' + c + '\n'); + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite"); + + this.sound.bad(); + + + //FIMXE - is that good enough of an escape job? + s = s.replace(/&/g, '&').replace(//g, '>'); + + var xml = '' + + ''; + + if (image) xml += ''; + xml += '' + (s) + + ''; + var b1_key = b1 ? b1[0] : ''; + var b2_key = b2 ? b2[0] : ''; + var b3_key = b3 ? b3[0] : ''; /* FIXME - need to check for collisions */ + if (b1) xml += '