tp note
This commit is contained in:
@ -112,13 +112,15 @@ h1 {
|
||||
#aj {
|
||||
width: 50%;
|
||||
margin-bottom: 15px;
|
||||
|
||||
}
|
||||
|
||||
#imgToReplace {
|
||||
margin-top: 20px;
|
||||
width: 50%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 5px 0;
|
||||
}
|
||||
}
|
||||
|
@ -49,8 +49,9 @@
|
||||
<button class="btn btn-primary mx-auto d-block" id="takePicture">Camera</button>
|
||||
<button class="btn btn-secondary mx-auto d-block" id="getPosition">Position</button>
|
||||
<button class="btn btn-info mx-auto d-block" id="getCon">Est connecté ?</button>
|
||||
<button class="btn btn-danger mx-auto d-block" id="getNotif">Notif</button>
|
||||
<div class="camera">
|
||||
<img src="" alt=" " class="mx-auto d-block" id="imgToReplace">
|
||||
<img src="" alt=" " class="mx-auto d-block imgh" id="imgToReplace">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -47,12 +47,17 @@ function onDeviceReady() {
|
||||
});
|
||||
|
||||
document.addEventListener("offline", decoNet, false);
|
||||
|
||||
document.getElementById("getNotif").addEventListener("click", (e) => {
|
||||
sendnotif();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function sucessCallbackImage(imageData) {
|
||||
//alert("Zipp is best princess !");
|
||||
var image = document.getElementById('imgToReplace') ;
|
||||
image.style.display = "block";
|
||||
image.src = "data:image/jpeg;base64," + imageData;
|
||||
|
||||
}
|
||||
@ -100,3 +105,14 @@ function decoNet() {
|
||||
btn.classList.add("btn-danger");
|
||||
}
|
||||
|
||||
function sendnotif() {
|
||||
navigator.notification.alert(
|
||||
"Applejack is best pony !",
|
||||
alertDismissed, // callback
|
||||
);
|
||||
}
|
||||
|
||||
function alertDismissed() {
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user