ソースを参照

Redirect instead of reload the page when changing access rights.

If the access rights were changed after assigning a new server it was sending the last post again due to the reloading, now it redirects instead.
DieFeM 7 年 前
コミット
f4591108aa
1 ファイル変更4 行追加3 行削除
  1. 4 3
      js/modules/user_games-assign.js

+ 4 - 3
js/modules/user_games-assign.js

@@ -27,7 +27,8 @@ function change_access_rights(id_type, assign_id)
 	addpost[ 'id_type' ] = id_type;
 	addpost[ 'change_access_rights' ] = 'true';
 	addpost.flags = [];
-	var destURL = "home.php?m=user_games&p=assign&" + id_type + "_id=" + assign_id + "&type=cleared";
+	var destURL = "home.php?m=user_games&p=assign&" + id_type + "_id=" + assign_id;
+	var destURLCleared = destURL + "&type=cleared";
 	$('#dialog').html(check_access_rights);
 	$('#dialog').dialog({
 		autoOpen: true,
@@ -40,10 +41,10 @@ function change_access_rights(id_type, assign_id)
 				});
 				$.ajax({
 						type: "POST",
-						url: destURL,
+						url: destURLCleared,
 						data: addpost,
 						success: function(data){
-							location.reload(true);
+							location.href = destURL;
 						}
 				});
 				$( this ).dialog( "close" );