优化角色组权限规则树显示

pull/516/MERGE
Karson 2026-01-13 11:12:23 +08:00
parent 10150d7f13
commit cbc3477cb4
3 changed files with 37 additions and 32 deletions

View File

@ -926,30 +926,26 @@ form.form-horizontal .control-label {
display: block; display: block;
clear: both; clear: both;
} }
#treeview .jstree-leaf:not(:first-child) { #treeview [data-vertical="true"] .jstree-leaf:not(:first-child) {
float: left; float: left;
background: none; background: none;
margin-left: 0; margin-left: 0;
min-width: 80px; min-width: 80px;
clear: none; clear: none;
} }
#treeview .jstree-leaf { #treeview [data-vertical="true"] .jstree-leaf {
float: left; float: left;
background: none;
margin-left: 0; margin-left: 0;
padding-left: 24px; padding-left: 24px;
min-width: 80px; min-width: 80px;
clear: none; clear: none;
color: #777; color: #999;
} }
#treeview .jstree-leaf > .jstree-icon, #treeview [data-vertical="true"] .jstree-leaf > .jstree-icon,
#treeview .jstree-leaf .jstree-themeicon { #treeview [data-vertical="true"] .jstree-leaf .jstree-themeicon {
display: none; display: none;
} }
#treeview .jstree-last {
background-image: url("../img/32px.png");
background-position: -292px -4px;
background-repeat: repeat-y;
}
#treeview .jstree-children:before, #treeview .jstree-children:before,
#treeview .jstree-children:after { #treeview .jstree-children:after {
content: " "; content: " ";

View File

@ -119,6 +119,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'], function (
.on('redraw.jstree', function (e) { .on('redraw.jstree', function (e) {
$(".layer-footer").attr("domrefresh", Math.random()); $(".layer-footer").attr("domrefresh", Math.random());
}) })
.on('before_open.jstree.jstree', function (e, node) {
if (node.node.children.length > 0 && node.node.children.length === node.node.children_d.length) {
node.node.li_attr['data-vertical'] = true;
$("#" + node.node.id).attr("data-vertical", true);
}
})
.jstree({ .jstree({
"themes": {"stripes": true}, "themes": {"stripes": true},
"checkbox": { "checkbox": {

View File

@ -842,31 +842,34 @@ form.form-horizontal .control-label {
clear: both; clear: both;
} }
.jstree-leaf:not(:first-child) { [data-vertical="true"] {
float: left;
background: none;
margin-left: 0;
min-width: 80px;
clear: none;
}
.jstree-leaf { .jstree-leaf:not(:first-child) {
float: left; float: left;
margin-left: 0; background: none;
padding-left: 24px; margin-left: 0;
min-width: 80px; min-width: 80px;
clear: none; clear: none;
color: #777; }
}
.jstree-leaf > .jstree-icon, .jstree-leaf .jstree-themeicon { .jstree-leaf {
display: none; float: left;
} background: none;
margin-left: 0;
padding-left: 24px;
min-width: 80px;
clear: none;
color: #999;
}
.jstree-leaf > .jstree-icon, .jstree-leaf .jstree-themeicon {
display: none;
}
.jstree-last {
}
.jstree-last {
background-image: url("../img/32px.png");
background-position: -292px -4px;
background-repeat: repeat-y;
} }
.jstree-children { .jstree-children {