-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor #1484 - Improve Tree implementation
- Loading branch information
1 parent
7a01b6b
commit c5cf0c5
Showing
3 changed files
with
55 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,210 +1,65 @@ | ||
.p-tree { | ||
width: 24em; | ||
} | ||
|
||
.p-tree .p-treenode-selectable.p-treenode-content { | ||
cursor: pointer; | ||
} | ||
|
||
.p-tree .p-tree-container { | ||
height: 100%; | ||
.p-tree-container { | ||
margin: 0; | ||
padding: 0; | ||
list-style-type: none; | ||
overflow: auto; | ||
padding: .25em; | ||
white-space: nowrap; | ||
} | ||
|
||
.p-tree .p-treenode-children { | ||
margin: 0; | ||
padding: 0 0 0 1em; | ||
} | ||
|
||
.p-tree .p-treenode { | ||
background-attachment: scroll; | ||
background-color: transparent; | ||
background-image: none; | ||
background-position: 0 0; | ||
background-repeat: repeat-y; | ||
list-style: none outside none; | ||
.p-treenode-children { | ||
margin: 0; | ||
padding: .125em 0 0 0; | ||
} | ||
|
||
.p-tree .p-treenode-droppoint { | ||
height: 4px; | ||
padding: 0; | ||
list-style-type: none; | ||
} | ||
|
||
.p-tree .p-treenode-droppoint-active { | ||
border: 0 none; | ||
} | ||
|
||
.p-tree .p-tree-toggler { | ||
.p-treenode-selectable { | ||
cursor: pointer; | ||
display: inline-block; | ||
vertical-align: middle; | ||
} | ||
|
||
.p-tree .p-tree-toggler .p-tree-toggler-icon { | ||
vertical-align: middle; | ||
} | ||
|
||
.p-tree .p-treenode-icon { | ||
display: inline-block; | ||
vertical-align: middle; | ||
user-select: none; | ||
} | ||
|
||
.p-tree .p-treenode-label { | ||
display: inline-block; | ||
padding: 0 .25em; | ||
vertical-align: middle; | ||
} | ||
|
||
.p-tree .p-treenode.p-treenode-leaf > .p-treenode-content > .p-tree-toggler { | ||
visibility: hidden; | ||
} | ||
|
||
.p-tree .p-checkbox-box { | ||
.p-tree-toggler { | ||
cursor: pointer; | ||
user-select: none; | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
overflow: hidden; | ||
position: relative; | ||
} | ||
|
||
.p-tree .p-checkbox { | ||
display: inline-block; | ||
vertical-align: middle; | ||
.p-treenode-leaf > .p-treenode-content .p-tree-toggler { | ||
visibility: hidden; | ||
} | ||
|
||
.p-tree .p-checkbox .p-checkbox-icon { | ||
margin-left: 1px; | ||
.p-treenode-content { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.p-tree .p-tree-filter { | ||
.p-tree-filter { | ||
width: 100%; | ||
box-sizing: border-box; | ||
padding-right: 1.5em; | ||
} | ||
|
||
.p-tree .p-tree-filter-container { | ||
.p-tree-filter-container { | ||
position: relative; | ||
margin: 0; | ||
padding: 0.4em; | ||
display: inline-block; | ||
display: block; | ||
width: 100%; | ||
} | ||
|
||
.p-tree .p-tree-filter-container .p-tree-filter-icon { | ||
.p-tree-filter-icon { | ||
position: absolute; | ||
top: .8em; | ||
right: 1em; | ||
} | ||
|
||
.p-tree.p-disabled .p-treenode-selectable.p-treenode-content, | ||
.p-tree.p-disabled .p-tree-toggler, | ||
.p-tree.p-disabled .p-checkbox-box { | ||
cursor: default; | ||
} | ||
|
||
/** Fluid **/ | ||
.p-fluid .p-tree { | ||
width: 100%; | ||
} | ||
|
||
/** Horizontal Tree **/ | ||
.p-tree-horizontal { | ||
width:auto; | ||
padding: .5em 0; | ||
overflow:auto; | ||
} | ||
|
||
.p-tree.p-tree-horizontal table, | ||
.p-tree.p-tree-horizontal tr, | ||
.p-tree.p-tree-horizontal td { | ||
border-collapse: collapse; | ||
margin: 0; | ||
padding: 0; | ||
vertical-align: middle; | ||
} | ||
|
||
.p-tree.p-tree-horizontal .p-tree-toggler { | ||
vertical-align: middle; | ||
margin: 0; | ||
} | ||
|
||
.p-tree-horizontal .p-treenode-content { | ||
font-weight: normal; | ||
padding: 0.4em 1em 0.4em 0.2em; | ||
} | ||
|
||
.p-tree.p-tree-horizontal .p-tree-node-label { | ||
margin: 0; | ||
} | ||
|
||
.p-tree-horizontal .p-treenode-parent .p-treenode-content { | ||
font-weight: normal; | ||
white-space: nowrap; | ||
} | ||
|
||
.p-tree.p-tree-horizontal .p-treenode { | ||
background: url("./images/line.gif") repeat-x scroll center center transparent; | ||
padding: .25em 2.5em; | ||
} | ||
|
||
.p-tree.p-tree-horizontal .p-treenode.p-treenode-leaf, | ||
.p-tree.p-tree-horizontal .p-treenode.p-treenode-collapsed { | ||
padding-right: 0; | ||
} | ||
|
||
.p-tree.p-tree-horizontal .p-treenode-children { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.p-tree.p-tree-horizontal .p-treenode-connector { | ||
width: 1px; | ||
} | ||
|
||
.p-tree.p-tree-horizontal .p-treenode-connector-table { | ||
height: 100%; | ||
width: 1px; | ||
} | ||
|
||
.p-tree.p-tree-horizontal .p-treenode-connector-line { | ||
background: url("./images/line.gif") repeat-y scroll 0 0 transparent; | ||
width: 1px; | ||
} | ||
|
||
.p-tree.p-tree-horizontal table { | ||
height: 0; | ||
} | ||
|
||
.p-tree.p-tree-horizontal .p-checkbox { | ||
vertical-align: bottom; | ||
margin-right: .25em; | ||
top: 50%; | ||
margin-top: -.5rem; | ||
} | ||
|
||
/** Loading **/ | ||
.p-tree.p-tree-loading { | ||
.p-tree-loading { | ||
position: relative; | ||
min-height: 4em; | ||
min-height: 4rem; | ||
} | ||
|
||
.p-tree .p-tree-loading-mask { | ||
.p-tree .p-tree-loading-overlay { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)"; | ||
opacity: 0.1; | ||
z-index: 1; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.p-tree .p-tree-loading-content { | ||
position: absolute; | ||
left: 50%; | ||
top: 50%; | ||
z-index: 2; | ||
margin-top: -1em; | ||
margin-left: -1em; | ||
} | ||
|
||
.p-tree .p-tree-loading-content .p-tree-loading-icon { | ||
font-size: 2em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters