photo fancybox indicates progress. unfortunately, it doesn't reset after you close it right now...

This commit is contained in:
danielvincent 2010-08-12 00:27:26 -07:00
parent 013a6d0849
commit f7e43ee3d0
3 changed files with 17 additions and 11 deletions

View file

@ -4,26 +4,38 @@
// WE INSERT ALBUM_ID PARAM HERE
url: "/photos?album_id=#{album.id}",
sendBoundary: window.FormData || $.browser.mozilla,
onStart: function(event, total) {
return confirm("You are about to upload " + total + " photos. Are you sure?");
setName: function(text) {
$("#progress_report_name").text(text);
},
onFinish: function(event, total){
$("#add_photo_button").html( "Add Photos" );
$("#add_photo_loader").fadeOut(400);
$("#photo_title_status").text("Done!");
$("#progress_report").html("Great job!");
},
onStart: function(event, total){
$("#add_photo_pane").fadeOut(400);
$("#add_photo_button").html( "Uploading Photos" );
$("#add_photo_loader").fadeIn(400);
$("form").fadeOut(0);
$("#progress_report").fadeIn(0);
$("#photo_title_status").text("Uploading...");
return true;
}
});
});
%h1
Add photos to
%i= album.name
%span{:id=>"photo_title_status"}
Add photos to
%i= album.name
= form_for photo, :html => {:multipart => true} do |f|
= f.error_messages
= f.hidden_field :album_id, :value => album.id
= f.file_field :image, :multiple => 'multiple'
#progress_report{ :style => "display:none;text-align:center;" }
= image_tag "ajax-loader.gif"
#progress_report_name
#progress_report_status

View file

@ -422,8 +422,6 @@ h1.big_text {
min-height: 100px; }
.image_thumb img {
display: none; }
.image_thumb img:hover {
border-bottom: 2px solid #666666; }
.image_cycle img {
display: none; }

View file

@ -526,10 +526,6 @@ h1.big_text
img
:display none
&:hover
:border
:bottom 2px solid #666
.image_cycle
img
:display none