When author link is clicked, all books by that author will be found.
authorJakub Skoczen <jakub@indexdata.dk>
Tue, 17 Apr 2007 12:53:44 +0000 (12:53 +0000)
committerJakub Skoczen <jakub@indexdata.dk>
Tue, 17 Apr 2007 12:53:44 +0000 (12:53 +0000)
etc/settings/defaults.xml
www/masterkey/index.html
www/masterkey/js/client.js

index fba6234..3803a28 100644 (file)
@@ -1,12 +1,14 @@
 <settings target="*">
 
   <!-- This file introduces default settings for pazpar2 -->
-  <!-- $Id: defaults.xml,v 1.4 2007-04-09 03:49:30 quinn Exp $ -->
+  <!-- $Id: defaults.xml,v 1.5 2007-04-17 12:53:44 jakub Exp $ -->
 
   <!-- mapping for unqualified search -->
   <set name="pz:cclmap:term" value="u=1016 t=l,r s=al"/>
 
   <!-- field-specific mappings -->
+  
+  <set name="pz:cclmap:au" value="u=1004 s=al"/>
   <set name="pz:cclmap:ti" value="u=4 s=al"/>
   <set name="pz:cclmap:su" value="u=21 s=al"/>
   <set name="pz:cclmap:isbn" value="u=7"/>
index 92f9b06..c7fcde9 100755 (executable)
@@ -4,7 +4,7 @@
     <title>MasterKey Power Search</title>
     <link rel="author" href="http://www.indexdata.dk" />
     <link href="css/styles.css" rel="stylesheet" type="text/css" media="screen, all" />
-    <script type="text/javascript" src="js/jquery.js"></script>
+    <script type="text/javascript" src="js/jquery.pack.js"></script>
     <script type="text/javascript" src="js/pz2.js"></script>
     <script type="text/javascript" src="js/pzQuery.js"></script>
     <script type="text/javascript" src="js/client.js"></script>
index 8432e63..11b46da 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** $Id: client.js,v 1.18 2007-04-16 20:23:25 quinn Exp $
+** $Id: client.js,v 1.19 2007-04-17 12:53:45 jakub Exp $
 ** MasterKey - pazpar2's javascript client .
 */
 
@@ -101,7 +101,7 @@ function my_onshow(data)
         if( author ) {
             recBody.append('<i> by </i>');
             $('<a name="author" class="recAuthor">'+author+'</a>\n').click(function(){ 
-                            refine(this.name, this.firstChild.nodeValue) }).appendTo(recBody);
+                            refine("authoronly", this.firstChild.nodeValue) }).appendTo(recBody);
         }
 
         if( currentDetailedId == id ) {
@@ -302,6 +302,7 @@ function drawDetailedRec(detailBox)
 function refine(field, value, opt)
 {
     switch(field) {
+        case "authoronly":  curQuery.reset(); curQuery.addTerm('au', value); break;
         case "author":  curQuery.addTerm('au', value); break;
         case "title":   curQuery.addTerm('ti', value); break;
         case "date":    curQuery.addTerm('date', value); break;