root / trunk / web / dojo / dojox / layout / dnd / Avatar.js @ 12
History | View | Annotate | Download (1.04 KB)
1 | 9 | andrej.cim | /*
|
---|---|---|---|
2 | Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
||
3 | Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||
4 | see: http://dojotoolkit.org/license for details
|
||
5 | */
|
||
6 | |||
7 | |||
8 | if(!dojo._hasResource["dojox.layout.dnd.Avatar"]){ |
||
9 | dojo._hasResource["dojox.layout.dnd.Avatar"]=true; |
||
10 | dojo.provide("dojox.layout.dnd.Avatar");
|
||
11 | dojo.require("dojo.dnd.Avatar");
|
||
12 | dojo.require("dojo.dnd.common");
|
||
13 | dojo.declare("dojox.layout.dnd.Avatar",dojo.dnd.Avatar,{constructor:function(_1,_2){ |
||
14 | this.opacity=_2||0.9; |
||
15 | },construct:function(){ |
||
16 | var _3=this.manager.source,_4=_3.creator?_3._normalizedCreator(_3.getItem(this.manager.nodes[0].id).data,"avatar").node:this.manager.nodes[0].cloneNode(true); |
||
17 | dojo.addClass(_4,"dojoDndAvatar");
|
||
18 | _4.id=dojo.dnd.getUniqueId(); |
||
19 | _4.style.position="absolute";
|
||
20 | _4.style.zIndex=1999;
|
||
21 | _4.style.margin="0px";
|
||
22 | _4.style.width=dojo.marginBox(_3.node).w+"px";
|
||
23 | dojo.style(_4,"opacity",this.opacity); |
||
24 | this.node=_4;
|
||
25 | },update:function(){ |
||
26 | dojo.toggleClass(this.node,"dojoDndAvatarCanDrop",this.manager.canDropFlag); |
||
27 | },_generateText:function(){ |
||
28 | }}); |
||
29 | } |