Changeset 6089 for trunk/expressoAdmin1_2/js/jscode
- Timestamp:
- 05/03/12 16:15:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/js/jscode/finder.js
r6072 r6089 150 150 var options_cache = {}; 151 151 152 function setOptions( fill, select, field ) 153 { 152 function setOptions( fill, selectId, field ) 153 { 154 var select = $('#'+selectId); 155 select.html(''); 156 154 157 for( var value in fill ) 155 158 { 159 if(typeof(value) == "undefined") continue; 160 156 161 if( !options_cache[value] ) 157 162 options_cache[value] = {}; … … 160 165 options_cache[value][field] = new Option( fill[value][field], value ); 161 166 162 select [select.length] = options_cache[value][field];163 } 164 165 return( select 167 select.append('<option value="'+value+'">'+fill[value][field]+'</option>'); 168 } 169 170 return( select.find('option')); 166 171 } 167 172 168 173 function fillSelect( fill, selectId, field ) 169 174 { 170 //recupera as options do respectivo select171 var select = Element( selectId ).options;172 173 //Limpa todo o select174 select.length = 0;175 176 175 //Inclui usuario comecando com a pesquisa 177 select = setOptions( fill, select , field );176 select = setOptions( fill, selectId, field ); 178 177 179 178 //chama o server side caso nao encontre resultado nenhum com essa sentenca
Note: See TracChangeset
for help on using the changeset viewer.