[Advanced search] When saving a query, we add this to the dropdown.
这个提交包含在:
		
							父节点
							
								
									d71ba5a0c6
								
							
						
					
					
						当前提交
						0717fa74ff
					
				
					共有  2 个文件被更改,包括 5 次插入 和 11 次删除
				
			
		|  | @ -54,9 +54,7 @@ class Search extends CI_Controller { | |||
|           if(isset($_POST['search'])) { | ||||
| 			  $result = $this->fetchQueryResult($_POST['search'], false); | ||||
| 			  echo json_encode($result->result_array()); | ||||
| 		  } else { | ||||
| 				echo "Noooooooob"; | ||||
|           } | ||||
| 		  } | ||||
|     } | ||||
| 
 | ||||
| 	function get_stored_queries() { | ||||
|  | @ -69,18 +67,13 @@ class Search extends CI_Controller { | |||
| 		if(isset($_POST['search'])) { | ||||
| 			$data['results'] = $this->fetchQueryResult($_POST['search'], false); | ||||
| 			$this->load->view('search/search_result_ajax', $data); | ||||
| 		} else { | ||||
| 			echo "Noooooooob"; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	function export_to_adif() { | ||||
| 		if(isset($_POST['search'])) { | ||||
| 			$data['qsos'] = $this->fetchQueryResult($_POST['search'], false); | ||||
| 
 | ||||
| 			$this->load->view('adif/data/exportall', $data); | ||||
| 		} else { | ||||
| 			echo "Noooooooob"; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|  | @ -112,9 +105,9 @@ class Search extends CI_Controller { | |||
| 			); | ||||
| 
 | ||||
| 			$this->db->insert('queries', $data); | ||||
| 
 | ||||
| 		} else { | ||||
| 			echo "Noooooooob"; | ||||
| 			$last_id = $this->db->insert_id(); | ||||
| 			header('Content-Type: application/json'); | ||||
| 			echo json_encode(array('id' => $last_id, 'description' => xss_clean($_POST['description']))); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -154,6 +154,7 @@ $('#btn-save').on('click', function() { | |||
| 					$.post( "<?php echo site_url('search/save_query');?>", { search: JSON.stringify(resultquery, null, 2), description: $(".getqueryname").val() }) | ||||
| 						.done(function( data ) { | ||||
| 							alert('Query saved!'); | ||||
| 							$('#querydropdown').append( new Option(data.description, data.id) ); // We add the saved query to the dropdown
 | ||||
| 						}); | ||||
| 				} | ||||
| 			}, | ||||
|  |  | |||
		正在加载…
	
		在新工单中引用