[Dojo-interest] dnd with one extra node
Eugene Lazutkin
eugene.lazutkin at gmail.com
Tue Jun 1 20:02:20 EDT 2010
Hmm, I think this is a bug then. Please file a defect ticket, so we
don't forget.
For now either try to instantiate a source programmatically, or override
a startup() method. Something like that should do the trick:
<div dojoType="dojo.dnd.Source" jsId="c1">
...
<div id="parent">
...
</div>
...
<script type="dojo/method" event="startup">
// normal processing
this.inherited("startup", arguments);
// set up our parent
this.parent = dojo.byId("parent");
</script>
</div>
In general you can set up "parent" at any time => you can do it in
dojo.addOnLoad(), or at any other suitable event:
dojo.ready(function(){
// "c1" is declared as jsId, "parent" is a node id
c1.parent = dojo.byId("parent");
});
Cheers,
Eugene Lazutkin
Dojo Toolkit, Committer
http://lazutkin.com/
On 06/01/2010 02:35 PM, dojonewb wrote:
> That didn't work for me
>
> <div dojoType="dojo.dnd.Source" id="container1" jsId="c1" dropParent="parent"
> class="dndcontainer" style="width: 500px; margin-top: 3px; overflow: auto;">
> First<br />
> <div id="parent">
> <?foreach ($albumPictures as $picture){?>
> <div class="dojoDndItem celloutside"><img id="<?=$picture['picture_id']?>"
> src="<?=$picture['image_link']?>&aw=88&ah=100">
> </div>
> <?}?>
> </div>
> </div>
>
> I tried dropParent="dojo.byId('parent')", which didn't work either.
>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
More information about the Dojo-interest
mailing list