diff --git a/appstore.png b/appstore.png deleted file mode 100644 index 645ddde..0000000 Binary files a/appstore.png and /dev/null differ diff --git a/config.xml b/config.xml index 9348df3..9a7df46 100644 --- a/config.xml +++ b/config.xml @@ -15,7 +15,7 @@ - + diff --git a/googleplay.png b/googleplay.png deleted file mode 100644 index 16f5fef..0000000 Binary files a/googleplay.png and /dev/null differ diff --git a/icon.png b/icon.png index bfb9c87..fcd1d08 100644 Binary files a/icon.png and b/icon.png differ diff --git a/iconoriginal.png b/iconoriginal.png deleted file mode 100644 index 7c5a86c..0000000 Binary files a/iconoriginal.png and /dev/null differ diff --git a/www/css/app.css b/www/css/app.css index 6a8c94f..ddd4fbd 100644 --- a/www/css/app.css +++ b/www/css/app.css @@ -1,5 +1,10 @@ +html, body { + height: 100%; +} + .app-dock-container { display: flex; + height: 100%; } .app-dock { @@ -7,6 +12,9 @@ display: flex; justify-content: space-around; flex-wrap: wrap; + align-items: center; + justify-content: center; + height: 100%; } .app-icon { @@ -15,18 +23,21 @@ } .app-dock-item { - padding: 0px 5px 2px 5px; + padding: 0px 10px 2px 10px; min-width: 100px; + max-width: 50%; + width: 120px; + margin: 15px; } .app-dock-item p { margin-bottom: 0px; - font-size: 95%; + font-size: 120%; color: #555; } .app-dock-item p img { - width: 50px; + width: 80px; display: block; margin: 0 auto; } @@ -34,4 +45,20 @@ .app-dock-item p span { display: block; text-align: center; -} \ No newline at end of file +} + +span.navbar-brand { + color: white; +} + +.navbar-brand.pull-left img { + margin-right: -10px; + height: 30px; + margin-top: -4px; +} + +.navbar-brand.pull-right img { + margin-right: 6px; + height: 30px; + margin-top: -4px; +} diff --git a/www/css/spinner.css b/www/css/spinner.css new file mode 100644 index 0000000..6ef4410 --- /dev/null +++ b/www/css/spinner.css @@ -0,0 +1,67 @@ +.spinner { + -webkit-animation: rotator 1.4s linear infinite; + animation: rotator 1.4s linear infinite; +} + +@-webkit-keyframes rotator { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(270deg); + transform: rotate(270deg); + } +} + +@keyframes rotator { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(270deg); + transform: rotate(270deg); + } +} +.spinner .path { + stroke-dasharray: 187; + stroke-dashoffset: 0; + -webkit-transform-origin: center; + transform-origin: center; + -webkit-animation: dash 1.4s ease-in-out infinite, 5.6s ease-in-out infinite; + animation: dash 1.4s ease-in-out infinite, 5.6s ease-in-out infinite; + stroke: #448aff; +} + +@-webkit-keyframes dash { + 0% { + stroke-dashoffset: 187; + } + 50% { + stroke-dashoffset: 46.75; + -webkit-transform: rotate(135deg); + transform: rotate(135deg); + } + 100% { + stroke-dashoffset: 187; + -webkit-transform: rotate(450deg); + transform: rotate(450deg); + } +} + +@keyframes dash { + 0% { + stroke-dashoffset: 187; + } + 50% { + stroke-dashoffset: 46.75; + -webkit-transform: rotate(135deg); + transform: rotate(135deg); + } + 100% { + stroke-dashoffset: 187; + -webkit-transform: rotate(450deg); + transform: rotate(450deg); + } +} diff --git a/www/icons/ic_arrow-back.svg b/www/icons/ic_arrow-back.svg new file mode 100644 index 0000000..c75eae8 --- /dev/null +++ b/www/icons/ic_arrow-back.svg @@ -0,0 +1,57 @@ + + + + + + image/svg+xml + + + + + + + + + + diff --git a/www/icons/ic_settings.svg b/www/icons/ic_settings.svg new file mode 100644 index 0000000..6046a3f --- /dev/null +++ b/www/icons/ic_settings.svg @@ -0,0 +1,56 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/www/img/error.svg b/www/img/error.svg new file mode 100644 index 0000000..4d263e3 --- /dev/null +++ b/www/img/error.svg @@ -0,0 +1,42 @@ + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/www/index.html b/www/index.html index 64fd77e..873ca69 100644 --- a/www/index.html +++ b/www/index.html @@ -9,6 +9,7 @@ + @@ -19,11 +20,25 @@ -
+ + +
+
+
+
+ + + +
+
+
- diff --git a/www/js/app.js b/www/js/app.js index ca2e677..7251f9d 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -7,7 +7,7 @@ $(document).ready(function () { if (localStorage.getItem("setupcomplete")) { getuserinfo(function () { - openscreen("home"); + openscreen("home"); }); } else { openscreen("setup1"); @@ -26,9 +26,11 @@ function getuserinfo(callback) { callback(); } else { navigator.notification.alert(data.msg, null, "Error", 'Dismiss'); + openscreen("homeloaderror"); } }, "json").fail(function () { navigator.notification.alert("Could not connect to the server. Try again later.", null, "Error", 'Dismiss'); + openscreen("homeloaderror"); }); } @@ -76,6 +78,27 @@ function openfragment(fragment, target, effect) { } } +function setnavbar(type) { + var navbar = $('#navbar-header'); + if (type == false) { + $('#navbar').css('display', 'none'); + $('#content-zone').css('margin-top', '0px'); + } else { + $('#navbar').css('display', 'initial'); + $('#content-zone').css('margin-top', '75px'); + switch (type) { + case "home": + navbar.html('Business'); + break; + case "settings": + navbar.html('Settings'); + break; + default: + navbar.html('Business'); + } + } +} + /** * Opens a modal dialog over the top of everything else. * @param {String} filename screens/[filename].html diff --git a/www/js/sidemenu.js b/www/js/sidemenu.js index c3bf4d8..98975b5 100644 --- a/www/js/sidemenu.js +++ b/www/js/sidemenu.js @@ -47,7 +47,7 @@ $(document).ready(function () { var menucolor = $('.navbar').css('background-color'); var textcolor = $('.navbar .navbar-nav > li > a').css('color'); var logo = "%%LOGO%%"; - $('body').append("
" + username + "
\n
    " + pages + "
"); + $('body').append("
" + username + "
\n
    " + pages + "
"); $('body').append("
"); $('button.navbar-toggle[data-toggle="collapse"]').click(togglemenu); @@ -66,4 +66,8 @@ $(document).ready(function () { Hammer(document.body).on("swipeleft", function (e) { closemenu(); }); -}); \ No newline at end of file +}); + +function quitapp() { + parent.postMessage('quit','*'); +} \ No newline at end of file diff --git a/www/views/app.html b/www/views/app.html index 0f8a02c..7b60dab 100644 --- a/www/views/app.html +++ b/www/views/app.html @@ -1,8 +1,8 @@ - - + \ No newline at end of file diff --git a/www/views/appspinner.html b/www/views/appspinner.html new file mode 100644 index 0000000..fe84713 --- /dev/null +++ b/www/views/appspinner.html @@ -0,0 +1,93 @@ + + + + Loading + + + + + + + + + + diff --git a/www/views/home.html b/www/views/home.html index 3bb7137..31c0760 100644 --- a/www/views/home.html +++ b/www/views/home.html @@ -1,7 +1,10 @@ -
- +
+ + + +
@@ -11,7 +14,7 @@ launchapp(id, api, url, icon, title); }); } - + function loadapps() { $.post(localStorage.getItem("portalurl"), { username: localStorage.getItem("username"), @@ -19,6 +22,7 @@ action: "listapps" }, function (data) { if (data.status === 'OK') { + $('#app-dock').html(""); Object.keys(data.apps).forEach(function (k) { var app = data.apps[k]; var iconurl = app.icon; @@ -29,11 +33,14 @@ }); } else { navigator.notification.alert(data.msg, null, "Error", 'Dismiss'); + openscreen("homeloaderror"); } }, "json").fail(function () { navigator.notification.alert("Could not connect to the server. Try again later.", null, "Error", 'Dismiss'); + openscreen("homeloaderror"); }); } - + + setnavbar("home"); loadapps(); \ No newline at end of file diff --git a/www/views/homeloaderror.html b/www/views/homeloaderror.html new file mode 100644 index 0000000..62351c6 --- /dev/null +++ b/www/views/homeloaderror.html @@ -0,0 +1,16 @@ +
+
+
+ +

+ Could not load application data from server. +
+
+ Try again +
+
+
+
+ \ No newline at end of file diff --git a/www/views/settings.html b/www/views/settings.html index 895a78b..36fd08a 100644 --- a/www/views/settings.html +++ b/www/views/settings.html @@ -1,5 +1,28 @@
-
- +
+ Log out and unpair +

Forget all stored user data. You will need to run the setup again.

-
\ No newline at end of file +
+ + diff --git a/www/views/setup1.html b/www/views/setup1.html index d2df12c..cf74fd7 100644 --- a/www/views/setup1.html +++ b/www/views/setup1.html @@ -57,4 +57,6 @@ navigator.notification.alert(ex.message, null, "Error", 'Dismiss'); } } + + setnavbar("home"); \ No newline at end of file diff --git a/www/views/setup2.html b/www/views/setup2.html index 53bea3b..b7c8d6d 100644 --- a/www/views/setup2.html +++ b/www/views/setup2.html @@ -34,4 +34,6 @@ navigator.notification.alert("Could not connect to the server. Try again later.", null, "Error", 'Dismiss'); }); } + + setnavbar("home"); \ No newline at end of file