diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index 50529769018667a1c00bbe6bf9f28f93251febc2..ac494f0aa86b80b029fb74319d303e6c6ee89fd4 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -61,7 +61,7 @@ if($ticket->isOverdue()) <?php } ?> <a class="action-button" href="tickets.php?id=<?php echo $ticket->getId(); ?>"><i class="icon-print"></i> Print</a> - <div id="action-dropdown-1" class="action-dropdown"> + <div id="action-dropdown-1" class="action-dropdown anchor-right"> <ul> <?php if($thisstaff->canDeleteTickets()) { ?> <li><a href="tickets.php?id=<?php echo $ticket->getId(); ?>&a=delete">Delete Ticket</a></li> @@ -71,7 +71,7 @@ if($ticket->isOverdue()) <?php } ?> </ul> </div> - <div id="action-dropdown-2" class="action-dropdown"> + <div id="action-dropdown-2" class="action-dropdown anchor-right"> <ul> <?php if($thisstaff->canCloseTickets()) { ?> <li><a href="tickets.php?id=<?php echo $ticket->getId(); ?>&a=close">Close Ticket</a></li> diff --git a/scp/css/action-dropdown.css b/scp/css/action-dropdown.css index 27b36aa9086d10c9eb2637e45e22a9bf36c93b13..87cdc14415071ecc23b3012c9de632eed740a8f7 100644 --- a/scp/css/action-dropdown.css +++ b/scp/css/action-dropdown.css @@ -783,6 +783,17 @@ ul.icons li .icon-large:before { border-bottom: 6px solid #FFF; display: inline-block; } + +.action-dropdown.anchor-right:before { + left: auto; + right: 9px; +} + +.action-dropdown.anchor-right:after { + left: auto; + right: 10px; +} + .action-button { -webkit-border-radius: 3px; -moz-border-radius: 3px; diff --git a/scp/js/jquery.action-dropdown.js b/scp/js/jquery.action-dropdown.js index 02e5ab57d4b88553a6cae0b29737e9c4142bc01f..7a46f4b642db578dc6958a11eae0920cf977b856 100644 --- a/scp/js/jquery.action-dropdown.js +++ b/scp/js/jquery.action-dropdown.js @@ -46,9 +46,10 @@ if(jQuery) (function($) { if( isOpen || trigger.hasClass('dropdown-disabled') ) return; dropdown.css({ - left: trigger.offset().left - 4, - top: trigger.offset().top + trigger.outerHeight() - }).show(); + left: dropdown.hasClass('anchor-right') ? + trigger.offset().left - (dropdown.outerWidth() - trigger.outerWidth() - 4) : trigger.offset().left, + top: trigger.offset().top + trigger.outerHeight() + }).show(); trigger.addClass('dropdown-open'); }