fixes #121: editing comments shifts their position

This commit is contained in:
albert
2011-10-27 18:38:24 -04:00
parent 2d7ebc8810
commit c9cb34beaf
2 changed files with 3 additions and 4 deletions

View File

@@ -392,12 +392,11 @@ Danbooru.Note = {
start: function() {
$("#original-file-link").click();
$("#image").one("click", Danbooru.Note.TranslationMode.create_note);
$("#translate").one("click", Danbooru.Note.TranslationMode.stop).html("Click on image");
Danbooru.notice("Click on the image to create a note (shortcut is ctrl+a)");
},
stop: function() {
// $("#image").unbind("click");
$("#translate").one("click", Danbooru.Note.TranslationMode.start).html("Translate");
},
create_note: function(e) {
@@ -476,7 +475,7 @@ $(function() {
if ($("#c-posts #a-show").size() > 0) {
$("#translate").one("click", Danbooru.Note.TranslationMode.start);
// $("#note-container").width($("#image").width()).height($("#image").height());
$(document).bind("keydown", "ctrl+n", Danbooru.Note.TranslationMode.start);
$(document).bind("keydown", "ctrl+a", Danbooru.Note.TranslationMode.start);
Danbooru.Note.load_all();
$("#image").click(Danbooru.Note.Box.toggle_all);
}

View File

@@ -25,7 +25,7 @@ class ForumTopicsController < ApplicationController
def show
@forum_topic = ForumTopic.find(params[:id])
@forum_posts = ForumPost.search(:topic_id_eq => @forum_topic.id).paginate(params[:page])
@forum_posts = ForumPost.search(:topic_id_eq => @forum_topic.id).order("forum_posts.id").paginate(params[:page])
respond_with(@forum_topic)
end