fix: (recent) broken ajax() calls

This commit is contained in:
Massimo Melina 2020-06-13 20:34:19 +02:00
parent 70947f179c
commit 18f0da77d4

View File

@ -618,7 +618,8 @@ function ajax(method, data, cb) {
data = {}; data = {};
data.token = HFS.sid; // avoid CSRF attacks data.token = HFS.sid; // avoid CSRF attacks
showLoading() showLoading()
return $.post("/~ajax."+method, data).then(function(){ // calling this section 'under' the current folder will affect permissions commands like {.get|can delete.}
return $.post("?mode=section&id=ajax."+method, data).then(function(){
if (cb) if (cb)
showLoading(false) showLoading(false)
;(cb||getStdAjaxCB()).apply(this,arguments) ;(cb||getStdAjaxCB()).apply(this,arguments)