Move searchdistance to POST parameters
这个提交包含在:
		
							父节点
							
								
									8929f17886
								
							
						
					
					
						当前提交
						a84aa06965
					
				
					共有  3 个文件被更改,包括 30 次插入 和 6 次删除
				
			
		|  | @ -917,7 +917,9 @@ class Logbook extends CI_Controller { | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	/* return distance */ | 	/* return distance */ | ||||||
| 	function searchdistance($locator, $station_id = null) { | 	function searchdistance() { | ||||||
|  | 			$locator = xss_clean($this->input->post('grid')); | ||||||
|  | 			$station_id = xss_clean($this->input->post('stationProfile')); | ||||||
| 			$this->load->library('Qra'); | 			$this->load->library('Qra'); | ||||||
| 
 | 
 | ||||||
| 			if($locator != null) { | 			if($locator != null) { | ||||||
|  |  | ||||||
|  | @ -153,8 +153,19 @@ function qso_edit(id) { | ||||||
|                     $('#locator').change(function(){ |                     $('#locator').change(function(){ | ||||||
|                         if ($(this).val().length >= 4) { |                         if ($(this).val().length >= 4) { | ||||||
|                             $('#locator_info').load(base_url + "index.php/logbook/searchbearing/" + $(this).val() + "/" + $('#stationProfile').val()).fadeIn("slow"); |                             $('#locator_info').load(base_url + "index.php/logbook/searchbearing/" + $(this).val() + "/" + $('#stationProfile').val()).fadeIn("slow"); | ||||||
|                             $.get(base_url + 'index.php/logbook/searchdistance/' + $(this).val() + "/" + $('#stationProfile').val(), function(result) { |                             $.ajax({ | ||||||
|                                 document.getElementById("distance").value = result; |                                url: base_url + 'index.php/logbook/searchdistance', | ||||||
|  |                                type: 'post', | ||||||
|  |                                data: { | ||||||
|  |                                   grid: $(this).val(), | ||||||
|  |                                   stationProfile: $('#stationProfile').val() | ||||||
|  |                                }, | ||||||
|  |                                success: function(data) { | ||||||
|  |                                   document.getElementById("distance").value = data; | ||||||
|  |                                }, | ||||||
|  |                                error: function() { | ||||||
|  |                                   document.getElementById("distance").value = 'Error calculating distance!'; | ||||||
|  |                                }, | ||||||
|                             }); |                             }); | ||||||
|                         } |                         } | ||||||
|                     }); |                     }); | ||||||
|  |  | ||||||
|  | @ -849,11 +849,22 @@ $("#locator").keyup(function(){ | ||||||
| 					$('#locator_info').html(data).fadeIn("slow"); | 					$('#locator_info').html(data).fadeIn("slow"); | ||||||
| 				}, | 				}, | ||||||
| 				error: function() { | 				error: function() { | ||||||
| 					$('#locator_info').text("Error loading bearing and distance").fadeIn("slow"); | 					$('#locator_info').text("Error loading bearing!").fadeIn("slow"); | ||||||
| 				}, | 				}, | ||||||
| 			}); | 			}); | ||||||
| 			$.get(base_url + 'index.php/logbook/searchdistance/' + $(this).val() + "/" + $('#stationProfile').val(), function(result) { | 			$.ajax({ | ||||||
| 				document.getElementById("distance").value = result; | 				url: base_url + 'index.php/logbook/searchdistance', | ||||||
|  | 				type: 'post', | ||||||
|  | 				data: { | ||||||
|  | 					grid: $(this).val(), | ||||||
|  | 					stationProfile: $('#stationProfile').val() | ||||||
|  | 				}, | ||||||
|  | 				success: function(data) { | ||||||
|  | 					document.getElementById("distance").value = data; | ||||||
|  | 				}, | ||||||
|  | 				error: function() { | ||||||
|  | 					document.getElementById("distance").value = 'Error calculating distance!'; | ||||||
|  | 				}, | ||||||
| 			}); | 			}); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用