Merge pull request #500 from thecodingmachine/fixCloseCoWebsite
Add new click event to close co website
This commit is contained in:
commit
ad56aafd15
3 changed files with 13 additions and 13 deletions
|
@ -155,7 +155,7 @@ export class MenuScene extends Phaser.Scene {
|
||||||
gameManager.leaveGame(this, LoginSceneName, new LoginScene());
|
gameManager.leaveGame(this, LoginSceneName, new LoginScene());
|
||||||
break;
|
break;
|
||||||
case 'sparkButton':
|
case 'sparkButton':
|
||||||
this.goToSpark();
|
this.gotToCreateMapPage();
|
||||||
break;
|
break;
|
||||||
case 'changeSkinButton':
|
case 'changeSkinButton':
|
||||||
this.closeSideMenu();
|
this.closeSideMenu();
|
||||||
|
@ -195,8 +195,8 @@ export class MenuScene extends Phaser.Scene {
|
||||||
this.closeGameQualityMenu();
|
this.closeGameQualityMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
private goToSpark() {
|
private gotToCreateMapPage() {
|
||||||
const sparkHost = 'https://'+window.location.host.replace('play.', 'admin.')+'/register';
|
const sparkHost = 'https://'+window.location.host.replace('play.', '')+'/choose-map.html';
|
||||||
window.open(sparkHost, '_blank');
|
window.open(sparkHost, '_blank');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,11 @@ class CoWebsiteManager {
|
||||||
this.cowebsiteDiv.innerHTML = `<button class="close-btn" id="cowebsite-close">
|
this.cowebsiteDiv.innerHTML = `<button class="close-btn" id="cowebsite-close">
|
||||||
<img src="resources/logos/close.svg">
|
<img src="resources/logos/close.svg">
|
||||||
</button>`;
|
</button>`;
|
||||||
|
setTimeout(() => {
|
||||||
|
HtmlUtils.getElementByIdOrFail('cowebsite-close').addEventListener('click', () => {
|
||||||
|
this.closeCoWebsite();
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
|
|
||||||
const iframe = document.createElement('iframe');
|
const iframe = document.createElement('iframe');
|
||||||
iframe.id = 'cowebsite-iframe';
|
iframe.id = 'cowebsite-iframe';
|
||||||
|
|
15
website/dist/index.html
vendored
15
website/dist/index.html
vendored
|
@ -61,11 +61,6 @@
|
||||||
function startGame() {
|
function startGame() {
|
||||||
let playUrl = window.location.protocol + "//play."+window.location.host+'/_/global/npeguin.github.io/office-map/map.json';
|
let playUrl = window.location.protocol + "//play."+window.location.host+'/_/global/npeguin.github.io/office-map/map.json';
|
||||||
window.open(playUrl, '_blank');
|
window.open(playUrl, '_blank');
|
||||||
}
|
|
||||||
function startConsole() {
|
|
||||||
//let playUrl = window.location.protocol + "//admin."+window.location.host;
|
|
||||||
let playUrl = 'https://admin.workadventu.re';
|
|
||||||
window.open(playUrl, '_blank');
|
|
||||||
}
|
}
|
||||||
function shareFB() {
|
function shareFB() {
|
||||||
window.open('https://www.facebook.com/sharer/sharer.php?u=https://workadventu.re/', '_blank', 'width=500,height=500');
|
window.open('https://www.facebook.com/sharer/sharer.php?u=https://workadventu.re/', '_blank', 'width=500,height=500');
|
||||||
|
@ -118,27 +113,27 @@
|
||||||
Stay connected with your clients by providing a dedicated digital place to organize meetings, workshops.
|
Stay connected with your clients by providing a dedicated digital place to organize meetings, workshops.
|
||||||
</h3>
|
</h3>
|
||||||
<h3>
|
<h3>
|
||||||
Stay connected with your future collaborators by organizing online event.
|
Engage with your future collaborators by organizing online events.
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="row buttons-row justify-content-md-center pt-5"
|
<div class="row buttons-row justify-content-md-center pt-5"
|
||||||
style="min-height: 80px;">
|
style="min-height: 80px;">
|
||||||
<div class="col col-lg-3">
|
<div class="col col-lg-3">
|
||||||
<a class="custom-link start"
|
<a class="custom-link start"
|
||||||
target="_BLANK" onclick="startConsole()" title="YOUR ADVENTURE!">
|
href="/choose-map.html">
|
||||||
CREATE YOUR MAP
|
CREATE YOUR MAP
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-lg-3">
|
<div class="col col-lg-3">
|
||||||
<a class="custom-link play" target="_BLANK" onclick="startDemo()" title="DEMO!">
|
<a class="custom-link play" onclick="startDemo()">
|
||||||
TUTORIAL
|
TUTORIAL
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="min-height: 100px" class="row buttons-row justify-content-md-center pt-5">
|
<div style="min-height: 100px" class="row buttons-row justify-content-md-center pt-5">
|
||||||
<div class="col col-lg-3">
|
<div class="col col-lg-3">
|
||||||
<a class="custom-link anonymous contribute" target="_BLANK" onclick="startGame()" title="FEEDBACK">
|
<a class="custom-link contribute" onclick="startGame()">
|
||||||
DEMO (Anonymous)
|
DEMO
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue