diff options
author | slene <vslene@gmail.com> | 2014-03-16 21:07:50 +0800 |
---|---|---|
committer | slene <vslene@gmail.com> | 2014-03-16 21:07:50 +0800 |
commit | f6e32b1b08a5eff2c0cbdfe827b40fdea9dc676e (patch) | |
tree | 12abcc1c0c3c35de5e45d0c6332819d724c71de6 /public/js/app.js | |
parent | 0754dd2f955c70994753cd18228333ca32ceee72 (diff) | |
download | gitea-f6e32b1b08a5eff2c0cbdfe827b40fdea9dc676e.tar.gz gitea-f6e32b1b08a5eff2c0cbdfe827b40fdea9dc676e.zip |
finish delete ssh key and delete account. all with confirm.
Diffstat (limited to 'public/js/app.js')
-rw-r--r-- | public/js/app.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/public/js/app.js b/public/js/app.js index 0f0ecc43ea..4a5d205347 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -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); + } + }); + } }); }
\ No newline at end of file |