finish delete ssh key and delete account. all with confirm.

This commit is contained in:
slene 2014-03-16 21:07:50 +08:00
parent 0754dd2f95
commit f6e32b1b08
7 changed files with 334 additions and 52 deletions

View file

@ -99,15 +99,16 @@ function initRegister() {
}
function initUserSetting(){
$('#gogs-ssh-keys').on("click",".delete",function(){
var $this = $(this);
Gogits.ajaxDelete("",{"id":$this.data("del")},function(json){
if(json.ok){
window.location.reload();
}else{
alert(json.err);
}
});
return false;
$('#gogs-ssh-keys .delete').confirmation({
singleton: true,
onConfirm: function(e, $this){
Gogits.ajaxDelete("",{"id":$this.data("del")},function(json){
if(json.ok){
window.location.reload();
}else{
alert(json.err);
}
});
}
});
}