Fixed issue #85 by trimming the locator field
这个提交包含在:
		
							父节点
							
								
									87b6a7c086
								
							
						
					
					
						当前提交
						4c50ae3ea7
					
				
					共有  4 个文件被更改,包括 129 次插入 和 37 次删除
				
			
		| 
						 | 
				
			
			@ -36,43 +36,43 @@ class Logbook_model extends CI_Model {
 | 
			
		|||
		   'COL_MODE' => $this->input->post('mode'),
 | 
			
		||||
		   'COL_RST_RCVD' => $this->input->post('rst_recv'),
 | 
			
		||||
		   'COL_RST_SENT' => $this->input->post('rst_sent'),
 | 
			
		||||
                   'COL_NAME' => $this->input->post('name'),
 | 
			
		||||
           'COL_NAME' => $this->input->post('name'),
 | 
			
		||||
		   'COL_COMMENT' => $this->input->post('comment'),
 | 
			
		||||
		   'COL_SAT_NAME' => $this->input->post('sat_name'),
 | 
			
		||||
		   'COL_SAT_MODE' => $this->input->post('sat_mode'),
 | 
			
		||||
		   'COL_GRIDSQUARE' => $this->input->post('locator'),
 | 
			
		||||
		   'COL_GRIDSQUARE' => trim($this->input->post('locator')),
 | 
			
		||||
		   'COL_COUNTRY' => $this->input->post('country'),
 | 
			
		||||
		   'COL_MY_RIG' => $this->input->post('equipment'),
 | 
			
		||||
                   'COL_QSLSDATE' => date('Y-m-d'),
 | 
			
		||||
                   'COL_QSLRDATE' => date('Y-m-d'),
 | 
			
		||||
                   'COL_QSL_SENT' => $this->input->post('qsl_sent'),
 | 
			
		||||
                   'COL_QSL_RCVD' => $this->input->post('qsl_recv'),
 | 
			
		||||
                   'COL_QSL_SENT_VIA' => $this->input->post('qsl_sent_method'),
 | 
			
		||||
                   'COL_QSL_RCVD_VIA' => $this->input->post('qsl_recv_method'),
 | 
			
		||||
                   'COL_OPERATOR' => $this->session->userdata('user_callsign'),
 | 
			
		||||
                   'COL_QTH' => $this->input->post('qth'),
 | 
			
		||||
                   'COL_PROP_MODE' => $prop_mode,
 | 
			
		||||
                   'COL_IOTA' => $this->input->post('iota_ref'),
 | 
			
		||||
                   'COL_MY_GRIDSQUARE' => $locator,
 | 
			
		||||
                   'COL_DISTANCE' => "0",
 | 
			
		||||
                   'COL_FREQ_RX' => 0,
 | 
			
		||||
                   'COL_BAND_RX' => null,
 | 
			
		||||
                   'COL_ANT_AZ' => null,
 | 
			
		||||
                   'COL_ANT_EL' => null,
 | 
			
		||||
                   'COL_A_INDEX' => null,
 | 
			
		||||
                   'COL_AGE' => null,
 | 
			
		||||
                   'COL_TEN_TEN' => null,
 | 
			
		||||
                   'COL_TX_PWR' => null,
 | 
			
		||||
                   'COL_STX' => null,
 | 
			
		||||
                   'COL_SRX' => null,
 | 
			
		||||
                   'COL_NR_BURSTS' => null,
 | 
			
		||||
                   'COL_NR_PINGS' => null,
 | 
			
		||||
                   'COL_MAX_BURSTS' => null,
 | 
			
		||||
                   'COL_K_INDEX' => null,
 | 
			
		||||
                   'COL_SFI' => null,
 | 
			
		||||
                   'COL_RX_PWR' => null,
 | 
			
		||||
                   'COL_LAT' => null,
 | 
			
		||||
                   'COL_LON' => null,
 | 
			
		||||
           'COL_QSLSDATE' => date('Y-m-d'),
 | 
			
		||||
           'COL_QSLRDATE' => date('Y-m-d'),
 | 
			
		||||
           'COL_QSL_SENT' => $this->input->post('qsl_sent'),
 | 
			
		||||
           'COL_QSL_RCVD' => $this->input->post('qsl_recv'),
 | 
			
		||||
           'COL_QSL_SENT_VIA' => $this->input->post('qsl_sent_method'),
 | 
			
		||||
           'COL_QSL_RCVD_VIA' => $this->input->post('qsl_recv_method'),
 | 
			
		||||
           'COL_OPERATOR' => $this->session->userdata('user_callsign'),
 | 
			
		||||
           'COL_QTH' => $this->input->post('qth'),
 | 
			
		||||
           'COL_PROP_MODE' => $prop_mode,
 | 
			
		||||
           'COL_IOTA' => $this->input->post('iota_ref'),
 | 
			
		||||
           'COL_MY_GRIDSQUARE' => $locator,
 | 
			
		||||
           'COL_DISTANCE' => "0",
 | 
			
		||||
           'COL_FREQ_RX' => 0,
 | 
			
		||||
           'COL_BAND_RX' => null,
 | 
			
		||||
           'COL_ANT_AZ' => null,
 | 
			
		||||
           'COL_ANT_EL' => null,
 | 
			
		||||
           'COL_A_INDEX' => null,
 | 
			
		||||
           'COL_AGE' => null,
 | 
			
		||||
           'COL_TEN_TEN' => null,
 | 
			
		||||
           'COL_TX_PWR' => null,
 | 
			
		||||
           'COL_STX' => null,
 | 
			
		||||
           'COL_SRX' => null,
 | 
			
		||||
           'COL_NR_BURSTS' => null,
 | 
			
		||||
           'COL_NR_PINGS' => null,
 | 
			
		||||
           'COL_MAX_BURSTS' => null,
 | 
			
		||||
           'COL_K_INDEX' => null,
 | 
			
		||||
           'COL_SFI' => null,
 | 
			
		||||
           'COL_RX_PWR' => null,
 | 
			
		||||
           'COL_LAT' => null,
 | 
			
		||||
           'COL_LON' => null,
 | 
			
		||||
		);
 | 
			
		||||
 | 
			
		||||
		$this->add_qso($data);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,6 +7,9 @@
 | 
			
		|||
 | 
			
		||||
	<script type="text/javascript" src="<?php echo base_url(); ?>js/jquery-1.5.1.min.js"></script>
 | 
			
		||||
	<script type="text/javascript" src="<?php echo base_url(); ?>js/jquery-ui-1.8.12.custom.min.js"></script>
 | 
			
		||||
	<script type="text/javascript" src="<?php echo base_url(); ?>js/jquery.shortkeys.js"></script>
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	<script type="text/javascript" src="<?php echo base_url(); ?>js/bootstrap-dropdown.js"></script>
 | 
			
		||||
	<script type="text/javascript" src="<?php echo base_url(); ?>js/bootstrap-tabs.js"></script>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -116,7 +116,7 @@
 | 
			
		|||
 | 
			
		||||
			<tr>
 | 
			
		||||
				<td class="title">QTH</td>
 | 
			
		||||
				<td><input id="qth" type"text" name"qth" value"" /></td>
 | 
			
		||||
				<td><input id="qth" type="text" name"qth" value"" /></td>
 | 
			
		||||
			</tr>
 | 
			
		||||
 | 
			
		||||
			<tr>
 | 
			
		||||
| 
						 | 
				
			
			@ -245,13 +245,10 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<script type="text/javascript">
 | 
			
		||||
	i=0;
 | 
			
		||||
	$(document).ready(function(){
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
		/* On Page Load */
 | 
			
		||||
		var catcher = function() {
 | 
			
		||||
		  var changed = false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										92
									
								
								js/jquery.shortkeys.js
									
									
									
									
									
										普通文件
									
								
							
							
						
						
									
										92
									
								
								js/jquery.shortkeys.js
									
									
									
									
									
										普通文件
									
								
							| 
						 | 
				
			
			@ -0,0 +1,92 @@
 | 
			
		|||
jQuery.fn.shortkeys = jQuery.fn.keys = function (obj, settings) {		
 | 
			
		||||
	var el = this;
 | 
			
		||||
	this.settings = jQuery.extend({
 | 
			
		||||
			split: "+",
 | 
			
		||||
			moreKeys: {}			
 | 
			
		||||
		}, settings || {});	
 | 
			
		||||
	this.wackyKeys = { '.': 190, ',': 188, ';': 59,	'Space': 32	};	
 | 
			
		||||
	this.formElements  = new Array("input", "select", "textarea", "button");
 | 
			
		||||
	this.keys = new Array();	
 | 
			
		||||
	this.onFormElement = false;
 | 
			
		||||
	this.keysDown = new Array();
 | 
			
		||||
	this.init = function (obj) {
 | 
			
		||||
		for(x in this.wackyKeys) {
 | 
			
		||||
			this.wackyKeys[x.toUpperCase()] = this.wackyKeys[x];
 | 
			
		||||
		}
 | 
			
		||||
		for(x in obj) {
 | 
			
		||||
			this.keys.push(x.split(this.settings.split));
 | 
			
		||||
		}
 | 
			
		||||
		for(i in this.keys) {
 | 
			
		||||
			var quickArr = new Array();
 | 
			
		||||
			for(j in this.keys[i]) {
 | 
			
		||||
				quickArr.push(this.convertToNumbers(this.keys[i][j].toUpperCase()));
 | 
			
		||||
			}
 | 
			
		||||
			quickArr.sort();
 | 
			
		||||
			this.keys[i] = quickArr;
 | 
			
		||||
		}
 | 
			
		||||
	};	
 | 
			
		||||
	this.convertToNumbers = function (inp) {
 | 
			
		||||
		if (this.wackyKeys[inp] != undefined) {
 | 
			
		||||
			return this.wackyKeys[inp];
 | 
			
		||||
		}
 | 
			
		||||
		return inp.toUpperCase().charCodeAt(0);
 | 
			
		||||
	};	
 | 
			
		||||
	this.keyAdd = function(keyCode) {
 | 
			
		||||
		this.keysDown.push(keyCode);
 | 
			
		||||
		this.keysDown.sort();
 | 
			
		||||
	};
 | 
			
		||||
	this.keyRemove = function (keyCode) {
 | 
			
		||||
		for(i in this.keysDown) {
 | 
			
		||||
			if(this.keysDown[i] == keyCode) {
 | 
			
		||||
				this.keysDown.splice(i,1);
 | 
			
		||||
			}
 | 
			
		||||
		};	
 | 
			
		||||
		this.keysDown.sort();	
 | 
			
		||||
	};		
 | 
			
		||||
	this.keyTest = function (i) {
 | 
			
		||||
		if (this.keys[i].length != this.keysDown.length) return false;
 | 
			
		||||
		for(j in this.keys[i]) {
 | 
			
		||||
			if(this.keys[i][j] != this.keysDown[j]) {
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
		}	
 | 
			
		||||
		return true;
 | 
			
		||||
	};
 | 
			
		||||
	this.keyRemoveAll = function () {
 | 
			
		||||
		this.keysDown = new Array();	
 | 
			
		||||
	};
 | 
			
		||||
	this.focused = function (bool) {
 | 
			
		||||
		this.onFormElement = bool;
 | 
			
		||||
	}	
 | 
			
		||||
	$(document).keydown(function(e) {
 | 
			
		||||
		el.keyAdd(e.keyCode);
 | 
			
		||||
		var i = 0;
 | 
			
		||||
		for(x in obj) {
 | 
			
		||||
			if(el.keyTest(i) && !el.onFormElement) {
 | 
			
		||||
				obj[x]();
 | 
			
		||||
				return false;
 | 
			
		||||
				break;	
 | 
			
		||||
			}			
 | 
			
		||||
			i++;
 | 
			
		||||
		};	
 | 
			
		||||
	});	
 | 
			
		||||
	$(document).keyup(function (e) {
 | 
			
		||||
		el.keyRemove(e.keyCode);
 | 
			
		||||
	});	
 | 
			
		||||
	for(x in this.formElements) {
 | 
			
		||||
		$(this.formElements[x]).focus( function () {
 | 
			
		||||
			el.focused(true);
 | 
			
		||||
		});
 | 
			
		||||
		$(this.formElements[x]).blur( function () {
 | 
			
		||||
			el.focused(false);
 | 
			
		||||
		});
 | 
			
		||||
	}	
 | 
			
		||||
	$(document).focus( function () {
 | 
			
		||||
		el.keyRemoveAll();
 | 
			
		||||
	});
 | 
			
		||||
	
 | 
			
		||||
	this.init(obj);
 | 
			
		||||
	jQuery.extend(this.wackyKeys, this.settings.moreKeys);
 | 
			
		||||
 | 
			
		||||
	return this;
 | 
			
		||||
}
 | 
			
		||||
		正在加载…
	
		在新工单中引用