mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	finish delete ssh key and delete account. all with confirm.
This commit is contained in:
		@@ -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);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user