[damned-lies] Fixed value retrieval in change event handler



commit 44d5f198a4733c77f03efa3b2a2bf144e7d6f1e9
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat Oct 24 10:07:45 2015 +0200

    Fixed value retrieval in change event handler

 templates/vertimus/vertimus_detail.html |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/templates/vertimus/vertimus_detail.html b/templates/vertimus/vertimus_detail.html
index ebbb9f8..f39b166 100644
--- a/templates/vertimus/vertimus_detail.html
+++ b/templates/vertimus/vertimus_detail.html
@@ -16,10 +16,11 @@ $(document).ready(function() {
     if(typeof send_mail_defaults != 'undefined') {
       $("#id_send_to_ml").attr('checked', send_mail_defaults[$("#id_action").val()]);
       $("#id_action").change(function () {
-        $("#id_send_to_ml").attr('checked', send_mail_defaults[$(this).val()]);
-        $("tr.tr_author").toggle(this.value == 'CI');
-        $("tr.tr_sync_master").toggle(this.value == 'CI');
-        $("tr.tr_file").toggle(this.value != 'CI');
+        var value = $(this).val();
+        $("#id_send_to_ml").attr('checked', send_mail_defaults[value]);
+        $("tr.tr_author").toggle(value == 'CI');
+        $("tr.tr_sync_master").toggle(value == 'CI');
+        $("tr.tr_file").toggle(value != 'CI');
       });
     }
 });


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