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

Make the forum usable with JavaScript disabled #1325

Merged
merged 2 commits into from
Jul 1, 2015
Merged

Make the forum usable with JavaScript disabled #1325

merged 2 commits into from
Jul 1, 2015

Conversation

caercam
Copy link
Contributor

@caercam caercam commented Jun 26, 2015

Luna relies on Bootstrap for some actions, making it hard to use when JavaScript is disabled. The profile tabs and user menu will not work, for instance, preventing users from editing their profile or even log out.

Details: I added a WordPress-like duet of classes, hide-if-js and hide-if-no-js; a no-js class is set to body and turned to js right after loading. Elements with a hide-if-no-js will be hidden if body has a no-js class set, while elements with a hide-if-js will be hidden if body has a js class set. This way we can easily chose what should or should not be displayed on a JS enabled/disabled context.

@caercam
Copy link
Contributor Author

caercam commented Jun 26, 2015

Bonus: the modification brought to the user profile nav tabs makes it possible to open settings tabs in new browser tabs, which was not possible with pure Bootstrap tabs.

@caercam
Copy link
Contributor Author

caercam commented Jun 26, 2015

Additional JavaScript tweak: show a confirm box when the user tries to leave a page while editing a post form. This prevents from accidentally closing a page where we're actually typing a post.

@Studio384
Copy link
Member

Nice work.

Studio384 pushed a commit that referenced this pull request Jul 1, 2015
Make the forum usable with JavaScript disabled
@Studio384 Studio384 merged commit 1d147f5 into GetLuna:lunadev Jul 1, 2015
@Studio384 Studio384 mentioned this pull request Jul 26, 2015
34 tasks
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.

2 participants