--- search/Search.cgi 2002/06/24 17:53:11 1.10 +++ search/Search.cgi 2002/06/25 16:47:58 1.17 @@ -232,25 +232,6 @@ $main::QueryReportMimeType = "application/x-wais-report"; - -# Hash of icon/images names that we use -%main::ImageNames = ( - 'banner', 'banner.gif', - 'collapse', 'collapse.gif', - 'expand', 'expand.gif', - 'inactive-search', 'inactive-search.gif', - 'active-search', 'active-search.gif', - 'inactive-search-history', 'inactive-search-history.gif', - 'active-search-history', 'active-search-history.gif', - 'inactive-saved-searches', 'inactive-saved-searches.gif', - 'active-saved-searches', 'active-saved-searches.gif', - 'inactive-document-folders','inactive-document-folders.gif', - 'active-document-folders', 'active-document-folders.gif', - 'inactive-settings', 'inactive-settings.gif', - 'active-settings', 'active-settings.gif', -); - - # Array of mime type names, we use this to map # mime types to mime type names (which are more readable) %main::MimeTypeNames = ( @@ -411,6 +392,7 @@ print("$JavaScript\n"); } print ''; + print ''; print("\n\n"); @@ -521,47 +503,23 @@ } } - if ( %MenuBar && defined($MenuBar{'GetSearch'}) ) { - print("\"Search\""); - - - } - else { - - print(""); - - + my $DISABLED; - } + $DISABLED = ( %MenuBar && defined($MenuBar{'GetSearch'}) ) ? "DISABLED" : ""; + print(""); if ( defined($main::RemoteUser) ) { - if ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) { - print("\"Search"); - } - else { - print(""); - } + $DISABLED = ( %MenuBar && defined($MenuBar{'ListSearchHistory'}) ) ? "DISABLED" : ""; + print""; - if ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) { - print("\"Saved"); - } - else { - print(""); - } + $DISABLED = ( %MenuBar && defined($MenuBar{'ListSavedSearch'}) ) ? "DISABLED" : ""; + print""; - if ( %MenuBar && defined($MenuBar{'ListFolder'}) ) { - print("\"Doument"); - } - else { - print(""); - } - - if ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) { - print("\"My"); - } - else { - print(""); - } + $DISABLED = ( %MenuBar && defined($MenuBar{'ListFolder'}) ) ? "DISABLED" : ""; + print""; + + $DISABLED = ( %MenuBar && defined($MenuBar{'GetUserSettings'}) ) ? "DISABLED" : ""; + print""; } @@ -1571,6 +1529,8 @@ # nuke accented chars $SearchString =~ tr/ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁčáíóúĄąŽžĘęźČşÁÂĚŞŻżĂăđĐĎËďŇÍÎěŢŮÓÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘¸¨˙Řř/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/; + # convert search string to lower case -> make search case insensitive + $SearchString =~ tr/A-Z/a-z/; # Add the internal search terms @@ -2972,24 +2932,9 @@ # Make sure that we send the header - $Value = ($ENV{'PATH_INFO'} eq "/GetExpandedSearch") ? "Pretraživanje s više kriterija" : "Jednostavno pretraživanje"; - my $JavaScript = ' - '; + $Value = ($ENV{'PATH_INFO'} eq "/GetExpandedSearch") ? "Složeno pretraživanje" : "Jednostavno pretraživanje"; - &vSendHTMLHeader($Value, $JavaScript); + &vSendHTMLHeader($Value, $main::JavaScript_SetChecked); undef(%Value); $Value{'GetSearch'} = "GetSearch"; @@ -3028,11 +2973,11 @@ if ( $ENV{'PATH_INFO'} eq "/GetExpandedSearch" ) { print("\n"); - print(" Kliknite na trokutić da biste suzili formu.\n"); + print(" Jednostavo pretraživanje (kliknite na trokutić)\n"); } else { print("\n"); - print(" Kliknite na trokutić da biste proširili formu.\n"); + print(" Složeno pretraživanje (kliknite na trokutić)\n"); } print("\n"); @@ -3047,7 +2992,7 @@ # Send the standard fields $Value = defined($main::FormData{'Any'}) ? "VALUE='$main::FormData{'Any'}'" : ""; - print(" Pretraži u bilo kojem polju: \n"); + print(" Tražene riječi neka budu u bilo kojem polju: \n"); my $nr_fields = $main::NormalSearchDropdowns; @@ -3060,11 +3005,13 @@ for (my $field=1; $field<= $nr_fields; $field++) { - print(""); + print ""; if ($field == 1 ) { - print ("Pretraži u određenom polju:"); + print ""; + print "Tražene riječi neka budu u odabranom polju:"; + print ""; } - print (""); + print (""); print (" \n"); + print(" \n"); } @@ -3104,13 +3051,8 @@ # Database selection if ( %main::DatabaseDescriptions ) { - print(" Odaberite bazu koju želite pretraživati: - - Označi - sve, - niti jednu. - - + print(" Odaberite bazu koju želite pretraživati: + "); # Parse out the database names and put them into a @@ -4011,7 +3953,7 @@ # Make sure that we send the header - &vSendHTMLHeader("My Settings", undef); + &vSendHTMLHeader("My Settings", $main::JavaScript_SetChecked); undef(%Value); $Value{'GetUserSettings'} = "GetUserSettings"; &vSendMenuBar(%Value); @@ -4049,7 +3991,7 @@ print("

Postavke:

\n"); print("\n"); - print("\n"); + print("\n"); # Send the buttons print("\n"); @@ -4111,14 +4053,14 @@ print("\n"); - print("\n"); @@ -4264,7 +4206,7 @@ $Value{'UserName'} = $main::FormData{'UserName'}; $Value{'EmailAddress'} = $main::FormData{'EmailAddress'}; $Value{'DefaultSearch'} = $main::FormData{'DefaultSearch'}; - $Value{'SelectedDatabases'} = $main::FormData{'SelectedDatabases'}; + $Value{'SelectedDatabases'} = $main::FormData{'Database'}; if ( defined($Value{'SelectedDatabases'}) ) { $Value{'SelectedDatabases'} =~ s/\0/,/g; } @@ -7158,34 +7100,34 @@ } - if ( defined($main::FormData{'GetSearch.x'}) ) { + if ( defined($main::FormData{'GetSearch'}) ) { $ENV{'PATH_INFO'} = "/GetSearch"; - delete($main::FormData{'GetSearch.x'}); - delete($main::FormData{'GetSearch.y'}); + delete($main::FormData{'GetSearch'}); + delete($main::FormData{'GetSearch'}); } - if ( defined($main::FormData{'ListSearchHistory.x'}) ) { + if ( defined($main::FormData{'ListSearchHistory'}) ) { $ENV{'PATH_INFO'} = "/ListSearchHistory"; - delete($main::FormData{'ListSearchHistory.x'}); - delete($main::FormData{'ListSearchHistory.y'}); + delete($main::FormData{'ListSearchHistory'}); + delete($main::FormData{'ListSearchHistory'}); } - if ( defined($main::FormData{'ListSavedSearch.x'}) ) { + if ( defined($main::FormData{'ListSavedSearch'}) ) { $ENV{'PATH_INFO'} = "/ListSavedSearch"; - delete($main::FormData{'ListSavedSearch.x'}); - delete($main::FormData{'ListSavedSearch.y'}); + delete($main::FormData{'ListSavedSearch'}); + delete($main::FormData{'ListSavedSearch'}); } - if ( defined($main::FormData{'ListFolder.x'}) ) { + if ( defined($main::FormData{'ListFolder'}) ) { $ENV{'PATH_INFO'} = "/ListFolder"; - delete($main::FormData{'ListFolder.x'}); - delete($main::FormData{'ListFolder.y'}); + delete($main::FormData{'ListFolder'}); + delete($main::FormData{'ListFolder'}); } - if ( defined($main::FormData{'GetUserSettings.x'}) ) { + if ( defined($main::FormData{'GetUserSettings'}) ) { $ENV{'PATH_INFO'} = "/GetUserSettings"; - delete($main::FormData{'GetUserSettings.x'}); - delete($main::FormData{'GetUserSettings.y'}); + delete($main::FormData{'GetUserSettings'}); + delete($main::FormData{'GetUserSettings'}); } @@ -7443,6 +7385,12 @@ } print("
Odabrane baze:
Označite baze koje uvijek želite pretraživati: \n"); + print("
Označite baze koje uvijek želite pretraživati:
\n"); # Parse out the database names and put them into a # hash table, they should be separated with a '\n' if ( defined($SelectedDatabases) && ($SelectedDatabases ne "") ) { @ItemList = split(",", $SelectedDatabases); } - + &ShowDatabaseCheckBoxes(@ItemList); print("
\n"); + print ""; my @html_database;
+ Označi + sve, + niti jednu. + +