diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 13:40:47 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 13:40:47 -0800 |
commit | f50dbd992d6973caeaaa3139ddf5f908dd84ec79 (patch) | |
tree | cbdb343de89306a4ed823dc5aa104a802f846dc4 /modules/comment/js/comment.js | |
parent | 2e420522ece22942a9b3b6ee413ca0e1dfa76148 (diff) | |
parent | dc67cf64813361b34c366123f37d88ef6988fcc8 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
modules/gallery/controllers/rest.php
Diffstat (limited to 'modules/comment/js/comment.js')
-rw-r--r-- | modules/comment/js/comment.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js index 3f058062..bb204b78 100644 --- a/modules/comment/js/comment.js +++ b/modules/comment/js/comment.js @@ -28,17 +28,16 @@ function ajaxify_comment_form() { $("#g-comments form").ajaxForm({ dataType: "json", success: function(data) { - if (data.form) { - $("#g-comments form").replaceWith(data.form); - ajaxify_comment_form(); - } - if (data.result == "success" && data.resource) { - $.get(data.resource, function(data, textStatus) { - $("#g-comments .g-block-content ul:first").append("<li>"+data+"</li>"); - $("#g-comments .g-block-content ul:first li:last").effect("highlight", {color: "#cfc"}, 8000); - $("#g-comment-form").hide(2000).remove(); - $("#g-no-comments-yet").hide(2000); - }); + if (data.result == "success") { + $("#g-comments #g-comment-detail ul").append(data.view); + $("#g-comments #g-comment-detail ul li:last").effect("highlight", {color: "#cfc"}, 8000); + $("#g-comment-form").hide(2000).remove(); + $("#g-no-comments-yet").hide(2000); + } else { + if (data.form) { + $("#g-comments form").replaceWith(data.form); + ajaxify_comment_form(); + } } } }); |