g.apply = function(field,value) {
g.error.sdump('D_TRACE','applying field = <' + field + '> value = <' + value + '>\n');
if (value == '<HACK:KLUDGE:NULL>') value = null;
+ if (field == 'alert_message') { value = value.replace(/^\W+$/g,''); }
for (var i = 0; i < g.copies.length; i++) {
var copy = g.copies[i];
try {
"Alert Message",
{
render: 'fm.alert_message() == null ? "<Unset>" : 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( String(ev.target.value).replace(/^\s+$/,"") ); } }(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( ev.target.value ); } }(c), false);',
}
],