http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/date/locale.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/date/locale.js b/components/camel-web/src/main/webapp/js/dojo/date/locale.js deleted file mode 100644 index bf889d0..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/date/locale.js +++ /dev/null @@ -1,494 +0,0 @@ -/* - 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["dojo.date.locale"]){ -dojo._hasResource["dojo.date.locale"]=true; -dojo.provide("dojo.date.locale"); -dojo.require("dojo.date"); -dojo.require("dojo.cldr.supplemental"); -dojo.require("dojo.regexp"); -dojo.require("dojo.string"); -dojo.require("dojo.i18n"); -dojo.requireLocalization("dojo.cldr","gregorian",null,"ROOT,ar,ca,cs,da,de,el,en,en-au,en-ca,en-gb,es,es-es,fi,fr,he,hu,it,it-it,ja,ko,ko-kr,nb,nl,pl,pt,pt-br,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-cn,zh-tw"); -(function(){ -function _1(_2,_3,_4,_5){ -return _5.replace(/([a-z])\1*/ig,function(_6){ -var s,_8; -var c=_6.charAt(0); -var l=_6.length; -var _b=["abbr","wide","narrow"]; -switch(c){ -case "G": -s=_3[(l<4)?"eraAbbr":"eraNames"][_2.getFullYear()<0?0:1]; -break; -case "y": -s=_2.getFullYear(); -switch(l){ -case 1: -break; -case 2: -if(!_4){ -s=String(s); -s=s.substr(s.length-2); -break; -} -default: -_8=true; -} -break; -case "Q": -case "q": -s=Math.ceil((_2.getMonth()+1)/3); -_8=true; -break; -case "M": -var m=_2.getMonth(); -if(l<3){ -s=m+1; -_8=true; -}else{ -var _d=["months","format",_b[l-3]].join("-"); -s=_3[_d][m]; -} -break; -case "w": -var _e=0; -s=dojo.date.locale._getWeekOfYear(_2,_e); -_8=true; -break; -case "d": -s=_2.getDate(); -_8=true; -break; -case "D": -s=dojo.date.locale._getDayOfYear(_2); -_8=true; -break; -case "E": -var d=_2.getDay(); -if(l<3){ -s=d+1; -_8=true; -}else{ -var _10=["days","format",_b[l-3]].join("-"); -s=_3[_10][d]; -} -break; -case "a": -var _11=(_2.getHours()<12)?"am":"pm"; -s=_3[_11]; -break; -case "h": -case "H": -case "K": -case "k": -var h=_2.getHours(); -switch(c){ -case "h": -s=(h%12)||12; -break; -case "H": -s=h; -break; -case "K": -s=(h%12); -break; -case "k": -s=h||24; -break; -} -_8=true; -break; -case "m": -s=_2.getMinutes(); -_8=true; -break; -case "s": -s=_2.getSeconds(); -_8=true; -break; -case "S": -s=Math.round(_2.getMilliseconds()*Math.pow(10,l-3)); -_8=true; -break; -case "v": -case "z": -s=dojo.date.getTimezoneName(_2); -if(s){ -break; -} -l=4; -case "Z": -var _13=_2.getTimezoneOffset(); -var tz=[(_13<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_13)/60),2),dojo.string.pad(Math.abs(_13)%60,2)]; -if(l==4){ -tz.splice(0,0,"GMT"); -tz.splice(3,0,":"); -} -s=tz.join(""); -break; -default: -throw new Error("dojo.date.locale.format: invalid pattern char: "+_5); -} -if(_8){ -s=dojo.string.pad(s,l); -} -return s; -}); -}; -dojo.date.locale.format=function(_15,_16){ -_16=_16||{}; -var _17=dojo.i18n.normalizeLocale(_16.locale); -var _18=_16.formatLength||"short"; -var _19=dojo.date.locale._getGregorianBundle(_17); -var str=[]; -var _1b=dojo.hitch(this,_1,_15,_19,_16.fullYear); -if(_16.selector=="year"){ -var _1c=_15.getFullYear(); -if(_17.match(/^zh|^ja/)){ -_1c+="å¹´"; -} -return _1c; -} -if(_16.selector!="time"){ -var _1d=_16.datePattern||_19["dateFormat-"+_18]; -if(_1d){ -str.push(_1e(_1d,_1b)); -} -} -if(_16.selector!="date"){ -var _1f=_16.timePattern||_19["timeFormat-"+_18]; -if(_1f){ -str.push(_1e(_1f,_1b)); -} -} -var _20=str.join(" "); -return _20; -}; -dojo.date.locale.regexp=function(_21){ -return dojo.date.locale._parseInfo(_21).regexp; -}; -dojo.date.locale._parseInfo=function(_22){ -_22=_22||{}; -var _23=dojo.i18n.normalizeLocale(_22.locale); -var _24=dojo.date.locale._getGregorianBundle(_23); -var _25=_22.formatLength||"short"; -var _26=_22.datePattern||_24["dateFormat-"+_25]; -var _27=_22.timePattern||_24["timeFormat-"+_25]; -var _28; -if(_22.selector=="date"){ -_28=_26; -}else{ -if(_22.selector=="time"){ -_28=_27; -}else{ -_28=_26+" "+_27; -} -} -var _29=[]; -var re=_1e(_28,dojo.hitch(this,_2b,_29,_24,_22)); -return {regexp:re,tokens:_29,bundle:_24}; -}; -dojo.date.locale.parse=function(_2c,_2d){ -var _2e=dojo.date.locale._parseInfo(_2d); -var _2f=_2e.tokens,_30=_2e.bundle; -var re=new RegExp("^"+_2e.regexp+"$",_2e.strict?"":"i"); -var _32=re.exec(_2c); -if(!_32){ -return null; -} -var _33=["abbr","wide","narrow"]; -var _34=[1970,0,1,0,0,0,0]; -var _35=""; -var _36=dojo.every(_32,function(v,i){ -if(!i){ -return true; -} -var _39=_2f[i-1]; -var l=_39.length; -switch(_39.charAt(0)){ -case "y": -if(l!=2&&_2d.strict){ -_34[0]=v; -}else{ -if(v<100){ -v=Number(v); -var _3b=""+new Date().getFullYear(); -var _3c=_3b.substring(0,2)*100; -var _3d=Math.min(Number(_3b.substring(2,4))+20,99); -var num=(v<_3d)?_3c+v:_3c-100+v; -_34[0]=num; -}else{ -if(_2d.strict){ -return false; -} -_34[0]=v; -} -} -break; -case "M": -if(l>2){ -var _3f=_30["months-format-"+_33[l-3]].concat(); -if(!_2d.strict){ -v=v.replace(".","").toLowerCase(); -_3f=dojo.map(_3f,function(s){ -return s.replace(".","").toLowerCase(); -}); -} -v=dojo.indexOf(_3f,v); -if(v==-1){ -return false; -} -}else{ -v--; -} -_34[1]=v; -break; -case "E": -case "e": -var _41=_30["days-format-"+_33[l-3]].concat(); -if(!_2d.strict){ -v=v.toLowerCase(); -_41=dojo.map(_41,function(d){ -return d.toLowerCase(); -}); -} -v=dojo.indexOf(_41,v); -if(v==-1){ -return false; -} -break; -case "D": -_34[1]=0; -case "d": -_34[2]=v; -break; -case "a": -var am=_2d.am||_30.am; -var pm=_2d.pm||_30.pm; -if(!_2d.strict){ -var _45=/\./g; -v=v.replace(_45,"").toLowerCase(); -am=am.replace(_45,"").toLowerCase(); -pm=pm.replace(_45,"").toLowerCase(); -} -if(_2d.strict&&v!=am&&v!=pm){ -return false; -} -_35=(v==pm)?"p":(v==am)?"a":""; -break; -case "K": -if(v==24){ -v=0; -} -case "h": -case "H": -case "k": -if(v>23){ -return false; -} -_34[3]=v; -break; -case "m": -_34[4]=v; -break; -case "s": -_34[5]=v; -break; -case "S": -_34[6]=v; -} -return true; -}); -var _46=+_34[3]; -if(_35==="p"&&_46<12){ -_34[3]=_46+12; -}else{ -if(_35==="a"&&_46==12){ -_34[3]=0; -} -} -var _47=new Date(_34[0],_34[1],_34[2],_34[3],_34[4],_34[5],_34[6]); -if(_2d.strict){ -_47.setFullYear(_34[0]); -} -var _48=_2f.join(""); -if(!_36||(_48.indexOf("M")!=-1&&_47.getMonth()!=_34[1])||(_48.indexOf("d")!=-1&&_47.getDate()!=_34[2])){ -return null; -} -return _47; -}; -function _1e(_49,_4a,_4b,_4c){ -var _4d=function(x){ -return x; -}; -_4a=_4a||_4d; -_4b=_4b||_4d; -_4c=_4c||_4d; -var _4f=_49.match(/(''|[^'])+/g); -var _50=_49.charAt(0)=="'"; -dojo.forEach(_4f,function(_51,i){ -if(!_51){ -_4f[i]=""; -}else{ -_4f[i]=(_50?_4b:_4a)(_51); -_50=!_50; -} -}); -return _4c(_4f.join("")); -}; -function _2b(_53,_54,_55,_56){ -_56=dojo.regexp.escapeString(_56); -if(!_55.strict){ -_56=_56.replace(" a"," ?a"); -} -return _56.replace(/([a-z])\1*/ig,function(_57){ -var s; -var c=_57.charAt(0); -var l=_57.length; -var p2="",p3=""; -if(_55.strict){ -if(l>1){ -p2="0"+"{"+(l-1)+"}"; -} -if(l>2){ -p3="0"+"{"+(l-2)+"}"; -} -}else{ -p2="0?"; -p3="0{0,2}"; -} -switch(c){ -case "y": -s="\\d{2,4}"; -break; -case "M": -s=(l>2)?"\\S+?":p2+"[1-9]|1[0-2]"; -break; -case "D": -s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]"; -break; -case "d": -s="[12]\\d|"+p2+"[1-9]|3[01]"; -break; -case "w": -s=p2+"[1-9]|[1-4][0-9]|5[0-3]"; -break; -case "E": -s="\\S+"; -break; -case "h": -s=p2+"[1-9]|1[0-2]"; -break; -case "k": -s=p2+"\\d|1[01]"; -break; -case "H": -s=p2+"\\d|1\\d|2[0-3]"; -break; -case "K": -s=p2+"[1-9]|1\\d|2[0-4]"; -break; -case "m": -case "s": -s="[0-5]\\d"; -break; -case "S": -s="\\d{"+l+"}"; -break; -case "a": -var am=_55.am||_54.am||"AM"; -var pm=_55.pm||_54.pm||"PM"; -if(_55.strict){ -s=am+"|"+pm; -}else{ -s=am+"|"+pm; -if(am!=am.toLowerCase()){ -s+="|"+am.toLowerCase(); -} -if(pm!=pm.toLowerCase()){ -s+="|"+pm.toLowerCase(); -} -if(s.indexOf(".")!=-1){ -s+="|"+s.replace(/\./g,""); -} -} -s=s.replace(/\./g,"\\."); -break; -default: -s=".*"; -} -if(_53){ -_53.push(_57); -} -return "("+s+")"; -}).replace(/[\xa0 ]/g,"[\\s\\xa0]"); -}; -})(); -(function(){ -var _5f=[]; -dojo.date.locale.addCustomFormats=function(_60,_61){ -_5f.push({pkg:_60,name:_61}); -}; -dojo.date.locale._getGregorianBundle=function(_62){ -var _63={}; -dojo.forEach(_5f,function(_64){ -var _65=dojo.i18n.getLocalization(_64.pkg,_64.name,_62); -_63=dojo.mixin(_63,_65); -},this); -return _63; -}; -})(); -dojo.date.locale.addCustomFormats("dojo.cldr","gregorian"); -dojo.date.locale.getNames=function(_66,_67,_68,_69){ -var _6a; -var _6b=dojo.date.locale._getGregorianBundle(_69); -var _6c=[_66,_68,_67]; -if(_68=="standAlone"){ -var key=_6c.join("-"); -_6a=_6b[key]; -if(_6a[0]==1){ -_6a=undefined; -} -} -_6c[1]="format"; -return (_6a||_6b[_6c.join("-")]).concat(); -}; -dojo.date.locale.displayPattern=function(_6e,_6f){ -var _70="GyMdkHmsSEDFwWahKzYeugAZvcL",_71=dojo.date.locale._getGregorianBundle(_6f).patternChars; -return dojo.map(_6e,function(c){ -var i=_70.indexOf(c); -return i<0?c:_71.charAt(i); -}).join(""); -}; -dojo.date.locale.isWeekend=function(_74,_75){ -var _76=dojo.cldr.supplemental.getWeekend(_75); -var day=(_74||new Date()).getDay(); -if(_76.end<_76.start){ -_76.end+=7; -if(day<_76.start){ -day+=7; -} -} -return day>=_76.start&&day<=_76.end; -}; -dojo.date.locale._getDayOfYear=function(_78){ -return dojo.date.difference(new Date(_78.getFullYear(),0,1,_78.getHours()),_78)+1; -}; -dojo.date.locale._getWeekOfYear=function(_79,_7a){ -if(arguments.length==1){ -_7a=0; -} -var _7b=new Date(_79.getFullYear(),0,1).getDay(); -var adj=(_7b-_7a+7)%7; -var _7d=Math.floor((dojo.date.locale._getDayOfYear(_79)+adj-1)/7); -if(_7b==_7a){ -_7d++; -} -return _7d; -}; -}
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/date/stamp.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/date/stamp.js b/components/camel-web/src/main/webapp/js/dojo/date/stamp.js deleted file mode 100644 index 7f39a67..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/date/stamp.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - 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["dojo.date.stamp"]){ -dojo._hasResource["dojo.date.stamp"]=true; -dojo.provide("dojo.date.stamp"); -dojo.date.stamp.fromISOString=function(_1,_2){ -if(!dojo.date.stamp._isoRegExp){ -dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/; -} -var _3=dojo.date.stamp._isoRegExp.exec(_1); -var _4=null; -if(_3){ -_3.shift(); -if(_3[1]){ -_3[1]--; -} -if(_3[6]){ -_3[6]*=1000; -} -if(_2){ -_2=new Date(_2); -dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(_5){ -return _2["get"+_5](); -}).forEach(function(_6,_7){ -if(_3[_7]===undefined){ -_3[_7]=_6; -} -}); -} -_4=new Date(_3[0]||1970,_3[1]||0,_3[2]||1,_3[3]||0,_3[4]||0,_3[5]||0,_3[6]||0); -var _8=0; -var _9=_3[7]&&_3[7].charAt(0); -if(_9!="Z"){ -_8=((_3[8]||0)*60)+(Number(_3[9])||0); -if(_9!="-"){ -_8*=-1; -} -} -if(_9){ -_8-=_4.getTimezoneOffset(); -} -if(_8){ -_4.setTime(_4.getTime()+_8*60000); -} -} -return _4; -}; -dojo.date.stamp.toISOString=function(_a,_b){ -var _=function(n){ -return (n<10)?"0"+n:n; -}; -_b=_b||{}; -var _e=[]; -var _f=_b.zulu?"getUTC":"get"; -var _10=""; -if(_b.selector!="time"){ -var _11=_a[_f+"FullYear"](); -_10=["0000".substr((_11+"").length)+_11,_(_a[_f+"Month"]()+1),_(_a[_f+"Date"]())].join("-"); -} -_e.push(_10); -if(_b.selector!="date"){ -var _12=[_(_a[_f+"Hours"]()),_(_a[_f+"Minutes"]()),_(_a[_f+"Seconds"]())].join(":"); -var _13=_a[_f+"Milliseconds"](); -if(_b.milliseconds){ -_12+="."+(_13<100?"0":"")+_(_13); -} -if(_b.zulu){ -_12+="Z"; -}else{ -if(_b.selector!="time"){ -var _14=_a.getTimezoneOffset(); -var _15=Math.abs(_14); -_12+=(_14>0?"-":"+")+_(Math.floor(_15/60))+":"+_(_15%60); -} -} -_e.push(_12); -} -return _e.join("T"); -}; -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/Avatar.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/Avatar.js b/components/camel-web/src/main/webapp/js/dojo/dnd/Avatar.js deleted file mode 100644 index a2ae36d..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/Avatar.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - 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["dojo.dnd.Avatar"]){ -dojo._hasResource["dojo.dnd.Avatar"]=true; -dojo.provide("dojo.dnd.Avatar"); -dojo.require("dojo.dnd.common"); -dojo.declare("dojo.dnd.Avatar",null,{constructor:function(_1){ -this.manager=_1; -this.construct(); -},construct:function(){ -var a=dojo.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),b=dojo.create("tbody",null,a),tr=dojo.create("tr",null,b),td=dojo.create("td",{innerHTML:this._generateText()},tr),k=Math.min(5,this.manager.nodes.length),i=0,_8=this.manager.source,_9; -dojo.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 _a=dojo.create("table"),_b=dojo.create("tbody",null,_a); -_b.appendChild(_9); -_9=_a; -} -} -_9.id=""; -tr=dojo.create("tr",null,b); -td=dojo.create("td",null,tr); -td.appendChild(_9); -dojo.attr(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}}); -} -this.node=a; -},destroy:function(){ -dojo.destroy(this.node); -this.node=false; -},update:function(){ -dojo[(this.manager.canDropFlag?"add":"remove")+"Class"](this.node,"dojoDndAvatarCanDrop"); -dojo.query("tr.dojoDndAvatarHeader td",this.node).forEach(function(_c){ -_c.innerHTML=this._generateText(); -},this); -},_generateText:function(){ -return this.manager.nodes.length.toString(); -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/Container.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/Container.js b/components/camel-web/src/main/webapp/js/dojo/dnd/Container.js deleted file mode 100644 index c2cf260..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/Container.js +++ /dev/null @@ -1,233 +0,0 @@ -/* - 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["dojo.dnd.Container"]){ -dojo._hasResource["dojo.dnd.Container"]=true; -dojo.provide("dojo.dnd.Container"); -dojo.require("dojo.dnd.common"); -dojo.require("dojo.parser"); -dojo.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(_1,_2){ -this.node=dojo.byId(_1); -if(!_2){ -_2={}; -} -this.creator=_2.creator||null; -this.skipForm=_2.skipForm; -this.parent=_2.dropParent&&dojo.byId(_2.dropParent); -this.map={}; -this.current=null; -this.containerState=""; -dojo.addClass(this.node,"dojoDndContainer"); -if(!(_2&&_2._skipStartup)){ -this.startup(); -} -this.events=[dojo.connect(this.node,"onmouseover",this,"onMouseOver"),dojo.connect(this.node,"onmouseout",this,"onMouseOut"),dojo.connect(this.node,"ondragstart",this,"onSelectStart"),dojo.connect(this.node,"onselectstart",this,"onSelectStart")]; -},creator:function(){ -},getItem:function(_3){ -return this.map[_3]; -},setItem:function(_4,_5){ -this.map[_4]=_5; -},delItem:function(_6){ -delete this.map[_6]; -},forInItems:function(f,o){ -o=o||dojo.global; -var m=this.map,e=dojo.dnd._empty; -for(var i in m){ -if(i in e){ -continue; -} -f.call(o,m[i],i,this); -} -return o; -},clearItems:function(){ -this.map={}; -},getAllNodes:function(){ -return dojo.query("> .dojoDndItem",this.parent); -},sync:function(){ -var _c={}; -this.getAllNodes().forEach(function(_d){ -if(_d.id){ -var _e=this.getItem(_d.id); -if(_e){ -_c[_d.id]=_e; -return; -} -}else{ -_d.id=dojo.dnd.getUniqueId(); -} -var _f=_d.getAttribute("dndType"),_10=_d.getAttribute("dndData"); -_c[_d.id]={data:_10||_d.innerHTML,type:_f?_f.split(/\s*,\s*/):["text"]}; -},this); -this.map=_c; -return this; -},insertNodes:function(_11,_12,_13){ -if(!this.parent.firstChild){ -_13=null; -}else{ -if(_12){ -if(!_13){ -_13=this.parent.firstChild; -} -}else{ -if(_13){ -_13=_13.nextSibling; -} -} -} -if(_13){ -for(var i=0;i<_11.length;++i){ -var t=this._normalizedCreator(_11[i]); -this.setItem(t.node.id,{data:t.data,type:t.type}); -this.parent.insertBefore(t.node,_13); -} -}else{ -for(var i=0;i<_11.length;++i){ -var t=this._normalizedCreator(_11[i]); -this.setItem(t.node.id,{data:t.data,type:t.type}); -this.parent.appendChild(t.node); -} -} -return this; -},destroy:function(){ -dojo.forEach(this.events,dojo.disconnect); -this.clearItems(); -this.node=this.parent=this.current=null; -},markupFactory:function(_16,_17){ -_16._skipStartup=true; -return new dojo.dnd.Container(_17,_16); -},startup:function(){ -if(!this.parent){ -this.parent=this.node; -if(this.parent.tagName.toLowerCase()=="table"){ -var c=this.parent.getElementsByTagName("tbody"); -if(c&&c.length){ -this.parent=c[0]; -} -} -} -this.defaultCreator=dojo.dnd._defaultCreator(this.parent); -this.sync(); -},onMouseOver:function(e){ -var n=e.relatedTarget; -while(n){ -if(n==this.node){ -break; -} -try{ -n=n.parentNode; -} -catch(x){ -n=null; -} -} -if(!n){ -this._changeState("Container","Over"); -this.onOverEvent(); -} -n=this._getChildByEvent(e); -if(this.current==n){ -return; -} -if(this.current){ -this._removeItemClass(this.current,"Over"); -} -if(n){ -this._addItemClass(n,"Over"); -} -this.current=n; -},onMouseOut:function(e){ -for(var n=e.relatedTarget;n;){ -if(n==this.node){ -return; -} -try{ -n=n.parentNode; -} -catch(x){ -n=null; -} -} -if(this.current){ -this._removeItemClass(this.current,"Over"); -this.current=null; -} -this._changeState("Container",""); -this.onOutEvent(); -},onSelectStart:function(e){ -if(!this.skipForm||!dojo.dnd.isFormElement(e)){ -dojo.stopEvent(e); -} -},onOverEvent:function(){ -},onOutEvent:function(){ -},_changeState:function(_1e,_1f){ -var _20="dojoDnd"+_1e; -var _21=_1e.toLowerCase()+"State"; -dojo.removeClass(this.node,_20+this[_21]); -dojo.addClass(this.node,_20+_1f); -this[_21]=_1f; -},_addItemClass:function(_22,_23){ -dojo.addClass(_22,"dojoDndItem"+_23); -},_removeItemClass:function(_24,_25){ -dojo.removeClass(_24,"dojoDndItem"+_25); -},_getChildByEvent:function(e){ -var _27=e.target; -if(_27){ -for(var _28=_27.parentNode;_28;_27=_28,_28=_27.parentNode){ -if(_28==this.parent&&dojo.hasClass(_27,"dojoDndItem")){ -return _27; -} -} -} -return null; -},_normalizedCreator:function(_29,_2a){ -var t=(this.creator||this.defaultCreator).call(this,_29,_2a); -if(!dojo.isArray(t.type)){ -t.type=["text"]; -} -if(!t.node.id){ -t.node.id=dojo.dnd.getUniqueId(); -} -dojo.addClass(t.node,"dojoDndItem"); -return t; -}}); -dojo.dnd._createNode=function(tag){ -if(!tag){ -return dojo.dnd._createSpan; -} -return function(_2d){ -return dojo.create(tag,{innerHTML:_2d}); -}; -}; -dojo.dnd._createTrTd=function(_2e){ -var tr=dojo.create("tr"); -dojo.create("td",{innerHTML:_2e},tr); -return tr; -}; -dojo.dnd._createSpan=function(_30){ -return dojo.create("span",{innerHTML:_30}); -}; -dojo.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"}; -dojo.dnd._defaultCreator=function(_31){ -var tag=_31.tagName.toLowerCase(); -var c=tag=="tbody"||tag=="thead"?dojo.dnd._createTrTd:dojo.dnd._createNode(dojo.dnd._defaultCreatorNodes[tag]); -return function(_34,_35){ -var _36=_34&&dojo.isObject(_34),_37,_38,n; -if(_36&&_34.tagName&&_34.nodeType&&_34.getAttribute){ -_37=_34.getAttribute("dndData")||_34.innerHTML; -_38=_34.getAttribute("dndType"); -_38=_38?_38.split(/\s*,\s*/):["text"]; -n=_34; -}else{ -_37=(_36&&_34.data)?_34.data:_34; -_38=(_36&&_34.type)?_34.type:["text"]; -n=(_35=="avatar"?dojo.dnd._createSpan:c)(String(_37)); -} -n.id=dojo.dnd.getUniqueId(); -return {node:n,data:_37,type:_38}; -}; -}; -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/Manager.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/Manager.js b/components/camel-web/src/main/webapp/js/dojo/dnd/Manager.js deleted file mode 100644 index eff1bcf..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/Manager.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - 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["dojo.dnd.Manager"]){ -dojo._hasResource["dojo.dnd.Manager"]=true; -dojo.provide("dojo.dnd.Manager"); -dojo.require("dojo.dnd.common"); -dojo.require("dojo.dnd.autoscroll"); -dojo.require("dojo.dnd.Avatar"); -dojo.declare("dojo.dnd.Manager",null,{constructor:function(){ -this.avatar=null; -this.source=null; -this.nodes=[]; -this.copy=true; -this.target=null; -this.canDropFlag=false; -this.events=[]; -},OFFSET_X:16,OFFSET_Y:16,overSource:function(_1){ -if(this.avatar){ -this.target=(_1&&_1.targetState!="Disabled")?_1:null; -this.canDropFlag=Boolean(this.target); -this.avatar.update(); -} -dojo.publish("/dnd/source/over",[_1]); -},outSource:function(_2){ -if(this.avatar){ -if(this.target==_2){ -this.target=null; -this.canDropFlag=false; -this.avatar.update(); -dojo.publish("/dnd/source/over",[null]); -} -}else{ -dojo.publish("/dnd/source/over",[null]); -} -},startDrag:function(_3,_4,_5){ -this.source=_3; -this.nodes=_4; -this.copy=Boolean(_5); -this.avatar=this.makeAvatar(); -dojo.body().appendChild(this.avatar.node); -dojo.publish("/dnd/start",[_3,_4,this.copy]); -this.events=[dojo.connect(dojo.doc,"onmousemove",this,"onMouseMove"),dojo.connect(dojo.doc,"onmouseup",this,"onMouseUp"),dojo.connect(dojo.doc,"onkeydown",this,"onKeyDown"),dojo.connect(dojo.doc,"onkeyup",this,"onKeyUp"),dojo.connect(dojo.doc,"ondragstart",dojo.stopEvent),dojo.connect(dojo.body(),"onselectstart",dojo.stopEvent)]; -var c="dojoDnd"+(_5?"Copy":"Move"); -dojo.addClass(dojo.body(),c); -},canDrop:function(_7){ -var _8=Boolean(this.target&&_7); -if(this.canDropFlag!=_8){ -this.canDropFlag=_8; -this.avatar.update(); -} -},stopDrag:function(){ -dojo.removeClass(dojo.body(),"dojoDndCopy"); -dojo.removeClass(dojo.body(),"dojoDndMove"); -dojo.forEach(this.events,dojo.disconnect); -this.events=[]; -this.avatar.destroy(); -this.avatar=null; -this.source=this.target=null; -this.nodes=[]; -},makeAvatar:function(){ -return new dojo.dnd.Avatar(this); -},updateAvatar:function(){ -this.avatar.update(); -},onMouseMove:function(e){ -var a=this.avatar; -if(a){ -dojo.dnd.autoScrollNodes(e); -var s=a.node.style; -s.left=(e.pageX+this.OFFSET_X)+"px"; -s.top=(e.pageY+this.OFFSET_Y)+"px"; -var _c=Boolean(this.source.copyState(dojo.dnd.getCopyKeyState(e))); -if(this.copy!=_c){ -this._setCopyStatus(_c); -} -} -},onMouseUp:function(e){ -if(this.avatar){ -if(this.target&&this.canDropFlag){ -var _e=Boolean(this.source.copyState(dojo.dnd.getCopyKeyState(e))),_f=[this.source,this.nodes,_e,this.target]; -dojo.publish("/dnd/drop/before",_f); -dojo.publish("/dnd/drop",_f); -}else{ -dojo.publish("/dnd/cancel"); -} -this.stopDrag(); -} -},onKeyDown:function(e){ -if(this.avatar){ -switch(e.keyCode){ -case dojo.keys.CTRL: -var _11=Boolean(this.source.copyState(true)); -if(this.copy!=_11){ -this._setCopyStatus(_11); -} -break; -case dojo.keys.ESCAPE: -dojo.publish("/dnd/cancel"); -this.stopDrag(); -break; -} -} -},onKeyUp:function(e){ -if(this.avatar&&e.keyCode==dojo.keys.CTRL){ -var _13=Boolean(this.source.copyState(false)); -if(this.copy!=_13){ -this._setCopyStatus(_13); -} -} -},_setCopyStatus:function(_14){ -this.copy=_14; -this.source._markDndStatus(this.copy); -this.updateAvatar(); -dojo.removeClass(dojo.body(),"dojoDnd"+(this.copy?"Move":"Copy")); -dojo.addClass(dojo.body(),"dojoDnd"+(this.copy?"Copy":"Move")); -}}); -dojo.dnd._manager=null; -dojo.dnd.manager=function(){ -if(!dojo.dnd._manager){ -dojo.dnd._manager=new dojo.dnd.Manager(); -} -return dojo.dnd._manager; -}; -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/Moveable.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/Moveable.js b/components/camel-web/src/main/webapp/js/dojo/dnd/Moveable.js deleted file mode 100644 index f40872d..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/Moveable.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - 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["dojo.dnd.Moveable"]){ -dojo._hasResource["dojo.dnd.Moveable"]=true; -dojo.provide("dojo.dnd.Moveable"); -dojo.require("dojo.dnd.Mover"); -dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(_1,_2){ -this.node=dojo.byId(_1); -if(!_2){ -_2={}; -} -this.handle=_2.handle?dojo.byId(_2.handle):null; -if(!this.handle){ -this.handle=this.node; -} -this.delay=_2.delay>0?_2.delay:0; -this.skip=_2.skip; -this.mover=_2.mover?_2.mover:dojo.dnd.Mover; -this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")]; -},markupFactory:function(_3,_4){ -return new dojo.dnd.Moveable(_4,_3); -},destroy:function(){ -dojo.forEach(this.events,dojo.disconnect); -this.events=this.node=this.handle=null; -},onMouseDown:function(e){ -if(this.skip&&dojo.dnd.isFormElement(e)){ -return; -} -if(this.delay){ -this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp")); -this._lastX=e.pageX; -this._lastY=e.pageY; -}else{ -this.onDragDetected(e); -} -dojo.stopEvent(e); -},onMouseMove:function(e){ -if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){ -this.onMouseUp(e); -this.onDragDetected(e); -} -dojo.stopEvent(e); -},onMouseUp:function(e){ -for(var i=0;i<2;++i){ -dojo.disconnect(this.events.pop()); -} -dojo.stopEvent(e); -},onSelectStart:function(e){ -if(!this.skip||!dojo.dnd.isFormElement(e)){ -dojo.stopEvent(e); -} -},onDragDetected:function(e){ -new this.mover(this.node,e,this); -},onMoveStart:function(_b){ -dojo.publish("/dnd/move/start",[_b]); -dojo.addClass(dojo.body(),"dojoMove"); -dojo.addClass(this.node,"dojoMoveItem"); -},onMoveStop:function(_c){ -dojo.publish("/dnd/move/stop",[_c]); -dojo.removeClass(dojo.body(),"dojoMove"); -dojo.removeClass(this.node,"dojoMoveItem"); -},onFirstMove:function(_d){ -},onMove:function(_e,_f){ -this.onMoving(_e,_f); -var s=_e.node.style; -s.left=_f.l+"px"; -s.top=_f.t+"px"; -this.onMoved(_e,_f); -},onMoving:function(_11,_12){ -},onMoved:function(_13,_14){ -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/Mover.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/Mover.js b/components/camel-web/src/main/webapp/js/dojo/dnd/Mover.js deleted file mode 100644 index aca35aa..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/Mover.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - 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["dojo.dnd.Mover"]){ -dojo._hasResource["dojo.dnd.Mover"]=true; -dojo.provide("dojo.dnd.Mover"); -dojo.require("dojo.dnd.common"); -dojo.require("dojo.dnd.autoscroll"); -dojo.declare("dojo.dnd.Mover",null,{constructor:function(_1,e,_3){ -this.node=dojo.byId(_1); -this.marginBox={l:e.pageX,t:e.pageY}; -this.mouseButton=e.button; -var h=this.host=_3,d=_1.ownerDocument,_6=dojo.connect(d,"onmousemove",this,"onFirstMove"); -this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"onMouseUp"),dojo.connect(d,"ondragstart",dojo.stopEvent),dojo.connect(d.body,"onselectstart",dojo.stopEvent),_6]; -if(h&&h.onMoveStart){ -h.onMoveStart(this); -} -},onMouseMove:function(e){ -dojo.dnd.autoScroll(e); -var m=this.marginBox; -this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY}); -dojo.stopEvent(e); -},onMouseUp:function(e){ -if(dojo.isWebKit&&dojo.dnd._isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){ -this.destroy(); -} -dojo.stopEvent(e); -},onFirstMove:function(){ -var s=this.node.style,l,t,h=this.host; -switch(s.position){ -case "relative": -case "absolute": -l=Math.round(parseFloat(s.left)); -t=Math.round(parseFloat(s.top)); -break; -default: -s.position="absolute"; -var m=dojo.marginBox(this.node); -var b=dojo.doc.body; -var bs=dojo.getComputedStyle(b); -var bm=dojo._getMarginBox(b,bs); -var bc=dojo._getContentBox(b,bs); -l=m.l-(bc.l-bm.l); -t=m.t-(bc.t-bm.t); -break; -} -this.marginBox.l=l-this.marginBox.l; -this.marginBox.t=t-this.marginBox.t; -if(h&&h.onFirstMove){ -h.onFirstMove(this); -} -dojo.disconnect(this.events.pop()); -},destroy:function(){ -dojo.forEach(this.events,dojo.disconnect); -var h=this.host; -if(h&&h.onMoveStop){ -h.onMoveStop(this); -} -this.events=this.node=this.host=null; -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/Selector.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/Selector.js b/components/camel-web/src/main/webapp/js/dojo/dnd/Selector.js deleted file mode 100644 index c0b5c1f..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/Selector.js +++ /dev/null @@ -1,239 +0,0 @@ -/* - 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["dojo.dnd.Selector"]){ -dojo._hasResource["dojo.dnd.Selector"]=true; -dojo.provide("dojo.dnd.Selector"); -dojo.require("dojo.dnd.common"); -dojo.require("dojo.dnd.Container"); -dojo.declare("dojo.dnd.Selector",dojo.dnd.Container,{constructor:function(_1,_2){ -if(!_2){ -_2={}; -} -this.singular=_2.singular; -this.autoSync=_2.autoSync; -this.selection={}; -this.anchor=null; -this.simpleSelection=false; -this.events.push(dojo.connect(this.node,"onmousedown",this,"onMouseDown"),dojo.connect(this.node,"onmouseup",this,"onMouseUp")); -},singular:false,getSelectedNodes:function(){ -var t=new dojo.NodeList(); -var e=dojo.dnd._empty; -for(var i in this.selection){ -if(i in e){ -continue; -} -t.push(dojo.byId(i)); -} -return t; -},selectNone:function(){ -return this._removeSelection()._removeAnchor(); -},selectAll:function(){ -this.forInItems(function(_6,id){ -this._addItemClass(dojo.byId(id),"Selected"); -this.selection[id]=1; -},this); -return this._removeAnchor(); -},deleteSelectedNodes:function(){ -var e=dojo.dnd._empty; -for(var i in this.selection){ -if(i in e){ -continue; -} -var n=dojo.byId(i); -this.delItem(i); -dojo.destroy(n); -} -this.anchor=null; -this.selection={}; -return this; -},forInSelectedItems:function(f,o){ -o=o||dojo.global; -var s=this.selection,e=dojo.dnd._empty; -for(var i in s){ -if(i in e){ -continue; -} -f.call(o,this.getItem(i),i,this); -} -},sync:function(){ -dojo.dnd.Selector.superclass.sync.call(this); -if(this.anchor){ -if(!this.getItem(this.anchor.id)){ -this.anchor=null; -} -} -var t=[],e=dojo.dnd._empty; -for(var i in this.selection){ -if(i in e){ -continue; -} -if(!this.getItem(i)){ -t.push(i); -} -} -dojo.forEach(t,function(i){ -delete this.selection[i]; -},this); -return this; -},insertNodes:function(_14,_15,_16,_17){ -var _18=this._normalizedCreator; -this._normalizedCreator=function(_19,_1a){ -var t=_18.call(this,_19,_1a); -if(_14){ -if(!this.anchor){ -this.anchor=t.node; -this._removeItemClass(t.node,"Selected"); -this._addItemClass(this.anchor,"Anchor"); -}else{ -if(this.anchor!=t.node){ -this._removeItemClass(t.node,"Anchor"); -this._addItemClass(t.node,"Selected"); -} -} -this.selection[t.node.id]=1; -}else{ -this._removeItemClass(t.node,"Selected"); -this._removeItemClass(t.node,"Anchor"); -} -return t; -}; -dojo.dnd.Selector.superclass.insertNodes.call(this,_15,_16,_17); -this._normalizedCreator=_18; -return this; -},destroy:function(){ -dojo.dnd.Selector.superclass.destroy.call(this); -this.selection=this.anchor=null; -},markupFactory:function(_1c,_1d){ -_1c._skipStartup=true; -return new dojo.dnd.Selector(_1d,_1c); -},onMouseDown:function(e){ -if(this.autoSync){ -this.sync(); -} -if(!this.current){ -return; -} -if(!this.singular&&!dojo.dnd.getCopyKeyState(e)&&!e.shiftKey&&(this.current.id in this.selection)){ -this.simpleSelection=true; -if(e.button===dojo.dnd._lmb){ -dojo.stopEvent(e); -} -return; -} -if(!this.singular&&e.shiftKey){ -if(!dojo.dnd.getCopyKeyState(e)){ -this._removeSelection(); -} -var c=this.getAllNodes(); -if(c.length){ -if(!this.anchor){ -this.anchor=c[0]; -this._addItemClass(this.anchor,"Anchor"); -} -this.selection[this.anchor.id]=1; -if(this.anchor!=this.current){ -var i=0; -for(;i<c.length;++i){ -var _21=c[i]; -if(_21==this.anchor||_21==this.current){ -break; -} -} -for(++i;i<c.length;++i){ -var _21=c[i]; -if(_21==this.anchor||_21==this.current){ -break; -} -this._addItemClass(_21,"Selected"); -this.selection[_21.id]=1; -} -this._addItemClass(this.current,"Selected"); -this.selection[this.current.id]=1; -} -} -}else{ -if(this.singular){ -if(this.anchor==this.current){ -if(dojo.dnd.getCopyKeyState(e)){ -this.selectNone(); -} -}else{ -this.selectNone(); -this.anchor=this.current; -this._addItemClass(this.anchor,"Anchor"); -this.selection[this.current.id]=1; -} -}else{ -if(dojo.dnd.getCopyKeyState(e)){ -if(this.anchor==this.current){ -delete this.selection[this.anchor.id]; -this._removeAnchor(); -}else{ -if(this.current.id in this.selection){ -this._removeItemClass(this.current,"Selected"); -delete this.selection[this.current.id]; -}else{ -if(this.anchor){ -this._removeItemClass(this.anchor,"Anchor"); -this._addItemClass(this.anchor,"Selected"); -} -this.anchor=this.current; -this._addItemClass(this.current,"Anchor"); -this.selection[this.current.id]=1; -} -} -}else{ -if(!(this.current.id in this.selection)){ -this.selectNone(); -this.anchor=this.current; -this._addItemClass(this.current,"Anchor"); -this.selection[this.current.id]=1; -} -} -} -} -dojo.stopEvent(e); -},onMouseUp:function(e){ -if(!this.simpleSelection){ -return; -} -this.simpleSelection=false; -this.selectNone(); -if(this.current){ -this.anchor=this.current; -this._addItemClass(this.anchor,"Anchor"); -this.selection[this.current.id]=1; -} -},onMouseMove:function(e){ -this.simpleSelection=false; -},onOverEvent:function(){ -this.onmousemoveEvent=dojo.connect(this.node,"onmousemove",this,"onMouseMove"); -},onOutEvent:function(){ -dojo.disconnect(this.onmousemoveEvent); -delete this.onmousemoveEvent; -},_removeSelection:function(){ -var e=dojo.dnd._empty; -for(var i in this.selection){ -if(i in e){ -continue; -} -var _26=dojo.byId(i); -if(_26){ -this._removeItemClass(_26,"Selected"); -} -} -this.selection={}; -return this; -},_removeAnchor:function(){ -if(this.anchor){ -this._removeItemClass(this.anchor,"Anchor"); -this.anchor=null; -} -return this; -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/Source.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/Source.js b/components/camel-web/src/main/webapp/js/dojo/dnd/Source.js deleted file mode 100644 index 0078417..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/Source.js +++ /dev/null @@ -1,297 +0,0 @@ -/* - 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["dojo.dnd.Source"]){ -dojo._hasResource["dojo.dnd.Source"]=true; -dojo.provide("dojo.dnd.Source"); -dojo.require("dojo.dnd.Selector"); -dojo.require("dojo.dnd.Manager"); -dojo.declare("dojo.dnd.Source",dojo.dnd.Selector,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],constructor:function(_1,_2){ -dojo.mixin(this,dojo.mixin({},_2)); -var _3=this.accept; -if(_3.length){ -this.accept={}; -for(var i=0;i<_3.length;++i){ -this.accept[_3[i]]=1; -} -} -this.isDragging=false; -this.mouseDown=false; -this.targetAnchor=null; -this.targetBox=null; -this.before=true; -this._lastX=0; -this._lastY=0; -this.sourceState=""; -if(this.isSource){ -dojo.addClass(this.node,"dojoDndSource"); -} -this.targetState=""; -if(this.accept){ -dojo.addClass(this.node,"dojoDndTarget"); -} -if(this.horizontal){ -dojo.addClass(this.node,"dojoDndHorizontal"); -} -this.topics=[dojo.subscribe("/dnd/source/over",this,"onDndSourceOver"),dojo.subscribe("/dnd/start",this,"onDndStart"),dojo.subscribe("/dnd/drop",this,"onDndDrop"),dojo.subscribe("/dnd/cancel",this,"onDndCancel")]; -},checkAcceptance:function(_5,_6){ -if(this==_5){ -return !this.copyOnly||this.selfAccept; -} -for(var i=0;i<_6.length;++i){ -var _8=_5.getItem(_6[i].id).type; -var _9=false; -for(var j=0;j<_8.length;++j){ -if(_8[j] in this.accept){ -_9=true; -break; -} -} -if(!_9){ -return false; -} -} -return true; -},copyState:function(_b,_c){ -if(_b){ -return true; -} -if(arguments.length<2){ -_c=this==dojo.dnd.manager().target; -} -if(_c){ -if(this.copyOnly){ -return this.selfCopy; -} -}else{ -return this.copyOnly; -} -return false; -},destroy:function(){ -dojo.dnd.Source.superclass.destroy.call(this); -dojo.forEach(this.topics,dojo.unsubscribe); -this.targetAnchor=null; -},markupFactory:function(_d,_e){ -_d._skipStartup=true; -return new dojo.dnd.Source(_e,_d); -},onMouseMove:function(e){ -if(this.isDragging&&this.targetState=="Disabled"){ -return; -} -dojo.dnd.Source.superclass.onMouseMove.call(this,e); -var m=dojo.dnd.manager(); -if(this.isDragging){ -var _11=false; -if(this.current){ -if(!this.targetBox||this.targetAnchor!=this.current){ -this.targetBox={xy:dojo.coords(this.current,true),w:this.current.offsetWidth,h:this.current.offsetHeight}; -} -if(this.horizontal){ -_11=(e.pageX-this.targetBox.xy.x)<(this.targetBox.w/2); -}else{ -_11=(e.pageY-this.targetBox.xy.y)<(this.targetBox.h/2); -} -} -if(this.current!=this.targetAnchor||_11!=this.before){ -this._markTargetAnchor(_11); -m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection)); -} -}else{ -if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){ -var _12=this.getSelectedNodes(); -if(_12.length){ -m.startDrag(this,_12,this.copyState(dojo.dnd.getCopyKeyState(e),true)); -} -} -} -},onMouseDown:function(e){ -if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!dojo.dnd.isFormElement(e))){ -this.mouseDown=true; -this._lastX=e.pageX; -this._lastY=e.pageY; -dojo.dnd.Source.superclass.onMouseDown.call(this,e); -} -},onMouseUp:function(e){ -if(this.mouseDown){ -this.mouseDown=false; -dojo.dnd.Source.superclass.onMouseUp.call(this,e); -} -},onDndSourceOver:function(_15){ -if(this!=_15){ -this.mouseDown=false; -if(this.targetAnchor){ -this._unmarkTargetAnchor(); -} -}else{ -if(this.isDragging){ -var m=dojo.dnd.manager(); -m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection))); -} -} -},onDndStart:function(_17,_18,_19){ -if(this.autoSync){ -this.sync(); -} -if(this.isSource){ -this._changeState("Source",this==_17?(_19?"Copied":"Moved"):""); -} -var _1a=this.accept&&this.checkAcceptance(_17,_18); -this._changeState("Target",_1a?"":"Disabled"); -if(this==_17){ -dojo.dnd.manager().overSource(this); -} -this.isDragging=true; -},onDndDrop:function(_1b,_1c,_1d,_1e){ -if(this==_1e){ -this.onDrop(_1b,_1c,_1d); -} -this.onDndCancel(); -},onDndCancel:function(){ -if(this.targetAnchor){ -this._unmarkTargetAnchor(); -this.targetAnchor=null; -} -this.before=true; -this.isDragging=false; -this.mouseDown=false; -this._changeState("Source",""); -this._changeState("Target",""); -},onDrop:function(_1f,_20,_21){ -if(this!=_1f){ -this.onDropExternal(_1f,_20,_21); -}else{ -this.onDropInternal(_20,_21); -} -},onDropExternal:function(_22,_23,_24){ -var _25=this._normalizedCreator; -if(this.creator){ -this._normalizedCreator=function(_26,_27){ -return _25.call(this,_22.getItem(_26.id).data,_27); -}; -}else{ -if(_24){ -this._normalizedCreator=function(_28,_29){ -var t=_22.getItem(_28.id); -var n=_28.cloneNode(true); -n.id=dojo.dnd.getUniqueId(); -return {node:n,data:t.data,type:t.type}; -}; -}else{ -this._normalizedCreator=function(_2c,_2d){ -var t=_22.getItem(_2c.id); -_22.delItem(_2c.id); -return {node:_2c,data:t.data,type:t.type}; -}; -} -} -this.selectNone(); -if(!_24&&!this.creator){ -_22.selectNone(); -} -this.insertNodes(true,_23,this.before,this.current); -if(!_24&&this.creator){ -_22.deleteSelectedNodes(); -} -this._normalizedCreator=_25; -},onDropInternal:function(_2f,_30){ -var _31=this._normalizedCreator; -if(this.current&&this.current.id in this.selection){ -return; -} -if(_30){ -if(this.creator){ -this._normalizedCreator=function(_32,_33){ -return _31.call(this,this.getItem(_32.id).data,_33); -}; -}else{ -this._normalizedCreator=function(_34,_35){ -var t=this.getItem(_34.id); -var n=_34.cloneNode(true); -n.id=dojo.dnd.getUniqueId(); -return {node:n,data:t.data,type:t.type}; -}; -} -}else{ -if(!this.current){ -return; -} -this._normalizedCreator=function(_38,_39){ -var t=this.getItem(_38.id); -return {node:_38,data:t.data,type:t.type}; -}; -} -this._removeSelection(); -this.insertNodes(true,_2f,this.before,this.current); -this._normalizedCreator=_31; -},onDraggingOver:function(){ -},onDraggingOut:function(){ -},onOverEvent:function(){ -dojo.dnd.Source.superclass.onOverEvent.call(this); -dojo.dnd.manager().overSource(this); -if(this.isDragging&&this.targetState!="Disabled"){ -this.onDraggingOver(); -} -},onOutEvent:function(){ -dojo.dnd.Source.superclass.onOutEvent.call(this); -dojo.dnd.manager().outSource(this); -if(this.isDragging&&this.targetState!="Disabled"){ -this.onDraggingOut(); -} -},_markTargetAnchor:function(_3b){ -if(this.current==this.targetAnchor&&this.before==_3b){ -return; -} -if(this.targetAnchor){ -this._removeItemClass(this.targetAnchor,this.before?"Before":"After"); -} -this.targetAnchor=this.current; -this.targetBox=null; -this.before=_3b; -if(this.targetAnchor){ -this._addItemClass(this.targetAnchor,this.before?"Before":"After"); -} -},_unmarkTargetAnchor:function(){ -if(!this.targetAnchor){ -return; -} -this._removeItemClass(this.targetAnchor,this.before?"Before":"After"); -this.targetAnchor=null; -this.targetBox=null; -this.before=true; -},_markDndStatus:function(_3c){ -this._changeState("Source",_3c?"Copied":"Moved"); -},_legalMouseDown:function(e){ -if(!dojo.dnd._isLmbPressed(e)){ -return false; -} -if(!this.withHandles){ -return true; -} -for(var _3e=e.target;_3e&&_3e!==this.node;_3e=_3e.parentNode){ -if(dojo.hasClass(_3e,"dojoDndHandle")){ -return true; -} -if(dojo.hasClass(_3e,"dojoDndItem")){ -break; -} -} -return false; -}}); -dojo.declare("dojo.dnd.Target",dojo.dnd.Source,{constructor:function(_3f,_40){ -this.isSource=false; -dojo.removeClass(this.node,"dojoDndSource"); -},markupFactory:function(_41,_42){ -_41._skipStartup=true; -return new dojo.dnd.Target(_42,_41); -}}); -dojo.declare("dojo.dnd.AutoSource",dojo.dnd.Source,{constructor:function(_43,_44){ -this.autoSync=true; -},markupFactory:function(_45,_46){ -_45._skipStartup=true; -return new dojo.dnd.AutoSource(_46,_45); -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/TimedMoveable.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/TimedMoveable.js b/components/camel-web/src/main/webapp/js/dojo/dnd/TimedMoveable.js deleted file mode 100644 index 669dd25..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/TimedMoveable.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - 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["dojo.dnd.TimedMoveable"]){ -dojo._hasResource["dojo.dnd.TimedMoveable"]=true; -dojo.provide("dojo.dnd.TimedMoveable"); -dojo.require("dojo.dnd.Moveable"); -(function(){ -var _1=dojo.dnd.Moveable.prototype.onMove; -dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(_2,_3){ -if(!_3){ -_3={}; -} -if(_3.timeout&&typeof _3.timeout=="number"&&_3.timeout>=0){ -this.timeout=_3.timeout; -} -},markupFactory:function(_4,_5){ -return new dojo.dnd.TimedMoveable(_5,_4); -},onMoveStop:function(_6){ -if(_6._timer){ -clearTimeout(_6._timer); -_1.call(this,_6,_6._leftTop); -} -dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments); -},onMove:function(_7,_8){ -_7._leftTop=_8; -if(!_7._timer){ -var _t=this; -_7._timer=setTimeout(function(){ -_7._timer=null; -_1.call(_t,_7,_7._leftTop); -},this.timeout); -} -}}); -})(); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/autoscroll.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/autoscroll.js b/components/camel-web/src/main/webapp/js/dojo/dnd/autoscroll.js deleted file mode 100644 index 63a4a03..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/autoscroll.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - 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["dojo.dnd.autoscroll"]){ -dojo._hasResource["dojo.dnd.autoscroll"]=true; -dojo.provide("dojo.dnd.autoscroll"); -dojo.dnd.getViewport=function(){ -var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body(); -if(dojo.isMozilla){ -return {w:dd.clientWidth,h:w.innerHeight}; -}else{ -if(!dojo.isOpera&&w.innerWidth){ -return {w:w.innerWidth,h:w.innerHeight}; -}else{ -if(!dojo.isOpera&&dd&&dd.clientWidth){ -return {w:dd.clientWidth,h:dd.clientHeight}; -}else{ -if(b.clientWidth){ -return {w:b.clientWidth,h:b.clientHeight}; -} -} -} -} -return null; -}; -dojo.dnd.V_TRIGGER_AUTOSCROLL=32; -dojo.dnd.H_TRIGGER_AUTOSCROLL=32; -dojo.dnd.V_AUTOSCROLL_VALUE=16; -dojo.dnd.H_AUTOSCROLL_VALUE=16; -dojo.dnd.autoScroll=function(e){ -var v=dojo.dnd.getViewport(),dx=0,dy=0; -if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){ -dx=-dojo.dnd.H_AUTOSCROLL_VALUE; -}else{ -if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){ -dx=dojo.dnd.H_AUTOSCROLL_VALUE; -} -} -if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){ -dy=-dojo.dnd.V_AUTOSCROLL_VALUE; -}else{ -if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){ -dy=dojo.dnd.V_AUTOSCROLL_VALUE; -} -} -window.scrollBy(dx,dy); -}; -dojo.dnd._validNodes={"div":1,"p":1,"td":1}; -dojo.dnd._validOverflow={"auto":1,"scroll":1}; -dojo.dnd.autoScrollNodes=function(e){ -for(var n=e.target;n;){ -if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){ -var s=dojo.getComputedStyle(n); -if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){ -var b=dojo._getContentBox(n,s),t=dojo._abs(n,true); -var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0; -if(dojo.isWebKit||dojo.isOpera){ -rx+=dojo.body().scrollLeft,ry+=dojo.body().scrollTop; -} -if(rx>0&&rx<b.w){ -if(rx<w){ -dx=-w; -}else{ -if(rx>b.w-w){ -dx=w; -} -} -} -if(ry>0&&ry<b.h){ -if(ry<h){ -dy=-h; -}else{ -if(ry>b.h-h){ -dy=h; -} -} -} -var _14=n.scrollLeft,_15=n.scrollTop; -n.scrollLeft=n.scrollLeft+dx; -n.scrollTop=n.scrollTop+dy; -if(_14!=n.scrollLeft||_15!=n.scrollTop){ -return; -} -} -} -try{ -n=n.parentNode; -} -catch(x){ -n=null; -} -} -dojo.dnd.autoScroll(e); -}; -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/common.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/common.js b/components/camel-web/src/main/webapp/js/dojo/dnd/common.js deleted file mode 100644 index 3a0b444..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/common.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - 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["dojo.dnd.common"]){ -dojo._hasResource["dojo.dnd.common"]=true; -dojo.provide("dojo.dnd.common"); -dojo.dnd._isMac=navigator.appVersion.indexOf("Macintosh")>=0; -dojo.dnd._copyKey=dojo.dnd._isMac?"metaKey":"ctrlKey"; -dojo.dnd.getCopyKeyState=function(e){ -return e[dojo.dnd._copyKey]; -}; -dojo.dnd._uniqueId=0; -dojo.dnd.getUniqueId=function(){ -var id; -do{ -id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId); -}while(dojo.byId(id)); -return id; -}; -dojo.dnd._empty={}; -dojo.dnd.isFormElement=function(e){ -var t=e.target; -if(t.nodeType==3){ -t=t.parentNode; -} -return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0; -}; -dojo.dnd._lmb=dojo.isIE?1:0; -dojo.dnd._isLmbPressed=dojo.isIE?function(e){ -return e.button&1; -}:function(e){ -return e.button===0; -}; -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojo/dnd/move.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojo/dnd/move.js b/components/camel-web/src/main/webapp/js/dojo/dnd/move.js deleted file mode 100644 index 54070f6..0000000 --- a/components/camel-web/src/main/webapp/js/dojo/dnd/move.js +++ /dev/null @@ -1,125 +0,0 @@ -/* - 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["dojo.dnd.move"]){ -dojo._hasResource["dojo.dnd.move"]=true; -dojo.provide("dojo.dnd.move"); -dojo.require("dojo.dnd.Mover"); -dojo.require("dojo.dnd.Moveable"); -dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){ -},within:false,markupFactory:function(_1,_2){ -return new dojo.dnd.move.constrainedMoveable(_2,_1); -},constructor:function(_3,_4){ -if(!_4){ -_4={}; -} -this.constraints=_4.constraints; -this.within=_4.within; -},onFirstMove:function(_5){ -var c=this.constraintBox=this.constraints.call(this,_5); -c.r=c.l+c.w; -c.b=c.t+c.h; -if(this.within){ -var mb=dojo.marginBox(_5.node); -c.r-=mb.w; -c.b-=mb.h; -} -},onMove:function(_8,_9){ -var c=this.constraintBox,s=_8.node.style; -s.left=(_9.l<c.l?c.l:c.r<_9.l?c.r:_9.l)+"px"; -s.top=(_9.t<c.t?c.t:c.b<_9.t?c.b:_9.t)+"px"; -}}); -dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_c,_d){ -return new dojo.dnd.move.boxConstrainedMoveable(_d,_c); -},constructor:function(_e,_f){ -var box=_f&&_f.box; -this.constraints=function(){ -return box; -}; -}}); -dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_11,_12){ -return new dojo.dnd.move.parentConstrainedMoveable(_12,_11); -},constructor:function(_13,_14){ -var _15=_14&&_14.area; -this.constraints=function(){ -var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s); -if(_15=="margin"){ -return mb; -} -var t=dojo._getMarginExtents(n,s); -mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h; -if(_15=="border"){ -return mb; -} -t=dojo._getBorderExtents(n,s); -mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h; -if(_15=="padding"){ -return mb; -} -t=dojo._getPadExtents(n,s); -mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h; -return mb; -}; -}}); -dojo.dnd.move.constrainedMover=function(fun,_1b){ -dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead"); -var _1c=function(_1d,e,_1f){ -dojo.dnd.Mover.call(this,_1d,e,_1f); -}; -dojo.extend(_1c,dojo.dnd.Mover.prototype); -dojo.extend(_1c,{onMouseMove:function(e){ -dojo.dnd.autoScroll(e); -var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY; -l=l<c.l?c.l:c.r<l?c.r:l; -t=t<c.t?c.t:c.b<t?c.b:t; -this.host.onMove(this,{l:l,t:t}); -},onFirstMove:function(){ -dojo.dnd.Mover.prototype.onFirstMove.call(this); -var c=this.constraintBox=fun.call(this); -c.r=c.l+c.w; -c.b=c.t+c.h; -if(_1b){ -var mb=dojo.marginBox(this.node); -c.r-=mb.w; -c.b-=mb.h; -} -}}); -return _1c; -}; -dojo.dnd.move.boxConstrainedMover=function(box,_28){ -dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead"); -return dojo.dnd.move.constrainedMover(function(){ -return box; -},_28); -}; -dojo.dnd.move.parentConstrainedMover=function(_29,_2a){ -dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead"); -var fun=function(){ -var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s); -if(_29=="margin"){ -return mb; -} -var t=dojo._getMarginExtents(n,s); -mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h; -if(_29=="border"){ -return mb; -} -t=dojo._getBorderExtents(n,s); -mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h; -if(_29=="padding"){ -return mb; -} -t=dojo._getPadExtents(n,s); -mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h; -return mb; -}; -return dojo.dnd.move.constrainedMover(fun,_2a); -}; -dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover; -dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover; -dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover; -}