bebeboutik/adm/ajaxfilemanager/jscripts/ajaxfilemanager_c.js

568 lines
90 KiB
JavaScript
Raw Normal View History

2016-01-04 12:48:08 +01:00
//jquery.js. start
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7(1g 18.6=="I"){18.I=18.I;u 6=q(a,c){7(18==9||!9.3X)v 14 6(a,c);v 9.3X(a,c)};7(1g $!="I")6.1I$=$;u $=6;6.11=6.8r={3X:q(a,c){a=a||P;7(6.16(a))v 14 6(P)[6.11.1G?"1G":"1W"](a);7(1g a=="1s"){u m=/^[^<]*(<(.|\\s)+>)[^>]*$/.1V(a);7(m)a=6.31([m[1]]);B v 14 6(c).1L(a)}v 9.4E(a.15==2b&&a||(a.3C||a.C&&a!=18&&!a.1q&&a[0]!=I&&a[0].1q)&&6.2L(a)||[a])},3C:"1.1.3.1",7W:q(){v 9.C},C:0,1M:q(a){v a==I?6.2L(9):9[a]},1Z:q(a){u b=6(a);b.5q=9;v b},4E:q(a){9.C=0;[].R.O(9,a);v 9},F:q(a,b){v 6.F(9,a,b)},2p:q(a){u b=-1;9.F(q(i){7(9==a)b=i});v b},1b:q(f,d,e){u c=f;7(f.15==33)7(d==I)v 9.C&&6[e||"1b"](9[0],f)||I;B{c={};c[f]=d}v 9.F(q(a){E(u b V c)6.1b(e?9.T:9,b,6.4H(9,c[b],e,a,b))})},1f:q(b,a){v 9.1b(b,a,"2z")},2A:q(e){7(1g e=="1s")v 9.2Y().3e(P.66(e));u t="";6.F(e||9,q(){6.F(9.2S,q(){7(9.1q!=8)t+=9.1q!=1?9.5R:6.11.2A([9])})});v t},8b:q(){u a,1S=19;v 9.F(q(){7(!a)a=6.31(1S,9.2O);u b=a[0].3s(K);9.L.2K(b,9);1v(b.1d)b=b.1d;b.4g(9)})},3e:q(){v 9.2F(19,K,1,q(a){9.4g(a)})},5w:q(){v 9.2F(19,K,-1,q(a){9.2K(a,9.1d)})},5t:q(){v 9.2F(19,N,1,q(a){9.L.2K(a,9)})},5s:q(){v 9.2F(19,N,-1,q(a){9.L.2K(a,9.1X)})},2U:q(){v 9.5q||6([])},1L:q(t){u b=6.3k(9,q(a){v 6.1L(t,a)});v 9.1Z(/[^+>] [^+>]/.17(t)||t.J("..")>-1?6.5g(b):b)},7x:q(e){u d=9.1A(9.1L("*"));d.F(q(){9.1I$1a={};E(u a V 9.$1a)9.1I$1a[a]=6.1c({},9.$1a[a])}).3U();u r=9.1Z(6.3k(9,q(a){v a.3s(e!=I?e:K)}));d.F(q(){u b=9.1I$1a;E(u a V b)E(u c V b[a])6.S.1A(9,a,b[a][c],b[a][c].W);9.1I$1a=H});v r},1i:q(t){v 9.1Z(6.16(t)&&6.2s(9,q(b,a){v t.O(b,[a])})||6.2x(t,9))},4Y:q(t){v 9.1Z(t.15==33&&6.2x(t,9,K)||6.2s(9,q(a){v(t.15==2b||t.3C)?6.2w(a,t)<0:a!=t}))},1A:q(t){v 9.1Z(6.1T(9.1M(),t.15==33?6(t).1M():t.C!=I&&(!t.Q||t.Q=="6Z")?t:[t]))},37:q(a){v a?6.2x(a,9).C>0:N},6R:q(a){v a==I?(9.C?9[0].2v:H):9.1b("2v",a)},3F:q(a){v a==I?(9.C?9[0].27:H):9.2Y().3e(a)},2F:q(f,d,g,e){u c=9.C>1,a;v 9.F(q(){7(!a){a=6.31(f,9.2O);7(g<0)a.6E()}u b=9;7(d&&6.Q(9,"1r")&&6.Q(a[0],"2V"))b=9.3R("1z")[0]||9.4g(P.5h("1z"));6.F(a,q(){e.O(b,[c?9.3s(K):9])})})}};6.1c=6.11.1c=q(){u c=19[0],a=1;7(19.C==1){c=9;a=0}u b;1v((b=19[a++])!=H)E(u i V b)c[i]=b[i];v c};6.1c({6n:q(){7(6.1I$)$=6.1I$;v 6},16:q(a){v!!a&&1g a!="1s"&&!a.Q&&a.15!=2b&&/q/i.17(a+"")},40:q(a){v a.4z&&a.2O&&!a.2O.4y},Q:q(b,a){v b.Q&&b.Q.1D()==a.1D()},F:q(a,b,c){7(a.C==I)E(u i V a)b.O(a[i],c||[i,a[i]]);B E(u i=0,4x=a.C;i<4x;i++)7(b.O(a[i],c||[i,a[i]])===N)1F;v a},4H:q(c,b,d,e,a){7(6.16(b))b=b.3D(c,[e]);u f=/z-?2p|5Y-?8p|1e|5U|8i-?1u/i;v b&&b.15==3y&&d=="2z"&&!f.17(a)?b+"4o":b},12:{1A:q(b,c){6.F(c.2R(/\\s+/),q(i,a){7(!6.12.3w(b.12,a))b.12+=(b.12?" ":"")+a})},1E:q(b,c){b.12=c!=I?6.2s(b.12.2R(/\\s+/),q(a){v!6.12.3w(c,a)}).5M(" "):""},3w:q(t,c){v 6.2w(c,(t.12||t).3v().2R(/\\s+/))>-1}},4m:q(e,o,f){E(u i V o){e.T["2N"+i]=e.T[i];e.T[i]=o[i]}f.O(e,[]);E(u i V o)e.T[i]=e.T["2N"+i]},1f:q(e,p){7(p=="1u"||p=="29"){u b={},3r,3p,d=["83","81","80","7Y"];6.F(d,q(){b["7V"+9]=0;b["7T"+9+"7S"]=0});6.4m(e,b,q(){7(6(e).37(\':4f\')){3r=e.7Q;3p=e.7O}B{e=6(e.3s(K)).1L(":4b").5v("2B").2U().1f({48:"1y",3i:"7L",U:"2h",7K:"0",7I:"0"}).5o(e.L)[0];u a=6.1f(e.L,"3i")||"3n";7(a=="3n")e.L.T.3i="7G";3r=e.7E;3p=e.7D;7(a=="3n")e.L.T.3i="3n";e.L.3q(e)}});v p=="1u"?3r:3p}v 6.2z(e,p)},2z:q(e,a,d){u g;7(a=="1e"&&6.M.1h){g=6.1b(e.T,"1e");v g==""?"1":g}7(a.3t(/3x/i))a=6.1U;7(!d&&e.T[a])g=e.T[a];B 7(P.3f&&P.3f.3Y){7(a.3t(/3x/i))a="3x";a=a.1o(/([A-Z])/g,"-$1").2H();u b=P.3f.3Y(e,H);7(b)g=b.57(a);B 7(a=="U")g="1P";B 6.4m(e,{U:"2h"},q(){u c=P.3f.3Y(9,"");g=c&&c.57(a)||""})}B 7(e.3S){u f=a.1o(/\\-(\\w)/g,q(m,c){v c.1D()});g=e.3S[a]||e.3S[f]}v g},31:q(a,c){u r=[];c=c||P;6.F(a,q(i,b){7(!b)v;7(b.15==3y)b=b.3v();7(1g b=="1s"){u s=6.2C(b).2H(),1x=c.5h("1x"),1N=[];u a=!s.J("<1H")&&[1,"<2y>","</2y>"]||!s.J("<7g")&&[1,"<52>","</52>"]||(!s.J("<7c")||!s.J("<1z")||!s.J("<7a")||!s.J("<78"))&&[1,"<1r>","</1r>"]||!s.J("<2V")&&[2,"<1r><1z>
//jquery end
//form start
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.c.1h=6(7){3(C 7==\'6\')7={D:7};7=$.2j({1d:4.Q(\'1S\')||1n.2z,M:4.Q(\'2q\')||\'2k\'},7||{});2 a=4.1z(7.K);3(7.1X&&7.1X(a,4,7)===B)8 4;2 1g={};$.O.I(\'5.E.2x\',[a,4,7,1g]);3(1g.1g)8 4;2 q=$.1K(a);3(7.M.3u()==\'2k\'){7.1d+=(7.1d.3q(\'?\')>=0?\'&\':\'?\')+q;7.h=o}p 7.h=q;2 $5=4,L=[];3(7.1A)L.u(6(){$5.1A()});3(7.1x)L.u(6(){$5.1x()});3(!7.13&&7.12){2 1Y=7.D;L.u(6(h){$(7.12).Q("1W",h).2X().H(1Y,2R)})}p 3(7.D)L.u(7.D);7.D=6(h,1m){F(2 i=0,w=L.z;i<w;i++)L[i](h,1m,$5)};2 1o=$(\'A:2C\',4).R();2 1k=B;F(2 j=0;j<1o.z;j++)3(1o[j])1k=Y;3(7.1M||1k)2u();p $.3x(7);$.O.I(\'5.E.3v\',[4,7]);8 4;6 2u(){2 5=$5[0];2 k=$.2j({},$.3t,7);2 N=\'3p\'+$.c.1h.1e++;2 $d=$(\'<1M N="\'+N+\'" m="\'+N+\'" />\');2 d=$d[0];2 2h=$.1E.2d&&1n.2d.3g()<9;3($.1E.29||2h)d.3a=\'39:B;1C.37("");\';$d.36({35:\'34\',24:\'-23\',22:\'-23\'});2 l={V:o,1j:o,1m:0,2Z:\'n/a\',2Y:6(){},2W:6(){},2V:6(){}};2 g=k.2S;3(g&&!$.1U++)$.O.I("2P");3(g)$.O.I("2O",[l,k]);2 1T=0;2 1q=0;1c(6(){$d.2M(\'1F\');d.1R?d.1R(\'2m\',X):d.2E(\'1Q\',X,B);2 1P=5.1O?\'1O\':\'2D\';2 t=$5.Q(\'12\');$5.Q({12:N,2q:\'2B\',1P:\'2A/5-h\',1S:k.1d});3(k.1l)1c(6(){1q=Y;X()},k.1l);5.E();$5.Q(\'12\',t)},10);6 X(){3(1T++)8;d.1N?d.1N(\'2m\',X):d.2y(\'1Q\',X,B);2 18=Y;2w{3(1q)2v\'1l\';2 h,f;f=d.1L?d.1L.1C:d.2t?d.2t:d.1C;l.V=f.1F?f.1F.1W:o;l.1j=f.2s?f.2s:f;3(k.13==\'2r\'||k.13==\'3w\'){2 1I=f.1H(\'1G\')[0];h=1I?1I.r:l.V;3(k.13==\'2r\')3s("h = "+h);p $.3r(h)}p 3(k.13==\'2p\'){h=l.1j;3(!h&&l.V!=o)h=2o(l.V)}p{h=l.V}}3o(e){18=B;$.3n(k,l,\'2l\',e)}3(18){k.D(h,\'D\');3(g)$.O.I("3m",[l,k])}3(g)$.O.I("3l",[l,k]);3(g&&!--$.1U)$.O.I("3k");3(k.2i)k.2i(l,18?\'D\':\'2l\');1c(6(){$d.3j();l.1j=o},3i)};6 2o(s,f){3(1n.2g){f=2e 2g(\'3h.3f\');f.3e=\'B\';f.3d(s)}p f=(2e 3c()).3b(s,\'1w/2p\');8(f&&f.28&&f.28.1D!=\'38\')?f:o}}};$.c.1h.1e=0;$.c.P=6(7){8 4.27().E(1B).H(6(){4.1s=$.c.P.1e++;$.c.P.1r[4.1s]=7;$(":E,A:T",4).26(1y)})};$.c.P.1e=1;$.c.P.1r={};6 1y(e){2 $5=4.5;$5.J=4;3(4.M==\'T\'){3(e.25!=Z){$5.S=e.25;$5.U=e.33}p 3(C $.c.11==\'6\'){2 11=$(4).11();$5.S=e.21-11.22;$5.U=e.20-11.24}p{$5.S=e.21-4.32;$5.U=e.20-4.31}}1c(6(){$5.J=$5.S=$5.U=o},10)};6 1B(){2 N=4.1s;2 7=$.c.P.1r[N];$(4).1h(7);8 B};$.c.27=6(){4.1Z(\'E\',1B);8 4.H(6(){$(":E,A:T",4).1Z(\'26\',1y)})};$.c.1z=6(K){2 a=[];3(4.z==0)8 a;2 5=4[0];2 1b=K?5.1H(\'*\'):5.30;3(!1b)8 a;F(2 i=0,w=1b.z;i<w;i++){2 b=1b[i];2 n=b.m;3(!n)1v;3(K&&5.J&&b.M=="T"){3(!b.1u&&5.J==b)a.u({m:n+\'.x\',r:5.S},{m:n+\'.y\',r:5.U});1v}2 v=$.R(b,Y);3(v&&v.1a==19){F(2 j=0,1V=v.z;j<1V;j++)a.u({m:n,r:v[j]})}p 3(v!==o&&C v!=\'Z\')a.u({m:n,r:v})}3(!K&&5.J){2 1t=5.1H("A");F(2 i=0,w=1t.z;i<w;i++){2 A=1t[i];2 n=A.m;3(n&&!A.1u&&A.M=="T"&&5.J==A)a.u({m:n+\'.x\',r:5.S},{m:n+\'.y\',r:5.U})}}8 a};$.c.2U=6(K){8 $.1K(4.1z(K))};$.c.2T=6(G){2 a=[];4.H(6(){2 n=4.m;3(!n)8;2 v=$.R(4,G);3(v&&v.1a==19){F(2 i=0,w=v.z;i<w;i++)a.u({m:n,r:v[i]})}p 3(v!==o&&C v!=\'Z\')a.u({m:4.m,r:v})});8 $.1K(a)};$.c.R=6(G){F(2 1i=[],i=0,w=4.z;i<w;i++){2 b=4[i];2 v=$.R(b,G);3(v===o||C v==\'Z\'||(v.1a==19&&!v.z))1v;v.1a==19?$.2Q(1i,v):1i.u(v)}8 1i};$.R=6(b,G){2 n=b.m,t=b.M,W=b.1D.2b();3(C G==\'Z\')G=Y;3(G&&(!n||b.1u||t==\'14\'||t==\'2N\'||(t==\'2a\'||t==\'2f\')&&!b.2c||(t==\'E\'||t==\'T\')&&b.5&&b.5.J!=b||W==\'15\'&&b.1p==-1))8 o;3(W==\'15\'){2 1f=b.1p;3(1f<0)8 o;2 a=[],1J=b.7;2 16=(t==\'15-16\');2 w=(16?1f+1:1J.z);F(2 i=(16?1f:0);i<w;i++){2 17=1J[i];3(17.2L){2 v=$.1E.29&&!(17.2K[\'r\'].2J)?17.1w:17.r;3(16)8 v;a.u(v)}}8 a}8 b.r};$.c.1x=6(){8 4.H(6(){$(\'A,15,1G\',4).2n()})};$.c.2n=$.c.2I=6(){8 4.H(6(){2 t=4.M,W=4.1D.2b();3(t==\'1w\'||t==\'2H\'||W==\'1G\')4.r=\'\';p 3(t==\'2a\'||t==\'2f\')4.2c=B;p 3(W==\'15\')4.1p=-1})};$.c.1A=6(){8 4.H(6(){3(C 4.14==\'6\'||(C 4.14==\'2G\'&&!4.14.2F))4.14()})}})(3y);',62,221,'||var|if|this|form|function|options|return|||el|fn|io||doc||data|||opts|xhr|name||null|else||value|||push||max|||length|input|f
//form end
//select.js start
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.u.G=6(){4 e=6(a,v,t,b){4 c=P.Q("R");c.j=v,c.C=t;4 o=a.x;4 d=o.l;3(!a.n){a.n={};p(4 i=0;i<d;i++){a.n[o[i].j]=i}}3(8 a.n[v]=="M")a.n[v]=d;a.x[a.n[v]]=c;3(b){c.k=9}};4 a=N;3(a.l==0)7 5;4 f=9;4 m=q;4 g,v,t;3(8(a[0])=="z"){m=9;g=a[0]}3(a.l>=2){3(8(a[1])=="H")f=a[1];h 3(8(a[2])=="H")f=a[2];3(!m){v=a[0];t=a[1]}}5.y(6(){3(5.A.s()!="B")7;3(m){p(4 a S g){e(5,a,g[a],f)}}h{e(5,v,t,f)}});7 5};$.u.T=6(b,c,d,e,f){3(8(b)!="D")7 5;3(8(c)!="z")c={};3(8(d)!="H")d=9;5.y(6(){4 a=5;$.U(b,c,6(r){$(a).G(r,d);3(8 e=="6"){3(8 f=="z"){e.V(a,f)}h{e.I(a)}}})});7 5};$.u.W=6(){4 a=N;3(a.l==0)7 5;4 d=8(a[0]);4 v,i;3(d=="D"||d=="z"||d=="6")v=a[0];h 3(d=="X")i=a[0];h 7 5;5.y(6(){3(5.A.s()!="B")7;3(5.n)5.n=O;4 b=q;4 o=5.x;3(!!v){4 c=o.l;p(4 i=c-1;i>=0;i--){3(v.J==K){3(o[i].j.L(v)){b=9}}h 3(o[i].j==v){b=9}3(b&&a[1]===9)b=o[i].k;3(b){o[i]=O}b=q}}h{3(b&&a[1]===9)b=o[i].k;3(b){5.Y(i)}}});7 5};$.u.Z=6(f){4 a=8(f)=="M"?9:!!f;5.y(6(){3(5.A.s()!="B")7;4 o=5.x;4 d=o.l;4 e=[];p(4 i=0;i<d;i++){e[i]={v:o[i].j,t:o[i].C}}e.10(6(b,c){E=b.t.s(),F=c.t.s();3(E==F)7 0;3(a){7 E<F?-1:1}h{7 E>F?-1:1}});p(4 i=0;i<d;i++){o[i].C=e[i].t;o[i].j=e[i].v}});7 5};$.u.11=6(b,d){4 v=b;4 e=8(b);4 c=d||q;3(e!="D"&&e!="6"&&e!="z")7 5;5.y(6(){3(5.A.s()!="B")7 5;4 o=5.x;4 a=o.l;p(4 i=0;i<a;i++){3(v.J==K){3(o[i].j.L(v)){o[i].k=9}h 3(c){o[i].k=q}}h{3(o[i].j==v){o[i].k=9}h 3(c){o[i].k=q}}}});7 5};$.u.12=6(b,c){4 w=c||"k";3($(b).13()==0)7 5;5.y(6(){3(5.A.s()!="B")7 5;4 o=5.x;4 a=o.l;p(4 i=0;i<a;i++){3(w=="14"||(w=="k"&&o[i].k)){$(b).G(o[i].j,o[i].C)}}});7 5};$.u.15=6(b,c){4 d=q;4 v=b;4 e=8(v);4 f=8(c);3(e!="D"&&e!="6"&&e!="z")7 f=="6"?5:d;5.y(6(){3(5.A.s()!="B")7 5;3(d&&f!="6")7 q;4 o=5.x;4 a=o.l;p(4 i=0;i<a;i++){3(v.J==K){3(o[i].j.L(v)){d=9;3(f=="6")c.I(o[i])}}h{3(o[i].j==v){d=9;3(f=="6")c.I(o[i])}}}});7 f=="6"?5:d}})(16);',62,69,'|||if|var|this|function|return|typeof|true||||||||else||value|selected|length||cache||for|false||toLowerCase||fn|||options|each|object|nodeName|select|text|string|o1t|o2t|addOption|boolean|call|constructor|RegExp|match|undefined|arguments|null|document|createElement|option|in|ajaxAddOption|getJSON|apply|removeOption|number|remove|sortOptions|sort|selectOptions|copyOptions|size|all|containsOption|jQuery'.split('|'),0,{}));
//select.js end
//thickbox.js start
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(b).2V(c(){1v=1u 1Q();1v.L=3n});c 1o(F,f,11){2H{3(2z b.o.D.2l==="2g"){$("o","X").k({s:"20%",p:"20%"});$("X").k("1S","2M");3(b.1P("1n")===O){$("o").m("<T 5=\'1n\'></T><4 5=\'q\'></4><4 5=\'6\'></4>");$("#q").n(E)}}9{3(b.1P("q")===O){$("o").m("<4 5=\'q\'></4><4 5=\'6\'></4>");$("#q").n(E)}}3(2h()){$("#q").2D("3f")}9{$("#q").2D("3d")}3(F===O){F=""}$("o").m("<4 5=\'B\'><26 L=\'"+1v.L+"\' /></4>");$(\'#B\').2Z();8 1b;3(f.G("?")!==-1){1b=f.2S(0,f.G("?"))}9{1b=f}8 1B=/\\.2y$|\\.1R$|\\.1O$|\\.1N$|\\.1M$/;8 N=1b.1m().1K(1B);3(N==\'.2y\'||N==\'.1R\'||N==\'.1O\'||N==\'.1N\'||N==\'.1M\'){1l="";1k="";15="";1I="";1H="";S="";1F="";1E=1h;3(11){v=$("a[@3m="+11+"]").3l();2s(u=0;((u<v.1g)&&(S===""));u++){8 3k=v[u].r.1m().1K(1B);3(!(v[u].r==f)){3(1E){1I=v[u].13;1H=v[u].r;S="<1e 5=\'2f\'>&14;&14;<a r=\'#\'>"+1a.3e+"</a></1e>"}9{1l=v[u].13;1k=v[u].r;15="<1e 5=\'2a\'>&14;&14;<a r=\'#\'>"+1a.3a+"</a></1e>"}}9{1E=1c;1F="&14;"+(u+1)+" 36 "+(v.1g)}}}P=1u 1Q();P.1i=c(){P.1i=O;8 1G=22();8 x=1G[0]-24;8 y=1G[1]-24;8 d=P.p;8 l=P.s;3(d>x){l=l*(x/d);d=x;3(l>y){d=d*(y/l);l=y}}9 3(l>y){d=d*(y/l);l=y;3(d>x){l=l*(x/d);d=x}}W=(d+30>1W?d+30:1W);18=l+2Q;$("#6").m("<a r=\'\' 5=\'1V\' 13=\'1x\'><26 5=\'2P\' L=\'"+f+"\' p=\'"+d+"\' s=\'"+l+"\' 2O=\'"+F+"\'/></a>"+"<4 5=\'2L\'>"+F+"<4 5=\'2J\'>"+1F+15+S+"</4></4><4 5=\'2I\'><a r=\'#\' 5=\'M\' 13=\'1x\'>"+1a.1p+"</a></4>");$("#M").n(E);3(!(15==="")){c U(){3($(b).K("n",U)){$(b).K("n",U)}$("#6").t();$("o").m("<4 5=\'6\'></4>");1o(1l,1k,11);H 1h}$("#2a").n(U)}3(!(S==="")){c 1r(){$("#6").t();$("o").m("<4 5=\'6\'></4>");1o(1I,1H,11);H 1h}$("#2f").n(1r)}b.16=c(e){3(e==O){A=1L.1J}9{A=e.1Z}3(A==27){E()}9 3(A==2G){3(!(S=="")){b.16="";1r()}}9 3(A==2F){3(!(15=="")){b.16="";U()}}};Y();$("#B").t();$("#1V").n(E);$("#6").k({I:"J"})};P.L=f}9{8 2C=f.2B(/^[^\\?]+\\??/,\'\');8 C=2A(2C);W=(C[\'p\']*1)+30||3s;18=(C[\'s\']*1)+3r||3q;R=W-30;Q=18-3p;3(f.G(\'2x\')!=-1){1D=f.1C(\'3o\');$("#12").t();3(C[\'1A\']!="1c"){$("#6").m("<4 5=\'2w\'><4 5=\'1z\'>"+F+"</4><4 5=\'2u\'><a r=\'#\' 5=\'M\' 13=\'1x\'>1p</a> 2t 2r 2q</4></4><T 2o=\'0\' 2n=\'0\' L=\'"+1D[0]+"\' 5=\'12\' 2m=\'12"+1f.2k(1f.1w()*2j)+"\' 1i=\'1y()\' D=\'p:"+(R+29)+"j;s:"+(Q+17)+"j;\' > </T>");$("#6").k({I:"J"})}9{$("#q").K();$("#6").m("<T 2o=\'0\' 2n=\'0\' L=\'"+1D[0]+"\' 5=\'12\' 2m=\'12"+1f.2k(1f.1w()*2j)+"\' 1i=\'1y()\' D=\'p:"+(R+29)+"j;s:"+(Q+17)+"j;\'> </T>")}}9{3($("#6").k("I")!="J"){3(C[\'1A\']!="1c"){$("#6").m("<4 5=\'2w\'><4 5=\'1z\'>"+F+"</4><4 5=\'2u\'><a r=\'#\' 5=\'M\'>1p</a> 2t 2r 2q</4></4><4 5=\'z\' D=\'p:"+R+"j;s:"+Q+"j\'></4>")}9{$("#q").K();$("#6").m("<4 5=\'z\' 3j=\'3i\' D=\'p:"+R+"j;s:"+Q+"j;\'></4>")}}9{$("#z")[0].D.p=R+"j";$("#z")[0].D.s=Q+"j";$("#z")[0].3h=0;$("#1z").X(F)}}$("#M").n(E);3(f.G(\'3g\')!=-1){$("#z").m($(\'#\'+C[\'2d\']).2c());$("#6").2b(c(){$(\'#\'+C[\'2d\']).m($("#z").2c())});Y();$("#B").t();$("#6").k({I:"J"})}9 3(f.G(\'2x\')!=-1){Y();3($.1q.3c){$("#B").t();$("#6").k({I:"J"})}}9{$("#z").3b(f+="&1w="+(1u 39().38()),c(){Y();$("#B").t();37("#z a.1a");$("#6").k({I:"J"})})}}3(!C[\'1A\']){b.28=c(e){3(e==O){A=1L.1J}9{A=e.1Z}3(A==27){E()}}}}35(e){}}c 1y(){$("#B").t();$("#6").k({I:"J"})}c E(){$("#34").K("n");$("#M").K("n");$("#6").33("32",c(){$(\'#6,#q,#1n\').31("2b").K().t()});$("#B").t();3(2z b.o.D.2l=="2g"){$("o","X").k({s:"25",p:"25"});$("X").k("1S","")}b.16="";b.28="";H 1h}c Y(){$("#6").k({2Y:\'-\'+23((W/2),10)+\'j\',p:W+\'j\'});3(!(21.1q.2X&&21.1q.2W<7)){$("#6").k({2U:\'-\'+23((18/2),10)+\'j\'})}}c 2A(1t){8 19={};3(!1t){H 19}8 1s=1t.1C(/[;&]/);2s(8 i=0;i<1s.1g;i++){8 Z=1s[i].1C(\'=\');3(!Z||Z.1g!=2){2T}8 1Y=1X(Z[0]);8 1d=1X(Z[1]);1d=1d.2B(/\\+/g,\' \');19[1Y]=1d}H 19}c 22(){8 V=b.2R;8 w=2e.2i||1U.2i||(V&&V.2E)||b.o.2E;8 h=2e.2p||1U.2p||(V&&V.1T)||b.o.1T;2v=[w,h];H 2v}c 2h(){8 1j=2N.1j.1m();3(1j.G(\'2K\')!=-1&&1j.G(\'3t\')!=
//thickbox.js end
//canlendar start
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('I 2m(){8.3t=0;8.2h=[];8.1L=O;8.1i=[];8.1t=X;8.1v=X;8.2g=[];8.2g[\'\']={2Q:\'5R\',3R:\'5p\',2u:\'&58;51\',2H:\'4D&4z;\',3d:\'4t\',2k:[\'4o\',\'4k\',\'4g\',\'4a\',\'5P\',\'5G\',\'5D\'],3O:[\'5o\',\'5l\',\'5j\',\'5d\',\'57\',\'56\',\'50\',\'4V\',\'4P\',\'4J\',\'4C\',\'4A\'],1R:\'4x/\'};8.1E={3f:\'1z\',3c:\'\',31:\'...\',30:\'\',2W:X,2U:1c,2R:X,2P:1c,2N:1c,2K:\'-10:+10\',2I:0,3Z:1c,3W:X,28:O,26:O,1J:\'5u\',3M:O,3K:O,2w:O};$.14(8.1E,8.2g[\'\']);8.S=$(\'<V 3A="3y"></V>\');$(1d.1r).1K(8.S);$(1d.1r).55(8.3F)}$.14(2m.3I,{3q:I(a){F b=8.3t++;8.2h[b]=a;N b},U:I(a){N 8.2h[a]||a},4F:I(a){$.14(8.1E,a||{})},2p:I(e){F a=G.U(8.1g);H(G.1t){4y(e.2l){1a 9:G.1q(a,\'\');11;1a 13:G.1P(a);11;1a 27:G.1q(a,a.J(\'1J\'));11;1a 33:G.T(a,-1,(e.1j?\'Y\':\'M\'));11;1a 34:G.T(a,+1,(e.1j?\'Y\':\'M\'));11;1a 35:H(e.1j)G.2y(a);11;1a 36:H(e.1j)G.2B(a);11;1a 37:H(e.1j)G.T(a,-1,\'D\');11;1a 38:H(e.1j)G.T(a,-7,\'D\');11;1a 39:H(e.1j)G.T(a,+1,\'D\');11;1a 40:H(e.1j)G.T(a,+7,\'D\');11}}19 H(e.2l==36&&e.1j){G.1A(8)}},2J:I(e){F a=G.U(8.1g);F b=45.5N(e.43==5K?e.2l:e.43);N(b<\' \'||b==a.J(\'1R\').1k(3)||(b>=\'0\'&&b<=\'9\'))},3U:I(a,b){F c=$(a);F d=b.J(\'3c\');H(d){c.3Q(\'<1F K="5v">\'+d+\'</1F>\')}F e=b.J(\'3f\');H(e==\'1z\'||e==\'2r\'){c.1z(8.1A)}H(e==\'1x\'||e==\'2r\'){F f=b.J(\'31\');F g=b.J(\'30\');F h=b.J(\'2W\');F i=$(h?\'<20 K="1s" 2v="\'+g+\'" 3E="\'+f+\'" 3C="\'+f+\'"/>\':\'<1x 2a="1x" K="1s">\'+(g!=\'\'?\'<20 2v="\'+g+\'" 3E="\'+f+\'" 3C="\'+f+\'"/>\':f)+\'</1x>\');c.5i(\'<1F K="5h"></1F>\').3Q(i);i.5f(8.1A)}c.3z(8.2p).5c(8.2J);c[0].1g=b.R},3w:I(a,b){$(a).1K(b.S);a.1g=b.R;F c=P W();b.17=c.16();b.Q=c.1b();b.L=c.15();G.T(b)},53:I(a,b,c,d){F e=8.3r;H(!e){e=8.3r=P 1H({},X);8.1m=$(\'<1I 2a="4U" 4S="1" 3N="2C: 2q; 25: -3X;"/>\');8.1m.3z(8.2p);$(\'1r\').1K(8.1m);8.1m[0].1g=e.R}$.14(e.1l,c||{});8.1m.2G(a);H(2F.41){1W=2F.4B;1V=2F.41}19 H(1d.1U&&1d.1U.2o){1W=1d.1U.3m;1V=1d.1U.2o}19 H(1d.1r){1W=1d.1r.3m;1V=1d.1r.2o}8.1h=d||[(1W/2)-3l,(1V/2)-3l];8.1m.18(\'2n\',8.1h[0]+\'1S\').18(\'25\',8.1h[1]+\'1S\');e.1l.2w=b;8.1v=1c;8.S.3k(\'3j\');8.1A(8.1m[0]);H($.1C){$.1C(8.S)}},4w:I(c){c=(c.3i?c:$(c));c.1D(I(){8.1Q=X;$(\'../1x.1s\',8).1D(I(){8.1Q=X});$(\'../20.1s\',8).18({3h:\'1.0\',3g:\'\'});F b=8;G.1i=$.3e(G.1i,I(a){N(a==b?O:a)})})},4v:I(c){c=(c.3i?c:$(c));c.1D(I(){8.1Q=1c;$(\'../1x.1s\',8).1D(I(){8.1Q=1c});$(\'../20.1s\',8).18({3h:\'0.5\',3g:\'4u\'});F b=8;G.1i=$.3e(G.1i,I(a){N(a==b?O:a)});G.1i[G.1i.1B]=8})},4s:I(a,b){F c=8.U(a.1g);H(c){$.14(c.1l,b||{});8.1w(c)}},4r:I(a,b){F c=8.U(a.1g);H(c){c.3b(b)}},4q:I(a){F b=8.U(a.1g);N(b?b.3a():O)},1A:I(a){F b=(a.1O&&a.1O.2j()==\'1I\'?a:8);H(b.1O.2j()!=\'1I\'){b=$(\'1I\',b.4p)[0]}H(G.2i==b){N}1f(F i=0;i<G.1i.1B;i++){H(G.1i[i]==b){N}}F c=G.U(b.1g);G.1q(c,\'\');G.2i=b;c.2Z(b);H(G.1v){b.24=\'\'}H(!G.1h){G.1h=G.2Y(b);G.1h[1]+=b.3H}c.S.18(\'2C\',(G.1v&&$.1C?\'4n\':\'2q\')).18(\'2n\',G.1h[0]+\'1S\').18(\'25\',G.1h[1]+\'1S\');G.1h=O;F d=c.J(\'3K\');$.14(c.1l,(d?d(b):{}));G.2V(c)},2V:I(a){F b=8.U(a);G.1w(b);H(!b.1G){F c=b.J(\'1J\');b.S.4m(c,I(){G.1t=1c;G.2f(b)});H(c==\'\'){G.1t=1c;G.2f(b)}H(b.Z[0].2a!=\'2e\'){b.Z[0].1z()}8.1L=b}},1w:I(a){a.S.4l().1K(a.2T());H(a.Z&&a.Z!=\'2e\'){a.Z[0].1z()}},2f:I(a){H($.2d.2D){$(\'#2S\').18({4j:a.S[0].4i+4,4h:a.S[0].3H+4})}},1q:I(a,b){F c=8.U(a);H(G.1t){b=(b!=O?b:c.J(\'1J\'));c.S.4f(b,I(){G.2E(c)});H(b==\'\'){G.2E(c)}G.1t=X;G.2i=O;c.1l.2O=O;H(G.1v){G.1m.18(\'2C\',\'2q\').18(\'2n\',\'4e\').18(\'25\',\'-3X\');H($.1C){$.4d();$(\'1r\').1K(8.S)}}G.1v=X}G.1L=O},2E:I(a){a.S.2M(\'3j\');$(\'.2L\',a.S).4b()},3F:I(a){H(!G.1L){N}F b=$(a.49);H((b.48("#3y").1B==0)&&(b.47(\'K\')!=\'1s\')&&G.1t&&!(G.1v&&$.1C)){G.1q(G.1L,\'\')}},T:I(a,b,c){F d=8.U(a);d.T(b,c);8.1w(d)},2B:I(a){F b=P W();F c=8.U(a);c.17=b.16();c.Q=b.1b();c.L=b.15();8.T(c)},2b:I(a,b,c){F d=8.U(a);d.1M=X;d[c==\'M\'?\'Q\':\'L\']=b.46[b.4c].24-0;8
//canlendar end
//clickorEnter statr
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3.c=5(2,4){3(2).8(\'f\',5(0){4(0.7);0.6()});3(2).8(\'b\',5(0){a 1=0.9||0.e;d(1&&1==g){4(0.7);0.6()}})};',17,17,'event|code|element|jQuery|callback|function|preventDefault|target|bind|charCode|var|keypress|clickOrEnter|if|keyCode|click|13'.split('|'),0,{}));
//clickorEnter end
//context menu start
(function($){var menu,shadow,trigger,content,hash,currentTarget;var defaults={menuStyle:{listStyle:'none',padding:'1px',margin:'0',width:'100px'},itemStyle:{display:'block',cursor:'default',padding:'3px'},itemHoverStyle:{},eventPosX:'pageX',eventPosY:'pageY',shadow:true,onContextMenu:null,onShowMenu:null};$.fn.contextMenu=function(id,options){if(!menu){menu=$('<div id="jqContextMenu"></div>').hide().css({position:'absolute',zIndex:'500'}).appendTo('body').bind('click',function(e){e.stopPropagation()})}if(!shadow){shadow=$('<div class="rclick_menu"></div>').css({position:'absolute',opacity:0.2,zIndex:499}).appendTo('body').hide()}hash=hash||[];hash.push({id:id,menuStyle:$.extend({},defaults.menuStyle,options.menuStyle||{}),itemStyle:$.extend({},defaults.itemStyle,options.itemStyle||{}),itemHoverStyle:$.extend({},defaults.itemHoverStyle,options.itemHoverStyle||{}),bindings:options.bindings||{},shadow:options.shadow||options.shadow===false?options.shadow:defaults.shadow,onContextMenu:options.onContextMenu||defaults.onContextMenu,onShowMenu:options.onShowMenu||defaults.onShowMenu,eventPosX:options.eventPosX||defaults.eventPosX,eventPosY:options.eventPosY||defaults.eventPosY});var index=hash.length-1;$(this).bind('contextmenu',function(e){var bShowContext=(!!hash[index].onContextMenu)?hash[index].onContextMenu(e):true;if(bShowContext)display(index,this,e,options);return false});return this};function display(index,trigger,e,options){var cur=hash[index];content=$('#'+cur.id).find('ul:first').clone(true);content.css(cur.menuStyle).find('li').css(cur.itemStyle).hover(function(){$(this).css(cur.itemHoverStyle)},function(){$(this).css(cur.itemStyle)}).find('img').css({verticalAlign:'middle',paddingRight:'2px'});menu.html(content);if(!!cur.onShowMenu)menu=cur.onShowMenu(e,menu);$.each(cur.bindings,function(id,func){$('#'+id,menu).bind('click',function(e){hide();func(trigger,currentTarget)})});menu.css({'left':e[cur.eventPosX],'top':e[cur.eventPosY]}).show();if(cur.shadow)shadow.css({width:menu.width(),height:menu.height(),left:e.pageX+2,top:e.pageY+2}).show();$(document).one('click',hide)}function hide(){menu.hide();shadow.hide()}$.contextMenu={defaults:function(userDefaults){$.each(userDefaults,function(i,val){if(typeof val=='object'&&defaults[i]){$.extend(defaults[i],val)}else defaults[i]=val})}}})(jQuery);$(function(){$('div.contextMenu').hide()});
//content menu end
//media.js start
(function($){$.fn.media=function(d,e,f){return this.each(function(){if(typeof d=='function'){f=e;e=d;d={}}var o=getSettings(this,d);if(typeof e=='function')e(this,o);var r=getTypesRegExp();var m=r.exec(o.src)||[''];o.type?m[0]=o.type:m.shift();for(var i=0;i<m.length;i++){fn=m[i].toLowerCase();if(isDigit(fn[0]))fn='fn'+fn;if(!$.fn.media[fn])continue;var a=$.fn.media[fn+'_player'];if(!o.params)o.params={};if(a){var b=a.autoplayAttr=='autostart';o.params[a.autoplayAttr||'autoplay']=b?(o.autoplay?1:0):o.autoplay?true:false}var c=$.fn.media[fn](this,o);c.css('backgroundColor',o.bgColor).width(o.width);if(typeof f=='function')f(this,c[0],o,a.name);break}})};$.fn.mediabox=function(g,h){return this.click(function(){if(typeof $.blockUI=='undefined'||typeof $.blockUI.version=='undefined'||$.blockUI.version<1.26){if(typeof $.fn.mediabox.warning!='undefined')return this;$.fn.mediabox.warning=1;alert('The mediabox method requires blockUI v1.26 or later.');return false}var o,p,div=0,$e=$(this).clone();$e.appendTo('body').hide().css({margin:0});g=$.extend({},g,{autoplay:1});$e.media(g,function(){},function(a,b,c,d){div=b;o=c;p=d});if(!div)return false;var f=$.browser.safari?$(div).hide():$(div).remove();if(o.loadingImage)f.css({backgroundImage:'url('+o.loadingImage+')',backgroundPosition:'center center',backgroundRepeat:'no-repeat'});if(o.boxTitle)f.prepend('<div style="margin:0;padding:0">'+o.boxTitle+'</div>');if(h)f.css(h);f.displayBox({width:o.width,height:o.height},function(a){$('object,embed',a).each(function(){try{this.Stop()}catch(e){}try{this.DoStop()}catch(e){}try{this.controls.stop()}catch(e){}})},p=='flash');return false})};$.fn.media.mapFormat=function(a,b){if(!a||!b||!$.fn.media.defaults.players[b])return;a=a.toLowerCase();if(isDigit(a[0]))a='fn'+a;$.fn.media[a]=$.fn.media[b]};$.fn.media.defaults={width:400,height:400,preferMeta:1,autoplay:0,bgColor:'#ffffff',params:{},attrs:{},flashvars:{},flashVersion:'7',boxTitle:null,loadingImage:null,flvPlayer:'mediaplayer.swf',mp3Player:'mediaplayer.swf',silverlight:{inplaceInstallPrompt:'true',isWindowless:'true',framerate:'24',version:'0.9',onError:null,onLoad:null,initParams:null,userContext:null}};$.fn.media.defaults.players={flash:{name:'flash',types:'flv,mp3,swf',oAttrs:{classid:'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',type:'application/x-oleobject',codebase:'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+$.fn.media.defaults.flashVersion},eAttrs:{type:'application/x-shockwave-flash',pluginspage:'http://www.adobe.com/go/getflashplayer'}},quicktime:{name:'quicktime',types:'aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3gp',oAttrs:{classid:'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',codebase:'http://www.apple.com/qtactivex/qtplugin.cab'},eAttrs:{pluginspage:'http://www.apple.com/quicktime/download/'}},realplayer:{name:'real',types:'ra,ram,rm,rpm,rv,smi,smil',autoplayAttr:'autostart',oAttrs:{classid:'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'},eAttrs:{type:'audio/x-pn-realaudio-plugin',pluginspage:'http://www.real.com/player/'}},winmedia:{name:'winmedia',types:'asf,avi,wma,wmv',autoplayAttr:'autostart',oUrl:'url',oAttrs:{classid:'clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6',type:'application/x-oleobject'},eAttrs:{type:'application/x-mplayer2',pluginspage:'http://www.microsoft.com/Windows/MediaPlayer/'}},iframe:{name:'iframe',types:'html,pdf'},silverlight:{name:'silverlight',types:'xaml'}};var l=1;for(var n in $.fn.media.defaults.players){var q=$.fn.media.defaults.players[n].types;$.each(q.split(','),function(i,o){if(isDigit(o[0]))o='fn'+o;$.fn.media[o]=$.fn.media[n]=getGenerator(n);$.fn.media[o+'_player']=$.fn.media.defaults.players[n]})};function getTypesRegExp(){var a='';for(var b in $.fn.media.defaults.players){if(a.length)a+=',';a+=$.fn.media.defaults.players[b].types};return new RegExp('\\.('+a.replace(/,/g,'|')+')\\b')};function getGenerator(c){return function(a,b){return generate(a,b,c)}};function isDigit(c){return'0123456789'.indexOf(c)>-1};function getSettings(d,e){e=e||{};var f=$(d);v
//media.js end
//ajaxfileupload start
jQuery.extend({ createUploadIframe: function(id, uri)
{ var frameId = 'jUploadFrame' + id; if(window.ActiveXObject) {
var io = document.createElement('iframe');
io.setAttribute('id', frameId);
io.setAttribute('name', frameId);
if(typeof uri== 'boolean'){ io.src = 'javascript:false';}
else if(typeof uri== 'string'){ io.src = uri;}
}
else { var io = document.createElement('iframe'); io.id = frameId; io.name = frameId;}
io.style.position = 'absolute'; io.style.top = '-1000px'; io.style.left = '-1000px'; document.body.appendChild(io); return io;}, createUploadForm: function(id, fileElementId)
{ var formId = 'jUploadForm' + id; var fileId = 'jUploadFile' + id; var form = jQuery('<form action="" method="POST" name="' + formId + '" id="' + formId + '" enctype="multipart/form-data"></form>'); var oldElement = jQuery('#' + fileElementId); var newElement = jQuery(oldElement).clone(); jQuery(oldElement).attr('id', fileId); jQuery(oldElement).before(newElement); jQuery(oldElement).appendTo(form); jQuery(form).css('position', 'absolute'); jQuery(form).css('top', '-1200px'); jQuery(form).css('left', '-1200px'); jQuery(form).appendTo('body'); return form;}, ajaxFileUpload: function(s) { s = jQuery.extend({}, jQuery.ajaxSettings, s); var id = s.fileElementId; var form = jQuery.createUploadForm(id, s.fileElementId); var io = jQuery.createUploadIframe(id, s.secureuri); var frameId = 'jUploadFrame' + id; var formId = 'jUploadForm' + id; if( s.global && ! jQuery.active++ )
{ jQuery.event.trigger( "ajaxStart" );}
var requestDone = false; var xml = {}; if( s.global )
{ jQuery.event.trigger("ajaxSend", [xml, s]);}
var uploadCallback = function(isTimeout)
{ var io = document.getElementById(frameId); try
{ if(io.contentWindow)
{ xml.responseText = io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null; xml.responseXML = io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}else if(io.contentDocument)
{ xml.responseText = io.contentDocument.document.body?io.contentDocument.document.body.innerHTML:null; xml.responseXML = io.contentDocument.document.XMLDocument?io.contentDocument.document.XMLDocument:io.contentDocument.document;}
}catch(e)
{ jQuery.handleError(s, xml, null, e);}
if( xml || isTimeout == "timeout")
{ requestDone = true; var status; try { status = isTimeout != "timeout" ? "success" : "error"; if( status != "error" )
{ var data = jQuery.uploadHttpData( xml, s.dataType ); if( s.success )
{ s.success( data, status );}; if( s.global )
{ jQuery.event.trigger( "ajaxSuccess", [xml, s] );};} else
{ jQuery.handleError(s, xml, status);}
} catch(e)
{ status = "error"; jQuery.handleError(s, xml, status, e);}; if( s.global )
{ jQuery.event.trigger( "ajaxComplete", [xml, s] );}; if(s.global && ! --jQuery.active)
{ jQuery.event.trigger("ajaxStop");}; if(s.complete)
{ s.complete(xml, status);} ; jQuery(io).unbind(); setTimeout(function()
{ try
{ jQuery(io).remove(); jQuery(form).remove();} catch(e)
{ jQuery.handleError(s, xml, null, e);}
}, 100); xml = null;};}
if( s.timeout > 0 )
{ setTimeout(function(){ if( !requestDone )
{ uploadCallback( "timeout" );}
}, s.timeout);}
try
{ var form = jQuery('#' + formId); jQuery(form).attr('action', s.url); jQuery(form).attr('method', 'POST'); jQuery(form).attr('target', frameId); if(form.encoding)
{ form.encoding = 'multipart/form-data';}
else
{ form.enctype = 'multipart/form-data';}
jQuery(form).submit();} catch(e)
{ jQuery.handleError(s, xml, null, e);}
if(window.attachEvent){ document.getElementById(frameId).attachEvent('onload', uploadCallback);}
else{ document.getElementById(frameId).addEventListener('load', uploadCallback, false);}
return {abort: function () {}};}, uploadHttpData: function( r, type ) { var data = !type; data = type == "xml" || data ? r.responseXML : r.responseText; if( type == "script" )
{ jQuery.globalEval( data );}
if( type == "json" )
{ eval( "data = " + data );}
if( type == "html" )
{ jQuery("<div>").html(data).evalScripts();}
return data;}
});
//ajaxfileupload end
//ajaxfilemanager general start
Array.prototype.inArray = function (value,caseSensitive)
{ var i; for (i=0; i < this.length; i++)
{ if(caseSensitive){ if (this[i].toLowerCase() == value.toLowerCase())
{ return true;}
}else
{ if (this[i] == value)
{ return true;}
}
}
return false;}; var dcTime=250; var dcDelay=100; var dcAt=0; var savEvent=null; var savEvtTime=0; var savTO=null; var linkElem = null; function hadDoubleClick()
{ var d = new Date(); var now = d.getTime(); if ((now - dcAt) < dcDelay)
{ return true;}
return false;}; function enablePreview(elem, num)
{ $(elem).each( function()
{ $(this).click(function ()
{ var num = getNum(this.id); var path = files[num].path; if (hadDoubleClick())
{ return false;}else
{ linkElem = $('#a' + num).get(0);}
d = new Date(); savEvtTime = d.getTime(); savTO = setTimeout(function()
{ if (savEvtTime - dcAt > 0)
{ var ext = getFileExtension(path); var supportedExts = supporedPreviewExts.split(","); var isSupportedExt = false; for (i in supportedExts)
{ var typeOf = typeof(supportedExts[i]); if(typeOf.toLowerCase() == 'string' && supportedExts[i].toLowerCase() == ext.toLowerCase())
{ isSupportedExt = true; break;}
}
if(isSupportedExt)
{ switch(files[num].cssClass)
{ case 'fileVideo':
case 'fileMusic':
case 'fileFlash':
$('#playGround').html('<a id="playGround' + num + '" href="' + files[num].path + '"><div id="player">&nbsp;this is mine</div></a> '); $('#playGround' + num).html(''); $('#playGround' + num).media({ width: 255, height: 210, autoplay: true }); showThickBox($('#a' + num).get(0), appendQueryString('#TB_inline', 'height=250' + '&width=256' + '&inlineId=winPlay&modal=true')); break; default:
showThickBox(linkElem, appendQueryString(path, 'KeepThis=true&TB_iframe=true&height=' + thickbox.height + '&width=' + thickbox.width));}
}
}
return false;}, dcTime); return false;}); $(this).dblclick(function()
{ var d = new Date(); dcAt = d.getTime(); if (savTO != null) { clearTimeout( savTO ); savTO = null;}
if(typeof(selectFile) != 'undefined')
{ selectFile(files[num].url);}else
generateDownloadIframe(appendQueryString(getUrl('download'), 'path=' + files[num].path, ['path'])); { }
} );} );}; function tableRuler(element)
{ var rows = $(element); $(rows).each(function(){ $(this).mouseover(function(){ $(this).addClass('over');}); $(this).mouseout(function(){ $(this).removeClass('over');});});}; function previewMedia(rowNum)
{ $('#preview' +rowNum).html(''); $('#preview' +rowNum).media({ width: 255, height: 210, autoplay: true }); return false;}; function getFileExtension(filename)
{ if( filename.length == 0 ) return ""; var dot = filename.lastIndexOf("."); if( dot == -1 ) return ""; var extension = filename.substr(dot + 1,filename.length); return extension;}; function closeWindow()
{ if(window.confirm(warningCloseWindow))
{ window.close();}
return false;}; function getUrl(index,limitNeeded , viewNeeded, searchNeeded)
{ var queryStr = ''; var excluded = new Array(); if(typeof(limitNeeded) == 'boolean' && limitNeeded)
{ var limit = document.getElementById('limit'); var typeLimit = typeof(limit); if(typeLimit != 'undefined' && limit )
{ excluded[excluded.length] = 'limit'; queryStr += (queryStr == ''?'':'&') + 'limit=' + limit.options[limit.selectedIndex].value;}
}
if(typeof(viewNeeded) == 'boolean' && viewNeeded)
{ queryStr += (queryStr == ''?'':'&') + 'view=' + getView(); excluded[excluded.length] = 'view';}
if(typeof(searchNeeded) == 'boolean' && searchNeeded && searchRequired)
{ var search_recursively = 0; $('input[@name=search_recursively][@checked]').each( function()
{ search_recursively = this.value;} ); var searchFolder = document.getElementById('search_folder'); queryStr += (queryStr == ''?'':'&') + 'search=1&search_name=' + $('#search_name').val() + '&search_recursively=' + search_recursively + '&search_mtime_from=' + $('#search_mtime_from').val() + '&search_mtime_to=' + $('#search_mtime_to').val() + '&search_folder=' + searchFolder.options[searchFolder.selectedIndex].value; excluded[excluded.length] = 'search'; excluded[excluded.length] = 'search_recursively'; excluded[excluded.length] = 'search_mtime_from'; excluded[excluded.length] = 'search_mtime_to'; excluded[excluded.length] = 'search_folder'; excluded[excluded.length] = 'search_name'; excluded[excluded.length] = 'search';}
return appendQueryString(appendQueryString(urls[index], queryString), queryStr, excluded);}; function changeView()
{ var url = getUrl('view', true, true); $('#rightCol').empty(); ajaxStart('#rightCol'); $('#rightCol').load(url, {}, function(){ ajaxStop('#rightCol img.ajaxLoadingImg'); urls.present = getUrl('home', true, true); initAfterListingLoaded();});}; function goParentFolder()
{ searchRequired = false; var url = appendQueryString(getUrl('view', true, true), 'path=' + parentFolder.path , ['path']); $('#rightCol').empty(); ajaxStart('#rightCol'); $('#rightCol').load(url, {}, function(){ urls.present = appendQueryString(getUrl('home', true, true), 'path=' + parentFolder.path , ['path']); ajaxStop('#rightCol img.ajaxLoadingImg'); initAfterListingLoaded();});}; function appendQueryString(baseUrl, queryStr, excludedQueryStr)
{ if(typeof(excludedQueryStr) == 'object' && excludedQueryStr.length)
{ var isMatched = false; var urlParts = baseUrl.split("?"); baseUrl = urlParts[0]; var count = 1; if(typeof(urlParts[1]) != 'undefined' && urlParts[1] != '')
{ var queryStrParts = urlParts[1].split("&"); for(var i=0; i < queryStrParts.length; i++)
{ var queryStrVariables = queryStrParts[i].split('='); for(var j=0; j < excludedQueryStr.length; j++)
{ if(queryStrVariables[0] == excludedQueryStr[j])
{ isMatched = true;}
}
if(!isMatched)
{ baseUrl += ((count==1?'?':'&') + queryStrVariables[0] + '=' + queryStrVariables[1]); count++;}
}
}
}
if(queryStr != '')
{ return (baseUrl.indexOf('?')> -1?baseUrl + '&' + queryStr:baseUrl + '?' + queryStr);}else
{ return baseUrl;}
}; function initAfterListingLoaded()
{ parsePagination(); parseCurrentFolder(); var view = getView(); setDocInfo('root'); if(view != '')
{ switch(view)
{ case 'thumbnail':
enableContextMenu('dl.thumbnailListing'); for(i in files)
{ if(files[i].type== 'folder')
{ enableFolderBrowsable(i);}else
{ switch(files[i].cssClass)
{ case 'filePicture':
break; case 'fileFlash':
break; case 'fileVideo':
break; case 'fileMusic':
break; default:
}
enablePreview('#dt' + i, i); enablePreview('#thumbUrl' + i, i); enablePreview('#a' + i, i);}
enableShowDocInfo( i);}
break; case 'detail':
default:
enableContextMenu('#fileList tr'); for(i in files)
{ if(files[i].type== 'folder')
{ enableFolderBrowsable(i);}else
{ switch(files[i].cssClass)
{ case 'filePicture':
$('#row' + i + ' td a').attr('rel', 'ajaxphotos'); break; case 'fileFlash':
break; case 'fileVideo':
break; case 'fileMusic':
break; default:
}; enablePreview('#row' + i + ' td a', i);}
enableShowDocInfo(i);}
break;}
}
}; function enableFolderBrowsable(num, debug)
{ switch(getView())
{ case 'thumbnail':
$('#dt'+ num + ' , #dd' + num + ' a').each(function()
{ doEnableFolderBrowsable(this, num);} ); break; case 'detail':
default:
$('#row' + num + ' td[a]').each(function()
{ doEnableFolderBrowsable(this, num );} );}
}; function doEnableFolderBrowsable(elem, num)
{ $(elem).click(function()
{ { searchRequired = false; var typeNum = typeof(num); if(typeNum.toUpperCase() == 'STRING')
{ var fpath = (num.indexOf(urls.view) >=0?num:files[num].path);}else
{ var fpath = files[num].path;}
var url = appendQueryString(getUrl('view', true, true), 'path=' + fpath, ['path']); $('#rightCol').empty(); ajaxStart('#rightCol'); $('#rightCol').load(url, {}, function(){ urls.present = appendQueryString(getUrl('home', true, true), 'path=' + fpath, ['path']); ajaxStop('#rightCol img.ajaxLoadingImg'); initAfterListingLoaded();});}; return false;} );}; function ajaxStart(destinationSelector, id, selectorOfAnimation)
{ if(typeof(selectorOfAnimation) == 'undefined')
{ selectorOfAnimation = '#ajaxLoading img';}
if(typeof(id) != 'undefined')
{ $(selectorOfAnimation).clone().attr('id', id).appendTo(destinationSelector);}else
{ $(selectorOfAnimation).clone(true).appendTo(destinationSelector);}
}; function ajaxStop(selectorOfAnimation)
{ $(selectorOfAnimation).remove();}; function changePaginationLimit(elem)
{ var url = getUrl('view', true, true, true); $('#rightCol').empty(); ajaxStart('#rightCol'); $('#rightCol').load(url, {}, function(){ urls.present = appendQueryString(getUrl('home', true, true), 'path=' + parentFolder.path , ['path'])
ajaxStop('#rightCol img.ajaxLoadingImg'); initAfterListingLoaded();});}; function getUrlVarValue(url, index)
{ if(url != '' && index != '')
{ var urlParts = url.split("?"); baseUrl = urlParts[0]; var count = 1; if(typeof(urlParts[1]) != 'undefined' && urlParts[1] != '')
{ var queryStrParts = urlParts[1].split("&"); for(var i=0; i < queryStrParts.length; i++)
{ var queryStrVariables = queryStrParts[i].split('='); if(queryStrVariables[0] == index)
{ return queryStrVariables[1];}
}
}
}
return '';}; function parseCurrentFolder()
{ var folders = currentFolder.friendly_path.split('/'); var str = ''; var url = getUrl('view', true, true); var parentPath = ''; for(var i = 0; i < folders.length; i++)
{ if(i == 0)
{ parentPath += paths.root; str += '/<a href="' + appendQueryString(url, 'path='+ parentPath, ['path']) + '"><span class="folderRoot">' + paths.root_title + '</span></a>'
}else
{ if(folders[i] != '')
{ parentPath += folders[i] + '/'; str += '/<a href="' + appendQueryString(url, 'path='+ parentPath , ['path']) + '"><span class="folderSub">' + folders[i] + '</span></a>';}
}
}
$('#currentFolderPath').empty().append(str); $('#currentFolderPath a').each( function()
{ doEnableFolderBrowsable(this, $(this).attr('href'));} );}; function parsePagination()
{ $('p.pagination a[@id!=pagination_parent_link]').each(function ()
{ $(this).click( function()
{ var page = getUrlVarValue($(this).attr('href'), 'page'); var url = appendQueryString(getUrl('view', true, true, searchRequired),'page=' + page, ['page']); $('#rightCol').empty(); ajaxStart('#rightCol'); $('#rightCol').load(url, {}, function(){ urls.present = appendQueryString(getUrl('home', true, true, searchRequired),'page=' + page, ['page']); ajaxStop('#rightCol img.ajaxLoadingImg'); initAfterListingLoaded();}); return false;} );} );}; function getView()
{ var view = $('input[@name=view][@checked]').get(0); if(typeof(view) != 'undefined')
{ return view.value;}else
{ return '';}
}; function getNum(elemId)
{ if(typeof(elemId) != 'undefined' && elemId != '')
{ var r = elemId.match(/[\d\.]+/g); if(typeof(r) != 'undefined' && r && typeof(r[0]) != 'undefined')
{ return r[0];}
}
return 0;}; function enableContextMenu(jquerySelectors)
{ $(jquerySelectors).contextMenu('contextMenu', { bindings:
{ 'menuSelect':function(t)
{ var num = (getNum($(t).attr('id'))); selectFile(files[num].url);}, 'menuPlay':function(t)
{ var num = (getNum($(t).attr('id'))); $('#playGround').html('<a id="playGround' + num + '" href="' + files[num].path + '"><div id="player">&nbsp;this is mine</div></a> '); $('#playGround' + num).html(''); $('#playGround' + num).media({ width: 255, height: 210, autoplay: true }); showThickBox($('#a' + num).get(0), appendQueryString('#TB_inline', 'height=250' + '&width=258' + '&inlineId=winPlay&modal=true'));}, 'menuPreview':function(t)
{ var num = (getNum($(t).attr('id'))); $('#a' + num).click();}, 'menuDownload':function(t)
{ var num = (getNum($(t).attr('id'))); generateDownloadIframe(appendQueryString(getUrl('download', false, false), 'path=' + files[num].path, ['path']));}, 'menuRename':function(t)
{ var num = (getNum($(t).attr('id'))); showThickBox($('#a' + num).get(0), appendQueryString('#TB_inline', 'height=100' + '&width=350' + '&inlineId=winRename&modal=true')); $('div#TB_window #renameName').val(files[num].name); $('div#TB_window #original_path').val(files[num].path); $('div#TB_window #renameNum').val(num);}, 'menuEdit':function(t)
{ var num = (getNum($(t).attr('id'))); var url = ''; switch(files[num].cssClass)
{ case 'filePicture':
url = getUrl('image_editor'); break; default:
url = getUrl('text_editor');}
var param = "status=yes,menubar=no,resizable=yes,scrollbars=yes,location=no,toolbar=no"; param += ",height=" + screen.height + ",width=" + screen.width; if(typeof(window.screenX) != 'undefined')
{ param += ",screenX = 0,screenY=0";}else if(typeof(window.screenTop) != 'undefined' )
{ param += ",left = 0,top=0" ;}
var newWindow = window.open(url + ((url.lastIndexOf("?") > - 1)?"&":"?") + "path=" + files[num].path,'', param); newWindow.focus( );}, 'menuCut':function(t)
{ }, 'menuCopy':function(t)
{ }, 'menuPaste':function(t)
{ }, 'menuDelete':function(t)
{ var num = (getNum($(t).attr('id'))); if(window.confirm(warningDelete))
{ $.getJSON(appendQueryString(getUrl('delete', false,false), 'delete=' + files[num].path, ['delete']), function(data)
{ if(typeof(data.error) == 'undefined')
{ alert('Unexpected Error.');}
else if(data.error != '')
{ alert(data.error);}else
{ switch(getView())
{ case 'thumbnail': $('#dl' + num ).remove(); break; case 'detail':
default:
$('#row' + num).remove();}
files[num] = null;}
} );}
}
}, onContextMenu:function(events)
{ return true;}, onShowMenu:function(events, menu)
{ switch(getView())
{ case 'thumbnail':
var num = getNum(events.target.id); break; case 'detail':
default:
switch(events.target.tagName.toLowerCase())
{ case 'span':
if($(events.target).parent().get(0).tagName.toLowerCase() == 'a')
{ var num = getNum($(events.target).parent().parent().parent().attr('id'));}else
{ var num = getNum($(events.target).parent().parent().parent().parent().attr('id'));}
break; case 'td':
var num = getNum($(events.target).parent().attr('id')); break; case 'a':
case 'input':
var num = getNum($(events.target).parent().parent().attr('id')); break;}
}
var menusToRemove = new Array; if(typeof(selectFile) == 'undefined')
{ menusToRemove[menusToRemove.length] = '#menuSelect';}
menusToRemove[menusToRemove.length] = '#menuCut'; menusToRemove[menusToRemove.length] = '#menuCopy'; menusToRemove[menusToRemove.length] = '#menuPaste'; switch(files[num].type)
{ case 'folder':
if(numFiles < 1)
{ menusToRemove[menusToRemove.length] = '#menuPaste';}
menusToRemove[menusToRemove.length] = '#menuPreview'; menusToRemove[menusToRemove.length] = '#menuDownload'; menusToRemove[menusToRemove.length] = '#menuEdit'; menusToRemove[menusToRemove.length] = '#menuPlay'; menusToRemove[menusToRemove.length] = '#menuDownload'; break; default:
var isSupportedExt = false; if(permits.edit)
{ var ext = getFileExtension(files[num].path); var supportedExts = supporedPreviewExts.split(","); for(var i = 0; i < supportedExts.length; i++)
{ if(typeof(supportedExts[i]) != 'undefined' && typeof(supportedExts[i]).toLowerCase() == 'string' && supportedExts[i].toLowerCase() == ext.toLowerCase())
{ isSupportedExt = true; break;}
}
}
if(!isSupportedExt || permits.view_only)
{ menusToRemove[menusToRemove.length] = '#menuEdit';}
switch(files[num].cssClass)
{ case 'filePicture':
menusToRemove[menusToRemove.length] = '#menuPlay'; break; case 'fileCode':
menusToRemove[menusToRemove.length] = '#menuPlay'; break; case 'fileVideo':
case 'fileFlash':
case 'fileMusic':
menusToRemove[menusToRemove.length] = '#menuPreview'; menusToRemove[menusToRemove.length] = '#menuEdit'; break; default:
menusToRemove[menusToRemove.length] = '#menuPreview'; menusToRemove[menusToRemove.length] = '#menuPlay';}
menusToRemove[menusToRemove.length] = '#menuPaste';}
if(!permits.edit|| permits.view_only)
{ menusToRemove[menusToRemove.length] = '#menuEdit';}
if(!permits.del || permits.view_only)
{ menusToRemove[menusToRemove.length] = '#menuDelete';}
if(!permits.cut || permits.view_only)
{ menusToRemove[menusToRemove.length] = '#menuCut';}
if(!permits.copy || permits.view_only)
{ menusToRemove[menusToRemove.length] = '#menuCopy';}
if((!permits.cut && !permits.copy) || permits.view_only)
{ menusToRemove[menusToRemove.length] = '#menuPaste';}
if(!permits.rename || permits.view_only)
{ menusToRemove[menusToRemove.length] = '#menuRename';}
var txt = ''; for(var t in menu)
{ }
$(menu).children().children().children().each( function()
{ if(menusToRemove.inArray('#' + this.id))
{ $(this).parent().remove();}
}
)
return menu;}
} );}; var fileUploadElemIds = new Array(); function addMoreFile()
{ var newFileUpload = $($('div#TB_window #fileUploadBody tr').get(0)).clone(); do
{ var elementId = 'upload' + generateUniqueId(10);}while(fileUploadElemIds.inArray(elementId)); fileUploadElemIds[fileUploadElemIds.length] = elementId; $(newFileUpload).appendTo('div#TB_window #fileUploadBody'); $('input[@type=file]', newFileUpload).attr('id', elementId); $('span.uploadProcessing', newFileUpload).attr('id', 'ajax' + elementId); $('input[@type=button]', newFileUpload).click( function()
{ uploadFile(elementId);} ); $('a', newFileUpload).show().click( function()
{ cancelFileUpload(elementId);} ); $(newFileUpload).show(); return false;}; function cancelFileUpload(elementId)
{ $('div#TB_window #' + elementId).parent().parent().remove(); while($('div#TB_window #fileUploadBody tr').length < 2)
{ addMoreFile();}
return false;}; function uploadFile(elementId)
{ var ext = getFileExtension($('#' + elementId).val()); if(ext == '')
{ alert(noFileSelected ); return false;}
var supportedExts = supportedUploadExts.split(","); var isSupportedExt = false; for (i in supportedExts)
{ if(typeof(supportedExts[i]) == 'string')
{ isSupportedExt = true; break;}
}
if(!isSupportedExt)
{ alert(msgInvalidExt); return false;}
$('#ajax' + elementId).hide(); $('#ajax' + elementId).show(); $.ajaxFileUpload
( { url:appendQueryString(getUrl('upload', false, false), 'folder=' + currentFolder.path, ['folder']), secureuri:false, fileElementId:elementId, dataType: 'json', success: function (data, status)
{ if(typeof(data.error) != 'undefined')
{ if(data.error != '')
{ alert(data.error); $('#ajax' + elementId).hide();}else
{ cancelFileUpload(elementId); numRows++; files[numRows] = {}; for(var i in data)
{ if(i != 'error')
{ files[numRows][i] = data[i];}
}
addDocumentHtml(numRows);}
}
}, error: function (data, status, e)
{ $('#ajax' + elementId).hide(); alert(e);}
}
)
return false;}; function generateUniqueId(leng)
{ var idLength = leng || 32; var chars = "0123456789abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ"; var id = ''; for(var i = 0; i <= idLength; i++)
{ id += chars.substr( Math.floor(Math.random() * 62), 1 );}
return (id );}; function generateDownloadIframe(url)
{ var frameId = 'ajaxDownloadIframe'; $('#' + frameId).remove(); if(window.ActiveXObject) { var io = document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" />');}
else { var io = document.createElement('iframe'); io.id = frameId; io.name = frameId;}
io.style.position = 'absolute'; io.style.top = '-1000px'; io.style.left = '-1000px'; io.src = url; document.body.appendChild(io);}; function showThickBox(linkElem, url)
{ $(linkElem).attr('href', url); var t = linkElem.title || linkElem.name || null; var a = linkElem.href || linkElem.alt; var g = linkElem.rel || false; tb_show(t,a,g); linkElem.blur(); return false;}; function uploadFileWin(linkElem)
{ showThickBox(linkElem, appendQueryString('#TB_inline', 'height=200' + '&width=500' + '&inlineId=winUpload&modal=true'));
while($('div#TB_window #fileUploadBody tr').length < 2)
{
addMoreFile();
}
}; function newFolderWin(linkElem)
{ showThickBox(linkElem, appendQueryString('#TB_inline', 'height=100' + '&width=300' + '&inlineId=winNewFolder&modal=true')); return false;}; function doCreateFolder()
{ $('div#TB_window #currentNewfolderPath').val(currentFolder.path); var pattern=/^[A-Za-z0-9_ \-]+$/i; var folder = $('div#TB_window #new_folder'); if(!pattern.test($(folder).val()))
{ alert(msgInvalidFolderName);}else
{ var options = { dataType: 'json', url:getUrl('create_folder'), error: function (data, status, e)
{ alert(e);}, success: function(data)
{ if(data.error != '')
{ alert(data.error);}else
{ numRows++; files[numRows] = {}; for(var i in data)
{ if(i != 'error')
{ files[numRows][i] = data[i];}
}
addDocumentHtml(numRows); tb_remove();}
}
}; $('div#TB_window #formNewFolder').ajaxSubmit(options);}
return false;}; function deleteDocuments(msgNoDocSelected, msgUnableToDelete, msgWarning, elements)
{ if(!window.confirm(warningDel))
{ return false;}
switch(getView())
{ case 'thumbnail':
var selectedDoc = $('#rightCol dl.thumbnailListing input[@type=checkbox][@checked]'); break; case 'detail':
default:
var selectedDoc = $('#fileList input[@type=checkbox][@checked]');}
var hiddenSelectedDoc = document.getElementById('selectedDoc'); var selectedOptions; var isSelected = false; $(hiddenSelectedDoc).removeOption(/./); $(selectedDoc).each(function(i){ $(hiddenSelectedDoc).addOption($(this).val(), getNum($(this).attr('id')), true); isSelected = true;}); if(!isSelected)
{ alert(msgNoDocSelected);}
else
{ var options = { dataType: 'json', url:getUrl('delete'), error: function (data, status, e)
{ alert(e);}, success: function(data)
{ if(typeof(data.error) == 'undefined')
{ alert('Unexpected error.');}else if(data.error != '')
{ alert(data.error);}else
{ for(var i =0; i < hiddenSelectedDoc.options.length; i++)
{ switch(getView())
{ case 'thumbnail':
$('#dl' + hiddenSelectedDoc.options[i].text).remove(); break; case 'detail':
default:
$('#row' + hiddenSelectedDoc.options[i].text).remove();}
}
}
}
}; $('#formAction').ajaxSubmit(options);}
return false;}; function doRename()
{ var num = $('div#TB_window #renameNum').val(); if(files[num].fileType == 'folder')
{ var pattern=/^[A-Za-z0-9_ \-]+$/i;}else
{ var pattern=/^[A-Za-z0-9_ \-\.]+$/i;}
if(!pattern.test($('div#TB_window #renameName').val()))
{ if(files[num].fileType == 'folder')
{ alert(msgInvalidFolderName);}else
{ alert(msgInvalidFileName);}
}else
{ var options = { dataType: 'json', url:getUrl('rename'), error: function (data, status, e)
{ alert(e);}, success: function(data)
{ if(data.error != '')
{ alert(data.error);}else
{ var info = ''; for(var i in data)
{ if(i != 'error')
{ files[num][i] = data[i];}
}
switch(getView())
{ case 'thumbnail':
$('#thumbUrl' + num).attr('href', files[num].path); $('#thumbImg' + num).attr('src', appendQueryString(getUrl('thumbnail'), 'path=' + files[num].path, ['path'])); $('#cb' + num).val(files[num].path); $('#a' + num).attr('href', files[num].path).text(files[num].name); break; case 'detail':
default:
$('#check' + num).val(files[num].path); $('#a' + num).attr('href', files[num].path); $('#tdnd' + num).text(files[num].name); $('#tdth' + num).text(files[num].name);}
tb_remove();}
}
}; $('div#TB_window #formRename').ajaxSubmit(options);}
}; function windowRefresh()
{ document.location.href = urls.present;}; function infoWin(linkElem)
{ showThickBox(linkElem, appendQueryString('#TB_inline', 'height=180' + '&width=500'+ '&inlineId=winInfo&modal=true'));}; function checkAll(checkbox)
{ if($(checkbox).attr('class') == "check_all")
{ $('#tickAll, #actionSelectAll').attr('class', 'uncheck_all'); $('#tickAll, #actionSelectAll').attr('title', unselectAllText); $('#actionSelectAll span').html(unselectAllText); switch(getView())
{ case 'thumbnail':
$('#rightCol dl.thumbnailListing input[@type=checkbox]').each(function(i){ $(this).attr("checked", 'checked');}) ; break; case 'detail':
default:
$("#fileList tr[@id^=row] input[@type=checkbox]").each(function(i){ $(this).attr("checked", 'checked');}) ;}
}else
{ $('#tickAll, #actionSelectAll').attr('class', 'check_all'); $('#tickAll, #actionSelectAll').attr('title', selectAllText); $('#actionSelectAll span').html( selectAllText); switch(getView())
{ case 'thumbnail':
$('#rightCol dl.thumbnailListing input[@type=checkbox]').each(function(i){ $(this).removeAttr("checked");}) ; break; case 'detail':
default:
$("#fileList tr[@id^=row] input[@type=checkbox]").each(function(i){ $(this).removeAttr("checked");}) ;}
}
return false;}; function cutDocuments(msgNoDocSelected)
{ repositionDocuments(msgNoDocSelected, getUrl('cut'), 'cut'); return false;}; function copyDocuments(msgNoDocSelected)
{ repositionDocuments(msgNoDocSelected, getUrl('copy'), 'copy'); return false;}; function repositionDocuments(msgNoDocSelected, formActionUrl, actionVal)
{ switch(getView())
{ case 'thumbnail':
var selectedDoc = $('#rightCol dl.thumbnailListing input[@type=checkbox][@checked]'); break; case 'detail':
default:
var selectedDoc = $('#fileList input[@type=checkbox][@checked]');}
var hiddenSelectedDoc = document.getElementById('selectedDoc'); var selectedOptions; var isSelected = false; $(hiddenSelectedDoc).removeOption(/./); $(selectedDoc).each(function(i){ $(hiddenSelectedDoc).addOption($(this).val(), getNum($(this).attr('id')), true); isSelected = true;}); if(!isSelected)
{ alert(msgNoDocSelected);}
else
{ var formAction = document.formAction; var actionElem = $('#action_value'); formAction.action = formActionUrl; $('#currentFolderPathVal').val(currentFolder.path); $(actionElem).val(actionVal); var options = { dataType: 'json', error: function (data, status, e)
{ alert(e);}, success: function(data)
{ if(typeof(data.error) == 'undefined')
{ alert('Unexpected Error');}
else if(data.error != '')
{ alert(data.error);}else
{ numFiles = parseInt(data.num); var flag = (actionVal == 'copy'?'copyFlag':'cutFlag'); action = actionVal; for(var i = 1; i < numRows; i++)
{ $('#flag' + i).attr('class', 'noFlag');}
for(var i =0; i < hiddenSelectedDoc.options.length; i++)
{ $('#flag' + hiddenSelectedDoc.options[i].text).attr('class', flag);}
}
}
}; $(formAction).ajaxSubmit(options);}
return false;}; function pasteDocuments(msgNoDocSelected)
{ if(numFiles)
{ var warningMsg = (action == 'copy'?warningCopyPaste:warningCutPaste); if(window.confirm(warningMsg))
{ $.getJSON(appendQueryString(getUrl('paste'), 'current_folder_path='+ currentFolder.path, ['current_folder_path']), function(json)
{ if(typeof(json.error) == 'undefined')
{ alert('Unexpected Error.');}
{ if(json.error != '')
{ alert(json.error);}
for(var j in json.files)
{ numRows++; files[numRows] = {}; for(var i in json.files[j])
{ files[numRows][i] = json.files[j][i];}
addDocumentHtml(numRows);}
numFiles = parseInt(json.unmoved_files);}
} );}
}else
{ alert(msgNoDocSelected);}
return false;}; function addDocumentHtml(num)
{ var strDisabled = ""; if(!files[num].is_writable)
{ strDisabled = "disabled";}
switch(getView())
{ case 'thumbnail':
$( '<dl class="thumbnailListing" id="dl' + num + '" ><dt id="dt' + num + '" class="' + files[num].cssClass + '"></dt><dd id="dd' + num + '" class="thumbnailListing_info"><span id="flag' + num + '" class="' + files[num].flag + '">&nbsp;</span><input id="cb' + num + '" type="checkbox" class="radio" ' + strDisabled +' name="check[]" class="input" value="' + files[num].path + '" /><a href="' + files[num].path + '" title="' + files[num].name + '" id="a' + num + '">' + (typeof(files[num].short_name) != 'undefined'?files[num].short_name:files[num].name) + '</a></dd></dl>').appendTo('#content'); if(files[num].type== 'folder')
{ enableFolderBrowsable(num);}else
{ switch(files[num].cssClass)
{ case 'filePicture':
$('<a id="thumbUrl' + num + '" rel="thumbPhotos" href="' + files[num].path + '"><img src="' + appendQueryString(getUrl('thumbnail', false, false), 'path=' + files[num].path, ['path']) + '" id="thumbImg' + num + '"></a>').appendTo('#dt' + num); break; case 'fileFlash':
break; case 'fileVideo':
break; case 'fileMusic':
break; default:
}
enablePreview('#dl' + num + ' a', [num]);}
enableContextMenu('#dl' + num); enableShowDocInfo( num); break; case 'detail':
default:
var cssRow = (num % 2?"even":"odd"); $('<tr class="' + cssRow + '" id="row' + num + '"><td id="tdz' + num +'" align="center"><span id="flag' + num +'" class="' + files[num].flag +'">&nbsp;</span><input type="checkbox" class="radio" name="check[]" id="cb' + num +'" value="' + files[num].path +'" ' + strDisabled + ' /></td><td align="center" class="fileColumns" id="tdst1">&nbsp;<a id="a' + num +'" href="' + files[num].path +'"><span class="' + files[num].cssClass + '">&nbsp;</span></a></td><td class="left docName" id="tdnd' + num +'">' + (typeof(files[num].short_name) != 'undefined'?files[num].short_name:files[num].name) + '</td><td class="docInfo" id="tdrd' + num +'">' + files[num].size +'</td><td class="docInfo" id="tdth' + num +'">' + files[num].mtime +'</td></tr>').appendTo('#fileList'); if(files[num].type== 'folder')
{ enableFolderBrowsable(num);}else
{ switch(files[num].cssClass)
{ case 'filePicture':
break; case 'fileFlash':
break; case 'fileVideo':
break; case 'fileMusic':
break; default:
}
enablePreview('#row' + num + ' td a', num);}
enableContextMenu('#row' + num); enableShowDocInfo(num); break;}
}; function enableShowDocInfo(num)
{ $('#cb' + num).click( function()
{ setDocInfo('doc', num);} );}; function setDocInfo(type, num)
{ var info = {}; if(type == 'root')
{ info = currentFolder;}else
{ info = files[num];}
if(info.type=="folder")
{ $('#folderPath').text(info.name); $('#folderFile').text(info.file); $('#folderSubdir').text(info.subdir); $('#folderCtime').text(info.ctime); $('#folderMtime').text(info.mtime); if(info.is_readable == '1')
{ $('#folderReadable').html("<span class=\"flagYes\">&nbsp;</span>");}else
{ $('#folderReadable').html("<span class=\"flagNo\">&nbsp;</span>");}
if(info.is_writable == '1')
{ $('#folderWritable').html("<span class=\"flagYes\">&nbsp;</span>");}else
{ $('#folderWritable').html("<span class=\"flagNo\">&nbsp;</span>");}
$('#folderFieldSet').css('display', ''); $('#fileFieldSet').css('display', 'none');}else
{ $('#fileName').text(info.name); $('#fileSize').text(info.size); $('#fileType').text(info.fileType); $('#fileCtime').text(info.ctime); $('#fileMtime').text(info.mtime); if(info.is_readable == '1')
{ $('#fileReadable').html("<span class=\"flagYes\">&nbsp;</span>");}else
{ $('#fileReadable').html("<span class=\"flagNo\">&nbsp;</span>");}
if(info.is_writable == '1')
{ $('#fileWritable').html("<span class=\"flagYes\">&nbsp;</span>");}else
{ $('#fileWritable').html("<span class=\"flagNo\">&nbsp;</span>");}
$('#folderFieldSet').css('display', 'none'); $('#fileFieldSet').css('display', ''); if(typeof(selectFile) != 'undefined')
{ $('#selectCurrentUrl').unbind('click').click( function()
{ selectFile(info.url);} ); $('#returnCurrentUrl').show();}else
{ $('#returnCurrentUrl').hide();}
}
}; function search()
{ searchRequired = true; var url = getUrl('view', true, true, true); $('#rightCol').empty(); ajaxStart('#rightCol'); $('#rightCol').load(url, {}, function(){ ajaxStop('#rightCol img.ajaxLoadingImg'); initAfterListingLoaded();}); return false;}; function closeWinPlay()
{ tb_remove(); $('#playGround').empty();}; function closeWindow(msg)
{ if(window.confirm(msg))
{ window.close();}else
{ return false;}
};
//ajaxfilemanager general end