commit e04159711a60c880c1e2e790aaeb72e08aa96923
Author: Yoann Vandoorselaere <[email protected]>
Date: Fri May 15 15:28:01 2009 +0200
Incorrect generation of new aggregated path.
Aggregation path added by the user weren't taken into account since they
were handled as if the user was adding a new filter.
========================================
prewikka/templates/AlertListing.tmpl | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
========================================
diff --git a/prewikka/templates/AlertListing.tmpl b/prewikka/templates/AlertListing.tmpl
index d31d53c..4935f8f 100644
--- a/prewikka/templates/AlertListing.tmpl
+++ b/prewikka/templates/AlertListing.tmpl
@@ -57,19 +57,24 @@ function createSelectFromArray(varray, sclass, name_attr, selected, defsel) {
});
\$(".append_entry").live("click", function() {
- global_id += 1;
-
var tr = \$(this).parent().parent().clone();
- var input = \$(tr).children("td.td_container_value").children();
var select = \$(tr).children("td.td_container_path").children();
var div_id = \$(this).parent().parent().parent().parent().parent().parent().parent().parent().parent().attr("id");
- \$(tr).children("td.td_container_operator").children().attr("name", div_id + "_operator_" + global_id);
- \$(input).attr("name", div_id + "_value_" + global_id);
- \$(input).attr("value", "");
- \$(input).find("option[value='none']").attr("selected", "selected");
+ if ( \$(this).parent().parent().parent().parent().is("table.aggregation_table") )
+ \$(select).attr("name", "aggregated_" + div_id);
+
+ else {
+ global_id += 1;
+
+ var input = \$(tr).children("td.td_container_value").children();
+ \$(tr).children("td.td_container_operator").children().attr("name", div_id + "_operator_" + global_id);
+ \$(input).attr("name", div_id + "_value_" + global_id);
+ \$(input).attr("value", "");
+ \$(input).find("option[value='none']").attr("selected", "selected");
+ \$(select).attr("name", div_id + "_object_" + global_id);
+ }
- \$(select).attr("name", div_id + "_object_" + global_id);
\$(select).trigger("change");
\$(tr).children("td.td_container_remove").html("<a class=\"remove_entry\">-</a>");
_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.