Skip to content
Extraits de code Groupes Projets
Valider dbc8f011 rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

some misc design cleanup. album page toggle pending.

parent 97daaf81
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
= form_for Album.new, :remote => true do |f| = form_for Album.new do |f|
= f.error_messages = f.error_messages
%p %p
= f.text_field :name, :value => "tell me something good" = f.text_field :name, :value => "tell me something good"
......
%h1.big_text %h1.big_text
= friends_albums_link %ul.button_set
\/ %li.selected= friends_albums_link
=your_albums_link %li= your_albums_link
.button.right
= link_to 'new album', new_album_path
.button.right#add_album_button
= link_to 'new album', "#"
#add_album_box.contextual_pane
= render "albums/new_album"
%ul#stream %ul#stream
- for album in @albums - for album in @albums
......
%h1.big_text %h1.big_text
= link_to 'albums', albums_path .back
>> = link_to '⇧ albums', albums_path
= @album.name = @album.name
.button.right{ :id => "add_photos_button" } -if mine? @album
= link_to 'add photos', '#' .button.right#add_photos_button
= link_to 'add photos', '#'
#add_photo_box.contextual_pane
= render "photos/new_photo", :photo => @photo, :album => @album
%h4= "last updated: #{how_long_ago(@album)}" .sub_header
="last updated: #{how_long_ago(@album)}"
-unless mine? @album -unless mine? @album
%h4= 'by ' + @album.person.real_name %h4= 'by ' + @album.person.real_name
-if mine? @album
#add_photo_box{ :style => "display:none;" }
= render "photos/new_photo", :photo => @photo, :album => @album
- for photo in @album_photos - for photo in @album_photos
= link_to (image_tag photo.image.url(:thumb_medium)), object_path(photo) = link_to (image_tag photo.image.url(:thumb_medium)), object_path(photo)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
= stylesheet_link_tag "blueprint/screen", :media => 'screen' = stylesheet_link_tag "blueprint/screen", :media => 'screen'
= stylesheet_link_tag "application" = stylesheet_link_tag "application", "ui"
/= 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' = javascript_include_tag 'tiny_mce/tiny_mce', 'jquery.infieldlabel'
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
.container .container
.span-24.last .span-24.last
.span-18.append-3.last .span-19.append-1.last
= yield = yield
.span-3.last .span-4.last
= link_to(person_image_tag(current_user), root_path) = link_to(person_image_tag(current_user), root_path)
= link_to "Edit your profile", edit_user_path(current_user) = link_to "Edit your profile", edit_user_path(current_user)
%br %br
......
...@@ -5,22 +5,23 @@ ...@@ -5,22 +5,23 @@
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) { onStart: function(event, total) {
return confirm("You are trying to upload " + total + " files. Are you sure?"); return confirm("You are about to upload " + total + " photos. Are you sure?");
}, },
setName: function(text) { setName: function(text) {
$("#progress_report_name").text(text); $("#progress_report_name").text(text);
}, },
setStatus: function(text) { setStatus: function(text) {
$("#progress_report_status").text(text); $("#progress_report_status").text(text);
}, },
setProgress: function(val) { setProgress: function(val) {
$("#progress_report_bar").css('width', Math.ceil(val*100)+"%"); //$("#progress_report_bar").css('width', Math.ceil(val*100)+"%");
}, },
onFinishOne: function(event, response, name, number, total) { onFinishOne: function(event, response, name, number, total) {
//alert(response); //alert(response);
}, },
onFinish: function(event, total){ onFinish: function(event, total){
$("#progress_report").delay(600).slideUp(200); $("#progress_report").delay(600).slideUp(200);
$("#add_photo_box").delay(600).fadeOut(200);
}, },
onStart: function(event, total){ onStart: function(event, total){
$("#progress_report").slideDown(600); $("#progress_report").slideDown(600);
...@@ -30,25 +31,18 @@ ...@@ -30,25 +31,18 @@
}); });
:css :css
#progress_report_bar { #progress_report, #progress_report_name, #progress_report_status{
border-radius: 3px; font-size: 12px;
-webkit-border-radius: 3px; padding: 0;
-moz-border-radius: 3px; line-height: auto;
} }
= 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'
%p #progress_report{ :style => "display:none;" }
= f.file_field :image, :multiple => 'multiple' = image_tag "loader.gif"
#progress_report_name
#progress_report{ :style => "display:none;" } #progress_report_status{ :style => "font-style: italic;" }
#progress_report_name
#progress_report_status{ :style => "font-style: italic;" }
#progress_report_bar_container{ :style => "width: 90%; height: 15px;" }
#progress_report_bar{ :style => "background-color: #0A516D; width: 0; height: 100%;" }
%h3 %h1.big_text
viewing photos from album .back
= link_to @album.name, album_path(@album) = link_to "⇧ #{@album.name}", album_path(@album)
= @photo.image
%div{:id => @photo.id} .button.right
= link_to 'edit', '#'
%div{:id => @photo.id}
= link_to "full size", @photo.image.url = link_to "full size", @photo.image.url
#show_photo #show_photo
= link_to_prev @photo, @album
= linked_scaled_photo @photo, @album = linked_scaled_photo @photo, @album
= link_to_next @photo, @album
#photo_pagination
%center
= link_to_prev @photo, @album
|
= link_to_next @photo, @album
-if mine?(@photo) -if mine?(@photo)
%p %p
= link_to "Destroy", @photo, :confirm => 'Are you sure?', :method => :delete = link_to "Destroy", @photo, :confirm => 'Are you sure?', :method => :delete
%p %p
= link_to "<< back to album", album_path(@album) = link_to "<< back to album", album_path(@album)
......
...@@ -88,9 +88,21 @@ $(document).ready(function(){ ...@@ -88,9 +88,21 @@ $(document).ready(function(){
speed: 3000 speed: 3000
}); });
//buttons//////
$("#add_photos_button").toggle(
function(){
$("#add_photo_box").fadeIn(300);
},function(){
$("#add_photo_box").fadeOut(200);
}
);
$("#add_photos_button").click(function(){ $("#add_album_button").toggle(
$("#add_photo_box").fadeIn(300); function(){
}); $("#add_album_box").fadeIn(300);
},function(){
$("#add_album_box").fadeOut(200);
}
);
});//end document ready });//end document ready
...@@ -237,8 +237,10 @@ ul.comment_set { ...@@ -237,8 +237,10 @@ ul.comment_set {
.request_buttons > li:first-child { .request_buttons > li:first-child {
margin-right: 1em; } margin-right: 1em; }
#show_photo img { #show_photo {
max-width: 100%; } text-align: center; }
#show_photo img {
max-width: 100%; }
#debug_info { #debug_info {
margin-top: 20px; } margin-top: 20px; }
...@@ -344,33 +346,20 @@ ul#publisher_content_pickers li { ...@@ -344,33 +346,20 @@ ul#publisher_content_pickers li {
width: 85%; width: 85%;
display: inline; } display: inline; }
.button { h1.big_text {
font-size: 12px; border-top: 2px solid #666666;
line-height: 100%; border-bottom: 1px solid #666666;
text-shadow: 0 1px 0 white; text-align: center; }
color: #666666;
background: -webkit-gradient(linear, 0% 29%, 0% 85%, from(#fafafa), to(#e0e0e0)); .back {
padding: 5px; position: absolute;
height: 14px; left: 0;
display: inline; font-size: 12px; }
border: 1px solid #cccccc;
border-bottom: 1px solid #666666; .sub_header {
border-left: 1px solid #999999; font-size: 1em;
border-right: 1px solid #999999; font-style: italic;
border-radius: 3px; color: #999999;
box-shadow: 0 1px 1px #cccccc; margin-top: -5px;
-webkit-box-shadow: 0 1px 1px #cccccc; margin-bottom: 1em;
-moz-box-shadow: 0 1px 1px #cccccc; text-align: center; }
cursor: pointer; }
.button:active {
box-shadow: 0 0px 2px black;
-webkit-box-shadow: 0 0px 2px black;
-moz-box-shadow: 0 0px 2px black;
color: #555555; }
.button a {
display: block;
color: #444444; }
.right {
float: right;
margin-top: 6px; }
...@@ -285,11 +285,14 @@ ul.comment_set ...@@ -285,11 +285,14 @@ ul.comment_set
:margin-right 1em :margin-right 1em
#show_photo #show_photo
:text
:align center
img img
:max-width 100% :max-width 100%
#debug_info #debug_info
:margin-top 20px :margin-top 20px
...@@ -422,54 +425,30 @@ ul#publisher_content_pickers li ...@@ -422,54 +425,30 @@ ul#publisher_content_pickers li
:width 85% :width 85%
:display inline :display inline
.button
:font
:size 12px
:line-height 100%
:text
:shadow 0 1px 0 #fff
:color #666
:background -webkit-gradient(linear, 0% 29%, 0% 85%, from(#FAFAFA), to(#E0E0E0))
:padding 5px
:height 14px
:display inline h1.big_text
:border
:border 1px solid #ccc :top 2px solid #666
:bottom 1px solid #666 :bottom 1px solid #666
:left 1px solid #999 :text
:right 1px solid #999 :align center
:radius 3px
:box-shadow 0 1px 1px #ccc
:-webkit-box-shadow 0 1px 1px #ccc
:-moz-box-shadow 0 1px 1px #ccc
:cursor pointer
&:active
:box-shadow 0 0px 2px #000
:-webkit-box-shadow 0 0px 2px #000
:-moz-box-shadow 0 0px 2px #000
:color #555
a .back
:display block :position absolute
:color #444 :left 0
:font
:size 12px
.sub_header
:font
:size 1em
:style italic
:color #999
.right
:float right
:margin :margin
:top 6px :top -5px
:bottom 1em
:text
:align center
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter