diff --git a/module/webhook/css/choosedept.css b/module/webhook/css/choosedept.css index 0ce961be3a..9d8de0ee0f 100644 --- a/module/webhook/css/choosedept.css +++ b/module/webhook/css/choosedept.css @@ -1,2 +1,3 @@ #notice {margin-bottom: 0px;} #deptList {padding: 15px 0px;} +#loadPrompt {border: none;} diff --git a/module/webhook/lang/en.php b/module/webhook/lang/en.php index 6dd9aefcce..b27e1d8a27 100644 --- a/module/webhook/lang/en.php +++ b/module/webhook/lang/en.php @@ -87,6 +87,8 @@ $lang->webhook->paramsList['comment'] = 'Comment'; $lang->webhook->paramsList['text'] = 'Action Description'; $lang->webhook->confirmDelete = 'Do you want to delete this hook?'; +$lang->webhook->friendlyTips = 'Friendly reminder: Click on a department to expand the sub-departments under the department.'; +$lang->webhook->loadPrompt = 'There is a lot of data and the loading is slow, please wait.'; $lang->webhook->trimWords = ''; diff --git a/module/webhook/lang/zh-cn.php b/module/webhook/lang/zh-cn.php index d2341c9fe3..5cab898873 100644 --- a/module/webhook/lang/zh-cn.php +++ b/module/webhook/lang/zh-cn.php @@ -87,7 +87,8 @@ $lang->webhook->paramsList['comment'] = '备注'; $lang->webhook->paramsList['text'] = '操作内容'; $lang->webhook->confirmDelete = '您确认要删除该webhook吗?'; -$lang->webhook->loadPrompt = '友情提示:当部门数据较多时,数据加载可能需要较多时间;本列表优先展示一级部门数据,您可以通过点击一级部门标题,自动加载出该部门下的子部门数。'; +$lang->webhook->friendlyTips = '友情提示:点击部门,可以展开该部门下的子部门。'; +$lang->webhook->loadPrompt = '数据较多,加载缓慢,请稍等。'; $lang->webhook->trimWords = '了'; diff --git a/module/webhook/view/choosedept.html.php b/module/webhook/view/choosedept.html.php index 64f37acb81..ea19d3b19f 100644 --- a/module/webhook/view/choosedept.html.php +++ b/module/webhook/view/choosedept.html.php @@ -19,8 +19,9 @@
-
webhook->loadPrompt;?>
+
webhook->friendlyTips;?>
+

webhook->loadPrompt;?>

@@ -66,9 +67,10 @@ $(function() }, callback: { - beforeClick: beforeClick, - beforeAsync: beforeAsync, - onClick: ztreeOnAsyncSuccess + beforeClick: ztreeBeforeClick, + beforeAsync: ztreeBeforeAsync, + onClick: ztreeOnAsyncSuccess, + onAsyncSuccess: zTreeOnAsyncSuccess } }; @@ -82,7 +84,7 @@ $(function() return childNodes; } - function beforeClick(treeId, treeNode) + function ztreeBeforeClick(treeId, treeNode) { if(treeNode.isParent) { @@ -94,7 +96,7 @@ $(function() } } - function beforeAsync(treeId, treeNode) + function ztreeBeforeAsync(treeId, treeNode) { return true; } @@ -144,6 +146,11 @@ $(function() }); } + function zTreeOnAsyncSuccess() + { + $("#loadPrompt").remove(); + } + var ztreeObj = $.fn.zTree.init($("#deptList"), setting); } else