From 533f32ed48bb5134b829b1e666009bf9da7fdbc4 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 8 Jul 2019 18:16:08 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=8D=E6=98=BE=E7=A4=BA=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/templates/assets/_node_tree.html | 7 +++---- apps/perms/templates/perms/asset_permission_list.html | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/assets/templates/assets/_node_tree.html b/apps/assets/templates/assets/_node_tree.html index 3f6e51596..93aed7d89 100644 --- a/apps/assets/templates/assets/_node_tree.html +++ b/apps/assets/templates/assets/_node_tree.html @@ -69,6 +69,9 @@ var treeUrl = '{% url 'api-assets:node-children-tree' %}?assets=0'; // "showAssets": false, // } function initNodeTree(options) { + if (options.showAssets) { + treeUrl = setUrlParam(treeUrl, 'assets', '1') + } var setting = { view: { dblClickExpand: false, @@ -106,10 +109,6 @@ function initNodeTree(options) { beforeAsync: options.beforeAsync || defaultCallback("Before async") } }; - if (options.showAssets) { - treeUrl = setUrlParam(treeUrl, 'assets', '1') - } - $.get(treeUrl, function(data, status){ zNodes = data; zTree = $.fn.zTree.init($("#nodeTree"), setting, zNodes); diff --git a/apps/perms/templates/perms/asset_permission_list.html b/apps/perms/templates/perms/asset_permission_list.html index 5a10a22c2..859ad64c0 100644 --- a/apps/perms/templates/perms/asset_permission_list.html +++ b/apps/perms/templates/perms/asset_permission_list.html @@ -200,7 +200,7 @@ function initTree() { onSelected: onNodeSelected, beforeAsync: beforeNodeAsync, showMenu: false, - showAssets: true, + showAssets: true }) }