2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								function  qsl _rcvd ( id ,  method )  {  
						 
					
						
							
								
									
										
										
										
											2023-06-29 23:53:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $ ( ".ld-ext-right-r-" + method ) . addClass ( 'running' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( ".ld-ext-right-r-" + method ) . prop ( 'disabled' ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        url :  base _url  +  'index.php/qso/qsl_rcvd_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        data :  { 'id' :  id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'method' :  method 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        success :  function ( data )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-29 23:53:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( ".ld-ext-right-r-" + method ) . removeClass ( 'running' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( ".ld-ext-right-r-" + method ) . prop ( 'disabled' ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								            if  ( data . message  ==  'OK' )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-02 23:09:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $ ( "#qsl_"  +  id ) . find ( "span:eq(1)" ) . attr ( 'class' ,  'qsl-green' ) ;  // Paints arrow green
 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								                $ ( ".qsl_rcvd_"  +  id ) . remove ( ) ;  // removes choice from menu
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( ".bootstrap-dialog-message" ) . append ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>You are not allowed to update QSL status!</div>' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  qsl _sent ( id ,  method )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        url :  base _url  +  'index.php/qso/qsl_sent_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        data :  { 'id' :  id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'method' :  method 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( data . message  ==  'OK' )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-02 23:09:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $ ( "#qsl_"  +  id ) . find ( "span:eq(0)" ) . attr ( 'class' ,  'qsl-green' ) ;  // Paints arrow green
 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								                $ ( ".qsl_sent_"  +  id ) . remove ( ) ;  // removes choice from menu
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( ".bootstrap-dialog-message" ) . append ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>You are not allowed to update QSL status!</div>' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// Function: qsl_requested
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// Marks QSL card requested against the QSO.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  qsl _requested ( id ,  method )  {  
						 
					
						
							
								
									
										
										
										
											2023-06-29 23:53:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $ ( ".ld-ext-right-t-" + method ) . addClass ( 'running' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( ".ld-ext-right-t-" + method ) . prop ( 'disabled' ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        url :  base _url  +  'index.php/qso/qsl_requested_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        data :  { 'id' :  id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'method' :  method 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        success :  function ( data )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-29 23:53:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( ".ld-ext-right-t-" + method ) . removeClass ( 'running' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( ".ld-ext-right-t-" + method ) . prop ( 'disabled' ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								            if  ( data . message  ==  'OK' )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-02 23:09:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $ ( "#qsl_"  +  id ) . find ( "span:eq(0)" ) . attr ( 'class' ,  'qsl-yellow' ) ;  // Paints arrow yellow
 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( ".bootstrap-dialog-message" ) . append ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>You are not allowed to update QSL status!</div>' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// Function: qsl_ignore
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// Marks QSL card ignore against the QSO.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  qsl _ignore ( id ,  method )  {  
						 
					
						
							
								
									
										
										
										
											2023-06-29 23:53:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    $ ( ".ld-ext-right-ignore" ) . addClass ( 'running' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( ".ld-ext-right-ignore" ) . prop ( 'disabled' ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        url :  base _url  +  'index.php/qso/qsl_ignore_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        data :  { 'id' :  id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'method' :  method 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        success :  function ( data )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-29 23:53:18 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( ".ld-ext-right-ignore" ) . removeClass ( 'running' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( ".ld-ext-right-ignore" ) . prop ( 'disabled' ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								            if  ( data . message  ==  'OK' )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-02 23:09:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                $ ( "#qsl_"  +  id ) . find ( "span:eq(0)" ) . attr ( 'class' ,  'qsl-grey' ) ;  // Paints arrow grey
 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( ".bootstrap-dialog-message" ) . append ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>You are not allowed to update QSL status!</div>' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  qso _delete ( id ,  call )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    BootstrapDialog . confirm ( { 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-18 17:45:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        title :  lang _general _word _danger , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        message :  lang _qso _delete _warning  +  call  +  '?'  , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        type :  BootstrapDialog . TYPE _DANGER , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        closable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        draggable :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        btnOKClass :  'btn-danger' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        callback :  function ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if ( result )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( ".edit-dialog" ) . modal ( 'hide' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ ( ".qso-dialog" ) . modal ( 'hide' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    url :  base _url  +  'index.php/qso/delete_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    data :  { 'id' :  id 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( ".alert" ) . remove ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( ".bootstrap-dialog-message" ) . prepend ( '<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>The contact with '  +  call  +  ' has been deleted!</div>' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( "#qso_"  +  id ) . remove ( ) ;  // removes qso from table in dialog
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  qso _edit ( id )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        url :  base _url  +  'index.php/qso/edit_ajax' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        data :  { 'id' :  id 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        success :  function ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            BootstrapDialog . show ( { 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-07 07:42:07 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                title :  lang _general _word _qso _data , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								                cssClass :  'edit-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                size :  BootstrapDialog . SIZE _WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                onshown :  function ( dialog )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    var  state  =  $ ( "#input_usa_state_edit option:selected" ) . text ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( state  !=  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( "#stationCntyInputEdit" ) . prop ( 'disabled' ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        selectize _usa _county ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#input_usa_state_edit' ) . change ( function ( ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        var  state  =  $ ( "#input_usa_state_edit option:selected" ) . text ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        if  ( state  !=  "" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( "#stationCntyInputEdit" ) . prop ( 'disabled' ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            selectize _usa _county ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( "#stationCntyInputEdit" ) . prop ( 'disabled' ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            //$('#stationCntyInput')[0].selectize.destroy();
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( "#stationCntyInputEdit" ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-07 07:42:07 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-16 18:17:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    $ ( '#locator' ) . change ( function ( ) { 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-23 00:58:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        if  ( $ ( this ) . val ( ) . length  >=  4 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-30 05:46:07 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               url :  base _url  +  'index.php/logbook/searchbearing' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  grid :  $ ( this ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  stationProfile :  $ ( '#stationProfile' ) . val ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  $ ( '#locator_info' ) . html ( data ) . fadeIn ( "slow" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               error :  function ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  $ ( '#locator_info' ) . text ( "Error loading bearing!" ) . fadeIn ( "slow" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-30 05:38:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               url :  base _url  +  'index.php/logbook/searchdistance' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  grid :  $ ( this ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  stationProfile :  $ ( '#stationProfile' ) . val ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               success :  function ( data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                  document . getElementById ( "distance" ) . value  =  data ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                               error :  function ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-30 05:48:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                  document . getElementById ( "distance" ) . value  =  null ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-30 05:38:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                               } , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-23 00:58:13 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-16 18:17:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								                    $ ( '#sota_ref_edit' ) . selectize ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        options :  [ ] , 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-07 02:07:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        create :  true , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +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 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#wwff_ref_edit' ) . selectize ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        options :  [ ] , 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-06 15:33:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        create :  true , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +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 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#pota_ref_edit' ) . selectize ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        options :  [ ] , 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-07 02:07:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        create :  true , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +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 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '#darc_dok_edit' ) . selectize ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        maxItems :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        closeAfterSelect :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        loadThrottle :  250 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        valueField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        labelField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        searchField :  'name' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        options :  [ ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        create :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        load :  function ( query ,  callback )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            if  ( ! query )  return  callback ( ) ;   // Only trigger if 3 or more characters are 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 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-29 21:26:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    // [eQSL default msg] change value (for qso edit page) //
 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-02 22:02:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    $ ( '.modal-content #stationProfile' ) . change ( function ( )  {  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        qso _set _eqsl _qslmsg ( $ ( '.modal-content #stationProfile' ) . val ( ) , false , '.modal-content' ) ;  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( '.modal-content .qso_eqsl_qslmsg_update' ) . off ( 'click' ) . on ( 'click' , function ( )  {  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        qso _set _eqsl _qslmsg ( $ ( '.modal-content #stationProfile' ) . val ( ) , true , '.modal-content' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-02 22:10:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        $ ( '.modal-content #charsLeft' ) . text ( " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-02 22:02:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-02 20:00:56 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    $ ( '.modal-content #qslmsg' ) . keyup ( function ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        calcRemainingChars ( event ,  '.modal-content' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								                } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  spawnQrbCalculator ( locator1 ,  locator2 )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  base _url  +  'index.php/qrbcalc' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BootstrapDialog . show ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												title :  'Compute QRB and QTF' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												size :  BootstrapDialog . SIZE _WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												cssClass :  'lookup-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												onshown :  function ( dialog )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( locator1  !==  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( "#qrbcalc_locator1" ) . val ( locator1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    if  ( locator2  !==  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( "#qrbcalc_locator2" ) . val ( locator2 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        calculateQrb ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												buttons :  [ { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-06 02:38:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													label :  lang _admin _close , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														dialogItself . close ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  spawnActivatorsMap ( call ,  count ,  grids )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  base _url  +  'index.php/activatorsmap' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BootstrapDialog . show ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												title :  'Activators Map' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												size :  BootstrapDialog . SIZE _WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												cssClass :  'lookup-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												onshown :  function ( dialog )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													showActivatorsMap ( call ,  count ,  grids ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												buttons :  [ { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-06 02:38:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													label :  lang _admin _close , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														dialogItself . close ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  calculateQrb ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    let  locator1  =  $ ( "#qrbcalc_locator1" ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    let  locator2  =  $ ( "#qrbcalc_locator2" ) . val ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ ( ".qrbalert" ) . remove ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( validateLocator ( locator1 )  &&  validateLocator ( locator2 ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            url :  base _url + 'index.php/qrbcalc/calculate' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            data :  { 'locator1' :  locator1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'locator2' :  locator2 } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            success :  function  ( html )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-23 20:22:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								                var  result  =  "<h5>Negative latitudes are south of the equator, negative longitudes are west of Greenwich. <br/>" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                result  +=  ' '  +  locator1 . toUpperCase ( )  +  ' Latitude = '  +  html [ 'latlng1' ] [ 0 ]  +  ' Longitude = '  +  html [ 'latlng1' ] [ 1 ]  +  '<br/>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                result  +=  ' '  +  locator2 . toUpperCase ( )  +  ' Latitude = '  +  html [ 'latlng2' ] [ 0 ]  +  ' Longitude = '  +  html [ 'latlng2' ] [ 1 ]  +  '<br/>' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                result  +=  'Distance between '  +  locator1 . toUpperCase ( )  +  ' and '  +  locator2 . toUpperCase ( )  +  ' is '  +  html [ 'distance' ]  +  '.<br />' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                result  +=  'The bearing is '  +  html [ 'bearing' ]  +  '.</h5>' ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-23 20:22:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								                $ ( ".qrbResult" ) . html ( result ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                newpath ( html [ 'latlng1' ] ,  html [ 'latlng2' ] ,  locator1 ,  locator2 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '.qrbResult' ) . html ( '<div class="qrbalert alert alert-danger" role="alert">Error in locators. Please check.</div>' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  validateLocator ( locator )  {  
						 
					
						
							
								
									
										
										
										
											2023-08-25 00:12:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    vucc _gridno  =  locator . split ( "," ) . length ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if ( vucc _gridno  ==  3  ||  vucc _gridno  >  4 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    if ( locator . length  <  4  &&  ! ( /^[a-rA-R]{2}[0-9]{2}[a-xA-X]{0,2}[0-9]{0,2}[a-xA-X]{0,2}$/ . test ( locator ) ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-23 20:22:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// This displays the dialog with the form and it's where the resulttable is displayed
  
						 
					
						
							
								
									
										
										
										
											2023-06-30 00:59:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								function  spawnLookupModal ( searchphrase ,  searchtype )  {  
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  base _url  +  'index.php/lookup' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BootstrapDialog . show ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												title :  'Quick lookup' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												size :  BootstrapDialog . SIZE _WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												cssClass :  'lookup-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												onshown :  function ( dialog )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													$ ( '#quicklookuptype' ) . change ( function ( ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														var  type  =  $ ( '#quicklookuptype' ) . val ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-30 00:59:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        changeLookupType ( type ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-30 00:59:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    if  ( searchtype  !==  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        $ ( '#quicklookuptype' ) . val ( searchtype ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        if  ( searchtype  ==  'dxcc' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( "#quicklookupdxcc" ) . val ( searchphrase ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }  else  if  ( searchtype  ==  'iota' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( "#quicklookupiota" ) . val ( searchphrase ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }  else  if  ( searchtype  ==  'cq' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( "#quicklookupcqz" ) . val ( searchphrase ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            $ ( "#quicklookuptext" ) . val ( searchphrase ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        changeLookupType ( searchtype ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        getLookupResult ( this . form ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    } 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												buttons :  [ { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-06 02:38:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													label :  lang _admin _close , 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														dialogItself . close ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-30 00:59:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								function  changeLookupType ( type )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( type  ==  "dxcc" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupdxcc' ) . show ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupiota' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupcqz' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupwas' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookuptext' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }  else  if  ( type  ==  "iota" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupiota' ) . show ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupdxcc' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupcqz' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupwas' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookuptext' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }  else  if  ( type  ==  "vucc"  ||  type  ==  "sota"  ||  type  ==  "wwff" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookuptext' ) . show ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupiota' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupdxcc' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupcqz' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupwas' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }  else  if  ( type  ==  "cq" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupcqz' ) . show ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupiota' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupdxcc' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupwas' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookuptext' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }  else  if  ( type  ==  "was" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupwas' ) . show ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupcqz' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupiota' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookupdxcc' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( '#quicklookuptext' ) . hide ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-24 17:52:58 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								// This function executes the call to the backend for fetching queryresult and displays the table in the dialog
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  getLookupResult ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( ".ld-ext-right" ) . addClass ( 'running' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ ( ".ld-ext-right" ) . prop ( 'disabled' ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  base _url  +  'index.php/lookup/search' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											type :  $ ( '#quicklookuptype' ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											dxcc :  $ ( '#quicklookupdxcc' ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											was :   $ ( '#quicklookupwas' ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											grid :  $ ( '#quicklookuptext' ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											cqz :   $ ( '#quicklookupcqz' ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											iota :  $ ( '#quicklookupiota' ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											sota :  $ ( '#quicklookuptext' ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											wwff :  $ ( '#quicklookuptext' ) . val ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( '#lookupresulttable' ) . html ( html ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( ".ld-ext-right" ) . removeClass ( 'running' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											$ ( ".ld-ext-right" ) . prop ( 'disabled' ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 15:54:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// This function executes the call to the backend for fetching dxcc summary and inserted table below qso entry
  
						 
					
						
							
								
									
										
										
										
											2023-01-26 16:20:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								function  getDxccResult ( dxcc ,  name )  {  
						 
					
						
							
								
									
										
										
										
											2023-01-26 15:54:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									$ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  base _url  +  'index.php/lookup/search' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											type :  'dxcc' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											dxcc :  dxcc , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            $ ( '.dxccsummary' ) . remove ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 15:43:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( '.qsopane' ) . append ( '<div class="dxccsummary col-sm-12"><br><div class="card"><div class="card-header dxccsummaryheader" data-bs-toggle="collapse" data-bs-target=".dxccsummarybody">DXCC Summary for ' + name + '</div><div class="card-body collapse dxccsummarybody"></div></div></div>' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 15:54:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            $ ( '.dxccsummarybody' ) . append ( html ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-06 15:33:19 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2023-07-01 05:36:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  displayQsl ( id )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										url :  base _url  +  'index.php/qsl/viewQsl' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										type :  'post' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        data :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											id :  id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										success :  function  ( html )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BootstrapDialog . show ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												title :  'QSL Card' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												size :  BootstrapDialog . SIZE _WIDE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												cssClass :  'lookup-dialog' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												nl2br :  false , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												message :  html , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												onshown :  function ( dialog )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												buttons :  [ { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-06 02:38:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													label :  lang _admin _close , 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-01 05:36:35 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													action :  function  ( dialogItself )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														dialogItself . close ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2023-11-29 21:26:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// [eQSL default msg] function to load default qslmsg to qslmsg field on qso add/edit //
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  qso _set _eqsl _qslmsg ( station _id ,  force _diff _to _origin = false ,  object = '' )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    $ . ajax ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        url :  base _url + 'index.php/station/get_options' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        type :  'post' ,  data :  { 'option_type' : 'eqsl_default_qslmsg' , 'option_name' : 'key_station_id' , 'option_key' : station _id  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        success :  function ( res )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( typeof  res . eqsl _default _qslmsg  !==  "undefined" )  {  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                object  =  ( object != '' ) ? ( object + ' ' ) : '' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( ( force _diff _to _origin )  ||  ( $ ( object + '#qslmsg' ) . val ( ) == $ ( object + '#qslmsg_hide' ) . html ( ) ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( object + '#qslmsg' ) . val ( res . eqsl _default _qslmsg ) ;  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    $ ( object + '#qslmsg_hide' ) . html ( res . eqsl _default _qslmsg ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        error :  function ( )  {  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-16 03:22:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-18 00:39:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// [PWD] button show/hide //
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								function  btn _pwd _showhide ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( $ ( this ) . closest ( 'div' ) . find ( 'input[type="password"]' ) . length > 0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( this ) . closest ( 'div' ) . find ( 'input[type="password"]' ) . attr ( 'type' , 'text' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        $ ( this ) . closest ( 'div' ) . find ( '.fa-eye-slash' ) . removeClass ( 'fa-eye-slash' ) . addClass ( 'fa-eye' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-16 03:22:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-18 00:39:12 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( this ) . closest ( 'div' ) . find ( 'input[type="text"]' ) . attr ( 'type' , 'password' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-18 03:21:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        $ ( this ) . closest ( 'div' ) . find ( '.fa-eye' ) . removeClass ( 'fa-eye' ) . addClass ( 'fa-eye-slash' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-16 03:22:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-18 02:16:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								$ ( '.user_edit .btn-pwd-showhide' ) . off ( 'click' ) . on ( 'click' ,  btn _pwd _showhide  ) ;