mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
fix(dom) Loader ajax: add dataType
This commit is contained in:
parent
aba5107ac0
commit
a4a04eaf0c
1 changed files with 7 additions and 4 deletions
|
|
@ -694,9 +694,10 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
if (xhr.status === 200 /* OK */) {
|
||||
var lData = lJqXHR.response;
|
||||
|
||||
/* If it's json - parse it as json */
|
||||
if (lType && Util.isContainStr(lType, TYPE_JSON) )
|
||||
lData = Util.parseJSON(lJqXHR.response) || lJqXHR.response;
|
||||
if (p.dataType !== 'text')
|
||||
/* If it's json - parse it as json */
|
||||
if (lType && Util.isContainStr(lType, TYPE_JSON) )
|
||||
lData = Util.parseJSON(lJqXHR.response) || lJqXHR.response;
|
||||
|
||||
if ( Util.isFunction(p.success) )
|
||||
p.success(lData, lJqXHR.statusText, lJqXHR);
|
||||
|
|
@ -1381,7 +1382,9 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
|
||||
|
||||
if ( this.isCurrentIsDir(lCurrentFile) )
|
||||
lPath += '?json';
|
||||
lPath += '?json';
|
||||
else
|
||||
lParams.dataType = 'text';
|
||||
|
||||
if (!lParams.url)
|
||||
lParams.url = CloudFunc.FS + lPath;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue