Skip to content

Commit

Permalink
Disable istead of hide
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Oct 16, 2014
1 parent d0c2f30 commit 18aed57
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions administrator/templates/isis/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,15 @@
<jdoc:include type="modules" name="debug" style="none" />
<?php
// Get the singular view
$singular = preg_match('/&id=|=com_config|&view=mail|&layout=edit/', JURI::getInstance()->toString());
$singular = preg_match('/&id=|&view=mail|&layout=edit/', JURI::getInstance()->toString());
if ($stickyToolbar) : ?>
<script>
(function($)
{
// fix sub nav on scroll
var $win = $(window)
, $nav = $('.subhead')
, navTop = $('.subhead').length && $('.subhead').offset().top - <?php if ($displayHeader || !$statusFixed) : ?>50<?php else:?>30<?php endif;?>
, navTop = $('.subhead').length && $('.subhead').offset().top - <?php if ($displayHeader || !$statusFixed) : ?>40<?php else:?>20<?php endif;?>
, isFixed = 0
, edit = <?php echo $singular; ?>

Expand All @@ -284,11 +284,11 @@
}
})

// remove disabled nav
// Hide cpanel and user menu
if (edit)
{
$('.navbar-fixed-top').addClass('hidden');
$('body').css("padding-top", "0");
$('.icon-joomla').addClass('disabled');
$('.nav-user').addClass('disabled');
}

$win.on('scroll', processScroll)
Expand All @@ -299,10 +299,11 @@ function processScroll()
if (scrollTop >= navTop && !isFixed) {
isFixed = 1
$nav.addClass('subhead-fixed')
// remove disabled nav
// Hide cpanel and user menu
if (edit)
{
$('.subhead-fixed').css("top", "0");
$('.icon-joomla').addClass('disabled');
$('.nav-user').addClass('disabled');
}
} else if (scrollTop <= navTop && isFixed) {
isFixed = 0
Expand Down

0 comments on commit 18aed57

Please sign in to comment.