diff --git a/www/css/main.css b/www/css/main.css
index e69de29..9783685 100644
--- a/www/css/main.css
+++ b/www/css/main.css
@@ -0,0 +1,3 @@
+.item-hidden {
+ display: none;
+}
\ No newline at end of file
diff --git a/www/index.html b/www/index.html
index 4b34362..5403a6a 100644
--- a/www/index.html
+++ b/www/index.html
@@ -16,6 +16,9 @@
+
+
+
diff --git a/www/js/main.js b/www/js/main.js
index a54652b..1389dd9 100644
--- a/www/js/main.js
+++ b/www/js/main.js
@@ -7,7 +7,8 @@
/**
* API base URL
*/
-APIURL = "http://snipe-mobile-api/snipeapi/app/";
+APIURL = "";
+//APIURL = "http://snipe-mobile-api/snipeapi/app/";
//APIURL = "http://localhost:8000/";
username = "";
@@ -35,7 +36,16 @@ function dologin() {
if ($('#usernameBox').val() === "") {
$('#errormsg').text("Error: Missing username.");
$('#errorbase').css('display', 'block');
+ $('#loginBtn').html(' Login');
+ return;
}
+ if ($('#urlBox').val() === "") {
+ $('#errormsg').text("Error: Missing API address.");
+ $('#errorbase').css('display', 'block');
+ $('#loginBtn').html(' Login');
+ return;
+ }
+ APIURL = $('#urlBox').val();
$.ajax({
type: "POST",
url: mkApiUrl("login"),
@@ -50,6 +60,7 @@ function dologin() {
if (data.status === 'OK') {
username = $('#usernameBox').val();
localStorage.setItem("username", username);
+ localStorage.setItem("apiurl", APIURL);
openscreen("home");
} else {
$('#loginBtn').html(' Login');
diff --git a/www/screens/home.html b/www/screens/home.html
index bf0f92a..234adc4 100644
--- a/www/screens/home.html
+++ b/www/screens/home.html
@@ -47,8 +47,8 @@
-
-