Commit 246ea07d authored by Steve Johnson's avatar Steve Johnson

login settings; path fixes (removed html intermediate)

parent 171e2555
......@@ -12,7 +12,8 @@
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
<script type="text/javascript" src="../ext/dojo-release-1.9.2/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<!--script type="text/javascript" src="../ext/dojo-release-1.9.2/dojo/dojo.js" djConfig="parseOnLoad: true"></script-->
<script type="text/javascript" src="../ext/dojo-release-1.10.2/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script type="text/javascript" src="../js/constants.js"></script>
<script type="text/javascript" src="../js/utility.js"></script>
<script type="text/javascript" src="../js/xhr.js"></script>
......
......@@ -10,7 +10,7 @@
<!-- stylesheets - external -->
<!-- stylesheets - local -->
<link rel="stylesheet" type="text/css" media="screen" href="../../../../sdom/css/dissolve.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../../../sdom/css/dissolve.css" />
<link rel="stylesheet" type="text/css" media="screen" href="dbxmr.css" />
<!-- javascript - external -->
......@@ -18,15 +18,15 @@
<!-- javascript - sdom -->
<script type="text/javascript" src="../../../../sdom/ext/js/jquery.cookie.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/application.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/js/dissolve.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/xhr.js" ></script>
<script type="text/javascript" src="../../../sdom/ext/js/jquery.cookie.js" ></script>
<script type="text/javascript" src="../../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../../sdom/js/application.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/js/dissolve.js" ></script>
<script type="text/javascript" src="../../../sdom/js/xhr.js" ></script>
<!-- javascript - mse -->
<script type="text/javascript" src="../../js/url.js" ></script>
......@@ -36,11 +36,11 @@
<body>
<div id="TVremote" class="page dissolvable transparent">
<iframe class='pageFrame loading' src='../../../../sdom/pages/remote/tvremote/tvremote.html'></iframe>
<iframe class='pageFrame loading' src='../../../sdom/pages/remote/tvremote/tvremote.html'></iframe>
</div>
<div id="navigator" class="page dissolvable opaque">
<iframe class='pageFrame loading' src='../../../../sdom/pages/remote/navigator/navigator.html'></iframe>
<iframe class='pageFrame loading' src='../../../sdom/pages/remote/navigator/navigator.html'></iframe>
</div>
<script>
......
......@@ -9,22 +9,22 @@
<!-- stylesheets - external -->
<!-- stylesheets - local -->
<link rel="stylesheet" type="text/css" media="screen" href="../../../../sdom/css/dissolve.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../../../sdom/css/dissolve.css" />
<link href="dbxms.css" media="screen" rel="stylesheet" type="text/css">
<!-- javascript - external -->
<script src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<!-- javascript - local -->
<script type="text/javascript" src="../../../../sdom/ext/js/jquery.cookie.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/application.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/applicationBridge.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/dissolve.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/xhr.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/catalog/catalog.js" ></script>
<script type="text/javascript" src="../../../../sdom/js/catalog/catalogDropBox.js" ></script>
<script type="text/javascript" src="../../../sdom/ext/js/jquery.cookie.js" ></script>
<script type="text/javascript" src="../../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../../sdom/js/application.js" ></script>
<script type="text/javascript" src="../../../sdom/js/applicationBridge.js" ></script>
<script type="text/javascript" src="../../../sdom/js/dissolve.js" ></script>
<script type="text/javascript" src="../../../sdom/js/xhr.js" ></script>
<script type="text/javascript" src="../../../sdom/js/catalog/catalog.js" ></script>
<script type="text/javascript" src="../../../sdom/js/catalog/catalogDropBox.js" ></script>
<script type="text/javascript" src="dbxms.js" ></script>
</head>
......@@ -32,17 +32,17 @@
<!-- Watch content on TV -->
<div id="watchTV" class="page dissolvable transparent">
<iframe id='tvFrame' class='pageFrame' src='../../../../sdom/pages/shared/watchTV/watchtv.html'></iframe>
<iframe id='tvFrame' class='pageFrame' src='../../../sdom/pages/shared/watchTV/watchtv.html'></iframe>
</div>
<!-- View photos on TV -->
<div id="photoViewer" class="page dissolvable transparent">
<iframe class='pageFrame' src='../../../../sdom/pages/shared/photoViewer/photoViewer.html'></iframe>
<iframe class='pageFrame' src='../../../sdom/pages/shared/photoViewer/photoViewer.html'></iframe>
</div>
<!-- Browse on demand content on tv using gesture remote-->
<div id="mediaBrowser" class="page dissolvable opaque">
<iframe class='pageFrame' src='../../../../sdom/pages/shared/mediaBrowser/mediaBrowser.html'></iframe>
<iframe class='pageFrame' src='../../../sdom/pages/shared/mediaBrowser/mediaBrowser.html'></iframe>
</div>
<div id='ccode'><h3></h3></div>
......
......@@ -31,8 +31,7 @@ var Url = (function() {
var thisScriptEl = scriptEls[scriptEls.length - 1];
var scriptPath = thisScriptEl.src;
var scriptFolder = scriptPath.substr(0, scriptPath.lastIndexOf( '/' ));
var htmlFolder = scriptFolder.substr(0, scriptFolder.lastIndexOf( '/' ));
var baseUrl = htmlFolder.substr(0, htmlFolder.lastIndexOf( '/' )+1);
var baseUrl = scriptFolder.substr(0, scriptFolder.lastIndexOf( '/' )+1);
//var defaultBase = document.location.protocol + "//" + document.location.host;
//defaultBase += "/atg/mse/";
......@@ -112,11 +111,11 @@ var Url = (function() {
};
obj.sharedContainer = function() {
return resolveURL("sharedContainerURL", "html/shared/sc.html");
return resolveURL("sharedContainerURL", "shared/sc.html");
};
obj.remoteContainer = function() {
return resolveURL("remoteContainerURL", "html/remote/rc.html");
return resolveURL("remoteContainerURL", "remote/rc.html");
};
obj.authenticate = function() {
......@@ -128,7 +127,7 @@ var Url = (function() {
};
obj.help = function(page) {
return baseUrl+'html/remote/help/'+page+'.html';
return baseUrl+'remote/help/'+page+'.html';
}
obj.relative = function(url) {
......@@ -146,7 +145,8 @@ var Url = (function() {
}
obj.loginSettings = function(redirectUri) {
return resolveURL("authenticate", "remote/loginSettings.html?redirect_uri="+redirectUri, settingsBase);
//return resolveURL("loginSettings", "remote/loginSettings.html?redirect_uri="+redirectUri, settingsBase);
return resolveURL("loginSettings", "remote/loginSettings.html?redirect_uri="+redirectUri);
};
obj.wsBridge = function() {
......
......@@ -16,13 +16,13 @@
<!-- javascript - external -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<script type="text/javascript" src="../../../sdom/ext/js/jquery.mobile.simpledialog2.min.js"></script>
<script type="text/javascript" src="../../sdom/ext/js/jquery.mobile.simpledialog2.min.js"></script>
<!-- javascript - sdom -->
<script type="text/javascript" src="../../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../../sdom/js/base64.js" ></script>
<script type="text/javascript" src="../../../sdom/js/xhr.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/base64.js" ></script>
<script type="text/javascript" src="../../sdom/js/xhr.js" ></script>
<script type="text/javascript" src="../../sdom/js/utility.js" ></script>
<!-- javascript - mse -->
<script type="text/javascript" src="../js/auth.js" ></script>
<script type="text/javascript" src="../js/url.js" ></script>
......
<!DOCTYPE html>
<html>
<head>
<meta name='copyright' content='CableLabs © 2014. All Rights Reserved'>
<title>Login Settings</title>
<meta name="viewport" charset="UTF-8" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="cache-control" content="no-cache">
<script src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<!--link href="login.css" media="screen" rel="stylesheet" type="text/css"/-->
<script src="https://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<!-- javascript - external -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<style>
html {
width: 100%;
height: 100%;
min-height: 100%;
overflow: hidden;
}
body {
height: 100%;
min-height: 100%;
overflow: hidden;
}
.hidden {
opacity: 0;
}
#home {
min-height: 100%;
height: 100%;
}
.input {
width: 100%;
max-width: 400px;
}
#urlLabel {
width: 100%;
max-width: 400px;
margin: auto;
margin-bottom: 20px;
text-align: center;
display: inline-block;
}
#url #selectButton {
max-width: 400px;
}
#hostLabel {
color: #606060;
}
#selectButton {
margin-right: 10px;
}
#cancelButton {
margin-left: 10px;
}
</style>
<script>
var newBaseUrl = "";
var qparams = "";
// This is the url baked into the application that redirects to the selected location.
var routingUri = "/mse/remote/remote.html";
function initLogin() {
// Get query params from redirect uri.
var qp = queryParams();
var redirectUri = decodeURIComponent(qp.redirect_uri);
var qindex = redirectUri.indexOf('?');
if (qindex != -1) {
qparams = redirectUri.substring(qindex);
console.log("qstring: "+qparams);
}
window.addEventListener('keyup', function(event) {
if(event.keyCode == 13){
onSelect();
}
}, true);
//var baseurl = document.location.protocol + "//" + document.location.host;
//$('#hostLabel').text(baseurl);
onInputTextChange();
}
function onSelect() {
// 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=/';
// Redirect to routing url (remote.html in this folder)
location.replace(routingUri+qparams);
}
function onCancel() {
// Redirect to routing url (remote.html in this folder)
location.replace(routingUri+qparams);
}
function onReset() {
// 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=/';
// Redirect to routing url (remote.html in this folder)
location.replace(routingUri+qparams);
}
function enableOptions(enable) {
if ($('#selectButton')[0].enable == undefined || $('#selectButton')[0].enable != enable) {
$('#selectButton')[0].enable = enable;
if (enable) {
$('#selectButton').removeClass('ui-disabled');
}
else {
$('#selectButton').addClass('ui-disabled');
}
}
}
function newRemoteUrl() {
}
function onInputTextChange() {
var url = document.getElementById('url').value;
if (url == undefined || url == '' || url.charAt(0) != "/") {
enableOptions(false);
}
else {
if (url.slice(-1) != "/") {
url += "/";
}
newBaseUrl = url + "mse/remote/remote.html";
var request = new XMLHttpRequest();
request.open("HEAD", newBaseUrl, true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
enableOptions(request.status == 200);
}
}
request.send(null);
}
}
function queryParams() {
var urlParams = {};
(window.onpopstate = function () {
var match,
pl = /\+/g, // Regex for replacing addition symbol with a space
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
query = window.location.search.substring(1);
while (match = search.exec(query))
urlParams[decode(match[1])] = decode(match[2]);
})();
return urlParams;
}
</script>
</head>
<body onload="initLogin();" >
<div id="home" data-role="page" data-title="Remote Login">
<header data-role="header" data-position="fixed"><h1>Login Settings</h1>
</header>
<div data-role="content" data-theme='a' id="home">
<div data-role="fieldcontain" data-theme='a' id="loginpanel" style='font-family: verdana; font-size: 14px;'>
<!-- input fields -->
<div id='inputfields' style='margin: 24px;'>
<center>
<label id="urlLabel">
New Base URL (eg. /atgdev):
</label>
</center>
<center>
<input type='text' id='url' style='width: 225px;' autofocus='autofocus' autocapitalize='off' autocorrect='off'
onchange='onInputTextChange();' onkeypress='this.onchange();' onpaste='this.onchange();' oninput='this.onchange();'>
</center>
<br>
</div>
<!-- login button -->
<a data-role='button' id='selectButton' style='width: 100px; margin: auto; text-align: center;' onclick='onSelect(); return false;'href='#'>Select</a>
<br>
<a data-role='button' id='cancelButton' style='width: 100px; margin: auto; text-align: center;' onclick='onCancel(); return false;'href='#'>Cancel</a>
<br>
<a data-role='button' id='resetButton' style='width: 100px; margin: auto; text-align: center;' onclick='onReset(); return false;'href='#'>Reset</a>
<br>
<center><label id="hostLabel"></label></center>
<br>
</div>
<br><br>
<br><br>
</div>
</div>
</body>
</html>
......@@ -8,7 +8,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="cache-control" content="no-cache">
<link href="../../../sdom/css/gradientButton.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="../../sdom/css/gradientButton.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="rc.css" media="screen" rel="stylesheet" type="text/css"/>
<style type="text/css">
/* This is REQUIRED when using <!DOCTYPE html> when you want full height.*/
......@@ -21,13 +21,13 @@
<!-- javascript - sdom -->
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../../sdom/js/xhr.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/constants.js" ></script>
<script type="text/javascript" src="../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../sdom/js/xhr.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>
<!-- javascript - mse -->
<script type="text/javascript" src="../js/url.js" ></script>
......
......@@ -9,13 +9,15 @@
<meta name="viewport" charset="UTF-8" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="cache-control" content="no-cache">
<link href="../../../sdom/ext/dojo-release-1.9.2/dojox/mobile/themes/iphone/iphone.css" rel="stylesheet"></link>
<!--link href="../../../sdom/ext/dojo-release-1.9.2/dojox/mobile/themes/iphone/iphone.css" rel="stylesheet"></link-->
<link href="../../sdom/ext/dojo-release-1.10.2/dojox/mobile/themes/iphone/iphone.css" rel="stylesheet"></link>
<link href="remote.css" media="screen" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../../../sdom/ext/dojo-release-1.9.2/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script type="text/javascript" src="../../../sdom/js/constants.js"></script>
<script type="text/javascript" src="../../../sdom/js/utility.js"></script>
<script type="text/javascript" src="../../../sdom/js/xhr.js"></script>
<!--script type="text/javascript" src="../../sdom/ext/dojo-release-1.9.2/dojo/dojo.js" djConfig="parseOnLoad: true"></script-->
<script type="text/javascript" src="../../sdom/ext/dojo-release-1.10.2/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script type="text/javascript" src="../../sdom/js/constants.js"></script>
<script type="text/javascript" src="../../sdom/js/utility.js"></script>
<script type="text/javascript" src="../../sdom/js/xhr.js"></script>
<script type="text/javascript" src="../js/url.js"></script>
<script type="text/javascript" src="../js/dial.js"></script>
<script type="text/javascript" src="remote.js"></script>
......
......@@ -1075,8 +1075,7 @@ var Remote = (function () {
var scriptPath = thisScriptEl.src;
var scriptFolder = scriptPath.substr(0, scriptPath.lastIndexOf( '/' ));
var htmlFolder = scriptFolder.substr(0, scriptFolder.lastIndexOf( '/' ));
var mseFolder = htmlFolder.substr(0, htmlFolder.lastIndexOf( '/' ));
var mseFolder = scriptFolder.substr(0, scriptFolder.lastIndexOf( '/' ));
var baseUrl = mseFolder.substr(0, mseFolder.lastIndexOf( '/' )+1);
......
......@@ -11,13 +11,13 @@
<!-- javascript - sdom -->
<script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../../../sdom/js/constants.js" ></script>
<script type="text/javascript" src="../../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../../sdom/js/xhr.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/constants.js" ></script>
<script type="text/javascript" src="../../sdom/js/utility.js" ></script>
<script type="text/javascript" src="../../sdom/js/xhr.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>
<!-- javascript - mse -->
<script type="text/javascript" src="../js/url.js" ></script>
......
......@@ -2,10 +2,11 @@
if [ ! -f ../mse/tools/upload_config ]; then
echo " - Please clone mse repository into sibling directory of $PWD"
echo " - Then edit mse/tools/upload_config for your site settings"
exit 0
fi
. ../mse/tools/upload_config $1 mse/html
. ../mse/tools/upload_config $1 mse
echo " "
echo " * Uploading ${PWD##*/} repository contents to: $REPO_HOST:$REPO_DEST"
......@@ -14,6 +15,6 @@ echo " "
rsync --recursive \
--exclude '*~*' \
--exclude 'upload' \
* $REPO_USERHOST:$REPO_DEST
* $REPO_USERHOST$REPO_SEP$REPO_DEST
check_rcode $?
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