diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/mobile.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/www/js/mobile.js b/www/js/mobile.js index f81acf5..9f27221 100644 --- a/www/js/mobile.js +++ b/www/js/mobile.js @@ -531,8 +531,17 @@ function get_report_params () { function _submit_save_report() { var params = get_report_params(); - var r = new Report(params); - r.save(); + var r; + if ( localStorage.currentReport ) { + r = new Report(); + r.load( localStorage.currentReport ); + r.update(params); + } else { + r = new Report(params); + } + if ( r.id() != -1 ) { + r.save(); + } return r; } |