//>>built define(["dijit","dojo","dojox","dojo/require!dijit/TitlePane,dojo/fx"],function(_1,_2,_3){ _2.experimental("dojox.widget.Portlet"); _2.provide("dojox.widget.Portlet"); _2.require("dijit.TitlePane"); _2.require("dojo.fx"); _2.declare("dojox.widget.Portlet",[_1.TitlePane,_1._Container],{resizeChildren:true,closable:true,_parents:null,_size:null,dragRestriction:false,buildRendering:function(){ this.inherited(arguments); _2.style(this.domNode,"visibility","hidden"); },postCreate:function(){ this.inherited(arguments); _2.addClass(this.domNode,"dojoxPortlet"); _2.removeClass(this.arrowNode,"dijitArrowNode"); _2.addClass(this.arrowNode,"dojoxPortletIcon dojoxArrowDown"); _2.addClass(this.titleBarNode,"dojoxPortletTitle"); _2.addClass(this.hideNode,"dojoxPortletContentOuter"); _2.addClass(this.domNode,"dojoxPortlet-"+(!this.dragRestriction?"movable":"nonmovable")); var _4=this; if(this.resizeChildren){ this.subscribe("/dnd/drop",function(){ _4._updateSize(); }); this.subscribe("/Portlet/sizechange",function(_5){ _4.onSizeChange(_5); }); this.connect(window,"onresize",function(){ _4._updateSize(); }); var _6=_2.hitch(this,function(id,_7){ var _8=_1.byId(id); if(_8.selectChild){ var s=this.subscribe(id+"-selectChild",function(_9){ var n=_4.domNode.parentNode; while(n){ if(n==_9.domNode){ _4.unsubscribe(s); _4._updateSize(); break; } n=n.parentNode; } }); var _a=_1.byId(_7); if(_8&&_a){ _4._parents.push({parent:_8,child:_a}); } } }); var _b; this._parents=[]; for(var p=this.domNode.parentNode;p!=null;p=p.parentNode){ var id=p.getAttribute?p.getAttribute("widgetId"):null; if(id){ _6(id,_b); _b=id; } } } this.connect(this.titleBarNode,"onmousedown",function(_c){ if(_2.hasClass(_c.target,"dojoxPortletIcon")){ _2.stopEvent(_c); return false; } return true; }); this.connect(this._wipeOut,"onEnd",function(){ _4._publish(); }); this.connect(this._wipeIn,"onEnd",function(){ _4._publish(); }); if(this.closable){ this.closeIcon=this._createIcon("dojoxCloseNode","dojoxCloseNodeHover",_2.hitch(this,"onClose")); _2.style(this.closeIcon,"display",""); } },startup:function(){ if(this._started){ return; } var _d=this.getChildren(); this._placeSettingsWidgets(); _2.forEach(_d,function(_e){ try{ if(!_e.started&&!_e._started){ _e.startup(); } } catch(e){ } }); this.inherited(arguments); _2.style(this.domNode,"visibility","visible"); },_placeSettingsWidgets:function(){ _2.forEach(this.getChildren(),_2.hitch(this,function(_f){ if(_f.portletIconClass&&_f.toggle&&!_f.attr("portlet")){ this._createIcon(_f.portletIconClass,_f.portletIconHoverClass,_2.hitch(_f,"toggle")); _2.place(_f.domNode,this.containerNode,"before"); _f.attr("portlet",this); this._settingsWidget=_f; } })); },_createIcon:function(_10,_11,fn){ var _12=_2.create("div",{"class":"dojoxPortletIcon "+_10,"waiRole":"presentation"}); _2.place(_12,this.arrowNode,"before"); this.connect(_12,"onclick",fn); if(_11){ this.connect(_12,"onmouseover",function(){ _2.addClass(_12,_11); }); this.connect(_12,"onmouseout",function(){ _2.removeClass(_12,_11); }); } return _12; },onClose:function(evt){ _2.style(this.domNode,"display","none"); },onSizeChange:function(_13){ if(_13==this){ return; } this._updateSize(); },_updateSize:function(){ if(!this.open||!this._started||!this.resizeChildren){ return; } if(this._timer){ clearTimeout(this._timer); } this._timer=setTimeout(_2.hitch(this,function(){ var _14={w:_2.style(this.domNode,"width"),h:_2.style(this.domNode,"height")}; for(var i=0;i