Commit 1ef70c95 authored by Steve Johnson's avatar Steve Johnson

fixed login redirects, fixed iOS chromecast, change navigation to app first...

fixed login redirects, fixed iOS chromecast, change navigation to app first then device, removed device list from remote.html url
parent 691328dc
......@@ -8,13 +8,14 @@
<title>MSE TV</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../../sdom/js/applicationBridge.js" ></script>
<script type="text/javascript" src="../../../sdom/js/wsBridgeConnection.js" ></script>
<script type="text/javascript" src="../../../sdom/js/wsBridgeDirectory.js" ></script>
<script type="text/javascript" src="../../../sdom/ext/js/jquery.cookie.js" ></script>
<script type="text/javascript" src="../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../sdom/js/applicationBridge.js" ></script>
<script type="text/javascript" src="../../sdom/js/wsBridgeConnection.js" ></script>
<script type="text/javascript" src="../../sdom/js/wsBridgeDirectory.js" ></script>
<script type="text/javascript" src="../../sdom/ext/js/jquery.cookie.js" ></script>
<script type="text/javascript" src="../shared/sc.js" ></script>
<style type="text/css">
/*** The Essential Code ***/
......
......@@ -7,11 +7,13 @@
html {
width: 100%;
height: 100%;
xmin-height: 480px;
overflow: hidden;
}
body {
overflow: hidden;
xmin-height: 480px;
}
.hidden {
......@@ -21,6 +23,7 @@ body {
#home {
min-height: 100%;
height: 100%;
xmin-height: 480px;
}
.input {
......@@ -45,3 +48,10 @@ body {
color: #606060;
}
.rcFrame {
min-height: 480px;
}
.dj_phone {
xmin-height: 480px !important;
}
......@@ -27,6 +27,12 @@
<script type="text/javascript" src="../js/auth.js" ></script>
<script type="text/javascript" src="../js/url.js" ></script>
<script type="text/javascript" src="login.js" ></script>
<!--style>
html, body, #loginView {
min-height: 480px !important;
}
</style-->
</head>
......
var newBaseUrl = "";
var newBaseUri = "";
// This is used to determine whether the proposed base uri is valid. remote.html must exist.
var remoteUri = "mse/remote/remote.html";
var qparams = "";
// This is the url baked into the application that redirects to the selected location.
var routingUri = "/mse/remote/remote.html";
// This is the uri baked into the application that redirects to the selected location.
var routingUri = "/"+remoteUri;
function initLogin() {
......@@ -22,9 +24,6 @@
}
}, true);
//var baseurl = document.location.protocol + "//" + document.location.host;
//$('#hostLabel').text(baseurl);
onInputTextChange();
}
......@@ -33,16 +32,19 @@
// Logout
document.cookie = 'MSE_Authorized=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
// Set new redirect
document.cookie = 'MSE_LoginRedirect='+newBaseUrl+';expires=Thu, 01 Jan 2016 00:00:01 GMT;path=/';
// Set new redirects
var date = new Date();
date.setTime(date.getTime()+(5*365*24*60*60*1000));
var expires = date.toGMTString();
document.cookie = 'MSE_BaseRedirect='+newBaseUri+';expires='+expires+';path=/';
// Redirect to routing url (remote.html in this folder)
// Redirect to routing uri (remote.html in this folder)
location.replace(routingUri+qparams);
}
function onCancel() {
// Redirect to routing url (remote.html in this folder)
// Redirect to routing uri (remote.html in this folder)
location.replace(routingUri+qparams);
}
......@@ -51,10 +53,10 @@
// Logout
document.cookie = 'MSE_Authorized=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
// Clear redirect
document.cookie = 'MSE_LoginRedirect=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
// Clear redirects
document.cookie = 'MSE_BaseRedirect=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
// Redirect to routing url (remote.html in this folder)
// Redirect to routing uri (remote.html in this folder)
location.replace(routingUri+qparams);
}
......@@ -72,41 +74,41 @@
}
}
function newRemoteUrl() {
}
function onInputTextChange() {
var url = document.getElementById('url').value;
console.log("url: "+url);
setTimeout(function(){
if (url == undefined || url == '' || url.charAt(0) != "/") {
enableOptions(false);
}
else {
var uri = document.getElementById('uri').value;
if (url.slice(-1) != "/") {
url += "/";
}
console.log("uri: "+uri);
newBaseUrl = url + "mse/remote/remote.html";
if (uri == undefined || uri == '' || uri.charAt(0) != "/") {
enableOptions(false);
}
else {
if (uri.slice(-1) != "/") {
uri += "/";
}
newBaseUri = uri;
var testUri = uri + remoteUri;
var request = new XMLHttpRequest();
request.open("HEAD", testUri, true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
enableOptions(request.status == 200);
}
}
request.send(null);
}
var request = new XMLHttpRequest();
request.open("HEAD", newBaseUrl, true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
enableOptions(request.status == 200);
}
}
request.send(null);
}
}, 200)
}
function queryParams() {
var urlParams = {};
var uriParams = {};
(window.onpopstate = function () {
var match,
pl = /\+/g, // Regex for replacing addition symbol with a space
......@@ -115,7 +117,7 @@ function queryParams() {
query = window.location.search.substring(1);
while (match = search.exec(query))
urlParams[decode(match[1])] = decode(match[2]);
uriParams[decode(match[1])] = decode(match[2]);
})();
return urlParams;
return uriParams;
}
......@@ -7,9 +7,18 @@ body
max-height: 100%;
height: 100%;
xmax-height: 548px;
min-height: 480px !important;
}
html {
min-height: 480px !important;
}
.mobile {
min-height: 480px !important;
}
.lnk
{
font-size: 14px;
......@@ -22,7 +31,7 @@ body
width: 100%;
height: 100%;
min-width: 100%;
min-height: 100%;
min-height: 480px;
margin: 0;
padding: 0;
overflow: hidden;
......
This diff is collapsed.
......@@ -76,7 +76,7 @@
height: 100%;
width: 100%;
border: none;
padding-bottom: 3.38%;
xpadding-bottom: 3.38%;
}
</style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment