Refactor the /related_tags.js call so that when the "Related tags" button is clicked, it only replaces the columns that actually changed, not the entire related tags section. This avoids rebuilding the Recent / Frequent / Translated Tags / Artist columns every time the "Related tags" button is clicked.
13 lines
535 B
Plaintext
13 lines
535 B
Plaintext
$("#source-info").replaceWith("<%= j render "info", source: @source %>");
|
|
|
|
$(document).trigger("danbooru:update-source-data", {
|
|
source: <%= raw @source.to_json %>,
|
|
related_tags_html: "<%= j render "related_tags/source_tags", source: @source %>",
|
|
});
|
|
|
|
if ($("#c-uploads #a-new").length) {
|
|
$("#upload_artist_commentary_title").val(<%= raw @source.dtext_artist_commentary_title.to_json %>);
|
|
$("#upload_artist_commentary_desc").val(<%= raw @source.dtext_artist_commentary_desc.to_json %>);
|
|
Danbooru.Upload.toggle_commentary();
|
|
}
|