diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1fe536c89da2a9a5c6cbdc70c277f1cdd8aad2a5..e6ba2f67febcc7620516fcdcf9fd7c1d86d00938 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -3,10 +3,10 @@ # the COPYRIGHT file. class ApplicationController < ActionController::Base - has_mobile_fu + #has_mobile_fu protect_from_forgery :except => :receive - before_filter :mobile_except_ipad + # =>before_filter :mobile_except_ipad before_filter :set_contacts_and_status, :except => [:create, :update] before_filter :count_requests before_filter :set_invites diff --git a/app/controllers/dev_utilities_controller.rb b/app/controllers/dev_utilities_controller.rb index 8eb7b788c3c478bc4d511202b294abc091ea66c0..d0c6320da7c734ceb958521542ec187b1a909949 100644 --- a/app/controllers/dev_utilities_controller.rb +++ b/app/controllers/dev_utilities_controller.rb @@ -69,7 +69,7 @@ class DevUtilitiesController < ApplicationController current_user.raw_visible_posts << photo current_user.save - current_user.update_profile(:image_url => photo.url(:thumb_medium)) + current_user.update_profile(:image_url => photo.url(:thumb_large)) current_user.save end diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index e67d794c89cdc5bfe8752c13a58a5a51ff959d7e..93ff34e87a5203d1a392e4ab07de53cefdf40aa6 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -76,7 +76,7 @@ class PeopleController < ApplicationController params[:profile_image_hash] = { :user_file => raw_image, :to => "all" } photo = current_user.post(:photo, params[:profile_image_hash]) - params[:person][:profile][:image_url] = photo.url(:thumb_medium) + params[:person][:profile][:image_url] = photo.url(:thumb_large) end if current_user.update_profile params[:person][:profile] diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 8e8f3c8a3bff572a40e8a37735477cfbe2190411..54487dbeb168404846a6b85946ec98a2007b5a76 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -9,7 +9,7 @@ class StatusMessagesController < ApplicationController respond_to :json, :only => :show def create - photos = Photo.all(:id.in => [*params[:photos]]) + photos = Photo.all(:id.in => [*params[:photos]], :diaspora_handle => current_user.person.diaspora_handle) public_flag = params[:status_message][:public] public_flag.to_s.match(/(true)/) ? public_flag = true : public_flag = false diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 67f78c42e9b2154d51ebe41652eba9d44378797d..ea2ccddf45493162a153509f7f241ef694280cd9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -180,4 +180,8 @@ module ApplicationHelper @@youtube_title_cache[id] = ret; return ret end + + def info_text(text) + "<span class='what_is_this' title='#{text}'>?</span>".html_safe + end end diff --git a/app/models/photo.rb b/app/models/photo.rb index e07422735b31b8ec7a4a9b7f00beef2aac459815..46f6286ec9d44452d2ece858fae798ed4d9e101e 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -65,7 +65,7 @@ class Photo < Post end def ensure_user_picture - people = Person.all('profile.image_url' => absolute_url(:thumb_medium) ) + people = Person.all('profile.image_url' => absolute_url(:thumb_large) ) people.each{ |person| person.profile.update_attributes(:image_url => nil) } diff --git a/app/uploaders/image_uploader.rb b/app/uploaders/image_uploader.rb index f9418907683ec0546dcaa9b659322c484cb99775..71b842eccb8107fc2c15d27e7c59327e3c28002c 100644 --- a/app/uploaders/image_uploader.rb +++ b/app/uploaders/image_uploader.rb @@ -30,7 +30,7 @@ class ImageUploader < CarrierWave::Uploader::Base end version :thumb_large do - process :resize_to_fill => [200,200] + process :resize_to_fill => [300,300] end version :scaled_full do diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 963e2a7fd9da22241559f0180d750374efba88ae..6331458a6a96e8e3449ae257102fcae80da82322 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -3,8 +3,12 @@ -# the COPYRIGHT file. .span-24.last - %h2 + %h2{:style => "position:relative;"} Home + .right + %span.description + = current_user.diaspora_handle + = info_text("This is your diaspora handle. Like an email address, you can give this to people to reach you.") .span-15.last = render 'aspects/no_contacts_message', :aspect => @aspect, :contact_count => @contacts.count @@ -16,7 +20,6 @@ #pagination = will_paginate @posts - .span-8.prepend-1.last = render 'shared/aspect_contacts', :contacts => @contacts, :aspect => @aspect diff --git a/app/views/photos/show.html.haml b/app/views/photos/show.html.haml index 6ed45038425eb7ac2ee7afe5dd0bedd741eb8964..8a12ac3be333df87a6c28719448935dea5d9fdf2 100644 --- a/app/views/photos/show.html.haml +++ b/app/views/photos/show.html.haml @@ -40,7 +40,7 @@ -if @ownership = image_tag 'ajax-loader.gif', :id => "photo_spinner", :class => "hidden" = image_tag @photo.url(:scaled_full) - .photo_options{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_medium)}"}} + .photo_options{:data=>{:actor=>"#{@photo.person.owner.id}",:actor_person=>"#{@photo.person.id}",:image_url=>"#{@photo.url(:thumb_large)}"}} = link_to t('.make_profile_photo'), '#', :class => 'make_profile_photo' | = link_to 'edit', '#', :id => "edit_photo_toggle" diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 57984a55b9fb3141b5738f1dfb6f676e79b3f876..d5dea15a06bc3412c2b9e633a152698f3f37f903 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -24,11 +24,24 @@ %h2 = t('account') - = link_to t('.invite_contacts'), new_user_invitation_path(current_user) + .span-8.append-1.last + %h3 + Your diaspora handle + %p + %b= current_user.diaspora_handle + .span-8.prepend-2.last + %h3 + Your email + %p + = current_user.email %br %br %br + %br + %br + %br + %br %h3 = t('.change_password') diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 15d5fd1ff1feb6440b9edaddeeea8eaa953646c6..f67dc0d7d69b3e58f3d0c16d5427ba304b084720 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -81,6 +81,7 @@ $(document).ready(function(){ $(".add_aspect_button", "#aspect_nav").tipsy({gravity:'w'}); $(".person img", ".dropzone").tipsy({live:true}); $(".avatar", ".aspects").tipsy({live:true}); + $(".what_is_this").tipsy({live:true,delayIn:400}); $('.webfinger_form').submit(function(evt){ form = $(evt.currentTarget); @@ -136,6 +137,8 @@ function openVideo(type, videoid, link) { link.parentNode.insertBefore(container, this.nextSibling); $container.slideDown('fast', function() { }); link.onclick = function() { $container.slideToggle('fast', function() { } ); } + + } $(".make_profile_photo").live("click", function(evt){ diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 6d2c1da455c808daa5c09aed17fc10c7e4cc0bf4..4cc044cc5d95d40700fbaf2b069a29a78b0a870d 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -1943,3 +1943,26 @@ h3,h4 :-moz-border-radius 5px :border-radius 5px +.what_is_this + :display inline-block + :cursor default + :font + :size 8px + :color #fff + + :background + :color #ccc + + :-webkit-border-radius 10px + + :width 15px + :max-width 12px + :text + :indent 4px + + :position relative + :top -4px + + &:hover + :background + :color #107FC9 diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index 24bbaff4ce2dbc42710fb2e79bf88f77238ba952..95686ab363e930f8885bf51cc87233083c50c573 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -82,7 +82,7 @@ describe Photo do it 'should remove its reference in user profile if it is referred' do @photo.save - @user.profile.image_url = @photo.image.url(:thumb_medium) + @user.profile.image_url = @photo.image.url(:thumb_large) @user.person.save @photo.destroy Person.find(@user.person.id).profile.image_url.should be_nil diff --git a/spec/models/profile_spec.rb b/spec/models/profile_spec.rb index 8ce848a85169ebf993c6f761ed3887532618bfe0..e74a08c78c6bd492f840ee8020d6ead258cdaf48 100644 --- a/spec/models/profile_spec.rb +++ b/spec/models/profile_spec.rb @@ -55,12 +55,12 @@ describe Profile do lambda {@profile.image_url = ""}.should_not change(@profile, :image_url) end it 'makes relative urls absolute' do - @profile.image_url = @photo.url(:thumb_medium) - @profile.image_url.should == "#{@pod_url}#{@photo.url(:thumb_medium)}" + @profile.image_url = @photo.url(:thumb_large) + @profile.image_url.should == "#{@pod_url}#{@photo.url(:thumb_large)}" end it 'accepts absolute urls' do - @profile.image_url = "#{@pod_url}#{@photo.url(:thumb_medium)}" - @profile.image_url.should == "#{@pod_url}#{@photo.url(:thumb_medium)}" + @profile.image_url = "#{@pod_url}#{@photo.url(:thumb_large)}" + @profile.image_url.should == "#{@pod_url}#{@photo.url(:thumb_large)}" end end describe 'serialization' do