Merge pull request #3045 from evazion/feat-commentary-toggle
Add commentary toggle button on uploads page.
This commit is contained in:
@@ -13,6 +13,11 @@
|
|||||||
this.initialize_similar();
|
this.initialize_similar();
|
||||||
$("#related-tags-button").trigger("click");
|
$("#related-tags-button").trigger("click");
|
||||||
$("#find-artist-button").trigger("click");
|
$("#find-artist-button").trigger("click");
|
||||||
|
|
||||||
|
$("#toggle-artist-commentary").click(function(e) {
|
||||||
|
Danbooru.Upload.toggle_commentary();
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($("#iqdb-similar").length) {
|
if ($("#iqdb-similar").length) {
|
||||||
@@ -105,6 +110,7 @@
|
|||||||
|
|
||||||
$("#upload_artist_commentary_title").val(data.artist_commentary.dtext_title);
|
$("#upload_artist_commentary_title").val(data.artist_commentary.dtext_title);
|
||||||
$("#upload_artist_commentary_desc").val(data.artist_commentary.dtext_description);
|
$("#upload_artist_commentary_desc").val(data.artist_commentary.dtext_description);
|
||||||
|
Danbooru.Upload.toggle_commentary();
|
||||||
|
|
||||||
$("#source-info span#loading-data").hide();
|
$("#source-info span#loading-data").hide();
|
||||||
$("#source-info ul").show();
|
$("#source-info ul").show();
|
||||||
@@ -133,6 +139,16 @@
|
|||||||
$("#image-resize-to-window-link").click(Danbooru.Upload.update_scale);
|
$("#image-resize-to-window-link").click(Danbooru.Upload.update_scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Danbooru.Upload.toggle_commentary = function() {
|
||||||
|
if ($(".artist-commentary").is(":visible")) {
|
||||||
|
$("#toggle-artist-commentary").text("show »");
|
||||||
|
} else {
|
||||||
|
$("#toggle-artist-commentary").text("« hide");
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".artist-commentary").slideToggle();
|
||||||
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|||||||
@@ -69,14 +69,17 @@
|
|||||||
<%= f.text_field :parent_id %>
|
<%= f.text_field :parent_id %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<strong>Commentary</strong>
|
||||||
|
<a href="#" id="toggle-artist-commentary">show »</a>
|
||||||
|
|
||||||
|
<div class="artist-commentary" style="display: none;">
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<%= f.label :artist_commentary_title, "Artist Commentary Title" %>
|
<%= f.label :artist_commentary_title, "Title" %>
|
||||||
<%= f.text_field :artist_commentary_title %>
|
<%= f.text_field :artist_commentary_title %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<%= f.label :artist_commentary_desc, "Artist Commentary" %>
|
<%= f.label :artist_commentary_desc, "Description" %>
|
||||||
<%= f.text_area :artist_commentary_desc, :size => "60x5" %>
|
<%= f.text_area :artist_commentary_desc, :size => "60x5" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user