Advanced search: WIP POC, integration with endpoint.

SVN:b1162[5402]
This commit is contained in:
Guillaume Lajarige
2018-03-09 13:34:04 +00:00
parent 1d96cbeb07
commit 767507d195
6 changed files with 31 additions and 10 deletions

View File

@@ -141,27 +141,31 @@ $(function()
// Fill criteria
this._setTitle();
},
// - Set the title element
_setTitle: function(sTitle)
{
if(sTitle === undefined)
{
// TODO: Make nice label
sTitle = this.options.field.label + ': ' + this._getValuesAsText();
}
this.element.find('.sfc_title').text(sTitle);
},
// Values helpers
// - Convert values to a standard string
_getValuesAsText: function()
{
var aValues = [];
for(var iValueIdx in this.options.values)
{
aValues.push(this.options.values[iValueIdx].value);
aValues.push(this.options.values[iValueIdx].label);
}
return aValues.join(', ');
},
// - Make an OQL expression from the criteria values and operator
_makeOQLExpression: function()
{
var aValues = [];