[Logbookadvanced] Added dropdown to choose number of results returned
这个提交包含在:
		
							父节点
							
								
									067196e4f5
								
							
						
					
					
						当前提交
						26cc67a55b
					
				
					共有  5 个文件被更改,包括 17 次插入 和 10 次删除
				
			
		|  | @ -94,6 +94,7 @@ class Logbookadvanced extends CI_Controller { | ||||||
| 			'propmode' => xss_clean($this->input->post('propmode')), | 			'propmode' => xss_clean($this->input->post('propmode')), | ||||||
| 			'gridsquare' => xss_clean($this->input->post('gridsquare')), | 			'gridsquare' => xss_clean($this->input->post('gridsquare')), | ||||||
| 			'state' => xss_clean($this->input->post('state')), | 			'state' => xss_clean($this->input->post('state')), | ||||||
|  | 			'qsoresults' => xss_clean($this->input->post('qsoresults')), | ||||||
| 		); | 		); | ||||||
| 
 | 
 | ||||||
| 		$qsos = []; | 		$qsos = []; | ||||||
|  |  | ||||||
|  | @ -114,11 +114,7 @@ class Logbookadvanced_model extends CI_Model { | ||||||
| 			$where = "AND $where"; | 			$where = "AND $where"; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		if ($where === '') { | 		$limit = $searchCriteria['qsoresults']; | ||||||
| 			$limit = 250; |  | ||||||
| 		} else { |  | ||||||
| 			$limit = 1000; |  | ||||||
| 		} |  | ||||||
| 
 | 
 | ||||||
| 		$sql = " | 		$sql = " | ||||||
| 			SELECT * | 			SELECT * | ||||||
|  |  | ||||||
|  | @ -101,7 +101,7 @@ | ||||||
| 				</select> | 				</select> | ||||||
| 			</div> | 			</div> | ||||||
| 			<div class="form-group col"> | 			<div class="form-group col"> | ||||||
| 				<label class="form-label" for="selectPropagation">Propagation Mode</label> | 				<label class="form-label" for="selectPropagation">Propagation</label> | ||||||
| 				<select id="selectPropagation" name="selectPropagation" class="form-control form-control-sm"> | 				<select id="selectPropagation" name="selectPropagation" class="form-control form-control-sm"> | ||||||
| 				<option value="">All</option> | 				<option value="">All</option> | ||||||
| 						<option value="AS">Aircraft Scatter</option> | 						<option value="AS">Aircraft Scatter</option> | ||||||
|  | @ -146,6 +146,15 @@ | ||||||
| 					<option value="V">Verified</option> | 					<option value="V">Verified</option> | ||||||
| 				</select> | 				</select> | ||||||
| 			</div> | 			</div> | ||||||
|  | 			<div class="form-group col"> | ||||||
|  | 				<label for="qsoResults"># Results</label>
 | ||||||
|  | 				<select id="qsoResults" name="qsoResults" class="form-control form-control-sm"> | ||||||
|  | 					<option value="250">250</option> | ||||||
|  | 					<option value="1000">1000</option> | ||||||
|  | 					<option value="2500">2500</option> | ||||||
|  | 					<option value="5000">5000</option> | ||||||
|  | 				</select> | ||||||
|  | 			</div> | ||||||
| 			<div class="form-group col"> | 			<div class="form-group col"> | ||||||
| 				<label> </label><br> | 				<label> </label><br> | ||||||
| 				<button type="submit" class="btn btn-sm btn-primary" id="searchButton">Search</button> | 				<button type="submit" class="btn btn-sm btn-primary" id="searchButton">Search</button> | ||||||
|  |  | ||||||
|  | @ -156,6 +156,7 @@ $(document).ready(function () { | ||||||
| 				propmode: this.selectPropagation.value, | 				propmode: this.selectPropagation.value, | ||||||
| 				gridsquare: this.gridsquare.value, | 				gridsquare: this.gridsquare.value, | ||||||
| 				state: this.state.value, | 				state: this.state.value, | ||||||
|  | 				qsoresults: this.qsoResults.value | ||||||
| 			}, | 			}, | ||||||
| 			dataType: 'json', | 			dataType: 'json', | ||||||
| 			success: function (data) { | 			success: function (data) { | ||||||
|  |  | ||||||
|  | @ -162,10 +162,10 @@ class QSO | ||||||
| 		$this->QSLSentVia = ($data['COL_QSL_SENT_VIA'] === null) ? '' : $data['COL_QSL_SENT_VIA']; | 		$this->QSLSentVia = ($data['COL_QSL_SENT_VIA'] === null) ? '' : $data['COL_QSL_SENT_VIA']; | ||||||
| 		$this->QSLVia = ($data['COL_QSL_VIA'] === null) ? '' : $data['COL_QSL_VIA']; | 		$this->QSLVia = ($data['COL_QSL_VIA'] === null) ? '' : $data['COL_QSL_VIA']; | ||||||
| 
 | 
 | ||||||
| 		$this->cqzone = $data['COL_CQZ']; | 		$this->cqzone = ($data['COL_CQZ'] === null) ? '' : $data['COL_CQZ']; | ||||||
| 		$this->state = $data['COL_STATE']; | 		$this->state = ($data['COL_STATE'] === null) ? '' :$data['COL_STATE']; | ||||||
| 		$this->dxcc = $data['COL_COUNTRY']; | 		$this->dxcc = ($data['COL_COUNTRY'] === null) ? '' :$data['COL_COUNTRY']; | ||||||
| 		$this->iota = $data['COL_IOTA']; | 		$this->iota = ($data['COL_IOTA'] === null) ? '' :$data['COL_IOTA']; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	/** | 	/** | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用