prewikka/master: Multiple advanced filters fixes
[email protected] Tue, 30 Jun 2009 10:22:02 +0200 (CEST)
| Newsgroups | gmane.comp.security.ids.prelude.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 64ae8a1ae59b227d1c9e55ebce1e25161ad4ebdf Author: Yoann Vandoorselaere <[email protected]> Date: Tue Jun 30 08:59:19 2009 +0200 Multiple advanced filters fixes When adding several advanced filters consecutively, make sure that we only trigger expert_mode on the first filter (triggering it for other filter would reset the new row to simple mode). ======================================== prewikka/templates/AlertListing.tmpl | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) ======================================== diff --git a/prewikka/templates/AlertListing.tmpl b/prewikka/templates/AlertListing.tmpl index f75dc48..8c57249 100644 --- a/prewikka/templates/AlertListing.tmpl +++ b/prewikka/templates/AlertListing.tmpl @@ -241,9 +241,12 @@ function ${type}_set_${state}() { #end if #set $cnt = 0 + #set $got_append = 0 + #for $path, $operator, $value in $table #if $cnt > 0 + #set $got_append = 1 table.find("tr:last a.append_entry").trigger('click'); #end if #set $cnt += 1 @@ -263,7 +266,11 @@ function ${type}_set_${state}() { ## The other fields will be populated on the .trigger("change"). table.find("tr:last .popup_operator_select").html("<option value='$operator' selected='selected' />"); - table.find("tr:last .expert_mode").trigger("click"); + #if $got_append == 0 + table.find("tr:last .expert_mode").trigger("click"); + #else + table.find("tr:last .popup_select_field").trigger("change"); + #end if #else table.find("tr:last .popup_select_field").hide(); table.find("tr:last .popup_select_field").attr("disabled", "disabled"); @@ -319,7 +326,7 @@ function ${type}_set_${state}() { }); \$(".append_entry").live("click", function() { - var tr = \$(this).parent().parent().clone(); + var tr = cloneForm(\$(this).parent().parent()); var select = \$(tr).children("td.td_container_path").children(); var div_id = \$(this).parent().parent().parent().parent().parent().parent().parent().parent().parent().attr("id"); _______________________________________________ Prelude-cvslog site list [email protected] http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog