Only reload the page if the clip operation was successful.
This commit is contained in:
parent
b00d93901a
commit
cdd8f9e248
1 changed files with 7 additions and 4 deletions
|
@ -131,10 +131,13 @@ function _paste_unpaste_photo_clipboard(add_or_remove)
|
||||||
var url = "/album/{{album.id}}/" + add_or_remove;
|
var url = "/album/{{album.id}}/" + add_or_remove;
|
||||||
var data = new FormData();
|
var data = new FormData();
|
||||||
data.append("photo_id", photo_ids);
|
data.append("photo_id", photo_ids);
|
||||||
var callback = function(){
|
var callback = function(response){
|
||||||
|
if (response["_status"] === 200)
|
||||||
|
{
|
||||||
photo_clipboard.clear();
|
photo_clipboard.clear();
|
||||||
save_photo_clipboard();
|
save_photo_clipboard();
|
||||||
location.reload();
|
location.reload();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
post(url, data, callback);
|
post(url, data, callback);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue