summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html')
-rw-r--r--sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html64
1 files changed, 43 insertions, 21 deletions
diff --git a/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html b/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html
index ea190f4ec9..cc97c5362e 100644
--- a/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html
+++ b/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html
@@ -25,6 +25,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<base href="/public/oops/"/>
<script type="text/javascript">
+(function() {
window.appcache = {};
@@ -49,37 +50,45 @@ appcache.get = function(uri) {
http.send(null);
if (http.status == 200) {
if (http.getResponseHeader("X-Login") != null) {
- if (debug) debug('http error', u, 'X-Login');
+ if (window.debug) debug('http error', u, 'X-Login');
return null;
} else if (http.responseText == '' || http.getResponseHeader("Content-Type") == null) {
- if (debug) debug('http error', u, 'No-Content');
+ if (window.debug) debug('http error', u, 'No-Content');
return null;
}
try { ls.setItem(u, http.responseText); } catch(e) {}
return http.responseText;
}
- if (debug) debug('http error', u, http.status, http.statusText);
+ if (window.debug) debug('http error', u, http.status, http.statusText);
return null;
};
-// Load Javascript and CSS
+})();
+
+/**
+ * Load Javascript and CSS.
+ */
(function() {
- var bootjs = document.createElement('script');
- bootjs.type = 'text/javascript';
- bootjs.text = appcache.get('/all-min.js');
- document.head.appendChild(bootjs);
- document.head.appendChild(ui.declareCSS(appcache.get('/ui-min.css')));
+
+var bootjs = document.createElement('script');
+bootjs.type = 'text/javascript';
+bootjs.text = appcache.get('/all-min.js');
+document.head.appendChild(bootjs);
+document.head.appendChild(ui.declareCSS(appcache.get('/ui-min.css')));
+
})();
</script>
</head>
-<body class="delayed" onload="onload();">
+<body class="delayed">
<div id="mainbodydiv" class="mainbodydiv">
<div id="headdiv" class="hsection">
<script type="text/javascript">
(function() {
+
$('headdiv').appendChild(ui.declareScript(appcache.get('/public/config-min.js')));
+
})();
</script>
</div>
@@ -101,25 +110,35 @@ $('headdiv').appendChild(ui.declareScript(appcache.get('/public/config-min.js'))
</div>
</div>
+<div id="viewfootbackground" class="viewfootbackground fixed"></div>
+<div id="viewfoot" class="viewfoot fixed"></div>
+
<script type="text/javascript">
+(function() {
-// Init div variables
+/**
+ * Init div variables.
+ */
var mdiv = $('menu');
var hdiv = $('viewhead');
$('viewcontainer').className = ui.isMobile()? 'viewcontainer3d' : 'viewcontainer3dm';
$('view').className = ui.isMobile()? 'viewloaded3d' : 'viewloaded3dm';
+var fdiv = $('viewfoot');
-// Set page title
-document.title = ui.windowtitle(location.hostname) + ' - Oops';
-$('viewhead').innerHTML = '<span class="bcmenu">' + config.pagetitle + '</span>';
+/**
+ * Set page title.
+ */
+document.title = config.windowtitle() + ' - Oops';
+$('viewhead').innerHTML = '<span class="bcmenu">' + config.pagetitle() + '</span>';
/**
* Build and show the menu bar.
*/
function showmenu(mdiv) {
mdiv.innerHTML = ui.menubar(
- mklist(ui.menu('Home', '/', '_view', false)),
- mklist(hasauthcookie()? ui.menufunc('Sign out', 'logout();', false) : ui.menu('Sign in', '/login/', '_self', false)));
+ mklist(ui.menu('menuhome', 'Home', '/', '_self', false)),
+ mklist(hasauthcookie()? ui.menufunc('menusignout', 'Sign out', 'return logout();', false) : ui.menu('menusignin', 'Sign in', '/login/', '_self', false)));
+ fdiv.innerHTML = config.viewfoot();
}
showmenu(mdiv);
@@ -127,13 +146,13 @@ showmenu(mdiv);
/**
* Log the current user out.
*/
-function logout() {
+window.logout = function() {
// Clear session cookie and user-specific local storage entries
clearauthcookie();
- lstorage.removeItem('/r/EditWidget/accounts');
- lstorage.removeItem('/r/EditWidget/dashboards');
+ lstorage.removeItem('/r/Editor/accounts');
+ lstorage.removeItem('/r/Editor/dashboards');
document.location = '/login/';
- return true;
+ return false;
}
/**
@@ -150,7 +169,7 @@ document.body.onorientationchange = function(e) {
};
/**
- * Load post processing.
+ * Initialize the document.
*/
function onload() {
//debug('onload');
@@ -161,6 +180,9 @@ function onload() {
return true;
}
+onload();
+
+})();
</script>
<div id="footdiv" class="fsection">