Skip to content

Commit

Permalink
Fix some undeclared/wrongly declared variables
Browse files Browse the repository at this point in the history
  • Loading branch information
okonomiyaki3000 committed Apr 23, 2018
1 parent 825de09 commit 96ff270
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions administrator/templates/isis/js/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ jQuery(function($)
if ($w.width() > 767)
{
var menuScroll = $('#menu > li > ul'),
emptyMenu = $('#nav-empty');
emptyMenu = $('#nav-empty'),
linkWidth,
menuWidth,
offsetLeft;

$('#menu > li').on('click mouseenter', function() {

Expand All @@ -146,7 +149,8 @@ jQuery(function($)
menuHeight = $dropdownMenu.height(),
menuOuterHeight = $dropdownMenu.outerHeight(true),
scrollMenuWidth = $dropdownMenu.width() + 15,
maxHeight = windowHeight - (linkHeight + statusHeight + (menuOuterHeight - menuHeight) + 20);
maxHeight = windowHeight - (linkHeight + statusHeight + (menuOuterHeight - menuHeight) + 20),
linkPaddingLeft = $(this).children('a').css('padding-left');

if (maxHeight < menuHeight)
{
Expand All @@ -160,10 +164,9 @@ jQuery(function($)
$dropdownMenu.css('max-height', maxHeight);

// Get the submenu position
var linkWidth = $(this).outerWidth(true);
var menuWidth = $dropdownMenu.width();
var linkPaddingLeft = $(this).children('a').css('padding-left');
var offsetLeft = Math.round($(this).offset().left) - parseInt(linkPaddingLeft);
linkWidth = $(this).outerWidth(true);
menuWidth = $dropdownMenu.width();
offsetLeft = Math.round($(this).offset().left) - parseInt(linkPaddingLeft);

emptyMenu.empty().hide();

Expand Down

0 comments on commit 96ff270

Please sign in to comment.