Opened 6 years ago

Closed 4 years ago

#17758 closed enhancement (patchwelcome)

dndData attribute on declarative dndItem does not translate strings into JSON objects

Reported by: dojo@… Owned by:
Priority: undecided Milestone: 1.13
Component: DnD Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:

Description

When using the declarative syntax for defining a dndItem within a Container the dndData attribute is not handled as a JSON object - it is always handled as a string, this is in contrast to the programatic model where a true JSON object can be passed into the insertNodes method.

<div class="griditem positiongriditem dojoDndItem"  dndType="sometype" dndData="{name:'test',data:'somedata'}" >

In the above example the value within the dndData attribute is not converted to an object, so if I define a custom creator function for the Avatar as a template which attempts to retrieve a the name property it will fail.

Also these should probably be converted html5 style to data-* attributes.

Change History (2)

comment:1 Changed 6 years ago by ben hockey

Type: defectenhancement

comment:2 Changed 4 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in more than a year, I'm closing this as patchwelcome. Please let us know if you would like to get involved in helping make this change to Dojo!

Note: See TracTickets for help on using tickets.