["reporting", "reporting", function() { self.set("active", true); iframeWindow = document.querySelector("#reportingframe"); var storeString = (informant.get("currentStore") != null ? "?storeCode=" + informant.get("currentStore")[[Object.keys(informant.get("currentStore"))[0]]] : ""); var src = (window.location.hostname === 'localhost' ? "https://cs8.salesforce.com/apex/PowerUpRetailDemandPieTest" + storeString : "/apex/PowerUpRetailDemandPieTest" + storeString); //iframeWindow.contentWindow.postMessage("storeCode:" + informant.get("currentStore"), window.location.protocol + "//" + window.location.host); //alert("" + window.location.protocol + "//" + window.location.host); if(informant.get("currentStore") != null){ nameSurface.setContent(informant.get("userName") + " - <a style='color:black;cursor:pointer' onclick=\"informant.navigateTo('login')\">" + informant.get("currentStore")[[Object.keys(informant.get("currentStore"))[0]]] + "</a>"); } document.querySelector("#reportingframe").src = src + "?" + Math.random(); if (!eventAdded) { window.addEventListener("message", function(e) { informant.navigateTo(informant.get("previousRoute")); }, false); eventAdded = true; } informant.set("backButtonRoute", informant.get("previousRoute")); informant.set("backButtonCallback", function() {}); }]
["addtoqueue", "addtoqueue", function() { self.set("active", true); informant.set("backButtonRoute", "tracking"); informant.set("backButtonCallback", function() {}); if (surfaces.newCustomerButton.toggled) surfaces.newCustomerButton.toggle(); if (surfaces.existingCustomerButton.toggled) surfaces.existingCustomerButton.toggle(); surfaces.inputSurface.focus(); }]