|
Lines 2-10
Link Here
|
| 2 |
$(document).ready(function() { |
2 |
$(document).ready(function() { |
| 3 |
// keep copy of the inactive budgets |
3 |
// keep copy of the inactive budgets |
| 4 |
disabledAllBudgetsCopy = $("select[name='all_budget_id']").html(); |
4 |
disabledAllBudgetsCopy = $("select[name='all_budget_id']").html(); |
| 5 |
disabledBudgetsCopy = $("select[name='budget_id']").first().html(); |
5 |
disabledBudgetsCopy = $("select[name='budget_id'], .fund_selector").first().html(); |
| 6 |
$("select[name='all_budget_id'] .b_inactive").remove(); |
6 |
$("select[name='all_budget_id'] .b_inactive").remove(); |
| 7 |
$("select[name='budget_id'] .b_inactive").remove(); |
7 |
$("select[name='budget_id'] .b_inactive, .fund_selector .b_inactive").remove(); |
| 8 |
|
8 |
|
| 9 |
$(".budget_code_item").each(function(){ |
9 |
$(".budget_code_item").each(function(){ |
| 10 |
let active_only = $(this).clone(); |
10 |
let active_only = $(this).clone(); |
|
Lines 21-32
$(document).ready(function() {
Link Here
|
| 21 |
|
21 |
|
| 22 |
$("#showallbudgets").click(function() { |
22 |
$("#showallbudgets").click(function() { |
| 23 |
if ($(this).is(":checked")) { |
23 |
if ($(this).is(":checked")) { |
| 24 |
$("select[name='budget_id']").html(disabledBudgetsCopy) |
24 |
$("select[name='budget_id'], .fund_selector").html(disabledBudgetsCopy) |
| 25 |
$(".bci_active").prop('disabled',true).prop('hidden',true); |
25 |
$(".bci_active").prop('disabled',true).prop('hidden',true); |
| 26 |
$(".bci_all").prop('disabled',false).prop('hidden',false); |
26 |
$(".bci_all").prop('disabled',false).prop('hidden',false); |
| 27 |
} |
27 |
} |
| 28 |
else { |
28 |
else { |
| 29 |
$("select[name='budget_id'] .b_inactive").remove(); |
29 |
$("select[name='budget_id'] .b_inactive, .fund_selector .b_inactive").remove(); |
| 30 |
$(".bci_active").prop('disabled',false).prop('hidden',false); |
30 |
$(".bci_active").prop('disabled',false).prop('hidden',false); |
| 31 |
$(".bci_all").prop('disabled',true).prop('hidden',true); |
31 |
$(".bci_all").prop('disabled',true).prop('hidden',true); |
| 32 |
} |
32 |
} |
|
Lines 41-47
$(document).ready(function() {
Link Here
|
| 41 |
} |
41 |
} |
| 42 |
}); |
42 |
}); |
| 43 |
|
43 |
|
| 44 |
$("select[name='budget_id']").change(function(){ |
44 |
$("select[name='budget_id'], .fund_selector").change(function(){ |
| 45 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
45 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
| 46 |
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); |
46 |
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); |
| 47 |
var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]'); |
47 |
var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]'); |
|
Lines 59-65
$(document).ready(function() {
Link Here
|
| 59 |
getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 ); |
59 |
getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 ); |
| 60 |
} ); |
60 |
} ); |
| 61 |
|
61 |
|
| 62 |
$("select[name='budget_id']").change(); |
62 |
$("select[name='budget_id'], .fund_selector").change(); |
| 63 |
|
63 |
|
| 64 |
$("select[name='all_budget_id']").change(function(){ |
64 |
$("select[name='all_budget_id']").change(function(){ |
| 65 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
65 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
| 66 |
- |
|
|