Prevent authority context menu on whitespace content
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Feb 2011 03:50:58 +0000 (03:50 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Feb 2011 03:50:58 +0000 (03:50 +0000)
Continuing the refinement of LP 712538, if the subfield contains
only whitespace, treat it as though it were empty for the purposes
of the context menu.

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

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

index 8c7b8dd..da32f11 100644 (file)
@@ -1926,7 +1926,7 @@ function getAuthorityContextMenu (target, sf) {
         return false;
     }
 
-    if (sf.toString()) {
+    if (sf.toString().replace(/\s*/, '')) {
         browseAuthority(sf_popup, menu_id, target, sf, 20, page);
     }