Commit 33df1bc6 authored by Marco Mariani's avatar Marco Mariani

trivial jslint compliance changes

parent f4aa93ab
......@@ -80,7 +80,7 @@ jIO.addStorageType('crypt', function (spec, my) {
obj._wait = obj._wait || {};
if (obj._wait[function_name]) {
obj._wait[function_name] -= 1;
return function () {};
return function () { return undefined; };
}
// ok if undef or 0
arglist = arglist || [];
......@@ -97,7 +97,7 @@ jIO.addStorageType('crypt', function (spec, my) {
obj._wait[function_name] = times;
};
async.end = function () {
async.call = function () {};
async.call = function () { return undefined; };
};
return async;
};
......
......@@ -961,7 +961,7 @@
};
priv.send("allDocs", null, command.cloneOption(
), function (err, response) {
var i, j, row, selector, selected;
var i, row, selector, selected;
if (err) {
return that.error(err);
}
......
......@@ -772,6 +772,7 @@
}
function myCallback(response) {
return undefined;
}
that.XHRwrapper(command, docId, '', 'GET', mime, '', false, false,
......@@ -823,6 +824,7 @@
function removeAttachment() {
that.XHRwrapper(command, docId, attachId, 'DELETE', mime, '', true,
true, function (reponse) {
return undefined;
}
);
}
......
......@@ -488,7 +488,7 @@
doc = command.cloneDoc();
option = command.cloneOption();
priv.send('getAttachment', doc, option, function (err, response) {
var i, k;
var i;
if (err) {
err.message = "Unable to get attachment";
delete err.index;
......
......@@ -9,7 +9,8 @@
XMLHttpRequest: true,
Blob: true,
FormData: true,
window: true
window: true,
setTimeout: true
*/
/**
* JIO XWiki Storage. Type = 'xwiki'.
......@@ -86,7 +87,7 @@
priv.xwikiurl + "]",
"reason": cause
});
},
}
});
};
......@@ -125,7 +126,7 @@
};
priv.isBlob = function (potentialBlob) {
return typeof (potentialBlob) !== 'undefined' &&
return potentialBlob !== undefined &&
potentialBlob.toString() === "[object Blob]";
};
......@@ -490,7 +491,7 @@
return {
"username": priv.username,
"language": priv.language,
"xwikiurl": priv.xwikiurl,
"xwikiurl": priv.xwikiurl
};
};
......@@ -718,7 +719,7 @@
return that;
};
if (typeof (define) === 'function' && define.amd) {
if ((typeof define) === 'function' && define.amd) {
define(['jquery', 'jio'], function (jquery, jIO) {
$ = jquery;
jIO.addStorageType('xwiki', store);
......
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, test, ok, deepEqual, sinon */
/*global define, jIO, jio_tests, test, ok, deepEqual, sinon, module */
// define([module_name], [dependencies], module);
(function (dependencies, module) {
......@@ -679,7 +679,7 @@
}, "Get html metadata");
o.jio.get({
"_id": "{\"date\":\"2012-12-12\",\"language\":\"fr\"," +
"\"title\":\"Texte pour ce test\",\"type\":\"Text\"}",
"\"title\":\"Texte pour ce test\",\"type\":\"Text\"}"
}, o.f);
o.tick(o);
......
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, hex_sha256, test, ok, deepEqual, sinon,
expect */
expect, module */
// define([module_name], [dependencies], module);
(function (dependencies, module) {
......@@ -792,7 +792,7 @@
"children": [{
"rev": "1-111",
"status": "available",
"children": [],
"children": []
}]
};
o.doc1_1 = {"_id": "doc1.1-111", "title": "A"};
......
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, hex_sha256, window, test, ok, deepEqual, sinon,
expect */
/*global define, jIO, jio_tests, hex_sha256, window,
test, ok, deepEqual, sinon, expect, module */
// define([module_name], [dependencies], module);
(function (dependencies, module) {
......@@ -640,7 +640,7 @@
o.rev_hash = generateRevisionHash({
"_id": "doc1",
"_data": "abc",
"_attachment": "attmt1",
"_attachment": "attmt1"
}, o.revisions);
o.rev = "2-" + o.rev_hash;
o.spy(o, "value",
......@@ -685,7 +685,7 @@
o.rev_hash = generateRevisionHash({
"_id": "doc1",
"_data": "def",
"_attachment": "attmt2",
"_attachment": "attmt2"
}, o.revisions);
o.rev = "3-" + o.rev_hash;
o.spy(o, "value",
......@@ -837,7 +837,7 @@
o.jio.get({"_id": "get1", "_rev": "1-rev0"}, {
"revs_info": true,
"revs": true,
"conflicts": true,
"conflicts": true
}, o.f);
o.tick(o);
......@@ -855,7 +855,7 @@
o.jio.get({"_id": "get1", "_rev": "1-rev2"}, {
"revs_info": true,
"revs": true,
"conflicts": true,
"conflicts": true
}, o.f);
o.tick(o);
......@@ -886,7 +886,7 @@
}, {
"revs_info": true,
"revs": true,
"conflicts": true,
"conflicts": true
}, o.f);
o.tick(o);
......@@ -899,7 +899,7 @@
}, {
"revs_info": true,
"revs": true,
"conflicts": true,
"conflicts": true
}, o.f);
o.tick(o);
......@@ -1016,7 +1016,7 @@
// 4. remove existing attachment
o.rev_hash = generateRevisionHash({
"_id": "remove1",
"_attachment": "remove2",
"_attachment": "remove2"
}, {"start": 2, "ids": ["oldrev", "veryoldrev"]});
o.spy(o, "value", {
"ok": true,
......@@ -1204,7 +1204,7 @@
"digest": "md5-2686969b0bc0fd9bc186146a1ecb09a7",
"length": 7
}
},
}
};
o.rows.rows[2].doc = {
"_id": "yes",
......@@ -1215,7 +1215,7 @@
"digest": "md5-900bc885d7553375aec470198a9514f3",
"length": 3
}
},
}
};
o.spy(o, "value", o.rows, "allDocs + include docs");
o.jio.allDocs({"include_docs": true}, function (err, response) {
......@@ -1284,7 +1284,7 @@
o.jio2.get({"_id": "sample1", "_rev": o.rev}, {
"revs_info": true,
"revs": true,
"conflicts": true,
"conflicts": true
}, o.f);
o.tick(o);
......
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, window, test, ok, deepEqual, sinon, expect */
/*global define, jIO, jio_tests, window, test,
ok, deepEqual, sinon, expect, module */
// define([module_name], [dependencies], module);
(function (dependencies, module) {
......
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, test, ok, deepEqual, sinon */
/*global define, jIO, jio_tests, test, ok, deepEqual, sinon, module */
// define([module_name], [dependencies], module);
(function (dependencies, module) {
......
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global define, jIO, jio_tests, test, ok, sinon */
/*global define, jIO, jio_tests, test, ok, sinon, module */
// define([module_name], [dependencies], module);
(function (dependencies, module) {
......
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