From 6e60314006bf9621240ceee5995f200a3fbb84cb Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 18 Mar 2011 08:32:23 +1300 Subject: [PATCH] MINOR Adding classes and markup necessary to style tree before jstree.js loads --- code/LeftAndMain.php | 3 ++- css/cms_left.css | 17 +++++++++++++++++ templates/Includes/AssetAdmin_left.ss | 2 +- templates/Includes/CMSMain_left.ss | 2 +- templates/Includes/ReportAdmin_left.ss | 2 +- templates/Includes/SecurityAdmin_left.ss | 2 +- 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index d340bf3f..f33fc091 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -517,9 +517,10 @@ class LeftAndMain extends Controller { // getChildrenAsUL is a flexible and complex way of traversing the tree $titleEval = ' "
  • ID\" data-id=\"$child->ID\" class=\"" . $child->CMSTreeClasses($extraArg) . "\">" . + " " . "Link(),0,-1), "show", $child->ID) . "\" title=\"' . _t('LeftAndMain.PAGETYPE','Page type: ') - . '".$child->class."\" >" . ($child->TreeTitle) . + . '".$child->class."\" > " . ($child->TreeTitle) . "" '; diff --git a/css/cms_left.css b/css/cms_left.css index 02f9ca27..a0007bd3 100644 --- a/css/cms_left.css +++ b/css/cms_left.css @@ -272,6 +272,23 @@ ul.contextMenu li a:hover { text-decoration: none; } +/* Tree */ + +/* Added through jstree.js on DOM load, but we need it earlier in order to correctly display the uninitialized tree */ +.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } +.jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; min-width:18px; } +.jstree-rtl li { margin-left:0; margin-right:18px; } +.jstree > ul > li { margin-left:0px; } +.jstree-rtl > ul > li { margin-right:0px; } +.jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } +.jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } +.jstree a:focus { outline: none; } +.jstree a > ins { height:16px; width:16px; } +.jstree a > .jstree-icon { margin-right:3px; } +.jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } +li.jstree-open > ul { display:block; } +li.jstree-closed > ul { display:none; } + ul.tree span.untranslated a:link, ul.tree span.untranslated a:hover, ul.tree span.untranslated a:visited { diff --git a/templates/Includes/AssetAdmin_left.ss b/templates/Includes/AssetAdmin_left.ss index 6217702f..edfa135b 100755 --- a/templates/Includes/AssetAdmin_left.ss +++ b/templates/Includes/AssetAdmin_left.ss @@ -36,7 +36,7 @@ -
    +
    $SiteTreeAsUL
    diff --git a/templates/Includes/CMSMain_left.ss b/templates/Includes/CMSMain_left.ss index b951e1ed..9d834324 100755 --- a/templates/Includes/CMSMain_left.ss +++ b/templates/Includes/CMSMain_left.ss @@ -7,7 +7,7 @@
    <% include CMSMain_TreeTools %>
    -
    +
    $SiteTreeAsUL
    diff --git a/templates/Includes/ReportAdmin_left.ss b/templates/Includes/ReportAdmin_left.ss index 4ff829a3..5ee51f83 100755 --- a/templates/Includes/ReportAdmin_left.ss +++ b/templates/Includes/ReportAdmin_left.ss @@ -10,7 +10,7 @@
    -
    +
    <% include ReportAdmin_SiteTree %>
    diff --git a/templates/Includes/SecurityAdmin_left.ss b/templates/Includes/SecurityAdmin_left.ss index 6e3bf232..e031b541 100644 --- a/templates/Includes/SecurityAdmin_left.ss +++ b/templates/Includes/SecurityAdmin_left.ss @@ -36,7 +36,7 @@
    -
    +
    $SiteTreeAsUL