Work on scan.
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 12 Jan 1996 13:08:28 +0000 (13:08 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 12 Jan 1996 13:08:28 +0000 (13:08 +0000)
www/query.egw
www/search.egw
www/z39util.tcl

index cad8e7a..a8db8ff 100644 (file)
@@ -4,7 +4,7 @@
 </head>
 <body>
 {
-# $Id: query.egw,v 1.27 1996/01/12 10:03:17 adam Exp $
+# $Id: query.egw,v 1.28 1996/01/12 13:08:28 adam Exp $
 
     if {[info commands saveState] == ""} {
         source z39util.tcl
@@ -156,13 +156,13 @@ proc ok-response {} {
         if {[string length $template] > 0} {
             html { value="} $template {"}
         }
-        html { size=35> }
-        if {[lsearch [z39 options] scan] >= 0} {
-            html {<input type="checkbox" name="scan} $no {" value="1" scan>}
+        html { size=45> }
+        if {0 && [lsearch [z39 options] scan] >= 0} {
+                html {<input type="checkbox" name="scan} $no {" value="1" scan>}
         }
         html "<br>\n"
         if {$no < 3} {
-            html {<select name="logic} $no {">} \n
+            html {<center><select name="logic} $no {">} \n
             set template {}
             if {$oSetNo > 0} {
                 set template [join $hist($oSetNo,form,logic$no) " "]
@@ -174,7 +174,7 @@ proc ok-response {} {
                 if {$template == $op} continue
                 html "<option> " [join $op " "] \n
             }
-            html "</select>\n"
+            html "</select></center>\n"
         }
         html "<br>\n"
     }
@@ -200,6 +200,10 @@ proc ok-response {} {
     button-europagate
 
     button-new-target 1
+
+    if {[lsearch [z39 options] scan] >= 0} {
+        button-scan-window 1 $setNo
+    }
     button-view-history 0 
 }
 
index ede4eed..670facd 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: search.egw,v 1.27 1996/01/12 10:03:19 adam Exp $
+# $Id: search.egw,v 1.28 1996/01/12 13:08:30 adam Exp $
 
 proc start-scan {scanNo cache dir initSet} {
     global sessionId
@@ -235,7 +235,7 @@ proc buttons {setNo setMax startPos after} {
             set termPlusAttr [build-scan $hist($setNo,host) $i]
             set hist($setNo,$scanNo,scanTerm) [lindex $termPlusAttr 0]
             set hist($setNo,scanAttr) [lindex $termPlusAttr 1]
-            start-scan $scanNo 0 {} $setNo
+            start-scan $scanNo 0 {} {}
             html "</body></html>\n"
             wabort
             return
@@ -250,6 +250,13 @@ proc buttons {setNo setMax startPos after} {
         }
         set hist($setNo,query) $query
     } else {
+        if {[lindex $sessionParms 1] == "scan"} {
+            set scanNo 1000
+            set hist($setNo,$scanNo,scanTerm) {}
+            start-scan $scanNo 0 {} {}
+            html "</body></html>\n"
+            wabort
+        }
         if {![info exists hist($setNo,scan)]} return
         if {$hist($setNo,scan) > 0} {
             set scanNo [lindex $sessionParms 1]
index a7d06d4..737ca46 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: z39util.tcl,v 1.20 1996/01/12 10:05:42 adam Exp $
+# $Id: z39util.tcl,v 1.21 1996/01/12 13:08:30 adam Exp $
 #
 proc saveState {} {
     uplevel #0 {
@@ -513,7 +513,7 @@ proc z39scan {setNo scanNo tno scanLines scanPos cache} {
     set sessionWait 0
     $zs scan "${scanAttr} ${scanTerm}"
 
-    if {[catch {zwait sessionWait 600}]} {
+    if {[catch {zwait sessionWait 60}]} {
         wlog debug "timeout/cancel in scan"
         displayError "Timeout in scan" {}
         html "</body></html>\n"
@@ -1011,6 +1011,27 @@ proc button-new-query {more setNo} {
     }
 }
 
+proc button-scan-window {more setNo} {
+    global useIcons
+    global env
+    global sessionId
+    global hist
+
+    html {<a href="http:} $env(SCRIPT_NAME)
+    html / $sessionId {/search.egw/} $setNo + {scan} {">}
+    if {$useIcons} {
+        html {<img src="/egwgif/button-scan-window.gif" }
+       html {alt="Scan" border=0></a>}
+    } else {
+        html {Scan</a>}
+        if {$more} {
+            html " | \n"
+        } else {
+            html "\n"
+        }
+    }
+}
+
 proc maintenance {} {
     html {<hr>This page is maintained by }
     html {<a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.}