2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								$ (  document  ) . ready ( function ( )  {  
						 
					
						
							
								
									
										
										
										
											2022-04-01 01:35:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								var  favs = { } ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									get _fav ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#fav_add' ) . click ( function  ( event )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 20:48:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										save _fav ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 12:50:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( document ) . on ( "click" ,  "#fav_del" ,  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										del _fav ( $ ( this ) . attr ( 'name' ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( document ) . on ( "click" ,  "#fav_recall" ,  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#sat_name' ) . val ( favs [ this . innerText ] . sat _name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#sat_mode' ) . val ( favs [ this . innerText ] . sat _mode ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#band_rx' ) . val ( favs [ this . innerText ] . band _rx ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#band' ) . val ( favs [ this . innerText ] . band ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#frequency_rx' ) . val ( favs [ this . innerText ] . frequency _rx ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#frequency' ) . val ( favs [ this . innerText ] . frequency ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#selectPropagation' ) . val ( favs [ this . innerText ] . prop _mode ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#mode' ) . val ( favs [ this . innerText ] . mode ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 23:00:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 23:00:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									function  del _fav ( name )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 23:11:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( confirm ( "Are you sure to delete Fav?" ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												url :  base _url + 'index.php/user_options/del_fav' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												method :  'POST' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												contentType :  "application/json; charset=utf-8" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												data :  JSON . stringify ( {  "option_name" :  name  } ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												success :  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													get _fav ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 23:00:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									function  get _fav ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											url :  base _url + 'index.php/user_options/get_fav' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											method :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											contentType :  "application/json; charset=utf-8" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											success :  function ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												$ ( "#fav_menu" ) . empty ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												for  ( const  key  in  result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 12:50:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													$ ( "#fav_menu" ) . append ( '<label class="dropdown-item"><span id="fav_del" name="' + key + '"><i class="fas fa-trash-alt"></i></span>  <span id="fav_recall">' + key + '</span></label>' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												favs = result ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 23:00:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 20:48:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									function  save _fav ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  payload = { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										payload . sat _name = $ ( '#sat_name' ) . val ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										payload . sat _mode = $ ( '#sat_mode' ) . val ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 20:48:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										payload . band _rx = $ ( '#band_rx' ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										payload . band = $ ( '#band' ) . val ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										payload . frequency _rx = $ ( '#frequency_rx' ) . val ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 20:48:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										payload . frequency = $ ( '#frequency' ) . val ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										payload . prop _mode = $ ( '#selectPropagation' ) . val ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 20:48:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										payload . mode = $ ( '#mode' ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ . ajax ( { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 21:16:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											url :  base _url + 'index.php/user_options/add_edit_fav' , 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 20:48:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											method :  'POST' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											contentType :  "application/json; charset=utf-8" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											data :  JSON . stringify ( payload ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											success :  function ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												get _fav ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 20:48:31 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2023-07-27 01:55:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  bc _bandmap  =  new  BroadcastChannel ( 'qso_window' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bc _bandmap . onmessage  =  function  ( ev )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( ev . data  ==  'ping' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											bc _bandmap . postMessage ( 'pong' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-07-27 00:38:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									var  bc  =  new  BroadcastChannel ( 'qso_wish' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-28 01:57:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bc . onmessage  =  function  ( ev )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-27 01:55:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( ev . data . ping )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											let  message = { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											message . pong = true ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-28 01:57:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											bc . postMessage ( message ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-27 01:55:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-27 03:50:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ ( '#frequency' ) . val ( ev . data . frequency ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( "#band" ) . val ( frequencyToBand ( ev . data . frequency ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( ev . data . frequency _rx  !=  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#frequency_rx' ) . val ( ev . data . frequency _rx ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( "#band_rx" ) . val ( frequencyToBand ( ev . data . frequency _rx ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-27 01:55:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ ( "#callsign" ) . val ( ev . data . call ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-27 23:27:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ ( "#callsign" ) . focusout ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-28 01:57:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ ( "#callsign" ) . blur ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-27 01:55:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}  /* receive */ 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-27 00:38:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-04-01 01:35:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( "#locator" ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-01 01:36:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										. popover ( {  placement :  'top' ,  title :  'Gridsquare Formatting' ,  content :  "Enter multiple (4-digit) grids separated with commas. For example: IO77,IO78"  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-01 05:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										. focus ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#locator' ) . popover ( 'show' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-01 01:35:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										. blur ( function  ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-01 05:09:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ ( '#locator' ) . popover ( 'hide' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-04-12 03:50:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( "#sat_name" ) . change ( function ( ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  sat  =  $ ( "#sat_name" ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( sat  ==  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( "#sat_mode" ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( "#selectPropagation" ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#input_usa_state' ) . change ( function ( ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  state  =  $ ( "#input_usa_state option:selected" ) . text ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( state  !=  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( "#stationCntyInput" ) . prop ( 'disabled' ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#stationCntyInput' ) . selectize ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												options :  [ ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												create :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													var  state  =  $ ( "#input_usa_state option:selected" ) . text ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													if  ( ! query  ||  state  ==  "" )  return  callback ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														url :  base _url + 'index.php/qso/get_county' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															query :  query , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															state :  state , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														error :  function ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															callback ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															callback ( res ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( "#stationCntyInput" ) . prop ( 'disabled' ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											//$('#stationCntyInput')[0].selectize.destroy();
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( "#stationCntyInput" ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#sota_ref' ) . selectize ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										options :  [ ] , 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-07 02:07:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										create :  true , 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( ! query  ||  query . length  <  3 )  return  callback ( ) ;   // Only trigger if 3 or more characters are entered
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												url :  base _url + 'index.php/qso/get_sota' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													query :  query , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												error :  function ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													callback ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													callback ( res ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-01-02 19:52:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#sota_ref' ) . change ( function ( ) { 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-28 01:57:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ ( '#sota_info' ) . html ( '<a target="_blank" href="https://summits.sota.org.uk/summit/' + $ ( '#sota_ref' ) . val ( ) + '"><img width="32" height="32" src="' + base _url + 'images/icons/sota.org.uk.png"></a>' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-02 19:52:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ ( '#sota_info' ) . attr ( 'title' ,  'Lookup ' + $ ( '#sota_ref' ) . val ( ) + ' summit info on sota.org.uk' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-15 22:04:33 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#wwff_ref' ) . selectize ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										options :  [ ] , 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-06 15:33:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										create :  true , 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-15 22:04:33 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( ! query  ||  query . length  <  3 )  return  callback ( ) ;   // Only trigger if 3 or more characters are entered
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												url :  base _url + 'index.php/qso/get_wwff' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													query :  query , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												error :  function ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													callback ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													callback ( res ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#wwff_ref' ) . change ( function ( ) { 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-28 01:57:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ ( '#wwff_info' ) . html ( '<a target="_blank" href="https://www.cqgma.org/zinfo.php?ref=' + $ ( '#wwff_ref' ) . val ( ) + '"><img width="32" height="32" src="' + base _url + 'images/icons/wwff.co.png"></a>' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-19 00:54:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ ( '#wwff_info' ) . attr ( 'title' ,  'Lookup ' + $ ( '#wwff_ref' ) . val ( ) + ' reference info on cqgma.org' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-15 22:04:33 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-10-05 23:05:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#pota_ref' ) . selectize ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										options :  [ ] , 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-07 02:07:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										create :  true , 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-05 23:05:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( ! query  ||  query . length  <  3 )  return  callback ( ) ;   // Only trigger if 3 or more characters are entered
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												url :  base _url + 'index.php/qso/get_pota' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													query :  query , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												error :  function ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													callback ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													callback ( res ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#pota_ref' ) . change ( function ( ) { 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-28 01:57:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ ( '#pota_info' ) . html ( '<a target="_blank" href="https://pota.app/#/park/' + $ ( '#pota_ref' ) . val ( ) + '"><img width="32" height="32" src="' + base _url + 'images/icons/pota.app.png"></a>' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-05 23:05:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ ( '#pota_info' ) . attr ( 'title' ,  'Lookup ' + $ ( '#pota_ref' ) . val ( ) + ' reference info on pota.co' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									$ ( '#darc_dok' ) . selectize ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										options :  [ ] , 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 00:30:07 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										create :  true , 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( ! query )  return  callback ( ) ;   // Only trigger if at least 1 character is entered
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												url :  base _url + 'index.php/qso/get_dok' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												type :  'GET' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												dataType :  'json' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													query :  query , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												error :  function ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													callback ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													callback ( res ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/ * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									  Populate  the  Satellite  Names  Field  on  the  QSO  Panel 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									* / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ . getJSON ( base _url + "assets/json/satellite_data.json" ,  function (  data  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Build the options array
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  items  =  [ ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ . each (  data ,  function (  key ,  val  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											items . push ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												'<option value="'  +  key  +  '">'  +  key  +  '</option>' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Add to the datalist
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '.satellite_names_list' ) . append ( items . join (  ""  ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								var  selected _sat ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								var  selected _sat _mode ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( document ) . on ( 'change' ,  'input' ,  function ( ) {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  optionslist  =  $ ( '.satellite_modes_list' ) [ 0 ] . options ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  value  =  $ ( this ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									for  ( var  x = 0 ; x < optionslist . length ; x ++ ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( optionslist [ x ] . value  ===  value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// Store selected sat mode
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											selected _sat _mode  =  value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// get Json file
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . getJSON ( base _url  +  "assets/json/satellite_data.json" ,  function (  data  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												// Build the options array
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												var  sat _modes  =  [ ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ . each (  data ,  function (  key ,  val  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													if  ( key  ==  selected _sat )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ . each (  val . Modes ,  function (  key1 ,  val2  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															if ( key1  ==  selected _sat _mode )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-07-15 15:33:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
																if  (  ( val2 [ 0 ] . Downlink _Mode  ==  "LSB"  &&  val2 [ 0 ] . Uplink _Mode  ==  "USB" )  ||  ( val2 [ 0 ] . Downlink _Mode  ==  "USB"  &&  val2 [ 0 ] . Uplink _Mode  ==  "LSB" )  )    {  // inverting Transponder? set to SSB
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
																	$ ( "#mode" ) . val ( "SSB" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																	$ ( "#mode" ) . val ( val2 [ 0 ] . Uplink _Mode ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( "#band" ) . val ( frequencyToBand ( val2 [ 0 ] . Uplink _Freq ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( "#band_rx" ) . val ( frequencyToBand ( val2 [ 0 ] . Downlink _Freq ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( "#frequency" ) . val ( val2 [ 0 ] . Uplink _Freq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( "#frequency_rx" ) . val ( val2 [ 0 ] . Downlink _Freq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( "#selectPropagation" ) . val ( 'SAT' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( document ) . on ( 'change' ,  'input' ,  function ( ) {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  optionslist  =  $ ( '.satellite_names_list' ) [ 0 ] . options ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  value  =  $ ( this ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									for  ( var  x = 0 ; x < optionslist . length ; x ++ ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( optionslist [ x ] . value  ===  value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( "#sat_mode" ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '.satellite_modes_list' ) . find ( 'option' ) . remove ( ) . end ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											selected _sat  =  value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// get Json file
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ . getJSON (  base _url + "assets/json/satellite_data.json" ,  function (  data  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												// Build the options array
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												var  sat _modes  =  [ ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ . each (  data ,  function (  key ,  val  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													if  ( key  ==  value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ . each (  val . Modes ,  function (  key1 ,  val2  )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															//console.log (key1);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															sat _modes . push ( '<option value="'  +  key1  +  '">'  +  key1  +  '</option>' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												// Add to the datalist
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '.satellite_modes_list' ) . append ( sat _modes . join (  ""  ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  changebadge ( entityname )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if ( $ ( "#sat_name"  ) . val ( )  !=  "" )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:32:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ . getJSON ( base _url  +  'index.php/logbook/jsonlookupdxcc/'  +  convert _case ( entityname )  +  '/SAT/0/0' ,  function ( result ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . removeClass ( "badge-secondary" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . removeClass ( "badge-success" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . removeClass ( "badge-danger" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . attr ( 'title' ,  '' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#callsign_info' ) . addClass ( "badge-success" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#callsign_info' ) . attr ( 'title' ,  'DXCC was already worked in the past on this band and mode!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#callsign_info' ) . addClass ( "badge-danger" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#callsign_info' ) . attr ( 'title' ,  'New DXCC, not worked on this band and mode!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:32:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ . getJSON ( base _url  +  'index.php/logbook/jsonlookupdxcc/'  +  convert _case ( entityname )  +  '/0/'  +  $ ( "#band" ) . val ( )  + '/'  +  $ ( "#mode" ) . val ( ) ,  function ( result ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . removeClass ( "badge-secondary" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . removeClass ( "badge-success" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . removeClass ( "badge-danger" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . attr ( 'title' ,  '' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#callsign_info' ) . addClass ( "badge-success" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#callsign_info' ) . attr ( 'title' ,  'DXCC was already worked in the past on this band and mode!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#callsign_info' ) . addClass ( "badge-danger" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#callsign_info' ) . attr ( 'title' ,  'New DXCC, not worked on this band and mode!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* Function: reset_fields is used to reset the fields on the QSO page */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  reset _fields ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#locator_info' ) . text ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#country' ) . val ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-05 00:41:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#continent' ) . val ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									$ ( '#lotw_info' ) . text ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-13 23:19:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#lotw_info' ) . removeClass ( "lotw_info_red" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#lotw_info' ) . removeClass ( "lotw_info_yellow" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#lotw_info' ) . removeClass ( "lotw_info_orange" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-19 21:22:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#qrz_info' ) . text ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-20 05:07:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#hamqth_info' ) . text ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-02 19:52:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#sota_info' ) . text ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									$ ( '#dxcc_id' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#cqz' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#name' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#qth' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#locator' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#iota_ref' ) . val ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-02 19:52:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#sota_ref' ) . val ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									$ ( "#locator" ) . removeClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( "#locator" ) . removeClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( "#callsign" ) . removeClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( "#callsign" ) . removeClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign_info' ) . removeClass ( "badge-secondary" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign_info' ) . removeClass ( "badge-success" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign_info' ) . removeClass ( "badge-danger" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-03 16:28:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#callsign-image' ) . attr ( 'style' ,  'display: none;' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign-image-content' ) . text ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									$ ( '#qsl_via' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign_info' ) . text ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#input_usa_state' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#qso-last-table' ) . show ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#partial_view' ) . hide ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-15 22:04:33 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									var  $select  =  $ ( '#wwff_ref' ) . selectize ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  selectize  =  $select [ 0 ] . selectize ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									selectize . clear ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-05 23:05:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									var  $select  =  $ ( '#pota_ref' ) . selectize ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  selectize  =  $select [ 0 ] . selectize ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									selectize . clear ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-15 04:36:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									var  $select  =  $ ( '#darc_dok' ) . selectize ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  selectize  =  $select [ 0 ] . selectize ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									selectize . clear ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-17 04:07:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$select  =  $ ( '#stationCntyInput' ) . selectize ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									selectize  =  $select [ 0 ] . selectize ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									selectize . clear ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-01-05 22:21:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									mymap . setView ( pos ,  12 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									mymap . removeLayer ( markers ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '.callsign-suggest' ) . hide ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 16:10:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '.dxccsummary' ) . remove ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( "#callsign" ) . focusout ( function ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( $ ( this ) . val ( ) . length  >=  3 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Temp store the callsign
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  temp _callsign  =  $ ( this ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										/* Find and populate DXCC */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '.callsign-suggest' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if ( $ ( "#sat_name" ) . val ( )  !=  "" ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  sat _type  =  "SAT" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  json _band  =  "0" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  json _mode  =  "0" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  sat _type  =  "0" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  json _band  =  $ ( "#band" ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											var  json _mode  =  $ ( "#mode" ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  find _callsign  =  $ ( this ) . val ( ) . toUpperCase ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										find _callsign . replace ( /\//g ,  "-" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// Replace / in a callsign with - to stop urls breaking
 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:32:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										$ . getJSON ( base _url  +  'index.php/logbook/json/'  +  find _callsign . replace ( /\//g ,  "-" )  +  '/'  +  sat _type  +  '/'  +  json _band  +  '/'  +  json _mode  +  '/'  +  $ ( '#stationProfile' ) . val ( ) ,  function ( result ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-01 22:01:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// Make sure the typed callsign and json result match
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if ( $ ( '#callsign' ) . val  =  result . callsign )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-01 22:08:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												// Reset QSO fields
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												resetDefaultQSOFields ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												if ( result . dxcc . entity  !=  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#country' ) . val ( convert _case ( result . dxcc . entity ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#callsign_info' ) . text ( convert _case ( result . dxcc . entity ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													if ( $ ( "#sat_name"  ) . val ( )  !=  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														//logbook/jsonlookupgrid/io77/SAT/0/0
 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:32:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														$ . getJSON ( base _url  +  'index.php/logbook/jsonlookupcallsign/'  +  find _callsign . replace ( /\//g ,  "-" )  +  '/SAT/0/0' ,  function ( result ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
														{ 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
															// Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#callsign' ) . removeClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#callsign' ) . removeClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#callsign' ) . attr ( 'title' ,  '' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( '#callsign' ) . addClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( '#callsign' ) . attr ( 'title' ,  'Callsign was already worked in the past on this band and mode!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( '#callsign' ) . addClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( '#callsign' ) . attr ( 'title' ,  'New Callsign!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:32:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														$ . getJSON ( base _url  +  'index.php/logbook/jsonlookupcallsign/'  +  find _callsign . replace ( /\//g ,  "-" )  +  '/0/'  +  $ ( "#band" ) . val ( )  + '/'  +  $ ( "#mode" ) . val ( ) ,  function ( result ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
														{ 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
															// Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#callsign' ) . removeClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#callsign' ) . removeClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#callsign' ) . attr ( 'title' ,  '' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( '#callsign' ) . addClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( '#callsign' ) . attr ( 'title' ,  'Callsign was already worked in the past on this band and mode!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( '#callsign' ) . addClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																$ ( '#callsign' ) . attr ( 'title' ,  'New Callsign!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													changebadge ( result . dxcc . entity ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-28 01:57:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 23:20:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													getDxccResult ( result . dxcc . adif ,  convert _case ( result . dxcc . entity ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												if ( result . lotw _member  ==  "active" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#lotw_info' ) . text ( "LoTW" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-13 23:19:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													if  ( result . lotw _days  >  365 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#lotw_info' ) . addClass ( 'lotw_info_red' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}  else  if  ( result . lotw _days  >  30 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#lotw_info' ) . addClass ( 'lotw_info_orange' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$lotw _hint  =  ' lotw_info_orange' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}  else  if  ( result . lotw _days  >  7 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#lotw_info' ) . addClass ( 'lotw_info_yellow' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 07:00:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													$ ( '#lotw_link' ) . attr ( 'href' , "https://lotw.arrl.org/lotwuser/act?act=" + find _callsign ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#lotw_link' ) . attr ( 'target' , "_blank" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-13 23:19:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													$ ( '#lotw_info' ) . attr ( 'data-toggle' , "tooltip" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 13:01:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													$ ( '#lotw_info' ) . attr ( 'data-original-title' , "LoTW User. Last upload was " + result . lotw _days + " days ago" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-13 23:19:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													$ ( '[data-toggle="tooltip"]' ) . tooltip ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-28 01:57:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												$ ( '#qrz_info' ) . html ( '<a target="_blank" href="https://www.qrz.com/db/' + find _callsign + '"><img width="32" height="32" src="' + base _url + 'images/icons/qrz.com.png"></a>' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-20 05:07:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												$ ( '#qrz_info' ) . attr ( 'title' ,  'Lookup ' + find _callsign + ' info on qrz.com' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-28 01:57:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												$ ( '#hamqth_info' ) . html ( '<a target="_blank" href="https://www.hamqth.com/' + find _callsign + '"><img width="32" height="32" src="' + base _url + 'images/icons/hamqth.com.png"></a>' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-20 05:07:51 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												$ ( '#hamqth_info' ) . attr ( 'title' ,  'Lookup ' + find _callsign + ' info on hamqth.com' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-23 04:45:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												var  $dok _select  =  $ ( '#darc_dok' ) . selectize ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												var  dok _selectize  =  $dok _select [ 0 ] . selectize ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-15 04:36:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												if  ( result . dxcc . adif  ==  '230' )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:32:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													$ . get ( base _url  +  'index.php/lookup/dok/'  +  $ ( '#callsign' ) . val ( ) . toUpperCase ( ) ,  function ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-15 05:24:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														if  ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-23 04:45:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
															dok _selectize . addOption ( { name :  result } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															dok _selectize . setValue ( result ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-15 05:24:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-15 04:36:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-23 04:45:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													dok _selectize . clear ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-15 04:36:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												$ ( '#dxcc_id' ) . val ( result . dxcc . adif ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#cqz' ) . val ( result . dxcc . cqz ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#ituz' ) . val ( result . dxcc . ituz ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												var  redIcon  =  L . icon ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													iconUrl :  icon _dot _url , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													iconSize :      [ 18 ,  18 ] ,  // size of the icon
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												// Set Map to Lat/Long
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												markers . clearLayers ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												mymap . setZoom ( 8 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( typeof  result . latlng  !==  "undefined"  &&  result . latlng  !==  false )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													var  marker  =  L . marker ( [ result . latlng [ 0 ] ,  result . latlng [ 1 ] ] ,  { icon :  redIcon } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													mymap . panTo ( [ result . latlng [ 0 ] ,  result . latlng [ 1 ] ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-09 00:57:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													mymap . setView ( [ result . latlng [ 0 ] ,  result . latlng [ 1 ] ] ,  8 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													var  marker  =  L . marker ( [ result . dxcc . lat ,  result . dxcc . long ] ,  { icon :  redIcon } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													mymap . panTo ( [ result . dxcc . lat ,  result . dxcc . long ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-09 00:57:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													mymap . setView ( [ result . dxcc . lat ,  result . dxcc . long ] ,  8 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												markers . addLayer ( marker ) . addTo ( mymap ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												/* Find Locator if the field is empty */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if ( $ ( '#locator' ) . val ( )  ==  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . val ( result . callsign _qra ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator_info' ) . html ( result . bearing ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-15 22:03:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													if  ( result . callsign _distance  !=  ""  &&  result . callsign _distance  !=  0 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														document . getElementById ( "distance" ) . value  =  result . callsign _distance ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													if  ( result . callsign _qra  !=  "" ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#locator' ) . addClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#locator' ) . attr ( 'title' ,  'Grid was already worked in the past' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#locator' ) . addClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															$ ( '#locator' ) . attr ( 'title' ,  'New grid!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														$ ( '#locator' ) . removeClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . removeClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . attr ( 'title' ,  '' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												/* Find Operators Name */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if ( $ ( '#qsl_via' ) . val ( )  ==  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#qsl_via' ) . val ( result . qsl _manager ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												/* Find Operators Name */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if ( $ ( '#name' ) . val ( )  ==  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#name' ) . val ( result . callsign _name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-05 00:41:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												if ( $ ( '#continent' ) . val ( )  ==  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#continent' ) . val ( result . dxcc . cont ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												if ( $ ( '#qth' ) . val ( )  ==  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#qth' ) . val ( result . callsign _qth ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-04-03 16:28:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												/* Find link to qrz.com picture */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( result . image  !=  "n/a" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#callsign-image-content' ) . html ( '<img class="callsign-image-pic" src="' + result . image + '">' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#callsign-image' ) . attr ( 'style' ,  'display: true;' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												/ * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												*  Update  state  with  returned  value 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												* / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if ( $ ( "#input_usa_state" ) . val ( )  ==  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( "#input_usa_state" ) . val ( result . callsign _state ) . trigger ( 'change' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-04-17 04:07:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												/ * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												*  Update  county  with  returned  value 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												* / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if (  $ ( '#stationCntyInput' ) . has ( 'option' ) . length  ==  0  &&  result . callsign _us _county  !=  "" )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-23 04:45:01 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													var  $county _select  =  $ ( '#stationCntyInput' ) . selectize ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													var  county _selectize  =  $county _select [ 0 ] . selectize ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													county _selectize . addOption ( { name :  result . callsign _us _county } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													county _selectize . setValue ( result . callsign _us _county ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-17 04:07:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 23:51:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												if ( $ ( '#iota_ref' ) . val ( )  ==  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#iota_ref' ) . val ( result . callsign _iota ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												// Hide the last QSO table
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#qso-last-table' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#partial_view' ) . show ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												/* display past QSOs */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												$ ( '#partial_view' ) . html ( result . partial ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-01 22:08:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										// Reset QSO fields
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										resetDefaultQSOFields ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// Only set the frequency when not set by userdata/PHP.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								if  ( $ ( '#frequency' ) . val ( )  ==  "" )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:32:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ . get ( base _url  +  'index.php/qso/band_to_freq/'  +  $ ( '#band' ) . val ( )  +  '/'  +  $ ( '.mode' ) . val ( ) ,  function ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										$ ( '#frequency' ) . val ( result ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#frequency_rx' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-30 03:17:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/* time input shortcut */  
						 
					
						
							
								
									
										
										
										
											2021-08-30 03:08:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$ ( '#start_time' ) . change ( function ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  raw _time  =  $ ( this ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if ( raw _time . match ( /^\d\[0-6]d$/ ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										raw _time  =  "0" + raw _time ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if ( raw _time . match ( /^[012]\d[0-5]\d$/ ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										raw _time  =  raw _time . substring ( 0 , 2 ) + ":" + raw _time . substring ( 2 , 4 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#start_time' ) . val ( raw _time ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-30 03:17:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/* date input shortcut */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( '#start_date' ) . change ( function ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 raw _date  =  $ ( this ) . val ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-30 15:03:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if ( raw _date . match ( /^[12]\d{3}[01]\d[0123]\d$/ ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-30 03:17:43 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										raw _date  =  raw _date . substring ( 0 , 4 ) + "-" + raw _date . substring ( 4 , 6 ) + "-" + raw _date . substring ( 6 , 8 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#start_date' ) . val ( raw _date ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/* on mode change */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( '.mode' ) . change ( function ( )  {  
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:32:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ . get ( base _url  +  'index.php/qso/band_to_freq/'  +  $ ( '#band' ) . val ( )  +  '/'  +  $ ( '.mode' ) . val ( ) ,  function ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										$ ( '#frequency' ) . val ( result ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#frequency_rx' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* Calculate Frequency */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* on band change */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( '#band' ) . change ( function ( )  {  
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:32:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ . get ( base _url  +  'index.php/qso/band_to_freq/'  +  $ ( this ) . val ( )  +  '/'  +  $ ( '.mode' ) . val ( ) ,  function ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										$ ( '#frequency' ) . val ( result ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( '#frequency_rx' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* On Key up Calculate Bearing and Distance */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( "#locator" ) . keyup ( function ( ) {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( $ ( this ) . val ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  qra _input  =  $ ( this ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  qra _lookup  =  qra _input . substring ( 0 ,  4 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if ( qra _lookup . length  >=  4 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// Check Log if satname is provided
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if ( $ ( "#sat_name"  ) . val ( )  !=  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												//logbook/jsonlookupgrid/io77/SAT/0/0
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:24:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												$ . getJSON ( base _url  +  'index.php/logbook/jsonlookupgrid/'  +  qra _lookup . toUpperCase ( )  +  '/SAT/0/0' ,  function ( result ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													// Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . removeClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . removeClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . attr ( 'title' ,  '' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . addClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . attr ( 'title' ,  'Grid was already worked in the past' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . addClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . attr ( 'title' ,  'New grid!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:24:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												$ . getJSON ( base _url  +  'index.php/logbook/jsonlookupgrid/'  +  qra _lookup . toUpperCase ( )  +  '/0/'  +  $ ( "#band" ) . val ( )  + '/'  +  $ ( "#mode" ) . val ( ) ,  function ( result ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													// Reset CSS values before updating
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . removeClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . removeClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#locator' ) . attr ( 'title' ,  '' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													if  ( result . workedBefore ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . addClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . attr ( 'title' ,  'Grid was already worked in the past' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . addClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														$ ( '#locator' ) . attr ( 'title' ,  'New grid!' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if ( qra _input . length  >=  4  &&  $ ( this ) . val ( ) . length  >  0 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:24:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ . getJSON ( base _url  +  'index.php/logbook/qralatlngjson/'  +  $ ( this ) . val ( ) ,  function ( result ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												// Set Map to Lat/Long
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												markers . clearLayers ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( typeof  result  !==  "undefined" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													var  redIcon  =  L . icon ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														iconUrl :  icon _dot _url , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														iconSize :      [ 18 ,  18 ] ,  // size of the icon
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													var  marker  =  L . marker ( [ result [ 0 ] ,  result [ 1 ] ] ,  { icon :  redIcon } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													mymap . setZoom ( 8 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													mymap . panTo ( [ result [ 0 ] ,  result [ 1 ] ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-09 00:57:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													mymap . setView ( [ result [ 0 ] ,  result [ 1 ] ] ,  8 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												markers . addLayer ( marker ) . addTo ( mymap ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:12:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ ( '#locator_info' ) . load ( base _url  + "index.php/logbook/searchbearing/"  +  $ ( this ) . val ( )  +  "/"  +  $ ( '#stationProfile' ) . val ( ) ) . fadeIn ( "slow" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:14:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											$ . get ( base _url  +  'index.php/logbook/searchdistance/'  +  $ ( this ) . val ( )  +  "/"  +  $ ( '#stationProfile' ) . val ( ) ,  function ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-16 00:15:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												document . getElementById ( "distance" ) . value  =  result ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// Change report based on mode
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( '.mode' ) . change ( function ( ) {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									setRst ( $ ( '.mode' )  . val ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  convert _case ( str )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  lower  =  str . toLowerCase ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  lower . replace ( /(^| )(\w)/g ,  function ( x )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  x . toUpperCase ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( '#dxcc_id' ) . on ( 'change' ,  function ( )  {  
						 
					
						
							
								
									
										
										
										
											2023-08-14 05:38:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ . getJSON ( base _url  +  'index.php/logbook/jsonentity/'  +  $ ( this ) . val ( ) ,  function  ( result )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										if  ( result . dxcc . name  !=  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#country' ) . val ( convert _case ( result . dxcc . name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#cqz' ) . val ( convert _case ( result . dxcc . cqz ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . removeClass ( "badge-secondary" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . removeClass ( "badge-success" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . removeClass ( "badge-danger" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . attr ( 'title' ,  '' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#callsign_info' ) . text ( convert _case ( result . dxcc . name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											changebadge ( result . dxcc . name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											// Set Map to Lat/Long it locator is not empty
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if ( $ ( '#locator' ) . val ( )  ==  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												var  redIcon  =  L . icon ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													iconUrl :  icon _dot _url , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													iconSize :      [ 18 ,  18 ] ,  // size of the icon
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												markers . clearLayers ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												var  marker  =  L . marker ( [ result . dxcc . lat ,  result . dxcc . long ] ,  { icon :  redIcon } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												mymap . setZoom ( 8 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												mymap . panTo ( [ result . dxcc . lat ,  result . dxcc . long ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												markers . addLayer ( marker ) . addTo ( mymap ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								//Spacebar moves to the name field when you're entering a callsign
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								//Similar to contesting ux, good for pileups.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( "#callsign" ) . on ( "keypress" ,  function ( e )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( e . which  ==  32 ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										$ ( "#name" ) . focus ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  false ;  //Eliminate space char
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// On Key up check and suggest callsigns
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( "#callsign" ) . keyup ( function ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( $ ( this ) . val ( ) . length  >=  3 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-08 20:38:28 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									  $ ( '.callsign-suggest' ) . show ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									  $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  'lookup/scp' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										method :  'POST' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										  callsign :  $ ( this ) . val ( ) . toUpperCase ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										  $ ( '.callsign-suggestions' ) . text ( result ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-26 17:37:43 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-08 20:38:28 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-01 22:08:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								//Reset QSO form Fields function
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  resetDefaultQSOFields ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign_info' ) . text ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#locator_info' ) . text ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#country' ) . val ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-05 00:41:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#continent' ) . val ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-01 22:08:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#dxcc_id' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#cqz' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#name' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#qth' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#locator' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#iota_ref' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#sota_ref' ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( "#locator" ) . removeClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( "#locator" ) . removeClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( "#callsign" ) . removeClass ( "workedGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( "#callsign" ) . removeClass ( "newGrid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign_info' ) . removeClass ( "badge-secondary" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign_info' ) . removeClass ( "badge-success" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign_info' ) . removeClass ( "badge-danger" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#input_usa_state' ) . val ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-01 22:43:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '#callsign-image' ) . attr ( 'style' ,  'display: none;' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( '#callsign-image-content' ) . text ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 16:10:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ ( '.dxccsummary' ) . remove ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-01 22:43:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2023-05-15 22:35:11 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  closeModal ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  container  =  document . getElementById ( "modals-here" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  backdrop  =  document . getElementById ( "modal-backdrop" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  modal  =  document . getElementById ( "modal" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									modal . classList . remove ( "show" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									backdrop . classList . remove ( "show" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									setTimeout ( function ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										container . removeChild ( backdrop ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										container . removeChild ( modal ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ,  200 ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-18 07:00:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}