From 4b1516542d638ffabb8772b709659479bae08f07 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Mon, 18 Oct 2010 10:34:19 -0700 Subject: [PATCH] various. fixed publisher in new layout. --- app/views/albums/index.html.haml | 7 +--- app/views/albums/show.html.haml | 14 +++---- app/views/comments/_comment.html.haml | 2 +- app/views/shared/_publisher.haml | 34 +++++++++------ public/javascripts/view.js | 4 +- public/stylesheets/sass/application.sass | 53 ++++++++++++++---------- 6 files changed, 65 insertions(+), 49 deletions(-) diff --git a/app/views/albums/index.html.haml b/app/views/albums/index.html.haml index cd4f93ab3..b6fd490d6 100644 --- a/app/views/albums/index.html.haml +++ b/app/views/albums/index.html.haml @@ -11,11 +11,8 @@ - content_for :left_pane do = render "shared/aspect_friends" -- content_for :publish do - %h1 - Albums - .right - = link_to t('.new_album'), '#new_album_pane', {:class => "button", :id => "add_album_button"} +%h3 Albums += link_to t('.new_album'), '#new_album_pane', {:class => "button", :id => "add_album_button"} .fancybox_content #new_album_pane diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml index 6ba593d62..4e41f8526 100644 --- a/app/views/albums/show.html.haml +++ b/app/views/albums/show.html.haml @@ -15,14 +15,12 @@ - content_for :left_pane do = render "shared/aspect_friends" -- content_for :publish do - -if current_user.owns? @album - .right - =render 'photos/new_photo' - = link_to t('.edit_album'), edit_album_path(@album), :class => 'button' - %h1 - = @album.name - ="#{t('.updated')} #{how_long_ago(@album)}" +%h3 + = @album.name +="#{t('.updated')} #{how_long_ago(@album)}" +-if current_user.owns? @album + =render 'photos/new_photo' + = link_to t('.edit_album'), edit_album_path(@album), :class => 'button' .album_id{:id => @album.id, :style => "display:hidden;"} diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml index 7e22a3cd2..8bb5aba5b 100644 --- a/app/views/comments/_comment.html.haml +++ b/app/views/comments/_comment.html.haml @@ -3,7 +3,7 @@ -# the COPYRIGHT file. %li.comment{:id => post.id} - = person_image_tag(post.person) + = person_image_link(post.person) .content .from = link_to post.person.real_name, post.person diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index 5400d15d1..3a5a9f468 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -8,6 +8,14 @@ $(".question_mark").click(); }; }); + + $("#publisher textarea").live("focus", function(evt){ + $("#publisher .options_and_submit").fadeIn(50); + }); + + $("#publisher form").live("submit", function(evt){ + $("#publisher .options_and_submit").hide(); + }); #publisher = owner_image_tag @@ -19,19 +27,21 @@ = status.text_area :message, :rows => 2, :value => params[:prefill] = status.hidden_field :to, :value => (@aspect == :all ? @aspect : @aspect.id) + + .options_and_submit - - if @aspect == :all - .public_toggle - = status.check_box( :public, :value => false ) - make public - = link_to '(?)', "#question_mark_pane", :class => 'question_mark' + - if @aspect == :all + .public_toggle + = status.check_box( :public, :value => false ) + make public + = link_to '(?)', "#question_mark_pane", :class => 'question_mark' - .fancybox_content - #question_mark_pane - = render 'shared/public_explain' + .fancybox_content + #question_mark_pane + = render 'shared/public_explain' - - if @aspect == :all - = status.submit t('.share'), :title => "Share with all aspects" - - else - = status.submit t('.share'), :title => "Share with #{@aspect}" + - if @aspect == :all + = status.submit t('.share'), :title => "Share with all aspects" + - else + = status.submit t('.share'), :title => "Share with #{@aspect}" diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 67cdcce5e..e01b93981 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -64,8 +64,8 @@ $.fn.clearForm = function() { return $(':input',this).clearForm(); if (type == 'text' || type == 'password' || tag == 'textarea') this.value = ''; - //else if (type == 'checkbox' || type == 'radio') - //this.checked = false; + else if (type == 'checkbox' || type == 'radio') + this.checked = false; else if (tag == 'select') this.selectedIndex = -1; $(this).blur(); diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index e046d95de..e5527fcf6 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -586,7 +586,8 @@ label #publisher :color #999 :position relative - :height 65px + :min-height 65px + :max-height 90px :width 100% :margin :bottom 10px @@ -600,6 +601,8 @@ label :margin :right 15px :border-radius 5px + :-webkit-border-radius 5px + :-moz-border-radius 5px p :position absolute @@ -608,26 +611,34 @@ label form :display inline - - input[type='submit'] - :float right - :margin - :right 20px + :position relative textarea :width 515px :height 42px :margin 0 - .public_toggle - :position absolute - :top 53px - :left 460px - :width 300px - :font - :size smaller - :style italic + .options_and_submit + :display none + :padding + :top 63px + :bottom 5px + input[type='submit'] + :float right + :margin + :top -4px + :width 75px + .public_toggle + :position absolute + :bottom 8px + :width 300px + :font + :size smaller + :style italic + :display inline + :margin + :left 62px #image_picker .small_photo @@ -775,25 +786,25 @@ h1.big_text > li :padding 0 :display inline - :margin - :right 2px + :margin 0 a + :-webkit-border-radius 5px 5px 0 0 + :-moz-border-radius 5px 5px 0 0 + :text-shadow 0 1px 0 #444 :line :height 22px - :padding 3px 8px - :bottom 3px + :padding 3px 10px :color #CCC &:hover + :background + :color #000 :color #eee &.selected a - :-webkit-border-radius 5px 5px 0 0 - :-moz-border-radius 5px 5px 0 0 - :text-shadow 0 1px 0 #eee :padding :top 4px