Skip to content

Commit

Permalink
rearrange the code. remove duplicate if
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Oct 16, 2014
1 parent 0308667 commit 3aa2926
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions administrator/templates/isis/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@
, isFixed = 0
, edit = <?php echo $singular; ?>

// Disable cpanel and user menu
if (edit)
{
$('.icon-joomla').addClass('disabled');
$('.nav-user').addClass('disabled');
$(".admin-logo").attr("href", "#");
$('ul.nav-user > li > a').attr("data-toggle","");
}

processScroll()

// hack sad times - holdover until rewrite for 2.1
Expand All @@ -284,15 +293,6 @@
}
})

// Hide cpanel and user menu
if (edit)
{
$('.icon-joomla').addClass('disabled');
$('.nav-user').addClass('disabled');
$(".admin-logo").attr("href", "#");
$('ul.nav-user > li > a').attr("data-toggle","");
}

$win.on('scroll', processScroll)

function processScroll()
Expand All @@ -301,14 +301,6 @@ function processScroll()
if (scrollTop >= navTop && !isFixed) {
isFixed = 1
$nav.addClass('subhead-fixed')
// Hide cpanel and user menu
if (edit)
{
$('.icon-joomla').addClass('disabled');
$('.nav-user').addClass('disabled');
$(".admin-logo").attr("href", "#");
$('ul.nav-user > li > a').attr("data-toggle","");
}
} else if (scrollTop <= navTop && isFixed) {
isFixed = 0
$nav.removeClass('subhead-fixed')
Expand Down

0 comments on commit 3aa2926

Please sign in to comment.