Commit 96f49432 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

crib-enable: Add Back comments on methods

parent e876944a
......@@ -95,6 +95,13 @@
}
})
/**
* get Return a data url. Cannot return a blob as the data
* is transmitted through an iFrame
*
* @url {string} url of the document to retrieve
* @return {data_url} Return the data url of the document
*/
.declareMethod('get', function (url) {
var storage = this.state_parameter_dict.jio_storage;
return storage.getAttachment(this.state_parameter_dict.default_document, url)
......@@ -105,6 +112,15 @@
return e.target.result;
});
})
/**
* put Return a data url. Cannot provide a blob as the data
* is transmitted through an iFrame
*
* @url {string} url of the document to update
* @parameter {data_url} data url of the document to put, it will be transformed in a blob
* @return {data_url} Return the data url of the document
*/
.declareMethod('put', function (url, data_uri) {
var storage = this.state_parameter_dict.jio_storage;
data_uri = jIO.util.dataURItoBlob(data_uri);
......@@ -114,6 +130,13 @@
data_uri
);
})
/**
* allDocs return the list of document in the cache
*
* @params {Object} Not taken into account
* @return {} Return the data url of the document
*/
.declareMethod('allDocs', function () {
var storage = this.state_parameter_dict.jio_storage;
return storage.allAttachments(this.state_parameter_dict.default_document)
......@@ -121,6 +144,13 @@
return result;
});
})
/**
* Remove an url from the cache
*
* @url {string} url of the document to remove
* @return {}
*/
.declareMethod('remove', function (url) {
var storage = this.state_parameter_dict.jio_storage;
return storage.removeAttachment(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment