Add button to reset start time
这个提交包含在:
		
							父节点
							
								
									f56e031946
								
							
						
					
					
						当前提交
						ad2d7e756c
					
				
					共有  2 个文件被更改,包括 7 次插入 和 2 次删除
				
			
		|  | @ -995,6 +995,12 @@ $(document).on('keypress',function(e) { | ||||||
| 					} | 					} | ||||||
| 				); | 				); | ||||||
| 			}); | 			}); | ||||||
|  | 			$('#reset_time').click(function() { | ||||||
|  | 				var now = new Date(); | ||||||
|  | 				var localTime = now.getTime(); | ||||||
|  | 				var utc = localTime + (now.getTimezoneOffset() * 60000); | ||||||
|  | 				$('#start_time').val(("0" + now.getUTCHours()).slice(-2)+':'+("0" + now.getUTCMinutes()).slice(-2)+':'+("0" + now.getUTCSeconds()).slice(-2)); | ||||||
|  | 			}); | ||||||
| 		}); | 		}); | ||||||
| 	</script> | 	</script> | ||||||
| 
 | 
 | ||||||
|  | @ -1124,7 +1130,6 @@ $(document).on('keypress',function(e) { | ||||||
|     $('#start_time').focusout(function() { |     $('#start_time').focusout(function() { | ||||||
|        if (manual && $('#start_time').val() != '') { |        if (manual && $('#start_time').val() != '') { | ||||||
|           $('#end_time').val($('#start_time').val()); |           $('#end_time').val($('#start_time').val()); | ||||||
|           console.log("HERE!"); |  | ||||||
|        } |        } | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -58,7 +58,7 @@ | ||||||
|                 </div> |                 </div> | ||||||
| 
 | 
 | ||||||
|                 <div class="form-group col-md-3"> |                 <div class="form-group col-md-3"> | ||||||
|                   <label for="start_time"><?php echo lang('general_word_time_on'); ?></label>
 |                 <label for="start_time"><?php echo lang('general_word_time_on'); ?></label> <?php if ($_GET['manual'] != 1) { ?><i id="reset_time" data-toggle="tooltip" data-original-title="Reset start time" class="fas fa-stopwatch"></i><?php } ?>
 | ||||||
|                   <input type="text" class="form-control form-control-sm input_start_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else {echo date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : "");  ?> required pattern="[0-2][0-9]:[0-5][0-9]">
 |                   <input type="text" class="form-control form-control-sm input_start_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else {echo date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : "");  ?> required pattern="[0-2][0-9]:[0-5][0-9]">
 | ||||||
|                 </div> |                 </div> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用