Revision 5065
Added by ben leinfelder about 15 years ago
lib/style/skins/first/search.js | ||
---|---|---|
63 | 63 |
documentObjects[0] = documentObject; |
64 | 64 |
} |
65 | 65 |
} |
66 |
|
|
67 |
var query = generateQuery(documentObjects, metadataObjs); |
|
68 | 66 |
|
67 |
var itemMetadataCount = submitFormObj.metadataCount.value; |
|
68 |
|
|
69 |
var query = generateQuery(documentObjects, metadataObjs, itemMetadataCount); |
|
70 |
|
|
69 | 71 |
submitFormObj.dataquery.value = query; |
70 | 72 |
|
71 | 73 |
return true; |
... | ... | |
206 | 208 |
* @param metadataObjs is an Array of Objects with "name" and "value" properties (both String) |
207 | 209 |
* @return generated query string |
208 | 210 |
*****************************************************************************/ |
209 |
function generateQuery(docObjs, metadataObjs) { |
|
211 |
function generateQuery(docObjs, metadataObjs, itemMetadataCount) {
|
|
210 | 212 |
//alert("calling method"); |
211 | 213 |
|
212 | 214 |
//make parameters at some point |
213 | 215 |
var includeDemographicData = false; |
214 | 216 |
var questionMetadataCount = 2; |
217 |
if (itemMetadataCount) { |
|
218 |
questionMetadataCount = itemMetadataCount; |
|
219 |
} |
|
215 | 220 |
var questionChoiceCount = 5; |
216 | 221 |
|
217 | 222 |
//construct the assessment metadata attribute selection snippet |
lib/style/skins/first/first-assessment-resultset.xsl | ||
---|---|---|
150 | 150 |
if (document.getElementById("ajaxCartResults")) { |
151 | 151 |
new Effect.Appear("download"); |
152 | 152 |
new Effect.Appear("transposeDiv"); |
153 |
new Effect.Appear("metadataCountDiv"); |
|
153 | 154 |
} |
154 | 155 |
} |
155 | 156 |
isInCart = function(docid) { |
... | ... | |
266 | 267 |
</input> |
267 | 268 |
<input type="hidden" name="action" value="read" /> |
268 | 269 |
<input type="hidden" name="dataquery" /> |
270 |
<div id="metadataCountDiv" style="display:none;"> |
|
271 |
<select name="metadataCount" id="metadataCount" width="2" > |
|
272 |
<option>2</option> |
|
273 |
<option>4</option> |
|
274 |
<option>6</option> |
|
275 |
<option>8</option> |
|
276 |
<option>10</option> |
|
277 |
</select> |
|
278 |
item metadata fields included |
|
279 |
</div> |
|
269 | 280 |
<div id="transposeDiv" style="display:none;"> |
270 | 281 |
<input type="checkbox" name="transpose" value="true" />Transpose Data |
271 |
</div>
|
|
282 |
</div> |
|
272 | 283 |
<input type="hidden" name="observation" value="3" /> |
273 | 284 |
<input type="hidden" name="pivot" value="2" /> |
274 | 285 |
<input type="hidden" name="operation" /> |
Also available in: Unified diff
include input selection for the number of metadata fields to download
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4414