Project

General

Profile

« Previous | Next » 

Revision 2527

Added by sgarg over 19 years ago

Changes to the ESA skin so as to search on particular given fields instead of searching everything

View differences:

header.html
28 28
  <title>ESA Data Registry</title>
29 29
  <link rel="stylesheet" type="text/css" 
30 30
        href="@systemidserver@@style-skins-path@/esa/esa.css"></link>
31
<script language="Javascript">
32
function trim(stringToTrim) {
33
                return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,'');       
34
}
35
function checkSearch(submitFormObj) {
36
        var searchString = trim(submitFormObj.elements["anyfield"].value);
37
        
38
	if (searchString=="") {
39
                searchString="%";
40
        }
41

  
42
	if(searchString != "%"){
43
		submitFormObj.anyfield.value = "";
44
        	submitFormObj.title.value = searchString;
45
        	submitFormObj.surName.value = searchString;
46
        	submitFormObj.givenName.value = searchString;
47
        	submitFormObj.keyword.value = searchString;
48
        	submitFormObj.title.value = searchString;
49
        	submitFormObj.organizationName.value = searchString;
50
        	submitFormObj.operator.value="UNION";
51
        	var abs = document.getElementById("abstract");
52
        	abs.value=searchString;
53
	}
54
       	return true;
55
}
56
</script>
31 57
</head>
32 58

  
33 59
<body>
......
54 80
    <td valign="top" width="20%"> 
55 81
<p class="searchbox">
56 82
Search for Data<br />
57
<form method="POST" action="@servlet-path@" target="_top">
83
<form method="POST" action="@servlet-path@" target="_top" onSubmit="return checkSearch(this)">
58 84
  <input value="INTERSECT" name="operator" type="hidden">   
59 85
  <input size="14" name="anyfield" type="text" value="">
60 86
  <!--<input name="organizationName" value="Ecological Society of America" type="hidden">-->
87
  <input type="hidden" name="organizationName">
88
  <input type="hidden" name="surName">
89
  <input type="hidden" name="givenName">
90
  <input type="hidden" name="keyword">
91
  <input type="hidden" name="title">
92
  <input type="hidden" name="abstract/para" id="abstract">
61 93
  <input name="action" value="query" type="hidden">
62 94
  <input name="qformat" value="esa" type="hidden">
63 95
  <input name="enableediting" value="true" type="hidden">
64
  <input name="operator" value="UNION" type="hidden">
65 96
  <input name="returnfield" value="originator/individualName/surName" type="hidden">
66 97
  <input name="returnfield" value="originator/individualName/givenName" type="hidden">
67 98
  <input name="returnfield" value="creator/individualName/surName" type="hidden">

Also available in: Unified diff