mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Prevent matching HTML line breaks
This commit is contained in:
parent
f696c97e06
commit
aecc1bee3e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -454,6 +454,14 @@ function comboboxHighlighter(item) {
|
||||
})
|
||||
}
|
||||
|
||||
function comboboxMatcher(item) {
|
||||
// http://stackoverflow.com/a/5002618/497368
|
||||
var div = document.createElement("div");
|
||||
div.innerHTML = item;
|
||||
var text = div.textContent || div.innerText || '';
|
||||
return ~text.toLowerCase().indexOf(this.query.toLowerCase());
|
||||
}
|
||||
|
||||
function getContactDisplayName(contact)
|
||||
{
|
||||
if (contact.first_name || contact.last_name) {
|
||||
|
@ -103,7 +103,7 @@
|
||||
|
||||
{!! Former::select('client')
|
||||
->addOption('', '')
|
||||
->data_bind("dropdown: client, dropdownOptions: {highlighter: comboboxHighlighter}")
|
||||
->data_bind("dropdown: client, dropdownOptions: {highlighter: comboboxHighlighter, matcher: comboboxMatcher}")
|
||||
->addClass('client-input')
|
||||
->addGroupClass('client_select closer-row') !!}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user