Commit fae06950 authored by Tristan Cavelier's avatar Tristan Cavelier

jslint erp5storage.js

parent b9233766
...@@ -177,9 +177,9 @@ ...@@ -177,9 +177,9 @@
RSVP.resolve(). RSVP.resolve().
then(function () { then(function () {
var view = ERP5Storage.onView[options._view || this._default_view] || var view = ERP5Storage.onView[options._view || this._default_view] ||
ERP5Storage.onView.default; ERP5Storage.onView["default"];
if (typeof view[method] !== "function") { if (typeof view[method] !== "function") {
view = ERP5Storage.onView.default; view = ERP5Storage.onView["default"];
} }
return view[method].call(this, param, options); return view[method].call(this, param, options);
}.bind(this)). }.bind(this)).
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
ERP5Storage.getSiteDocument = getSiteDocument; ERP5Storage.getSiteDocument = getSiteDocument;
ERP5Storage.onView = {}; ERP5Storage.onView = {};
ERP5Storage.onView.default = {}; ERP5Storage.onView["default"] = {};
// XXX docstring // XXX docstring
function onViewDefaultGet(param, options) { function onViewDefaultGet(param, options) {
...@@ -252,10 +252,10 @@ ...@@ -252,10 +252,10 @@
return {"data": result}; return {"data": result};
}); });
} }
ERP5Storage.onView.default.get = onViewDefaultGet; ERP5Storage.onView["default"].get = onViewDefaultGet;
// XXX docstring // XXX docstring
ERP5Storage.onView.default.post = function (metadata, options) { ERP5Storage.onView["default"].post = function (metadata, options) {
return getSiteDocument(this._url) return getSiteDocument(this._url)
.then(function (site_hal) { .then(function (site_hal) {
/*jslint forin: true */ /*jslint forin: true */
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
}; };
// XXX docstring // XXX docstring
ERP5Storage.onView.default.put = function (metadata, options) { ERP5Storage.onView["default"].put = function (metadata, options) {
return getSiteDocument(this._url). return getSiteDocument(this._url).
then(function (site_hal) { then(function (site_hal) {
return jIO.util.ajax({ return jIO.util.ajax({
...@@ -332,7 +332,7 @@ ...@@ -332,7 +332,7 @@
}); });
}; };
ERP5Storage.onView.default.allDocs = function (param, options) { ERP5Storage.onView["default"].allDocs = function (param, options) {
if (typeof options.query !== "string") { if (typeof options.query !== "string") {
options.query = (options.query ? options.query = (options.query ?
jIO.Query.objectToSearchText(options.query) : jIO.Query.objectToSearchText(options.query) :
......
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