* Fix bug#24192.

This commit is contained in:
leiyong
2022-06-24 03:36:27 +00:00
parent 8ad9dea460
commit fc9b7bf5ad
+14 -3
View File
@@ -69,8 +69,9 @@ $(function()
{
beforeClick: ztreeBeforeClick,
beforeAsync: ztreeBeforeAsync,
onClick: ztreeOnAsyncSuccess,
onAsyncSuccess: zTreeOnAsyncSuccess
onClick: ztreeOnClick,
onAsyncSuccess: zTreeOnAsyncSuccess,
onAsyncError: zTreeOnAsyncError
}
};
@@ -101,8 +102,12 @@ $(function()
return true;
}
function ztreeOnAsyncSuccess(event, treeId, treeNode)
function ztreeOnClick(event, treeId, treeNode)
{
var treeID = treeNode.tId;
if($('#' + treeID).hasClass('loading')) return false;
$('#' + treeID).addClass('loading');
if(treeNode == undefined)
{
departmentID = "0";
@@ -151,6 +156,12 @@ $(function()
$("#loadPrompt").remove();
}
function zTreeOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown)
{
var errorMsg = XMLHttpRequest.responseText;
alert(errorMsg);
}
var ztreeObj = $.fn.zTree.init($("#deptList"), setting);
}
else