mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Advanced search: UI/UX WIP.
SVN:b1162[5538]
This commit is contained in:
@@ -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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user