mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
elofgren: USABILITY: Add tooltips to pages in 'Site Content' tree showing 'Page type: className' where className is the page's type.
More info: http://www.elijahlofgren.com/silverstripe/icons-missing-from-left-navigation-tree-key/ (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41809 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5e6fd830e2
commit
8f980e1e02
@ -297,7 +297,7 @@ abstract class LeftAndMain extends Controller {
|
||||
// getChildrenAsUL is a flexible and complex way of traversing the tree
|
||||
$siteTree = $obj->getChildrenAsUL("", '
|
||||
"<li id=\"record-$child->ID\" class=\"" . $child->CMSTreeClasses($extraArg) . "\">" .
|
||||
"<a href=\"" . Director::link(substr($extraArg->Link(),0,-1), "show", $child->ID) . "\" " . (($child->canEdit() || $child->canAddChildren()) ? "" : "class=\"disabled\"") . ">" .
|
||||
"<a href=\"" . Director::link(substr($extraArg->Link(),0,-1), "show", $child->ID) . "\" " . (($child->canEdit() || $child->canAddChildren()) ? "" : "class=\"disabled\"") . " title=\"Page type: ".$child->class."\" >" .
|
||||
($child->TreeTitle()) .
|
||||
"</a>"
|
||||
'
|
||||
|
@ -66,6 +66,7 @@ TreeAPI.prototype = {
|
||||
|
||||
var aTag = document.createElement('a');
|
||||
aTag.href = SiteTreeHandlers.showRecord_url + idx;
|
||||
aTag.title = 'Page type: ' + pageType;
|
||||
aTag.innerHTML = title;
|
||||
node.appendChild(aTag);
|
||||
|
||||
@ -95,6 +96,8 @@ TreeAPI.prototype = {
|
||||
this.performOnTreeNode(idx, function(treeNode) {
|
||||
treeNode.className = treeNode.className.replace(oldClassName,newClassName);
|
||||
treeNode.aSpan.className = 'a ' + treeNode.className.replace('closed','spanClosed');
|
||||
var aTag = treeNode.getElementsByTagName('a')[0];
|
||||
aTag.title = 'Page type: ' + newClassName;
|
||||
treeNode.setIconByClass();
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user