ソースを参照

[phr] ie 호환성 개선.

sjpark 4 年 前
コミット
a1406a5f56
1 ファイル変更19 行追加19 行削除
  1. 19 19
      src/main/webapp/WEB-INF/jsp/clinic/state.jsp

+ 19 - 19
src/main/webapp/WEB-INF/jsp/clinic/state.jsp

@@ -163,19 +163,22 @@ $(document).ready(function() {
 	});
 
 	// 반복 start/stop 클릭
-	$('#playButton').click(function () {
-		if (activeReloadTimer()) {	
-			$('#playButton').addClass('disabled');
-			$('#pauseButton').removeClass('disabled');
-			$("#reloadIntervalSelect").prop("disabled", true);
-		}
-	});
-	$('#pauseButton').click(function () {
-		deactiveReloadTimer();
-		$('#playButton').removeClass('disabled');
-		$('#pauseButton').addClass('disabled');
-		$("#reloadIntervalSelect").prop("disabled", false);
-	});
+	$(document).on('click','.playPause',function () {
+       var thisID = $(this).attr('id');
+       if(thisID == 'playButton'){
+    	  if (activeReloadTimer()) {	
+          	$(this).attr('id','pauseButton');
+          	$(this).find('i').removeClass('fa-play').addClass('fa-pause');
+          	$('#reloadIntervalSelect').prop('disabled',true);
+    	  }
+       }
+       else if(thisID == 'pauseButton'){
+    	   deactiveReloadTimer();
+          $(this).attr('id','playButton');
+          $(this).find('i').removeClass('fa-pause').addClass('fa-play');
+          $('#reloadIntervalSelect').prop('disabled',false);
+       }
+    });
 
 	////////////////////////////////////////////////////////////////////////////////
 	//// Pagination
@@ -299,12 +302,9 @@ $(document).ready(function() {
 													<option value="60">60초</option>
 											</select>
 											</label> <label>
-												<button type="button" id="playButton" class="btn btn-primary">
-													<i class="fas fa-play"></i>
-												</button>
-												<button type="button" id="pauseButton" class="btn btn-primary disabled">
-													<i class="fas fa-pause"></i>
-												</button>
+												<button type="button" id="playButton" class="playPause btn btn-primary">
+                                          			<i class="fas fa-play"></i>
+                                    			</button>
 											</label> <input type="text" class="form-control w150" id="searchKeyword" placeholder="호실 or 환자명" value="${searchText}" onkeyup="if(event.keyCode===13){searchPatients()}">
 											<button class="btn btn-primary" onclick="searchPatients()">검색</button>
 										</div>