diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-16 22:32:50 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-16 22:32:50 +0800 |
commit | f824d6a4b11d4d8ddc82d54c5183934b465afbd3 (patch) | |
tree | 3586b1746fd2097834685e0ee589de7b1a0c10b0 /public/js/app.js | |
parent | f620f23c35f76a97f945f210638d4be8920e189e (diff) | |
parent | 9557cfc6534d2a215f6c6da73468aea1e3edd61f (diff) |
Merge branch 'master' of github.com:gogits/gogs
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 0f0ecc43..4a5d2053 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 |