Item find results now much nicer looking
This commit is contained in:
parent
57a4b4d18e
commit
6744ec52dc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -328,4 +328,34 @@ body {
|
||||
|
||||
#capturebtn {
|
||||
color: black;
|
||||
}
|
||||
|
||||
#found-box {
|
||||
position: absolute;
|
||||
z-index: 9001;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
border-radius: 10px;
|
||||
bottom: 12%;
|
||||
left: 10%;
|
||||
right: 10%;
|
||||
height: fit-content;
|
||||
max-height: 100px;
|
||||
padding: 10px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#found-box-title {
|
||||
font-size: 120%;
|
||||
color: white;
|
||||
border-left: 1px solid white;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#found-box-text {
|
||||
color: white;
|
||||
border-top: 1px solid white;
|
||||
border-right: 1px solid white;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
padding-top: 2px;
|
||||
}
|
@ -87,12 +87,14 @@ function scanCode() {
|
||||
code: result.text
|
||||
}, function (data) {
|
||||
if (data.status === 'OK') {
|
||||
navigator.notification.alert("Found one " + data.message, null, "Found an item!", 'OK');
|
||||
//navigator.notification.alert("Found one " + data.message, null, "Found an item!", 'OK');
|
||||
showFoundBox("Found an item!", "Found one " + data.message);
|
||||
} else {
|
||||
navigator.notification.alert(data.message, null, "Huh?", 'OK');
|
||||
showFoundBox("Huh?", data.message);
|
||||
}
|
||||
}).fail(function () {
|
||||
navigator.notification.alert("Nothing happened!", null, "Huh?", 'OK');
|
||||
showFoundBox("Huh?", "Nothing happened!");
|
||||
//navigator.notification.alert("Nothing happened!", null, "Huh?", 'OK');
|
||||
});
|
||||
//navigator.notification.alert("Scanned code: " + result.text, null, "OK", 'Dismiss');
|
||||
}
|
||||
|
@ -41,6 +41,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="found-box">
|
||||
<div id="found-box-title">
|
||||
|
||||
</div>
|
||||
<div id="found-box-text">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="chatbox">
|
||||
<div class="well well-sm" id="chatmsgs"></div>
|
||||
<div class="input-group" style="position: absolute; left: 0px; bottom: 0px; height: 35px; width: 100%; z-index: 9501;">
|
||||
@ -56,6 +65,19 @@
|
||||
<script>
|
||||
$('#namedisp').text(username);
|
||||
navigator.splashscreen.hide();
|
||||
|
||||
function showFoundBox(title, text) {
|
||||
$('#found-box-title').text(title);
|
||||
$('#found-box-text').text(text);
|
||||
$('#found-box').fadeIn('fast');
|
||||
setTimeout(function () {
|
||||
$('#found-box').fadeOut('slow');
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
$('#found-box').click(function (e) {
|
||||
$('#found-box').fadeOut('fast');
|
||||
});
|
||||
</script>
|
||||
<script src="js/location.js"></script>
|
||||
<script src="js/user.js"></script>
|
@ -328,4 +328,34 @@ body {
|
||||
|
||||
#capturebtn {
|
||||
color: black;
|
||||
}
|
||||
|
||||
#found-box {
|
||||
position: absolute;
|
||||
z-index: 9001;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
border-radius: 10px;
|
||||
bottom: 12%;
|
||||
left: 10%;
|
||||
right: 10%;
|
||||
height: fit-content;
|
||||
max-height: 100px;
|
||||
padding: 10px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#found-box-title {
|
||||
font-size: 120%;
|
||||
color: white;
|
||||
border-left: 1px solid white;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#found-box-text {
|
||||
color: white;
|
||||
border-top: 1px solid white;
|
||||
border-right: 1px solid white;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
padding-top: 2px;
|
||||
}
|
@ -87,12 +87,14 @@ function scanCode() {
|
||||
code: result.text
|
||||
}, function (data) {
|
||||
if (data.status === 'OK') {
|
||||
navigator.notification.alert("Found one " + data.message, null, "Found an item!", 'OK');
|
||||
//navigator.notification.alert("Found one " + data.message, null, "Found an item!", 'OK');
|
||||
showFoundBox("Found an item!", "Found one " + data.message);
|
||||
} else {
|
||||
navigator.notification.alert(data.message, null, "Huh?", 'OK');
|
||||
showFoundBox("Huh?", data.message);
|
||||
}
|
||||
}).fail(function () {
|
||||
navigator.notification.alert("Nothing happened!", null, "Huh?", 'OK');
|
||||
showFoundBox("Huh?", "Nothing happened!");
|
||||
//navigator.notification.alert("Nothing happened!", null, "Huh?", 'OK');
|
||||
});
|
||||
//navigator.notification.alert("Scanned code: " + result.text, null, "OK", 'Dismiss');
|
||||
}
|
||||
|
@ -41,6 +41,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="found-box">
|
||||
<div id="found-box-title">
|
||||
|
||||
</div>
|
||||
<div id="found-box-text">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="chatbox">
|
||||
<div class="well well-sm" id="chatmsgs"></div>
|
||||
<div class="input-group" style="position: absolute; left: 0px; bottom: 0px; height: 35px; width: 100%; z-index: 9501;">
|
||||
@ -56,6 +65,19 @@
|
||||
<script>
|
||||
$('#namedisp').text(username);
|
||||
navigator.splashscreen.hide();
|
||||
|
||||
function showFoundBox(title, text) {
|
||||
$('#found-box-title').text(title);
|
||||
$('#found-box-text').text(text);
|
||||
$('#found-box').fadeIn('fast');
|
||||
setTimeout(function () {
|
||||
$('#found-box').fadeOut('slow');
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
$('#found-box').click(function (e) {
|
||||
$('#found-box').fadeOut('fast');
|
||||
});
|
||||
</script>
|
||||
<script src="js/location.js"></script>
|
||||
<script src="js/user.js"></script>
|
Reference in New Issue
Block a user