http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/encoding/digests/MD5.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/encoding/digests/MD5.js b/components/camel-web/src/main/webapp/js/dojox/encoding/digests/MD5.js deleted file mode 100644 index 274621a..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/encoding/digests/MD5.js +++ /dev/null @@ -1,158 +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["dojox.encoding.digests.MD5"]){ -dojo._hasResource["dojox.encoding.digests.MD5"]=true; -dojo.provide("dojox.encoding.digests.MD5"); -dojo.require("dojox.encoding.digests._base"); -(function(){ -var _1=dojox.encoding.digests; -var _2=8; -function R(n,c){ -return (n<<c)|(n>>>(32-c)); -}; -function C(q,a,b,x,s,t){ -return _1.addWords(R(_1.addWords(_1.addWords(a,q),_1.addWords(x,t)),s),b); -}; -function FF(a,b,c,d,x,s,t){ -return C((b&c)|((~b)&d),a,b,x,s,t); -}; -function GG(a,b,c,d,x,s,t){ -return C((b&d)|(c&(~d)),a,b,x,s,t); -}; -function HH(a,b,c,d,x,s,t){ -return C(b^c^d,a,b,x,s,t); -}; -function II(a,b,c,d,x,s,t){ -return C(c^(b|(~d)),a,b,x,s,t); -}; -function _2d(x,len){ -x[len>>5]|=128<<((len)%32); -x[(((len+64)>>>9)<<4)+14]=len; -var a=1732584193; -var b=-271733879; -var c=-1732584194; -var d=271733878; -for(var i=0;i<x.length;i+=16){ -var _35=a; -var _36=b; -var _37=c; -var _38=d; -a=FF(a,b,c,d,x[i+0],7,-680876936); -d=FF(d,a,b,c,x[i+1],12,-389564586); -c=FF(c,d,a,b,x[i+2],17,606105819); -b=FF(b,c,d,a,x[i+3],22,-1044525330); -a=FF(a,b,c,d,x[i+4],7,-176418897); -d=FF(d,a,b,c,x[i+5],12,1200080426); -c=FF(c,d,a,b,x[i+6],17,-1473231341); -b=FF(b,c,d,a,x[i+7],22,-45705983); -a=FF(a,b,c,d,x[i+8],7,1770035416); -d=FF(d,a,b,c,x[i+9],12,-1958414417); -c=FF(c,d,a,b,x[i+10],17,-42063); -b=FF(b,c,d,a,x[i+11],22,-1990404162); -a=FF(a,b,c,d,x[i+12],7,1804603682); -d=FF(d,a,b,c,x[i+13],12,-40341101); -c=FF(c,d,a,b,x[i+14],17,-1502002290); -b=FF(b,c,d,a,x[i+15],22,1236535329); -a=GG(a,b,c,d,x[i+1],5,-165796510); -d=GG(d,a,b,c,x[i+6],9,-1069501632); -c=GG(c,d,a,b,x[i+11],14,643717713); -b=GG(b,c,d,a,x[i+0],20,-373897302); -a=GG(a,b,c,d,x[i+5],5,-701558691); -d=GG(d,a,b,c,x[i+10],9,38016083); -c=GG(c,d,a,b,x[i+15],14,-660478335); -b=GG(b,c,d,a,x[i+4],20,-405537848); -a=GG(a,b,c,d,x[i+9],5,568446438); -d=GG(d,a,b,c,x[i+14],9,-1019803690); -c=GG(c,d,a,b,x[i+3],14,-187363961); -b=GG(b,c,d,a,x[i+8],20,1163531501); -a=GG(a,b,c,d,x[i+13],5,-1444681467); -d=GG(d,a,b,c,x[i+2],9,-51403784); -c=GG(c,d,a,b,x[i+7],14,1735328473); -b=GG(b,c,d,a,x[i+12],20,-1926607734); -a=HH(a,b,c,d,x[i+5],4,-378558); -d=HH(d,a,b,c,x[i+8],11,-2022574463); -c=HH(c,d,a,b,x[i+11],16,1839030562); -b=HH(b,c,d,a,x[i+14],23,-35309556); -a=HH(a,b,c,d,x[i+1],4,-1530992060); -d=HH(d,a,b,c,x[i+4],11,1272893353); -c=HH(c,d,a,b,x[i+7],16,-155497632); -b=HH(b,c,d,a,x[i+10],23,-1094730640); -a=HH(a,b,c,d,x[i+13],4,681279174); -d=HH(d,a,b,c,x[i+0],11,-358537222); -c=HH(c,d,a,b,x[i+3],16,-722521979); -b=HH(b,c,d,a,x[i+6],23,76029189); -a=HH(a,b,c,d,x[i+9],4,-640364487); -d=HH(d,a,b,c,x[i+12],11,-421815835); -c=HH(c,d,a,b,x[i+15],16,530742520); -b=HH(b,c,d,a,x[i+2],23,-995338651); -a=II(a,b,c,d,x[i+0],6,-198630844); -d=II(d,a,b,c,x[i+7],10,1126891415); -c=II(c,d,a,b,x[i+14],15,-1416354905); -b=II(b,c,d,a,x[i+5],21,-57434055); -a=II(a,b,c,d,x[i+12],6,1700485571); -d=II(d,a,b,c,x[i+3],10,-1894986606); -c=II(c,d,a,b,x[i+10],15,-1051523); -b=II(b,c,d,a,x[i+1],21,-2054922799); -a=II(a,b,c,d,x[i+8],6,1873313359); -d=II(d,a,b,c,x[i+15],10,-30611744); -c=II(c,d,a,b,x[i+6],15,-1560198380); -b=II(b,c,d,a,x[i+13],21,1309151649); -a=II(a,b,c,d,x[i+4],6,-145523070); -d=II(d,a,b,c,x[i+11],10,-1120210379); -c=II(c,d,a,b,x[i+2],15,718787259); -b=II(b,c,d,a,x[i+9],21,-343485551); -a=_1.addWords(a,_35); -b=_1.addWords(b,_36); -c=_1.addWords(c,_37); -d=_1.addWords(d,_38); -} -return [a,b,c,d]; -}; -function _39(_3a,key){ -var wa=_1.stringToWord(key); -if(wa.length>16){ -wa=_2d(wa,key.length*_2); -} -var l=[],r=[]; -for(var i=0;i<16;i++){ -l[i]=wa[i]^909522486; -r[i]=wa[i]^1549556828; -} -var h=_2d(l.concat(_1.stringToWord(_3a)),512+_3a.length*_2); -return _2d(r.concat(h),640); -}; -_1.MD5=function(_41,_42){ -var out=_42||_1.outputTypes.Base64; -var wa=_2d(_1.stringToWord(_41),_41.length*_2); -switch(out){ -case _1.outputTypes.Raw: -return wa; -case _1.outputTypes.Hex: -return _1.wordToHex(wa); -case _1.outputTypes.String: -return _1.wordToString(wa); -default: -return _1.wordToBase64(wa); -} -}; -_1.MD5._hmac=function(_45,key,_47){ -var out=_47||_1.outputTypes.Base64; -var wa=_39(_45,key); -switch(out){ -case _1.outputTypes.Raw: -return wa; -case _1.outputTypes.Hex: -return _1.wordToHex(wa); -case _1.outputTypes.String: -return _1.wordToString(wa); -default: -return _1.wordToBase64(wa); -} -}; -})(); -}
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/encoding/digests/SHA1.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/encoding/digests/SHA1.js b/components/camel-web/src/main/webapp/js/dojox/encoding/digests/SHA1.js deleted file mode 100644 index d7ba01f..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/encoding/digests/SHA1.js +++ /dev/null @@ -1,137 +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["dojox.encoding.digests.SHA1"]){ -dojo._hasResource["dojox.encoding.digests.SHA1"]=true; -dojo.provide("dojox.encoding.digests.SHA1"); -dojo.require("dojox.encoding.digests._base"); -(function(){ -var _1=dojox.encoding.digests; -var _2=8,_3=(1<<_2)-1; -function R(n,c){ -return (n<<c)|(n>>>(32-c)); -}; -function FT(t,b,c,d){ -if(t<20){ -return (b&c)|((~b)&d); -} -if(t<40){ -return b^c^d; -} -if(t<60){ -return (b&c)|(b&d)|(c&d); -} -return b^c^d; -}; -function KT(t){ -return (t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514; -}; -function _e(x,len){ -x[len>>5]|=128<<(24-len%32); -x[((len+64>>9)<<4)+15]=len; -var w=new Array(80),a=1732584193,b=-271733879,c=-1732584194,d=271733878,e=-1009589776; -for(var i=0;i<x.length;i+=16){ -var _18=a,_19=b,_1a=c,_1b=d,_1c=e; -for(var j=0;j<80;j++){ -if(j<16){ -w[j]=x[i+j]; -}else{ -w[j]=R(w[j-3]^w[j-8]^w[j-14]^w[j-16],1); -} -var t=_1.addWords(_1.addWords(R(a,5),FT(j,b,c,d)),_1.addWords(_1.addWords(e,w[j]),KT(j))); -e=d; -d=c; -c=R(b,30); -b=a; -a=t; -} -a=_1.addWords(a,_18); -b=_1.addWords(b,_19); -c=_1.addWords(c,_1a); -d=_1.addWords(d,_1b); -e=_1.addWords(e,_1c); -} -return [a,b,c,d,e]; -}; -function _1f(_20,key){ -var wa=_23(key); -if(wa.length>16){ -wa=_e(wa,key.length*_2); -} -var _24=new Array(16),_25=new Array(16); -for(var i=0;i<16;i++){ -_24[i]=wa[i]^909522486; -_25[i]=wa[i]^1549556828; -} -var _27=_e(_24.concat(_23(_20)),512+_20.length*_2); -return _e(_25.concat(_27),512+160); -}; -function _23(s){ -var wa=[]; -for(var i=0,l=s.length*_2;i<l;i+=_2){ -wa[i>>5]|=(s.charCodeAt(i/_2)&_3)<<(32-_2-i%32); -} -return wa; -}; -function _2c(wa){ -var h="0123456789abcdef",s=[]; -for(var i=0,l=wa.length*4;i<l;i++){ -s.push(h.charAt((wa[i>>2]>>((3-i%4)*8+4))&15),h.charAt((wa[i>>2]>>((3-i%4)*8))&15)); -} -return s.join(""); -}; -function _32(wa){ -var s=[]; -for(var i=0,l=wa.length*32;i<l;i+=_2){ -s.push(String.fromCharCode((wa[i>>5]>>>(32-_2-i%32))&_3)); -} -return s.join(""); -}; -function _37(wa){ -var p="=",tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=[]; -for(var i=0,l=wa.length*4;i<l;i+=3){ -var t=(((wa[i>>2]>>8*(3-i%4))&255)<<16)|(((wa[i+1>>2]>>8*(3-(i+1)%4))&255)<<8)|((wa[i+2>>2]>>8*(3-(i+2)%4))&255); -for(var j=0;j<4;j++){ -if(i*8+j*6>wa.length*32){ -s.push(p); -}else{ -s.push(tab.charAt((t>>6*(3-j))&63)); -} -} -} -return s.join(""); -}; -_1.SHA1=function(_40,_41){ -var out=_41||_1.outputTypes.Base64; -var wa=_e(_23(_40),_40.length*_2); -switch(out){ -case _1.outputTypes.Raw: -return wa; -case _1.outputTypes.Hex: -return _2c(wa); -case _1.outputTypes.String: -return _32(wa); -default: -return _37(wa); -} -}; -_1.SHA1._hmac=function(_44,key,_46){ -var out=_46||_1.outputTypes.Base64; -var wa=_1f(_44,key); -switch(out){ -case _1.outputTypes.Raw: -return wa; -case _1.outputTypes.Hex: -return _2c(wa); -case _1.outputTypes.String: -return _32(wa); -default: -return _37(wa); -} -}; -})(); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/encoding/digests/_base.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/encoding/digests/_base.js b/components/camel-web/src/main/webapp/js/dojox/encoding/digests/_base.js deleted file mode 100644 index 3552903..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/encoding/digests/_base.js +++ /dev/null @@ -1,57 +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["dojox.encoding.digests._base"]){ -dojo._hasResource["dojox.encoding.digests._base"]=true; -dojo.provide("dojox.encoding.digests._base"); -(function(){ -var d=dojox.encoding.digests; -d.outputTypes={Base64:0,Hex:1,String:2,Raw:3}; -d.addWords=function(a,b){ -var l=(a&65535)+(b&65535); -var m=(a>>16)+(b>>16)+(l>>16); -return (m<<16)|(l&65535); -}; -var _6=8; -var _7=(1<<_6)-1; -d.stringToWord=function(s){ -var wa=[]; -for(var i=0,l=s.length*_6;i<l;i+=_6){ -wa[i>>5]|=(s.charCodeAt(i/_6)&_7)<<(i%32); -} -return wa; -}; -d.wordToString=function(wa){ -var s=[]; -for(var i=0,l=wa.length*32;i<l;i+=_6){ -s.push(String.fromCharCode((wa[i>>5]>>>(i%32))&_7)); -} -return s.join(""); -}; -d.wordToHex=function(wa){ -var h="0123456789abcdef",s=[]; -for(var i=0,l=wa.length*4;i<l;i++){ -s.push(h.charAt((wa[i>>2]>>((i%4)*8+4))&15)+h.charAt((wa[i>>2]>>((i%4)*8))&15)); -} -return s.join(""); -}; -d.wordToBase64=function(wa){ -var p="=",tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=[]; -for(var i=0,l=wa.length*4;i<l;i+=3){ -var t=(((wa[i>>2]>>8*(i%4))&255)<<16)|(((wa[i+1>>2]>>8*((i+1)%4))&255)<<8)|((wa[i+2>>2]>>8*((i+2)%4))&255); -for(var j=0;j<4;j++){ -if(i*8+j*6>wa.length*32){ -s.push(p); -}else{ -s.push(tab.charAt((t>>6*(3-j))&63)); -} -} -} -return s.join(""); -}; -})(); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/encoding/easy64.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/encoding/easy64.js b/components/camel-web/src/main/webapp/js/dojox/encoding/easy64.js deleted file mode 100644 index fd7dae6..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/encoding/easy64.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["dojox.encoding.easy64"]){ -dojo._hasResource["dojox.encoding.easy64"]=true; -dojo.provide("dojox.encoding.easy64"); -(function(){ -var c=function(_2,_3,_4){ -for(var i=0;i<_3;i+=3){ -_4.push(String.fromCharCode((_2[i]>>>2)+33),String.fromCharCode(((_2[i]&3)<<4)+(_2[i+1]>>>4)+33),String.fromCharCode(((_2[i+1]&15)<<2)+(_2[i+2]>>>6)+33),String.fromCharCode((_2[i+2]&63)+33)); -} -}; -dojox.encoding.easy64.encode=function(_6){ -var _7=[],_8=_6.length%3,_9=_6.length-_8; -c(_6,_9,_7); -if(_8){ -var t=_6.slice(_9); -while(t.length<3){ -t.push(0); -} -c(t,3,_7); -for(var i=3;i>_8;_7.pop(),--i){ -} -} -return _7.join(""); -}; -dojox.encoding.easy64.decode=function(_c){ -var n=_c.length,r=[],b=[0,0,0,0],i,j,d; -for(i=0;i<n;i+=4){ -for(j=0;j<4;++j){ -b[j]=_c.charCodeAt(i+j)-33; -} -d=n-i; -for(j=d;j<4;b[++j]=0){ -} -r.push((b[0]<<2)+(b[1]>>>4),((b[1]&15)<<4)+(b[2]>>>2),((b[2]&3)<<6)+b[3]); -for(j=d;j<4;++j,r.pop()){ -} -} -return r; -}; -})(); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/flash.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/flash.js b/components/camel-web/src/main/webapp/js/dojox/flash.js deleted file mode 100644 index 147438c..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/flash.js +++ /dev/null @@ -1,12 +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["dojox.flash"]){ -dojo._hasResource["dojox.flash"]=true; -dojo.provide("dojox.flash"); -dojo.require("dojox.flash._base"); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/flash/DojoExternalInterface.as ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/flash/DojoExternalInterface.as b/components/camel-web/src/main/webapp/js/dojox/flash/DojoExternalInterface.as deleted file mode 100644 index e2f71a6..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/flash/DojoExternalInterface.as +++ /dev/null @@ -1,177 +0,0 @@ -/** - A wrapper around Flash 8's ExternalInterface; this is needed - because ExternalInterface has a number of serialization bugs that we - need to correct for. - - @author Brad Neuberg -*/ - -import flash.external.ExternalInterface; - -class DojoExternalInterface{ - public static var available:Boolean; - public static var dojoPath = ""; - - public static function initialize(){ - //trace("DojoExternalInterface.initialize"); - - // extract the dojo base path - DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath(); - - // see if we need to do an express install - var install:ExpressInstall = new ExpressInstall(); - if(install.needsUpdate){ - install.init(); - } - - // set whether communication is available - DojoExternalInterface.available = ExternalInterface.available; - - // make sure we can play nice in XD settings - System.security.allowDomain(unescape(_root.xdomain)); - } - - /** Called when we are finished adding methods through addCallback. */ - public static function done(){ - //trace("done"); - DojoExternalInterface.call("dojox.flash.loaded"); - } - - public static function addCallback(methodName:String, instance:Object, - method:Function):Boolean{ - //trace("addCallback"); - ExternalInterface.addCallback(methodName, instance, function(){ - instance = (instance) ? instance : null; - var params = []; - if(arguments && arguments.length){ - for(var i = 0; i < arguments.length; i++){ - params[i] = DojoExternalInterface.decodeData(arguments[i]); - } - } - - var results = method.apply(instance, params); - results = DojoExternalInterface.encodeData(results); - - return results; - }); - - // tell JavaScript about DojoExternalInterface new method so we can create a proxy - ExternalInterface.call("dojox.flash.comm._addExternalInterfaceCallback", - methodName); - - return true; - } - - public static function call(methodName:String):Void{ - // we might have any number of optional arguments, so we have to - // pass them in dynamically; strip out the results callback - var parameters = new Array(); - for(var i = 0; i < arguments.length; i++){ - parameters.push(arguments[i]); - } - - // FIXME: Should we be encoding or decoding the data to get - // around Flash's serialization bugs? - - var results = ExternalInterface.call.apply(ExternalInterface, parameters); - - return results; - } - - /** - Called by Flash to indicate to JavaScript that we are ready to have - our Flash functions called. Calling loaded() - will fire the dojox.flash.loaded() event, so that JavaScript can know that - Flash has finished loading and adding its callbacks, and can begin to - interact with the Flash file. - */ - public static function loaded(){ - DojoExternalInterface.call("dojox.flash.loaded"); - } - - /** - Utility trace implementation that prints out to console.debug. - */ - public static function trace(msg){ - DojoExternalInterface.call("console.debug", "FLASH: " + msg); - } - - private static function decodeData(data):String{ - if(!data || typeof data != "string"){ - return data; - } - - // JAC: Using unicode character 0001 to store instead of Unicode null - // which causes trouble - data = replaceStr(data, "&custom_null;", "\u0001"); - - // we have to use custom encodings for certain characters when passing - // them over; for example, passing a backslash over as //// from JavaScript - // to Flash doesn't work - data = replaceStr(data, "&custom_backslash;", "\\"); - - return data; - } - - private static function encodeData(data):String{ - if(!data || typeof data != "string"){ - return data; - } - - // double encode all entity values, or they will be mis-decoded - // by Flash when returned - data = replaceStr(data, "&", "&"); - - // certain XMLish characters break Flash's wire serialization for - // ExternalInterface; encode these into a custom encoding, rather than - // the standard entity encoding, because otherwise we won't be able to - // differentiate between our own encoding and any entity characters - // that are being used in the string itself - data = replaceStr(data, '<', '&custom_lt;'); - data = replaceStr(data, '>', '&custom_gt;'); - - // needed for IE - data = replaceStr(data, '\\', '&custom_backslash;'); - data = replaceStr(data, "\u0001", "&custom_null;"); - - // encode control characters and JavaScript delimiters - data = replaceStr(data, "\n", "\\n"); - data = replaceStr(data, "\r", "\\r"); - data = replaceStr(data, "\f", "\\f"); - data = replaceStr(data, "'", "\\'"); - data = replaceStr(data, '"', '\"'); - - return data; - } - - /** - Flash ActionScript has no String.replace method or support for - Regular Expressions! We roll our own very simple one. - */ - public static function replaceStr(inputStr:String, replaceThis:String, - withThis:String):String{ - var splitStr = inputStr.split(replaceThis); - if(!splitStr){ - return inputStr; - } - - inputStr = splitStr.join(withThis); - return inputStr; - } - - private static function getDojoPath(){ - var url = _root._url; - var start = url.indexOf("baseUrl=") + "baseUrl=".length; - var path = url.substring(start); - var end = path.indexOf("&"); - if(end != -1){ - path = path.substring(0, end); - } - - // some browsers append a junk string at the end: '%20'%20quality= - if(path.indexOf("'%20'%20quality=") != -1){ - path = path.substring(0, path.indexOf("'%20'%20quality=")); - } - return unescape(path); - } -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/flash/ExpressInstall.as ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/flash/ExpressInstall.as b/components/camel-web/src/main/webapp/js/dojox/flash/ExpressInstall.as deleted file mode 100644 index 1801171..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/flash/ExpressInstall.as +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Based on the expressinstall.as class created by Geoff Stearns as part - * of the FlashObject library. - * - * Use this file to invoke the Macromedia Flash Player Express Install functionality - * This file is intended for use with the FlashObject embed script. You can download FlashObject - * and this file at the following URL: http://blog.deconcept.com/flashobject/ - * - * Usage: - * var ExpressInstall = new ExpressInstall(); - * - * // test to see if install is needed: - * if (ExpressInstall.needsUpdate) { // returns true if update is needed - * ExpressInstall.init(); // starts the update - * } - * - * NOTE: Your Flash movie must be at least 214px by 137px in order to use ExpressInstall. - * - */ - -class ExpressInstall{ - public var needsUpdate:Boolean; - private var updater:MovieClip; - private var hold:MovieClip; - - public function ExpressInstall(){ - // does the user need to update? - this.needsUpdate = (_root.MMplayerType == undefined) ? false : true; - } - - public function init():Void{ - this.loadUpdater(); - } - - public function loadUpdater():Void{ - System.security.allowDomain("fpdownload.macromedia.com"); - - // hope that nothing is at a depth of 10000000, you can change this depth if needed, but you want - // it to be on top of your content if you have any stuff on the first frame - this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000); - - // register the callback so we know if they cancel or there is an error - var _self = this; - this.updater.installStatus = _self.onInstallStatus; - this.hold = this.updater.createEmptyMovieClip("hold", 1); - - // can't use movieClipLoader because it has to work in 6.0.65 - this.updater.onEnterFrame = function():Void { - if(typeof this.hold.startUpdate == 'function'){ - _self.initUpdater(); - this.onEnterFrame = null; - } - } - - var cacheBuster:Number = Math.random(); - - this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/" - +"update/current/swf/autoUpdater.swf?"+ cacheBuster); - } - - private function initUpdater():Void{ - this.hold.redirectURL = _root.MMredirectURL; - this.hold.MMplayerType = _root.MMplayerType; - this.hold.MMdoctitle = _root.MMdoctitle; - this.hold.startUpdate(); - } - - public function onInstallStatus(msg):Void{ - getURL("javascript:dojox.flash.install._onInstallStatus('"+msg+"')"); - } -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/flash/README ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/flash/README b/components/camel-web/src/main/webapp/js/dojox/flash/README deleted file mode 100644 index bf01cba..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/flash/README +++ /dev/null @@ -1,31 +0,0 @@ -------------------------------------------------------------------------------- -dojox.flash -------------------------------------------------------------------------------- -Version 0.5 -Release date: 2008-03-10 -------------------------------------------------------------------------------- -Project state: experimental -------------------------------------------------------------------------------- -Project authors - Brad Neuberg (bradneub...@dojotoolkit.org) - Alex Russell (a...@dojotoolkit.org, only handled minor porting issues) -------------------------------------------------------------------------------- -Project description - -Infrastructure for high-performance Flash/JS communication -------------------------------------------------------------------------------- -Dependencies: - -MTASC for creating builds -------------------------------------------------------------------------------- -Documentation - -TODOC -------------------------------------------------------------------------------- -Installation instructions - -Not intended as a stand-alone module. -------------------------------------------------------------------------------- -Additional Notes - -TODOC http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/flash/_base.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/flash/_base.js b/components/camel-web/src/main/webapp/js/dojox/flash/_base.js deleted file mode 100644 index c38bcff..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/flash/_base.js +++ /dev/null @@ -1,299 +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["dojox.flash._base"]){ -dojo._hasResource["dojox.flash._base"]=true; -dojo.provide("dojox.flash._base"); -dojo.experimental("dojox.flash"); -dojo.require("dijit._base.place"); -dojox.flash=function(){ -}; -dojox.flash={ready:false,url:null,_visible:true,_loadedListeners:[],_installingListeners:[],setSwf:function(_1,_2){ -this.url=_1; -this._visible=true; -if(_2!==null&&_2!==undefined){ -this._visible=_2; -} -this._initialize(); -},addLoadedListener:function(_3){ -this._loadedListeners.push(_3); -},addInstallingListener:function(_4){ -this._installingListeners.push(_4); -},loaded:function(){ -dojox.flash.ready=true; -if(dojox.flash._loadedListeners.length){ -for(var i=0;i<dojox.flash._loadedListeners.length;i++){ -dojox.flash._loadedListeners[i].call(null); -} -} -},installing:function(){ -if(dojox.flash._installingListeners.length){ -for(var i=0;i<dojox.flash._installingListeners.length;i++){ -dojox.flash._installingListeners[i].call(null); -} -} -},_initialize:function(){ -var _7=new dojox.flash.Install(); -dojox.flash.installer=_7; -if(_7.needed()){ -_7.install(); -}else{ -dojox.flash.obj=new dojox.flash.Embed(this._visible); -dojox.flash.obj.write(); -dojox.flash.comm=new dojox.flash.Communicator(); -} -}}; -dojox.flash.Info=function(){ -this._detectVersion(); -}; -dojox.flash.Info.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,installing:false,isVersionOrAbove:function(_8,_9,_a){ -_a=parseFloat("."+_a); -if(this.versionMajor>=_8&&this.versionMinor>=_9&&this.versionRevision>=_a){ -return true; -}else{ -return false; -} -},_detectVersion:function(){ -var _b; -for(var _c=25;_c>0;_c--){ -if(dojo.isIE){ -var _d; -try{ -if(_c>6){ -_d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_c); -}else{ -_d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); -} -if(typeof _d=="object"){ -if(_c==6){ -_d.AllowScriptAccess="always"; -} -_b=_d.GetVariable("$version"); -} -} -catch(e){ -continue; -} -}else{ -_b=this._JSFlashInfo(_c); -} -if(_b==-1){ -this.capable=false; -return; -}else{ -if(_b!=0){ -var _e; -if(dojo.isIE){ -var _f=_b.split(" "); -var _10=_f[1]; -_e=_10.split(","); -}else{ -_e=_b.split("."); -} -this.versionMajor=_e[0]; -this.versionMinor=_e[1]; -this.versionRevision=_e[2]; -var _11=this.versionMajor+"."+this.versionRevision; -this.version=parseFloat(_11); -this.capable=true; -break; -} -} -} -},_JSFlashInfo:function(_12){ -if(navigator.plugins!=null&&navigator.plugins.length>0){ -if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){ -var _13=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":""; -var _14=navigator.plugins["Shockwave Flash"+_13].description; -var _15=_14.split(" "); -var _16=_15[2].split("."); -var _17=_16[0]; -var _18=_16[1]; -var _19=(_15[3]||_15[4]).split("r"); -var _1a=_19[1]>0?_19[1]:0; -var _1b=_17+"."+_18+"."+_1a; -return _1b; -} -} -return -1; -}}; -dojox.flash.Embed=function(_1c){ -this._visible=_1c; -}; -dojox.flash.Embed.prototype={width:215,height:138,id:"flashObject",_visible:true,protocol:function(){ -switch(window.location.protocol){ -case "https:": -return "https"; -break; -default: -return "http"; -break; -} -},write:function(_1d){ -var _1e; -var _1f=dojox.flash.url; -var _20=_1f; -var _21=_1f; -var _22=dojo.baseUrl; -var _23=document.location.protocol+"//"+document.location.host; -if(_1d){ -var _24=escape(window.location); -document.title=document.title.slice(0,47)+" - Flash Player Installation"; -var _25=escape(document.title); -_20+="?MMredirectURL="+_24+"&MMplayerType=ActiveX"+"&MMdoctitle="+_25+"&baseUrl="+escape(_22)+"&xdomain="+escape(_23); -_21+="?MMredirectURL="+_24+"&MMplayerType=PlugIn"+"&baseUrl="+escape(_22)+"&xdomain="+escape(_23); -}else{ -_20+="?cachebust="+new Date().getTime(); -_20+="&baseUrl="+escape(_22); -_20+="&xdomain="+escape(_23); -} -if(_21.indexOf("?")==-1){ -_21+="?baseUrl="+escape(_22); -}else{ -_21+="&baseUrl="+escape(_22); -} -_21+="&xdomain="+escape(_23); -_1e="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "+"codebase=\""+this.protocol()+"://fpdownload.macromedia.com/pub/shockwave/cabs/flash/"+"swflash.cab#version=8,0,0,0\"\n "+"width=\""+this.width+"\"\n "+"height=\""+this.height+"\"\n "+"id=\""+this.id+"\"\n "+"name=\""+this.id+"\"\n "+"align=\"middle\">\n "+"<param name=\"allowScriptAccess\" value=\"always\"></param>\n "+"<param name=\"movie\" value=\""+_20+"\"></param>\n "+"<param name=\"quality\" value=\"high\"></param>\n "+"<param name=\"bgcolor\" value=\"#ffffff\"></param>\n "+"<embed src=\""+_21+"\" "+"quality=\"high\" "+"bgcolor=\"#ffffff\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"Embed"+"\" "+"name=\""+this.id+"\" "+"swLiveConnect=\"true\" "+"align=\"middle\" "+"allowScriptAccess=\"always\" "+"type=\"application/x-shockwave-flash\" "+"pluginspage=\""+this.protocol()+"://www.macromedia.com/go/getflashplayer\" "+"></embed>\n"+"</object>\n"; -dojo.connect(dojo,"loaded",dojo.hitch(this,function(){ -var _26=this.id+"Container"; -if(dojo.byId(_26)){ -return; -} -var div=document.createElement("div"); -div.id=this.id+"Container"; -div.style.width=this.width+"px"; -div.style.height=this.height+"px"; -if(!this._visible){ -div.style.position="absolute"; -div.style.zIndex="10000"; -div.style.top="-1000px"; -} -div.innerHTML=_1e; -var _28=document.getElementsByTagName("body"); -if(!_28||!_28.length){ -throw new Error("No body tag for this page"); -} -_28=_28[0]; -_28.appendChild(div); -})); -},get:function(){ -if(dojo.isIE||dojo.isWebKit){ -return dojo.byId(this.id); -}else{ -return document[this.id+"Embed"]; -} -},setVisible:function(_29){ -var _2a=dojo.byId(this.id+"Container"); -if(_29){ -_2a.style.position="absolute"; -_2a.style.visibility="visible"; -}else{ -_2a.style.position="absolute"; -_2a.style.y="-1000px"; -_2a.style.visibility="hidden"; -} -},center:function(){ -var _2b=this.width; -var _2c=this.height; -var _2d=dijit.getViewport(); -var x=_2d.l+(_2d.w-_2b)/2; -var y=_2d.t+(_2d.h-_2c)/2; -var _30=dojo.byId(this.id+"Container"); -_30.style.top=y+"px"; -_30.style.left=x+"px"; -}}; -dojox.flash.Communicator=function(){ -}; -dojox.flash.Communicator.prototype={_addExternalInterfaceCallback:function(_31){ -var _32=dojo.hitch(this,function(){ -var _33=new Array(arguments.length); -for(var i=0;i<arguments.length;i++){ -_33[i]=this._encodeData(arguments[i]); -} -var _35=this._execFlash(_31,_33); -_35=this._decodeData(_35); -return _35; -}); -this[_31]=_32; -},_encodeData:function(_36){ -if(!_36||typeof _36!="string"){ -return _36; -} -_36=_36.replace("\\","&custom_backslash;"); -_36=_36.replace(/\0/g,"&custom_null;"); -return _36; -},_decodeData:function(_37){ -if(_37&&_37.length&&typeof _37!="string"){ -_37=_37[0]; -} -if(!_37||typeof _37!="string"){ -return _37; -} -_37=_37.replace(/\&custom_null\;/g,"\x00"); -_37=_37.replace(/\&custom_lt\;/g,"<").replace(/\&custom_gt\;/g,">").replace(/\&custom_backslash\;/g,"\\"); -return _37; -},_execFlash:function(_38,_39){ -var _3a=dojox.flash.obj.get(); -_39=(_39)?_39:[]; -for(var i=0;i<_39;i++){ -if(typeof _39[i]=="string"){ -_39[i]=this._encodeData(_39[i]); -} -} -var _3c=function(){ -return eval(_3a.CallFunction("<invoke name=\""+_38+"\" returntype=\"javascript\">"+__flash__argumentsToXML(_39,0)+"</invoke>")); -}; -var _3d=_3c.call(_39); -if(typeof _3d=="string"){ -_3d=this._decodeData(_3d); -} -return _3d; -}}; -dojox.flash.Install=function(){ -}; -dojox.flash.Install.prototype={needed:function(){ -if(!dojox.flash.info.capable){ -return true; -} -if(!dojox.flash.info.isVersionOrAbove(8,0,0)){ -return true; -} -return false; -},install:function(){ -var _3e; -dojox.flash.info.installing=true; -dojox.flash.installing(); -if(dojox.flash.info.capable==false){ -_3e=new dojox.flash.Embed(false); -_3e.write(); -}else{ -if(dojox.flash.info.isVersionOrAbove(6,0,65)){ -_3e=new dojox.flash.Embed(false); -_3e.write(true); -_3e.setVisible(true); -_3e.center(); -}else{ -alert("This content requires a more recent version of the Macromedia "+" Flash Player."); -window.location.href=+dojox.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer"; -} -} -},_onInstallStatus:function(msg){ -if(msg=="Download.Complete"){ -dojox.flash._initialize(); -}else{ -if(msg=="Download.Cancelled"){ -alert("This content requires a more recent version of the Macromedia "+" Flash Player."); -window.location.href=dojox.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer"; -}else{ -if(msg=="Download.Failed"){ -alert("There was an error downloading the Flash Player update. "+"Please try again later, or visit macromedia.com to download "+"the latest version of the Flash plugin."); -} -} -} -}}; -dojox.flash.info=new dojox.flash.Info(); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/BusyButton.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/BusyButton.js b/components/camel-web/src/main/webapp/js/dojox/form/BusyButton.js deleted file mode 100644 index da54e85..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/BusyButton.js +++ /dev/null @@ -1,79 +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["dojox.form.BusyButton"]){ -dojo._hasResource["dojox.form.BusyButton"]=true; -dojo.provide("dojox.form.BusyButton"); -dojo.require("dijit.form.Button"); -dojo.requireLocalization("dijit","loading",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw"); -dojo.declare("dojox.form._BusyButtonMixin",null,{isBusy:false,busyLabel:"",timeout:null,useIcon:true,postMixInProperties:function(){ -this.inherited(arguments); -if(!this.busyLabel){ -this.busyLabel=dojo.i18n.getLocalization("dijit","loading",this.lang).loadingState; -} -},postCreate:function(){ -this._label=this.containerNode.innerHTML; -this._initTimeout=this.timeout; -if(this.isBusy){ -this.makeBusy(); -} -},makeBusy:function(){ -this.isBusy=true; -this.attr("disabled",true); -this.setLabel(this.busyLabel,this.timeout); -},cancel:function(){ -this.attr("disabled",false); -this.isBusy=false; -this.setLabel(this._label); -if(this._timeout){ -clearTimeout(this._timeout); -} -this.timeout=this._initTimeout; -},resetTimeout:function(_1){ -if(this._timeout){ -clearTimeout(this._timeout); -} -if(_1){ -this._timeout=setTimeout(dojo.hitch(this,function(){ -this.cancel(); -}),_1); -}else{ -if(_1==undefined||_1===0){ -this.cancel(); -} -} -},setLabel:function(_2,_3){ -this.label=_2; -while(this.containerNode.firstChild){ -this.containerNode.removeChild(this.containerNode.firstChild); -} -this.containerNode.innerHTML=this.label; -this._layoutHack(); -if(this.showLabel==false&&!(dojo.attr(this.domNode,"title"))){ -this.titleNode.title=dojo.trim(this.containerNode.innerText||this.containerNode.textContent||""); -} -if(_3){ -this.resetTimeout(_3); -}else{ -this.timeout=null; -} -if(this.useIcon&&this.isBusy){ -var _4=new Image(); -_4.src=this._blankGif; -dojo.attr(_4,"id",this.id+"_icon"); -dojo.addClass(_4,"dojoxBusyButtonIcon"); -this.containerNode.appendChild(_4); -} -},_clicked:function(e){ -if(!this.isBusy){ -this.makeBusy(); -} -}}); -dojo.declare("dojox.form.BusyButton",[dijit.form.Button,dojox.form._BusyButtonMixin],{}); -dojo.declare("dojox.form.BusyComboButton",[dijit.form.ComboButton,dojox.form._BusyButtonMixin],{}); -dojo.declare("dojox.form.BusyDropDownButton",[dijit.form.DropDownButton,dojox.form._BusyButtonMixin],{}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/CheckedMultiSelect.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/CheckedMultiSelect.js b/components/camel-web/src/main/webapp/js/dojox/form/CheckedMultiSelect.js deleted file mode 100644 index 4a9d410..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/CheckedMultiSelect.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["dojox.form.CheckedMultiSelect"]){ -dojo._hasResource["dojox.form.CheckedMultiSelect"]=true; -dojo.provide("dojox.form.CheckedMultiSelect"); -dojo.require("dijit.form.CheckBox"); -dojo.require("dojox.form._FormSelectWidget"); -dojo.declare("dojox.form._CheckedMultiSelectItem",[dijit._Widget,dijit._Templated],{widgetsInTemplate:true,templateString:"<div class=\"dijitReset ${baseClass}\"\n\t><input class=\"${baseClass}Box\" dojoType=\"dijit.form.CheckBox\" dojoAttachPoint=\"checkBox\" \n\t\tdojoAttachEvent=\"_onClick:_changeBox\" type=\"${_type.type}\" baseClass=\"${_type.baseClass}\"\n\t><div class=\"dijitInline ${baseClass}Label\" dojoAttachPoint=\"labelNode\" dojoAttachEvent=\"onmousedown:_onMouse,onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"></div\n></div>\n",baseClass:"dojoxMultiSelectItem",option:null,parent:null,disabled:false,readOnly:false,postMixInProperties:function(){ -if(this.parent._multiValue){ -this._type={type:"checkbox",baseClass:"dijitCheckBox"}; -}else{ -this._type={type:"radio",baseClass:"dijitRadio"}; -} -this.disabled=this.option.disabled=this.option.disabled||false; -this.inherited(arguments); -},postCreate:function(){ -this.inherited(arguments); -this.labelNode.innerHTML=this.option.label; -},_changeBox:function(){ -if(this.attr("disabled")||this.attr("readOnly")){ -return; -} -if(this.parent._multiValue){ -this.option.selected=this.checkBox.attr("value")&&true; -}else{ -this.parent.attr("value",this.option.value); -} -this.parent._updateSelection(); -this.parent.focus(); -},_onMouse:function(e){ -if(this.attr("disabled")||this.attr("readOnly")){ -dojo.stopEvent(e); -}else{ -this.checkBox._onMouse(e); -} -},_onClick:function(e){ -if(this.attr("disabled")||this.attr("readOnly")){ -dojo.stopEvent(e); -}else{ -this.checkBox._onClick(e); -} -},_updateBox:function(){ -this.checkBox.attr("value",this.option.selected); -},_setDisabledAttr:function(_3){ -this.disabled=_3||this.option.disabled; -this.checkBox.attr("disabled",this.disabled); -dojo.toggleClass(this.domNode,"dojoxMultiSelectDisabled",this.disabled); -},_setReadOnlyAttr:function(_4){ -this.checkBox.attr("readOnly",_4); -this.checkBox._setStateClass(); -this.readOnly=_4; -}}); -dojo.declare("dojox.form.CheckedMultiSelect",dojox.form._FormSelectWidget,{templateString:"",templateString:"<div class=\"dijit dijitReset dijitInline\" dojoAttachEvent=\"onmousedown:_mouseDown,onclick:focus\"\n\t><select class=\"${baseClass}Select\" multiple=\"true\" dojoAttachPoint=\"containerNode,focusNode\"></select\n\t><div dojoAttachPoint=\"wrapperDiv\"></div\n></div>\n",baseClass:"dojoxMultiSelect",_mouseDown:function(e){ -dojo.stopEvent(e); -},_addOptionItem:function(_6){ -this.wrapperDiv.appendChild(new dojox.form._CheckedMultiSelectItem({option:_6,parent:this}).domNode); -},_updateSelection:function(){ -this.inherited(arguments); -dojo.forEach(this._getChildren(),function(c){ -c._updateBox(); -}); -},_getChildren:function(){ -return dojo.map(this.wrapperDiv.childNodes,function(n){ -return dijit.byNode(n); -}); -},invertSelection:function(_9){ -dojo.forEach(this.options,function(i){ -i.selected=!i.selected; -}); -this._updateSelection(); -},_setDisabledAttr:function(_b){ -this.inherited(arguments); -dojo.forEach(this._getChildren(),function(_c){ -if(_c&&_c.attr){ -_c.attr("disabled",_b); -} -}); -},_setReadOnlyAttr:function(_d){ -if("readOnly" in this.attributeMap){ -this._attrToDom("readOnly",_d); -} -this.readOnly=_d; -dojo.forEach(this._getChildren(),function(_e){ -if(_e&&_e.attr){ -_e.attr("readOnly",_d); -} -}); -this._setStateClass(); -},uninitialize:function(){ -dojo.forEach(this._getChildren(),function(_f){ -_f.destroyRecursive(); -}); -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/DateTextBox.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/DateTextBox.js b/components/camel-web/src/main/webapp/js/dojox/form/DateTextBox.js deleted file mode 100644 index d99b16d..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/DateTextBox.js +++ /dev/null @@ -1,58 +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["dojox.form.DateTextBox"]){ -dojo._hasResource["dojox.form.DateTextBox"]=true; -dojo.provide("dojox.form.DateTextBox"); -dojo.require("dojox.widget.Calendar"); -dojo.require("dojox.widget.CalendarViews"); -dojo.require("dijit.form._DateTimeTextBox"); -dojo.declare("dojox.form.DateTextBox",dijit.form._DateTimeTextBox,{popupClass:"dojox.widget.Calendar",_selector:"date",_open:function(){ -this.inherited(arguments); -dojo.style(this._picker.domNode.parentNode,"position","absolute"); -}}); -dojo.declare("dojox.form.DayTextBox",dojox.form.DateTextBox,{popupClass:"dojox.widget.DailyCalendar",format:function(_1){ -return _1.getDate(); -},validator:function(_2){ -var _3=Number(_2); -var _4=/(^-?\d\d*$)/.test(String(_2)); -return _2==""||_2==null||(_4&&_3>=1&&_3<=31); -},_open:function(){ -this.inherited(arguments); -this._picker.onValueSelected=dojo.hitch(this,function(_5){ -this.focus(); -setTimeout(dojo.hitch(this,"_close"),1); -dijit.form.TextBox.prototype._setValueAttr.call(this,_5,true,String(_5.getDate())); -}); -}}); -dojo.declare("dojox.form.MonthTextBox",dojox.form.DateTextBox,{popupClass:"dojox.widget.MonthlyCalendar",format:function(_6){ -return _6+1; -},validator:function(_7){ -var _8=Number(_7); -var _9=/(^-?\d\d*$)/.test(String(_7)); -return _7==""||_7==null||(_9&&_8>=1&&_8<=12); -},_open:function(){ -this.inherited(arguments); -this._picker.onValueSelected=dojo.hitch(this,function(_a){ -this.focus(); -setTimeout(dojo.hitch(this,"_close"),1); -dijit.form.TextBox.prototype._setValueAttr.call(this,_a+1,true,_a+1); -}); -}}); -dojo.declare("dojox.form.YearTextBox",dojox.form.DateTextBox,{popupClass:"dojox.widget.YearlyCalendar",format:function(_b){ -return _b; -},validator:function(_c){ -return _c==""||_c==null||/(^-?\d\d*$)/.test(String(_c)); -},_open:function(){ -this.inherited(arguments); -this._picker.onValueSelected=dojo.hitch(this,function(_d){ -this.focus(); -setTimeout(dojo.hitch(this,"_close"),1); -dijit.form.TextBox.prototype._setValueAttr.call(this,_d,true,_d); -}); -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/DropDownSelect.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/DropDownSelect.js b/components/camel-web/src/main/webapp/js/dojox/form/DropDownSelect.js deleted file mode 100644 index 3ec5270..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/DropDownSelect.js +++ /dev/null @@ -1,133 +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["dojox.form.DropDownSelect"]){ -dojo._hasResource["dojox.form.DropDownSelect"]=true; -dojo.provide("dojox.form.DropDownSelect"); -dojo.require("dojox.form._FormSelectWidget"); -dojo.require("dojox.form._HasDropDown"); -dojo.require("dijit.Menu"); -dojo.requireLocalization("dijit.form","validate",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw"); -dojo.declare("dojox.form.DropDownSelect",[dojox.form._FormSelectWidget,dojox.form._HasDropDown],{attributeMap:dojo.mixin(dojo.clone(dojox.form._FormSelectWidget.prototype.attributeMap),{value:"valueNode",name:"valueNode"}),baseClass:"dojoxDropDownSelect",templateString:"<table class='dijit dijitReset dijitInline dijitLeft'\n\tdojoAttachPoint=\"dropDownNode,tableNode\" cellspacing='0' cellpadding='0' waiRole=\"presentation\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\"\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\" \n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\" dojoAttachPoint=\"containerNode,popupStateNode\" id=\"${id}_label\"></span\n\t\t\t><input type=\"hidden\" ${nameAttrSetting} dojoAttachPoint=\"valueNode\" value=\"${value}\" />\n\t\t</td><td class=\"dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowBut ton\" \n\t\t\t\tdojoAttachPoint=\"focusNode,titleNode\" waiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\"> </div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">▼</div\n\t\t></td\n\t></tr></tbody\n></table>\n",attributeMap:dojo.mixin(dojo.clone(dojox.form._FormSelectWidget.prototype.attributeMap),{style:"tableNode"}),required:false,state:"",tooltipPosition:[],emptyLabel:"",_isLoaded:false,_childrenLoaded:false,_fillContent:function(){ -this.inherited(arguments); -if(this.options.length&&!this.value){ -var si=this.srcNodeRef.selectedIndex; -this.value=this.options[si!=-1?si:0].value; -} -this.dropDown=new dijit.Menu(); -dojo.addClass(this.dropDown.domNode,this.baseClass+"Menu"); -},_getMenuItemForOption:function(_2){ -if(!_2.value){ -return new dijit.MenuSeparator(); -}else{ -var _3=dojo.hitch(this,"_setValueAttr",_2); -return new dijit.MenuItem({option:_2,label:_2.label,onClick:_3,disabled:_2.disabled||false}); -} -},_addOptionItem:function(_4){ -this.dropDown.addChild(this._getMenuItemForOption(_4)); -},_getChildren:function(){ -return this.dropDown.getChildren(); -},_loadChildren:function(){ -this.inherited(arguments); -var _5=this.options.length; -this._isLoaded=false; -this._childrenLoaded=true; -if(!this._iReadOnly){ -this.attr("readOnly",(_5===1)); -delete this._iReadOnly; -} -if(!this._iDisabled){ -this.attr("disabled",(_5===0)); -delete this._iDisabled; -} -this._setValueAttr(this.value); -},_setValueAttr:function(_6){ -this.inherited(arguments); -dojo.attr(this.valueNode,"value",this.attr("value")); -},_setDisplay:function(_7){ -this.containerNode.innerHTML="<span class=\" "+this.baseClass+"Label\">"+(_7||this.emptyLabel||" ")+"</span>"; -this._layoutHack(); -},validate:function(_8){ -var _9=this.isValid(_8); -this.state=_9?"":"Error"; -this._setStateClass(); -dijit.setWaiState(this.focusNode,"invalid",_9?"false":"true"); -var _a=_9?"":this._missingMsg; -if(this._message!==_a){ -this._message=_a; -dijit.hideTooltip(this.domNode); -if(_a){ -dijit.showTooltip(_a,this.domNode,this.tooltipPosition); -} -} -return _9; -},isValid:function(_b){ -return (!this.required||!(/^\s*$/.test(this.value))); -},reset:function(){ -this.inherited(arguments); -dijit.hideTooltip(this.domNode); -this.state=""; -this._setStateClass(); -delete this._message; -},postMixInProperties:function(){ -this.inherited(arguments); -this._missingMsg=dojo.i18n.getLocalization("dijit.form","validate",this.lang).missingMessage; -},postCreate:function(){ -this.inherited(arguments); -if(dojo.attr(this.srcNodeRef,"disabled")){ -this.attr("disabled",true); -} -if(this.tableNode.style.width){ -dojo.addClass(this.domNode,this.baseClass+"FixedWidth"); -} -},startup:function(){ -if(this._started){ -return; -} -if(!this.dropDown){ -var _c=dojo.query("[widgetId]",this.dropDownContainer)[0]; -this.dropDown=dijit.byNode(_c); -delete this.dropDownContainer; -} -this.inherited(arguments); -},_onMenuMouseup:function(e){ -var _e=this.dropDown,t=e.target; -if(_e.onItemClick){ -var _10; -while(t&&!(_10=dijit.byNode(t))){ -t=t.parentNode; -} -if(_10&&_10.onClick&&_10.getParent){ -_10.getParent().onItemClick(_10,e); -} -} -},isLoaded:function(){ -return this._isLoaded; -},loadDropDown:function(_11){ -this._loadChildren(); -this._isLoaded=true; -_11(); -},_setReadOnlyAttr:function(_12){ -this._iReadOnly=_12; -if(!_12&&this._childrenLoaded&&this.options.length===1){ -return; -} -this.readOnly=_12; -},_setDisabledAttr:function(_13){ -this._iDisabled=_13; -if(!_13&&this._childrenLoaded&&this.options.length===0){ -return; -} -this.inherited(arguments); -},uninitialize:function(_14){ -if(this.dropDown){ -this.dropDown.destroyRecursive(_14); -delete this.dropDown; -} -this.inherited(arguments); -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/DropDownStack.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/DropDownStack.js b/components/camel-web/src/main/webapp/js/dojox/form/DropDownStack.js deleted file mode 100644 index 302c0e9..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/DropDownStack.js +++ /dev/null @@ -1,14 +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["dojox.form.DropDownStack"]){ -dojo._hasResource["dojox.form.DropDownStack"]=true; -dojo.provide("dojox.form.DropDownStack"); -dojo.require("dojox.form.DropDownSelect"); -dojo.require("dojox.form._SelectStackMixin"); -dojo.declare("dojox.form.DropDownStack",[dojox.form.DropDownSelect,dojox.form._SelectStackMixin],{}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/FileInput.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/FileInput.js b/components/camel-web/src/main/webapp/js/dojox/form/FileInput.js deleted file mode 100644 index 55c4350..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/FileInput.js +++ /dev/null @@ -1,42 +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["dojox.form.FileInput"]){ -dojo._hasResource["dojox.form.FileInput"]=true; -dojo.provide("dojox.form.FileInput"); -dojo.experimental("dojox.form.FileInput"); -dojo.require("dijit.form._FormWidget"); -dojo.require("dijit._Templated"); -dojo.declare("dojox.form.FileInput",dijit.form._FormWidget,{label:"Browse ...",cancelText:"Cancel",name:"uploadFile",templateString:"<div class=\"dijitFileInput\">\n\t<input id=\"${id}\" class=\"dijitFileInputReal\" type=\"file\" dojoAttachPoint=\"fileInput\" name=\"${name}\" />\n\t<div class=\"dijitFakeInput\">\n\t\t<input class=\"dijitFileInputVisible\" type=\"text\" dojoAttachPoint=\"focusNode, inputNode\" />\n\t\t<div class=\"dijitInline dijitFileInputText\" dojoAttachPoint=\"titleNode\">${label}</div>\n\t\t<div class=\"dijitInline dijitFileInputButton\" dojoAttachPoint=\"cancelNode\" \n\t\t\tdojoAttachEvent=\"onclick:reset\">${cancelText}</div>\n\t</div>\n</div>\n",startup:function(){ -this._listener=this.connect(this.fileInput,"onchange","_matchValue"); -this._keyListener=this.connect(this.fileInput,"onkeyup","_matchValue"); -},_matchValue:function(){ -this.inputNode.value=this.fileInput.value; -if(this.inputNode.value){ -this.cancelNode.style.visibility="visible"; -dojo.fadeIn({node:this.cancelNode,duration:275}).play(); -} -},setLabel:function(_1,_2){ -this.titleNode.innerHTML=_1; -},reset:function(e){ -this.disconnect(this._listener); -this.disconnect(this._keyListener); -if(this.fileInput){ -this.domNode.removeChild(this.fileInput); -} -dojo.fadeOut({node:this.cancelNode,duration:275}).play(); -this.fileInput=document.createElement("input"); -this.fileInput.setAttribute("type","file"); -this.fileInput.setAttribute("id",this.id); -this.fileInput.setAttribute("name",this.name); -dojo.addClass(this.fileInput,"dijitFileInputReal"); -this.domNode.appendChild(this.fileInput); -this._keyListener=this.connect(this.fileInput,"onkeyup","_matchValue"); -this._listener=this.connect(this.fileInput,"onchange","_matchValue"); -this.inputNode.value=""; -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/FileInputAuto.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/FileInputAuto.js b/components/camel-web/src/main/webapp/js/dojox/form/FileInputAuto.js deleted file mode 100644 index bcff9e4..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/FileInputAuto.js +++ /dev/null @@ -1,95 +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["dojox.form.FileInputAuto"]){ -dojo._hasResource["dojox.form.FileInputAuto"]=true; -dojo.provide("dojox.form.FileInputAuto"); -dojo.require("dojox.form.FileInput"); -dojo.require("dojo.io.iframe"); -dojo.declare("dojox.form.FileInputAuto",dojox.form.FileInput,{url:"",blurDelay:2000,duration:500,uploadMessage:"Uploading ...",triggerEvent:"onblur",_sent:false,templateString:"<div class=\"dijitFileInput\">\n\t<input id=\"${id}\" name=\"${name}\" class=\"dijitFileInputReal\" type=\"file\" dojoAttachPoint=\"fileInput\" />\n\t<div class=\"dijitFakeInput\" dojoAttachPoint=\"fakeNodeHolder\">\n\t\t<input class=\"dijitFileInputVisible\" type=\"text\" dojoAttachPoint=\"focusNode, inputNode\" />\n\t\t<div class=\"dijitInline dijitFileInputText\" dojoAttachPoint=\"titleNode\">${label}</div>\n\t\t<div class=\"dijitInline dijitFileInputButton\" dojoAttachPoint=\"cancelNode\" dojoAttachEvent=\"onclick:reset\">${cancelText}</div>\n\t</div>\n\t<div class=\"dijitProgressOverlay\" dojoAttachPoint=\"overlay\"> </div>\n</div>\n",startup:function(){ -this._blurListener=this.connect(this.fileInput,this.triggerEvent,"_onBlur"); -this._focusListener=this.connect(this.fileInput,"onfocus","_onFocus"); -this.inherited(arguments); -},_onFocus:function(){ -if(this._blurTimer){ -clearTimeout(this._blurTimer); -} -},_onBlur:function(){ -if(this._blurTimer){ -clearTimeout(this._blurTimer); -} -if(!this._sent){ -this._blurTimer=setTimeout(dojo.hitch(this,"_sendFile"),this.blurDelay); -} -},setMessage:function(_1){ -this.overlay.removeChild(this.overlay.firstChild); -this.overlay.appendChild(document.createTextNode(_1)); -},_sendFile:function(e){ -if(this._sent||this._sending||!this.fileInput.value){ -return; -} -this._sending=true; -dojo.style(this.fakeNodeHolder,"display","none"); -dojo.style(this.overlay,{opacity:0,display:"block"}); -this.setMessage(this.uploadMessage); -dojo.fadeIn({node:this.overlay,duration:this.duration}).play(); -var _3; -if(dojo.isIE){ -_3=document.createElement("<form enctype=\"multipart/form-data\" method=\"post\">"); -_3.encoding="multipart/form-data"; -}else{ -_3=document.createElement("form"); -_3.setAttribute("enctype","multipart/form-data"); -} -_3.appendChild(this.fileInput); -dojo.body().appendChild(_3); -dojo.io.iframe.send({url:this.url,form:_3,handleAs:"json",handle:dojo.hitch(this,"_handleSend")}); -},_handleSend:function(_4,_5){ -this.overlay.removeChild(this.overlay.firstChild); -this._sent=true; -this._sending=false; -dojo.style(this.overlay,{opacity:0,border:"none",background:"none"}); -this.overlay.style.backgroundImage="none"; -this.fileInput.style.display="none"; -this.fakeNodeHolder.style.display="none"; -dojo.fadeIn({node:this.overlay,duration:this.duration}).play(250); -this.disconnect(this._blurListener); -this.disconnect(this._focusListener); -dojo.body().removeChild(_5.args.form); -this.fileInput=null; -this.onComplete(_4,_5,this); -},reset:function(e){ -if(this._blurTimer){ -clearTimeout(this._blurTimer); -} -this.disconnect(this._blurListener); -this.disconnect(this._focusListener); -this.overlay.style.display="none"; -this.fakeNodeHolder.style.display=""; -this.inherited(arguments); -this._sent=false; -this._sending=false; -this._blurListener=this.connect(this.fileInput,this.triggerEvent,"_onBlur"); -this._focusListener=this.connect(this.fileInput,"onfocus","_onFocus"); -},onComplete:function(_7,_8,_9){ -}}); -dojo.declare("dojox.form.FileInputBlind",dojox.form.FileInputAuto,{startup:function(){ -this.inherited(arguments); -this._off=dojo.style(this.inputNode,"width"); -this.inputNode.style.display="none"; -this._fixPosition(); -},_fixPosition:function(){ -if(dojo.isIE){ -dojo.style(this.fileInput,"width","1px"); -}else{ -dojo.style(this.fileInput,"left","-"+(this._off)+"px"); -} -},reset:function(e){ -this.inherited(arguments); -this._fixPosition(); -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/FilePickerTextBox.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/FilePickerTextBox.js b/components/camel-web/src/main/webapp/js/dojox/form/FilePickerTextBox.js deleted file mode 100644 index b85b047..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/FilePickerTextBox.js +++ /dev/null @@ -1,264 +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["dojox.form.FilePickerTextBox"]){ -dojo._hasResource["dojox.form.FilePickerTextBox"]=true; -dojo.provide("dojox.form.FilePickerTextBox"); -dojo.require("dojox.widget.FilePicker"); -dojo.require("dijit.form.ValidationTextBox"); -dojo.require("dojox.form._HasDropDown"); -dojo.declare("dojox.form.FilePickerTextBox",[dijit.form.ValidationTextBox,dojox.form._HasDropDown],{baseClass:"dojoxFilePickerTextBox",templateString:"<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\n\tid=\"widget_${id}\"\n\tdojoAttachEvent=\"onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse\" waiRole=\"combobox\" tabIndex=\"-1\"\n\t><div style=\"overflow:hidden;\"\n\t\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton'\n\t\t\tdojoAttachPoint=\"downArrowNode,dropDownNode,popupStateNode\" waiRole=\"presentation\"\n\t\t\t><div class=\"dijitArrowButtonInner\"> </div\n\t\t\t><div class=\"dijitArrowButtonChar\">▼</div\n\t\t></div\n\t\t><div class=\"dijitReset dijitValidationIcon\"><br></div\n\t\t><div class=\"dijitReset dijitValidationIconText\">Χ</div\n\t\t><div class=\"dijitReset dijitInputField\"\n\t\t\t><input type=\"text\" autocomplete=\"off\" ${nameAttrSetting} class='dijitReset'\n\t\t\t\tdojoAttachEv ent='onkeypress:_onKey' \n\t\t\t\tdojoAttachPoint='textbox,focusNode' waiRole=\"textbox\" waiState=\"haspopup-true,autocomplete-list\"\n\t\t/></div\n\t></div\n></div>\n",searchDelay:500,_stopClickEvents:false,valueItem:null,numPanes:2.25,postMixInProperties:function(){ -this.inherited(arguments); -this.dropDown=new dojox.widget.FilePicker(this.constraints); -},postCreate:function(){ -this.inherited(arguments); -this.connect(this.dropDown,"onChange",this._onWidgetChange); -this.connect(this.focusNode,"onblur","_focusBlur"); -this.connect(this.focusNode,"onfocus","_focusFocus"); -this.connect(this.focusNode,"ondblclick",function(){ -dijit.selectInputText(this.focusNode); -}); -},_setValueAttr:function(_1,_2,_3){ -if(!this._searchInProgress){ -this.inherited(arguments); -_1=_1||""; -var _4=this.dropDown.attr("pathValue")||""; -if(_1!==_4){ -this._skip=true; -var fx=dojo.hitch(this,"_setBlurValue"); -this.dropDown._setPathValueAttr(_1,!_3,this._settingBlurValue?fx:null); -} -} -},_onWidgetChange:function(_6){ -if(!_6&&this.focusNode.value){ -this._hasValidPath=false; -this.focusNode.value=""; -}else{ -this.valueItem=_6; -var _7=this.dropDown._getPathValueAttr(_6); -if(_7){ -this._hasValidPath=true; -} -if(!this._skip){ -this._setValueAttr(_7,undefined,true); -} -delete this._skip; -} -this.validate(); -},startup:function(){ -if(!this.dropDown._started){ -this.dropDown.startup(); -} -this.inherited(arguments); -},openDropDown:function(){ -this.dropDown.domNode.style.width="0px"; -if(!("minPaneWidth" in (this.constraints||{}))){ -this.dropDown.attr("minPaneWidth",(this.domNode.offsetWidth/this.numPanes)); -} -this.inherited(arguments); -},toggleDropDown:function(){ -this.inherited(arguments); -if(this._opened){ -this.dropDown.attr("pathValue",this.attr("value")); -} -},_focusBlur:function(e){ -if(e.explicitOriginalTarget==this.focusNode&&!this._allowBlur){ -window.setTimeout(dojo.hitch(this,function(){ -if(!this._allowBlur){ -this.focus(); -} -}),1); -}else{ -if(this._menuFocus){ -this.dropDown._updateClass(this._menuFocus,"Item",{"Hover":false}); -delete this._menuFocus; -} -} -},_focusFocus:function(e){ -if(this._menuFocus){ -this.dropDown._updateClass(this._menuFocus,"Item",{"Hover":false}); -} -delete this._menuFocus; -var _a=dijit.getFocus(this); -if(_a&&_a.node){ -_a=dijit.byNode(_a.node); -if(_a){ -this._menuFocus=_a.domNode; -} -} -if(this._menuFocus){ -this.dropDown._updateClass(this._menuFocus,"Item",{"Hover":true}); -} -delete this._allowBlur; -},_onBlur:function(){ -this._allowBlur=true; -delete this.dropDown._savedFocus; -this.inherited(arguments); -},_setBlurValue:function(){ -if(this.dropDown&&!this._settingBlurValue){ -this._settingBlurValue=true; -this.attr("value",this.focusNode.value); -}else{ -delete this._settingBlurValue; -this.inherited(arguments); -} -},parse:function(_b,_c){ -if(this._hasValidPath||this._hasSelection){ -return _b; -} -var dd=this.dropDown,_e=dd.topDir,_f=dd.pathSeparator; -var _10=dd.attr("pathValue"); -var _11=function(v){ -if(_e.length&&v.indexOf(_e)===0){ -v=v.substring(_e.length); -} -if(_f&&v[v.length-1]==_f){ -v=v.substring(0,v.length-1); -} -return v; -}; -_10=_11(_10); -var val=_11(_b); -if(val==_10){ -return _b; -} -return undefined; -},_startSearchFromInput:function(){ -var dd=this.dropDown,fn=this.focusNode; -var val=fn.value,_17=val,_18=dd.topDir; -if(this._hasSelection){ -dijit.selectInputText(fn,_17.length); -} -this._hasSelection=false; -if(_18.length&&val.indexOf(_18)===0){ -val=val.substring(_18.length); -} -var _19=val.split(dd.pathSeparator); -var _1a=dojo.hitch(this,function(idx){ -var dir=_19[idx]; -var _1d=dd.getChildren()[idx]; -var _1e; -this._searchInProgress=true; -var _1f=dojo.hitch(this,function(){ -delete this._searchInProgress; -}); -if((dir||_1d)&&!this._opened){ -this.toggleDropDown(); -} -if(dir&&_1d){ -var fx=dojo.hitch(this,function(){ -if(_1e){ -this.disconnect(_1e); -} -delete _1e; -var _21=_1d._menu.getChildren(); -var _22=dojo.filter(_21,function(i){ -return i.label==dir; -})[0]; -var _24=dojo.filter(_21,function(i){ -return (i.label.indexOf(dir)===0); -})[0]; -if(_22&&((_19.length>idx+1&&_22.children)||(!_22.children))){ -idx++; -_1d._menu.onItemClick(_22,{type:"internal",stopPropagation:function(){ -},preventDefault:function(){ -}}); -if(_19[idx]){ -_1a(idx); -}else{ -_1f(); -} -}else{ -_1d._setSelected(null); -if(_24&&_19.length===idx+1){ -dd._setInProgress=true; -dd._removeAfter(_1d); -delete dd._setInProgress; -var _26=_24.label; -if(_24.children){ -_26+=dd.pathSeparator; -} -_26=_26.substring(dir.length); -window.setTimeout(function(){ -dijit.scrollIntoView(_24.domNode); -},1); -fn.value=_17+_26; -dijit.selectInputText(fn,_17.length); -this._hasSelection=true; -try{ -_24.focusNode.focus(); -} -catch(e){ -} -}else{ -if(this._menuFocus){ -this.dropDown._updateClass(this._menuFocus,"Item",{"Hover":false,"Focus":false}); -} -delete this._menuFocus; -} -_1f(); -} -}); -if(!_1d.isLoaded){ -_1e=this.connect(_1d,"onLoad",fx); -}else{ -fx(); -} -}else{ -if(_1d){ -_1d._setSelected(null); -dd._setInProgress=true; -dd._removeAfter(_1d); -delete dd._setInProgress; -} -_1f(); -} -}); -_1a(0); -},_onKey:function(e){ -if(this.disabled||this.readOnly){ -return; -} -var dk=dojo.keys; -var c=e.charOrCode; -if(c==dk.DOWN_ARROW){ -this._allowBlur=true; -} -if(c==dk.ENTER&&this._opened){ -this.dropDown.onExecute(); -dijit.selectInputText(this.focusNode,this.focusNode.value.length); -this._hasSelection=false; -dojo.stopEvent(e); -return; -} -if((c==dk.RIGHT_ARROW||c==dk.LEFT_ARROW||c==dk.TAB)&&this._hasSelection){ -this._startSearchFromInput(); -dojo.stopEvent(e); -return; -} -this.inherited(arguments); -var _2a=false; -if((c==dk.BACKSPACE||c==dk.DELETE)&&this._hasSelection){ -this._hasSelection=false; -}else{ -if(c==dk.BACKSPACE||c==dk.DELETE||c==" "){ -_2a=true; -}else{ -_2a=e.keyChar!==""; -} -} -if(this._searchTimer){ -window.clearTimeout(this._searchTimer); -} -delete this._searchTimer; -if(_2a){ -this._hasValidPath=false; -this._hasSelection=false; -this._searchTimer=window.setTimeout(dojo.hitch(this,"_startSearchFromInput"),this.searchDelay+1); -} -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/FileUploader.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/FileUploader.js b/components/camel-web/src/main/webapp/js/dojox/form/FileUploader.js deleted file mode 100644 index acf68ec..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/FileUploader.js +++ /dev/null @@ -1,415 +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["dojox.form.FileUploader"]){ -dojo._hasResource["dojox.form.FileUploader"]=true; -dojo.provide("dojox.form.FileUploader"); -dojo.experimental("dojox.form.FileUploader"); -var swfPath=dojo.config.uploaderPath||dojo.moduleUrl("dojox.form","resources/uploader.swf"); -dojo.require("dojox.embed.Flash"); -dojo.require("dojo.io.iframe"); -dojo.require("dojox.html.styles"); -dojo.declare("dojox.form.FileUploader",null,{isDebug:false,devMode:false,id:"",uploadUrl:"",button:null,uploadOnChange:false,selectMultipleFiles:true,htmlFieldName:"uploadedfile",flashFieldName:"flashUploadFiles",fileMask:[],force:"",postData:null,swfPath:swfPath,minFlashVersion:9,uploaderType:"",flashObject:null,flashMovie:null,flashDiv:null,domNode:null,constructor:function(_1){ -this.init(_1); -},log:function(){ -if(this.isDebug){ -console.log.apply(console,arguments); -} -},init:function(_2){ -dojo.mixin(this,_2); - -this.id=this.id||dijit.getUniqueId("uploader"); -dijit.registry.add(this); -this.log("init Flash:",(dojox.embed.Flash.available>=this.minFlashVersion||this.force=="flash"),dojox.embed.Flash.available>=this.minFlashVersion,this.force=="flash"); -this.fileList=[]; -this._subs=[]; -this._cons=[]; -if((dojox.embed.Flash.available>=this.minFlashVersion||this.force=="flash")&&this.force!="html"){ -this.uploaderType="flash"; -this.createFlashUploader(); -}else{ -this.uploaderType="html"; -this.fileInputs=[]; -this.fileCount=0; -if(dojo.isIE&&dojo.isIE<7){ -setTimeout(dojo.hitch(this,"createHtmlUploader"),1); -}else{ -this.createHtmlUploader(); -} -} -},onMouseDown:function(_3){ -},onMouseUp:function(_4){ -},onMouseOver:function(_5){ -if(this.button.domNode){ -dojo.addClass(this.button.domNode,"dijitButtonHover dijitHover"); -} -},onMouseOut:function(_6){ -if(this.button.domNode){ -dojo.removeClass(this.button.domNode,"dijitButtonHover dijitHover"); -} -},onChange:function(_7){ -},onProgress:function(_8){ -},onComplete:function(_9){ -},onCancel:function(){ -this.log("Upload Canceled"); -},onError:function(_a){ -var _b=_a.type?_a.type.toUpperCase():"ERROR"; -var _c=_a.msg?_a.msg:_a; -console.warn("FLASH/ERROR/"+_b,_c); -},upload:function(_d){ -if(_d){ -this.postData=_d; -} -this.log("upload type:",this.uploaderType," - postData:",this.postData); -if(this.uploaderType=="flash"){ -try{ -this.flashMovie.doUpload(this.postData); -} -catch(err){ -throw new Error("Sorry, the SWF failed to initialize properly. The page will have to be refreshed. ERROR:"+err); -} -}else{ -dojo.io.iframe.send({url:this.uploadUrl,form:this._formNode,handleAs:"json",handle:dojo.hitch(this,function(_e,_f,_10){ -this._complete([_e]); -})}); -} -},setPosition:function(){ -if(this.uploaderType=="flash"){ -this.setFlashPosition(); -}else{ -this.setHtmlPosition(); -} -},hide:function(){ -dojo.style(this.domNode,"display","none"); -},show:function(){ -dojo.style(this.domNode,"display",""); -},disable:function(_11){ -if(_11){ -this.hide(); -}else{ -this.show(); -} -},destroyAll:function(){ -if(this.button.destroy){ -this.button.destroy(); -}else{ -dojo.destroy(this.button); -} -this.destroy(); -},destroy:function(){ -if(this.uploaderType=="flash"&&!this.flashMovie){ -this._cons.push(dojo.connect(this,"onLoad",this,"destroy")); -return; -} -dojo.forEach(this._subs,function(s){ -dojo.unsubscribe(s); -}); -dojo.forEach(this._cons,function(c){ -dojo.disconnect(c); -}); -if(this.uploaderType=="flash"){ -this.flashObject.destroy(); -dojo.destroy(this.flashDiv); -} -},createFlashUploader:function(){ -this.log("FLASH"); -var _14=this.uploadUrl.toLowerCase(); -if(_14.indexOf("http")<0&&_14.indexOf("/")!=0){ -var loc=window.location.href.split("/"); -loc.pop(); -loc=loc.join("/")+"/"; -this.uploadUrl=loc+this.uploadUrl; -}else{ -} -var dim=this.getFakeButtonSize(); -var w="100%"; -var h="100%"; -var _19={expressInstall:true,path:this.swfPath.uri||this.swfPath,width:w,height:h,allowScriptAccess:"always",allowNetworking:"all",vars:{uploadDataFieldName:this.flashFieldName,uploadUrl:this.uploadUrl,uploadOnSelect:this.uploadOnChange,selectMultipleFiles:this.selectMultipleFiles,id:this.id,isDebug:this.isDebug,devMode:this.devMode},params:{wmode:"transparent"}}; -if(_19.vars.isDebug&&window.console&&window.console.dir){ -window.passthrough=function(){ -console.log.apply(console,arguments); -}; -window.passthrough("Flash trace enabled."); -}else{ -window.passthrough=function(){ -}; -} -this.flashDiv=dojo.doc.createElement("div"); -this.domNode=this.flashDiv; -dojo.body().appendChild(this.flashDiv); -this._connectFlash(); -this.setPosition(); -this.flashObject=new dojox.embed.Flash(_19,this.flashDiv); -this.flashObject.onError=function(msg){ -console.warn("Flash Error:",msg); -}; -this.flashObject.onLoad=dojo.hitch(this,function(mov){ -this.log("ONLOAD",mov); -this.flashMovie=mov; -this.setFlashVars(); -}); -},setFlashVars:function(){ -this.flashMovie.setFileMask(this.fileMask); -this.flashMovie.setPostData(this.postData); - -return; -try{ -this.flashMovie.setFileMask(this.fileMask); -if(this.postData){ -this.flashMovie.setPostData(this.postData); -} -} -catch(e){ -if(this.setvarTries===undefined){ -this.setvarTries=0; -} -this.setvarTries++; -if(this.setvarTries<10){ -setTimeout(dojo.hitch(this,"setFlashVars"),500); -}else{ -console.warn("Tried to set Flash Vars and Post data but failed."); -} -} -},createHtmlUploader:function(){ -if(!this.button.id){ -this.button.id=dijit.getUniqueId("btn"); -} -var _1c; -if(this.button.domNode){ -_1c=dojo.byId(this.button.id).parentNode.parentNode; -_1c.parentNode.onmousedown=function(){ -}; -}else{ -_1c=this.button.parentNode; -} -this._buildForm(_1c); -this._buildFileInput(_1c); -this.setPosition(); -this._connectInput(); -},setFlashPosition:function(){ -var dim=this.getFakeButtonSize(); -setTimeout(dojo.hitch(this,function(){ -dojo.style(this.flashDiv,{position:"absolute",top:dim.y+"px",left:dim.x+"px",width:dim.w+"px",height:dim.h+"px",zIndex:2001}); -this.log("this.flashDiv:",this.flashDiv); -}),100); -},setHtmlPosition:function(){ -var _1e=this.getFakeButtonSize(); -var _1f=dojo.marginBox(this._fileInput); -var _20="rect(0px "+_1f.w+"px "+_1e.h+"px "+(_1f.w-_1e.w)+"px)"; -this._fileInput.style.clip=_20; -this._fileInput.style.left=(_1e.x+_1e.w-_1f.w)+"px"; -this._fileInput.style.top=_1e.y+"px"; -this._fileInput.style.zIndex=2001; -},_connectFlash:function(){ -this._doSub("/filesSelected","_change"); -this._doSub("/filesUploaded","_complete"); -this._doSub("/filesProgress","_progress"); -this._doSub("/filesError","_error"); -this._doSub("/filesCanceled","onCancel"); -this._doSub("/up","onMouseUp"); -this._doSub("/down","onMouseDown"); -this._doSub("/over","onMouseOver"); -this._doSub("/out","onMouseOut"); -this._connectCommon(); -},_doSub:function(_21,_22){ -this._subs.push(dojo.subscribe(this.id+_21,this,_22)); -},_connectInput:function(){ -this._disconnect(); -this._cons.push(dojo.connect(this._fileInput,"mouseover",this,function(evt){ -this.onMouseOver(evt); -})); -this._cons.push(dojo.connect(this._fileInput,"mouseout",this,function(evt){ -this.onMouseOut(evt); -this._checkHtmlCancel("off"); -})); -this._cons.push(dojo.connect(this._fileInput,"mousedown",this,function(evt){ -this.onMouseDown(evt); -})); -this._cons.push(dojo.connect(this._fileInput,"mouseup",this,function(evt){ -this.onMouseUp(evt); -this._checkHtmlCancel("up"); -})); -this._cons.push(dojo.connect(this._fileInput,"change",this,function(){ - -this._checkHtmlCancel("change"); -this._change([{name:this._fileInput.value,type:"",size:0}]); -})); -this._connectCommon(); -},_connectCommon:function(){ -this._cons.push(dojo.connect(window,"resize",this,"setPosition")); -if(this.button.domNode){ -this._cons.push(dojo.connect(this.button,"onClick",this,"setPosition")); -}else{ -this._cons.push(dojo.connect(this.button,"click",this,"setPosition")); -} -var _27=this._dialogParent(); -if(_27){ -this._cons.push(dojo.connect(_27,"show",this,function(){ -this.show(); -this.setPosition(); -})); -this._cons.push(dojo.connect(_27,"hide",this,"hide"),dojo.connect(_27,"destroy",this,"destroy")); -this._subs.push(dojo.subscribe("/dnd/move/stop",this,"setPosition")); -} -if(this.button.domNode){ -this._cons.push(dojo.connect(this.button,"_setDisabledAttr",this,"disable")); -} -setTimeout(dojo.hitch(this,"setPosition"),500); -},_checkHtmlCancel:function(_28){ -if(_28=="change"){ -this.dialogIsOpen=false; -} -if(_28=="up"){ -this.dialogIsOpen=true; -} -if(_28=="off"){ -this.dialogIsOpen=false; -this.onCancel(); -} -},_error:function(evt){ -this.onError(evt); -},_change:function(_2a){ -this.fileList=this.fileList.concat(_2a); -this.onChange(_2a); -if(this.uploadOnChange){ -this.upload(); -} -},_complete:function(_2b){ -this.log("_complete",_2b); -for(var i=0;i<this.fileList.length;i++){ -this.fileList[i].percent=100; -} -this._progress(this.fileList); -this.fileList=[]; -this.onComplete(_2b); -},_progress:function(_2d){ -this.log("_progress",_2d); -for(var i=0;i<this.fileList.length;i++){ -var f=this.fileList[i]; -if(f.name==_2d.name){ -f.bytesLoaded=_2d.bytesLoaded; -f.bytesTotal=_2d.bytesTotal; -f.percent=Math.ceil(f.bytesLoaded/f.bytesTotal*100); -}else{ -if(!f.percent){ -f.bytesLoaded=0; -f.bytesTotal=0; -f.percent=0; -} -} -} -this.onProgress(this.fileList); -},_dialogParent:function(){ -var _30; -var _31=this.button.domNode||this.button; -for(var i=0;i<50;i++){ -if(_31.tagName.toLowerCase()=="body"){ -_31=null; -break; -} -if(_31.tagName&&_31.tagName.toLowerCase()=="div"&&(dojo.attr(_31,"widgetId")||dojo.attr(_31,"widgetid"))){ -_30=dijit.byNode(_31); -if(_30.titleBar&&_30.titleNode){ -break; -}else{ -_30=null; -} -} -_31=_31.parentNode; -} -return _30; -},_disconnect:function(){ -dojo.forEach(this._cons,function(c){ -dojo.disconnect(c); -}); -},_buildFileInput:function(_34){ -if(this._fileInput){ -this._disconnect(); -dojo.style(this._fileInput,"display","none"); -} -this._fileInput=document.createElement("input"); -this.domNode=this._fileInput; -this._fileInput.setAttribute("type","file"); -this.fileInputs.push(this._fileInput); -var nm=this.htmlFieldName; -var _id=this.id; -if(this.selectMultipleFiles){ -nm+=this.fileCount; -_id+=this.fileCount; -this.fileCount++; -} -this.log("NAME:",nm,this.htmlFieldName,this.fileCount); -this._fileInput.setAttribute("id",this.id); -this._fileInput.setAttribute("name",nm); -dojo.addClass(this._fileInput,"dijitFileInputReal"); -if(this.devMode){ -dojo.style(this._fileInput,"opacity",1); -} -this._formNode.appendChild(this._fileInput); -},_removeFileInput:function(){ -dojo.forEach(this.fileInputs,function(inp){ -inp.parentNode.removeChild(inp); -}); -this.fileInputs=[]; -this.fileCount=0; -},_buildForm:function(_38){ -if(this._formNode){ -return; -} -if(dojo.isIE){ -this._formNode=document.createElement("<form enctype=\"multipart/form-data\" method=\"post\">"); -this._formNode.encoding="multipart/form-data"; -}else{ -this._formNode=document.createElement("form"); -this._formNode.setAttribute("enctype","multipart/form-data"); -} -this._formNode.id=dijit.getUniqueId("form"); -if(_38&&dojo.style(_38,"display").indexOf("inline")>-1){ -document.body.appendChild(this._formNode); -}else{ -_38.appendChild(this._formNode); -} -this._setHtmlPostData(); -this._setFormStyle(); -},_setHtmlPostData:function(){ -if(this.postData){ -for(var nm in this.postData){ -var f=document.createElement("input"); -dojo.attr(f,"type","hidden"); -dojo.attr(f,"name",nm); -dojo.attr(f,"value",this.postData[nm]); -this._formNode.appendChild(f); -} -} -},_setFormStyle:function(){ -var _3b=this.getFakeButtonSize(); -var _3c=Math.max(2,Math.max(Math.ceil(_3b.w/60),Math.ceil(_3b.h/15))); -dojox.html.insertCssRule("#"+this._formNode.id+" input","font-size:"+_3c+"em"); -},getFakeButtonSize:function(){ -var _3d=(this.button.domNode)?dojo.byId(this.button.id).parentNode:dojo.byId(this.button.id)||this.button; -if(_3d.tagName.toLowerCase()=="span"){ -_3d=dojo.byId(this.button.id); -} -var _3e=dojo.coords(_3d,true); -_3e.w=(dojo.style(_3d,"display")=="block")?dojo.style(_3d,"width"):_3e.w; -var p=_3d.parentNode.parentNode; -if(p&&dojo.style(p,"position")=="relative"){ -_3e.x=dojo.style(p,"left"); -_3e.y=dojo.style(p,"top"); -} -if(p&&dojo.style(p,"position")=="absolute"){ -_3e.x=0; -_3e.y=0; -} -var s=3; -_3e.x-=s; -_3e.y-=s; -_3e.w+=s*2; -_3e.h+=s*2; -return _3e; -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/Manager.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/Manager.js b/components/camel-web/src/main/webapp/js/dojox/form/Manager.js deleted file mode 100644 index 20298db..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/Manager.js +++ /dev/null @@ -1,35 +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["dojox.form.Manager"]){ -dojo._hasResource["dojox.form.Manager"]=true; -dojo.provide("dojox.form.Manager"); -dojo.require("dijit._Widget"); -dojo.require("dijit._Templated"); -dojo.require("dojox.form.manager._Mixin"); -dojo.require("dojox.form.manager._NodeMixin"); -dojo.require("dojox.form.manager._FormMixin"); -dojo.require("dojox.form.manager._ValueMixin"); -dojo.require("dojox.form.manager._EnableMixin"); -dojo.require("dojox.form.manager._DisplayMixin"); -dojo.require("dojox.form.manager._ClassMixin"); -dojo.declare("dojox.form.Manager",[dijit._Widget,dijit._Templated,dojox.form.manager._Mixin,dojox.form.manager._NodeMixin,dojox.form.manager._FormMixin,dojox.form.manager._ValueMixin,dojox.form.manager._EnableMixin,dojox.form.manager._DisplayMixin,dojox.form.manager._ClassMixin],{widgetsInTemplate:true,buildRendering:function(){ -var _1=this.domNode=this.srcNodeRef; -if(!this.containerNode){ -this.containerNode=_1; -} -this._attachTemplateNodes(_1); -},startup:function(){ -if(this._started){ -return; -} -this._attachTemplateNodes(this.getDescendants(),function(n,p){ -return n[p]; -}); -this.inherited(arguments); -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/MultiComboBox.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/MultiComboBox.js b/components/camel-web/src/main/webapp/js/dojox/form/MultiComboBox.js deleted file mode 100644 index 32ea2a2..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/MultiComboBox.js +++ /dev/null @@ -1,46 +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["dojox.form.MultiComboBox"]){ -dojo._hasResource["dojox.form.MultiComboBox"]=true; -dojo.provide("dojox.form.MultiComboBox"); -dojo.experimental("dojox.form.MultiComboBox"); -dojo.require("dijit.form.ComboBox"); -dojo.require("dijit.form.ValidationTextBox"); -dojo.declare("dojox.form.MultiComboBox",[dijit.form.ValidationTextBox,dijit.form.ComboBoxMixin],{delimiter:",",_previousMatches:false,_setValueAttr:function(_1){ -if(this.delimiter&&_1.length!=0){ -_1=_1+this.delimiter+" "; -arguments[0]=this._addPreviousMatches(_1); -} -this.inherited(arguments); -},_addPreviousMatches:function(_2){ -if(this._previousMatches){ -if(!_2.match(new RegExp("^"+this._previousMatches))){ -_2=this._previousMatches+_2; -} -_2=this._cleanupDelimiters(_2); -} -return _2; -},_cleanupDelimiters:function(_3){ -if(this.delimiter){ -_3=_3.replace(new RegExp(" +")," "); -_3=_3.replace(new RegExp("^ *"+this.delimiter+"* *"),""); -_3=_3.replace(new RegExp(this.delimiter+" *"+this.delimiter),this.delimiter); -} -return _3; -},_autoCompleteText:function(_4){ -arguments[0]=this._addPreviousMatches(_4); -this.inherited(arguments); -},_startSearch:function(_5){ -_5=this._cleanupDelimiters(_5); -var re=new RegExp("^.*"+this.delimiter+" *"); -if((this._previousMatches=_5.match(re))){ -arguments[0]=_5.replace(re,""); -} -this.inherited(arguments); -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/form/PasswordValidator.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/form/PasswordValidator.js b/components/camel-web/src/main/webapp/js/dojox/form/PasswordValidator.js deleted file mode 100644 index 4762633..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/form/PasswordValidator.js +++ /dev/null @@ -1,153 +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["dojox.form.PasswordValidator"]){ -dojo._hasResource["dojox.form.PasswordValidator"]=true; -dojo.provide("dojox.form.PasswordValidator"); -dojo.require("dijit.form._FormWidget"); -dojo.require("dijit.form.ValidationTextBox"); -dojo.requireLocalization("dojox.form","PasswordValidator",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw"); -dojo.declare("dojox.form._ChildTextBox",dijit.form.ValidationTextBox,{containerWidget:null,type:"password",reset:function(){ -dijit.form.ValidationTextBox.prototype._setValueAttr.call(this,"",true); -this._hasBeenBlurred=false; -},postCreate:function(){ -this.inherited(arguments); -if(!this.name){ -dojo.removeAttr(this.focusNode,"name"); -} -}}); -dojo.declare("dojox.form._OldPWBox",dojox.form._ChildTextBox,{_isPWValid:false,_setValueAttr:function(_1,_2){ -if(_1===""){ -_1=dojox.form._OldPWBox.superclass.attr.call(this,"value"); -} -if(_2!==null){ -this._isPWValid=this.containerWidget.pwCheck(_1); -} -this.inherited(arguments); -this.containerWidget._childValueAttr(this.containerWidget._inputWidgets[1].attr("value")); -},isValid:function(_3){ -return this.inherited("isValid",arguments)&&this._isPWValid; -},_update:function(e){ -if(this._hasBeenBlurred){ -this.validate(true); -} -this._onMouse(e); -},_getValueAttr:function(){ -if(this.containerWidget._started&&this.containerWidget.isValid()){ -return this.inherited(arguments); -} -return ""; -},_setBlurValue:function(){ -var _5=dijit.form.ValidationTextBox.prototype._getValueAttr.call(this); -this._setValueAttr(_5,(this.isValid?this.isValid():true)); -}}); -dojo.declare("dojox.form._NewPWBox",dojox.form._ChildTextBox,{required:true,onChange:function(){ -this.containerWidget._inputWidgets[2].validate(false); -this.inherited(arguments); -}}); -dojo.declare("dojox.form._VerifyPWBox",dojox.form._ChildTextBox,{isValid:function(_6){ -return this.inherited("isValid",arguments)&&(this.attr("value")==this.containerWidget._inputWidgets[1].attr("value")); -}}); -dojo.declare("dojox.form.PasswordValidator",dijit.form._FormValueWidget,{required:true,_inputWidgets:null,oldName:"",templateString:"<div dojoAttachPoint=\"containerNode\">\n\t<input type=\"hidden\" name=\"${name}\" value=\"\" dojoAttachPoint=\"focusNode\" />\n</div>\n",_hasBeenBlurred:false,isValid:function(_7){ -return dojo.every(this._inputWidgets,function(i){ -if(i&&i._setStateClass){ -i._setStateClass(); -} -return (!i||i.isValid()); -}); -},validate:function(_9){ -return dojo.every(dojo.map(this._inputWidgets,function(i){ -if(i&&i.validate){ -i._hasBeenBlurred=(i._hasBeenBlurred||this._hasBeenBlurred); -return i.validate(); -} -return true; -},this),"return item;"); -},reset:function(){ -this._hasBeenBlurred=false; -dojo.forEach(this._inputWidgets,function(i){ -if(i&&i.reset){ -i.reset(); -} -},this); -},_createSubWidgets:function(){ -var _c=this._inputWidgets,_d=dojo.i18n.getLocalization("dojox.form","PasswordValidator",this.lang); -dojo.forEach(_c,function(i,_f){ -if(i){ -var p={containerWidget:this},c; -if(_f===0){ -p.name=this.oldName; -p.invalidMessage=_d.badPasswordMessage; -c=dojox.form._OldPWBox; -}else{ -if(_f===1){ -p.required=this.required; -c=dojox.form._NewPWBox; -}else{ -if(_f===2){ -p.invalidMessage=_d.nomatchMessage; -c=dojox.form._VerifyPWBox; -} -} -} -_c[_f]=new c(p,i); -} -},this); -},pwCheck:function(_12){ -return false; -},postCreate:function(){ -this.inherited(arguments); -var _13=this._inputWidgets=[]; -dojo.forEach(["old","new","verify"],function(i){ -_13.push(dojo.query("input[pwType="+i+"]",this.containerNode)[0]); -},this); -if(!_13[1]||!_13[2]){ -throw new Error("Need at least pwType=\"new\" and pwType=\"verify\""); -} -if(this.oldName&&!_13[0]){ -throw new Error("Need to specify pwType=\"old\" if using oldName"); -} -this._createSubWidgets(); -this.connect(this._inputWidgets[1],"_setValueAttr","_childValueAttr"); -this.connect(this._inputWidgets[2],"_setValueAttr","_childValueAttr"); -},_childValueAttr:function(v){ -this.attr("value",this.isValid()?v:""); -},_setDisabledAttr:function(_16){ -this.inherited(arguments); -dojo.forEach(this._inputWidgets,function(i){ -if(i&&i.attr){ -i.attr("disabled",_16); -} -}); -},_setRequiredAttribute:function(_18){ -this.required=_18; -dojo.attr(this.focusNode,"required",_18); -dijit.setWaiState(this.focusNode,"required",_18); -this._refreshState(); -dojo.forEach(this._inputWidgets,function(i){ -if(i&&i.attr){ -i.attr("required",_18); -} -}); -},_setValueAttr:function(v){ -this.inherited(arguments); -dojo.attr(this.focusNode,"value",v); -},_getValueAttr:function(){ -return this.inherited(arguments)||""; -},focus:function(){ -var f=false; -dojo.forEach(this._inputWidgets,function(i){ -if(i&&!i.isValid()&&!f){ -i.focus(); -f=true; -} -}); -if(!f){ -this._inputWidgets[1].focus(); -} -}}); -}