#1875: Update reltags
* Hide reltags by default when opening dialog * Swap link arrows * Display reltags when clicking a button
This commit is contained in:
@@ -42,11 +42,11 @@
|
|||||||
$("#toggle-related-tags-link").click(function(e) {
|
$("#toggle-related-tags-link").click(function(e) {
|
||||||
if ($("#related-tags").is(":visible")) {
|
if ($("#related-tags").is(":visible")) {
|
||||||
$("#related-tags").hide();
|
$("#related-tags").hide();
|
||||||
$(e.target).html("«");
|
$(e.target).html("»");
|
||||||
} else {
|
} else {
|
||||||
$("#related-tags").show();
|
$("#related-tags").show();
|
||||||
Danbooru.RelatedTag.build_all();
|
Danbooru.RelatedTag.build_all();
|
||||||
$(e.target).html("»");
|
$(e.target).html("«");
|
||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
$("div.input:has(#post_tag_string)").prevAll().hide();
|
$("div.input:has(#post_tag_string)").prevAll().hide();
|
||||||
$("#open-post-edit-dialog").hide();
|
$("#open-post-edit-dialog").hide();
|
||||||
|
|
||||||
$("#toggle-related-tags-link").show();
|
$("#toggle-related-tags-link").show().click();
|
||||||
|
|
||||||
$("#post_tag_string").css({"resize": "none", "width": "100%"});
|
$("#post_tag_string").css({"resize": "none", "width": "100%"});
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
$("#related-tags-container").hide();
|
$("#related-tags-container").hide();
|
||||||
$("#artist-tags-container").hide();
|
$("#artist-tags-container").hide();
|
||||||
$("#upload_tag_string,#post_tag_string").keyup(function(e) {
|
$("#upload_tag_string,#post_tag_string").keyup(function(e) {
|
||||||
Danbooru.RelatedTag.build_all();
|
if ($("#related-tags").is(":visible")) {
|
||||||
|
Danbooru.RelatedTag.build_all();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -102,11 +104,9 @@
|
|||||||
if (Danbooru.RelatedTag.recent_search === null || Danbooru.RelatedTag.recent_search === undefined) {
|
if (Danbooru.RelatedTag.recent_search === null || Danbooru.RelatedTag.recent_search === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($("#post-edit-dialog").length && !$("#related-tags").is(":visible")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#related-tags").show();
|
$("#related-tags").show();
|
||||||
|
$("#toggle-related-tags-link").html("«");
|
||||||
|
|
||||||
var query = Danbooru.RelatedTag.recent_search.query;
|
var query = Danbooru.RelatedTag.recent_search.query;
|
||||||
var related_tags = Danbooru.RelatedTag.recent_search.tags;
|
var related_tags = Danbooru.RelatedTag.recent_search.tags;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="related-tags-container">
|
<div id="related-tags-container">
|
||||||
<h1>Related Tags <a href="#" id="toggle-related-tags-link" style="display: none;">»</a></h1>
|
<h1>Related Tags <a href="#" id="toggle-related-tags-link" style="display: none;">«</a></h1>
|
||||||
<div id="related-tags" class="related-tags">
|
<div id="related-tags" class="related-tags">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user