diff options
author | Vitaly Takmazov | 2016-06-05 07:26:39 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-06-05 07:26:39 +0300 |
commit | 3b0567e6e98411be4b2f55d06d557be831738089 (patch) | |
tree | 32a9b96b068b58db9bbe5cae862bbb9618e8a8b9 /src/main | |
parent | 0ae572563427dcaba845b893bcef35fe7f172dd8 (diff) |
like confirmation
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/webapp/scripts.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/webapp/scripts.js b/src/main/webapp/scripts.js index bb3ddc5d..32427e1e 100644 --- a/src/main/webapp/scripts.js +++ b/src/main/webapp/scripts.js @@ -323,14 +323,16 @@ function openDialogLogin() { /******************************************************************************/ function likeMessage(e,mid) { - $.ajax({ - url: '//juick.com/like?mid='+mid, - type: 'POST' - }).done(function() { - $(e).closest("article").append("<p>OK!</p>"); - }).fail(function() { - $(e).closest("article").append("<p>Ошибка</p>"); - }); + if (confirm("Are you sure?")) { + $.ajax({ + url: '//juick.com/like?mid='+mid, + type: 'POST' + }).done(function() { + $(e).closest("article").append("<p>OK!</p>"); + }).fail(function() { + $(e).closest("article").append("<p>Ошибка</p>"); + }); + } return false; } |