Overview

Main flow

From the main view -> submit -> report edited -> send

On send the app: 1) saves the data in the storage 2) tries to POST the report 3) brings the user back to the main view.

The status class controls the status of the POST: in progress, success and failed.

Based on the status the main view will be updated. On success a refresh of the listing is called.

Storage

The most complex part, due to lack of standards/implemented standards. (see http://caniuse.com/offline-apps)

The storage is based on persistence.js with a fallback on local storage for browsers not supporting WebSQL. The fallback is based on persistence in-memory: http://persistencejs.org/stores/memory