[Update] 修改授权页面不显示资产的问题

pull/2906/head
ibuler 2019-07-08 18:16:08 +08:00
parent f3b5823cce
commit 533f32ed48
2 changed files with 4 additions and 5 deletions

View File

@ -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);

View File

@ -200,7 +200,7 @@ function initTree() {
onSelected: onNodeSelected,
beforeAsync: beforeNodeAsync,
showMenu: false,
showAssets: true,
showAssets: true
})
}