diff --git a/include/class.queue.php b/include/class.queue.php index 64d2e8d990850b8d6dc4b84267750df2888b2017..69a9363157e3cd84c79112b0f163206071f7d456 100644 --- a/include/class.queue.php +++ b/include/class.queue.php @@ -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() { diff --git a/scp/js/scp.js b/scp/js/scp.js index 0bb8a3dc16143c438729f2f7f4fccbba73551705..3aae1c35d1ea65acbc5372cb7e9c2bcff6d29145 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -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) - }); - }); -});