[Rt-commit] rt branch, 4.2/txn-send-mail-to-input-js-trigger-for-jquery-1.9, created. rt-4.2.1-69-g69bad2a
? sunnavy
sunnavy at bestpractical.com
Wed Feb 12 08:11:29 EST 2014
The branch, 4.2/txn-send-mail-to-input-js-trigger-for-jquery-1.9 has been created
at 69bad2a03868aa3803534049643ee09d6d3ef53d (commit)
- Log -----------------------------------------------------------------
commit 69bad2a03868aa3803534049643ee09d6d3ef53d
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Dec 28 09:45:23 2013 +0800
update TxnSendMailTo input js trigger for new version of jquery(1.9.1)
old version results in js syntax error :/
changes are:
* special chars in jquery selector shall be escaped now.
see also http://api.jquery.com/category/selectors/
so we switched to .filter instead to get around this(chmrr++), which is more
elegant than escaping chars.
* .attr => .prop
please check http://api.jquery.com/prop/ for the differences between them
see also #28127
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 8c9b304..85ae853 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -91,8 +91,7 @@
});
jQuery(function() {
jQuery("input[name=TxnSendMailTo]").change(function(ev) {
- jQuery("input[name=TxnSendMailTo][value="+ev.target.value+"]")
- .attr("checked",jQuery(ev.target).attr('checked'));
+ jQuery("input[name=TxnSendMailTo]").filter( function() { return this.value == ev.target.value; } ).prop("checked",jQuery(ev.target).prop('checked'));
});
});
</script>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list