summaryrefslogtreecommitdiff
path: root/js/ajax.js
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-15 15:06:29 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-15 15:06:29 +1000
commit26b5f801eaeb0e77eba0d2415a03d37d2febdeaf (patch)
tree9e95038afe2de053231eb664c221e9512e83960e /js/ajax.js
parent30245c85f87dcdb1f1269b8949be6e6496aaf6cf (diff)
some fixes
Diffstat (limited to 'js/ajax.js')
-rw-r--r--js/ajax.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/ajax.js b/js/ajax.js
index 09c35157..7bb48c07 100644
--- a/js/ajax.js
+++ b/js/ajax.js
@@ -25,7 +25,7 @@ $(window).ready(function() {
var formData = new FormData(this);
formData.append('json_response', '1');
- formData.append('post', $(this).find('input[type="submit"]').val());
+ formData.append('post', submit_txt);
var updateProgress = function(e) {
$(form).find('input[type="submit"]').val(_('Posting... (#%)').replace('#', Math.round(e.position / e.total * 100)));
@@ -60,8 +60,10 @@ $(window).ready(function() {
$(document).trigger('new_post', this);
}
});
+
highlightReply(post_response.id);
- document.location = '#' + post_response.id;
+ window.location.hash = post_response.id;
+ $(window).scrollTop($('div.post#reply_' + post_response.id).offset().top);
$(form).find('input[type="submit"]').val(submit_txt);
$(form).find('input[type="submit"]').removeAttr('disabled');