#1875: Update reltags

* Hide reltags by default when opening dialog
* Swap link arrows
* Display reltags when clicking a button
This commit is contained in:
Toks
2013-07-23 22:50:16 -04:00
parent 6cf458563b
commit 7b522f09c1
3 changed files with 8 additions and 8 deletions

View File

@@ -42,11 +42,11 @@
$("#toggle-related-tags-link").click(function(e) {
if ($("#related-tags").is(":visible")) {
$("#related-tags").hide();
$(e.target).html("«");
$(e.target).html("»");
} else {
$("#related-tags").show();
Danbooru.RelatedTag.build_all();
$(e.target).html("»");
$(e.target).html("«");
}
e.preventDefault();
});
@@ -56,7 +56,7 @@
$("div.input:has(#post_tag_string)").prevAll().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%"});

View File

@@ -7,7 +7,9 @@
$("#related-tags-container").hide();
$("#artist-tags-container").hide();
$("#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) {
return;
}
if ($("#post-edit-dialog").length && !$("#related-tags").is(":visible")) {
return;
}
$("#related-tags").show();
$("#toggle-related-tags-link").html("«");
var query = Danbooru.RelatedTag.recent_search.query;
var related_tags = Danbooru.RelatedTag.recent_search.tags;

View File

@@ -77,7 +77,7 @@
</div>
<div id="related-tags-container">
<h1>Related Tags <a href="#" id="toggle-related-tags-link" style="display: none;">&raquo;</a></h1>
<h1>Related Tags <a href="#" id="toggle-related-tags-link" style="display: none;">&laquo;</a></h1>
<div id="related-tags" class="related-tags">
</div>
</div>