Show proper operators for new and loaded conditions (before clicking on the menu) in search window
This commit is contained in:
parent
d193afe740
commit
b79937d134
1 changed files with 7 additions and 2 deletions
|
@ -150,8 +150,11 @@
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var operators = new Array('is', 'isNot', 'contains', 'doesNotContain', 'lessThan', 'greaterThan', 'isBefore', 'isAfter');
|
var operators = new Array('is', 'isNot', 'contains', 'doesNotContain', 'lessThan', 'greaterThan', 'isBefore', 'isAfter');
|
||||||
var operatorsList = this.id('operatorsmenu');
|
var operatorsList = this.id('operatorsmenu');
|
||||||
for(i in operators)
|
|
||||||
|
for(var i in operators)
|
||||||
|
{
|
||||||
operatorsList.appendItem(Scholar.getString('searchOperator.'+operators[i]),operators[i]);
|
operatorsList.appendItem(Scholar.getString('searchOperator.'+operators[i]),operators[i]);
|
||||||
|
}
|
||||||
|
|
||||||
var conditionsList = this.id('conditionsmenu');
|
var conditionsList = this.id('conditionsmenu');
|
||||||
var conditions = Scholar.SearchConditions.getStandardConditions();
|
var conditions = Scholar.SearchConditions.getStandardConditions();
|
||||||
|
@ -172,7 +175,7 @@
|
||||||
var selectThis;
|
var selectThis;
|
||||||
for(var i = 0, len = operatorsList.firstChild.childNodes.length; i < len; i++)
|
for(var i = 0, len = operatorsList.firstChild.childNodes.length; i < len; i++)
|
||||||
{
|
{
|
||||||
var hidden = !operators[operatorsList.firstChild.childNodes[i].value];
|
var hidden = !operators[operatorsList.firstChild.childNodes[i].getAttribute('value')];
|
||||||
operatorsList.firstChild.childNodes[i].setAttribute('hidden', hidden);
|
operatorsList.firstChild.childNodes[i].setAttribute('hidden', hidden);
|
||||||
if(selectThis == null && !hidden)
|
if(selectThis == null && !hidden)
|
||||||
selectThis = i;
|
selectThis = i;
|
||||||
|
@ -203,6 +206,8 @@
|
||||||
|
|
||||||
this.dontupdate = false;
|
this.dontupdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.onConditionSelected();
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
Loading…
Reference in a new issue