related tags: refactor /related_tags.js to avoid updating unchanged columns.
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.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
$("#source-info").replaceWith("<%= j render "info", source: @source %>");
|
||||
|
||||
$(document).trigger("danbooru:update-source-data", <%= raw @source.to_json %>);
|
||||
$(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 %>);
|
||||
|
||||
Reference in New Issue
Block a user