summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-02-25 12:45:01 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-02-25 12:45:01 -0500
commit846058a2ab37b22d94f01746cf03fdf85a4c1495 (patch)
treeff264fff14ea67e0eba709a4a202bbb94951e0ed
parent8ac4a803e658a199b80fd01cf32edc177bb42084 (diff)
Touch up the photo input
-rw-r--r--www/css/index.scss11
-rw-r--r--www/js/report.js5
-rw-r--r--www/report.html1
3 files changed, 10 insertions, 7 deletions
diff --git a/www/css/index.scss b/www/css/index.scss
index ccacc30..93e321a 100644
--- a/www/css/index.scss
+++ b/www/css/index.scss
@@ -130,10 +130,13 @@ body#report {
#camera-ui {
border: solid 1px $yellow;
text-align: center;
- button {
- display: block;
- margin-left: auto;
- margin-right: auto;
+ padding: 0.5em;
+ min-height: 5em;
+ a {
+ border: solid 1px $yellow;
+ border-radius: 3px;
+ padding: 0.5em;
+ display: inline-block;
}
img {
display: block;
diff --git a/www/js/report.js b/www/js/report.js
index 661d63f..a825c21 100644
--- a/www/js/report.js
+++ b/www/js/report.js
@@ -2,7 +2,7 @@ document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
var ui = document.getElementById("camera-ui");
if (navigator.camera) {
- ui.innerHTML = "<button onclick=\"takePhoto(true);return false\">Add Photo</button>"
+ ui.innerHTML = "<a href=\"javascript:takePhoto(true)\">Add Photo</a>"
} else {
ui.innerHTML = "Camera not supported on your device";
}
@@ -26,7 +26,7 @@ function takePhoto(firstrun) {
function(imgData) {
if (firstrun) {
var ui = document.getElementById("camera-ui");
- ui.innerHTML = "<input name=photo id=photo type=hidden /><button onclick=\"takePhoto(false);return false\">Change Photo</button><img id=thumbnail />"
+ ui.innerHTML = "<a href=\"javascript:takePhoto(false)\">Change Photo</a><img id=thumbnail />"
}
var input = document.getElementById("photo");
var img = document.getElementById("thumbnail");
@@ -37,5 +37,4 @@ function takePhoto(firstrun) {
alert("Error taking picture", "Error");
},
options);
- return false;
}
diff --git a/www/report.html b/www/report.html
index 7a853f6..a5612cd 100644
--- a/www/report.html
+++ b/www/report.html
@@ -30,6 +30,7 @@
<label><span>Injury:</span><input type="text" name="injury" /></label>
<label>Detailed description of how the injury occurred <textarea></textarea></label>
<label>Detailed description of how the injury was treated <textarea></textarea></label>
+ <input name=photo id=photo type=hidden />
<div id="camera-ui">Loading Camera...</div>
<input type="submit" value="Submit"/>
</form>