Changeset 13842
- Timestamp:
- 03/15/12 08:34:51 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.10/amp_conf/htdocs/admin/assets/js/script.legacy.js
r13481 r13842 523 523 //destination double dropdown code 524 524 $('.destdropdown').unbind().bind('blur click change keypress', function(){ 525 var name=$(this).attr('name'); 526 var id=name.replace('goto',''); 527 var dest=$(this).val(); 528 $('[name$='+id+'].destdropdown2').hide(); 529 $('[name='+dest+id+'].destdropdown2').show(); 525 var name = $(this).attr('name'); 526 var id = $(this).data('id'); 527 var id = typeof id == 'undefined' ? '' : id;//ensure id isnt set to undefined 528 var dest = $(this).val(); 529 $('[data-id=' + id + '].destdropdown2').hide(); 530 $('[name=' + dest + id + '].destdropdown2').show(); 530 531 }); 531 532 freepbx/branches/2.10/amp_conf/htdocs/admin/helpers/freepbx_helpers.php
r12995 r13842 91 91 $style=' style="'.(($destmod=='Error')?'background-color:red;':'background-color:white;').'"'; 92 92 $html.='<select name="goto'.$i.'" class="destdropdown" '.$style.' tabindex="'.++$tabindex.'"' 93 . ($required ? ' required ' : '') . '>';//html5 validation 93 . ($required ? ' required ' : '') //html5 validation 94 . ' data-id="' . $i . '" ' 95 . '>'; 94 96 $html.='<option value="" style="background-color:white;">'.$nodest_msg.'</option>'; 95 97 foreach($drawselects_module_hash as $mod => $disc){ … … 110 112 if($cat=='Error'){$style.=' '.$errorstyle;}//add error style 111 113 $style=' style="'.(($cat=='Error')?'background-color:red;':$style).'"'; 112 $html.='<select name="'.str_replace(' ','_',$cat).$i.'" '.$tabindexhtml.$style.' class="destdropdown2">'; 114 $html.='<select name="'.str_replace(' ','_',$cat).$i.'" '.$tabindexhtml.$style.' class="destdropdown2"' 115 . ' data-id="' . $i . '" ' 116 . '>'; 113 117 foreach($destination as $dest){ 114 118 $selected=($goto==$dest['destination'])?'SELECTED ':' ';
