aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/views/offline.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/www/js/views/offline.js b/www/js/views/offline.js
index 6bc0134..8f963f6 100644
--- a/www/js/views/offline.js
+++ b/www/js/views/offline.js
@@ -15,7 +15,9 @@
'click #id_photo_button': 'takePhoto',
'click #id_existing': 'addPhoto',
'click #id_del_photo_button': 'deletePhoto',
- 'click #locate': 'locate'
+ 'click #locate': 'locate',
+ 'blur input': 'toggleNextButton',
+ 'blur textarea': 'toggleNextButton'
},
draftHasContent: function() {
@@ -29,6 +31,14 @@
return hasContent;
},
+ toggleNextButton: function() {
+ if ( this.draftHasContent() ) {
+ $('#offline-next-btn .ui-btn-text').text('Save');
+ } else {
+ $('#offline-next-btn .ui-btn-text').text('Skip');
+ }
+ },
+
failedLocation: function(details) {
this.finishedLocating();
this.locateCount = 21;