Permalink
Browse files

MINOR Adding classes and markup necessary to style tree before jstree…

….js loads
  • Loading branch information...
1 parent 91995ad commit 6e60314006bf9621240ceee5995f200a3fbb84cb @chillu chillu committed Mar 17, 2011
View
@@ -517,9 +517,10 @@ function getSiteTreeFor($className, $rootID = null, $childrenMethod = null, $num
// getChildrenAsUL is a flexible and complex way of traversing the tree
$titleEval = '
"<li id=\"record-$child->ID\" data-id=\"$child->ID\" class=\"" . $child->CMSTreeClasses($extraArg) . "\">" .
+ "<ins class=\"jstree-icon\">&nbsp;</ins>" .
"<a href=\"" . Controller::join_links(substr($extraArg->Link(),0,-1), "show", $child->ID) . "\" title=\"'
. _t('LeftAndMain.PAGETYPE','Page type: ')
- . '".$child->class."\" >" . ($child->TreeTitle) .
+ . '".$child->class."\" ><ins class=\"jstree-icon\">&nbsp;</ins>" . ($child->TreeTitle) .
"</a>"
';
View
@@ -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 {
@@ -36,7 +36,7 @@
</label>
</div>
- <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)">
+ <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)" class="jstree jstree-apple">
$SiteTreeAsUL
</div>
@@ -7,7 +7,7 @@
<div id="TreeTools">
<% include CMSMain_TreeTools %>
</div>
- <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)">
+ <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)" class="jstree jstree-apple">
$SiteTreeAsUL
</div>
</div>
@@ -10,7 +10,7 @@
</h3>
<div id="sitetree_holder">
<div id="sitetree_and_tools">
- <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)">
+ <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)" class="jstree jstree-apple">
<% include ReportAdmin_SiteTree %>
</div>
</div>
@@ -36,7 +36,7 @@
</label>
</div>
- <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)">
+ <div id="sitetree_ul" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)" class="jstree jstree-apple">
$SiteTreeAsUL
</div>

0 comments on commit 6e60314

Please sign in to comment.