From: Adam Dickmeiss Date: Fri, 12 Jan 1996 10:03:16 +0000 (+0000) Subject: Work on scan window. X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=fff045d159e76bb8bb856fd7d2e6d34c1498d5a5;p=egate.git Work on scan window. --- diff --git a/www/history.egw b/www/history.egw index a0cd7f2..a099c3b 100644 --- a/www/history.egw +++ b/www/history.egw @@ -4,7 +4,7 @@ { -# $Id: history.egw,v 1.2 1996/01/09 16:16:47 adam Exp $ +# $Id: history.egw,v 1.3 1996/01/12 10:03:16 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -37,13 +37,6 @@ html $e {: } $env($e) {
} \n } html "form: " [wform] "
\n" - html "target: " $host "
\n" - html "databases: " $databases "
\n" - html "setNo: " $setNo "
\n" - html "nextSetNo: " $nextSetNo "
\n" - html "initSet: " $initSet "
\n" - html "scanLine: " $scanLine "
\n" - html "scanTerm: " $scanTerm "
\n" } diff --git a/www/query.egw b/www/query.egw index a5b874e..cad8e7a 100644 --- a/www/query.egw +++ b/www/query.egw @@ -4,7 +4,7 @@ { -# $Id: query.egw,v 1.26 1996/01/08 08:42:15 adam Exp $ +# $Id: query.egw,v 1.27 1996/01/12 10:03:17 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -97,13 +97,6 @@ proc ok-response {} { } set databases [lindex $targets($host) 1] -# if {[catch {set prevHost $hist([expr $setNo - 1],host)}]} { -# set databaseDefault [lindex $databases 0] -# set oSetNo 0 -# } else { -# set oSetNo [expr $setNo - 1] -# set databaseDefault $hist($oSetNo,database) -# } if {$initSet == ""} { set databaseDefault [lindex $databases 0] set oSetNo 0 @@ -140,36 +133,45 @@ proc ok-response {} { set fields [lindex $targets($host) 2] for {set no 1} {$no < 4} {incr no} { html {\n" html { 0} { + html { value="} $template {"} } html { size=35> } if {[lsearch [z39 options] scan] >= 0} { html {} } + html "
\n" if {$no < 3} { html {\n" diff --git a/www/search.egw b/www/search.egw index 45589ac..ede4eed 100644 --- a/www/search.egw +++ b/www/search.egw @@ -1,8 +1,8 @@ { -# $Id: search.egw,v 1.26 1996/01/09 16:16:48 adam Exp $ +# $Id: search.egw,v 1.27 1996/01/12 10:03:19 adam Exp $ -proc start-scan {scanNo cache dir} { +proc start-scan {scanNo cache dir initSet} { global sessionId global sessionParms global sessionWait @@ -18,10 +18,62 @@ proc start-scan {scanNo cache dir} { html " WWW/Z39.50 Gateway Scan " $host " \n" html "\n" - + + set databases [lindex $targets($host) 1] + + if {$initSet == ""} { + set databaseDefault [lindex $databases 0] + set oSetNo 0 + } else { + set oSetNo $initSet + set databaseDefault $hist($oSetNo,database) + } + + html {
} \n + set nodb [llength $databases] + if {$nodb > 1} { + if {$nodb > 2} { + html "Databases:
\n" + } + set i 0 + foreach d $databases { + html { } $d \n + } else { + html {" checked> } $d \n + } + } + html "
\n" + if {$nodb > 2} { + html { All
} \n + } + html "Input your search criteria:
\n" + } + set fields [lindex $targets($host) 2] + set no 1 + html {\n" + html { } + html {} + html "\n" + html {
} if {$hist($setNo,$scanNo,scanTerm) == ""} { - displayError "Empty query" \ - "You must specify at least one search word" wabort return } @@ -38,27 +90,6 @@ proc start-scan {scanNo cache dir} { if {[z39scan $setNo $scanNo 0 $lines $pos $cache] != "1"} { return } - button-europagate - - html {} - if {$useIcons} { - html {} - } else { - html {Previous Terms | } - } - - html {} - if {$useIcons} { - html {} - } else { - html {Next Terms | } - } - html {} - button-new-query 0 $setNo html "

\n" display-scan $setNo $scanNo 0 @@ -189,19 +220,26 @@ proc buttons {setNo setMax startPos after} { if {$hist($setNo,maxPresent) == ""} { set hist($setNo,maxPresent) 30 } - for {set i 1} {$i <= 3} {incr i} { - if {[wform scan$i] != ""} { - set scanNo 1000 - set hist($setNo,scan) $i - 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 {} - html "\n" - wabort - return + set i [lindex $sessionParms 1] + if {$i == ""} { + for {set j 1} {$j <= 3} {incr j} { + if {[wform scan$j] != ""} { + set i $j + break + } } } + if {$i != ""} { + set scanNo 1000 + set hist($setNo,scan) $i + 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 + html "\n" + wabort + return + } set query [build-query $hist($setNo,host) 3] if {"x$query" == "x"} { html " WWW/Z39.50 Gateway Search\n\n" @@ -219,7 +257,7 @@ proc buttons {setNo setMax startPos after} { if {$scanNo == ""} { set scanNo 1000 } - start-scan $scanNo 1 $dir + start-scan $scanNo 1 $dir $setNo html "\n" wabort } diff --git a/www/targets.egw b/www/targets.egw index f1cf267..2bd313b 100644 --- a/www/targets.egw +++ b/www/targets.egw @@ -1,6 +1,6 @@ { -# $Id: targets.egw,v 1.14 1996/01/09 16:16:49 adam Exp $ +# $Id: targets.egw,v 1.15 1996/01/12 10:03:20 adam Exp $ source ztargets.conf if {[info commands saveState] == ""} { source z39util.tcl @@ -38,7 +38,7 @@ foreach t $tn { if {[string index $t 0] == "."} continue html {

} [lindex $targets($t) 0] " \n" + html "$sessionId/query.egw;/$t" {"> } [lindex $targets($t) 0] " \n" set desc [lindex $targets($t) 4] if {$desc != ""} { html "
$desc\n" diff --git a/www/z39util.tcl b/www/z39util.tcl index e2dca2f..a7d06d4 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.19 1996/01/09 16:16:49 adam Exp $ +# $Id: z39util.tcl,v 1.20 1996/01/12 10:05:42 adam Exp $ # proc saveState {} { uplevel #0 { @@ -384,7 +384,8 @@ proc build-scan {t i} { set term [wform entry$i] if {$term != ""} { - set field [wform menu$i] + set field [join [wform menu$i]] + set attr {Title} foreach x [lindex $targets($t) 2] { if {[lindex $x 0] == $field} { set attr [lindex $x 1] @@ -401,9 +402,9 @@ proc build-query {t ilines} { set op {} set q {} for {set i 1} {$i <= $ilines} {incr i} { - set term [wform entry$i] + set term [join [wform entry$i]] if {[string length $term] > 0} { - set field [wform menu$i] + set field [join [wform menu$i]] foreach x [lindex $targets($t) 2] { if {[lindex $x 0] == $field} { set attr [lindex $x 1] @@ -971,9 +972,11 @@ proc button-view-history {more} { global useIcons global env global sessionId + global nextSetNo html {View History}