webstaff: Close other context menus before showing this one
authorMike Rylander <mrylander@gmail.com>
Fri, 20 Mar 2015 22:14:11 +0000 (18:14 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 19 Aug 2015 17:39:13 +0000 (13:39 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js

index fd51af7..6521189 100644 (file)
@@ -65,6 +65,7 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                 $scope.showContext = function (event) {
                     if ($scope.context_menu_element) {
                         console.log('Reshowing context menu...');
+                        $('body').trigger('click');
                         $($scope.context_menu_element).css({ display: 'block', top: event.pageY, left: event.pageX });
                         $('body').on('click.context_menu',function() {
                             $($scope.context_menu_element).css('display','none');
@@ -75,6 +76,7 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
 
                     if (angular.isArray($scope.item_container)) { // we have a list of values or transforms
                         console.log('Showing context menu...');
+                        $('body').trigger('click');
 
                         var tmpl = 
                             '<ul class="dropdown-menu" role="menu">'+