Skip to content

Commit

Permalink
Merge pull request #4694 from dgt41/isis_ux
Browse files Browse the repository at this point in the history
Disable cpanel and user menu when editing
  • Loading branch information
infograf768 committed Oct 17, 2014
2 parents ddee783 + 1401285 commit 9428be4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion administrator/templates/isis/index.php
Expand Up @@ -257,7 +257,10 @@
<!-- End Status Module -->
<?php endif; ?>
<jdoc:include type="modules" name="debug" style="none" />
<?php if ($stickyToolbar) : ?>
<?php
// Get the singular view
$singular = preg_match('/&id=|&view=mail|&layout=edit/', JURI::getInstance()->toString());
if ($stickyToolbar) : ?>
<script>
(function($)
{
Expand All @@ -266,6 +269,17 @@
, $nav = $('.subhead')
, navTop = $('.subhead').length && $('.subhead').offset().top - <?php if ($displayHeader || !$statusFixed) : ?>40<?php else:?>20<?php endif;?>
, isFixed = 0
, edit = <?php echo $singular; ?>

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

processScroll()

Expand Down

0 comments on commit 9428be4

Please sign in to comment.