Implementation of openPopup script method (WIP)
This commit is contained in:
parent
ed2ce68f37
commit
1e002f93ed
7 changed files with 184 additions and 36 deletions
|
@ -18,3 +18,26 @@ WA.onLeaveZone('myTrigger', () => {
|
|||
WA.onEnterZone('notExist', () => {
|
||||
WA.sendChatMessage("YOU SHOULD NEVER SEE THIS", 'Poly Parrot');
|
||||
})
|
||||
|
||||
let popupId;
|
||||
|
||||
WA.onEnterZone('popupZone', () => {
|
||||
popupId = WA.openPopup('foobar', 'This is a test message. Hi!', [
|
||||
{
|
||||
label: "Close",
|
||||
className: "normal",
|
||||
closeOnClick: true
|
||||
},
|
||||
{
|
||||
label: "Next",
|
||||
className: "success",
|
||||
callback: () => {
|
||||
console.log('BUTTON CLICKED')
|
||||
}
|
||||
}
|
||||
])
|
||||
})
|
||||
|
||||
/*WA.onLeaveZone('popupZone', () => {
|
||||
WA.sendChatMessage("Thanks!", 'Poly Parrot');
|
||||
})*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue