--- a/src/main/resources/scripts/tracker.js Thu Aug 25 13:13:58 2011 -0400
+++ b/src/main/resources/scripts/tracker.js Thu Aug 25 14:10:40 2011 -0400
@@ -233,10 +233,13 @@
app.duration = 0;
document.getElementById("start").textContent = "Start";
document.getElementById("stop").disabled = true;
- if (!Util.postNewResourceAsJSON(user.getPostRunURI(),app.currentActivity)) {
+ if (app.currentActivity.events.length > 2) {
+ !Util.postNewResourceAsJSON(user.getPostRunURI(),app.currentActivity)) {
if (!Util.store.set("track_gps_app", app.currentActivity)) {
- Util.log("[ERROR] Can't store the value " + e.code);
+ Util.log("[ERROR] Can't store the workout");
}
+ } else {
+ Util.log("[ERROR] Your workout doesn't contain enought events");
}
app.currentActivity = new Activity("http://dbpedia.org/resource/Running");
}