From 3e1081acaa502555e6a27b75cce163ad5fbd3d14 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Wed, 11 Aug 2010 20:09:16 -0700 Subject: [PATCH 1/4] commented out tinyMCE js for the time being --- app/views/layouts/application.html.haml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 2f8fd4060..c5b1bb74b 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -13,9 +13,8 @@ /= 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 'tiny_mce/tiny_mce', 'jquery.infieldlabel', 'jquery.cycle/jquery.cycle.min.js' - - = javascript_include_tag 'fancybox/jquery.fancybox-1.3.1.pack' + /= javascript_include_tag 'tiny_mce/tiny_mce' + = javascript_include_tag 'jquery.infieldlabel', 'jquery.cycle/jquery.cycle.min.js', 'fancybox/jquery.fancybox-1.3.1.pack' = javascript_include_tag 'view', 'publisher', 'image_picker', 'group_nav' = render 'js/websocket_js' From 97b04fc0d79dbb87db7f01522b42df23d2fb6c58 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Wed, 11 Aug 2010 20:12:10 -0700 Subject: [PATCH 2/4] nevermind --- app/views/layouts/application.html.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index c5b1bb74b..979538d54 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -13,8 +13,10 @@ /= 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 'tiny_mce/tiny_mce' - = javascript_include_tag 'jquery.infieldlabel', 'jquery.cycle/jquery.cycle.min.js', 'fancybox/jquery.fancybox-1.3.1.pack' + = 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 'view', 'publisher', 'image_picker', 'group_nav' = render 'js/websocket_js' From 013a6d084915e4de0d6704337d65f14868fefeee Mon Sep 17 00:00:00 2001 From: danielvincent Date: Wed, 11 Aug 2010 20:45:57 -0700 Subject: [PATCH 3/4] add photo is now in a fancy-pancy box --- app/views/albums/show.html.haml | 8 ++++---- app/views/photos/_new_photo.haml | 6 ++---- public/javascripts/view.js | 3 ++- public/stylesheets/application.css | 2 +- public/stylesheets/sass/application.sass | 2 +- public/stylesheets/sass/ui.sass | 1 + 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml index e2048daf3..a2cded0c9 100644 --- a/app/views/albums/show.html.haml +++ b/app/views/albums/show.html.haml @@ -8,10 +8,10 @@ .right #add_photo_loader = image_tag 'ajax-loader.gif' - #add_photo_button - = link_to 'Add Photos', '#', :class => 'button' - - #add_photo_pane.contextual_pane + = link_to 'Add Photos', '#new_photo_pane', :class => 'button', :id => "add_photo_button" + + .yo{:style => "display:none;"} + #new_photo_pane = render "photos/new_photo", :photo => @photo, :album => @album .sub_header diff --git a/app/views/photos/_new_photo.haml b/app/views/photos/_new_photo.haml index cd83d648d..81366ccd7 100644 --- a/app/views/photos/_new_photo.haml +++ b/app/views/photos/_new_photo.haml @@ -8,15 +8,13 @@ return confirm("You are about to upload " + total + " photos. Are you sure?"); }, onFinish: function(event, total){ - $("#add_photo_button .button").html( "Add Photos" ); + $("#add_photo_button").html( "Add Photos" ); $("#add_photo_loader").fadeOut(400); - pane_toggler_button("photo") }, onStart: function(event, total){ $("#add_photo_pane").fadeOut(400); - $("#add_photo_button .button").html( "Uploading Photos" ); + $("#add_photo_button").html( "Uploading Photos" ); $("#add_photo_loader").fadeIn(400); - $("#add_photo_button").unbind(); return true; } }); diff --git a/public/javascripts/view.js b/public/javascripts/view.js index e91e6a912..6648c1714 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -86,8 +86,9 @@ $(document).ready(function(){ $("#add_album_button").fancybox(); $("#add_group_button").fancybox(); $("#add_request_button").fancybox(); + $("#add_photo_button").fancybox(); - pane_toggler_button("photo"); + //pane_toggler_button("photo"); $("input[type='submit']").addClass("button"); diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 000432b85..2369cd6d2 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -408,9 +408,9 @@ h1.big_text { width: 100%; } .sub_header { + position: relative; text-align: center; font-style: italic; - margin-top: -5px; margin-bottom: 20px; color: #999999; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 43b118183..6f02b8da7 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -507,12 +507,12 @@ h1.big_text :width 100% .sub_header + :position relative :text :align center :font :style italic :margin - :top -5px :bottom 20px :color #999 diff --git a/public/stylesheets/sass/ui.sass b/public/stylesheets/sass/ui.sass index 5863632b3..ee01e08bc 100644 --- a/public/stylesheets/sass/ui.sass +++ b/public/stylesheets/sass/ui.sass @@ -48,6 +48,7 @@ :border :top 1px solid #ccc + ul.button_set :padding From f7e43ee3d03a7912f4556f869864056bc634fb73 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 12 Aug 2010 00:27:26 -0700 Subject: [PATCH 4/4] photo fancybox indicates progress. unfortunately, it doesn't reset after you close it right now... --- app/views/photos/_new_photo.haml | 22 +++++++++++++++++----- public/stylesheets/application.css | 2 -- public/stylesheets/sass/application.sass | 4 ---- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/app/views/photos/_new_photo.haml b/app/views/photos/_new_photo.haml index 81366ccd7..b57731596 100644 --- a/app/views/photos/_new_photo.haml +++ b/app/views/photos/_new_photo.haml @@ -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 diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 2369cd6d2..7ce7663ea 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -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; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 6f02b8da7..841f12a97 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -526,10 +526,6 @@ h1.big_text img :display none - &:hover - :border - :bottom 2px solid #666 - .image_cycle img :display none