Fixing zebra-striping of z3950 search results, YUI-ing z3950 search button, tweaking...
authorOwen Leonard <oleonard@myacpl.org>
Tue, 6 Nov 2007 21:05:17 +0000 (15:05 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 7 Nov 2007 14:21:49 +0000 (08:21 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
cataloguing/z3950_search.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl

index 01952a7..51605c4 100755 (executable)
@@ -207,10 +207,10 @@ else {
                       = ImportBreeding( $marcdata, 2, $serverhost[$k], $encoding[$k], $random, 'z3950' );
                     my %row_data;
                     if ( $i % 2 ) {
-                        $toggle = "#ffffcc";
+                        $toggle = 1;
                     }
                     else {
-                        $toggle = "white";
+                        $toggle = 0;
                     }
                     $row_data{toggle}       = $toggle;
                     $row_data{server}       = $serverhost[$k];
index f036f3f..b794567 100644 (file)
@@ -473,6 +473,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
        // prepare DOM for YUI Toolbar
 
         $(document).ready(function() {
+               $("#z3950searchc").empty();
            yuiToolbar();
         });
 
@@ -480,7 +481,13 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
 
        function yuiToolbar() {
            new YAHOO.widget.Button("addbiblio");
-          // this breaks z3950 search  new YAHOO.widget.Button("z3950search");
+               new YAHOO.widget.Button({
+                                            id: "z3950search", 
+                                            type: "button", 
+                                            label: "z39.50 Search", 
+                                            container: "z3950searchc",
+                                                                                       onclick: {fn:function(){PopupZ3950()}}
+                                        });
        }
 
        //]]>
@@ -488,7 +495,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
 
                <ul class="toolbar">
                        <li><input id="addbiblio" type="submit" value="Save" /></li>
-                       <li><input type="button" id="z3950search" value="z39.50 Search" onclick="PopupZ3950(); return false;" /></li>
+                       <li id="z3950searchc"><input type="button" id="z3950search" value="z39.50 Search" onclick="PopupZ3950(); return false;" /></li>
                        <li id="changeframework"><label for="Frameworks">Change framework: </label><!--TMPL_VAR Name="framework" -->    <input type="hidden" name="op" value="addbiblio" /></li>
                </ul>
 </div>
index 37f3d70..9e8d035 100644 (file)
     }
 //]]>
 </script>
+<style type="text/css">#custom-doc { width:47.23em;*width:46.04em;min-width:610px; margin:auto;margin-top: .4em; text-align:left; }</style>
 </head>
 <body>
 
-    <h2>Search for</h2>
-    <!-- TMPL_IF NAME="title"--><p>Title: <!-- TMPL_VAR NAME="title"--></p><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="author"--><p>Author: <!-- TMPL_VAR NAME="author"--></p><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="isbn"--><p>ISBN: <!-- TMPL_VAR NAME="isbn"--></p><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="issn"--><p>ISSN: <!-- TMPL_VAR NAME="issn"--></p><!-- /TMPL_IF -->
+<div id="custom-doc" class="yui-t7">
+   <div id="bd">
+
+    <h2>Search for:</h2>
+    <!-- TMPL_IF NAME="title"--><p><strong>Title:</strong> <!-- TMPL_VAR NAME="title"--></p><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="author"--><p><strong>Author:</strong> <!-- TMPL_VAR NAME="author"--></p><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="isbn"--><p><strong>ISBN:</strong> <!-- TMPL_VAR NAME="isbn"--></p><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="issn"--><p><strong>ISSN:</strong> <!-- TMPL_VAR NAME="issn"--></p><!-- /TMPL_IF -->
     
 <!-- TMPL_IF name="opsearch" -->
-    <h2>on following servers</h2>
     
     <form method="post" action="z3950_search.pl" name="f">
-    
-    <input type="hidden" name="op" id="op" value="do_search" />
+    <fieldset class="rows"> 
+       <legend>Search these servers:</legend>
+       <input type="hidden" name="op" id="op" value="do_search" />
     <input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
     <input type="hidden" name="author" value="<!-- TMPL_VAR NAME="author" -->" />
     <input type="hidden" name="isbn" value="<!-- TMPL_VAR NAME="isbn" -->" />
     <input type="hidden" name="issn" value="<!-- TMPL_VAR NAME="issn" -->" />
     <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
     <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-    
+    <ol>
     <!-- TMPL_LOOP name="serverloop" -->
-        <p>
-        <label><!-- TMPL_VAR NAME="host" --></label>
+        <li class="radio">
             <!-- TMPL_IF name="checked" -->
-                <input type="checkbox" name="id" value="<!-- TMPL_VAR NAME="id" -->" checked="checked" />
+                <input type="checkbox" name="id" id="<!-- TMPL_VAR NAME="id" -->id" value="<!-- TMPL_VAR NAME="id" -->" checked="checked" />
             <!-- TMPL_ELSE -->
-                <input type="checkbox" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
+                <input type="checkbox" name="id" id="<!-- TMPL_VAR NAME="id" -->id" value="<!-- TMPL_VAR NAME="id" -->" />
             <!-- /TMPL_IF -->
-        </p>
-    <!-- /TMPL_LOOP -->
-    <input type="submit"  class="submit" value="Search internet" onclick="cursor :'wait'" />
+        <label for="<!-- TMPL_VAR NAME="id" -->id"><!-- TMPL_VAR NAME="host" --></label>
+        </li>
+    <!-- /TMPL_LOOP --></ol></fieldset>
+    <fieldset class="action"><input type="submit" class="submit" value="Submit" onclick="cursor :'wait'" /></fieldset>
     </form>
 <!-- TMPL_ELSE -->
     <h2>Results</h2>
         <th>Author</th>
         <th>ISBN</th>
         <th>&nbsp;</th>
-        <th>&nbsp;</th>
     </tr>
     <!-- TMPL_IF name="breeding_loop" -->
     <!-- TMPL_LOOP name="breeding_loop" -->
         <!-- TMPL_IF NAME="breedingid" -->
-        <tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
+               
+        <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
             <td><!-- TMPL_VAR name="server" --></td>
             <td><!-- TMPL_VAR NAME="title" --></td>
             <td><!-- TMPL_VAR NAME="author" --></td>