Permalink
Browse files

Improve lack of JavaScript management

Remove menu flickering when loading big pages
  • Loading branch information...
flodolo committed Jan 4, 2016
1 parent 2831c6c commit ed886812702dd398aa7ae0c4cb6f4e67c8ac9c3b
Showing with 20 additions and 7 deletions.
  1. +4 −1 app/views/templates/base.php
  2. +0 −4 web/js/base.js
  3. +16 −2 web/style/transvision.css
@@ -81,7 +81,10 @@
<link rel="shortcut icon" type="image/x-icon" href="https://www.mozfr.org/favicon.ico" />
<link rel="alternate" type="application/rss+xml" title="Changelog RSS" href="/rss" />
</head>
<body id="<?= $page ?>">
<body id="<?= $page ?>" class="nojs">
<script>
document.getElementsByTagName('body')[0].className = 'jsEnabled';
</script>
<div id="links-top" class="links">
<div class="container">
<?= $links ?>
View
@@ -51,10 +51,6 @@ $(document).ready(function() {
.prop('selected', true);
});
// Javascript is enabled, hide the menu without transitions
hideMenuButton(0);
$('#noscript-warning').hide();
// Hides search options on small screens (check if the warning is displayed)
if ($('.smallscreen_notices').is(':visible')) {
$('#searchoptions').hide();
View
@@ -201,10 +201,14 @@ h3 {
#links-top {
width: 100%;
background: #fff;
display: block;
margin: 0;
padding: 50px 0 20px;
float: left;
display: none;
}
.nojs #links-top {
display: block;
}
#links-top .container {
@@ -228,7 +232,11 @@ h3 {
margin-right: 5px;
width: 125px;
height: 36px;
background: url(/img/menu.png) center -38px no-repeat transparent;
background: url(/img/menu.png) center 0 no-repeat transparent;
}
.nojs #links-top-button {
background-position: 0 -38px;
}
.selected_view,
@@ -242,6 +250,12 @@ h3 {
text-align: center;
font-weight: bold;
padding: 0 30px;
margin-top: 20px;
display: none;
}
.nojs #noscript-warning {
display: block;
}
/* Tables */

0 comments on commit ed88681

Please sign in to comment.