| | 644 | |
|---|
| | 645 | /*************************************************** |
|---|
| | 646 | * GLOBAL JQUERY CODE * |
|---|
| | 647 | ***************************************************/ |
|---|
| | 648 | |
|---|
| | 649 | $(document).ready(function(){ |
|---|
| | 650 | |
|---|
| | 651 | //destination double dropdown code |
|---|
| | 652 | $('.destdropdown').bind('blur click change keypress', function(){ |
|---|
| | 653 | var name=$(this).attr('name'); |
|---|
| | 654 | var id=name.replace('goto',''); |
|---|
| | 655 | var dest=$(this).val(); |
|---|
| | 656 | $('[name$='+id+']').not(this).hide(); |
|---|
| | 657 | $('[name='+dest+id+']').show(); |
|---|
| | 658 | }); |
|---|
| | 659 | //hacky way to ensure destinations dropdown is the background-color as currently selected item |
|---|
| | 660 | $('.destdropdown').bind('change', function(){ |
|---|
| | 661 | if($(this).find('option:selected').val()=='Error'){ |
|---|
| | 662 | $(this).css('background-color','red'); |
|---|
| | 663 | }else{ |
|---|
| | 664 | $(this).css('background-color','white'); |
|---|
| | 665 | } |
|---|
| | 666 | }); |
|---|
| | 667 | }); |
|---|