Lines 1-8
Link Here
|
1 |
$(document).ready(function() { |
1 |
$(document).ready(function() { |
|
|
2 |
var enabled_names = []; |
3 |
$('#partners option').each(function() { |
4 |
var partner = $(this); |
5 |
var partner_id = partner.data('partner-id'); |
6 |
if (isEnabled(partner_id)) { |
7 |
enabled_names.push(partner.text().trim()); |
8 |
} |
9 |
}); |
10 |
$('#generic_confirm_enabled').text(enabled_names.join(', ')); |
11 |
|
2 |
$('#partners').change(function() { |
12 |
$('#partners').change(function() { |
3 |
var selected = []; |
13 |
var selected = []; |
4 |
$('#partners option:selected').each(function() { |
14 |
$('#partners option:selected').each(function() { |
5 |
selected.push($(this).data('partner-id')); |
15 |
var partner_id = $(this).data('partner-id'); |
|
|
16 |
if (isEnabled(partner_id)) { |
17 |
selected.push(partner_id); |
18 |
} |
6 |
}); |
19 |
}); |
7 |
if (selected.length > 0) { |
20 |
if (selected.length > 0) { |
8 |
$('#generic_confirm_search').css('visibility', 'initial'); |
21 |
$('#generic_confirm_search').css('visibility', 'initial'); |
Lines 21-24
$(document).ready(function() {
Link Here
|
21 |
$('#partnerSearch').on('hide.bs.modal', function() { |
34 |
$('#partnerSearch').on('hide.bs.modal', function() { |
22 |
$.fn.dataTable.tables({ api: true }).destroy(); |
35 |
$.fn.dataTable.tables({ api: true }).destroy(); |
23 |
}); |
36 |
}); |
|
|
37 |
|
38 |
function isEnabled(id) { |
39 |
return services[0].enabled.indexOf(id.toString()) > -1; |
40 |
}; |
24 |
}); |
41 |
}); |
25 |
- |
|
|