down to two steps; wip.

This commit is contained in:
danielgrippi 2011-10-13 22:10:57 -07:00
parent e087284daa
commit 42d4d4f400
5 changed files with 83 additions and 287 deletions

View file

@ -38,7 +38,6 @@
var id = responseJSON.data.photo.id;
var url = responseJSON.data.photo.unprocessed_image.url;
var oldPhoto = $('#photo_id');
console.log(responseJSON);
if(oldPhoto.length == 0) {
$('#update_profile_form').prepend("<input type='hidden' value='" + id + "' id='photo_id' name='photo_id'/>");
}else{
@ -47,6 +46,7 @@
$("#profile_photo_upload").find(".avatar").removeClass('loading');
$("#profile_photo_upload").find(".avatar").attr("src",url);
$(".avatar[data-person_id=#{current_user.person.id}]").attr("src",url);
}
});
}

View file

@ -16,7 +16,6 @@
asHtmlID: "tags",
neverSubmit: true,
retriveLimit: 10,
selectionLimit: 5,
minChars: 2,
keyDelay: 200,
startText: "",

View file

@ -2,6 +2,38 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :head do
= include_javascripts :profile
:javascript
$(document).ready(function () {
var data = $.parseJSON( '#{@tags_array.to_json.gsub("'", "\\\\'")}' ),
autocompleteInput = $("#follow_tags");
autocompleteInput.autoSuggest("#{tags_path}", {
selectedItemProp: "name",
searchObjProps: "name",
asHtmlID: "tags",
neverSubmit: true,
retriveLimit: 10,
selectionLimit: 5,
minChars: 2,
keyDelay: 200,
startText: "",
emptyText: "#{t('no_results')}",
preFill: data
});
autocompleteInput.bind('keydown', function(evt){
if(evt.keyCode == 13 || evt.keyCode == 9 || evt.keyCode == 32){
evt.preventDefault();
if( $('li.as-result-item.active').length == 0 ){
$('li.as-result-item').first().click();
}
}
});
});
.span-5.leftNavBar
#home_user_badge
= owner_image_link
@ -26,165 +58,48 @@
= welcome_text
%h4
= t(".community_welcome")
%p
= t(".not_mandatory")
%ul#getting_started
%li.profile{:class => ("completed" if has_completed_profile?)}
%li.profile
.getting_started_number
%h3
= @step += 1
.content
%h3
= t(".fill_out_your_profile")
#getting_started_profile_photo
= person_image_link(current_user.person, :size => :thumb_medium)
= t(".who_are_you")
.span-12
%p
= t(".profile_description")
.span-8.fields
- [:full_name, :image_url, :birthday, :gender, :bio, :location, :tag_string].each do |attr|
.span-4.last
= profile_field_tag(current_user.person.profile, attr)
We can speed things up a bit by
= link_to "hooking up your Facebook account", "auth/facebook?callback_url=#{getting_started_url}"
to Diaspora. We can pull your name and photo, and enable cross-positng.
#edit_profile_button_div
= link_to t(".edit_profile"), edit_profile_path, :class => "button", :target => "_blank"
- unless AppConfig[:configured_services].blank?
%li.services{:class => ("completed" if has_connected_services?)}
.getting_started_number
%h3
= @step += 1
.content
%h3
= t('.connect_to_your_other_social_networks')
%p
= t('.connect_to_your_other_social_networks_explanation_p1')
- if AppConfig[:configured_services].detect{|s| s == "facebook"}
= t('.connect_to_your_other_social_networks_explanation_p2')
#getting_started_service_icons
- AppConfig.configured_services.each do |service|
- unless current_user.services.any?{|x| x.provider == service}
%span.service
%span.service_image
= link_to(image_tag("social_media_logos/#{service.to_s.downcase}-48x48.png", :title => service.to_s.titleize), "/auth/#{service}")
- else
%span.service
%span.service_image
= image_tag( "social_media_logos/#{service.to_s.downcase}-48x48.png", :title => service.to_s.titleize, :class => "dim")
%span.checkmark
= image_tag( "icons/check_yes_ok.png")
%li.connect_with_people{:class => ("completed" if has_few_contacts?)}
.getting_started_number
%h3
= @step += 1
.content
%h3
= t('.connect_with_people')
%p
= t('.connect_with_people_explanation_pt1', :bold => content_tag(:b, t('.bold'))).html_safe
= t('.connect_with_people_explanation_pt2')
-unless AppConfig[:no_follow_diasporahq]
#diaspora_hq_pane
- if diasporahq = Person.find_by_diaspora_handle("diasporahq@joindiaspora.com")
= person_image_link(diasporahq, :size => :thumb_medium)
.name
= person_link(diasporahq)
.info
= t('.get_updates_from_core')
.add_to_aspect
= render :partial => 'people/relationship_action',
:locals => { :person => diasporahq,
:contact => current_user.contact_for(diasporahq),
:current_user => current_user }
#community_spotlight_pane
%h4
= t('.community_spotlight')
%div
- Person.community_spotlight[0..5].each do |person|
.featured_user_card_small
.right
.add_to_aspect
= render :partial => 'people/relationship_action',
:locals => { :person => person,
:contact => current_user.contact_for(person),
:current_user => current_user }
= person_image_link(person, :target => "_blank")
= person_link(person, :class => "hovercardable", :target => "_blank")
.tags
- person.profile.tags[0..2].each do |tg|
= link_to "##{tg}", tag_path(tg.name), :target => "_blank"
= link_to "#{t('.see_all_community_spotlight')} ->", community_spotlight_path, :target => "_blank"
.span-6
= form_for current_user.person.profile do |profile|
= profile.text_field :first_name
%br
#find_friends_pane
%h4
= t('.find_friends')
.span-5.append-1
= form_tag(people_path, :method => 'get', :class => "people search_form") do
= text_field_tag 'q', nil, :placeholder => t(".search_for_people"), :type => 'search', :results => 5
.span-5.last{:style => "height:30px;"}
%h4{:style => "margin-top:7px;"}
or
= link_to t('.find_friends_from_facebook'), friend_finder_path('facebook'), :target => "_blank"
.clearfix
%br
= render 'photos/new_profile_photo', :aspect => :getting_started, :person => current_user.person
%li.follow_interests{:class => ("completed" if has_few_followed_tags?)}
%li.follow_interests
.getting_started_number
%h3
= @step += 1
.content
%h3
= t('.follow_your_interests')
= t('.what_are_you_in_to')
%p
= t('.hashtag_explanation')
.span-5.append-1
.span-9
= form_tag(tags_path, :method => 'get', :class => "tag_input search_form") do
= text_field_tag 'q', nil, :placeholder => t(".search_for_hashtags"), :type => 'search', :results => 5
.span-5.last
%h4{:style => "margin-top:7px;"}
= t('.featured_tags')
%p
- ["diaspora", "art", "gif", "french"].each do |tag_name|
= tag_link(tag_name)
%br
= text_field_tag 'follow_tags', nil
.clearfix
%br
%br
%li.cubbies{:class => ("completed" if has_connected_cubbies?)}
.getting_started_number
%h3
= @step += 1
.content
%h3
= t(".connect_to")
= link_to "Cubbi.es", "http://cubbi.es/", :target => "_blank"
%p
= t('tokens.show.what_is_cubbies')
.cubbies_images
= image_tag '/images/cubbies_collage.png', :width => 422, :height => 159, :class => "cubbies_collage_small"
= image_tag '/images/cubbies_screenshot2.png', :height => 151, :width => 200, :class => "cubbies_user_page_small"
%li{:style => 'text-align:center;'}
%p
= link_to t('.finished'), getting_started_completed_path, :class => "button"
= link_to t('.awesome_take_me_to_diaspora'), getting_started_completed_path, :class => "button"
/.span-5.rightBar.last
/ = render 'selected_contacts', :people => @selected_people.sample(20), :count => @contact_count
/ = render 'shared/right_sections'

View file

@ -895,44 +895,12 @@ en:
welcome: "Welcome!"
welcome_with_name: "Welcome, %{name}!"
community_welcome: "Diaspora's community is happy to have you aboard!"
not_mandatory: "Completing the following steps will improve your Diaspora experience, but they are not mandatory."
finished: "Finished"
awesome_take_me_to_diaspora: "Awesome! Take me to Diaspora*"
fill_out_your_profile: "Fill out your profile"
profile_description: "Make it easier for people to find you by filling out your profile information."
profile_fields:
name: "Name"
birthday: "Birthday"
bio: "Bio"
tags: "Tags"
photo: "Photo"
gender: "Gender"
location: "Location"
connect_to_your_other_social_networks: "Connect to your other social networks"
connect_to_your_other_social_networks_explanation_p1: "Connecting to services will allow you to publish out to these services."
connect_to_your_other_social_networks_explanation_p2: "With Facebook, you also be able to find friends already on Diaspora and invite others."
connect_with_people: "Connect with cool people"
connect_with_people_explanation_pt1: "Connect with people by placing them into one or more of your %{bold}."
bold: "aspects"
edit_profile: "Edit Profile"
search_for_hashtags: "Search for #hashtags"
search_for_people: "Search for people"
connect_with_people_explanation_pt2: "Aspects are an intuitive way to group new and familar faces, private to you, allowing you to filter down or share with subsets of your contacts easily."
community_spotlight: "Community spotlight"
follow_your_interests: "Follow your interests"
connect_to: "Connect to"
find_friends_from_facebook: "find friends from Facebook"
featured_tags: "Follow featured tags"
find_friends: "Find friends"
see_all_community_spotlight: "See all community spotlight"
get_updates_from_core: "Get updates about the project from the core team."
who_are_you: "Who are you?"
what_are_you_in_to: "What are you in to?"
hashtag_explanation: "Hashtags allow you to talk about and follow your interests. They're also a great way to find new people on Diaspora."
update:

View file

@ -3198,6 +3198,9 @@ ul#getting_started
:padding 0
:margin 0
li
:list-style none
> li
:position relative
:border
@ -3208,87 +3211,19 @@ ul#getting_started
.content
:padding
:left 30px
:left 35px
input[type='search']
:width 210px
&.completed
@include opacity(0.4)
@include transition(opacity, 0.2s)
&:hover,
&:active
@include opacity(1)
.content h3
:text
:decoration line-through
.profile
:min-height 170px
#getting_started_profile_photo
:float right
.avatar
:height 150px
:width 150px
:margin
:left 5px
#edit_profile_button_div
:padding
:top 90px
:bottom 20px
#getting_started_service_icons
:text-align center
:padding
:bottom 20px
:top 10px
.service
:margin
:right 48px
:position relative
.service_image
:position relative
.checkmark
:position absolute
img
:height 36px
:width 36px
:left 25px
:top -15px
:min-height 260px
#right_service_icons
:text-align center
:padding 10px
:bottom 0
#diaspora_hq_pane
:padding
:bottom 20px
:min-height 70px
.add_to_aspect
:padding 10px 0
.avatar
:float left
:margin
:right 10px
:height 70px
:width 70px
.name
:font
:weight bold
.cubbies_images
:margin-left 15px
@ -3322,28 +3257,7 @@ ul#getting_started
:background
:image url('/images/icons/check_yes_ok.png') !important
.featured_tag
:background
//:image url('/images/icons/check_yes_ok.png')
:position center left
:repeat no-repeat
:display none
:padding
:left 20px
&.followed
:background
:image url('/images/icons/check_yes_ok.png')
&:hover,
:background
:image url('/images/icons/check_yes_ok_lighter.png')
#community_spotlight_pane
#featured_users_pane
:padding 10px 0
.featured_user_card_small