changed to jquery, used bootstrap alerts
这个提交包含在:
		
							父节点
							
								
									9b2c4b713f
								
							
						
					
					
						当前提交
						d018137308
					
				
					共有  4 个文件被更改,包括 18 次插入 和 24 次删除
				
			
		|  | @ -542,17 +542,22 @@ $(document).ready(function() { | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| document.getElementById('dxcc_select').addEventListener('change', function() { | function printWarning() { | ||||||
|     var selectedOption = this.options[this.selectedIndex]; |     if ($("#dxcc_select option:selected").text().includes("<?php echo lang('gen_hamradio_deleted_dxcc'); ?>")) { | ||||||
|     var isDeleted = selectedOption.textContent.includes("<?php echo lang('gen_hamradio_deleted_dxcc'); ?>"); |         $('#warningMessageDXCC').show(); | ||||||
| 
 |         $('#dxcc_select').css('border', '2px solid rgb(217, 83, 79)'); | ||||||
|     if (isDeleted) { |         $('#warningMessageDXCC').text("<?php echo lang('station_location_dxcc_warning'); ?>"); | ||||||
|         this.style.border = '2px solid rgb(217, 83, 79)'; |  | ||||||
|         warningMessage.innerText = lang_station_location_dxcc_warning; |  | ||||||
|     } else { |     } else { | ||||||
|         this.style.border = ''; |         $('#dxcc_select').css('border', ''); | ||||||
|         warningMessage.innerText = ""; |         $('#warningMessageDXCC').hide(); | ||||||
|     } |     } | ||||||
|  | } | ||||||
|  | $('#dxcc_select').ready(function() { | ||||||
|  |     printWarning(); | ||||||
|  | }); | ||||||
|  | 
 | ||||||
|  | $('#dxcc_select').on('change', function() { | ||||||
|  |     printWarning(); | ||||||
| }); | }); | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -46,10 +46,7 @@ | ||||||
| 		    <small id="stationPowerInputHelp" class="form-text text-muted"><?php echo lang("station_location_power_hint"); ?></small>
 | 		    <small id="stationPowerInputHelp" class="form-text text-muted"><?php echo lang("station_location_power_hint"); ?></small>
 | ||||||
| 		  </div> | 		  </div> | ||||||
| 			<!-- Loading Warning Text for Deleted DXCC --> | 			<!-- Loading Warning Text for Deleted DXCC --> | ||||||
| 			<script> | 
 | ||||||
| 				var lang_station_location_dxcc_warning = '<?php echo lang('station_location_dxcc_warning'); ?>'; |  | ||||||
| 				var isDeleted = selectedOption.textContent.includes("<?php echo lang('gen_hamradio_deleted_dxcc'); ?>"); |  | ||||||
| 			</script> |  | ||||||
| 		  <div class="form-group"> | 		  <div class="form-group"> | ||||||
| 		    <label for="stationDXCCInput"><?php echo lang("station_location_dxcc"); ?></label>
 | 		    <label for="stationDXCCInput"><?php echo lang("station_location_dxcc"); ?></label>
 | ||||||
| 				<?php if ($dxcc_list->num_rows() > 0) { ?>
 | 				<?php if ($dxcc_list->num_rows() > 0) { ?>
 | ||||||
|  | @ -62,7 +59,7 @@ | ||||||
| 				</select> | 				</select> | ||||||
| 				<?php } ?>
 | 				<?php } ?>
 | ||||||
| 		    <small id="stationDXCCInputHelp" class="form-text text-muted"><?php echo lang("station_location_dxcc_hint"); ?></small>
 | 		    <small id="stationDXCCInputHelp" class="form-text text-muted"><?php echo lang("station_location_dxcc_hint"); ?></small>
 | ||||||
| 			<div id="warningMessage"> </div> | 			<div class="alert alert-danger" role="alert" id="warningMessageDXCC" style="display: none"> </div> | ||||||
| 		  </div> | 		  </div> | ||||||
| 
 | 
 | ||||||
| 		  <div class="form-group"> | 		  <div class="form-group"> | ||||||
|  |  | ||||||
|  | @ -65,10 +65,7 @@ | ||||||
| 				<div class="card-header"><?php echo lang("general_word_location"); ?></div>
 | 				<div class="card-header"><?php echo lang("general_word_location"); ?></div>
 | ||||||
| 				<div class="card-body"> | 				<div class="card-body"> | ||||||
| 					<!-- Loading Warning Text for Deleted DXCC --> | 					<!-- Loading Warning Text for Deleted DXCC --> | ||||||
| 					<script> | 										 | ||||||
| 						var lang_station_location_dxcc_warning = '<?php echo lang('station_location_dxcc_warning'); ?>'; |  | ||||||
| 						var isDeleted = selectedOption.textContent.includes("<?php echo lang('gen_hamradio_deleted_dxcc'); ?>"); |  | ||||||
| 					</script>					 |  | ||||||
| 					<!-- DXCC --> | 					<!-- DXCC --> | ||||||
| 					<div class="form-group"> | 					<div class="form-group"> | ||||||
| 					    <label for="stationDXCCInput"><?php echo lang("station_location_dxcc"); ?></label>
 | 					    <label for="stationDXCCInput"><?php echo lang("station_location_dxcc"); ?></label>
 | ||||||
|  | @ -88,7 +85,7 @@ | ||||||
| 					        </select> | 					        </select> | ||||||
| 					        <?php } ?>
 | 					        <?php } ?>
 | ||||||
| 					    <small id="stationDXCCInputHelp" class="form-text text-muted"><?php echo lang("station_location_dxcc_hint"); ?></small>
 | 					    <small id="stationDXCCInputHelp" class="form-text text-muted"><?php echo lang("station_location_dxcc_hint"); ?></small>
 | ||||||
| 						<div id="warningMessage"></div> | 						<div class="alert alert-danger" role="alert" id="warningMessageDXCC" style="display: none"></div> | ||||||
| 					</div> | 					</div> | ||||||
| 
 | 
 | ||||||
| 					<!-- City --> | 					<!-- City --> | ||||||
|  |  | ||||||
|  | @ -537,8 +537,3 @@ div#station_logbooks_linked_table_paginate { | ||||||
| #dx, #state, #gridsquare, #sota, #wwff, #pota { | #dx, #state, #gridsquare, #sota, #wwff, #pota { | ||||||
|     text-transform: uppercase; |     text-transform: uppercase; | ||||||
| } | } | ||||||
| 
 |  | ||||||
| #warningMessage { |  | ||||||
| 	color: white !Important; |  | ||||||
| 	background-color: rgb(217, 83, 79) !Important; |  | ||||||
| } |  | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用