Return-Path: Delivered-To: apmail-camel-commits-archive@www.apache.org Received: (qmail 46475 invoked from network); 19 Mar 2009 10:18:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2009 10:18:23 -0000 Received: (qmail 78313 invoked by uid 500); 19 Mar 2009 10:18:23 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 78268 invoked by uid 500); 19 Mar 2009 10:18:23 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 78258 invoked by uid 99); 19 Mar 2009 10:18:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 03:18:23 -0700 X-ASF-Spam-Status: No, hits=-1997.2 required=10.0 tests=ALL_TRUSTED,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 10:18:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DEE582388B23; Thu, 19 Mar 2009 10:17:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r755893 [3/29] - in /camel/trunk/components/camel-web/src/main/webapp/js/dijit: ./ _base/ _editor/ _editor/nls/ _editor/nls/ar/ _editor/nls/ca/ _editor/nls/cs/ _editor/nls/da/ _editor/nls/de/ _editor/nls/el/ _editor/nls/es/ _editor/nls/fi/ ... Date: Thu, 19 Mar 2009 10:17:26 -0000 To: commits@camel.apache.org From: jstrachan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090319101747.DEE582388B23@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/Tree.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/Tree.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/Tree.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/Tree.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,535 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit.Tree"]){ +dojo._hasResource["dijit.Tree"]=true; +dojo.provide("dijit.Tree"); +dojo.require("dojo.fx"); +dojo.require("dijit._Widget"); +dojo.require("dijit._Templated"); +dojo.require("dijit._Container"); +dojo.require("dijit._Contained"); +dojo.require("dojo.cookie"); +dojo.declare("dijit._TreeNode",[dijit._Widget,dijit._Templated,dijit._Container,dijit._Contained],{item:null,isTreeNode:true,label:"",isExpandable:null,isExpanded:false,state:"UNCHECKED",templateString:"
\"\"\n\t\t\t\"\"\n\t\t
\n\t
\n
\n",postCreate:function(){ +this.setLabelNode(this.label); +this._setExpando(); +this._updateItemClasses(this.item); +if(this.isExpandable){ +dijit.setWaiState(this.labelNode,"expanded",this.isExpanded); +if(this==this.tree.rootNode){ +dijit.setWaitState(this.tree.domNode,"expanded",this.isExpanded); +} +} +},_setIndentAttr:function(_1){ +this.indent=_1; +var _2=(Math.max(_1,0)*19)+"px"; +dojo.style(this.domNode,"backgroundPosition",_2+" 0px"); +dojo.style(this.rowNode,dojo._isBodyLtr()?"paddingLeft":"paddingRight",_2); +dojo.forEach(this.getChildren(),function(_3){ +_3.attr("indent",_1+1); +}); +},markProcessing:function(){ +this.state="LOADING"; +this._setExpando(true); +},unmarkProcessing:function(){ +this._setExpando(false); +},_updateItemClasses:function(_4){ +var _5=this.tree,_6=_5.model; +if(_5._v10Compat&&_4===_6.root){ +_4=null; +} +if(this._iconClass){ +dojo.removeClass(this.iconNode,this._iconClass); +} +this._iconClass=_5.getIconClass(_4,this.isExpanded); +if(this._iconClass){ +dojo.addClass(this.iconNode,this._iconClass); +} +dojo.style(this.iconNode,_5.getIconStyle(_4,this.isExpanded)||{}); +if(this._labelClass){ +dojo.removeClass(this.labelNode,this._labelClass); +} +this._labelClass=_5.getLabelClass(_4,this.isExpanded); +if(this._labelClass){ +dojo.addClass(this.labelNode,this._labelClass); +} +dojo.style(this.labelNode,_5.getLabelStyle(_4,this.isExpanded)||{}); +},_updateLayout:function(){ +var _7=this.getParent(); +if(!_7||_7.rowNode.style.display=="none"){ +dojo.addClass(this.domNode,"dijitTreeIsRoot"); +}else{ +dojo.toggleClass(this.domNode,"dijitTreeIsLast",!this.getNextSibling()); +} +},_setExpando:function(_8){ +var _9=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"]; +var _a=["*","-","+","*"]; +var _b=_8?0:(this.isExpandable?(this.isExpanded?1:2):3); +dojo.forEach(_9,function(s){ +dojo.removeClass(this.expandoNode,s); +},this); +dojo.addClass(this.expandoNode,_9[_b]); +this.expandoNodeText.innerHTML=_a[_b]; +},expand:function(){ +if(this.isExpanded){ +return; +} +this._wipeOut&&this._wipeOut.stop(); +this.isExpanded=true; +dijit.setWaiState(this.labelNode,"expanded","true"); +dijit.setWaiRole(this.containerNode,"group"); +dojo.addClass(this.contentNode,"dijitTreeContentExpanded"); +this._setExpando(); +this._updateItemClasses(this.item); +if(this==this.tree.rootNode){ +dijit.setWaiState(this.tree.domNode,"expanded","true"); +} +if(!this._wipeIn){ +this._wipeIn=dojo.fx.wipeIn({node:this.containerNode,duration:dijit.defaultDuration}); +} +this._wipeIn.play(); +},collapse:function(){ +if(!this.isExpanded){ +return; +} +this._wipeIn&&this._wipeIn.stop(); +this.isExpanded=false; +dijit.setWaiState(this.labelNode,"expanded","false"); +if(this==this.tree.rootNode){ +dijit.setWaiState(this.tree.domNode,"expanded","false"); +} +dojo.removeClass(this.contentNode,"dijitTreeContentExpanded"); +this._setExpando(); +this._updateItemClasses(this.item); +if(!this._wipeOut){ +this._wipeOut=dojo.fx.wipeOut({node:this.containerNode,duration:dijit.defaultDuration}); +} +this._wipeOut.play(); +},setLabelNode:function(_d){ +this.labelNode.innerHTML=""; +this.labelNode.appendChild(dojo.doc.createTextNode(_d)); +},indent:0,setChildItems:function(_e){ +var _f=this.tree,_10=_f.model; +this.getChildren().forEach(function(_11){ +dijit._Container.prototype.removeChild.call(this,_11); +},this); +this.state="LOADED"; +if(_e&&_e.length>0){ +this.isExpandable=true; +dojo.forEach(_e,function(_12){ +var id=_10.getIdentity(_12),_14=_f._itemNodeMap[id],_15=(_14&&!_14.getParent())?_14:this.tree._createTreeNode({item:_12,tree:_f,isExpandable:_10.mayHaveChildren(_12),label:_f.getLabel(_12),indent:this.indent+1}); +if(_14){ +_14.attr("indent",this.indent+1); +} +this.addChild(_15); +_f._itemNodeMap[id]=_15; +if(this.tree._state(_12)){ +_f._expandNode(_15); +} +},this); +dojo.forEach(this.getChildren(),function(_16,idx){ +_16._updateLayout(); +}); +}else{ +this.isExpandable=false; +} +if(this._setExpando){ +this._setExpando(false); +} +if(this==_f.rootNode){ +var fc=this.tree.showRoot?this:this.getChildren()[0]; +if(fc){ +fc.setSelected(true); +_f.lastFocused=fc; +}else{ +_f.domNode.setAttribute("tabIndex","0"); +} +} +},removeChild:function(_19){ +this.inherited(arguments); +var _1a=this.getChildren(); +if(_1a.length==0){ +this.isExpandable=false; +this.collapse(); +} +dojo.forEach(_1a,function(_1b){ +_1b._updateLayout(); +}); +},makeExpandable:function(){ +this.isExpandable=true; +this._setExpando(false); +},_onLabelFocus:function(evt){ +dojo.addClass(this.labelNode,"dijitTreeLabelFocused"); +this.tree._onNodeFocus(this); +},_onLabelBlur:function(evt){ +dojo.removeClass(this.labelNode,"dijitTreeLabelFocused"); +},setSelected:function(_1e){ +var _1f=this.labelNode; +_1f.setAttribute("tabIndex",_1e?"0":"-1"); +dijit.setWaiState(_1f,"selected",_1e); +dojo.toggleClass(this.rowNode,"dijitTreeNodeSelected",_1e); +},_onMouseEnter:function(evt){ +dojo.addClass(this.rowNode,"dijitTreeNodeHover"); +this.tree._onNodeMouseEnter(this,evt); +},_onMouseLeave:function(evt){ +dojo.removeClass(this.rowNode,"dijitTreeNodeHover"); +this.tree._onNodeMouseLeave(this,evt); +}}); +dojo.declare("dijit.Tree",[dijit._Widget,dijit._Templated],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],openOnClick:false,openOnDblClick:false,templateString:"
\n
\n",isExpandable:true,isTree:true,persist:true,dndController:null,dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:0,betweenThreshold:0,_publish:function(_22,_23){ +dojo.publish(this.id,[dojo.mixin({tree:this,event:_22},_23||{})]); +},postMixInProperties:function(){ +this.tree=this; +this._itemNodeMap={}; +if(!this.cookieName){ +this.cookieName=this.id+"SaveStateCookie"; +} +},postCreate:function(){ +this._initState(); +if(!this.model){ +this._store2model(); +} +this.connect(this.model,"onChange","_onItemChange"); +this.connect(this.model,"onChildrenChange","_onItemChildrenChange"); +this.connect(this.model,"onDelete","_onItemDelete"); +this._load(); +this.inherited(arguments); +if(this.dndController){ +if(dojo.isString(this.dndController)){ +this.dndController=dojo.getObject(this.dndController); +} +var _24={}; +for(var i=0;i= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dijit._Calendar"]){ +dojo._hasResource["dijit._Calendar"]=true; +dojo.provide("dijit._Calendar"); +dojo.require("dojo.cldr.supplemental"); +dojo.require("dojo.date"); +dojo.require("dojo.date.locale"); +dojo.require("dijit._Widget"); +dojo.require("dijit._Templated"); +dojo.declare("dijit._Calendar",[dijit._Widget,dijit._Templated],{templateString:"\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n
\n\t\t\t\t\"\"\n\t\t\t\t-\n\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t\t\"\"\ n\t\t\t\t+\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t

\n\t\t\t
\t\n",value:new Date(),dayWidth:"narrow",setValue:function(_1){ +dojo.deprecated("dijit.Calendar:setValue() is deprecated. Use attr('value', ...) instead.","","2.0"); +this.attr("value",_1); +},_setValueAttr:function(_2){ +if(!this.value||dojo.date.compare(_2,this.value)){ +_2=new Date(_2); +_2.setHours(1); +this.displayMonth=new Date(_2); +if(!this.isDisabledDate(_2,this.lang)){ +this.onChange(this.value=_2); +} +this._populateGrid(); +} +},_setText:function(_3,_4){ +while(_3.firstChild){ +_3.removeChild(_3.firstChild); +} +_3.appendChild(dojo.doc.createTextNode(_4)); +},_populateGrid:function(){ +var _5=this.displayMonth; +_5.setDate(1); +var _6=_5.getDay(); +var _7=dojo.date.getDaysInMonth(_5); +var _8=dojo.date.getDaysInMonth(dojo.date.add(_5,"month",-1)); +var _9=new Date(); +var _a=this.value; +var _b=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang); +if(_b>_6){ +_b-=7; +} +dojo.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(_c,i){ +i+=_b; +var _e=new Date(_5); +var _f,_10="dijitCalendar",adj=0; +if(i<_6){ +_f=_8-_6+i+1; +adj=-1; +_10+="Previous"; +}else{ +if(i>=(_6+_7)){ +_f=i-_6-_7+1; +adj=1; +_10+="Next"; +}else{ +_f=i-_6+1; +_10+="Current"; +} +} +if(adj){ +_e=dojo.date.add(_e,"month",adj); +} +_e.setDate(_f); +if(!dojo.date.compare(_e,_9,"date")){ +_10="dijitCalendarCurrentDate "+_10; +} +if(!dojo.date.compare(_e,_a,"date")){ +_10="dijitCalendarSelectedDate "+_10; +} +if(this.isDisabledDate(_e,this.lang)){ +_10="dijitCalendarDisabledDate "+_10; +} +var _12=this.getClassForDate(_e,this.lang); +if(_12){ +_10=_12+" "+_10; +} +_c.className=_10+"Month dijitCalendarDateTemplate"; +_c.dijitDateValue=_e.valueOf(); +var _13=dojo.query(".dijitCalendarDateLabel",_c)[0]; +this._setText(_13,_e.getDate()); +},this); +var _14=dojo.date.locale.getNames("months","wide","standAlone",this.lang); +this._setText(this.monthLabelNode,_14[_5.getMonth()]); +var y=_5.getFullYear()-1; +var d=new Date(); +dojo.forEach(["previous","current","next"],function(_17){ +d.setFullYear(y++); +this._setText(this[_17+"YearLabelNode"],dojo.date.locale.format(d,{selector:"year",locale:this.lang})); +},this); +var _18=this; +var _19=function(_1a,_1b,adj){ +_18._connects.push(dijit.typematic.addMouseListener(_18[_1a],_18,function(_1d){ +if(_1d>=0){ +_18._adjustDisplay(_1b,adj); +} +},0.8,500)); +}; +_19("incrementMonth","month",1); +_19("decrementMonth","month",-1); +_19("nextYearLabelNode","year",1); +_19("previousYearLabelNode","year",-1); +},goToToday:function(){ +this.attr("value",new Date()); +},postCreate:function(){ +this.inherited(arguments); +dojo.setSelectable(this.domNode,false); +var _1e=dojo.hitch(this,function(_1f,n){ +var _21=dojo.query(_1f,this.domNode)[0]; +for(var i=0;i= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dijit._Contained"]){ +dojo._hasResource["dijit._Contained"]=true; +dojo.provide("dijit._Contained"); +dojo.declare("dijit._Contained",null,{getParent:function(){ +for(var p=this.domNode.parentNode;p;p=p.parentNode){ +var id=p.getAttribute&&p.getAttribute("widgetId"); +if(id){ +var _3=dijit.byId(id); +return _3.isContainer?_3:null; +} +} +return null; +},_getSibling:function(_4){ +var _5=this.domNode; +do{ +_5=_5[_4+"Sibling"]; +}while(_5&&_5.nodeType!=1); +if(!_5){ +return null; +} +var id=_5.getAttribute("widgetId"); +return dijit.byId(id); +},getPreviousSibling:function(){ +return this._getSibling("previous"); +},getNextSibling:function(){ +return this._getSibling("next"); +},getIndexInParent:function(){ +var p=this.getParent(); +if(!p||!p.getIndexOfChild){ +return -1; +} +return p.getIndexOfChild(this); +}}); +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Contained.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Container.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Container.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Container.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Container.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,73 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._Container"]){ +dojo._hasResource["dijit._Container"]=true; +dojo.provide("dijit._Container"); +dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){ +this.inherited(arguments); +if(!this.containerNode){ +this.containerNode=this.domNode; +} +},addChild:function(_1,_2){ +var _3=this.containerNode; +if(_2&&typeof _2=="number"){ +var _4=this.getChildren(); +if(_4&&_4.length>=_2){ +_3=_4[_2-1].domNode; +_2="after"; +} +} +dojo.place(_1.domNode,_3,_2); +if(this._started&&!_1._started){ +_1.startup(); +} +},removeChild:function(_5){ +if(typeof _5=="number"&&_5>0){ +_5=this.getChildren()[_5]; +} +if(!_5||!_5.domNode){ +return; +} +var _6=_5.domNode; +_6.parentNode.removeChild(_6); +},_nextElement:function(_7){ +do{ +_7=_7.nextSibling; +}while(_7&&_7.nodeType!=1); +return _7; +},_firstElement:function(_8){ +_8=_8.firstChild; +if(_8&&_8.nodeType!=1){ +_8=this._nextElement(_8); +} +return _8; +},getChildren:function(){ +return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode); +},hasChildren:function(){ +return !!this._firstElement(this.containerNode); +},destroyDescendants:function(_9){ +dojo.forEach(this.getChildren(),function(_a){ +_a.destroyRecursive(_9); +}); +},_getSiblingOfChild:function(_b,_c){ +var _d=_b.domNode; +var _e=(_c>0?"nextSibling":"previousSibling"); +do{ +_d=_d[_e]; +}while(_d&&(_d.nodeType!=1||!dijit.byNode(_d))); +return _d?dijit.byNode(_d):null; +},getIndexOfChild:function(_f){ +var _10=this.getChildren(); +for(var i=0,c;c=_10[i];i++){ +if(c==_f){ +return i; +} +} +return -1; +}}); +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Container.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_DialogMixin.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_DialogMixin.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_DialogMixin.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_DialogMixin.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,26 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._DialogMixin"]){ +dojo._hasResource["dijit._DialogMixin"]=true; +dojo.provide("dijit._DialogMixin"); +dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(_1){ +},onCancel:function(){ +},onExecute:function(){ +},_onSubmit:function(){ +this.onExecute(); +this.execute(this.attr("value")); +},_getFocusItems:function(_2){ +var _3=dijit._getTabNavigable(dojo.byId(_2)); +this._firstFocusItem=_3.lowest||_3.first||_2; +this._lastFocusItem=_3.last||_3.highest||this._firstFocusItem; +if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.attr(this._firstFocusItem,"type").toLowerCase()=="file"){ +dojo.attr(_2,"tabindex","0"); +this._firstFocusItem=_2; +} +}}); +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_DialogMixin.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_KeyNavContainer.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_KeyNavContainer.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_KeyNavContainer.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_KeyNavContainer.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,130 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._KeyNavContainer"]){ +dojo._hasResource["dijit._KeyNavContainer"]=true; +dojo.provide("dijit._KeyNavContainer"); +dojo.require("dijit._Container"); +dojo.declare("dijit._KeyNavContainer",[dijit._Container],{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(_1,_2){ +var _3=this._keyNavCodes={}; +var _4=dojo.hitch(this,this.focusPrev); +var _5=dojo.hitch(this,this.focusNext); +dojo.forEach(_1,function(_6){ +_3[_6]=_4; +}); +dojo.forEach(_2,function(_7){ +_3[_7]=_5; +}); +this.connect(this.domNode,"onkeypress","_onContainerKeypress"); +this.connect(this.domNode,"onfocus","_onContainerFocus"); +},startupKeyNavChildren:function(){ +dojo.forEach(this.getChildren(),dojo.hitch(this,"_startupChild")); +},addChild:function(_8,_9){ +dijit._KeyNavContainer.superclass.addChild.apply(this,arguments); +this._startupChild(_8); +},focus:function(){ +this.focusFirstChild(); +},focusFirstChild:function(){ +this.focusChild(this._getFirstFocusableChild()); +},focusNext:function(){ +if(this.focusedChild&&this.focusedChild.hasNextFocalNode&&this.focusedChild.hasNextFocalNode()){ +this.focusedChild.focusNext(); +return; +} +var _a=this._getNextFocusableChild(this.focusedChild,1); +if(_a.getFocalNodes){ +this.focusChild(_a,_a.getFocalNodes()[0]); +}else{ +this.focusChild(_a); +} +},focusPrev:function(){ +if(this.focusedChild&&this.focusedChild.hasPrevFocalNode&&this.focusedChild.hasPrevFocalNode()){ +this.focusedChild.focusPrev(); +return; +} +var _b=this._getNextFocusableChild(this.focusedChild,-1); +if(_b.getFocalNodes){ +var _c=_b.getFocalNodes(); +this.focusChild(_b,_c[_c.length-1]); +}else{ +this.focusChild(_b); +} +},focusChild:function(_d,_e){ +if(_d){ +if(this.focusedChild&&_d!==this.focusedChild){ +this._onChildBlur(this.focusedChild); +} +this.focusedChild=_d; +if(_e&&_d.focusFocalNode){ +_d.focusFocalNode(_e); +}else{ +_d.focus(); +} +} +},_startupChild:function(_f){ +if(_f.getFocalNodes){ +dojo.forEach(_f.getFocalNodes(),function(_10){ +dojo.attr(_10,"tabindex",-1); +this._connectNode(_10); +},this); +}else{ +var _11=_f.focusNode||_f.domNode; +if(_f.isFocusable()){ +dojo.attr(_11,"tabindex",-1); +} +this._connectNode(_11); +} +},_connectNode:function(_12){ +this.connect(_12,"onfocus","_onNodeFocus"); +this.connect(_12,"onblur","_onNodeBlur"); +},_onContainerFocus:function(evt){ +if(evt.target!==this.domNode){ +return; +} +this.focusFirstChild(); +dojo.removeAttr(this.domNode,"tabIndex"); +},_onBlur:function(evt){ +if(this.tabIndex){ +dojo.attr(this.domNode,"tabindex",this.tabIndex); +} +},_onContainerKeypress:function(evt){ +if(evt.ctrlKey||evt.altKey){ +return; +} +var _16=this._keyNavCodes[evt.charOrCode]; +if(_16){ +_16(); +dojo.stopEvent(evt); +} +},_onNodeFocus:function(evt){ +var _18=dijit.getEnclosingWidget(evt.target); +if(_18&&_18.isFocusable()){ +this.focusedChild=_18; +} +dojo.stopEvent(evt); +},_onNodeBlur:function(evt){ +dojo.stopEvent(evt); +},_onChildBlur:function(_1a){ +},_getFirstFocusableChild:function(){ +return this._getNextFocusableChild(null,1); +},_getNextFocusableChild:function(_1b,dir){ +if(_1b){ +_1b=this._getSiblingOfChild(_1b,dir); +} +var _1d=this.getChildren(); +for(var i=0;i<_1d.length;i++){ +if(!_1b){ +_1b=_1d[(dir>0)?0:(_1d.length-1)]; +} +if(_1b.isFocusable()){ +return _1b; +} +_1b=this._getSiblingOfChild(_1b,dir); +} +return null; +}}); +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_KeyNavContainer.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Templated.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Templated.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Templated.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Templated.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,156 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._Templated"]){ +dojo._hasResource["dijit._Templated"]=true; +dojo.provide("dijit._Templated"); +dojo.require("dijit._Widget"); +dojo.require("dojo.string"); +dojo.require("dojo.parser"); +dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(_1){ +var _2=this.declaredClass,_3=this; +return dojo.string.substitute(_1,this,function(_4,_5){ +if(_5.charAt(0)=="!"){ +_4=dojo.getObject(_5.substr(1),_3); +} +if(typeof _4=="undefined"){ +throw new Error(_2+" template:"+_5); +} +if(_4==null){ +return ""; +} +return _5.charAt(0)=="!"?_4:_4.toString().replace(/"/g,"""); +},this); +},buildRendering:function(){ +var _6=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache); +var _7; +if(dojo.isString(_6)){ +_7=dojo._toDom(this._stringRepl(_6)); +}else{ +_7=_6.cloneNode(true); +} +this.domNode=_7; +this._attachTemplateNodes(_7); +if(this.widgetsInTemplate){ +var cw=(this._supportingWidgets=dojo.parser.parse(_7)); +this._attachTemplateNodes(cw,function(n,p){ +return n[p]; +}); +} +this._fillContent(this.srcNodeRef); +},_fillContent:function(_b){ +var _c=this.containerNode; +if(_b&&_c){ +while(_b.hasChildNodes()){ +_c.appendChild(_b.firstChild); +} +} +},_attachTemplateNodes:function(_d,_e){ +_e=_e||function(n,p){ +return n.getAttribute(p); +}; +var _11=dojo.isArray(_d)?_d:(_d.all||_d.getElementsByTagName("*")); +var x=dojo.isArray(_d)?0:-1; +for(;x<_11.length;x++){ +var _13=(x==-1)?_d:_11[x]; +if(this.widgetsInTemplate&&_e(_13,"dojoType")){ +continue; +} +var _14=_e(_13,"dojoAttachPoint"); +if(_14){ +var _15,_16=_14.split(/\s*,\s*/); +while((_15=_16.shift())){ +if(dojo.isArray(this[_15])){ +this[_15].push(_13); +}else{ +this[_15]=_13; +} +} +} +var _17=_e(_13,"dojoAttachEvent"); +if(_17){ +var _18,_19=_17.split(/\s*,\s*/); +var _1a=dojo.trim; +while((_18=_19.shift())){ +if(_18){ +var _1b=null; +if(_18.indexOf(":")!=-1){ +var _1c=_18.split(":"); +_18=_1a(_1c[0]); +_1b=_1a(_1c[1]); +}else{ +_18=_1a(_18); +} +if(!_1b){ +_1b=_18; +} +this.connect(_13,_18,_1b); +} +} +} +var _1d=_e(_13,"waiRole"); +if(_1d){ +dijit.setWaiRole(_13,_1d); +} +var _1e=_e(_13,"waiState"); +if(_1e){ +dojo.forEach(_1e.split(/\s*,\s*/),function(_1f){ +if(_1f.indexOf("-")!=-1){ +var _20=_1f.split("-"); +dijit.setWaiState(_13,_20[0],_20[1]); +} +}); +} +} +}}); +dijit._Templated._templateCache={}; +dijit._Templated.getCachedTemplate=function(_21,_22,_23){ +var _24=dijit._Templated._templateCache; +var key=_22||_21; +var _26=_24[key]; +if(_26){ +if(!_26.ownerDocument||_26.ownerDocument==dojo.doc){ +return _26; +} +dojo.destroy(_26); +} +if(!_22){ +_22=dijit._Templated._sanitizeTemplateString(dojo.trim(dojo._getText(_21))); +} +_22=dojo.string.trim(_22); +if(_23||_22.match(/\$\{([^\}]+)\}/g)){ +return (_24[key]=_22); +}else{ +return (_24[key]=dojo._toDom(_22)); +} +}; +dijit._Templated._sanitizeTemplateString=function(_27){ +if(_27){ +_27=_27.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,""); +var _28=_27.match(/]*>\s*([\s\S]+)\s*<\/body>/im); +if(_28){ +_27=_28[1]; +} +}else{ +_27=""; +} +return _27; +}; +if(dojo.isIE){ +dojo.addOnWindowUnload(function(){ +var _29=dijit._Templated._templateCache; +for(var key in _29){ +var _2b=_29[key]; +if(!isNaN(_2b.nodeType)){ +dojo.destroy(_2b); +} +delete _29[key]; +} +}); +} +dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""}); +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Templated.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_TimePicker.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_TimePicker.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_TimePicker.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_TimePicker.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,257 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._TimePicker"]){ +dojo._hasResource["dijit._TimePicker"]=true; +dojo.provide("dijit._TimePicker"); +dojo.require("dijit.form._FormWidget"); +dojo.require("dojo.date.locale"); +dojo.declare("dijit._TimePicker",[dijit._Widget,dijit._Templated],{templateString:"
 
 
\n",baseClass:"dijitTimePic ker",clickableIncrement:"T00:15:00",visibleIncrement:"T01:00:00",visibleRange:"T05:00:00",value:new Date(),_visibleIncrement:2,_clickableIncrement:1,_totalIncrements:10,constraints:{},serialize:dojo.date.stamp.toISOString,_filterString:"",setValue:function(_1){ +dojo.deprecated("dijit._TimePicker:setValue() is deprecated. Use attr('value') instead.","","2.0"); +this.attr("value",_1); +},_setValueAttr:function(_2){ +this.value=_2; +this._showText(); +},onOpen:function(_3){ +if(this._beenOpened&&this.domNode.parentNode){ +var p=dijit.byId(this.domNode.parentNode.dijitPopupParent); +if(p){ +var _5=p.getDisplayedValue(); +if(_5&&!p.parse(_5,p.constraints)){ +this._filterString=_5; +}else{ +this._filterString=""; +} +this._showText(); +} +} +this._beenOpened=true; +},isDisabledDate:function(_6,_7){ +return false; +},_getFilteredNodes:function(_8,_9,_a){ +var _b=[],n,i=_8,_e=this._maxIncrement+Math.abs(i),_f=_a?-1:1,dec=_a?1:0,inc=_a?0:1; +do{ +i=i-dec; +n=this._createOption(i); +if(n){ +_b.push(n); +} +i=i+inc; +}while(_b.length<_9&&(i*_f)<_e); +if(_a){ +_b.reverse(); +} +return _b; +},_showText:function(){ +this.timeMenu.innerHTML=""; +var _12=dojo.date.stamp.fromISOString; +this._clickableIncrementDate=_12(this.clickableIncrement); +this._visibleIncrementDate=_12(this.visibleIncrement); +this._visibleRangeDate=_12(this.visibleRange); +var _13=function(_14){ +return _14.getHours()*60*60+_14.getMinutes()*60+_14.getSeconds(); +}; +var _15=_13(this._clickableIncrementDate); +var _16=_13(this._visibleIncrementDate); +var _17=_13(this._visibleRangeDate); +var _18=this.value.getTime(); +this._refDate=new Date(_18-_18%(_16*1000)); +this._refDate.setFullYear(1970,0,1); +this._clickableIncrement=1; +this._totalIncrements=_17/_15; +this._visibleIncrement=_16/_15; +this._maxIncrement=(60*60*24)/_15; +var _19=this._getFilteredNodes(0,this._totalIncrements>>1,true); +var _1a=this._getFilteredNodes(0,this._totalIncrements>>1,false); +if(_19.length>1){ +_19=_19.slice(_19.length/2); +_1a=_1a.slice(0,_1a.length/2); +} +dojo.forEach(_19.concat(_1a),function(n){ +this.timeMenu.appendChild(n); +},this); +},postCreate:function(){ +if(this.constraints===dijit._TimePicker.prototype.constraints){ +this.constraints={}; +} +dojo.mixin(this,this.constraints); +if(!this.constraints.locale){ +this.constraints.locale=this.lang; +} +this.connect(this.timeMenu,dojo.isIE?"onmousewheel":"DOMMouseScroll","_mouseWheeled"); +var _1c=this; +var _1d=function(){ +_1c._connects.push(dijit.typematic.addMouseListener.apply(null,arguments)); +}; +_1d(this.upArrow,this,this._onArrowUp,1,50); +_1d(this.downArrow,this,this._onArrowDown,1,50); +var _1e=function(cb){ +return function(cnt){ +if(cnt>0){ +cb.call(this,arguments); +} +}; +}; +var _21=function(_22,cb){ +return function(e){ +dojo.stopEvent(e); +dijit.typematic.trigger(e,this,_22,_1e(cb),_22,1,50); +}; +}; +this.connect(this.upArrow,"onmouseover",_21(this.upArrow,this._onArrowUp)); +this.connect(this.downArrow,"onmouseover",_21(this.downArrow,this._onArrowDown)); +this.inherited(arguments); +},_buttonMouse:function(e){ +dojo.toggleClass(e.currentTarget,"dijitButtonNodeHover",e.type=="mouseover"); +},_createOption:function(_26){ +var _27=new Date(this._refDate); +var _28=this._clickableIncrementDate; +_27.setHours(_27.getHours()+_28.getHours()*_26,_27.getMinutes()+_28.getMinutes()*_26,_27.getSeconds()+_28.getSeconds()*_26); +var _29=dojo.date.locale.format(_27,this.constraints); +if(this._filterString&&_29.toLowerCase().indexOf(this._filterString)!==0){ +return null; +} +var div=dojo.create("div",{"class":this.baseClass+"Item"}); +div.date=_27; +div.index=_26; +dojo.create("div",{"class":this.baseClass+"ItemInner",innerHTML:_29},div); +if(_26%this._visibleIncrement<1&&_26%this._visibleIncrement>-1){ +dojo.addClass(div,this.baseClass+"Marker"); +}else{ +if(!(_26%this._clickableIncrement)){ +dojo.addClass(div,this.baseClass+"Tick"); +} +} +if(this.isDisabledDate(_27)){ +dojo.addClass(div,this.baseClass+"ItemDisabled"); +} +if(!dojo.date.compare(this.value,_27,this.constraints.selector)){ +div.selected=true; +dojo.addClass(div,this.baseClass+"ItemSelected"); +if(dojo.hasClass(div,this.baseClass+"Marker")){ +dojo.addClass(div,this.baseClass+"MarkerSelected"); +}else{ +dojo.addClass(div,this.baseClass+"TickSelected"); +} +} +return div; +},_onOptionSelected:function(tgt){ +var _2c=tgt.target.date||tgt.target.parentNode.date; +if(!_2c||this.isDisabledDate(_2c)){ +return; +} +this._highlighted_option=null; +this.attr("value",_2c); +this.onValueSelected(_2c); +},onValueSelected:function(_2d){ +},_highlightOption:function(_2e,_2f){ +if(!_2e){ +return; +} +if(_2f){ +if(this._highlighted_option){ +this._highlightOption(this._highlighted_option,false); +} +this._highlighted_option=_2e; +}else{ +if(this._highlighted_option!==_2e){ +return; +}else{ +this._highlighted_option=null; +} +} +dojo.toggleClass(_2e,this.baseClass+"ItemHover",_2f); +if(dojo.hasClass(_2e,this.baseClass+"Marker")){ +dojo.toggleClass(_2e,this.baseClass+"MarkerHover",_2f); +}else{ +dojo.toggleClass(_2e,this.baseClass+"TickHover",_2f); +} +},onmouseover:function(e){ +var tgr=(e.target.parentNode===this.timeMenu)?e.target:e.target.parentNode; +if(!dojo.hasClass(tgr,this.baseClass+"Item")){ +return; +} +this._highlightOption(tgr,true); +},onmouseout:function(e){ +var tgr=(e.target.parentNode===this.timeMenu)?e.target:e.target.parentNode; +this._highlightOption(tgr,false); +},_mouseWheeled:function(e){ +dojo.stopEvent(e); +var _35=(dojo.isIE?e.wheelDelta:-e.detail); +this[(_35>0?"_onArrowUp":"_onArrowDown")](); +},_onArrowUp:function(_36){ +if(typeof _36=="number"&&_36==-1){ +return; +} +if(!this.timeMenu.childNodes.length){ +return; +} +var _37=this.timeMenu.childNodes[0].index; +var _38=this._getFilteredNodes(_37,1,true); +if(_38.length){ +this.timeMenu.removeChild(this.timeMenu.childNodes[this.timeMenu.childNodes.length-1]); +this.timeMenu.insertBefore(_38[0],this.timeMenu.childNodes[0]); +} +},_onArrowDown:function(_39){ +if(typeof _39=="number"&&_39==-1){ +return; +} +if(!this.timeMenu.childNodes.length){ +return; +} +var _3a=this.timeMenu.childNodes[this.timeMenu.childNodes.length-1].index+1; +var _3b=this._getFilteredNodes(_3a,1,false); +if(_3b.length){ +this.timeMenu.removeChild(this.timeMenu.childNodes[0]); +this.timeMenu.appendChild(_3b[0]); +} +},handleKey:function(e){ +var dk=dojo.keys; +if(e.keyChar||e.charOrCode===dk.BACKSPACE||e.charOrCode==dk.DELETE){ +setTimeout(dojo.hitch(this,function(){ +this._filterString=e.target.value.toLowerCase(); +this._showText(); +}),1); +}else{ +if(e.charOrCode==dk.DOWN_ARROW||e.charOrCode==dk.UP_ARROW){ +dojo.stopEvent(e); +if(this._highlighted_option&&!this._highlighted_option.parentNode){ +this._highlighted_option=null; +} +var _3e=this.timeMenu,tgt=this._highlighted_option||dojo.query("."+this.baseClass+"ItemSelected",_3e)[0]; +if(!tgt){ +tgt=_3e.childNodes[0]; +}else{ +if(_3e.childNodes.length){ +if(e.charOrCode==dk.DOWN_ARROW&&!tgt.nextSibling){ +this._onArrowDown(); +}else{ +if(e.charOrCode==dk.UP_ARROW&&!tgt.previousSibling){ +this._onArrowUp(); +} +} +if(e.charOrCode==dk.DOWN_ARROW){ +tgt=tgt.nextSibling; +}else{ +tgt=tgt.previousSibling; +} +} +} +this._highlightOption(tgt,true); +}else{ +if(this._highlighted_option&&(e.charOrCode==dk.ENTER||e.charOrCode===dk.TAB)){ +if(e.charOrCode==dk.ENTER){ +dojo.stopEvent(e); +} +setTimeout(dojo.hitch(this,function(){ +this._onOptionSelected({target:this._highlighted_option}); +}),1); +} +} +} +}}); +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_TimePicker.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Widget.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Widget.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Widget.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_Widget.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,309 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._Widget"]){ +dojo._hasResource["dijit._Widget"]=true; +dojo.provide("dijit._Widget"); +dojo.require("dijit._base"); +dojo.connect(dojo,"connect",function(_1,_2){ +if(_1&&dojo.isFunction(_1._onConnect)){ +_1._onConnect(_2); +} +}); +dijit._connectOnUseEventHandler=function(_3){ +}; +(function(){ +var _4={}; +var _5=function(dc){ +if(!_4[dc]){ +var r=[]; +var _8; +var _9=dojo.getObject(dc).prototype; +for(var _a in _9){ +if(dojo.isFunction(_9[_a])&&(_8=_a.match(/^_set([a-zA-Z]*)Attr$/))&&_8[1]){ +r.push(_8[1].charAt(0).toLowerCase()+_8[1].substr(1)); +} +} +_4[dc]=r; +} +return _4[dc]||[]; +}; +dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")),postscript :function(_b,_c){ +this.create(_b,_c); +},create:function(_d,_e){ +this.srcNodeRef=dojo.byId(_e); +this._connects=[]; +this._deferredConnects=dojo.clone(this._deferredConnects); +for(var _f in this.attributeMap){ +delete this._deferredConnects[_f]; +} +for(_f in this._deferredConnects){ +if(this[_f]!==dijit._connectOnUseEventHandler){ +delete this._deferredConnects[_f]; +} +} +if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){ +this.id=this.srcNodeRef.id; +} +if(_d){ +this.params=_d; +dojo.mixin(this,_d); +} +this.postMixInProperties(); +if(!this.id){ +this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_")); +} +dijit.registry.add(this); +this.buildRendering(); +if(this.domNode){ +this._applyAttributes(); +var _10=this.srcNodeRef; +if(_10&&_10.parentNode){ +_10.parentNode.replaceChild(this.domNode,_10); +} +for(_f in this.params){ +this._onConnect(_f); +} +} +if(this.domNode){ +this.domNode.setAttribute("widgetId",this.id); +} +this.postCreate(); +if(this.srcNodeRef&&!this.srcNodeRef.parentNode){ +delete this.srcNodeRef; +} +this._created=true; +},_applyAttributes:function(){ +var _11=function(_12,_13){ +if((_13.params&&_12 in _13.params)||_13[_12]){ +_13.attr(_12,_13[_12]); +} +}; +for(var _14 in this.attributeMap){ +_11(_14,this); +} +dojo.forEach(_5(this.declaredClass),function(a){ +if(!(a in this.attributeMap)){ +_11(a,this); +} +},this); +},postMixInProperties:function(){ +},buildRendering:function(){ +this.domNode=this.srcNodeRef||dojo.create("div"); +},postCreate:function(){ +},startup:function(){ +this._started=true; +},destroyRecursive:function(_16){ +this.destroyDescendants(_16); +this.destroy(_16); +},destroy:function(_17){ +this.uninitialize(); +dojo.forEach(this._connects,function(_18){ +dojo.forEach(_18,dojo.disconnect); +}); +dojo.forEach(this._supportingWidgets||[],function(w){ +if(w.destroy){ +w.destroy(); +} +}); +this.destroyRendering(_17); +dijit.registry.remove(this.id); +},destroyRendering:function(_1a){ +if(this.bgIframe){ +this.bgIframe.destroy(_1a); +delete this.bgIframe; +} +if(this.domNode){ +if(!_1a){ +dojo.destroy(this.domNode); +} +delete this.domNode; +} +if(this.srcNodeRef){ +if(!_1a){ +dojo.destroy(this.srcNodeRef); +} +delete this.srcNodeRef; +} +},destroyDescendants:function(_1b){ +dojo.forEach(this.getDescendants(true),function(_1c){ +if(_1c.destroyRecursive){ +_1c.destroyRecursive(_1b); +} +}); +},uninitialize:function(){ +return false; +},onFocus:function(){ +},onBlur:function(){ +},_onFocus:function(e){ +this.onFocus(); +},_onBlur:function(){ +this.onBlur(); +},_onConnect:function(_1e){ +if(_1e in this._deferredConnects){ +var _1f=this[this._deferredConnects[_1e]||"domNode"]; +this.connect(_1f,_1e.toLowerCase(),this[_1e]); +delete this._deferredConnects[_1e]; +} +},_setClassAttr:function(_20){ +var _21=this[this.attributeMap["class"]||"domNode"]; +dojo.removeClass(_21,this["class"]); +this["class"]=_20; +dojo.addClass(_21,_20); +},_setStyleAttr:function(_22){ +var _23=this[this.attributeMap["style"]||"domNode"]; +if(dojo.isObject(_22)){ +dojo.style(_23,_22); +}else{ +if(_23.style.cssText){ +_23.style.cssText+="; "+_22; +}else{ +_23.style.cssText=_22; +} +} +this["style"]=_22; +},setAttribute:function(_24,_25){ +dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0"); +this.attr(_24,_25); +},_attrToDom:function(_26,_27){ +var _28=this.attributeMap[_26]; +dojo.forEach(dojo.isArray(_28)?_28:[_28],function(_29){ +var _2a=this[_29.node||_29||"domNode"]; +var _2b=_29.type||"attribute"; +switch(_2b){ +case "attribute": +if(dojo.isFunction(_27)){ +_27=dojo.hitch(this,_27); +} +if(/^on[A-Z][a-zA-Z]*$/.test(_26)){ +_26=_26.toLowerCase(); +} +dojo.attr(_2a,_26,_27); +break; +case "innerHTML": +_2a.innerHTML=_27; +break; +case "class": +dojo.removeClass(_2a,this[_26]); +dojo.addClass(_2a,_27); +break; +} +},this); +this[_26]=_27; +},attr:function(_2c,_2d){ +var _2e=arguments.length; +if(_2e==1&&!dojo.isString(_2c)){ +for(var x in _2c){ +this.attr(x,_2c[x]); +} +return this; +} +var _30=this._getAttrNames(_2c); +if(_2e==2){ +if(this[_30.s]){ +return this[_30.s](_2d)||this; +}else{ +if(_2c in this.attributeMap){ +this._attrToDom(_2c,_2d); +} +this[_2c]=_2d; +} +return this; +}else{ +if(this[_30.g]){ +return this[_30.g](); +}else{ +return this[_2c]; +} +} +},_attrPairNames:{},_getAttrNames:function(_31){ +var apn=this._attrPairNames; +if(apn[_31]){ +return apn[_31]; +} +var uc=_31.charAt(0).toUpperCase()+_31.substr(1); +return apn[_31]={n:_31+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"}; +},toString:function(){ +return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"; +},getDescendants:function(_34,_35){ +_35=_35||[]; +if(this.containerNode){ +this._getDescendantsHelper(_34,_35,this.containerNode); +} +return _35; +},_getDescendantsHelper:function(_36,_37,_38){ +var _39=dojo.isIE?_38.children:_38.childNodes,i=0,_3b; +while(_3b=_39[i++]){ +if(_3b.nodeType!=1){ +continue; +} +var _3c=_3b.getAttribute("widgetId"); +if(_3c){ +var _3d=dijit.byId(_3c); +_37.push(_3d); +if(!_36){ +_3d.getDescendants(_36,_37); +} +}else{ +this._getDescendantsHelper(_36,_37,_3b); +} +} +},nodesWithKeyClick:["input","button"],connect:function(obj,_3f,_40){ +var d=dojo; +var dco=d.hitch(d,"connect",obj); +var _43=[]; +if(_3f=="ondijitclick"){ +if(!this.nodesWithKeyClick[obj.nodeName]){ +var m=d.hitch(this,_40); +_43.push(dco("onkeydown",this,function(e){ +if(!d.isFF&&e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){ +return m(e); +}else{ +if(e.keyCode==d.keys.SPACE){ +d.stopEvent(e); +} +} +}),dco("onkeyup",this,function(e){ +if(e.keyCode==d.keys.SPACE&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){ +return m(e); +} +})); +if(d.isFF){ +_43.push(dco("onkeypress",this,function(e){ +if(e.keyCode==d.keys.ENTER&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){ +return m(e); +} +})); +} +} +_3f="onclick"; +} +_43.push(dco(_3f,this,_40)); +this._connects.push(_43); +return _43; +},disconnect:function(_48){ +for(var i=0;i= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dijit._base"]){ +dojo._hasResource["dijit._base"]=true; +dojo.provide("dijit._base"); +dojo.require("dijit._base.focus"); +dojo.require("dijit._base.manager"); +dojo.require("dijit._base.place"); +dojo.require("dijit._base.popup"); +dojo.require("dijit._base.scroll"); +dojo.require("dijit._base.sniff"); +dojo.require("dijit._base.typematic"); +dojo.require("dijit._base.wai"); +dojo.require("dijit._base.window"); +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/focus.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/focus.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/focus.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/focus.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,238 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._base.focus"]){ +dojo._hasResource["dijit._base.focus"]=true; +dojo.provide("dijit._base.focus"); +dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){ +var _1=dojo.doc; +if(_1.selection){ +var s=_1.selection; +if(s.type=="Text"){ +return !s.createRange().htmlText.length; +}else{ +return !s.createRange().length; +} +}else{ +var _3=dojo.global; +var _4=_3.getSelection(); +if(dojo.isString(_4)){ +return !_4; +}else{ +return _4.isCollapsed||!_4.toString(); +} +} +},getBookmark:function(){ +var _5,_6=dojo.doc.selection; +if(_6){ +var _7=_6.createRange(); +if(_6.type.toUpperCase()=="CONTROL"){ +if(_7.length){ +_5=[]; +var i=0,_9=_7.length; +while(i<_9){ +_5.push(_7.item(i++)); +} +}else{ +_5=null; +} +}else{ +_5=_7.getBookmark(); +} +}else{ +if(window.getSelection){ +_6=dojo.global.getSelection(); +if(_6){ +_7=_6.getRangeAt(0); +_5=_7.cloneRange(); +} +}else{ +console.warn("No idea how to store the current selection for this browser!"); +} +} +return _5; +},moveToBookmark:function(_a){ +var _b=dojo.doc; +if(_b.selection){ +var _c; +if(dojo.isArray(_a)){ +_c=_b.body.createControlRange(); +dojo.forEach(_a,function(n){ +_c.addElement(n); +}); +}else{ +_c=_b.selection.createRange(); +_c.moveToBookmark(_a); +} +_c.select(); +}else{ +var _e=dojo.global.getSelection&&dojo.global.getSelection(); +if(_e&&_e.removeAllRanges){ +_e.removeAllRanges(); +_e.addRange(_a); +}else{ +console.warn("No idea how to restore selection for this browser!"); +} +} +},getFocus:function(_f,_10){ +return {node:_f&&dojo.isDescendant(dijit._curFocus,_f.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_10||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_10||dojo.global,dijit.getBookmark):null,openedForWindow:_10}; +},focus:function(_11){ +if(!_11){ +return; +} +var _12="node" in _11?_11.node:_11,_13=_11.bookmark,_14=_11.openedForWindow; +if(_12){ +var _15=(_12.tagName.toLowerCase()=="iframe")?_12.contentWindow:_12; +if(_15&&_15.focus){ +try{ +_15.focus(); +} +catch(e){ +} +} +dijit._onFocusNode(_12); +} +if(_13&&dojo.withGlobal(_14||dojo.global,dijit.isCollapsed)){ +if(_14){ +_14.focus(); +} +try{ +dojo.withGlobal(_14||dojo.global,dijit.moveToBookmark,null,[_13]); +} +catch(e){ +} +} +},_activeStack:[],registerIframe:function(_16){ +dijit.registerWin(_16.contentWindow,_16); +},registerWin:function(_17,_18){ +dojo.connect(_17.document,"onmousedown",function(evt){ +dijit._justMouseDowned=true; +setTimeout(function(){ +dijit._justMouseDowned=false; +},0); +dijit._onTouchNode(_18||evt.target||evt.srcElement); +}); +var doc=_17.document; +if(doc){ +if(dojo.isIE){ +doc.attachEvent("onactivate",function(evt){ +if(evt.srcElement.tagName.toLowerCase()!="#document"){ +dijit._onFocusNode(_18||evt.srcElement); +} +}); +doc.attachEvent("ondeactivate",function(evt){ +dijit._onBlurNode(_18||evt.srcElement); +}); +}else{ +doc.addEventListener("focus",function(evt){ +dijit._onFocusNode(_18||evt.target); +},true); +doc.addEventListener("blur",function(evt){ +dijit._onBlurNode(_18||evt.target); +},true); +} +} +doc=null; +},_onBlurNode:function(_1f){ +dijit._prevFocus=dijit._curFocus; +dijit._curFocus=null; +if(dijit._justMouseDowned){ +return; +} +if(dijit._clearActiveWidgetsTimer){ +clearTimeout(dijit._clearActiveWidgetsTimer); +} +dijit._clearActiveWidgetsTimer=setTimeout(function(){ +delete dijit._clearActiveWidgetsTimer; +dijit._setStack([]); +dijit._prevFocus=null; +},100); +},_onTouchNode:function(_20){ +if(dijit._clearActiveWidgetsTimer){ +clearTimeout(dijit._clearActiveWidgetsTimer); +delete dijit._clearActiveWidgetsTimer; +} +var _21=[]; +try{ +while(_20){ +if(_20.dijitPopupParent){ +_20=dijit.byId(_20.dijitPopupParent).domNode; +}else{ +if(_20.tagName&&_20.tagName.toLowerCase()=="body"){ +if(_20===dojo.body()){ +break; +} +_20=dijit.getDocumentWindow(_20.ownerDocument).frameElement; +}else{ +var id=_20.getAttribute&&_20.getAttribute("widgetId"); +if(id){ +_21.unshift(id); +} +_20=_20.parentNode; +} +} +} +} +catch(e){ +} +dijit._setStack(_21); +},_onFocusNode:function(_23){ +if(!_23){ +return; +} +if(_23.nodeType==9){ +return; +} +dijit._onTouchNode(_23); +if(_23==dijit._curFocus){ +return; +} +if(dijit._curFocus){ +dijit._prevFocus=dijit._curFocus; +} +dijit._curFocus=_23; +dojo.publish("focusNode",[_23]); +},_setStack:function(_24){ +var _25=dijit._activeStack; +dijit._activeStack=_24; +for(var _26=0;_26=_26;i--){ +var _28=dijit.byId(_25[i]); +if(_28){ +_28._focused=false; +_28._hasBeenBlurred=true; +if(_28._onBlur){ +_28._onBlur(); +} +if(_28._setStateClass){ +_28._setStateClass(); +} +dojo.publish("widgetBlur",[_28]); +} +} +for(i=_26;i<_24.length;i++){ +_28=dijit.byId(_24[i]); +if(_28){ +_28._focused=true; +if(_28._onFocus){ +_28._onFocus(); +} +if(_28._setStateClass){ +_28._setStateClass(); +} +dojo.publish("widgetFocus",[_28]); +} +} +}}); +dojo.addOnLoad(function(){ +dijit.registerWin(window); +}); +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/focus.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/manager.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/manager.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/manager.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/manager.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,134 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._base.manager"]){ +dojo._hasResource["dijit._base.manager"]=true; +dojo.provide("dijit._base.manager"); +dojo.declare("dijit.WidgetSet",null,{constructor:function(){ +this._hash={}; +},add:function(_1){ +if(this._hash[_1.id]){ +throw new Error("Tried to register widget with id=="+_1.id+" but that id is already registered"); +} +this._hash[_1.id]=_1; +},remove:function(id){ +delete this._hash[id]; +},forEach:function(_3){ +for(var id in this._hash){ +_3(this._hash[id]); +} +},filter:function(_5){ +var _6=new dijit.WidgetSet(); +this.forEach(function(_7){ +if(_5(_7)){ +_6.add(_7); +} +}); +return _6; +},byId:function(id){ +return this._hash[id]; +},byClass:function(_9){ +return this.filter(function(_a){ +return _a.declaredClass==_9; +}); +}}); +dijit.registry=new dijit.WidgetSet(); +dijit._widgetTypeCtr={}; +dijit.getUniqueId=function(_b){ +var id; +do{ +id=_b+"_"+(_b in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_b]:dijit._widgetTypeCtr[_b]=0); +}while(dijit.byId(id)); +return id; +}; +if(dojo.isIE){ +dojo.addOnWindowUnload(function(){ +dijit.registry.forEach(function(_d){ +_d.destroy(); +}); +}); +} +dijit.byId=function(id){ +return (dojo.isString(id))?dijit.registry.byId(id):id; +}; +dijit.byNode=function(_f){ +return dijit.registry.byId(_f.getAttribute("widgetId")); +}; +dijit.getEnclosingWidget=function(_10){ +while(_10){ +if(_10.getAttribute&&_10.getAttribute("widgetId")){ +return dijit.registry.byId(_10.getAttribute("widgetId")); +} +_10=_10.parentNode; +} +return null; +}; +dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true}; +dijit._isElementShown=function(_11){ +var _12=dojo.style(_11); +return (_12.visibility!="hidden")&&(_12.visibility!="collapsed")&&(_12.display!="none")&&(dojo.attr(_11,"type")!="hidden"); +}; +dijit.isTabNavigable=function(_13){ +if(dojo.hasAttr(_13,"disabled")){ +return false; +} +var _14=dojo.hasAttr(_13,"tabindex"); +var _15=dojo.attr(_13,"tabindex"); +if(_14&&_15>=0){ +return true; +} +var _16=_13.nodeName.toLowerCase(); +if(((_16=="a"&&dojo.hasAttr(_13,"href"))||dijit._tabElements[_16])&&(!_14||_15>=0)){ +return true; +} +return false; +}; +dijit._getTabNavigable=function(_17){ +var _18,_19,_1a,_1b,_1c,_1d; +var _1e=function(_1f){ +dojo.query("> *",_1f).forEach(function(_20){ +var _21=dijit._isElementShown(_20); +if(_21&&dijit.isTabNavigable(_20)){ +var _22=dojo.attr(_20,"tabindex"); +if(!dojo.hasAttr(_20,"tabindex")||_22==0){ +if(!_18){ +_18=_20; +} +_19=_20; +}else{ +if(_22>0){ +if(!_1a||_22<_1b){ +_1b=_22; +_1a=_20; +} +if(!_1c||_22>=_1d){ +_1d=_22; +_1c=_20; +} +} +} +} +if(_21&&_20.nodeName.toUpperCase()!="SELECT"){ +_1e(_20); +} +}); +}; +if(dijit._isElementShown(_17)){ +_1e(_17); +} +return {first:_18,last:_19,lowest:_1a,highest:_1c}; +}; +dijit.getFirstInTabbingOrder=function(_23){ +var _24=dijit._getTabNavigable(dojo.byId(_23)); +return _24.lowest?_24.lowest:_24.first; +}; +dijit.getLastInTabbingOrder=function(_25){ +var _26=dijit._getTabNavigable(dojo.byId(_25)); +return _26.last?_26.last:_26.highest; +}; +dijit.defaultDuration=dojo.config["defaultDuration"]||200; +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/manager.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/place.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/place.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/place.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/place.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,91 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._base.place"]){ +dojo._hasResource["dijit._base.place"]=true; +dojo.provide("dijit._base.place"); +dojo.require("dojo.AdapterRegistry"); +dijit.getViewport=function(){ +var _1=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement; +var _2=dojo._docScroll(); +return {w:_1.clientWidth,h:_1.clientHeight,l:_2.x,t:_2.y}; +}; +dijit.placeOnScreen=function(_3,_4,_5,_6){ +var _7=dojo.map(_5,function(_8){ +var c={corner:_8,pos:{x:_4.x,y:_4.y}}; +if(_6){ +c.pos.x+=_8.charAt(1)=="L"?_6.x:-_6.x; +c.pos.y+=_8.charAt(0)=="T"?_6.y:-_6.y; +} +return c; +}); +return dijit._place(_3,_7); +}; +dijit._place=function(_a,_b,_c){ +var _d=dijit.getViewport(); +if(!_a.parentNode||String(_a.parentNode.tagName).toLowerCase()!="body"){ +dojo.body().appendChild(_a); +} +var _e=null; +dojo.some(_b,function(_f){ +var _10=_f.corner; +var pos=_f.pos; +if(_c){ +_c(_a,_f.aroundCorner,_10); +} +var _12=_a.style; +var _13=_12.display; +var _14=_12.visibility; +_12.visibility="hidden"; +_12.display=""; +var mb=dojo.marginBox(_a); +_12.display=_13; +_12.visibility=_14; +var _16=(_10.charAt(1)=="L"?pos.x:Math.max(_d.l,pos.x-mb.w)),_17=(_10.charAt(0)=="T"?pos.y:Math.max(_d.t,pos.y-mb.h)),_18=(_10.charAt(1)=="L"?Math.min(_d.l+_d.w,_16+mb.w):pos.x),_19=(_10.charAt(0)=="T"?Math.min(_d.t+_d.h,_17+mb.h):pos.y),_1a=_18-_16,_1b=_19-_17,_1c=(mb.w-_1a)+(mb.h-_1b); +if(_e==null||_1c<_e.overflow){ +_e={corner:_10,aroundCorner:_f.aroundCorner,x:_16,y:_17,w:_1a,h:_1b,overflow:_1c}; +} +return !_1c; +}); +_a.style.left=_e.x+"px"; +_a.style.top=_e.y+"px"; +if(_e.overflow&&_c){ +_c(_a,_e.aroundCorner,_e.corner); +} +return _e; +}; +dijit.placeOnScreenAroundNode=function(_1d,_1e,_1f,_20){ +_1e=dojo.byId(_1e); +var _21=_1e.style.display; +_1e.style.display=""; +var _22=_1e.offsetWidth; +var _23=_1e.offsetHeight; +var _24=dojo.coords(_1e,true); +_1e.style.display=_21; +return dijit._placeOnScreenAroundRect(_1d,_24.x,_24.y,_22,_23,_1f,_20); +}; +dijit.placeOnScreenAroundRectangle=function(_25,_26,_27,_28){ +return dijit._placeOnScreenAroundRect(_25,_26.x,_26.y,_26.width,_26.height,_27,_28); +}; +dijit._placeOnScreenAroundRect=function(_29,x,y,_2c,_2d,_2e,_2f){ +var _30=[]; +for(var _31 in _2e){ +_30.push({aroundCorner:_31,corner:_2e[_31],pos:{x:x+(_31.charAt(1)=="L"?0:_2c),y:y+(_31.charAt(0)=="T"?0:_2d)}}); +} +return dijit._place(_29,_30,_2f); +}; +dijit.placementRegistry=new dojo.AdapterRegistry(); +dijit.placementRegistry.register("node",function(n,x){ +return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined"; +},dijit.placeOnScreenAroundNode); +dijit.placementRegistry.register("rect",function(n,x){ +return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x; +},dijit.placeOnScreenAroundRectangle); +dijit.placeOnScreenAroundElement=function(_36,_37,_38,_39){ +return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments); +}; +} Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/place.js ------------------------------------------------------------------------------ svn:eol-style = native Added: camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/popup.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/popup.js?rev=755893&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/popup.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/dijit/_base/popup.js Thu Mar 19 10:17:06 2009 @@ -0,0 +1,150 @@ +/* + Copyright (c) 2004-2009, 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 +*/ + + +if(!dojo._hasResource["dijit._base.popup"]){ +dojo._hasResource["dijit._base.popup"]=true; +dojo.provide("dijit._base.popup"); +dojo.require("dijit._base.focus"); +dojo.require("dijit._base.place"); +dojo.require("dijit._base.window"); +dijit.popup=new function(){ +var _1=[],_2=1000,_3=1; +this.prepare=function(_4){ +var s=_4.style; +s.visibility="hidden"; +s.position="absolute"; +s.top="-9999px"; +if(s.display=="none"){ +s.display=""; +} +dojo.body().appendChild(_4); +}; +this.open=function(_6){ +var _7=_6.popup,_8=_6.orient||{"BL":"TL","TL":"BL"},_9=_6.around,id=(_6.around&&_6.around.id)?(_6.around.id+"_dropdown"):("popup_"+_3++); +var _b=dojo.create("div",{id:id,"class":"dijitPopup",style:{zIndex:_2+_1.length,visibility:"hidden"}},dojo.body()); +dijit.setWaiRole(_b,"presentation"); +_b.style.left=_b.style.top="0px"; +if(_6.parent){ +_b.dijitPopupParent=_6.parent.id; +} +var s=_7.domNode.style; +s.display=""; +s.visibility=""; +s.position=""; +s.top="0px"; +_b.appendChild(_7.domNode); +var _d=new dijit.BackgroundIframe(_b); +var _e=_9?dijit.placeOnScreenAroundElement(_b,_9,_8,_7.orient?dojo.hitch(_7,"orient"):null):dijit.placeOnScreen(_b,_6,_8=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_6.padding); +_b.style.visibility="visible"; +var _f=[]; +var _10=function(){ +for(var pi=_1.length-1;pi>0&&_1[pi].parent===_1[pi-1].widget;pi--){ +} +return _1[pi]; +}; +_f.push(dojo.connect(_b,"onkeypress",this,function(evt){ +if(evt.charOrCode==dojo.keys.ESCAPE&&_6.onCancel){ +dojo.stopEvent(evt); +_6.onCancel(); +}else{ +if(evt.charOrCode===dojo.keys.TAB){ +dojo.stopEvent(evt); +var _13=_10(); +if(_13&&_13.onCancel){ +_13.onCancel(); +} +} +} +})); +if(_7.onCancel){ +_f.push(dojo.connect(_7,"onCancel",null,_6.onCancel)); +} +_f.push(dojo.connect(_7,_7.onExecute?"onExecute":"onChange",null,function(){ +var _14=_10(); +if(_14&&_14.onExecute){ +_14.onExecute(); +} +})); +_1.push({wrapper:_b,iframe:_d,widget:_7,parent:_6.parent,onExecute:_6.onExecute,onCancel:_6.onCancel,onClose:_6.onClose,handlers:_f}); +if(_7.onOpen){ +_7.onOpen(_e); +} +return _e; +}; +this.close=function(_15){ +while(dojo.some(_1,function(_16){ +return _16.widget==_15; +})){ +var top=_1.pop(),_18=top.wrapper,_19=top.iframe,_1a=top.widget,_1b=top.onClose; +if(_1a.onClose){ +_1a.onClose(); +} +dojo.forEach(top.handlers,dojo.disconnect); +if(!_1a||!_1a.domNode){ +return; +} +this.prepare(_1a.domNode); +_19.destroy(); +dojo.destroy(_18); +if(_1b){ +_1b(); +} +} +}; +}(); +dijit._frames=new function(){ +var _1c=[]; +this.pop=function(){ +var _1d; +if(_1c.length){ +_1d=_1c.pop(); +_1d.style.display=""; +}else{ +if(dojo.isIE){ +var _1e=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\""; +var _1f="