From 6186b14b16a22630e6dbf16d96e599e129f764fa Mon Sep 17 00:00:00 2001 From: Daniel Triendl Date: Mon, 7 Feb 2022 12:47:51 +0100 Subject: [PATCH] If no search results, dialog value entered in search field --- 3CX_TAPI.user.js | 5 ++++- package.json | 2 +- src/search.ts | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/3CX_TAPI.user.js b/3CX_TAPI.user.js index 0c8466e..e9b2b8b 100644 --- a/3CX_TAPI.user.js +++ b/3CX_TAPI.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name 3CX TAPI // @namespace http://cp-solutions.at -// @version 9.0.0 +// @version 9.0.1 // @author Daniel Triendl // @copyright Copyright 2021 CP Solutions GmbH // @source https://source.cp-austria.at/git/CPATRD/3cx_tapi.git @@ -8223,6 +8223,9 @@ class Search { if (items.length > 0) { this.dial(items[0].dataset.tapiNumber); } + else { + this.dial(document.getElementById('tapiSearchInput').value); + } return false; }; var searchBox = document.createElement('div'); diff --git a/package.json b/package.json index 7bca00a..f0c9cce 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "3cx-tapi", "description": "3CX CP Tapi and Projectmanager integration", - "version": "9.0.0", + "version": "9.0.1", "author": { "name": "Daniel Triendl", "email": "d.triendl@cp-solutions.at" diff --git a/src/search.ts b/src/search.ts index 6672155..736d688 100644 --- a/src/search.ts +++ b/src/search.ts @@ -19,6 +19,8 @@ export class Search { } if (items.length > 0) { this.dial((items[0]).dataset.tapiNumber) + } else { + this.dial((document.getElementById('tapiSearchInput')).value) } return false