[Dojo-interest] dnd from unordered list
Jean-Rubin Leonard
jrleonard at gmail.com
Thu Jul 23 00:14:09 EDT 2009
Hi,
I am having some problems getting my checkItemAcceptance to work. I am
trying to dnd items I have in an unordered list into a tree.
My list is defined like that:
ul class="dojoDndSource dojoDndTarget dojoDndContainer">
<li id="dojoUnique1" class="dojoDndItem Scenario">Scenarios</li>
<li id="dojoUnique3" class="dojoDndItem Portfolio
dojoDndItemAnchor">Portfolio</li>
</ul>
In my itemAcceptance function I want to test for the class to verify
if the right kind of item is being dragged into the right tree node
but I don't know how to test for the source's class.
I try
function itemAccept(target, source) {
var targetNode = dijit.getEnclosingWidget(target).item;
...
var sourceType = source.getItem().class;
but its not working.
Can someone tell me how I'll be able to test agains the class property
to test if I'm dealing with a scenario or a portfolio as a source?
Thanks,
JR
More information about the Dojo-interest
mailing list