|
Lines 323-342
$(document).ready(function() {
Link Here
|
| 323 |
}); |
323 |
}); |
| 324 |
|
324 |
|
| 325 |
// Filter partner list |
325 |
// Filter partner list |
|
|
326 |
// Record the list of all options |
| 327 |
var ill_partner_options = $('#partners > option'); |
| 326 |
$('#partner_filter').keyup(function() { |
328 |
$('#partner_filter').keyup(function() { |
| 327 |
var needle = $('#partner_filter').val(); |
329 |
var needle = $('#partner_filter').val(); |
| 328 |
$('#partners > option').each(function() { |
330 |
var regex = new RegExp(needle, 'i'); |
| 329 |
var regex = new RegExp(needle, 'i'); |
331 |
var filtered = []; |
|
|
332 |
ill_partner_options.each(function() { |
| 330 |
if ( |
333 |
if ( |
| 331 |
needle.length == 0 || |
334 |
needle.length == 0 || |
| 332 |
$(this).is(':selected') || |
335 |
$(this).is(':selected') || |
| 333 |
$(this).text().match(regex) |
336 |
$(this).text().match(regex) |
| 334 |
) { |
337 |
) { |
| 335 |
$(this).show(); |
338 |
filtered.push($(this)); |
| 336 |
} else { |
|
|
| 337 |
$(this).hide(); |
| 338 |
} |
339 |
} |
| 339 |
}); |
340 |
}); |
|
|
341 |
$('#partners').empty().append(filtered); |
| 340 |
}); |
342 |
}); |
| 341 |
|
343 |
|
| 342 |
// Display the modal containing request supplier metadata |
344 |
// Display the modal containing request supplier metadata |
| 343 |
- |
|
|