prewikka/master: Use css("display") property in place of (":visible")

[email protected]
Newsgroups gmane.comp.security.ids.prelude.cvs
Message-ID <[email protected]>
commit 7a1b989f78f1c83188b32441648374201a3d874a
Author: Yoann Vandoorselaere <[email protected]>
Date:   Wed Jun 3 17:06:01 2009 +0200

    Use css("display") property in place of (":visible")
    
    Fix a bug when the change event is triggered before the parent element
    is visible.


========================================

 prewikka/templates/AlertListing.tmpl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

========================================

diff --git a/prewikka/templates/AlertListing.tmpl b/prewikka/templates/AlertListing.tmpl
index be5f1ff..fd57324 100644
--- a/prewikka/templates/AlertListing.tmpl
+++ b/prewikka/templates/AlertListing.tmpl
@@ -450,7 +450,8 @@ function ${type}_set_filter_saved() {
 
           if ( operator_array[str] ) {
                 var old_select = \$(td).siblings(".td_container_operator").children();
-                var display = \$(old_select).is(":visible")
+                // do not use visible here, this is called before the parent element is visible
+                var display = \$(old_select).css("display") != "none";
                 var old_value = \$(old_select).children(":selected").attr("value");
 
                 select = createSelectFromArray(operator_array[str], "popup_operator_select", \$(old_select).attr("name"), old_value);
_______________________________________________
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.