Fix tapi search

This commit is contained in:
Daniel Triendl 2021-11-30 14:34:29 +01:00
parent bbe20d6351
commit 933b445ed6
2 changed files with 10 additions and 7 deletions

View File

@ -9,7 +9,7 @@ console.log('script start')
const search = new Search()
// eslint-disable-next-line no-undef
waitForKeyElements('div.nav-search', (element) => { search.createSearchWindow(element) }, true)
waitForKeyElements('ongoing-call-button', (element) => { search.createSearchWindow(element) }, true)
const callNotification = new CallNotification()
// eslint-disable-next-line no-undef

View File

@ -61,7 +61,7 @@ export class Search {
icon.style.color = 'grey'
searchWrapper.appendChild(icon)
element.appendChild(form)
element.parentElement.insertBefore(form, element)
}
private removeSearchResults () {
@ -170,12 +170,15 @@ export class Search {
}
private dial (number: string) {
var searchInput = document.getElementsByName('searchByNumberInput')
if (searchInput.length > 0) {
(<HTMLInputElement>searchInput[0]).value = number
searchInput[0].focus()
console.log('TAPI Search dialing', number);
var searchInput = document.getElementById('dialpad-input');
(<HTMLInputElement>searchInput).value = number;
(<HTMLInputElement>searchInput).focus;
fireChangeEvents(searchInput);
fireChangeEvents(searchInput[0])
var toaster = document.querySelector('toaster-container');
if (window.getComputedStyle(toaster, null).display == 'none') {
document.getElementById('menuDialer').click();
}
}
}