From: pines Date: Wed, 25 Oct 2006 19:20:24 +0000 (+0000) Subject: collapse Alert Messages that consist of nothing but whitespace into an empty string... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8fc77c019cfd75d8f2af143014ba26bcfac5d2d8;p=Evergreen.git collapse Alert Messages that consist of nothing but whitespace into an empty string when editing copies git-svn-id: svn://svn.open-ils.org/ILS/trunk@6508 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index b09157dff5..7edaa10893 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -664,7 +664,7 @@ g.panes_and_field_names = { "Alert Message", { render: 'fm.alert_message() == null ? "" : fm.alert_message()', - input: 'c = function(v){ g.apply("alert_message",v); if (typeof post_c == "function") post_c(v); }; x = document.createElement("textbox"); x.setAttribute("multiline",true); g.populate_alert_message_input(x); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + input: 'c = function(v){ g.apply("alert_message",v); if (typeof post_c == "function") post_c(v); }; x = document.createElement("textbox"); x.setAttribute("multiline",true); g.populate_alert_message_input(x); x.addEventListener("apply",function(f){ return function(ev) { f( String(ev.target.value).replace(/^\s+$/,'') ); } }(c), false);', } ],