Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Hide drag icons when tree is in multiselect, and root node chec…

…kbox when tree is in multiselect (but limit to content tree)
  • Loading branch information...
commit 3916e33c3925a10e36c0e30ba54e57cb3e616b5c 1 parent 6b910ca
@chillu chillu authored
Showing with 29 additions and 6 deletions.
  1. +4 −2 admin/css/screen.css
  2. +25 −4 admin/scss/_tree.scss
View
6 admin/css/screen.css
@@ -557,6 +557,8 @@ form.small .cms-file-info-data .field .middleColumn { margin-left: 120px; }
.cms .jstree-apple.jstree-focused, .TreeDropdownField .treedropdownfield-panel .jstree-apple.jstree-focused { background: none; }
.cms .jstree-apple.jstree-focused .jstree-apple > ul, .TreeDropdownField .treedropdownfield-panel .jstree-apple.jstree-focused .jstree-apple > ul { background: none; }
.cms .jstree li, .TreeDropdownField .treedropdownfield-panel .jstree li { line-height: 25px; }
+.cms a > .jstree-icon, .TreeDropdownField .treedropdownfield-panel a > .jstree-icon { display: none; }
+.cms .draggable a > .jstree-icon, .TreeDropdownField .treedropdownfield-panel .draggable a > .jstree-icon { display: block; }
.jstree-apple li, .jstree-apple .jstree-apple ins { background: none; }
.jstree-apple .jstree-unchecked > a > .jstree-checkbox { margin-right: 3px; }
@@ -583,8 +585,6 @@ form.small .cms-file-info-data .field .middleColumn { margin-left: 120px; }
.tree-holder.jstree-apple .jstree-closed > ins, .cms-tree.jstree-apple .jstree-closed > ins { background-position: 0 0; }
.tree-holder.jstree-apple .jstree-open > ins, .cms-tree.jstree-apple .jstree-open > ins { background-position: -20px 0; }
-.jstree-apple #record-0.jstree-open > ins { display: none; }
-
a .jstree-pageicon { display: block; float: left; width: 16px; height: 16px; margin-right: 4px; background-color: transparent; background-image: url(../images/sitetree_ss_pageclass_icons_default.png); background-repeat: no-repeat; }
li.class-HomePage > a .jstree-pageicon { background-position: 0 -48px; }
@@ -596,6 +596,8 @@ li.class-VirtualPage > a .jstree-pageicon { background-position: 0 -32px; }
li.class-ErrorPage > a .jstree-pageicon { background-position: 0 -112px; }
.cms-tree { visibility: hidden; }
+.cms-tree.multiple li > a > .jstree-icon { display: none; }
+.cms-tree.multiple li#record-0 > a .jstree-checkbox { display: none; }
/** Styles for the left hand side menu and header for the admin panels. Take into consideration CSS selector performance. @package sapphire @subpackage admin */
.cms-logo-header { background-color: #00111d; position: relative; padding: 16px 8px 0 4px; line-height: 24px; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #00111d), color-stop(50%, #003050), color-stop(100%, #00111d)); background-image: -webkit-linear-gradient(#00111d, #003050, #00111d); background-image: -moz-linear-gradient(#00111d, #003050, #00111d); background-image: -o-linear-gradient(#00111d, #003050, #00111d); background-image: -ms-linear-gradient(#00111d, #003050, #00111d); background-image: linear-gradient(#00111d, #003050, #00111d); }
View
29 admin/scss/_tree.scss
@@ -380,6 +380,17 @@
.jstree li {
line-height: 25px;
}
+
+ // Hide drag icons by default. Actual page icons
+ // are in nested <span>, not handled directly through jstree lib
+ a > .jstree-icon {
+ display: none;
+ }
+
+ // Show drag icons when draggable class is applied
+ .draggable a > .jstree-icon {
+ display: block;
+ }
}
.jstree-apple {
@@ -532,10 +543,6 @@
}
}
-.jstree-apple #record-0.jstree-open > ins {
- display: none;
-}
-
a .jstree-pageicon {
display: block;
float: left;
@@ -565,4 +572,18 @@ li.class-ErrorPage > a .jstree-pageicon {
.cms-tree {
visibility: hidden; // enabled by JS to avoid layout glitches
+
+ &.multiple {
+ // Hide draggable icon when multiselect is enabled
+ li > a > .jstree-icon {
+ display: none;
+ }
+
+ li#record-0 {
+ // Hide checkbox on root node (shouldn't be selectable to avoid weird states when trying to e.g. remove it)
+ &> a .jstree-checkbox {
+ display: none;
+ }
+ }
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.