uploads: fix related tags error on multi-file upload page.
Fix the related tags Javascript trying to run on the multi-file upload page. It should only run on the single-file upload page.
This commit is contained in:
@@ -21,7 +21,7 @@ RelatedTag.initialize_all = function() {
|
|||||||
|
|
||||||
// Show the related tags automatically when the "Edit" tab is opened, or by default on the uploads page.
|
// Show the related tags automatically when the "Edit" tab is opened, or by default on the uploads page.
|
||||||
$(document).on("danbooru:open-post-edit-tab", RelatedTag.show);
|
$(document).on("danbooru:open-post-edit-tab", RelatedTag.show);
|
||||||
if ($("#c-uploads #a-show").length) {
|
if ($("#c-uploads #a-show #p-single-asset-upload").length) {
|
||||||
RelatedTag.show();
|
RelatedTag.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Upload.IQDB_MIN_SIMILARITY = 50;
|
|||||||
Upload.IQDB_HIGH_SIMILARITY = 70;
|
Upload.IQDB_HIGH_SIMILARITY = 70;
|
||||||
|
|
||||||
Upload.initialize_all = function() {
|
Upload.initialize_all = function() {
|
||||||
if ($("#c-uploads #a-show").length) {
|
if ($("#c-uploads #a-show #p-single-asset-upload").length) {
|
||||||
this.initialize_similar();
|
this.initialize_similar();
|
||||||
|
|
||||||
$("#toggle-artist-commentary").on("click.danbooru", function(e) {
|
$("#toggle-artist-commentary").on("click.danbooru", function(e) {
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
<div id="a-show">
|
<div id="a-show">
|
||||||
<h1>Upload</h1>
|
<h1>Upload</h1>
|
||||||
|
|
||||||
<%= render "uploads/single_asset_upload", upload_media_asset: @upload_media_asset %>
|
<div id="p-single-asset-upload">
|
||||||
|
<%= render "uploads/single_asset_upload", upload_media_asset: @upload_media_asset %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,13 @@
|
|||||||
<% elsif @upload.media_asset_count == 0 %>
|
<% elsif @upload.media_asset_count == 0 %>
|
||||||
<p>Processing upload...</p>
|
<p>Processing upload...</p>
|
||||||
<% elsif @upload.media_asset_count > 1 %>
|
<% elsif @upload.media_asset_count > 1 %>
|
||||||
<%= render "multiple_asset_upload", upload: @upload %>
|
<div id="p-multiple-asset-upload">
|
||||||
|
<%= render "multiple_asset_upload", upload: @upload %>
|
||||||
|
</div>
|
||||||
<% elsif @upload.media_asset_count == 1 %>
|
<% elsif @upload.media_asset_count == 1 %>
|
||||||
<%= render "single_asset_upload", upload_media_asset: @upload.upload_media_assets.first %>
|
<div id="p-single-asset-upload">
|
||||||
|
<%= render "single_asset_upload", upload_media_asset: @upload.upload_media_assets.first %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user