Merge pull request #5400 from Faldrian/5003-fix-more-button-mobile

Fix for "more" link on mobile view
This commit is contained in:
Jonne Haß 2014-11-22 19:05:36 +01:00
commit 137e60ca51
8 changed files with 30 additions and 18 deletions

View file

@ -93,6 +93,7 @@ This is disabled by default since it requires the installation of additional pac
* Drop unneeded and too open crossdomain.xml
* Fix hidden aspect dropdown on getting started page [#5407](https://github.com/diaspora/diaspora/pulls/5407)
* Fix a few issues on Bootstrap pages [#5401](https://github.com/diaspora/diaspora/pull/5401)
* Improve handling of the `more` link on mobile stream pages [#5400](https://github.com/diaspora/diaspora/pull/5400)
## Features
* Don't pull jQuery from a CDN by default [#5105](https://github.com/diaspora/diaspora/pull/5105)

View file

@ -192,7 +192,7 @@ h3 {
}
}
.more-link {
.more-link, .no-more-posts {
-webkit-box-shadow: inset 0 1px 5px #777, 0 1px 1px rgba(0,0,0,0.4);
display: block;
text-align: center;
@ -204,10 +204,12 @@ h3 {
color: rgba(220,220,220,0.8);
}
h1 {
h1, h2 {
color: $text-grey;
padding: 20px;
text-shadow: 0 2px 0 #fff; } }
text-shadow: 0 2px 0 #fff;
}
}
.info {
color: #ccc;

View file

@ -22,10 +22,7 @@
- else
#main_stream.stream
= render 'shared/stream', :posts => @stream.stream_posts
#pagination
%a.more-link.paginate{:href => next_page_path}
%h1
= t("more")
= render 'shared/stream_more_button'
- else
#main_stream
.dull
@ -33,4 +30,3 @@
= t('.ignoring', :name => @person.first_name)
- elsif user_signed_in? && (current_user.person != @person)
= t('.has_not_shared_with_you_yet', :name => @person.first_name)

View file

@ -0,0 +1,15 @@
-if @stream.stream_posts.length == 15
#pagination
%a.more-link.paginate{:href => next_page_path}
%h1
= t("more")
-elsif params[:max_time].present?
#pagination
%div.no-more-posts
%h2
= t("stream_helper.no_more_posts")
-else
#pagination
%div.no-more-posts
%h2
= t("stream_helper.no_posts_yet")

View file

@ -10,8 +10,4 @@
#main_stream.stream
= render 'shared/stream', :posts => @stream.stream_posts
-if @stream.stream_posts.length > 0
#pagination
%a.more-link.paginate{:href => next_page_path}
%h1
= t("more")
= render 'shared/stream_more_button'

View file

@ -7,9 +7,5 @@
#main_stream.stream
= render 'shared/stream', :posts => @stream.stream_posts
-if @stream.stream_posts.length > 0
#pagination
%a.more-link.paginate{:href => next_page_path}
%h1
= t("more")
= render 'shared/stream_more_button'

View file

@ -1188,6 +1188,8 @@ en:
one: "Show one more comment"
other: "Show %{count} more comments"
hide_comments: "Hide all comments"
no_more_posts: "You have reached the end of the stream."
no_posts_yet: "There are no posts yet."
tags:
show:

View file

@ -2,6 +2,10 @@ require 'rubygems'
prefork = proc do
ENV["RAILS_ENV"] ||= "test"
# Have all rests run with english browser locale
ENV['LANG'] = 'C'
require 'cucumber/rails'
require 'capybara/rails'