mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 15:52:24 +02:00
Advanced search: WIP POC, UI/UX.
SVN:b1162[5425]
This commit is contained in:
@@ -178,7 +178,6 @@ $(function()
|
||||
// Update widget
|
||||
this.options.operator = oActiveOpElem.find('.sfc_op_radio').val();
|
||||
this.options.values = aValues;
|
||||
// TODO: Update title
|
||||
this._setTitle();
|
||||
|
||||
// Trigger event to handler
|
||||
@@ -339,7 +338,7 @@ $(function()
|
||||
if(sTitle === undefined)
|
||||
{
|
||||
// TODO: Make nice label
|
||||
sTitle = this.options.field.label + ': ' + this._getValuesAsText();
|
||||
sTitle = this.options.field.label + ' ' + this.operators[this.options.operator].label + ' ' + this._getValuesAsText();
|
||||
}
|
||||
this.element.find('.sfc_title').text(sTitle);
|
||||
},
|
||||
@@ -381,9 +380,24 @@ $(function()
|
||||
oOpContentElem.val(this._getValuesAsText());
|
||||
|
||||
// Events
|
||||
// - Focus input on click (radio, label, ...)
|
||||
oOpElem.on('click', ':not(input[type="text"])', function(){
|
||||
oOpContentElem.focus();
|
||||
});
|
||||
// - Apply on "enter" key hit
|
||||
oOpContentElem.on('keyup', function(oEvent){
|
||||
// Check operator's radio if not already
|
||||
if(oOpElem.find('.sfc_op_radio').prop('checked') === false)
|
||||
{
|
||||
oOpElem.find('.sfc_op_radio').prop('checked', true)
|
||||
}
|
||||
|
||||
// Apply if enter key
|
||||
if(oEvent.key === 'Enter')
|
||||
{
|
||||
me._apply();
|
||||
}
|
||||
});
|
||||
|
||||
oOpElem.find('.sfc_op_content').append(oOpContentElem);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user