touched up aspect contact manage list, removed some unused sass.

This commit is contained in:
danielvincent 2010-11-24 11:49:55 -08:00
parent 6e14018abb
commit b5dbfc129c
15 changed files with 117 additions and 234 deletions

View file

@ -5,7 +5,7 @@
.span-24.last .span-24.last
%h2{:style => "position:relative;"} %h2{:style => "position:relative;"}
= current_user.real_name = current_user.real_name
.right .right{:style=>"top:0"}
%span.description %span.description
= current_user.diaspora_handle = current_user.diaspora_handle
= info_text(t('.handle_explanation')) = info_text(t('.handle_explanation'))

View file

@ -27,7 +27,7 @@
.x .x
X X
.circle .circle
= person_image_link(request.from) = link_to person_image_tag(request.from), request.from
= render 'shared/invitations', :invites => @invites = render 'shared/invitations', :invites => @invites
@ -53,7 +53,7 @@
.x .x
X X
.circle .circle
= person_image_link(contact.person) = link_to person_image_tag(contact.person), contact.person
.draggable_info .draggable_info
=t('.drag_to_add') =t('.drag_to_add')

View file

@ -18,7 +18,7 @@
- else - else
#global_search #global_search
= form_tag(people_path, :method => 'get') do = form_tag(people_path, :method => 'get', :id => "global_search") do
= text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5 = text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5
%ul#user_menu %ul#user_menu

View file

@ -28,6 +28,7 @@
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" = javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
= javascript_include_tag "vendor/jquery144.min"
:javascript :javascript
!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.4.js"%3E%3C/script%3E')) !window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.4.js"%3E%3C/script%3E'))

View file

@ -8,7 +8,6 @@
$('.delete').bind('ajax:success', function() { $('.delete').bind('ajax:success', function() {
$(this).closest('li').fadeOut(200); $(this).closest('li').fadeOut(200);
}); });
$('.delete').bind('ajax:failure', function() { $('.delete').bind('ajax:failure', function() {
alert("#{t('.cannot_remove', :name => person.real_name)}"); alert("#{t('.cannot_remove', :name => person.real_name)}");
}); });
@ -48,9 +47,3 @@
%h3 #{t('.born')} %h3 #{t('.born')}
= "#{time_ago_in_words(person.profile.birthday)} #{t('ago')}" if @person.profile.birthday = "#{time_ago_in_words(person.profile.birthday)} #{t('ago')}" if @person.profile.birthday
.clearfix
%br
%br
%br
%br
%b.small= person.diaspora_handle

View file

@ -4,7 +4,17 @@
.span-24.last .span-24.last
= render 'shared/author_info', :person => @person, :profile => true #author_info
.from{:style=>"padding-left:0;display:block;"}
%h2
= @person.real_name
.right{:style => "top:0;"}
%span.description
= @person.diaspora_handle
#person_nav_links
= link_to t('layouts.header.view_profile'), person_path(@person)
= link_to t('_photos'), person_photos_path(@person)
.span-8.append-1.last .span-8.append-1.last
= render :partial => 'people/profile_sidebar', :locals => {:person => @person, :is_contact => @is_contact} = render :partial => 'people/profile_sidebar', :locals => {:person => @person, :is_contact => @is_contact}

View file

@ -2,9 +2,21 @@
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
.span-15.last
#thumbnails - content_for :head do
- for photo in photos
.image_thumb :javascript
= link_to (image_tag photo.url(:thumb_medium)), photo_path(photo) $(document).ready(function(){
$("#thumbnails").find("img").bind("mouseenter",function(){
var photo = $(this),
messageId = photo.attr("data-message-id");
$("#thumbnails").find("img[data-message-id='"+messageId+"']").css('opacity','0.5');
$("#thumbnails").find("img").fadeTo(100,1);
});
});
#thumbnails.span-15.last
- for photo in photos
= link_to (image_tag photo.url(:thumb_medium), "data-message-id" => photo.status_message_id ), photo_path(photo)

View file

@ -3,24 +3,21 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
%h3= t('aspects.manage.add_a_new_contact') %h4
= t('aspects.manage.add_a_new_contact')
= info_text(t('.enter_a_diaspora_username'))
= form_tag(person_by_handle_path, :id => "new_request_to_#{aspect.id}", :class => "webfinger_form", :remote => true) do = form_tag(person_by_handle_path, :id => "new_request_to_#{aspect.id}", :class => "webfinger_form", :remote => true) do
=t('.enter_a_diaspora_username')
%br
%i= t '.your_diaspora_username_is', :diaspora_handle => current_user.diaspora_handle
= search_field_tag :diaspora_handle,'', :id => "request_d_handle_to_#{aspect.id}", :results => 5, :placeholder => t('.diaspora_handle') = search_field_tag :diaspora_handle,'', :id => "request_d_handle_to_#{aspect.id}", :results => 5, :placeholder => t('.diaspora_handle')
= hidden_field_tag :aspect_id, aspect.id = hidden_field_tag :aspect_id, aspect.id
- if defined?(getting_started)
= hidden_field_tag :getting_started, getting_started
- if defined?(manage)
= hidden_field_tag :manage, true
= submit_tag t('.create_request') = submit_tag t('.create_request')
%br
#loader.hidden= image_tag 'ajax-loader.gif' %p{:style => "margin:12px 0 24px 0px;color:#999;text-align:center;"}
= t '.your_diaspora_username_is', :diaspora_handle => current_user.diaspora_handle
#loader.hidden
= image_tag 'ajax-loader.gif'
%ul#request_result{:aspect_id => aspect.id} %ul#request_result{:aspect_id => aspect.id}
%li.error.hidden %li.error.hidden
#message #message

View file

@ -62,12 +62,12 @@
- unless aspect == :all - unless aspect == :all
#edit_aspect_pane #edit_aspect_pane
- if @contacts.count > 0 - if @contacts.count > 0
%h3= t('.add_existing') %h4= t('.add_existing')
= render 'shared/contact_list', :aspect => aspect, :contacts => @contacts, :manage => defined?(manage) = render 'shared/contact_list', :aspect => aspect, :contacts => @contacts, :manage => defined?(manage)
= render 'shared/add_contact', :aspect => aspect = render 'shared/add_contact', :aspect => aspect
%h3= t('.aspect_settings') %hr
.big_buttons .big_buttons
= button_to t('.remove_aspect'), aspect, :method => "delete", :confirm => t('.confirm_remove_aspect') = button_to t('.remove_aspect'), aspect, :method => "delete", :confirm => t('.confirm_remove_aspect')
@ -102,7 +102,7 @@
= "#{user_aspect.contacts.count} #{t('.contacts')}" = "#{user_aspect.contacts.count} #{t('.contacts')}"
- if user_aspect.contacts.count > 0 - if user_aspect.contacts.count > 0
- for aspect_contact in user_aspect.contacts[0..8] - for aspect_contact in user_aspect.contacts[0..7]
= person_image_link(aspect_contact.person) = person_image_link(aspect_contact.person)
.clearfix .clearfix

View file

@ -1,9 +1,9 @@
#author_info{:class=>("profile" if defined?(profile))} #author_info
= person_image_link(person) unless defined?(profile) = person_image_link(person)
.from .from
%h2 %h2
= person.real_name = person.real_name
- if defined?(post) && current_user.owns?(post) - if current_user.owns?(post)
.aspect .aspect
%ul %ul
@ -12,6 +12,7 @@
- else - else
- for aspect in current_user.aspects_with_post( post.id ) - for aspect in current_user.aspects_with_post( post.id )
%li= link_to aspect.name, aspect %li= link_to aspect.name, aspect
#person_nav_links #person_nav_links
= link_to t('layouts.header.view_profile'), person_path(person) = link_to t('layouts.header.view_profile'), person_path(person)
= link_to t('_photos'), person_photos_path(person) = link_to t('_photos'), person_photos_path(person)

View file

@ -56,6 +56,7 @@
$('.added').live('ajax:failure', function(data, html, xhr) { $('.added').live('ajax:failure', function(data, html, xhr) {
alert("#{t('.cannot_remove')}"); alert("#{t('.cannot_remove')}");
$(this).fadeTo(200,1);
}); });
$('.add').live('ajax:loading', function(data, html, xhr) { $('.add').live('ajax:loading', function(data, html, xhr) {
@ -89,21 +90,16 @@
.contact_list .contact_list
= search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => t('.search_contacts') = search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => t('.all_contacts')
%ul %ul
- for contact in contacts - for contact in contacts
%li %li
- unless contact.aspect_ids.include?(aspect.id) = person_image_link contact.person
= person_image_link contact.person %span.name
%span.name = link_to contact.person.real_name, contact.person
= link_to contact.person.real_name, contact.person .right
.right - unless contact.aspect_ids.include?(aspect.id)
= add_to_aspect_button(aspect.id, contact.person.id) = add_to_aspect_button(aspect.id, contact.person.id)
- else
- else
= person_image_link contact.person
%span.name
= link_to contact.person.real_name, contact.person
.right
= remove_from_aspect_button(aspect.id, contact.person.id) = remove_from_aspect_button(aspect.id, contact.person.id)

View file

@ -24,7 +24,6 @@ javascripts:
- public/javascripts/vendor/mailchimp/jquery.form.js - public/javascripts/vendor/mailchimp/jquery.form.js
- public/javascripts/vendor/mailchimp/jquery.validate.js - public/javascripts/vendor/mailchimp/jquery.validate.js
- public/javascripts/vendor/mailchimp/jquery126.min.js - public/javascripts/vendor/mailchimp/jquery126.min.js
photo: photo:
- public/javascripts/photo.js - public/javascripts/photo.js
- public/javascripts/image-picker.js - public/javascripts/image-picker.js

View file

@ -83,7 +83,6 @@ en:
new_requests: "%{count} new requests!" new_requests: "%{count} new requests!"
new_request: "%{count} new request!" new_request: "%{count} new request!"
add_existing: "Add an existing contact" add_existing: "Add an existing contact"
aspect_settings: "Aspect settings"
contacts: "contacts" contacts: "contacts"
remove_aspect: "Remove Aspect" remove_aspect: "Remove Aspect"
confirm_remove_aspect: "Remove aspect?" confirm_remove_aspect: "Remove aspect?"
@ -96,7 +95,7 @@ en:
enter_a_diaspora_username: "Enter a Diaspora username:" enter_a_diaspora_username: "Enter a Diaspora username:"
your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}" your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}"
create_request: "Find by Diaspora handle" create_request: "Find by Diaspora handle"
diaspora_handle: "Diaspora Handle" diaspora_handle: "diaspora@handle.org"
know_email: "Know their email address? You should invite them" know_email: "Know their email address? You should invite them"
invitations: invitations:
invite_someone: "Invite someone" invite_someone: "Invite someone"
@ -112,7 +111,7 @@ en:
notification: notification:
new: "New %{type} from %{from}" new: "New %{type} from %{from}"
contact_list: contact_list:
search_contacts: "Search contacts" all_contacts: "All contacts"
cannot_remove: "Cannot remove person from last aspect. (If you want to disconnect from this person you must remove contact.)" cannot_remove: "Cannot remove person from last aspect. (If you want to disconnect from this person you must remove contact.)"
aspects: aspects:
show: show:

View file

@ -12,14 +12,14 @@ $(document).ready(function(){
var comments = $(this); var comments = $(this);
if(comments.children("li").length > 1) { if(comments.children("li").length > 1) {
var show_comments_toggle = comments.closest("li").find(".show_post_comments"); var show_comments_toggle = comments.closest("li").find(".show_post_comments");
expandComments(show_comments_toggle); expandComments(show_comments_toggle,false);
} }
}); });
// comment toggle action // comment toggle action
$stream.not(".show").delegate("a.show_post_comments", "click", function(evt) { $stream.not(".show").delegate("a.show_post_comments", "click", function(evt) {
evt.preventDefault(); evt.preventDefault();
expandComments($(this)); expandComments($(this),true);
}); });
// comment submit action // comment submit action
@ -112,20 +112,28 @@ $(document).ready(function(){
});//end document ready });//end document ready
function expandComments(toggler){ function expandComments(toggler,animate){
var text = toggler.html(); var text = toggler.html();
commentBlock = toggler.closest("li").find("ul.comments", ".content"); commentBlock = toggler.closest("li").find("ul.comments", ".content");
if( toggler.hasClass("visible")) { if( toggler.hasClass("visible")) {
toggler.removeClass("visible") toggler.removeClass("visible")
.html(text.replace("hide", "show")); .html(text.replace("hide", "show"));
//commentBlock.slideUp(150);
commentBlock.hide(); if(animate) {
commentBlock.fadeOut(150);
} else {
commentBlock.hide();
}
} else { } else {
toggler.addClass("visible") toggler.addClass("visible")
.html(text.replace("show", "hide")); .html(text.replace("show", "hide"));
//commentBlock.slideDown(150);
commentBlock.show(); if(animate) {
commentBlock.fadeIn(150);
} else {
commentBlock.show();
}
} }
} }

View file

@ -4,18 +4,18 @@
@font-face @font-face
:font-family 'BrandonGrotesqueLightRegular'
:src url('brandongrotesque_light/Brandon_light-webfont.eot') :src url('brandongrotesque_light/Brandon_light-webfont.eot')
:src local('☺'), url('brandongrotesque_light/Brandon_light-webfont.woff') format('woff'), url('brandongrotesque_light/Brandon_light-webfont.ttf') format('truetype'), url('brandongrotesque_light/Brandon_light-webfont.svg#webfont') format('svg') :src local('☺'), url('brandongrotesque_light/Brandon_light-webfont.woff') format('woff'), url('brandongrotesque_light/Brandon_light-webfont.ttf') format('truetype'), url('brandongrotesque_light/Brandon_light-webfont.svg#webfont') format('svg')
font :font
:family 'BrandonGrotesqueLightRegular'
:weight normal :weight normal
:style normal :style normal
body body
:padding 2em :padding 2em
:margin 0 :margin 0
:background-color rgb(252,252,252) :background-color rgb(252,252,252)
a a
:color #107FC9 :color #107FC9
:text :text
@ -36,6 +36,15 @@ h4
ol, ul ol, ul
:list-style none :list-style none
form
:position relative
input,
textarea,
label
:font
:size 14px
.hidden .hidden
:display none :display none
@ -177,9 +186,6 @@ header
:top 5px :top 5px
:right 0 :right 0
:list
:style none
a a
:padding :padding
:right 15px :right 15px
@ -229,7 +235,6 @@ header
:margin 0 :margin 0
:padding 0 :padding 0
> li > li
:list-style none
:padding 12px :padding 12px
:min-height 50px :min-height 50px
:border :border
@ -282,8 +287,6 @@ header
:display inline :display inline
:margin 0 :margin 0
:padding 0 :padding 0
:list
:style none
li li
:display inline :display inline
&:after &:after
@ -449,9 +452,6 @@ li.message
:background :background
:color #fafafa :color #fafafa
:list
:style none
:border 5px solid #333 :border 5px solid #333
:text-shadow 0 2px #fff :text-shadow 0 2px #fff
@ -487,14 +487,6 @@ li.message
:color #ccc :color #ccc
form
:position relative
input,
textarea,
label
:font
:size 14px
#user_name #user_name
:margin :margin
:bottom 20px :bottom 20px
@ -524,7 +516,6 @@ form
:display inline :display inline
:margin 0 :margin 0
:padding 0 :padding 0
:list-style none
> li > li
:display inline :display inline
@ -566,7 +557,6 @@ ul.comments
:margin 0 :margin 0
:top 1em :top 1em
:padding 0 :padding 0
:list-style none
:background :background
:color rgba(10,81,109,0.05) :color rgba(10,81,109,0.05)
@ -621,7 +611,6 @@ ul.comments
:margin :margin
:bottom 0 :bottom 0
ul ul
:list-style-type none
:margin 0 :margin 0
:padding 0 :padding 0
@ -676,7 +665,6 @@ li.message:hover
:position absolute :position absolute
:right 0 :right 0
:display inline :display inline
:list-style none
:margin 0 :margin 0
:padding 0 :padding 0
@ -859,7 +847,6 @@ label
img img
:border-radius 5px :border-radius 5px
textarea textarea
:height 42px :height 42px
@ -922,104 +909,22 @@ label
:top 5px :top 5px
#image_picker
:margin
:top 5px
.small_photo
:height 100px
:position relative
:display inline-block
:margin
:right 1em
:bottom 1em
img
:-moz-border-radius 3px
:-webkit-border-radius 3px
:border-radius 3px
input[type='checkbox']
:position absolute
.selected
:-webkit-box-shadow 0 3px 6px #000
:-moz-box-shadow 0 3px 6px #000
:border 1px solid #fff
.field_with_submit .field_with_submit
input[type='text'] input[type='text']
:width 82% :width 82%
:display inline :display inline
h1.big_text #thumbnails
:position relative a
:line-height auto :display inline-block
:border
:bottom 1px solid #666
.right
:top -6px
#content_bottom
.right
:top -5px
.right
:display inline
:float right
form
:margin
:right 0
:top 0
.back
:font
:size 12px
:weight normal
#content_bottom
:position relative
:line-height 36px
:margin 0
:top 25px
:bottom 25px
:min-height 36px
:border
:top 1px solid #999
:bottom 2px solid #eee
.show_post_comments ul.comments
:width 100%
.sub_header
:position relative
:text
:align center
:font
:style italic
:margin
:bottom 20px
:color #999
.image_thumb
:display inline-block
:width 100px
:min-width 100px
:height 100px
:min-height 100px
img
:height 100px
:width 100px :width 100px
:min-width 100px
:height 100px
:min-height 100px
img
.image_cycle :height 100px
img :width 100px
:display none
#aspect_nav #aspect_nav
:margin :margin
@ -1028,17 +933,9 @@ h1.big_text
:font :font
:family 'Arial', 'Helvetica', sans-serif :family 'Arial', 'Helvetica', sans-serif
#aspect_manage_button
:display inline
a
:color #999
ul ul
:margin 0 :margin 0
:padding 0 :padding 0
:list
:style none
> li > li
:padding 0 :padding 0
@ -1140,8 +1037,6 @@ h1.big_text
:display inline :display inline
:padding 0 :padding 0
:margin 0 :margin 0
:list
:style none
li li
:display inline :display inline
:margin :margin
@ -1153,8 +1048,6 @@ h1.big_text
.aspect, .aspect,
.requests, .requests,
.aspect_remove .aspect_remove
:list
:style none
:color #999 :color #999
:cursor default :cursor default
:text-shadow 0 1px #fff :text-shadow 0 1px #fff
@ -1169,8 +1062,6 @@ h1.big_text
:-moz-border-radius 10px :-moz-border-radius 10px
:border-radius 10px :border-radius 10px
:list
:style none
:padding 15px :padding 15px
:border 2px dashed #ccc :border 2px dashed #ccc
@ -1209,6 +1100,9 @@ h1.big_text
:-moz-border-radius 5px :-moz-border-radius 5px
:border-radius 5px :border-radius 5px
a:hover
:cursor move
&:hover &:hover
.delete .delete
:display inline :display inline
@ -1268,8 +1162,6 @@ h1.big_text
ul#settings_nav ul#settings_nav
:display inline :display inline
:list
:style none
:padding 0 :padding 0
:font :font
:size large :size large
@ -1313,13 +1205,9 @@ ul#settings_nav
:margin 0 :margin 0
:padding 0 :padding 0
#edit_aspect_pane
:margin
:top 12px
#left_pane.everyone, #left_pane.everyone,
#edit_aspect_pane #edit_aspect_pane
:background :background
:color rgb(250,250,250) :color rgb(250,250,250)
:border 1px solid #ddd :border 1px solid #ddd
@ -1333,13 +1221,27 @@ ul#settings_nav
:border :border
:bottom 1px solid #666 :bottom 1px solid #666
#edit_aspect_pane
h4
:font
:weight bold
:text
:shadow 0 1px #fff
:margin
:top 12px
:background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FBFBFB), to(#F5F5F5))
:border 1px solid #eee
:top 1px solid #fff
:bottom 1px solid #fff
.floating.empty_message .floating.empty_message
:margin :margin
:bottom 24px :bottom 24px
:text :text
:align center :align center
:padding 2em :padding 2em
:bottom 0.7em :bottom 0.7em
@ -1437,35 +1339,9 @@ input[type="search"]
:color #999 :color #999
ul#breadcrumb
:list
:style none
:margin 0
:padding 0
:font
:size 14px
:weight bold
:line
:height 3em
a
:font
:weight bold
> li
:display inline
&:after
:content ' '
&:last-child
&:after
:content ''
ul.aspects ul.aspects
:margin 0 :margin 0
:padding 0 :padding 0
:list-style none
:color #999 :color #999
:font :font
:size 24px :size 24px
@ -1561,8 +1437,6 @@ ul.aspects
.inline_aspect_listing .inline_aspect_listing
:margin 0 :margin 0
:padding 0 :padding 0
:list
:style none
:display inline :display inline
> li > li
:display inline :display inline
@ -1696,7 +1570,6 @@ h3 span.current_gs_step
ul#request_result ul#request_result
:list-style none
:padding 0 :padding 0
:margin 0 :margin 0
li li
@ -1733,8 +1606,6 @@ ul#request_result
:width 100% :width 100%
:margin 0 :margin 0
:padding 0 :padding 0
:list
:style none
> li > li
:display block :display block
@ -1800,8 +1671,6 @@ footer
ul#footer_nav ul#footer_nav
:margin 0 :margin 0
:padding 0 :padding 0
:list
:style none
> li > li
:display inline :display inline
@ -1824,8 +1693,6 @@ footer
ul#landing_nav ul#landing_nav
:margin 0 :margin 0
:padding 0 :padding 0
:list
:style none
:top 30px :top 30px
@ -1979,8 +1846,6 @@ ul#press_logos
:margin 0 :margin 0
:top 100px :top 100px
:padding 0 :padding 0
:list
:style none
> li > li
:display inline :display inline
:margin :margin
@ -2077,8 +1942,10 @@ h3,h4
:-moz-border-radius 10px :-moz-border-radius 10px
:border-radius 10px :border-radius 10px
:width 15px :width 12px
:height 12px
:max-width 12px :max-width 12px
:max-height 12px
:text :text
:indent 4px :indent 4px