/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojo.dnd.Avatar"],["require","dojo.dnd.common"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojo.dnd.Avatar"]){_4._hasResource["dojo.dnd.Avatar"]=true;_4.provide("dojo.dnd.Avatar");_4.require("dojo.dnd.common");_4.declare("dojo.dnd.Avatar",null,{constructor:function(_7){this.manager=_7;this.construct();},construct:function(){this.isA11y=_4.hasClass(_4.body(),"dijit_a11y");var a=_4.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),_8=this.manager.source,_9,b=_4.create("tbody",null,a),tr=_4.create("tr",null,b),td=_4.create("td",null,tr),_a=this.isA11y?_4.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},td):null,_b=_4.create("span",{innerHTML:_8.generateText?this._generateText():""},td),k=Math.min(5,this.manager.nodes.length),i=0;_4.attr(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_8.creator){_9=_8._normalizedCreator(_8.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{_9=this.manager.nodes[i].cloneNode(true);if(_9.tagName.toLowerCase()=="tr"){var _c=_4.create("table"),_d=_4.create("tbody",null,_c);_d.appendChild(_9);_9=_c;}}_9.id="";tr=_4.create("tr",null,b);td=_4.create("td",null,tr);td.appendChild(_9);_4.attr(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}});}this.node=a;},destroy:function(){_4.destroy(this.node);this.node=false;},update:function(){_4[(this.manager.canDropFlag?"add":"remove")+"Class"](this.node,"dojoDndAvatarCanDrop");if(this.isA11y){var _e=_4.byId("a11yIcon");var _f="+";if(this.manager.canDropFlag&&!this.manager.copy){_f="< ";}else{if(!this.manager.canDropFlag&&!this.manager.copy){_f="o";}else{if(!this.manager.canDropFlag){_f="x";}}}_e.innerHTML=_f;}_4.query(("tr.dojoDndAvatarHeader td span"+(this.isA11y?" span":"")),this.node).forEach(function(_10){_10.innerHTML=this._generateText();},this);},_generateText:function(){return this.manager.nodes.length.toString();}});}}};});