BZ5719: unimarc plugin fixes
authorPaul Poulain <paul.poulain@biblibre.com>
Wed, 29 Jun 2011 20:54:30 +0000 (22:54 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 1 Aug 2011 00:23:55 +0000 (12:23 +1200)
* 010 now don't care of - or no - in the isbn
* 225a window now higher to have all buttons displayed

Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
cataloguing/value_builder/unimarc_field_010.pl
cataloguing/value_builder/unimarc_field_225a.pl

index 19dbb9f..bf06775 100755 (executable)
@@ -91,7 +91,7 @@ sub plugin {
 
     my $dbh = C4::Context->dbh;
     my $len = 0;
-    my $sth = $dbh->prepare('SELECT publishercode FROM biblioitems WHERE isbn LIKE ? OR isbn LIKE ? LIMIT 1');
+    my $sth = $dbh->prepare('SELECT publishercode FROM biblioitems WHERE REPLACE(isbn, "-", "") LIKE ? OR isbn LIKE ? LIMIT 1');
     
     $isbn =~ s/-//g;
     if (length ($isbn) == 13){
index acd02e1..daba32e 100755 (executable)
@@ -94,7 +94,7 @@ sub plugin_javascript {
             }
                     
             defaultvalue = document.getElementById(\"$field_number\").value;
-            window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_225a.pl&index=\"+index+\"&result=\"+defaultvalue+\"&editor_found=\"+editor_found,\"unimarc225a\",'width=500,height=200,toolbar=false,scrollbars=no');
+            window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_225a.pl&index=\"+index+\"&result=\"+defaultvalue+\"&editor_found=\"+editor_found,\"unimarc225a\",'width=500,height=400,toolbar=false,scrollbars=no');
     
         }
     </script>