Changeset 9230

Show
Ignore:
Timestamp:
03/16/10 06:05:47 (3 years ago)
Author:
mbrevda
Message:

re #1798; add js to support multipal dropdown destinations. Forcing trunk users not to load packed libfreepbx - this will be fixed before next release

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/common/script.legacy.js

    r9128 r9230  
    642642{   return ( ((c >= "0") && (c <= "9")) || ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) || (c == "_") || (c == "-") ) 
    643643} 
     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});