Sochettra / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

Allow customization of attribute to be used for node configuration when building from <ul> #269

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What new or enhanced feature are you proposing?

Add code to allow customization of the attribute used for inline node 
confiugration when building from a <ul> inside a document.

Currently, this is hard-coded to a 'data' attribute which is not valid HTML.  I 
would rather be able to make use of a HTML5 data-* attribute.

I've attached a patch that makes such a change possible.  Each <ul> may declare 
a 'data-dynatree' attribute containing a JSON representation of an Object which 
may contain a nodeDataAttrName property that defines what attribute name should 
be checked on each <li> within the <ul>.

To retain backwards compatibilty, should the data-dynatree not be present on 
any <ul>, the attribute name defaults to 'data'.

What goal would this enhancement help you achieve?

Standards compliance, configuration flexibility.

Cheers,

Mark.

Original issue reported on code.google.com by mjt...@gmail.com on 10 Jan 2012 at 10:14

Attachments:

GoogleCodeExporter commented 8 years ago
Very good!
I had similar plans for 1.3, so I merge this into issue 252.
Thanks,
Martin

Original comment by moo...@wwwendt.de on 12 Jan 2012 at 7:20

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 26 Jan 2013 at 4:08