From 3cf12de6c028dd8952fd8a1a27ddbd560a19a8d4 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 4 Apr 2019 11:46:31 +0300 Subject: [PATCH] chore(cloudcmd) lint --- client/client.js | 2 ++ client/dom/load-remote.js | 1 + client/dom/load.js | 2 ++ client/modules/config.js | 1 + client/modules/operation/index.js | 1 + common/cloudfunc.js | 1 + server/route.js | 1 + 7 files changed, 9 insertions(+) diff --git a/client/client.js b/client/client.js index e4a13a1d..eddcfa6a 100644 --- a/client/client.js +++ b/client/client.js @@ -107,6 +107,7 @@ function CloudCmdProto(DOM) { } = p; let panelChanged; + if (!noCurrent) if (panel && panel !== Info.panel) { DOM.changePanel(); @@ -114,6 +115,7 @@ function CloudCmdProto(DOM) { } let imgPosition; + if (panelChanged || refresh || !history) imgPosition = 'top'; diff --git a/client/dom/load-remote.js b/client/dom/load-remote.js index 511efb59..1d814ccf 100644 --- a/client/dom/load-remote.js +++ b/client/dom/load-remote.js @@ -29,6 +29,7 @@ module.exports = (name, options, callback = options) => { let remoteTmpls; let local; + if (isArray) { remoteTmpls = module.remote; local = module.local; diff --git a/client/dom/load.js b/client/dom/load.js index 0c0cf22a..d81ee747 100644 --- a/client/dom/load.js +++ b/client/dom/load.js @@ -57,6 +57,7 @@ module.exports.ajax = (params) => { xhr.responseType = p.responseType; let data; + if (!isArrayBuf && isObject || isArray) data = jonny.stringify(p.data); else @@ -81,6 +82,7 @@ module.exports.ajax = (params) => { const isContain = ~type.indexOf(TYPE_JSON); let data = xhr.response; + if (type && isContain && notText) data = jonny.parse(xhr.response) || xhr.response; diff --git a/client/modules/config.js b/client/modules/config.js index a66d1504..d5cd86e1 100644 --- a/client/modules/config.js +++ b/client/modules/config.js @@ -170,6 +170,7 @@ function fillTemplate(error, template) { const [inputFirst] = inputs; let afterShow; + if (inputFirst) { onAuthChange(inputFirst.checked); afterShow = inputFirst.focus.bind(inputFirst); diff --git a/client/modules/operation/index.js b/client/modules/operation/index.js index bd9bb79a..0f02c7e5 100644 --- a/client/modules/operation/index.js +++ b/client/modules/operation/index.js @@ -272,6 +272,7 @@ function promptDelete() { const n = names.length; let msg; + if (n) { let name = ''; diff --git a/common/cloudfunc.js b/common/cloudfunc.js index b60da851..44020303 100644 --- a/common/cloudfunc.js +++ b/common/cloudfunc.js @@ -160,6 +160,7 @@ module.exports.buildFromJSON = (params) => { Path(path); fileTable += header + '