diff options
-rw-r--r-- | www/js/views/offline.js | 12 | ||||
-rw-r--r-- | www/templates/en/offline.html | 2 |
2 files changed, 12 insertions, 2 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; diff --git a/www/templates/en/offline.html b/www/templates/en/offline.html index 38fbdaf..39e1e39 100644 --- a/www/templates/en/offline.html +++ b/www/templates/en/offline.html @@ -1,7 +1,7 @@ <div data-role="header" data-position="fixed" > <a id="offline-prev-btn" data-icon="arrow-l" data-iconpos="left" class="ui-btn-left">Try Again</a> <h1>Offline</h1> - <a id="offline-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Save</a> + <a id="offline-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Skip</a> </div> <div class="table-cell"> <div id="locating" class="nodisplay" style="background: white; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 3000; text-align: center; padding-top: 50%"> |