diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-19 15:55:41 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-22 15:56:00 +0100 |
commit | 85d67d2d79d01396ffe85d77d8b112874d305360 (patch) | |
tree | 26ec11cbe8902930bfe34c9be72d9d510c5ac52b /www/js | |
parent | c87246d4b0597d25b2407c22ca26a30aa7505e1e (diff) |
change the next button text to reflect if we are saving the report or skipping
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/views/offline.js | 12 |
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; |