Merge branch 'friend-refactor' of github.com:diaspora/diaspora_rails into friend-refactor

This commit is contained in:
ilya 2010-08-12 10:03:51 -07:00
commit 9bec1131f6
7 changed files with 30 additions and 23 deletions

View file

@ -8,10 +8,10 @@
.right .right
#add_photo_loader #add_photo_loader
= image_tag 'ajax-loader.gif' = image_tag 'ajax-loader.gif'
#add_photo_button = link_to 'Add Photos', '#new_photo_pane', :class => 'button', :id => "add_photo_button"
= link_to 'Add Photos', '#', :class => 'button'
#add_photo_pane.contextual_pane .yo{:style => "display:none;"}
#new_photo_pane
= render "photos/new_photo", :photo => @photo, :album => @album = render "photos/new_photo", :photo => @photo, :album => @album
.sub_header .sub_header

View file

@ -13,7 +13,8 @@
/= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" /= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
= javascript_include_tag 'jquery142', 'rails', 'google' = javascript_include_tag 'jquery142', 'rails', 'google'
= javascript_include_tag 'tiny_mce/tiny_mce', 'jquery.infieldlabel', 'jquery.cycle/jquery.cycle.min.js' = javascript_include_tag 'tiny_mce/tiny_mce'
= javascript_include_tag 'jquery.infieldlabel', 'jquery.cycle/jquery.cycle.min.js'
= javascript_include_tag 'fancybox/jquery.fancybox-1.3.1.pack' = javascript_include_tag 'fancybox/jquery.fancybox-1.3.1.pack'

View file

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

@ -86,8 +86,9 @@ $(document).ready(function(){
$("#add_album_button").fancybox(); $("#add_album_button").fancybox();
$("#add_group_button").fancybox(); $("#add_group_button").fancybox();
$("#add_request_button").fancybox(); $("#add_request_button").fancybox();
$("#add_photo_button").fancybox();
pane_toggler_button("photo"); //pane_toggler_button("photo");
$("input[type='submit']").addClass("button"); $("input[type='submit']").addClass("button");

View file

@ -408,9 +408,9 @@ h1.big_text {
width: 100%; } width: 100%; }
.sub_header { .sub_header {
position: relative;
text-align: center; text-align: center;
font-style: italic; font-style: italic;
margin-top: -5px;
margin-bottom: 20px; margin-bottom: 20px;
color: #999999; } color: #999999; }
@ -422,8 +422,6 @@ h1.big_text {
min-height: 100px; } min-height: 100px; }
.image_thumb img { .image_thumb img {
display: none; } display: none; }
.image_thumb img:hover {
border-bottom: 2px solid #666666; }
.image_cycle img { .image_cycle img {
display: none; } display: none; }

View file

@ -507,12 +507,12 @@ h1.big_text
:width 100% :width 100%
.sub_header .sub_header
:position relative
:text :text
:align center :align center
:font :font
:style italic :style italic
:margin :margin
:top -5px
:bottom 20px :bottom 20px
:color #999 :color #999
@ -526,10 +526,6 @@ h1.big_text
img img
:display none :display none
&:hover
:border
:bottom 2px solid #666
.image_cycle .image_cycle
img img
:display none :display none

View file

@ -48,6 +48,7 @@
:border :border
:top 1px solid #ccc :top 1px solid #ccc
ul.button_set ul.button_set
:padding :padding