* Additional effects

* Fixed flash pngs
* Fixed dmail search links
This commit is contained in:
albert
2011-11-03 17:42:40 -04:00
parent f6367aab49
commit c478eb33b6
13 changed files with 26 additions and 24 deletions

View File

@@ -35,18 +35,19 @@
Danbooru.Comment.initialize_expand_links = function() {
$(".comment-section form").hide();
$(".comment-section input.expand-comment-response").click(function() {
$(".comment-section input.expand-comment-response").click(function(e) {
var post_id = $(this).closest(".comment-section").data("post-id");
$(".comment-section[data-post-id=" + post_id + "] form").show();
$(this).hide();
$(".comment-section[data-post-id=" + post_id + "] form").slideDown("fast");
e.preventDefault();
});
}
Danbooru.Comment.initialize_response_link = function() {
$("a.expand-comment-response").click(function(e) {
e.preventDefault();
$(e.target).closest("div.new-comment").find("form").show();
$(e.target).hide();
$(e.target).closest("div.new-comment").find("form").slideDown("fast");
e.preventDefault();
});
$("div.new-comment form").hide();

View File

@@ -16,7 +16,7 @@
success: function(data) {
$button.val("Edit");
$input.hide();
$preview.html(data).show();
$preview.html(data).fadeIn("fast");
}
});
}
@@ -24,7 +24,7 @@
Danbooru.Dtext.call_edit = function(e, $button, $input, $preview) {
$button.val("Preview");
$preview.hide();
$input.show();
$input.slideDown("fast");
}
Danbooru.Dtext.click_button = function(e) {

View File

@@ -17,7 +17,7 @@
$("#mode-box select").val(Danbooru.Cookie.get("mode"));
}
$("#mode-box select").click(Danbooru.PostModeMenu.change);
$("#mode-box select").change(Danbooru.PostModeMenu.change);
}
Danbooru.PostModeMenu.initialize_preview_link = function() {
@@ -27,7 +27,7 @@
Danbooru.PostModeMenu.initialize_edit_form = function() {
$("#quick-edit-div").hide();
$("#quick-edit-form input[value=Cancel]").click(function(e) {
$("#quick-edit-div").hide();
$("#quick-edit-div").slideUp("fast");
e.preventDefault();
});
@@ -49,14 +49,14 @@
});
}
Danbooru.PostModeMenu.change = function() {
$("#quick-edit-div").hide();
Danbooru.PostModeMenu.change = function(e) {
$("#quick-edit-div").slideUp("fast");
var s = $("#mode-box select").val();
var $body = $(document.body);
$body.removeClass();
$body.addClass("mode-" + s);
Danbooru.Cookie.put("mode", s, 7);
Danbooru.Cookie.put("mode", s, 1);
if (s === "edit-tag-script") {
var script = Danbooru.Cookie.get("tag-script");
script = prompt("Enter a tag script", script);
@@ -68,15 +68,15 @@
$("#mode-box select").val("view");
}
Danbooru.PostModeMenu.change();
Danbooru.PostModeMenu.change(e);
}
}
Danbooru.PostModeMenu.open_edit = function(post_id) {
var $post = $("#post_" + post_id);
$("#quick-edit-div").show();
$("#quick-edit-div").slideDown("fast");
$("#quick-edit-form").attr("action", "/posts/" + post_id + ".json");
$("#post_tag_string").val($post.data("tags"));
$("#post_tag_string").val($post.data("tags")).focus();
}
Danbooru.PostModeMenu.click = function(e) {

View File

@@ -2,9 +2,8 @@
Danbooru.Upload = {};
Danbooru.Upload.initialize_all = function() {
this.initialize_image();
if ($("#c-uploads").length) {
this.initialize_image();
this.initialize_info();
this.initialize_similar();
}

View File

@@ -4,11 +4,11 @@
}
Danbooru.notice = function(msg) {
$('#notice').html(msg).addClass("ui-state-highlight").removeClass("ui-state-error").slideDown("fast");
$('#notice').html(msg).addClass("ui-state-highlight").removeClass("ui-state-error").fadeIn("fast");
}
Danbooru.error = function(msg) {
$('#notice').html(msg).removeClass("ui-state-highlight").addClass("ui-state-error").slideDown("fast");
$('#notice').html(msg).removeClass("ui-state-highlight").addClass("ui-state-error").fadeIn("fast");
}
Danbooru.ajax_start = function(target) {