Revision 4305
Added by ben leinfelder over 16 years ago
lib/style/skins/first/index.jsp | ||
---|---|---|
50 | 50 |
|
51 | 51 |
function checkSearch(submitFormObj) { |
52 | 52 |
var searchString = trim(submitFormObj.searchstring.value); |
53 |
var searchAssessmentsCheckBox = document.getElementById("searchAssessments"); |
|
54 |
var searchQuestionsCheckBox = document.getElementById("searchQuestions"); |
|
55 |
|
|
56 |
//check the doctype checkboxes for at least one |
|
57 |
if ( !(searchAssessmentsCheckBox.checked || searchQuestionsCheckBox.checked) ) { |
|
58 |
alert("Please select at least one item type for your search"); |
|
59 |
searchAssessmentsCheckBox.focus(); |
|
60 |
return false; |
|
61 |
} |
|
62 | 53 |
|
63 | 54 |
if (searchString=="") { |
64 | 55 |
if (confirm("No search terms were entered.\nContinue with a wildcardsearch?")) { |
... | ... | |
73 | 64 |
var queryString = |
74 | 65 |
generateSearchString( |
75 | 66 |
searchString, |
76 |
searchAssessmentsCheckBox.checked,
|
|
77 |
searchQuestionsCheckBox.checked);
|
|
67 |
true,
|
|
68 |
true);
|
|
78 | 69 |
|
79 | 70 |
//set the form value |
80 | 71 |
submitFormObj.query.value = queryString; |
... | ... | |
87 | 78 |
|
88 | 79 |
function browseAll(){ |
89 | 80 |
var submitFormObj = document.getElementById("searchForm"); |
90 |
var searchAssessmentsCheckBox = document.getElementById("searchAssessments"); |
|
91 |
var searchQuestionsCheckBox = document.getElementById("searchQuestions"); |
|
92 | 81 |
|
93 |
searchAssessmentsCheckBox.checked = true; |
|
94 |
searchQuestionsCheckBox.checked = true; |
|
95 |
|
|
96 | 82 |
if (checkSearch(submitFormObj)) { |
97 | 83 |
submitFormObj.submit(); |
98 | 84 |
} |
... | ... | |
167 | 153 |
onSubmit="return checkSearch(this)" id="searchForm"> |
168 | 154 |
<span class="searchresultsdividerPale"> |
169 | 155 |
<input value="UNION" name="operator" type="hidden"> |
170 |
<input size="14" name="searchstring" type="text" value="" id="searchBox"> |
|
156 |
<input size="14" name="searchstring" type="text" value="" id="searchBox" onkeypress="searchAssessments()">
|
|
171 | 157 |
<input name="query" type="hidden"> |
172 | 158 |
<input name="qformat" value="first" type="hidden"> |
173 | 159 |
<input name="enableediting" value="false" type="hidden"> |
174 |
<input type="hidden" name="action" value="squery"> |
|
160 |
<input type="hidden" name="action" value="squery"> |
|
161 |
<!-- <input type="button" onclick="javascript:searchAssessments()" value="Search"/> --> |
|
175 | 162 |
<input value="Search" type="submit"> |
176 |
<a href="javascript:searchAssessments()"> |
|
177 |
Dynamic Search |
|
178 |
</a> |
|
179 | 163 |
</span> |
180 | 164 |
</form> |
181 |
<form> |
|
182 |
<input name="search" type="checkbox" id="searchAssessments" checked="checked"> |
|
183 |
<label for="searchAssessments">Include Assessments</label> |
|
184 |
<br/> |
|
185 |
<input name="search" type="checkbox" id="searchQuestions"> |
|
186 |
<label for="searchQuestions">Include Questions</label> |
|
187 |
<br /> |
|
188 |
</form> |
|
165 |
|
|
189 | 166 |
<div align="center"> |
190 | 167 |
<p align="left">This tool allows you to search for Assessments and Questions. |
191 | 168 |
By default, the search will be conducted over all Assessment fields. |
Also available in: Unified diff
make as-you-type search the default.
remove assessment vs. question search checkboxes...confusing.