Advanced search: UI/UX WIP.

SVN:b1162[5538]
This commit is contained in:
Guillaume Lajarige
2018-03-26 17:58:06 +00:00
parent 389e8f2de6
commit edcc211988

View File

@@ -68,33 +68,5 @@ $(function()
//------------------
// Inherited methods
//------------------
// DOM element helpers
// TODO: Remove this function after UX tests
_prepareOperators: function()
{
this._super();
if(this.options.ref === 'UserRequest.ref')
{
// Remove starts/ends_with
this.element.find('.sfc_fg_operator[data-operator-code*="with"]').remove();
// Modify contains with a dropdown
this.element.find('.sfc_fg_operator[data-operator-code="contains"] .sfc_op_name')
.html('<select style=" padding: 1px 0px;"><option>Contains</option><option>Starts with</option><option>Ends with</option></select>')
.css('margin-right', '5px');
// Remove click event on dropdown
this.element.find('.sfc_fg_operator[data-operator-code="contains"] .sfc_op_name').on('click', function(oEvent){
oEvent.preventDefault();
oEvent.stopPropagation();
});
this.element.find('.sfc_fg_operator[data-operator-code="contains"] .sfc_op_name select').on('change', function(){
$(this).closest('.sfc_fg_operator').find('.sfc_op_content input:first').trigger('focus');
});
}
},
});
});