fix error collapse menu and toolbar admin header margin top

1.10.x
aragonc 11 years ago
parent 76dca6eb4a
commit 7afaa2d341
  1. 39
      main/template/default/layout/head.tpl
  2. 2
      main/template/default/layout/menu.tpl
  3. 2
      main/template/default/layout/topbar.tpl

@ -162,28 +162,6 @@ $(window).resize(function() {
$(document).scroll(function() {
// Top bar scroll effect
if ($('body').width() > 959) {
if ($('.subnav').length) {
if (!$('.subnav').attr('data-top')) {
// If already fixed, then do nothing
if ($('.subnav').hasClass('subnav-fixed')) return;
// Remember top position
var offset = $('.subnav').offset();
$('.subnav').attr('data-top', offset.top);
}
if ($('.subnav').attr('data-top') - $('.subnav').outerHeight() <= $(this).scrollTop()) {
$('.subnav').addClass('subnav-fixed');
} else {
$('.subnav').removeClass('subnav-fixed');
}
//$('.subnav .brand').show();
}
} else {
//$('.subnav .brand').hide();
}
//Exercise warning fixed at the top
var fixed = $("#exercise_clock_warning");
if (fixed.length) {
@ -324,6 +302,12 @@ function showConfirmationPopup(obj, urlParam)
$(function() {
check_brand();
//if exists the toolbar admin
if($('#toolbar').length){
var heigthToolBar= $('#toolbar').height();
$('header').css('margin-top', heigthToolBar+'px');
}
// Removes the yellow input in Chrome
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
@ -337,17 +321,6 @@ $(function() {
});
}
// Fixes buttons to the new btn class.
/* if (!$('#button').hasClass('btn')) {
$("button").addClass('btn');
} */
// Dropdown effect.
$('.dropdown-toggle').dropdown();
// Responsive effect.
$(".collapse").collapse();
$(".accordion_jquery").accordion({
autoHeight: false,
active: false, // all items closed by default

@ -2,7 +2,7 @@
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#menuone">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#menuone" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>

@ -1,6 +1,6 @@
<!-- Topbar -->
{% if show_toolbar == 1 %}
<nav class="navbar navbar-inverse navbar-fixed-top">
<nav id="toolbar-admin" class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">

Loading…
Cancel
Save