Merge branch 'next-minor' into develop

This commit is contained in:
Benjamin Neff 2018-03-07 00:39:52 +01:00
commit b263cf7e6d
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
11 changed files with 23 additions and 21 deletions

View file

@ -23,6 +23,7 @@
## Features ## Features
* Add basic html5 audio/video embedding support [#6418](https://github.com/diaspora/diaspora/pull/6418) * Add basic html5 audio/video embedding support [#6418](https://github.com/diaspora/diaspora/pull/6418)
* Add the back-to-top button to all pages [#7729](https://github.com/diaspora/diaspora/pull/7729)
# 0.7.3.1 # 0.7.3.1

View file

@ -5,7 +5,7 @@ app.pages.SinglePostViewer = app.views.Base.extend({
subviews: { subviews: {
"#single-post-content": "singlePostContentView", "#single-post-content": "singlePostContentView",
'#single-post-interactions' : 'singlePostInteractionsView' "#single-post-interactions": "singlePostInteractionsView"
}, },
initialize: function() { initialize: function() {

View file

@ -12,7 +12,7 @@ app.views.BackToTop = Backbone.View.extend({
backToTop: function(evt) { backToTop: function(evt) {
evt.preventDefault(); evt.preventDefault();
$("html, body").animate({scrollTop: 0}); $("html, body").animate({scrollTop: 0}, this.toggleVisibility);
}, },
toggleVisibility: function() { toggleVisibility: function() {

View file

@ -70,20 +70,29 @@ pre { word-wrap: break-word; }
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
opacity: 0; opacity: 0;
pointer-events: none;
position: fixed; position: fixed;
right: 20px; right: 20px;
text-decoration: none;
transition: opacity ease 400ms; transition: opacity ease 400ms;
width: 50px; width: 50px;
z-index: 49; z-index: 49;
&:hover, &:hover,
&.visible:hover { &:focus,
&:active {
color: $white; color: $white;
opacity: .85;
text-decoration: none; text-decoration: none;
} }
&.visible { opacity: .5; } &.visible {
opacity: .5;
pointer-events: auto;
&:hover {
opacity: .85;
}
}
} }
.noscript { .noscript {

View file

@ -38,3 +38,5 @@
%ol.indicator %ol.indicator
#flash-container= flash_messages #flash-container= flash_messages
%a.entypo-chevron-up.back-to-top#back-to-top{title: t("layouts.application.back_to_top"), href: "#"}

View file

@ -17,8 +17,6 @@
= render partial: 'people/person', locals: hash = render partial: 'people/person', locals: hash
= will_paginate @contacts_of_contact, renderer: WillPaginate::ActionView::BootstrapLinkRenderer = will_paginate @contacts_of_contact, renderer: WillPaginate::ActionView::BootstrapLinkRenderer
%a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}
-if user_signed_in? && @person -if user_signed_in? && @person
#new_status_message_pane #new_status_message_pane
= render 'shared/modal', = render 'shared/modal',

View file

@ -29,8 +29,6 @@
= will_paginate @people, renderer: WillPaginate::ActionView::BootstrapLinkRenderer = will_paginate @people, renderer: WillPaginate::ActionView::BootstrapLinkRenderer
%a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}
.col-md-4 .col-md-4
- if AppConfig.settings.invitations.open? - if AppConfig.settings.invitations.open?
%h4 %h4

View file

@ -30,8 +30,6 @@
.loader.hidden .loader.hidden
.spinner .spinner
%a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}
-if user_signed_in? && @person -if user_signed_in? && @person
#new_status_message_pane #new_status_message_pane
= render 'shared/modal', = render 'shared/modal',

View file

@ -178,5 +178,3 @@
.col-md-9 .col-md-9
.stream-container#aspect-stream-container .stream-container#aspect-stream-container
= render "aspects/aspect_stream", stream: @stream = render "aspects/aspect_stream", stream: @stream
%a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}

View file

@ -33,5 +33,3 @@
#paginate #paginate
.loader.hidden .loader.hidden
.spinner .spinner
%a.entypo-chevron-up.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"}

View file

@ -17,7 +17,7 @@ describe("app.views.BackToTop", function() {
it("scrolls to the top of the page", function() { it("scrolls to the top of the page", function() {
var spy = spyOn($.fn, "animate"); var spy = spyOn($.fn, "animate");
this.view.backToTop($.Event()); this.view.backToTop($.Event());
expect(spy).toHaveBeenCalledWith({scrollTop: 0}); expect(spy).toHaveBeenCalledWith({scrollTop: 0}, jasmine.any(Function));
}); });
}); });