nate 3 лет назад
Родитель
Сommit
3674fa7aa8
1 измененных файлов с 9 добавлено и 3 удалено
  1. 9 3
      component-favorite.php

+ 9 - 3
component-favorite.php

@@ -83,6 +83,7 @@ if (!isset($_SESSION['loggedin'])) {
 
 	<script>
 		$(document).ready(function() {
+
 			$.ajax({
 				url: "./script/php/equipment_group_favorite.php",
 				type: "GET",
@@ -110,10 +111,15 @@ if (!isset($_SESSION['loggedin'])) {
 				console.log(error);
 			});
 
-
 		});
 
-
+		$(document).on("change", "input[name='delCheck']", function() {
+			if ($(this).prop('checked') === true) {
+				delFavoriteList.push($(this).attr('value'));
+			} else {
+				delFavoriteList.splice(delFavoriteList.indexOf($(this).attr('value')), 1);
+			}
+		});
 
 		function DelFavorite() {
 			$.ajax({
@@ -133,7 +139,7 @@ if (!isset($_SESSION['loggedin'])) {
 		}
 	</script>
 	<script src="script/js/3Dpic-favorite.js" type="module"></script>
-	
+
 </body>
 
 </html>