diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 5cda129f0..b13d9ca92 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -86,7 +86,7 @@ class AspectsController < ApplicationController @post_hashes = hashes_for_posts @posts @post_count = @posts.count - respond_with @aspect + redirect_to aspects_path('a_ids[]' => @aspect.id) end end diff --git a/app/views/aspects/_aspect_listings.haml b/app/views/aspects/_aspect_listings.haml index d11fd3a8f..db352abfd 100644 --- a/app/views/aspects/_aspect_listings.haml +++ b/app/views/aspects/_aspect_listings.haml @@ -8,7 +8,10 @@ = link_to t('contacts', :count => @contacts.count), aspects_manage_path, :title => t('aspects.manage.manage_aspects') = @aspect_hashes.count - = t('_aspects') + - if @aspect_hashes.count == 1 + = t('_aspect') + - else + = t('_aspects') %ul - for a_hash in aspect_hashes diff --git a/app/views/aspects/edit.html.haml b/app/views/aspects/edit.html.haml index 011a1d473..db0797c9c 100644 --- a/app/views/aspects/edit.html.haml +++ b/app/views/aspects/edit.html.haml @@ -32,3 +32,10 @@ = link_to 'rename', '#' \/ = link_to 'delete', @aspect, :method => "delete", :confirm => t('.confirm_remove_aspect') + + + #rename_aspect + = form_for @aspect do |asp| + = asp.text_field :name, :value => @aspect.name + = asp.submit t('.rename_aspect') + diff --git a/app/views/aspects/index.js.erb b/app/views/aspects/index.js.erb index 6371393c4..d4dd81c79 100644 --- a/app/views/aspects/index.js.erb +++ b/app/views/aspects/index.js.erb @@ -1,3 +1,19 @@ $('#aspect_stream_container').html("<%= escape_javascript(render('aspects/aspect_stream', :aspect => @aspect, :aspect_ids => @aspect_ids, :post_hashes => @post_hashes)) %>"); $('#aspect_listings').html("<%= escape_javascript(render('aspects/aspect_listings', :aspect_hashes => @aspect_hashes)) %>"); $('a[rel*=facebox]').facebox(); + +$(document).ready(function() { + $('#main_stream').infinitescroll({ + navSelector : "div.pagination", + // selector for the paged navigation (it will be hidden) + nextSelector : ".pagination a.next_page", + // selector for the NEXT link (to page 2) + itemSelector : "#main_stream .stream_element", + // selector for all items you'll retrieve + bufferPx: 300, + donetext: "no more.", + loadingText: "", + loadingImg: '/images/ajax-loader.gif' + }); +}); + diff --git a/app/views/people/_aspect_list.haml b/app/views/people/_aspect_list.haml index fca797d0a..5bf170336 100644 --- a/app/views/people/_aspect_list.haml +++ b/app/views/people/_aspect_list.haml @@ -41,6 +41,7 @@ :contact => contact, :aspects_with_person => aspects_with_person, :aspects_without_person => aspects_without_person} + %br - if contact .right diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 5526bf069..06af5bc34 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -25,7 +25,7 @@ {:controller => "people", :action => "share_with", :id => @person.id}, - :class => 'button', + :class => 'share_with button', :rel => 'facebox' - else @@ -61,6 +61,6 @@ - else #stream - %li - %h3= t('.no_posts') + %li{:style=>"text-align:center;"} + .dull= t('.no_posts') diff --git a/features/connects_users.feature b/features/connects_users.feature index 261ddb382..6097aed19 100644 --- a/features/connects_users.feature +++ b/features/connects_users.feature @@ -8,9 +8,10 @@ Feature: sending and receiving requests Scenario: initiating and accepting a contact request When I sign in as "bob@bob.bob" And I am on "alice@alice.alice"'s page - And I press the first ".add.button" within "#aspects_list ul > li:first-child" + And I press the first ".share_with.button" within "#author_info" + And I press the first ".add.button" within "#facebox #aspects_list ul > li:first-child" And I wait for the ajax to finish - Then I should see a ".added.button" within "#aspects_list ul > li:first-child" + Then I should see a ".added.button" within "#facebox #aspects_list ul > li:first-child" Then I go to the destroy user session page When I sign in as "alice@alice.alice" diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index 7998bd374..8c66d95d1 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -152,9 +152,6 @@ var Stream = { $(".stream").find(".delete").live('ajax:success', function(data, html, xhr) { $(this).parents(".status_message").fadeOut(150); }); - - // inf scroll - Stream.infiniteScroll($stream); }, toggleComments: function(evt) { @@ -198,21 +195,6 @@ var Stream = { commentBlock.find('textarea').focus(); } } - }, - - infiniteScroll: function(stream){ - stream.infinitescroll({ - navSelector : "div.pagination", - // selector for the paged navigation (it will be hidden) - nextSelector : ".pagination a.next_page", - // selector for the NEXT link (to page 2) - itemSelector : "#main_stream .stream_element", - // selector for all items you'll retrieve - bufferPx: 300, - donetext: "no more.", - loadingText: "", - loadingImg: '/images/ajax-loader.gif' - }); } }; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index aee9958cd..5a916d3b1 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -119,12 +119,12 @@ header :color #111 :color rgba(15,15,15,0.90) - :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(25,25,25,0.80)), to(rgba(0,0,0,0.98))) - :background -moz-linear-gradient(top, rgba(25,25,25,0.80), rgba(0,0,0,0.98)) + :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(35,35,35,0.85)), to(rgba(20,20,20,1))) + :background -moz-linear-gradient(top, rgba(35,35,35,0.85), rgba(20,20,20,0.98)) :-webkit-box-shadow 0 1px 3px #111 :-moz-box-shadow 0 1px 2px #111 - :box-shadow 0 1px 3px #111 + :box-shadow 0 1px 3px #222 :border :bottom 1px solid #777 @@ -1670,6 +1670,10 @@ ul#request_result :-moz-box-shadow 0 1px #fff :box-shadow 0 1px #fff + :-webkit-border-radius 0 0 5px 5px + :-moz-border-radius 0 0 5px 5px + :border-radius 0 0 5px 5px + input.contact_list_search :width 100% :margin @@ -1686,6 +1690,10 @@ ul#request_result :border :bottom 1px solid #eee + &:last-child + :border + :bottom none + &:hover :background :color rgb(245,245,245) diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index 742c1c9fb..73cd0680a 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -94,7 +94,7 @@ describe AspectsController do describe "#show" do it "succeeds" do get :show, 'id' => @aspect0.id.to_s - response.should be_success + response.should be_redirect end it "assigns aspect, aspect_contacts, and posts" do get :show, 'id' => @aspect0.id.to_s