If tau library isn't loaded porperly, this moves current page to error.html.
Change-Id: I06d43d2f2c32138e75b43e199dd9bf474fa35a1c
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
<script src="client/js/clipping-storage.js" type="module"></script>
<script src="client/js/app.js" type="module"></script>
<script src="client/js/myApps.js" type="module"></script>
+ <script>
+ if (typeof tau === 'undefined') {
+ location.replace('client/error.html');
+ }
+ </script>
</head>
<body>
</body>
</html>
-
display: inline;
}
+.error-body {
+ background-color: #F2F2F2;
+ color: #505050;
+}
+
+.error-msg {
+ text-align: left;
+ line-height: 23px;
+ color: #505050;
+ display: block;
+ margin-top: 100px;
+ margin-left: 20px;
+ padding-bottom: 20px;
+}
+
body {
/*disable-pull-to-refresh-effect*/
overscroll-behavior: contain;
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, user-scalable=no">
+ <title>My Device App</title>
+ <link rel="stylesheet" href="css/style.css" />
+ <script src="js/client.js"></script>
+</head>
+
+<body class="error-body">
+ <div class="error-page">
+ <h2 style="margin-left:10px">
+ Error
+ </h2>
+ <div>
+ <h4 class="error-msg">
+ Service is not available due to network issue
+ </h4>
+ </div>
+ </div>
+</body>
+
+</html>
* Back key event handler
*/
window.addEventListener("tizenhwkey", function (ev) {
- var activePopup = null,
- page = null,
- pageid = "";
+ let page = null;
+ let pageId = '';
if (ev.keyName === "back") {
page = document.getElementsByClassName("ui-page")[0];
- pageid = page ? page.id : "";
+ pageId = page ? page.id : "";
- if (pageid === "main" ) {
+ if (pageId === "main" || ev.target.id === "error-page") {
try {
/**
* Exit application