summaryrefslogtreecommitdiff
path: root/js/common.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-19 07:29:21 +0300
committerAndrew Dolgov <[email protected]>2021-02-19 07:29:21 +0300
commitbec35200e97adabf4880a92bad40ec5bbe4848d1 (patch)
tree1b35a847788c4025c3ab3d175741db278a4fc344 /js/common.js
parent0832dd9d40c703d5d0bebf7f2392174acb602ec2 (diff)
fix some eslint-related stuffwip-no-prototype
Diffstat (limited to 'js/common.js')
-rwxr-xr-xjs/common.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/common.js b/js/common.js
index 6dd5713df..a5e1e503a 100755
--- a/js/common.js
+++ b/js/common.js
@@ -1,6 +1,6 @@
'use strict';
-/* global dijit, __, App, Ajax */
+/* global dijit, __, App, dojo, __csrf_token */
/* eslint-disable no-new */
function $(id) {
@@ -111,6 +111,8 @@ String.prototype.stripTags = function() {
/* xhr shorthand helpers */
+// TODO: this should become xhr { Post: ..., Json: ... }
+
/* exported xhrPost */
function xhrPost(url, params = {}, complete = undefined) {
console.log("xhrPost:", params);
@@ -144,6 +146,7 @@ function xhrJson(url, params = {}, complete = undefined) {
obj = JSON.parse(reply.responseText);
} catch (e) {
console.error("xhrJson", e, reply);
+ reject(e);
}
if (complete != undefined) complete(obj);