Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide footer in public share page #99

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

danxuliu
Copy link
Member

The footer in the public share page is hidden by adding the hidden CSS class to the footer. However, the CSS rules for the footer defined in the server are more specific than the general rule for .hidden elements, which caused the footer to be shown even if marked as .hidden. Now a more specific rule was added to override the ones from the server and ensure that the footer is hidden.

Note that this problem occurs in all browsers; it is not related to IE 11.

Also note that, as the PDF viewer can not be closed in the public share page and thus the footer is never shown, the proper way to fix this would be to change the TemplateResponse in the DisplayController to a PublicTemplateResponse which makes possible to completely remove the footer from the rendered template, and then adjust the JavaScript code as needed.

Despite that I opted for the other approach for easier backport to stable14, as this issue appeared in NC 14.0.0 Beta 4 (when the CSS rules for the footer were added in the server).

The footer in the public share page is hidden by adding the "hidden" CSS
class to the footer. However, the CSS rules for the footer defined in
the server are more specific than the general rule for ".hidden"
elements, which caused the footer to be shown even if marked as
".hidden". Now a more specific rule was added to override the ones from
the server and ensure that the footer is hidden.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@@ -6,6 +6,10 @@
display: block;
}

#body-public footer.hidden {
display: none;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not enough:
bildschirmfoto 2018-10-02 um 23 55 36

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it again removing and adding the fix and for me it works as expected (footer visible without the fix, footer hidden with the fix).

Note that in your screenshot all the rules come from the server (the display: none is the generic one from the server, not the one from #body-public footer.hidden in style.css). Maybe a cache issue?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also from gallery app or so?

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works now 👍

@MorrisJobke MorrisJobke merged commit 6478150 into master Oct 3, 2018
@MorrisJobke MorrisJobke deleted the hide-footer-in-public-share-page branch October 3, 2018 20:30
@MorrisJobke
Copy link
Member

Backport in #103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants