[#4180] Show and hide the total field based on the Deliverable Type

Hooks up holygrail to do basic headless JavaScript testing.
This commit is contained in:
Eric Davis
2010-07-02 11:09:58 -07:00
parent f772343749
commit 545c2e06e5
4 changed files with 48 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
jQuery(function($) {
toggleSpecificDeliverableFields = function() {
var deliverableType = $('select#deliverable_type option:selected').val();
if (deliverableType == 'FixedDeliverable') {
$('#deliverable_total').show();
} else {
$('#deliverable_total').hide();
}
},
toggleSpecificDeliverableFields();
$('select#deliverable_type').change(function() {
toggleSpecificDeliverableFields();
});
});