Prevent authority context menu from being displayed on empty content (LP 712538)
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Feb 2011 03:43:08 +0000 (03:43 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Feb 2011 03:43:08 +0000 (03:43 +0000)
It's confusing to have the authority context menu - particularly the
"Create authority" options - appear for empty content. Check to ensure
that the subfield being clicked on actually has some content before
displaying the authority context menu.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19398 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/marcedit.js

index 6937f94..ed7c4af 100644 (file)
@@ -1928,7 +1928,9 @@ function getAuthorityContextMenu (target, sf) {
         return false;
     }
 
-    browseAuthority( sf_popup, menu_id, target, sf, 20, page);
+    if (sf.toString()) {
+        browseAuthority(sf_popup, menu_id, target, sf, 20, page);
+    }
 
     return true;
 }