Skip to content
Snippets Groups Projects
Commit 27b7d19e authored by Jared Hancock's avatar Jared Hancock Committed by Peter Rotich
Browse files

queue: Fix placement of nav-based edit links

parent 1ee76601
Branches
Tags
No related merge requests found
......@@ -151,11 +151,8 @@ class CustomQueue extends SavedSearch {
if (!$this->id)
return;
$path = '';
if ($this->parent) {
$path = rtrim($this->parent->getPath(), '/');
}
return $path . "/{$this->id}/";
$path = $this->parent ? $this->parent->getPath() : '';
return $path . "/{$this->id}";
}
function getFullName() {
......
......@@ -491,6 +491,24 @@ var scp_prep = function() {
}
}
});
/* Custom Queues Dropdown */
$(function() {
// whenever we hover over a menu item that has a submenu
$('.editQ').on('mouseover', function() {
var $menuItem = $(this),
$submenuWrapper = $('.manageQ', $menuItem);
// grab the menu item's position relative to its positioned parent
var menuItemPos = $menuItem.position();
// place the submenu in the correct position relevant to the menu item
$submenuWrapper.css({
top: menuItemPos.top - 41,
left: menuItemPos.left + Math.round($menuItem.outerWidth() * 0)
});
});
});
};
$(document).ready(scp_prep);
......@@ -1292,22 +1310,3 @@ window.relativeAdjust = setInterval(function() {
});
};
})(jQuery);
/*Custom Queues Dropdown*/
$(function() {
// whenever we hover over a menu item that has a submenu
$('.editQ').on('mouseover', function() {
var $menuItem = $(this),
$submenuWrapper = $('.manageQ', $menuItem);
// grab the menu item's position relative to its positioned parent
var menuItemPos = $menuItem.position();
// place the submenu in the correct position relevant to the menu item
$submenuWrapper.css({
top: menuItemPos.top - 41,
left: menuItemPos.left + Math.round($menuItem.outerWidth() * 0)
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment