Revision 5997
Added by ben leinfelder over 13 years ago
lib/style/skins/semtools/search.js | ||
---|---|---|
55 | 55 |
var searchValue = submitFormObj.activeCharacteristicsValue.value; |
56 | 56 |
var dataValue = submitFormObj.dataValue.value; |
57 | 57 |
var dataOperator = submitFormObj.dataOperator.value; |
58 |
if (searchValue!="") {
|
|
58 |
if (searchValue != "") {
|
|
59 | 59 |
submitFormObj.query.value += |
60 | 60 |
"<condition " + |
61 | 61 |
"type='" + searchClass + "' " + |
62 |
"concept='" + searchValue + "' " + |
|
63 |
"operator='" + dataOperator + "'>" + |
|
64 |
dataValue + |
|
65 |
"</condition>"; |
|
62 |
"concept='" + searchValue + "' "; |
|
63 |
if (dataValue != "") { |
|
64 |
submitFormObj.query.value += |
|
65 |
"operator='" + dataOperator + "'>" + |
|
66 |
dataValue + |
|
67 |
"</condition>"; |
|
68 |
} else { |
|
69 |
submitFormObj.query.value += "/>"; |
|
70 |
} |
|
66 | 71 |
} |
67 | 72 |
} else { |
68 | 73 |
for (var i=0; i < submitFormObj.activeCharacteristicsValue.length; i++) { |
... | ... | |
70 | 75 |
var searchValue = submitFormObj.activeCharacteristicsValue[i].value; |
71 | 76 |
var dataValue = submitFormObj.dataValue[i].value; |
72 | 77 |
var dataOperator = submitFormObj.dataOperator[i].value; |
73 |
if (searchValue!="") {
|
|
78 |
if (searchValue != "") {
|
|
74 | 79 |
submitFormObj.query.value += |
75 | 80 |
"<condition " + |
76 | 81 |
"type='" + searchClass + "' " + |
77 |
"concept='" + searchValue + "' " + |
|
78 |
"operator='" + dataOperator + "'>" + |
|
79 |
dataValue + |
|
80 |
"</condition>"; |
|
82 |
"concept='" + searchValue + "' "; |
|
83 |
|
|
84 |
if (dataValue != "") { |
|
85 |
submitFormObj.query.value += |
|
86 |
"operator='" + dataOperator + "'>" + |
|
87 |
dataValue + |
|
88 |
"</condition>"; |
|
89 |
} else { |
|
90 |
submitFormObj.query.value += "/>"; |
|
91 |
} |
|
81 | 92 |
} |
82 | 93 |
} |
83 | 94 |
} |
Also available in: Unified diff
only include data value/operator when present in the form