diff --git a/js/jquery.ztree.core.js b/js/jquery.ztree.core.js index 9226f19..12c634f 100644 --- a/js/jquery.ztree.core.js +++ b/js/jquery.ztree.core.js @@ -1044,7 +1044,7 @@ view.makeUlHtml(setting, node, html, childHtml.join('')); nObj.append(html.join('')); }, - asyncNode: function (setting, node, isSilent, callback) { + asyncNode: function (setting, node, isSilent, callback, isSync) { var i, l; var isParent = data.nodeIsParent(setting, node); if (node && !isParent) { @@ -1085,6 +1085,7 @@ var _tmpV = data.getRoot(setting)._ver; $.ajax({ + async: !isSync, contentType: setting.async.contentType, cache: false, type: setting.async.type, @@ -1342,7 +1343,7 @@ fontStyle.push(f, ":", fontcss[f], ";"); } html.push(" 0) ? " href='" + url + "'" : ""), " target='", view.makeNodeTarget(node), "' style='", fontStyle.join(''), @@ -1806,7 +1807,7 @@ } if (tools.canAsync(setting, parentNode)) { - view.asyncNode(setting, parentNode, isSilent, addCallback); + view.asyncNode(setting, parentNode, isSilent, addCallback, true); } else { addCallback(); } @@ -2016,4 +2017,4 @@ var zt = $.fn.zTree, $$ = tools.$, consts = zt.consts; -})(jQuery); \ No newline at end of file +})(jQuery);