/*************************************************************** * Copyright (C) 2016 punkt.de GmbH * Authors: Christoph Heidenreich * * This script is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ // window.addEventListener("load", function(event) { var StateofHist = "start01" var stateObj = {info: "start01"}; // history.replaceState(stateObj, "neuerChronikEintrag", "https://transfer.hft-stuttgart.de/partizipation/weilimdorf/#/"); history.replaceState(stateObj, "neuerChronikEintrag", "http://localhost:8083/"); console.log("start01") // document.body.style.backgroundColor = "yellow"; // }); function historyInfo(){ console.log(StateofHist) console.log("info01") StateofHist = "info01" var stateObj = {info: StateofHist}; // history.pushState(stateObj, "neuerChronikEintrag", "https://transfer.hft-stuttgart.de/partizipation/weilimdorf/#/"); history.pushState(stateObj, "neuerChronikEintrag", "http://localhost:8083/"); } function historyProjekt(){ console.log("project01") console.log(StateofHist) StateofHist = "project01" var stateObj = {info: StateofHist}; // history.pushState(stateObj, "neuerChronikEintrag", "https://transfer.hft-stuttgart.de/partizipation/weilimdorf/#/"); history.pushState(stateObj, "neuerChronikEintrag", "http://localhost:8083/"); } function historyToolbox(){ console.log("toolbox01") console.log(StateofHist) StateofHist = "toolbox01" var stateObj = {info: StateofHist}; // history.pushState(stateObj, "neuerChronikEintrag", "https://transfer.hft-stuttgart.de/partizipation/weilimdorf/#/"); history.pushState(stateObj, "neuerChronikEintrag", "http://localhost:8083/"); } function histStart() { // StateofHist = "intro01" } function histInfo() { // StateofHist = "intro01" } function histProjekt() { // StateofHist = "project01" } function histExpert() { // StateofHist = "toolbox01" } jQuery(document).ready(function() { var $ = jQuery; //-------------------------------------------------------------------------- // handle history.back functionality in event // replace html and set active menu to restore dynamic made changes on page //-------------------------------------------------------------------------- window.addEventListener('popstate', function(event) { console.log(event.state) if (event.state !== null && event.state !== undefined) { // alert(event.state.info) if (event.state.info == "start01"){ activateStoryFrame("1") console.log("start01_a") } else if (event.state.info == "info01"){ activateStoryFrame("2") console.log("info01_a") } else if (event.state.info == "project01"){ activateStoryFrame("3") console.log("project01_a") } else if (event.state.info == "toolbox01") { activateStoryFrame("4") console.log("toolbox01_a") } else { activateStoryFrame("1") } } }); }); function activateStoryFrame(pageN){ if (pageN == "1"){ // window.location.reload(); stopStory(); $("#story-frame").removeClass("tour-inactive"); $("#story-frame").removeClass("tour"); $("#story-frame").addClass("startscreen"); $("#balloon-startscreen").attr('style',"display:'block'!important"); // $("#navi").attr('style',"display:'none'!important"); // // $("#einlPO1").css('display') = 'block' // document.getElementById("einlP01").style.display = "block"; // document.getElementById("einlP02").style.display = "none"; // document.getElementById("tourstart-btn").style.display = "none"; // document.getElementById("iconlist").style.display = "none"; // document.getElementById("detAnleitung").style.display = "none"; // document.getElementById("einlP01").scrollIntoView(); // document.getElementById("back-btn").style.display = "none"; } else if(pageN == "2"){ // var button = document.getElementById("tourstart-btn"); // button.click(); Introshow(); setpositionVAR(false); zoomto('IntroProj'); } else if(pageN == "3"){ // var button = document.getElementById("btn_intro02"); // button.click(); zoomto('ProjektePage'); Projektshow(); } else if(pageN == "4"){ // var button = document.getElementById("btn_expert"); // button.click(); removebuildings(); addcont('main_bock'); addcont('main_heatdem'); addcont('main_nordbstuff'); Expert(); setpositionVAR(false); zoomto('Expertenmodus'); } }