mdtrooper adbc90664f 2009-09-15 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/pandora_alerts.js: fix the id for access to jquery
	in the field3.
	* godmode/alerts/configure_alert_action.php: fix the id for access to jquery
	in the event keyup.
	Fixes: 2845692



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1944 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-15 14:51:09 +00:00

22 lines
547 B
JavaScript

var original_command = "";
function parse_alert_command (command) {
value = $("#text-field1").attr ("value");
re = /_FIELD1_/gi;
command = command.replace (re, "\""+value+"\"");
value = $("#text-field2").attr ("value");
re = /_FIELD2_/gi;
command = command.replace (re, "\""+value+"\"");
value = $("#textarea_field3").val();
re = /_FIELD3_/gi;
command = command.replace (re, "\""+value+"\"");
return command;
}
function render_command_preview () {
$("#textarea_command_preview").text (parse_alert_command (original_command));
}