git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1361914 13f79535-47bb-0310-9956-ffa450edef68
193 lines
5.2 KiB
HTML
193 lines
5.2 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
* or more contributor license agreements. See the NOTICE file
|
|
* distributed with this work for additional information
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
* to you under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance
|
|
* with the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing,
|
|
* software distributed under the License is distributed on an
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
* KIND, either express or implied. See the License for the
|
|
* specific language governing permissions and limitations
|
|
* under the License.
|
|
-->
|
|
<html>
|
|
<head>
|
|
<title>Oops</title>
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
|
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
|
<base href="/proxy/public/oops/"/>
|
|
<script type="text/javascript">
|
|
(function() {
|
|
|
|
window.appcache = {};
|
|
|
|
/**
|
|
* Get and cache a resource.
|
|
*/
|
|
appcache.get = function(uri) {
|
|
var h = uri.indexOf('#');
|
|
var u = h == -1? uri : uri.substring(0, h);
|
|
|
|
// Get resource from local storage first
|
|
var ls = window.lstorage || localStorage;
|
|
var item = null;
|
|
try { item = ls.getItem(u); } catch(e) {}
|
|
if (item != null && item != '')
|
|
return item;
|
|
|
|
// Get resource from network
|
|
var http = new XMLHttpRequest();
|
|
http.open("GET", u, false);
|
|
http.setRequestHeader("Accept", "*/*");
|
|
http.send(null);
|
|
if (http.status == 200) {
|
|
if (http.getResponseHeader("X-Login") != null) {
|
|
if (window.debug) debug('http error', u, 'X-Login');
|
|
return null;
|
|
} else if (http.responseText == '' || http.getResponseHeader("Content-Type") == null) {
|
|
if (window.debug) debug('http error', u, 'No-Content');
|
|
return null;
|
|
}
|
|
try { ls.setItem(u, http.responseText); } catch(e) {}
|
|
return http.responseText;
|
|
}
|
|
if (window.debug) debug('http error', u, http.status, http.statusText);
|
|
return null;
|
|
};
|
|
|
|
})();
|
|
|
|
/**
|
|
* Load Javascript and CSS.
|
|
*/
|
|
(function() {
|
|
|
|
var bootjs = document.createElement('script');
|
|
bootjs.type = 'text/javascript';
|
|
bootjs.text = appcache.get('/proxy/all-min.js');
|
|
document.head.appendChild(bootjs);
|
|
document.head.appendChild(ui.declareCSS(appcache.get('/proxy/ui-min.css')));
|
|
|
|
})();
|
|
|
|
</script>
|
|
</head>
|
|
<body class="delayed">
|
|
<div id="mainbodydiv" class="mainbodydiv">
|
|
|
|
<div id="headdiv" class="hsection">
|
|
<script type="text/javascript">
|
|
(function() {
|
|
|
|
$('headdiv').appendChild(ui.declareScript(appcache.get('/proxy/public/config-min.js')));
|
|
|
|
})();
|
|
</script>
|
|
</div>
|
|
|
|
<div id="menubackground" class="tbarbackground fixed"></div>
|
|
<div id="menu" class="tbarmenu fixed"></div>
|
|
|
|
<div id="viewheadbackground" class="viewheadbackground fixed"></div>
|
|
<div id="viewhead" class="viewhead fixed"></div>
|
|
|
|
<div id="viewcontainer">
|
|
<div id="view">
|
|
<div id="viewcontent" class="viewcontent" style="margin-left: auto; margin-right: auto; text-align: center;">
|
|
|
|
<br/>
|
|
<div class="hd2">Oops, something went wrong...</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="viewfootbackground" class="viewfootbackground fixed"></div>
|
|
<div id="viewfoot" class="viewfoot fixed"></div>
|
|
|
|
<script type="text/javascript">
|
|
(function() {
|
|
|
|
/**
|
|
* 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 = 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('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);
|
|
|
|
/**
|
|
* Log the current user out.
|
|
*/
|
|
window.logout = function() {
|
|
// Clear session cookie and user-specific local storage entries
|
|
clearauthcookie();
|
|
lstorage.removeItem('/r/Editor/accounts');
|
|
lstorage.removeItem('/r/Editor/dashboards');
|
|
document.location = '/login/';
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Handle orientation change.
|
|
*/
|
|
document.body.onorientationchange = function(e) {
|
|
//debug('onorientationchange');
|
|
ui.onorientationchange(e);
|
|
|
|
// Resize menu and view header
|
|
mdiv.style.width = ui.pixpos(document.documentElement.clientWidth);
|
|
hdiv.style.width = ui.pixpos(document.documentElement.clientWidth);
|
|
return true;
|
|
};
|
|
|
|
/**
|
|
* Initialize the document.
|
|
*/
|
|
function onload() {
|
|
//debug('onload');
|
|
ui.onload();
|
|
|
|
// Show the page
|
|
document.body.style.visibility = 'visible';
|
|
return true;
|
|
}
|
|
|
|
onload();
|
|
|
|
})();
|
|
</script>
|
|
|
|
<div id="footdiv" class="fsection">
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|