+ };
+
+ /**
+ * upload file to local storage for later sync
+ *
+ * should be used with P.M.file_upload(..., local=>1)
+ */
+ ns.LocalFileUpload = function(options) {
+ this.storage_token = options.storage_token; // used in localstorage to retrieve the file
+ this.dom_selector = options.dom_selector; // file inputs to listen on
+
+ this.init();
+ };
+
+ ns.LocalFileUpload.prototype = {
+ init: function() {
+ $(this.dom_selector).change(this.handle_file_upload);
+ },
+ handle_file_upload: function() {
+
+ },
+ load_files: function() {
+ return JSON.parse(localStorage.getImte(this.storage_token));
+ },
+ save_files: function() {
+ return JSON.parse(localStorage.getImte(this.storage_token));
+ },
+
+ };