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

Projects
None yet
3 participants
@danxuliu
Copy link
Member

danxuliu commented Sep 26, 2018

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).

Hide footer in public share page
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;

This comment has been minimized.

@MorrisJobke

MorrisJobke Oct 2, 2018

Member

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

This comment has been minimized.

@danxuliu

danxuliu Oct 3, 2018

Member

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?

This comment has been minimized.

@MorrisJobke

MorrisJobke Oct 3, 2018

Member

Maybe also from gallery app or so?

@MorrisJobke
Copy link
Member

MorrisJobke left a comment

Tested and works now 👍

@MorrisJobke MorrisJobke merged commit 6478150 into master Oct 3, 2018

4 checks passed

Scrutinizer No new issues
Details
continuous-integration/drone/pr the build was successful
Details
continuous-integration/drone/push the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MorrisJobke MorrisJobke deleted the hide-footer-in-public-share-page branch Oct 3, 2018

@MorrisJobke

This comment has been minimized.

Copy link
Member

MorrisJobke commented Oct 3, 2018

Backport in #103

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