My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 56: Configurable node markup using template syntax
3 people starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  moo...@wwwendt.de
Closed:  Jan 2011


 
Reported by robert.f...@gmail.com, Nov 14, 2008
Please add a <span class="ui-dynatree-title">..title..</span> into the <a>
element of the nodes. This makes it possible to define a padding for the
links, even if they were made display:block (and the images to float:left,
in which case the gap between expander and link text becomes 0).

Nov 17, 2008
Project Member #1 moo...@wwwendt.de
Would using this css selector

.ui-dynatree-folder>a,
.ui-dynatree-document>a
{
   ...
}
solve the problem?
Owner: moo...@wwWendt.de
Labels: -Type-Defect Type-Enhancement Milestone-Release0.3
Nov 17, 2008
#2 robert.f...@gmail.com
No, in my case I have something similar to this:

.ui-dynatree-document img {
  float:left;
  display:block;
  width:12px;
}
.ui-dynatree-document a {
  float:left;
  display:block;
  /* no width */
}

.ui-dynatree-title {
  padding-left:5px; /* padding between expander and text */
}


Nov 30, 2008
Project Member #3 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Accepted
Labels: -Milestone-Release0.3 Milestone-Release0.4
Dec 9, 2008
#4 gabriell...@gmail.com
If the span around the title is added, would it also be possible to add a node option
so that the class of the span could be overridden?  For example passing a node option
like:

span_class : "my_custom_css_class" 

would result in the following code:

<span class="my_custom_css_class">..title..</span>
Jan 15, 2009
Project Member #5 moo...@wwwendt.de
Maybe this could be handled with a new template option for the title:
tree.option.titleTemplate, that defaults to 
"<a title="${tooltip}" href="#">${title}</a>"

One could overide this as
"<span class="ui-dynatree-title"><a title="${tooltip}" href="#">${title}</a></span>"

Or even 
"<span class="${spanClass}"><a title="${tooltip}" href="#">${title}</a></span>"

Where ${spanClass} is taken from a new option node.data.spanClass.
(Defaults to "ui-dynatree-title".)
Feb 2, 2009
Project Member #6 moo...@wwwendt.de
The new node.data.addClass has been added with  issue #70 .
This should hopefully resolve most of the reasons for this request.

Template syntax is postponed.
Labels: -Milestone-Release0.4 Milestone-Discussion
Aug 7, 2009
Project Member #8 moo...@wwwendt.de
Renamed subject to match the changed content
Summary: Configurable node markup using template syntax
Jan 23, 2011
Project Member #9 moo...@wwwendt.de
Now we have the `tree.onCustomRender(node)` callback, which allows custom markup.
Status: WontFix

Powered by Google Project Hosting