UI confirm of datapoint renaming
This commit is contained in:
parent
8ef6a2bbfa
commit
96f7b50e4e
3 changed files with 73 additions and 43 deletions
|
|
@ -1,5 +1,6 @@
|
|||
export class UI {
|
||||
constructor() {
|
||||
constructor(datapointData) {
|
||||
this.datapoint = datapointData
|
||||
document.addEventListener('keydown', evt=>this.keyHandler(evt))
|
||||
document.querySelector('input[name="group"]').focus()
|
||||
}
|
||||
|
|
@ -16,4 +17,10 @@ export class UI {
|
|||
break
|
||||
}
|
||||
}
|
||||
check_rename() {
|
||||
let newName = document.querySelector(`input[name="name"]`).value
|
||||
if (newName != this.datapoint.Name)
|
||||
return confirm(`Trigger expressions needs to be manually updated when renaming a datapoint.\nDo you want to rename the datapoint?`)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue