Revision 5774
Added by ben leinfelder almost 14 years ago
search.js | ||
---|---|---|
27 | 27 |
|
28 | 28 |
// handle specific classes |
29 | 29 |
// Entity |
30 |
//for (var i=0; i < submitFormObj.activeEntities.length; i++) {
|
|
31 |
var searchClass = submitFormObj.activeEntitiesClass.value;
|
|
30 |
if (submitFormObj.activeEntitiesClass.value) {
|
|
31 |
var searchClass = submitFormObj.activeEntitiesClass.value;
|
|
32 | 32 |
var searchValue = submitFormObj.activeEntitiesValue.value; |
33 | 33 |
if (searchValue!="") { |
34 | 34 |
submitFormObj.query.value += |
... | ... | |
38 | 38 |
searchValue + |
39 | 39 |
"</condition>"; |
40 | 40 |
} |
41 |
//} |
|
41 |
} else { |
|
42 |
for (var i=0; i < submitFormObj.activeEntitiesValue.length; i++) { |
|
43 |
var searchClass = submitFormObj.activeEntitiesClass[i].value; |
|
44 |
var searchValue = submitFormObj.activeEntitiesValue[i].value; |
|
45 |
if (searchValue!="") { |
|
46 |
submitFormObj.query.value += |
|
47 |
"<condition " + |
|
48 |
"concept='" + searchClass + "' " + |
|
49 |
"operator='EQUALS'>" + |
|
50 |
searchValue + |
|
51 |
"</condition>"; |
|
52 |
} |
|
53 |
} |
|
54 |
} |
|
42 | 55 |
// Characteristic |
43 |
//for (var i=0; i < submitFormObj.activeCharacteristics.length; i++) {
|
|
44 |
var searchClass = submitFormObj.activeCharacteristicsClass.value;
|
|
56 |
if (submitFormObj.activeCharacteristicsClass.value) {
|
|
57 |
var searchClass = submitFormObj.activeCharacteristicsClass.value;
|
|
45 | 58 |
var searchValue = submitFormObj.activeCharacteristicsValue.value; |
46 | 59 |
if (searchValue!="") { |
47 | 60 |
submitFormObj.query.value += |
... | ... | |
51 | 64 |
searchValue + |
52 | 65 |
"</condition>"; |
53 | 66 |
} |
54 |
//} |
|
67 |
} else { |
|
68 |
for (var i=0; i < submitFormObj.activeCharacteristicsValue.length; i++) { |
|
69 |
var searchClass = submitFormObj.activeCharacteristicsClass[i].value; |
|
70 |
var searchValue = submitFormObj.activeCharacteristicsValue[i].value; |
|
71 |
if (searchValue!="") { |
|
72 |
submitFormObj.query.value += |
|
73 |
"<condition " + |
|
74 |
"concept='" + searchClass + "' " + |
|
75 |
"operator='EQUALS'>" + |
|
76 |
searchValue + |
|
77 |
"</condition>"; |
|
78 |
} |
|
79 |
} |
|
80 |
} |
|
55 | 81 |
// Protocol |
56 |
//for (var i=0; i < submitFormObj.activeProtocols.length; i++) {
|
|
57 |
var searchClass = submitFormObj.activeProtocolsClass.value;
|
|
82 |
if (submitFormObj.activeProtocolsValue.value) {
|
|
83 |
var searchClass = submitFormObj.activeProtocolsValue.value;
|
|
58 | 84 |
var searchValue = submitFormObj.activeProtocolsValue.value; |
59 | 85 |
if (searchValue!="") { |
60 | 86 |
submitFormObj.query.value += |
... | ... | |
64 | 90 |
searchValue + |
65 | 91 |
"</condition>"; |
66 | 92 |
} |
67 |
//} |
|
93 |
} else { |
|
94 |
for (var i=0; i < submitFormObj.activeProtocolsValue.length; i++) { |
|
95 |
var searchClass = submitFormObj.activeProtocolsClass[i].value; |
|
96 |
var searchValue = submitFormObj.activeProtocolsValue[i].value; |
|
97 |
if (searchValue!="") { |
|
98 |
submitFormObj.query.value += |
|
99 |
"<condition " + |
|
100 |
"concept='" + searchClass + "' " + |
|
101 |
"operator='EQUALS'>" + |
|
102 |
searchValue + |
|
103 |
"</condition>"; |
|
104 |
} |
|
105 |
} |
|
106 |
} |
|
68 | 107 |
// Measurement |
69 |
//for (var i=0; i < submitFormObj.activeMeasurements.length; i++) {
|
|
70 |
var searchClass = submitFormObj.activeMeasurementsClass.value;
|
|
108 |
if (submitFormObj.activeMeasurementsValue.value) {
|
|
109 |
var searchClass = submitFormObj.activeMeasurementsValue.value;
|
|
71 | 110 |
var searchValue = submitFormObj.activeMeasurementsValue.value; |
72 | 111 |
if (searchValue!="") { |
73 | 112 |
submitFormObj.query.value += |
... | ... | |
77 | 116 |
searchValue + |
78 | 117 |
"</condition>"; |
79 | 118 |
} |
80 |
//} |
|
81 |
|
|
119 |
} else { |
|
120 |
for (var i=0; i < submitFormObj.activeMeasurementsValue.length; i++) { |
|
121 |
var searchClass = submitFormObj.activeMeasurementsClass[i].value; |
|
122 |
var searchValue = submitFormObj.activeMeasurementsValue[i].value; |
|
123 |
if (searchValue!="") { |
|
124 |
submitFormObj.query.value += |
|
125 |
"<condition " + |
|
126 |
"concept='" + searchClass + "' " + |
|
127 |
"operator='EQUALS'>" + |
|
128 |
searchValue + |
|
129 |
"</condition>"; |
|
130 |
} |
|
131 |
} |
|
132 |
} |
|
82 | 133 |
submitFormObj.query.value += "</" + operator + ">"; |
83 | 134 |
submitFormObj.query.value += "</sq:query>"; |
84 | 135 |
|
Also available in: Unified diff
add/remove ECPM search criteria that have been defined using the tree browser - incrementally refines the search