This commit is contained in:
albert
2011-08-30 20:10:38 -04:00
parent ce720dab6c
commit 60abc867ca
4 changed files with 13 additions and 6 deletions

View File

@@ -47,9 +47,7 @@
var s = $("#mode-box select").val();
var post_id = $(e.target).closest("article").data("id");
if (s === "view") {
return;
} else if (s === "add-fav") {
if (s === "add-fav") {
Danbooru.Favorite.create(post_id);
} else if (s === "remove-fav") {
Danbooru.Favorite.destroy(post_id);
@@ -72,6 +70,8 @@
} else if (s === "apply-tag-script") {
var tag_script = Danbooru.Cookie.get("tag-script");
Danbooru.TagScript.run(post_id, tag_script);
} else {
return;
}
e.preventDefault();

View File

@@ -282,6 +282,10 @@ class Upload < ActiveRecord::Base
status == "pending"
end
def is_processing?
status == "processing"
end
def is_completed?
status == "completed"
end

View File

@@ -10,6 +10,8 @@
<p>This upload has finished processing. <%= link_to "View the post", post_path(@upload.post_id) %>.</p>
<% elsif @upload.is_pending? %>
<p>This upload is waiting to be processed. Please wait a few seconds.</p>
<% elsif @upload.is_processing? %>
<p>This upload is being processed. Please wait a few seconds.</p>
<% else %>
<p>An error occurred: <%= @upload.status %></p>
<% end %>