5 Commits

Author SHA1 Message Date
e563279faf Bump version to 9.0.3 2022-10-03 09:52:08 +02:00
856181f530 Search window wurde nicht immer hinzugefügt 2022-10-03 09:50:41 +02:00
ae0c125a50 Packages aktualisiert 2022-10-03 09:34:36 +02:00
ba5a5c627b Bump version to 9.0.2 2022-03-31 12:21:33 +02:00
3bf1baeca8 Fixed search result style 2022-03-31 12:20:31 +02:00
6 changed files with 8581 additions and 4694 deletions

File diff suppressed because it is too large Load Diff

7977
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{ {
"name": "3cx-tapi", "name": "3cx-tapi",
"description": "3CX CP Tapi and Projectmanager integration", "description": "3CX CP Tapi and Projectmanager integration",
"version": "9.0.1", "version": "9.0.3",
"author": { "author": {
"name": "Daniel Triendl", "name": "Daniel Triendl",
"email": "d.triendl@cp-solutions.at" "email": "d.triendl@cp-solutions.at"
@ -24,34 +24,33 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"axios": "0.21.1", "axios": "0.27.2",
"axios-userscript-adapter": "0.1.4", "axios-userscript-adapter": "0.1.12",
"chrono-node": "^2.3.0" "chrono-node": "^2.4.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "7.14.6", "@babel/core": "7.19.3",
"@babel/preset-env": "7.14.5", "@babel/preset-env": "7.19.3",
"@typescript-eslint/eslint-plugin": "4.27.0", "@typescript-eslint/eslint-plugin": "5.38.1",
"@typescript-eslint/parser": "4.27.0", "@typescript-eslint/parser": "5.38.1",
"babel-loader": "8.2.2", "babel-loader": "8.2.5",
"browserslist": "4.16.6", "browserslist": "4.21.4",
"css-loader": "5.2.6", "css-loader": "6.7.1",
"eslint": "7.29.0", "eslint": "8.24.0",
"eslint-config-standard": "16.0.3", "eslint-config-standard": "17.0.0",
"eslint-plugin-import": "2.23.4", "eslint-plugin-import": "2.26.0",
"eslint-plugin-node": "11.1.0", "eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.1.0", "eslint-plugin-promise": "6.0.1",
"eslint-plugin-standard": "4.1.0", "less": "4.1.3",
"less": "4.1.1", "less-loader": "11.0.0",
"less-loader": "10.0.0", "style-loader": "3.3.1",
"style-loader": "2.0.0", "ts-loader": "9.4.1",
"ts-loader": "9.2.3", "typescript": "4.8.4",
"typescript": "4.3.4", "userscript-metadata-webpack-plugin": "0.1.5",
"userscript-metadata-webpack-plugin": "0.1.0", "webpack": "5.74.0",
"webpack": "5.39.1", "webpack-bundle-analyzer": "4.6.1",
"webpack-bundle-analyzer": "4.4.2", "webpack-cli": "4.10.0",
"webpack-cli": "4.7.2", "webpack-livereload-plugin": "3.0.2",
"webpack-livereload-plugin": "3.0.1",
"webpack-merge": "5.8.0" "webpack-merge": "5.8.0"
} }
} }

View File

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

9
src/search.css Normal file
View File

@ -0,0 +1,9 @@
.tapi-search-result {
color: #000;
padding: 5px;
}
.tapi-search-result:hover, .tapi-search-result-selected {
background-color: #E7E6E6;
}

View File

@ -1,3 +1,4 @@
import './search.css'
import { TapiContact } from './tapi-contact' import { TapiContact } from './tapi-contact'
import { debounce } from './debounce' import { debounce } from './debounce'
import { axios, fireChangeEvents } from './utils' import { axios, fireChangeEvents } from './utils'
@ -137,7 +138,6 @@ export class Search {
contacts.forEach(contact => { contacts.forEach(contact => {
var li = document.createElement('li') var li = document.createElement('li')
li.classList.add('tapi-search-result') li.classList.add('tapi-search-result')
li.classList.add('search-result')
li.classList.add('pointer') li.classList.add('pointer')
li.onmouseover = () => { this.selectResult(li) } li.onmouseover = () => { this.selectResult(li) }
li.dataset.tapiNumber = contact.tD_NUMBER_TAPI li.dataset.tapiNumber = contact.tD_NUMBER_TAPI
@ -163,11 +163,9 @@ export class Search {
private selectResult (resultLi: Element) { private selectResult (resultLi: Element) {
var items = document.getElementsByClassName('tapi-search-result') var items = document.getElementsByClassName('tapi-search-result')
for (var item of items) { for (var item of items) {
item.classList.remove('bg-light')
item.classList.remove('tapi-search-result-selected') item.classList.remove('tapi-search-result-selected')
} }
resultLi.classList.add('bg-light')
resultLi.classList.add('tapi-search-result-selected') resultLi.classList.add('tapi-search-result-selected')
} }