2021-04-29 10:43:51 +02:00
|
|
|
/// <reference path="../../front/src/iframe_api.ts" />
|
2021-03-25 17:12:53 +01:00
|
|
|
var zoneName = "popUpGoToPageZone";
|
|
|
|
var urlPricing = "https://workadventu.re/pricing";
|
|
|
|
var urlGettingStarted = "https://workadventu.re/getting-started";
|
2021-04-29 10:43:51 +02:00
|
|
|
var urlRelativeMap = "script_api.json";
|
|
|
|
var isCoWebSiteOpened = false;
|
2021-03-25 17:12:53 +01:00
|
|
|
|
|
|
|
WA.onChatMessage((message => {
|
2021-04-29 10:43:51 +02:00
|
|
|
WA.sendChatMessage('Poly Parrot says: "' + message + '"', 'Poly Parrot');
|
2021-03-25 17:12:53 +01:00
|
|
|
}));
|
|
|
|
|
|
|
|
WA.onEnterZone(zoneName, () => {
|
2021-04-29 10:43:51 +02:00
|
|
|
WA.openPopup("popUp", "Open Links", [
|
2021-03-25 17:12:53 +01:00
|
|
|
{
|
|
|
|
label: "Open Tab",
|
|
|
|
className: "popUpElement",
|
|
|
|
callback: (popup => {
|
|
|
|
WA.openTab(urlPricing);
|
|
|
|
popup.close();
|
|
|
|
})
|
|
|
|
},
|
|
|
|
{
|
2021-04-29 10:43:51 +02:00
|
|
|
label: "Go To Page", className: "popUpElement",
|
|
|
|
callback: (popup => {
|
2021-03-25 17:12:53 +01:00
|
|
|
WA.goToPage(urlPricing);
|
|
|
|
popup.close();
|
|
|
|
})
|
|
|
|
|
2021-04-29 10:43:51 +02:00
|
|
|
},
|
2021-03-25 17:12:53 +01:00
|
|
|
{
|
2021-04-29 10:43:51 +02:00
|
|
|
label: "openCoWebSite", className: "popUpElement",
|
|
|
|
callback: (popup => {
|
2021-03-25 17:12:53 +01:00
|
|
|
WA.openCoWebSite(urlPricing);
|
|
|
|
isCoWebSiteOpened = true;
|
|
|
|
popup.close();
|
|
|
|
})
|
|
|
|
|
2021-04-29 10:43:51 +02:00
|
|
|
}, {
|
|
|
|
label: "load grouped map",
|
|
|
|
className: "popUpElement",
|
|
|
|
callback: (popup => {
|
2021-06-16 17:34:00 +02:00
|
|
|
WA.goToRoom(urlRelativeMap);
|
2021-04-29 10:43:51 +02:00
|
|
|
popup.close();
|
|
|
|
})
|
|
|
|
|
2021-03-25 17:12:53 +01:00
|
|
|
}]);
|
|
|
|
})
|
|
|
|
|
|
|
|
WA.onLeaveZone(zoneName, () => {
|
2021-04-29 10:43:51 +02:00
|
|
|
if(isCoWebSiteOpened) {
|
2021-03-25 17:12:53 +01:00
|
|
|
WA.closeCoWebSite();
|
|
|
|
isCoWebSiteOpened = false;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
WA.onLeaveZone('popupZone', () => {
|
|
|
|
|
|
|
|
})
|