prewikka/master: Fixes possible Inline-filter null reset button
[email protected] Wed, 24 Feb 2010 10:41:25 +0100 (CET)
| Newsgroups | gmane.comp.security.ids.prelude.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit b837d806f3c3a29cd934fba81e724304eeceba17 Author: Yoann Vandoorselaere <[email protected]> Date: Wed Feb 24 10:21:04 2010 +0100 Fixes possible Inline-filter null reset button When the inline filter reset button is clicked, do not try to detect what the current state is, since the users might have modified the filters, leading to an unknown state. There is no need for this detection since the next state was already retrieved on the previous call, so we re-use the value. This prevent a rare 'Reset to null' button which could happen when modifying the inline-filter (in a specific way) before clicking the Reset button. ======================================== prewikka/templates/AlertListing.tmpl | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) ======================================== diff --git a/prewikka/templates/AlertListing.tmpl b/prewikka/templates/AlertListing.tmpl index 9a11e39..401e0c1 100644 --- a/prewikka/templates/AlertListing.tmpl +++ b/prewikka/templates/AlertListing.tmpl @@ -112,8 +112,6 @@ function get_next_state(id, cstate) { else if ( saved_forms[id]["saved"] && ! Equals(\$(selector), saved_forms[id]["saved"]) ) nextstate = "saved"; - - else nextstate = "default"; } return nextstate; @@ -427,7 +425,8 @@ function ${type}_set_${state}() { \$("input.reset_filter").click(function() { var div_id = \$(this).parent().parent().parent().parent().parent().parent().parent().parent().parent().attr("id"); - saved_state[div_id] = get_next_state(div_id, saved_state[div_id]); + + saved_state[div_id] = \$(this).val().substr(9); #for $t in "classification", "source", "target", "analyzer" if ( div_id == "$t" ) _______________________________________________ Prelude-cvslog site list [email protected] http://lists.prelude-technologies.com/mailman/listinfo/prelude-cvslog