aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-04-22 12:31:23 +0100
committerStruan Donald <struan@exo.org.uk>2013-04-22 15:58:16 +0100
commit8ad6d6e7b365d0433d94ebf8cc288d02d64afd3d (patch)
treed4ed9a6c7b06b0abad8549b98d67094e566c63ec /www/js
parent8daf5396fa0466cf22e7cfa6c1b0cfe7b3ccd690 (diff)
highlight next button on details page when we have filled in all the fields
Diffstat (limited to 'www/js')
-rw-r--r--www/js/views/details.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/www/js/views/details.js b/www/js/views/details.js
index 54aaca9..772d4c9 100644
--- a/www/js/views/details.js
+++ b/www/js/views/details.js
@@ -11,7 +11,7 @@
'pageshow': 'afterDisplay',
'click .ui-btn-left': 'onClickButtonPrev',
'click .ui-btn-right': 'onClickButtonNext',
- 'change textarea': 'updateCurrentReport',
+ 'blur textarea': 'updateCurrentReport',
'change select': 'updateCurrentReport',
'blur input': 'updateCurrentReport'
},
@@ -59,6 +59,11 @@
},
updateCurrentReport: function() {
+ if ( $('#form_category').val() && $('#form_title').val() && $('#form_detail').val() ) {
+ $('#next').addClass('page_complete_btn');
+ } else {
+ $('#next').removeClass('page_complete_btn');
+ }
this.model.set('category', $('#form_category').val());
this.model.set('title', $('#form_title').val());
this.model.set('details', $('#form_detail').val());