window refreshes on comment submission

This commit is contained in:
Nathan Leniz
2015-03-07 02:24:28 +09:00
parent 6910ed0aea
commit b46fb576c3
2 changed files with 5 additions and 3 deletions

View File

@ -208,7 +208,7 @@ $(document).ready(function() {
$('#comment-button').bind('click', commentSubmitButtonHandler);
})
.done(function (data, textStatus, xhr) {
//window.location = '/stories/' + JSON.parse(data).storyLink;
window.location.reload();
});
};

View File

@ -25,6 +25,7 @@
var div = document.createElement('div');
$(div)
.html(
"<div class='comment row col-xs-12'>" +
"<div class='col-xs-2 text-center'>" +
"<div class='row'>" +
"<div class='col-xs-12'>" +
@ -56,9 +57,10 @@
"<button id='" + commentDetails._id + "'>This is the world's best button</button>" +
"</div>" +
"</div>" +
"</div>" +
"</div>"
)
.addClass('comment row ' + offSetClass + ' ' + rowClass + ' comment_' + commentDetails._id)
.addClass(offSetClass + ' row ' + rowClass + ' comment_' + commentDetails._id)
.appendTo($(containerSelector));
sentinel += commentDetails.comments.length;
@ -100,7 +102,7 @@
$('#submit-comment-to-comment').bind('click', submitCommentToCommentHandler);
})
.done(function (data, textStatus, xhr) {
//window.location = '/stories/' + JSON.parse(data).storyLink;
window.location.reload();
});
};