mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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)
|
function getContactDisplayName(contact)
|
||||||
{
|
{
|
||||||
if (contact.first_name || contact.last_name) {
|
if (contact.first_name || contact.last_name) {
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
|
|
||||||
{!! Former::select('client')
|
{!! Former::select('client')
|
||||||
->addOption('', '')
|
->addOption('', '')
|
||||||
->data_bind("dropdown: client, dropdownOptions: {highlighter: comboboxHighlighter}")
|
->data_bind("dropdown: client, dropdownOptions: {highlighter: comboboxHighlighter, matcher: comboboxMatcher}")
|
||||||
->addClass('client-input')
|
->addClass('client-input')
|
||||||
->addGroupClass('client_select closer-row') !!}
|
->addGroupClass('client_select closer-row') !!}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user