Added highlighting on already worked and time-things
这个提交包含在:
		
							父节点
							
								
									fb73793a23
								
							
						
					
					
						当前提交
						c27f97defa
					
				
					共有  4 个文件被更改,包括 45 次插入 和 6 次删除
				
			
		|  | @ -33,14 +33,39 @@ class Bandmap extends CI_Controller { | ||||||
| 		$data['radios'] = $this->cat->radios(); | 		$data['radios'] = $this->cat->radios(); | ||||||
| 		$data['bands'] = $this->bands->get_user_bands_for_qso_entry(); | 		$data['bands'] = $this->bands->get_user_bands_for_qso_entry(); | ||||||
| 
 | 
 | ||||||
|         	$footerData = []; | 		$footerData = []; | ||||||
| 		$footerData['scripts'] = [ | 		$footerData['scripts'] = [ | ||||||
| 			 'assets/js/sections/bandmap_list.js', | 			'assets/js/moment.min.js', | ||||||
|  |                         'assets/js/datetime-moment.js', | ||||||
|  | 			'assets/js/sections/bandmap_list.js' | ||||||
| 		]; | 		]; | ||||||
| 
 | 
 | ||||||
|  | 		$CI =& get_instance(); | ||||||
|  | 		// Get Date format
 | ||||||
|  | 		if($CI->session->userdata('user_date_format')) { | ||||||
|  | 			// If Logged in and session exists
 | ||||||
|  | 			$pageData['custom_date_format'] = $CI->session->userdata('user_date_format'); | ||||||
|  | 		} else { | ||||||
|  | 			// Get Default date format from /config/cloudlog.php
 | ||||||
|  | 			$pageData['custom_date_format'] = $CI->config->item('qso_date_format'); | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		switch ($pageData['custom_date_format']) { | ||||||
|  | 		case "d/m/y": $pageData['custom_date_format'] = 'DD/MM/YY'; break; | ||||||
|  | 		case "d/m/Y": $pageData['custom_date_format'] = 'DD/MM/YYYY'; break; | ||||||
|  | 		case "m/d/y": $pageData['custom_date_format'] = 'MM/DD/YY'; break; | ||||||
|  | 		case "m/d/Y": $pageData['custom_date_format'] = 'MM/DD/YYYY'; break; | ||||||
|  | 		case "d.m.Y": $pageData['custom_date_format'] = 'DD.MM.YYYY'; break; | ||||||
|  | 		case "y/m/d": $pageData['custom_date_format'] = 'YY/MM/DD'; break; | ||||||
|  | 		case "Y-m-d": $pageData['custom_date_format'] = 'YYYY-MM-DD'; break; | ||||||
|  | 		case "M d, Y": $pageData['custom_date_format'] = 'MMM DD, YYYY'; break; | ||||||
|  | 		case "M d, y": $pageData['custom_date_format'] = 'MMM DD, YY'; break; | ||||||
|  | 		default: $pageData['custom_date_format'] = 'DD/MM/YYYY'; | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		$data['page_title'] = "DXCluster"; | 		$data['page_title'] = "DXCluster"; | ||||||
| 		$this->load->view('interface_assets/header', $data); | 		$this->load->view('interface_assets/header', $data); | ||||||
| 		$this->load->view('bandmap/list'); | 		$this->load->view('bandmap/list',$pageData); | ||||||
| 		$this->load->view('interface_assets/footer', $footerData); | 		$this->load->view('interface_assets/footer', $footerData); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -7,6 +7,12 @@ class Dxcluster_model extends CI_Model { | ||||||
| 		$this->load->helper(array('psr4_autoloader')); | 		$this->load->helper(array('psr4_autoloader')); | ||||||
| 	    $CI =& get_instance(); | 	    $CI =& get_instance(); | ||||||
| 	    if ( ($this->optionslib->get_option('dxcache_url') != '') ) { | 	    if ( ($this->optionslib->get_option('dxcache_url') != '') ) { | ||||||
|  | 		if($CI->session->userdata('user_date_format')) { | ||||||
|  |                         $custom_date_format = $CI->session->userdata('user_date_format'); | ||||||
|  |                 } else { | ||||||
|  |                         $custom_date_format = $CI->config->item('qso_date_format'); | ||||||
|  |                 } | ||||||
|  | 
 | ||||||
| 		    $dxcache_url = $this->optionslib->get_option('dxcache_url').'/spots/'.$band; | 		    $dxcache_url = $this->optionslib->get_option('dxcache_url').'/spots/'.$band; | ||||||
| 		    $CI->load->model('logbooks_model'); | 		    $CI->load->model('logbooks_model'); | ||||||
| 			$CI->load->model('logbook_model'); | 			$CI->load->model('logbook_model'); | ||||||
|  | @ -39,7 +45,7 @@ class Dxcluster_model extends CI_Model { | ||||||
| 				    $minutes += $spotage->h * 60; | 				    $minutes += $spotage->h * 60; | ||||||
| 				    $minutes += $spotage->i; | 				    $minutes += $spotage->i; | ||||||
| 				    $singlespot->age=$minutes; | 				    $singlespot->age=$minutes; | ||||||
| 
 | 				    $singlespot->when_pretty=date($custom_date_format . " H:i", strtotime($singlespot->when)); | ||||||
| 
 | 
 | ||||||
| 				    if ($minutes<=$maxage) { | 				    if ($minutes<=$maxage) { | ||||||
| 					    if (!(property_exists($singlespot,'dxcc_spotted'))) {	// Check if we already have dxcc of spotted
 | 					    if (!(property_exists($singlespot,'dxcc_spotted'))) {	// Check if we already have dxcc of spotted
 | ||||||
|  |  | ||||||
|  | @ -1,6 +1,7 @@ | ||||||
| <script> | <script> | ||||||
| 	var dxcluster_provider="<?php echo base_url(); ?>index.php/dxcluster"; | 	var dxcluster_provider="<?php echo base_url(); ?>index.php/dxcluster"; | ||||||
| 	var cat_timeout_interval="<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?>"; | 	var cat_timeout_interval="<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?>"; | ||||||
|  | 	var custom_date_format = "<?php echo $custom_date_format ?>"; | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -37,7 +38,7 @@ | ||||||
|                 <div class="card-header"><h5 class="card-title">DXCluster</h5></div> |                 <div class="card-header"><h5 class="card-title">DXCluster</h5></div> | ||||||
|                 <p> |                 <p> | ||||||
| 
 | 
 | ||||||
|                 <table style="width:100%" class="table-sm table spottable table-bordered table-hover table-striped table-condensed text-center"> |                 <table style="width:100%" class="table-sm table spottable table-bordered table-hover table-striped table-condensed"> | ||||||
|                     <thead> |                     <thead> | ||||||
|                         <tr class="log_title titles"> |                         <tr class="log_title titles"> | ||||||
|                             <th><?php echo lang('general_word_date'); ?>/<?php echo lang('general_word_time'); ?></th>
 |                             <th><?php echo lang('general_word_date'); ?>/<?php echo lang('general_word_time'); ?></th>
 | ||||||
|  |  | ||||||
|  | @ -21,7 +21,13 @@ $(function() { | ||||||
| 			if (dxspots.length>0) { | 			if (dxspots.length>0) { | ||||||
| 				dxspots.sort(SortByQrg); | 				dxspots.sort(SortByQrg); | ||||||
| 				dxspots.forEach((single) => { | 				dxspots.forEach((single) => { | ||||||
| 					var data = [[ single.when, single.frequency, single.spotted, single.dxcc_spotted.call ]]; | 					// var data = [[ single.when_pretty, single.frequency, single.spotted, single.dxcc_spotted.call ]];
 | ||||||
|  | 					var data=[]; | ||||||
|  | 					data[0]=[]; | ||||||
|  | 					data[0].push(single.when_pretty); | ||||||
|  | 					data[0].push(single.frequency); | ||||||
|  | 					data[0].push((single.worked_call ?'<span class="text-success">' : '')+single.spotted+(single.worked_call ? '</span>' : '')); | ||||||
|  | 					data[0].push(single.dxcc_spotted.entity); | ||||||
| 					table.rows.add(data).draw(); | 					table.rows.add(data).draw(); | ||||||
| 					// add to datatable single
 | 					// add to datatable single
 | ||||||
| 				}); | 				}); | ||||||
|  | @ -89,6 +95,7 @@ $(function() { | ||||||
| 	} | 	} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | $.fn.dataTable.moment(custom_date_format + ' HH:mm'); | ||||||
| // Update frequency every three second
 | // Update frequency every three second
 | ||||||
| // setInterval(updateFromCAT, 3000);
 | // setInterval(updateFromCAT, 3000);
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用