[damned-lies] Fixed hide/show of action table rows.



commit b346eda1bf152b5d232bb36ce005559a98edc9a2
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat Aug 19 18:09:41 2017 +0200

    Fixed hide/show of action table rows.
    
    jQuery toggle() is setting display as 'block' when it is initially none.
    Fixes #779025.

 templates/vertimus/vertimus_detail.html |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/templates/vertimus/vertimus_detail.html b/templates/vertimus/vertimus_detail.html
index 8cc34ab..b680407 100644
--- a/templates/vertimus/vertimus_detail.html
+++ b/templates/vertimus/vertimus_detail.html
@@ -18,9 +18,13 @@ $(document).ready(function() {
       $("#id_action").change(function () {
         var value = $(this).val();
         $("#id_send_to_ml").prop('checked', send_mail_defaults[value]);
-        $("tr.tr_author").toggle(value == 'CI');
-        $("tr.tr_sync_master").toggle(value == 'CI');
-        $("tr.tr_file").toggle(value != 'CI');
+        if (value == 'CI') {
+            $("tr.tr_author, tr.tr_sync_master").css('display', 'table-row');
+            $("tr.tr_file").css('display', 'none');
+        } else {
+            $("tr.tr_author, tr.tr_sync_master").css('display', 'none');
+            $("tr.tr_file").css('display', 'table-row');
+        }
       });
     }
 });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]