diff --git a/main/inc/lib/javascript/META.json b/main/inc/lib/javascript/META.json new file mode 100755 index 0000000000..1f669d51a5 --- /dev/null +++ b/main/inc/lib/javascript/META.json @@ -0,0 +1,29 @@ +{ + "name": "jQuery-Tabs", + "version": 2.7, + "author": [ + "Klaus Hartl " + ], + "abstract": "jQuery plugin for accessible, unobtrusive tabs.", + "license": "mit, gpl", + "distribution_type": "plugin", + "requires": { + "jQuery": ">= 1.0.3, < 1.2" + }, + "provides": { + "jQuery.Tabs": { + "version": 2.7, + "file": "jquery.tabs.js" + } + }, + "keywords": [ + "tabs", + "widget" + ], + "stability": "Official", + "meta-spec": { + "version": 1.3, + "url": "http://module-build.sourceforge.net/META-spec-v1.3.html" + }, + "generated_by": "Yehuda Katz" +} \ No newline at end of file diff --git a/main/inc/lib/javascript/jquery-1.1.3.1.pack.js b/main/inc/lib/javascript/jquery-1.1.3.1.pack.js new file mode 100755 index 0000000000..f364720a8c --- /dev/null +++ b/main/inc/lib/javascript/jquery-1.1.3.1.pack.js @@ -0,0 +1,11 @@ +/* + * jQuery 1.1.3.1 - New Wave Javascript + * + * Copyright (c) 2007 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2007-07-05 00:43:24 -0400 (Thu, 05 Jul 2007) $ + * $Rev: 2243 $ + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?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>",""]||!s.J("<7g")&&[1,"<52>",""]||(!s.J("<7c")||!s.J("<1z")||!s.J("<7a")||!s.J("<78"))&&[1,"<1r>",""]||!s.J("<2V")&&[2,"<1r><1z>",""]||(!s.J("<75")||!s.J("<74"))&&[3,"<1r><1z><2V>",""]||!s.J("<73")&&[2,"<1r><4W>",""]||[0,"",""];1x.27=a[1]+b+a[2];1v(a[0]--)1x=1x.1d;7(6.M.1h){7(!s.J("<1r")&&s.J("<1z")<0)1N=1x.1d&&1x.1d.2S;B 7(a[1]=="<1r>"&&s.J("<1z")<0)1N=1x.2S;E(u n=1N.C-1;n>=0;--n)7(6.Q(1N[n],"1z")&&!1N[n].2S.C)1N[n].L.3q(1N[n])}b=6.2L(1x.2S)}7(0===b.C&&(!6.Q(b,"34")&&!6.Q(b,"2y")))v;7(b[0]==I||6.Q(b,"34")||b.71)r.R(b);B r=6.1T(r,b)});v r},1b:q(c,d,a){u e=6.40(c)?{}:6.3H;7(e[d]){7(a!=I)c[e[d]]=a;v c[e[d]]}B 7(a==I&&6.M.1h&&6.Q(c,"34")&&(d=="70"||d=="6Y"))v c.6W(d).5R;B 7(c.4z){7(a!=I)c.6U(d,a);7(6.M.1h&&/4M|2u/.17(d)&&!6.40(c))v c.35(d,2);v c.35(d)}B{7(d=="1e"&&6.M.1h){7(a!=I){c.5U=1;c.1i=(c.1i||"").1o(/4L\\([^)]*\\)/,"")+(39(a).3v()=="6M"?"":"4L(1e="+a*4X+")")}v c.1i?(39(c.1i.3t(/1e=([^)]*)/)[1])/4X).3v():""}d=d.1o(/-([a-z])/6K,q(z,b){v b.1D()});7(a!=I)c[d]=a;v c[d]}},2C:q(t){v t.1o(/^\\s+|\\s+$/g,"")},2L:q(a){u r=[];7(1g a!="6I")E(u i=0,26=a.C;i<26;i++)r.R(a[i]);B r=a.51(0);v r},2w:q(b,a){E(u i=0,26=a.C;i<26;i++)7(a[i]==b)v i;v-1},1T:q(a,b){E(u i=0;b[i];i++)a.R(b[i]);v a},5g:q(a){u r=[],3P=6.1k++;E(u i=0,4G=a.C;i<4G;i++)7(3P!=a[i].1k){a[i].1k=3P;r.R(a[i])}v r},1k:0,2s:q(c,b,d){7(1g b=="1s")b=14 45("a","i","v "+b);u a=[];E(u i=0,30=c.C;i<30;i++)7(!d&&b(c[i],i)||d&&!b(c[i],i))a.R(c[i]);v a},3k:q(c,b){7(1g b=="1s")b=14 45("a","v "+b);u d=[];E(u i=0,30=c.C;i<30;i++){u a=b(c[i],i);7(a!==H&&a!=I){7(a.15!=2b)a=[a];d=d.6v(a)}}v d}});14 q(){u b=6u.6t.2H();6.M={4D:(b.3t(/.+(?:6s|6q|6o|6m)[\\/: ]([\\d.]+)/)||[])[1],20:/5l/.17(b),2a:/2a/.17(b),1h:/1h/.17(b)&&!/2a/.17(b),3j:/3j/.17(b)&&!/(6h|5l)/.17(b)};6.6g=!6.M.1h||P.6f=="6c";6.1U=6.M.1h?"1U":"5x",6.3H={"E":"68","67":"12","3x":6.1U,5x:6.1U,1U:6.1U,27:"27",12:"12",2v:"2v",2r:"2r",2B:"2B",65:"63",2T:"2T",62:"5Z"}};6.F({4v:"a.L",4p:"6.4p(a)",8o:"6.22(a,2,\'1X\')",8n:"6.22(a,2,\'4t\')",8k:"6.4q(a.L.1d,a)",8h:"6.4q(a.1d)"},q(i,n){6.11[i]=q(a){u b=6.3k(9,n);7(a&&1g a=="1s")b=6.2x(a,b);v 9.1Z(b)}});6.F({5o:"3e",8g:"5w",2K:"5t",8f:"5s"},q(i,n){6.11[i]=q(){u a=19;v 9.F(q(){E(u j=0,26=a.C;j<26;j++)6(a[j])[n](9)})}});6.F({5v:q(a){6.1b(9,a,"");9.8d(a)},8c:q(c){6.12.1A(9,c)},88:q(c){6.12.1E(9,c)},87:q(c){6.12[6.12.3w(9,c)?"1E":"1A"](9,c)},1E:q(a){7(!a||6.1i(a,[9]).r.C)9.L.3q(9)},2Y:q(){1v(9.1d)9.3q(9.1d)}},q(i,n){6.11[i]=q(){v 9.F(n,19)}});6.F(["5Q","5P","5O","5N"],q(i,n){6.11[n]=q(a,b){v 9.1i(":"+n+"("+a+")",b)}});6.F(["1u","29"],q(i,n){6.11[n]=q(h){v h==I?(9.C?6.1f(9[0],n):H):9.1f(n,h.15==33?h:h+"4o")}});6.1c({4n:{"":"m[2]==\'*\'||6.Q(a,m[2])","#":"a.35(\'2m\')==m[2]",":":{5P:"im[3]-0",22:"m[3]-0==i",5Q:"m[3]-0==i",2Q:"i==0",2P:"i==r.C-1",5L:"i%2==0",5K:"i%2","2Q-3u":"a.L.3R(\'*\')[0]==a","2P-3u":"6.22(a.L.5J,1,\'4t\')==a","86-3u":"!6.22(a.L.5J,2,\'4t\')",4v:"a.1d",2Y:"!a.1d",5N:"(a.5H||a.85||\'\').J(m[3])>=0",4f:\'"1y"!=a.G&&6.1f(a,"U")!="1P"&&6.1f(a,"48")!="1y"\',1y:\'"1y"==a.G||6.1f(a,"U")=="1P"||6.1f(a,"48")=="1y"\',84:"!a.2r",2r:"a.2r",2B:"a.2B",2T:"a.2T||6.1b(a,\'2T\')",2A:"\'2A\'==a.G",4b:"\'4b\'==a.G",5F:"\'5F\'==a.G",4l:"\'4l\'==a.G",5E:"\'5E\'==a.G",4k:"\'4k\'==a.G",5D:"\'5D\'==a.G",5C:"\'5C\'==a.G",1J:\'"1J"==a.G||6.Q(a,"1J")\',5B:"/5B|2y|82|1J/i.17(a.Q)"},"[":"6.1L(m[2],a).C"},5A:[/^\\[ *(@)([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,14 3o("^([:.#]*)("+(6.2J=6.M.20&&6.M.4D<"3.0.0"?"\\\\w":"(?:[\\\\w\\7Z-\\7X*1I-]|\\\\\\\\.)")+"+)")],2x:q(a,c,b){u d,1K=[];1v(a&&a!=d){d=a;u f=6.1i(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1K=b?c=f.r:6.1T(1K,f.r)}v 1K},1L:q(t,l){7(1g t!="1s")v[t];7(l&&!l.1q)l=H;l=l||P;7(!t.J("//")){l=l.4h;t=t.2G(2,t.C)}B 7(!t.J("/")&&!l.2O){l=l.4h;t=t.2G(1,t.C);7(t.J("/")>=1)t=t.2G(t.J("/"),t.C)}u b=[l],2j=[],2P;1v(t&&2P!=t){u r=[];2P=t;t=6.2C(t).1o(/^\\/\\//,"");u k=N;u g=14 3o("^[/>]\\\\s*("+6.2J+"+)");u m=g.1V(t);7(m){u o=m[1].1D();E(u i=0;b[i];i++)E(u c=b[i].1d;c;c=c.1X)7(c.1q==1&&(o=="*"||c.Q.1D()==o.1D()))r.R(c);b=r;t=t.1o(g,"");7(t.J(" ")==0)7R;k=K}B{g=/^((\\/?\\.\\.)|([>\\/+~]))\\s*([a-z]*)/i;7((m=g.1V(t))!=H){r=[];u o=m[4],1k=6.1k++;m=m[1];E(u j=0,2e=b.C;j<2e;j++)7(m.J("..")<0){u n=m=="~"||m=="+"?b[j].1X:b[j].1d;E(;n;n=n.1X)7(n.1q==1){7(m=="~"&&n.1k==1k)1F;7(!o||n.Q.1D()==o.1D()){7(m=="~")n.1k=1k;r.R(n)}7(m=="+")1F}}B r.R(b[j].L);b=r;t=6.2C(t.1o(g,""));k=K}}7(t&&!k){7(!t.J(",")){7(l==b[0])b.4e();2j=6.1T(2j,b);r=b=[l];t=" "+t.2G(1,t.C)}B{u h=14 3o("^("+6.2J+"+)(#)("+6.2J+"+)");u m=h.1V(t);7(m){m=[0,m[2],m[3],m[1]]}B{h=14 3o("^([#.]?)("+6.2J+"*)");m=h.1V(t)}m[2]=m[2].1o(/\\\\/g,"");u f=b[b.C-1];7(m[1]=="#"&&f&&f.4d){u p=f.4d(m[2]);7((6.M.1h||6.M.2a)&&p&&1g p.2m=="1s"&&p.2m!=m[2])p=6(\'[@2m="\'+m[2]+\'"]\',f)[0];b=r=p&&(!m[3]||6.Q(p,m[3]))?[p]:[]}B{E(u i=0;b[i];i++){u a=m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&b[i].Q.2H()=="7P")a="2E";r=6.1T(r,b[i].3R(a))}7(m[1]==".")r=6.4c(r,m[2]);7(m[1]=="#"){u e=[];E(u i=0;r[i];i++)7(r[i].35("2m")==m[2]){e=[r[i]];1F}r=e}b=r}t=t.1o(h,"")}}7(t){u d=6.1i(t,r);b=r=d.r;t=6.2C(d.t)}}7(t)b=[];7(b&&l==b[0])b.4e();2j=6.1T(2j,b);v 2j},4c:q(r,m,a){m=" "+m+" ";u b=[];E(u i=0;r[i];i++){u c=(" "+r[i].12+" ").J(m)>=0;7(!a&&c||a&&!c)b.R(r[i])}v b},1i:q(t,r,h){u d;1v(t&&t!=d){d=t;u p=6.5A,m;E(u i=0;p[i];i++){m=p[i].1V(t);7(m){t=t.7N(m[0].C);m[2]=m[2].1o(/\\\\/g,"");1F}}7(!m)1F;7(m[1]==":"&&m[2]=="4Y")r=6.1i(m[3],r,K).r;B 7(m[1]==".")r=6.4c(r,m[2],h);B 7(m[1]=="@"){u g=[],G=m[3];E(u i=0,2e=r.C;i<2e;i++){u a=r[i],z=a[6.3H[m[2]]||m[2]];7(z==H||/4M|2u/.17(m[2]))z=6.1b(a,m[2])||\'\';7((G==""&&!!z||G=="="&&z==m[5]||G=="!="&&z!=m[5]||G=="^="&&z&&!z.J(m[5])||G=="$="&&z.2G(z.C-m[5].C)==m[5]||(G=="*="||G=="~=")&&z.J(m[5])>=0)^h)g.R(a)}r=g}B 7(m[1]==":"&&m[2]=="22-3u"){u e=6.1k++,g=[],17=/(\\d*)n\\+?(\\d*)/.1V(m[3]=="5L"&&"2n"||m[3]=="5K"&&"2n+1"||!/\\D/.17(m[3])&&"n+"+m[3]||m[3]),2Q=(17[1]||1)-0,d=17[2]-0;E(u i=0,2e=r.C;i<2e;i++){u j=r[i],L=j.L;7(e!=L.1k){u c=1;E(u n=L.1d;n;n=n.1X)7(n.1q==1)n.4a=c++;L.1k=e}u b=N;7(2Q==1){7(d==0||j.4a==d)b=K}B 7((j.4a+d)%2Q==0)b=K;7(b^h)g.R(j)}r=g}B{u f=6.4n[m[1]];7(1g f!="1s")f=6.4n[m[1]][m[2]];49("f = q(a,i){v "+f+"}");r=6.2s(r,f,h)}}v{r:r,t:t}},4p:q(c){u b=[];u a=c.L;1v(a&&a!=P){b.R(a);a=a.L}v b},22:q(a,e,c,b){e=e||1;u d=0;E(;a;a=a[c])7(a.1q==1&&++d==e)1F;v a},4q:q(n,a){u r=[];E(;n;n=n.1X){7(n.1q==1&&(!a||n!=a))r.R(n)}v r}});6.S={1A:q(d,e,c,b){7(6.M.1h&&d.3m!=I)d=18;7(!c.1Q)c.1Q=9.1Q++;7(b!=I){u f=c;c=q(){v f.O(9,19)};c.W=b;c.1Q=f.1Q}7(!d.$1a)d.$1a={};7(!d.$1p)d.$1p=q(){u a;7(1g 6=="I"||6.S.47)v a;a=6.S.1p.O(d,19);v a};u g=d.$1a[e];7(!g){g=d.$1a[e]={};7(d.46)d.46(e,d.$1p,N);B d.7M("5r"+e,d.$1p)}g[c.1Q]=c;7(!9.Y[e])9.Y[e]=[];7(6.2w(d,9.Y[e])==-1)9.Y[e].R(d)},1Q:1,Y:{},1E:q(b,c,a){u d=b.$1a,1Y,2p;7(d){7(c&&c.G){a=c.44;c=c.G}7(!c){E(c V d)9.1E(b,c)}B 7(d[c]){7(a)3l d[c][a.1Q];B E(a V b.$1a[c])3l d[c][a];E(1Y V d[c])1F;7(!1Y){7(b.43)b.43(c,b.$1p,N);B b.7J("5r"+c,b.$1p);1Y=H;3l d[c];1v(9.Y[c]&&((2p=6.2w(b,9.Y[c]))>=0))3l 9.Y[c][2p]}}E(1Y V d)1F;7(!1Y)b.$1p=b.$1a=H}},1t:q(c,b,d){b=6.2L(b||[]);7(!d)6.F(9.Y[c]||[],q(){6.S.1t(c,b,9)});B{u a,1Y,11=6.16(d[c]||H);b.5p(9.42({G:c,1O:d}));7(6.16(d.$1p)&&(a=d.$1p.O(d,b))!==N)9.47=K;7(11&&a!==N&&!6.Q(d,\'a\'))d[c]();9.47=N}},1p:q(b){u a;b=6.S.42(b||18.S||{});u c=9.$1a&&9.$1a[b.G],1S=[].51.3D(19,1);1S.5p(b);E(u j V c){1S[0].44=c[j];1S[0].W=c[j].W;7(c[j].O(9,1S)===N){b.2d();b.2D();a=N}}7(6.M.1h)b.1O=b.2d=b.2D=b.44=b.W=H;v a},42:q(c){u a=c;c=6.1c({},a);c.2d=q(){7(a.2d)v a.2d();a.7H=N};c.2D=q(){7(a.2D)v a.2D();a.7F=K};7(!c.1O&&c.5n)c.1O=c.5n;7(6.M.20&&c.1O.1q==3)c.1O=a.1O.L;7(!c.41&&c.4j)c.41=c.4j==c.1O?c.7C:c.4j;7(c.5k==H&&c.5j!=H){u e=P.4h,b=P.4y;c.5k=c.5j+(e&&e.5i||b.5i);c.7z=c.7y+(e&&e.5f||b.5f)}7(!c.3h&&(c.5e||c.5d))c.3h=c.5e||c.5d;7(!c.5c&&c.5b)c.5c=c.5b;7(!c.3h&&c.1J)c.3h=(c.1J&1?1:(c.1J&2?3:(c.1J&4?2:0)));v c}};6.11.1c({3g:q(c,a,b){v c=="3z"?9.3Z(c,a,b):9.F(q(){6.S.1A(9,c,b||a,b&&a)})},3Z:q(d,b,c){v 9.F(q(){6.S.1A(9,d,q(a){6(9).3U(a);v(c||b).O(9,19)},c&&b)})},3U:q(a,b){v 9.F(q(){6.S.1E(9,a,b)})},1t:q(a,b){v 9.F(q(){6.S.1t(a,b,9)})},1R:q(){u a=19;v 9.5a(q(e){9.4u=0==9.4u?1:0;e.2d();v a[9.4u].O(9,[e])||N})},7w:q(f,g){q 3W(e){u p=e.41;1v(p&&p!=9)2g{p=p.L}25(e){p=9};7(p==9)v N;v(e.G=="3V"?f:g).O(9,[e])}v 9.3V(3W).59(3W)},1G:q(f){7(6.3d)f.O(P,[6]);B 6.2q.R(q(){v f.O(9,[6])});v 9}});6.1c({3d:N,2q:[],1G:q(){7(!6.3d){6.3d=K;7(6.2q){6.F(6.2q,q(){9.O(P)});6.2q=H}7(6.M.3j||6.M.2a)P.43("58",6.1G,N);7(!18.7v.C)6(18).1W(q(){6("#3T").1E()})}}});14 q(){6.F(("7u,7t,1W,7s,7r,3z,5a,7q,"+"7p,7o,7n,3V,59,7m,2y,"+"4k,7l,7k,7j,2c").2R(","),q(i,o){6.11[o]=q(f){v f?9.3g(o,f):9.1t(o)}});7(6.M.3j||6.M.2a)P.46("58",6.1G,N);B 7(6.M.1h){P.7i("<7h"+"7f 2m=3T 7e=K "+"2u=//:><\\/3b>");u a=P.4d("3T");7(a)a.7d=q(){7(9.3a!="1n")v;6.1G()};a=H}B 7(6.M.20)6.3N=3m(q(){7(P.3a=="79"||P.3a=="1n"){3M(6.3N);6.3N=H;6.1G()}},10);6.S.1A(18,"1W",6.1G)};7(6.M.1h)6(18).3Z("3z",q(){u a=6.S.Y;E(u b V a){u c=a[b],i=c.C;7(i&&b!=\'3z\')77 c[i-1]&&6.S.1E(c[i-1],b);1v(--i)}});6.11.1c({76:q(c,b,a){9.1W(c,b,a,1)},1W:q(g,d,c,e){7(6.16(g))v 9.3g("1W",g);c=c||q(){};u f="3K";7(d)7(6.16(d)){c=d;d=H}B{d=6.2E(d);f="50"}u h=9;6.2Z({1C:g,G:f,W:d,2t:e,1n:q(a,b){7(b=="28"||!e&&b=="4V")h.1b("27",a.3c).3J().F(c,[a.3c,b,a]);B c.O(h,[a.3c,b,a])}});v 9},72:q(){v 6.2E(9)},3J:q(){v 9.1L("3b").F(q(){7(9.2u)6.4U(9.2u);B 6.3I(9.2A||9.5H||9.27||"")}).2U()}});6.F("4T,4I,4S,4R,4Q,4P".2R(","),q(i,o){6.11[o]=q(f){v 9.3g(o,f)}});6.1c({1M:q(e,c,a,d,b){7(6.16(c)){a=c;c=H}v 6.2Z({G:"3K",1C:e,W:c,28:a,3G:d,2t:b})},6X:q(d,b,a,c){v 6.1M(d,b,a,c,1)},4U:q(b,a){v 6.1M(b,H,a,"3b")},6V:q(c,b,a){v 6.1M(c,b,a,"4N")},6T:q(d,b,a,c){7(6.16(b)){a=b;b={}}v 6.2Z({G:"50",1C:d,W:b,28:a,3G:c})},6S:q(a){6.36.21=a},6Q:q(a){6.1c(6.36,a)},36:{Y:K,G:"3K",21:0,4O:"6P/x-6O-34-6N",4K:K,38:K,W:H},32:{},2Z:q(s){s=6.1c({},6.36,s);7(s.W){7(s.4K&&1g s.W!="1s")s.W=6.2E(s.W);7(s.G.2H()=="1M"){s.1C+=((s.1C.J("?")>-1)?"&":"?")+s.W;s.W=H}}7(s.Y&&!6.3L++)6.S.1t("4T");u f=N;u h=18.4Z?14 4Z("6L.6J"):14 4J();h.7b(s.G,s.1C,s.38);7(s.W)h.3Q("6H-6G",s.4O);7(s.2t)h.3Q("6F-3O-6D",6.32[s.1C]||"6C, 6B 6A 6z 4r:4r:4r 6y");h.3Q("X-6x-6w","4J");7(s.56)s.56(h);7(s.Y)6.S.1t("4P",[h,s]);u g=q(d){7(h&&(h.3a==4||d=="21")){f=K;7(i){3M(i);i=H}u c;2g{c=6.54(h)&&d!="21"?s.2t&&6.4F(h,s.1C)?"4V":"28":"2c";7(c!="2c"){u b;2g{b=h.3E("53-3O")}25(e){}7(s.2t&&b)6.32[s.1C]=b;u a=6.55(h,s.3G);7(s.28)s.28(a,c);7(s.Y)6.S.1t("4Q",[h,s])}B 6.2X(s,h,c)}25(e){c="2c";6.2X(s,h,c,e)}7(s.Y)6.S.1t("4S",[h,s]);7(s.Y&&!--6.3L)6.S.1t("4I");7(s.1n)s.1n(h,c);7(s.38)h=H}};u i=3m(g,13);7(s.21>0)4C(q(){7(h){h.6r();7(!f)g("21")}},s.21);2g{h.6p(s.W)}25(e){6.2X(s,h,H,e)}7(!s.38)g();v h},2X:q(s,a,b,e){7(s.2c)s.2c(a,b,e);7(s.Y)6.S.1t("4R",[a,s,e])},3L:0,54:q(r){2g{v!r.23&&7A.7B=="4l:"||(r.23>=5u&&r.23<6l)||r.23==5m||6.M.20&&r.23==I}25(e){}v N},4F:q(a,c){2g{u b=a.3E("53-3O");v a.23==5m||b==6.32[c]||6.M.20&&a.23==I}25(e){}v N},55:q(r,b){u c=r.3E("6k-G");u a=!b&&c&&c.J("4B")>=0;a=b=="4B"||a?r.6j:r.3c;7(b=="3b")6.3I(a);7(b=="4N")a=49("("+a+")");7(b=="3F")6("<1x>").3F(a).3J();v a},2E:q(a){u s=[];7(a.15==2b||a.3C)6.F(a,q(){s.R(2l(9.6i)+"="+2l(9.2v))});B E(u j V a)7(a[j]&&a[j].15==2b)6.F(a[j],q(){s.R(2l(j)+"="+2l(9))});B s.R(2l(j)+"="+2l(a[j]));v s.5M("&")},3I:q(a){7(18.4A)18.4A(a);B 7(6.M.20)18.4C(a,0);B 49.3D(18,a)}});6.11.1c({1m:q(b,a){v b?9.1w({1u:"1m",29:"1m",1e:"1m"},b,a):9.1i(":1y").F(q(){9.T.U=9.2i?9.2i:"";7(6.1f(9,"U")=="1P")9.T.U="2h"}).2U()},1j:q(b,a){v b?9.1w({1u:"1j",29:"1j",1e:"1j"},b,a):9.1i(":4f").F(q(){9.2i=9.2i||6.1f(9,"U");7(9.2i=="1P")9.2i="2h";9.T.U="1P"}).2U()},5G:6.11.1R,1R:q(a,b){v 6.16(a)&&6.16(b)?9.5G(a,b):a?9.1w({1u:"1R",29:"1R",1e:"1R"},a,b):9.F(q(){6(9)[6(9).37(":1y")?"1m":"1j"]()})},6e:q(b,a){v 9.1w({1u:"1m"},b,a)},6d:q(b,a){v 9.1w({1u:"1j"},b,a)},6b:q(b,a){v 9.1w({1u:"1R"},b,a)},6a:q(b,a){v 9.1w({1e:"1m"},b,a)},69:q(b,a){v 9.1w({1e:"1j"},b,a)},7U:q(c,a,b){v 9.1w({1e:a},c,b)},1w:q(d,h,f,g){v 9.1l(q(){u c=6(9).37(":1y"),1H=6.5z(h,f,g),5y=9;E(u p V d){7(d[p]=="1j"&&c||d[p]=="1m"&&!c)v 6.16(1H.1n)&&1H.1n.O(9);7(p=="1u"||p=="29"){1H.U=6.1f(9,"U");1H.2f=9.T.2f}}7(1H.2f!=H)9.T.2f="1y";9.2k=6.1c({},d);6.F(d,q(a,b){u e=14 6.2M(5y,1H,a);7(b.15==3y)e.2W(e.1K(),b);B e[b=="1R"?c?"1m":"1j":b](d)})})},1l:q(a,b){7(!b){b=a;a="2M"}v 9.F(q(){7(!9.1l)9.1l={};7(!9.1l[a])9.1l[a]=[];9.1l[a].R(b);7(9.1l[a].C==1)b.O(9)})}});6.1c({5z:q(b,a,c){u d=b&&b.15==64?b:{1n:c||!c&&a||6.16(b)&&b,1B:b,2I:c&&a||a&&a.15!=45&&a||(6.2I.4i?"4i":"4w")};d.1B=(d.1B&&d.1B.15==3y?d.1B:{61:60,89:5u}[d.1B])||8a;d.2N=d.1n;d.1n=q(){6.5I(9,"2M");7(6.16(d.2N))d.2N.O(9)};v d},2I:{4w:q(p,n,b,a){v b+a*p},4i:q(p,n,b,a){v((-5W.5X(p*5W.8e)/2)+0.5)*a+b}},1l:{},5I:q(b,a){a=a||"2M";7(b.1l&&b.1l[a]){b.1l[a].4e();u f=b.1l[a][0];7(f)f.O(b)}},3B:[],2M:q(f,e,g){u z=9;u y=f.T;z.a=q(){7(e.3A)e.3A.O(f,[z.2o]);7(g=="1e")6.1b(y,"1e",z.2o);B{y[g]=8m(z.2o)+"4o";y.U="2h"}};z.5V=q(){v 39(6.1f(f,g))};z.1K=q(){u r=39(6.2z(f,g));v r&&r>-8l?r:z.5V()};z.2W=q(c,b){z.4s=(14 5T()).5S();z.2o=c;z.a();6.3B.R(q(){v z.3A(c,b)});7(6.3B.C==1){u d=3m(q(){u a=6.3B;E(u i=0;ie.1B+z.4s){z.2o=c;z.a();7(f.2k)f.2k[g]=K;u b=K;E(u i V f.2k)7(f.2k[i]!==K)b=N;7(b){7(e.U!=H){y.2f=e.2f;y.U=e.U;7(6.1f(f,"U")=="1P")y.U="2h"}7(e.1j)y.U="1P";7(e.1j||e.1m)E(u p V f.2k)6.1b(y,p,f.24[p])}7(b&&6.16(e.1n))e.1n.O(f);v N}B{u n=t-9.4s;u p=n/e.1B;z.2o=6.2I[e.2I](p,n,a,(c-a),e.1B);z.a()}v K}}})}',62,524,'||||||jQuery|if||this|||||||||||||||||function||||var|return||||||else|length||for|each|type|null|undefined|indexOf|true|parentNode|browser|false|apply|document|nodeName|push|event|style|display|in|data||global|||fn|className||new|constructor|isFunction|test|window|arguments|events|attr|extend|firstChild|opacity|css|typeof|msie|filter|hide|mergeNum|queue|show|complete|replace|handle|nodeType|table|string|trigger|height|while|animate|div|hidden|tbody|add|duration|url|toUpperCase|remove|break|ready|opt|_|button|cur|find|get|tb|target|none|guid|toggle|args|merge|styleFloat|exec|load|nextSibling|ret|pushStack|safari|timeout|nth|status|orig|catch|al|innerHTML|success|width|opera|Array|error|preventDefault|rl|overflow|try|block|oldblock|done|curAnim|encodeURIComponent|id||now|index|readyList|disabled|grep|ifModified|src|value|inArray|multiFilter|select|curCSS|text|checked|trim|stopPropagation|param|domManip|substr|toLowerCase|easing|chars|insertBefore|makeArray|fx|old|ownerDocument|last|first|split|childNodes|selected|end|tr|custom|handleError|empty|ajax|el|clean|lastModified|String|form|getAttribute|ajaxSettings|is|async|parseFloat|readyState|script|responseText|isReady|append|defaultView|bind|which|position|mozilla|map|delete|setInterval|static|RegExp|oWidth|removeChild|oHeight|cloneNode|match|child|toString|has|float|Number|unload|step|timers|jquery|call|getResponseHeader|html|dataType|props|globalEval|evalScripts|GET|active|clearInterval|safariTimer|Modified|num|setRequestHeader|getElementsByTagName|currentStyle|__ie_init|unbind|mouseover|handleHover|init|getComputedStyle|one|isXMLDoc|relatedTarget|fix|removeEventListener|handler|Function|addEventListener|triggered|visibility|eval|nodeIndex|radio|classFilter|getElementById|shift|visible|appendChild|documentElement|swing|fromElement|submit|file|swap|expr|px|parents|sibling|00|startTime|previousSibling|lastToggle|parent|linear|ol|body|tagName|execScript|xml|setTimeout|version|setArray|httpNotModified|fl|prop|ajaxStop|XMLHttpRequest|processData|alpha|href|json|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxComplete|ajaxStart|getScript|notmodified|colgroup|100|not|ActiveXObject|POST|slice|fieldset|Last|httpSuccess|httpData|beforeSend|getPropertyValue|DOMContentLoaded|mouseout|click|ctrlKey|metaKey|keyCode|charCode|scrollTop|unique|createElement|scrollLeft|clientX|pageX|webkit|304|srcElement|appendTo|unshift|prevObject|on|after|before|200|removeAttr|prepend|cssFloat|self|speed|parse|input|reset|image|password|checkbox|_toggle|textContent|dequeue|lastChild|odd|even|join|contains|gt|lt|eq|nodeValue|getTime|Date|zoom|max|Math|cos|font|maxLength|600|slow|maxlength|readOnly|Object|readonly|createTextNode|class|htmlFor|fadeOut|fadeIn|slideToggle|CSS1Compat|slideUp|slideDown|compatMode|boxModel|compatible|name|responseXML|content|300|ie|noConflict|ra|send|it|abort|rv|userAgent|navigator|concat|With|Requested|GMT|1970|Jan|01|Thu|Since|reverse|If|Type|Content|array|XMLHTTP|ig|Microsoft|NaN|urlencoded|www|application|ajaxSetup|val|ajaxTimeout|post|setAttribute|getJSON|getAttributeNode|getIfModified|method|FORM|action|options|serialize|col|th|td|loadIfModified|do|colg|loaded|tfoot|open|thead|onreadystatechange|defer|ipt|leg|scr|write|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|dblclick|scroll|resize|focus|blur|frames|hover|clone|clientY|pageY|location|protocol|toElement|clientWidth|clientHeight|cancelBubble|relative|returnValue|left|detachEvent|right|absolute|attachEvent|substring|offsetWidth|object|offsetHeight|continue|Width|border|fadeTo|padding|size|uFFFF|Left|u0128|Right|Bottom|textarea|Top|enabled|innerText|only|toggleClass|removeClass|fast|400|wrap|addClass|removeAttribute|PI|insertAfter|prependTo|children|line|splice|siblings|10000|parseInt|prev|next|weight|1px|prototype'.split('|'),0,{})) \ No newline at end of file diff --git a/main/inc/lib/javascript/jquery.history_remote.pack.js b/main/inc/lib/javascript/jquery.history_remote.pack.js new file mode 100755 index 0000000000..5ae39f32b7 --- /dev/null +++ b/main/inc/lib/javascript/jquery.history_remote.pack.js @@ -0,0 +1,14 @@ +/** + * History/Remote - jQuery plugin for enabling history support and bookmarking + * @requires jQuery v1.0.3 + * + * http://stilbuero.de/jquery/history/ + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Version: 0.2.3 + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?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}('(2($){$.D=16 2(){4 c=\'15\';4 k=7.6;4 d=z;4 g;5.o=2(){};4 h=2(){$(\'.x-R\').1i()};$(8).K(c,h);3($.v.19){4 e,p=q;$(2(){e=$(\'\').E(8.U).1o(0);4 a=e.C.8;a.P();a.M();3(k&&k!=\'#\'){a.7.6=k.B(\'#\',\'\')}});5.o=2(a){k=a;4 b=e.C.8;b.P();b.M();b.7.6=a.B(\'#\',\'\')};g=2(){4 a=e.C.8;4 b=a.7.6;3(b!=k){k=b;3(b&&b!=\'#\'){$(\'a[@l$="\'+b+\'"]\').m();7.6=b}n 3(p){7.6=\'\';$(8).u(c)}}p=A}}n 3($.v.18||$.v.17){5.o=2(a){k=a};g=2(){3(7.6){3(k!=7.6){k=7.6;$(\'a[@l$="\'+k+\'"]\').m()}}n 3(k){k=\'\';$(8).u(c)}}}n 3($.v.14){4 f,r,t;$(2(){f=[];f.9=y.9;r=[]});4 j=q,p=q;t=2(a){f.G(a);r.9=0;j=q};5.o=2(a){k=a;t(k)};g=2(){4 b=y.9-f.9;3(b){j=q;3(b<0){F(4 i=0;i<11.10(b);i++)r.Y(f.X())}n{F(4 i=0;i=0){$(\'a[@l$="\'+\'#\'+8.S.1m(\'#\')[1]+\'"]\').m()}n 3(p){$(8).u(c)}j=A}p=A}}5.1l=2(a){3(w a==\'2\'){$(8).1k(c,h).K(c,a)}3(7.6&&w t==\'T\'){$(\'a[@l$="\'+7.6+\'"]\').u(\'m\')}3(g&&d==z){d=1j(g,1h)}}};$.Q.x=2(g,f,c){c=c||2(){};3(w f==\'2\'){c=f}f=$.1g({O:\'x-\'},f||{});4 d=$(g).1f()&&$(g)||$(\'\').E(\'U\');d.1e(\'x-R\');L 5.1d(2(i){4 a=5.l;4 b=\'#\'+(5.N&&5.N.B(/\\s/g,\'1c\')||f.O+(i+1));5.l=b;$(5).m(2(e){3(!d[\'J\']){3(e.V){$.D.o(b)}d.1b(a,2(){d[\'J\']=z;c()})}})})};$.Q.y=2(a){L 5.m(2(e){3(e.V){$.D.o(5.6)}w a==\'2\'&&a()})}})(1a);',62,87,'||function|if|var|this|hash|location|document|length||||||||||||href|click|else|update|initialized|false|_forwardStack||_addHistory|trigger|browser|typeof|remote|history|null|true|replace|contentWindow|ajaxHistory|appendTo|for|push|iframe|div|locked|bind|return|close|title|hashPrefix|open|fn|output|URL|undefined|body|clientX|shift|pop|unshift|none|abs|Math|display|style|safari|historyReset|new|opera|mozilla|msie|jQuery|load|_|each|addClass|size|extend|200|empty|setInterval|unbind|initialize|split|indexOf|get'.split('|'),0,{})) \ No newline at end of file diff --git a/main/inc/lib/javascript/jquery.tabs-ie.css b/main/inc/lib/javascript/jquery.tabs-ie.css new file mode 100755 index 0000000000..b0dd7f4ec6 --- /dev/null +++ b/main/inc/lib/javascript/jquery.tabs-ie.css @@ -0,0 +1,20 @@ +/* +Tabs - additional IE specific bug fixes + +Recommended usage (Conditional Comments): + + +*/ +.tabs-nav { /* auto clear */ + display: inline-block; +} +.tabs-nav .tabs-disabled { + position: relative; /* fixes opacity */ + filter: alpha(opacity=40); +} +.tabs-nav .tabs-disabled a span { + _height: 19px; /* for some reason the height is 1px to less with opacity... */ + min-height: 19px; /* ...in both IE 6 and 7 */ +} diff --git a/main/inc/lib/javascript/jquery.tabs.css b/main/inc/lib/javascript/jquery.tabs.css new file mode 100755 index 0000000000..281e80b6ed --- /dev/null +++ b/main/inc/lib/javascript/jquery.tabs.css @@ -0,0 +1,97 @@ +/* Caution! Ensure accessibility in print and other media types... */ +@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */ + .tabs-hide { + display: none; + } +} + +/* Hide useless elements in print layouts... */ +@media print { + .tabs-nav { + display: none; + } +} + +/* Skin */ +.tabs-nav { + list-style: none; + margin: 0; + padding: 0 0 0 4px; +} +.tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */ + display: block; + clear: both; + content: " "; +} +.tabs-nav li { + float: left; + margin: 0 0 0 1px; + min-width: 84px; /* be nice to Opera */ +} +.tabs-nav a, .tabs-nav a span { + display: block; + padding: 0 10px; + background: url(tab.png) no-repeat; +} +.tabs-nav a { + position: relative; + top: 1px; + z-index: 2; + padding-left: 0; + color: #27537a; + font-size: 12px; + font-weight: bold; + line-height: 1.2; + text-align: center; + text-decoration: none; + white-space: nowrap; /* required in IE 6 */ +} +.tabs-nav .tabs-selected a { + color: #000; +} +.tabs-nav .tabs-selected a, .tabs-nav a:hover, .tabs-nav a:focus, .tabs-nav a:active { + background-position: 100% -150px; + outline: 0; /* prevent dotted border in Firefox */ +} +.tabs-nav a, .tabs-nav .tabs-disabled a:hover, .tabs-nav .tabs-disabled a:focus, .tabs-nav .tabs-disabled a:active { + background-position: 100% -100px; +} +.tabs-nav a span { + width: 64px; /* IE 6 treats width as min-width */ + min-width: 64px; + height: 18px; /* IE 6 treats height as min-height */ + min-height: 18px; + padding-top: 6px; + padding-right: 0; +} +*>.tabs-nav a span { /* hide from IE 6 */ + width: auto; + height: auto; +} +.tabs-nav .tabs-selected a span { + padding-top: 7px; +} +.tabs-nav .tabs-selected a span, .tabs-nav a:hover span, .tabs-nav a:focus span, .tabs-nav a:active span { + background-position: 0 -50px; +} +.tabs-nav a span, .tabs-nav .tabs-disabled a:hover span, .tabs-nav .tabs-disabled a:focus span, .tabs-nav .tabs-disabled a:active span { + background-position: 0 0; +} +.tabs-nav .tabs-selected a:link, .tabs-nav .tabs-selected a:visited, .tabs-nav .tabs-disabled a:link, .tabs-nav .tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */ + cursor: text; +} +.tabs-nav a:hover, .tabs-nav a:focus, .tabs-nav a:active { /* @ Opera, we need to be explicit again here now... */ + cursor: pointer; +} +.tabs-nav .tabs-disabled { + opacity: .4; +} +.tabs-container { + border-top: 1px solid #97a5b0; + padding: 1em 8px; + background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */ +} +.tabs-loading em { + padding: 0 0 0 20px; + background: url(loading.gif) no-repeat 0 50%; +} diff --git a/main/inc/lib/javascript/jquery.tabs.js b/main/inc/lib/javascript/jquery.tabs.js new file mode 100755 index 0000000000..cd68cf2e1e --- /dev/null +++ b/main/inc/lib/javascript/jquery.tabs.js @@ -0,0 +1,642 @@ +/** + * Tabs - jQuery plugin for accessible, unobtrusive tabs + * @requires jQuery v1.1.1 + * + * http://stilbuero.de/tabs/ + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Version: 2.7.4 + */ + +(function($) { // block scope + +$.extend({ + tabs: { + remoteCount: 0 // TODO in Tabs 3 this is going to be more cleanly in one single namespace + } +}); + +/** + * Create an accessible, unobtrusive tab interface based on a particular HTML structure. + * + * The underlying HTML has to look like this: + * + *
+ * + *
+ * + *
+ *
+ * + *
+ *
+ * + *
+ *
+ * + * Each anchor in the unordered list points directly to a section below represented by one of the + * divs (the URI in the anchor's href attribute refers to the fragment with the corresponding id). + * Because such HTML structure is fully functional on its own, e.g. without JavaScript, the tab + * interface is accessible and unobtrusive. + * + * A tab is also bookmarkable via hash in the URL. Use the History/Remote plugin (Tabs will + * auto-detect its presence) to fix the back (and forward) button. + * + * @example $('#container').tabs(); + * @desc Create a basic tab interface. + * @example $('#container').tabs(2); + * @desc Create a basic tab interface with the second tab initially activated. + * @example $('#container').tabs({disabled: [3, 4]}); + * @desc Create a tab interface with the third and fourth tab being disabled. + * @example $('#container').tabs({fxSlide: true}); + * @desc Create a tab interface that uses slide down/up animations for showing/hiding tab + * content upon tab switching. + * + * @param Number initial An integer specifying the position of the tab (no zero-based index) that + * gets activated at first (on page load). Two alternative ways to specify + * the active tab will overrule this argument. First a li element + * (representing one single tab) belonging to the selected tab class, e.g. + * set the selected tab class (default: "tabs-selected", see option + * selectedClass) for one of the unordered li elements in the HTML source. + * In addition if a fragment identifier/hash in the URL of the page refers + * to the id of a tab container of a tab interface the corresponding tab will + * be activated and both the initial argument as well as an eventually + * declared class attribute will be overruled. Defaults to 1 if omitted. + * @param Object settings An object literal containing key/value pairs to provide optional settings. + * @option Array disabled An array containing the position of the tabs (no zero-based index) + * that should be disabled on initialization. Default value: null. + * A tab can also be disabled by simply adding the disabling class + * (default: "tabs-disabled", see option disabledClass) to the li + * element representing that particular tab. + * @option Boolean bookmarkable Boolean flag indicating if support for bookmarking and history (via + * changing hash in the URL of the browser) is enabled. Default value: + * false, unless the History/Remote plugin is included. In that case the + * default value becomes true. @see $.ajaxHistory.initialize + * @option Boolean remote Boolean flag indicating that tab content has to be loaded remotely from + * the url given in the href attribute of the tab menu anchor elements. + * @option String spinner The content of this string is shown in a tab while remote content is loading. + * Insert plain text as well as an img here. To turn off this notification + * pass an empty string or null. Default: "Loading…". + * @option String hashPrefix A String that is used for constructing the hash the link's href attribute + * of a remote tab gets altered to, such as "#remote-1". + * Default value: "remote-tab-". + * @option Boolean fxFade Boolean flag indicating whether fade in/out animations are used for tab + * switching. Can be combined with fxSlide. Will overrule fxShow/fxHide. + * Default value: false. + * @option Boolean fxSlide Boolean flag indicating whether slide down/up animations are used for tab + * switching. Can be combined with fxFade. Will overrule fxShow/fxHide. + * Default value: false. + * @option String|Number fxSpeed A string representing one of the three predefined speeds ("slow", + * "normal", or "fast") or the number of milliseconds (e.g. 1000) to + * run an animation. Default value: "normal". + * @option Object fxShow An object literal of the form jQuery's animate function expects for making + * your own, custom animation to reveal a tab upon tab switch. Unlike fxFade + * or fxSlide this animation is independent from an optional hide animation. + * Default value: null. @see animate + * @option Object fxHide An object literal of the form jQuery's animate function expects for making + * your own, custom animation to hide a tab upon tab switch. Unlike fxFade + * or fxSlide this animation is independent from an optional show animation. + * Default value: null. @see animate + * @option String|Number fxShowSpeed A string representing one of the three predefined speeds + * ("slow", "normal", or "fast") or the number of milliseconds + * (e.g. 1000) to run the animation specified in fxShow. + * Default value: fxSpeed. + * @option String|Number fxHideSpeed A string representing one of the three predefined speeds + * ("slow", "normal", or "fast") or the number of milliseconds + * (e.g. 1000) to run the animation specified in fxHide. + * Default value: fxSpeed. + * @option Boolean fxAutoHeight Boolean flag that if set to true causes all tab heights + * to be constant (being the height of the tallest tab). + * Default value: false. + * @option Function onClick A function to be invoked upon tab switch, immediatly after a tab has + * been clicked, e.g. before the other's tab content gets hidden. The + * function gets passed three arguments: the first one is the clicked + * tab (e.g. an anchor element), the second one is the DOM element + * containing the content of the clicked tab (e.g. the div), the third + * argument is the one of the tab that gets hidden. If this callback + * returns false, the tab switch is canceled (use to disallow tab + * switching for the reason of a failed form validation for example). + * Default value: null. + * @option Function onHide A function to be invoked upon tab switch, immediatly after one tab's + * content got hidden (with or without an animation) and right before the + * next tab is revealed. The function gets passed three arguments: the + * first one is the clicked tab (e.g. an anchor element), the second one + * is the DOM element containing the content of the clicked tab, (e.g. the + * div), the third argument is the one of the tab that gets hidden. + * Default value: null. + * @option Function onShow A function to be invoked upon tab switch. This function is invoked + * after the new tab has been revealed, e.g. after the switch is completed. + * The function gets passed three arguments: the first one is the clicked + * tab (e.g. an anchor element), the second one is the DOM element + * containing the content of the clicked tab, (e.g. the div), the third + * argument is the one of the tab that gets hidden. Default value: null. + * @option String navClass A CSS class that is used to identify the tabs unordered list by class if + * the required HTML structure differs from the default one. + * Default value: "tabs-nav". + * @option String selectedClass The CSS class attached to the li element representing the + * currently selected (active) tab. Default value: "tabs-selected". + * @option String disabledClass The CSS class attached to the li element representing a disabled + * tab. Default value: "tabs-disabled". + * @option String containerClass A CSS class that is used to identify tab containers by class if + * the required HTML structure differs from the default one. + * Default value: "tabs-container". + * @option String hideClass The CSS class used for hiding inactive tabs. A class is used instead + * of "display: none" in the style attribute to maintain control over + * visibility in other media types than screen, most notably print. + * Default value: "tabs-hide". + * @option String loadingClass The CSS class used for indicating that an Ajax tab is currently + * loading, for example by showing a spinner. + * Default value: "tabs-loading". + * @option String tabStruct @deprecated A CSS selector or basic XPath expression reflecting a + * nested HTML structure that is different from the default single div + * structure (one div with an id inside the overall container holds one + * tab's content). If for instance an additional div is required to wrap + * up the several tab containers such a structure is expressed by "div>div". + * Default value: "div". + * @type jQuery + * + * @name tabs + * @cat Plugins/Tabs + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ +$.fn.tabs = function(initial, settings) { + + // settings + if (typeof initial == 'object') settings = initial; // no initial tab given but a settings object + settings = $.extend({ + initial: (initial && typeof initial == 'number' && initial > 0) ? --initial : 0, + disabled: null, + bookmarkable: $.ajaxHistory ? true : false, + remote: false, + spinner: 'Loading…', + hashPrefix: 'remote-tab-', + fxFade: null, + fxSlide: null, + fxShow: null, + fxHide: null, + fxSpeed: 'normal', + fxShowSpeed: null, + fxHideSpeed: null, + fxAutoHeight: false, + onClick: null, + onHide: null, + onShow: null, + navClass: 'tabs-nav', + selectedClass: 'tabs-selected', + disabledClass: 'tabs-disabled', + containerClass: 'tabs-container', + hideClass: 'tabs-hide', + loadingClass: 'tabs-loading', + tabStruct: 'div' + }, settings || {}); + + $.browser.msie6 = $.browser.msie && ($.browser.version && $.browser.version < 7 || /MSIE 6.0/.test(navigator.userAgent)); // do not check for 6.0 alone, userAgent in Windows Vista has "Windows NT 6.0" + + // helper to prevent scroll to fragment + function unFocus() { + scrollTo(0, 0); + } + + // initialize tabs + return this.each(function() { + + // remember wrapper for later + var container = this; + + // setup nav + var nav = $('ul.' + settings.navClass, container); + nav = nav.size() && nav || $('>ul:eq(0)', container); // fallback to default structure + var tabs = $('a', nav); + + // prepare remote tabs + if (settings.remote) { + tabs.each(function() { + var id = settings.hashPrefix + (++$.tabs.remoteCount), hash = '#' + id, url = this.href; + this.href = hash; + $('
').appendTo(container); + + $(this).bind('loadRemoteTab', function(e, callback) { + var $$ = $(this).addClass(settings.loadingClass), span = $('span', this)[0], tabTitle = span.innerHTML; + if (settings.spinner) { + // TODO if spinner is image + span.innerHTML = '' + settings.spinner + ''; // WARNING: html(...) crashes Safari with jQuery 1.1.2 + } + setTimeout(function() { // Timeout is again required in IE, "wait" for id being restored + $(hash).load(url, function() { + if (settings.spinner) { + span.innerHTML = tabTitle; // WARNING: html(...) crashes Safari with jQuery 1.1.2 + } + $$.removeClass(settings.loadingClass); + callback && callback(); + }); + }, 0); + }); + + }); + } + + // set up containers + var containers = $('div.' + settings.containerClass, container); + containers = containers.size() && containers || $('>' + settings.tabStruct, container); // fallback to default structure + + // attach classes for styling if not present + nav.is('.' + settings.navClass) || nav.addClass(settings.navClass); + containers.each(function() { + var $$ = $(this); + $$.is('.' + settings.containerClass) || $$.addClass(settings.containerClass); + }); + + // try to retrieve active tab from class in HTML + var hasSelectedClass = $('li', nav).index( $('li.' + settings.selectedClass, nav)[0] ); + if (hasSelectedClass >= 0) { + settings.initial = hasSelectedClass; + } + + // try to retrieve active tab from hash in url, will override class in HTML + if (location.hash) { + tabs.each(function(i) { + if (this.hash == location.hash) { + settings.initial = i; + // prevent page scroll to fragment + if (($.browser.msie || $.browser.opera) && !settings.remote) { + var toShow = $(location.hash); + var toShowId = toShow.attr('id'); + toShow.attr('id', ''); + setTimeout(function() { + toShow.attr('id', toShowId); // restore id + }, 500); + } + unFocus(); + return false; // break + } + }); + } + if ($.browser.msie) { + unFocus(); // fix IE focussing bottom of the page for some unknown reason + } + + // highlight tab accordingly + containers.filter(':eq(' + settings.initial + ')').show().end().not(':eq(' + settings.initial + ')').addClass(settings.hideClass); + $('li', nav).removeClass(settings.selectedClass).eq(settings.initial).addClass(settings.selectedClass); // we need to remove classes eventually if hash takes precedence over class + // trigger load of initial tab + tabs.eq(settings.initial).trigger('loadRemoteTab').end(); + + // setup auto height + if (settings.fxAutoHeight) { + // helper + var _setAutoHeight = function(reset) { + // get tab heights in top to bottom ordered array + var heights = $.map(containers.get(), function(el) { + var h, jq = $(el); + if (reset) { + if ($.browser.msie6) { + el.style.removeExpression('behaviour'); + el.style.height = ''; + el.minHeight = null; + } + h = jq.css({'min-height': ''}).height(); // use jQuery's height() to get hidden element values + } else { + h = jq.height(); // use jQuery's height() to get hidden element values + } + return h; + }).sort(function(a, b) { + return b - a; + }); + if ($.browser.msie6) { + containers.each(function() { + this.minHeight = heights[0] + 'px'; + this.style.setExpression('behaviour', 'this.style.height = this.minHeight ? this.minHeight : "1px"'); // using an expression to not make print styles useless + }); + } else { + containers.css({'min-height': heights[0] + 'px'}); + } + }; + // call once for initialization + _setAutoHeight(); + // trigger auto height adjustment if needed + var cachedWidth = container.offsetWidth; + var cachedHeight = container.offsetHeight; + var watchFontSize = $('#tabs-watch-font-size').get(0) || $('M').css({display: 'block', position: 'absolute', visibility: 'hidden'}).appendTo(document.body).get(0); + var cachedFontSize = watchFontSize.offsetHeight; + setInterval(function() { + var currentWidth = container.offsetWidth; + var currentHeight = container.offsetHeight; + var currentFontSize = watchFontSize.offsetHeight; + if (currentHeight > cachedHeight || currentWidth != cachedWidth || currentFontSize != cachedFontSize) { + _setAutoHeight((currentWidth > cachedWidth || currentFontSize < cachedFontSize)); // if heights gets smaller reset min-height + cachedWidth = currentWidth; + cachedHeight = currentHeight; + cachedFontSize = currentFontSize; + } + }, 50); + } + + // setup animations + var showAnim = {}, hideAnim = {}, showSpeed = settings.fxShowSpeed || settings.fxSpeed, hideSpeed = settings.fxHideSpeed || settings.fxSpeed; + if (settings.fxSlide || settings.fxFade) { + if (settings.fxSlide) { + showAnim['height'] = 'show'; + hideAnim['height'] = 'hide'; + } + if (settings.fxFade) { + showAnim['opacity'] = 'show'; + hideAnim['opacity'] = 'hide'; + } + } else { + if (settings.fxShow) { + showAnim = settings.fxShow; + } else { // use some kind of animation to prevent browser scrolling to the tab + showAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox + showSpeed = 1; // as little as 1 is sufficient + } + if (settings.fxHide) { + hideAnim = settings.fxHide; + } else { // use some kind of animation to prevent browser scrolling to the tab + hideAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox + hideSpeed = 1; // as little as 1 is sufficient + } + } + + // callbacks + var onClick = settings.onClick, onHide = settings.onHide, onShow = settings.onShow; + + // attach activateTab event, required for activating a tab programmatically + tabs.bind('triggerTab', function() { + + // if the tab is already selected or disabled or animation is still running stop here + var li = $(this).parents('li:eq(0)'); + if (container.locked || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass)) { + return false; + } + + var hash = this.hash; + + if ($.browser.msie) { + + $(this).trigger('click'); + if (settings.bookmarkable) { + $.ajaxHistory.update(hash); + location.hash = hash.replace('#', ''); + } + + } else if ($.browser.safari) { + + // Simply setting location.hash puts Safari into the eternal load state... ugh! Submit a form instead. + var tempForm = $('
').get(0); // no need to append it to the body + tempForm.submit(); // does not trigger the form's submit event... + $(this).trigger('click'); // ...thus do stuff here + if (settings.bookmarkable) { + $.ajaxHistory.update(hash); + } + + } else { + + if (settings.bookmarkable) { + location.hash = hash.replace('#', ''); + } else { + $(this).trigger('click'); + } + + } + + }); + + // attach disable event, required for disabling a tab + tabs.bind('disableTab', function() { + var li = $(this).parents('li:eq(0)'); + if ($.browser.safari) { /* fix opacity of tab after disabling in Safari... */ + li.animate({ opacity: 0 }, 1, function() { + li.css({opacity: ''}); + }); + } + li.addClass(settings.disabledClass); + + }); + + // disabled from settings + if (settings.disabled && settings.disabled.length) { + for (var i = 0, k = settings.disabled.length; i < k; i++) { + tabs.eq(--settings.disabled[i]).trigger('disableTab').end(); + } + }; + + // attach enable event, required for reenabling a tab + tabs.bind('enableTab', function() { + var li = $(this).parents('li:eq(0)'); + li.removeClass(settings.disabledClass); + if ($.browser.safari) { /* fix disappearing tab after enabling in Safari... */ + li.animate({ opacity: 1 }, 1, function() { + li.css({opacity: ''}); + }); + } + }); + + // attach click event + tabs.bind('click', function(e) { + + var trueClick = e.clientX; // add to history only if true click occured, not a triggered click + var clicked = this, li = $(this).parents('li:eq(0)'), toShow = $(this.hash), toHide = containers.filter(':visible'); + + // if animation is still running, tab is selected or disabled or onClick callback returns false stop here + // check if onClick returns false last so that it is not executed for a disabled tab + if (container['locked'] || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass) || typeof onClick == 'function' && onClick(this, toShow[0], toHide[0]) === false) { + this.blur(); + return false; + } + + container['locked'] = true; + + // show new tab + if (toShow.size()) { + + // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled + if ($.browser.msie && settings.bookmarkable) { + var toShowId = this.hash.replace('#', ''); + toShow.attr('id', ''); + setTimeout(function() { + toShow.attr('id', toShowId); // restore id + }, 0); + } + + var resetCSS = { display: '', overflow: '', height: '' }; + if (!$.browser.msie) { // not in IE to prevent ClearType font issue + resetCSS['opacity'] = ''; + } + + // switch tab, animation prevents browser scrolling to the fragment + function switchTab() { + if (settings.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click + $.ajaxHistory.update(clicked.hash); + } + toHide.animate(hideAnim, hideSpeed, function() { // + $(clicked).parents('li:eq(0)').addClass(settings.selectedClass).siblings().removeClass(settings.selectedClass); + toHide.addClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc. + if (typeof onHide == 'function') { + onHide(clicked, toShow[0], toHide[0]); + } + if (!(settings.fxSlide || settings.fxFade || settings.fxShow)) { + toShow.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab containers + } + toShow.animate(showAnim, showSpeed, function() { + toShow.removeClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc. + if ($.browser.msie) { + toHide[0].style.filter = ''; + toShow[0].style.filter = ''; + } + if (typeof onShow == 'function') { + onShow(clicked, toShow[0], toHide[0]); + } + container['locked'] = null; + }); + }); + } + + if (!settings.remote) { + switchTab(); + } else { + $(clicked).trigger('loadRemoteTab', [switchTab]); + } + + } else { + alert('There is no such container.'); + } + + // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash + var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0; + var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0; + setTimeout(function() { + window.scrollTo(scrollX, scrollY); + }, 0); + + this.blur(); // prevent IE from keeping other link focussed when using the back button + + return settings.bookmarkable && !!trueClick; // convert undefined to Boolean for IE + + }); + + // enable history support if bookmarking and history is turned on + if (settings.bookmarkable) { + $.ajaxHistory.initialize(function() { + tabs.eq(settings.initial).trigger('click').end(); + }); + } + + }); + +}; + +/** + * Activate a tab programmatically with the given position (no zero-based index) + * or its id, e.g. the URL's fragment identifier/hash representing a tab, as if the tab + * itself were clicked. + * + * @example $('#container').triggerTab(2); + * @desc Activate the second tab of the tab interface contained in
. + * @example $('#container').triggerTab(1); + * @desc Activate the first tab of the tab interface contained in
. + * @example $('#container').triggerTab(); + * @desc Activate the first tab of the tab interface contained in
. + * @example $('#container').triggerTab('fragment-2'); + * @desc Activate a tab via its URL fragment identifier representation. + * + * @param String|Number tab Either a string that matches the id of the tab (the URL's + * fragment identifier/hash representing a tab) or an integer + * specifying the position of the tab (no zero-based index) to + * be activated. If this parameter is omitted, the first tab + * will be activated. + * @type jQuery + * + * @name triggerTab + * @cat Plugins/Tabs + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +/** + * Disable a tab, so that clicking it has no effect. + * + * @example $('#container').disableTab(2); + * @desc Disable the second tab of the tab interface contained in
. + * + * @param String|Number tab Either a string that matches the id of the tab (the URL's + * fragment identifier/hash representing a tab) or an integer + * specifying the position of the tab (no zero-based index) to + * be disabled. If this parameter is omitted, the first tab + * will be disabled. + * @type jQuery + * + * @name disableTab + * @cat Plugins/Tabs + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +/** + * Enable a tab that has been disabled. + * + * @example $('#container').enableTab(2); + * @desc Enable the second tab of the tab interface contained in
. + * + * @param String|Number tab Either a string that matches the id of the tab (the URL's + * fragment identifier/hash representing a tab) or an integer + * specifying the position of the tab (no zero-based index) to + * be enabled. If this parameter is omitted, the first tab + * will be enabled. + * @type jQuery + * + * @name enableTab + * @cat Plugins/Tabs + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +var tabEvents = ['triggerTab', 'disableTab', 'enableTab']; +for (var i = 0; i < tabEvents.length; i++) { + $.fn[tabEvents[i]] = (function(tabEvent) { + return function(tab) { + return this.each(function() { + var nav = $('ul.tabs-nav' , this); + nav = nav.size() && nav || $('>ul:eq(0)', this); // fallback to default structure + var a; + if (!tab || typeof tab == 'number') { + a = $('li a', nav).eq((tab && tab > 0 && tab - 1 || 0)); // fall back to 0 + } else if (typeof tab == 'string') { + a = $('li a[@href$="#' + tab + '"]', nav); + } + a.trigger(tabEvent); + }); + }; + })(tabEvents[i]); +} + +/** + * Get the position of the currently selected tab (no zero-based index). + * + * @example $('#container').activeTab(); + * @desc Get the position of the currently selected tab of an interface + * contained in
. + * + * @type Number + * + * @name activeTab + * @cat Plugins/Tabs + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +$.fn.activeTab = function() { + var selectedTabs = []; + this.each(function() { + var nav = $('ul.tabs-nav' , this); + nav = nav.size() && nav || $('>ul:eq(0)', this); //fallback to default structure + var lis = $('li', nav); + selectedTabs.push(lis.index( lis.filter('.tabs-selected')[0] ) + 1); + }); + return selectedTabs[0]; +}; + +})(jQuery); \ No newline at end of file diff --git a/main/inc/lib/javascript/jquery.tabs.min.js b/main/inc/lib/javascript/jquery.tabs.min.js new file mode 100755 index 0000000000..674fc5cc33 --- /dev/null +++ b/main/inc/lib/javascript/jquery.tabs.min.js @@ -0,0 +1,14 @@ +/** + * Tabs - jQuery plugin for accessible, unobtrusive tabs + * @requires jQuery v1.1.1 + * + * http://stilbuero.de/tabs/ + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Version: 2.7.4 + */ +(function($){$.extend({tabs:{remoteCount:0}});$.fn.tabs=function(initial,settings){if(typeof initial=='object')settings=initial;settings=$.extend({initial:(initial&&typeof initial=='number'&&initial>0)?--initial:0,disabled:null,bookmarkable:$.ajaxHistory?true:false,remote:false,spinner:'Loading…',hashPrefix:'remote-tab-',fxFade:null,fxSlide:null,fxShow:null,fxHide:null,fxSpeed:'normal',fxShowSpeed:null,fxHideSpeed:null,fxAutoHeight:false,onClick:null,onHide:null,onShow:null,navClass:'tabs-nav',selectedClass:'tabs-selected',disabledClass:'tabs-disabled',containerClass:'tabs-container',hideClass:'tabs-hide',loadingClass:'tabs-loading',tabStruct:'div'},settings||{});$.browser.msie6=$.browser.msie&&($.browser.version&&$.browser.version<7||/MSIE 6.0/.test(navigator.userAgent));function unFocus(){scrollTo(0,0);}return this.each(function(){var container=this;var nav=$('ul.'+settings.navClass,container);nav=nav.size()&&nav||$('>ul:eq(0)',container);var tabs=$('a',nav);if(settings.remote){tabs.each(function(){var id=settings.hashPrefix+(++$.tabs.remoteCount),hash='#'+id,url=this.href;this.href=hash;$('
').appendTo(container);$(this).bind('loadRemoteTab',function(e,callback){var $$=$(this).addClass(settings.loadingClass),span=$('span',this)[0],tabTitle=span.innerHTML;if(settings.spinner){span.innerHTML=''+settings.spinner+'';}setTimeout(function(){$(hash).load(url,function(){if(settings.spinner){span.innerHTML=tabTitle;}$$.removeClass(settings.loadingClass);callback&&callback();});},0);});});}var containers=$('div.'+settings.containerClass,container);containers=containers.size()&&containers||$('>'+settings.tabStruct,container);nav.is('.'+settings.navClass)||nav.addClass(settings.navClass);containers.each(function(){var $$=$(this);$$.is('.'+settings.containerClass)||$$.addClass(settings.containerClass);});var hasSelectedClass=$('li',nav).index($('li.'+settings.selectedClass,nav)[0]);if(hasSelectedClass>=0){settings.initial=hasSelectedClass;}if(location.hash){tabs.each(function(i){if(this.hash==location.hash){settings.initial=i;if(($.browser.msie||$.browser.opera)&&!settings.remote){var toShow=$(location.hash);var toShowId=toShow.attr('id');toShow.attr('id','');setTimeout(function(){toShow.attr('id',toShowId);},500);}unFocus();return false;}});}if($.browser.msie){unFocus();}containers.filter(':eq('+settings.initial+')').show().end().not(':eq('+settings.initial+')').addClass(settings.hideClass);$('li',nav).removeClass(settings.selectedClass).eq(settings.initial).addClass(settings.selectedClass);tabs.eq(settings.initial).trigger('loadRemoteTab').end();if(settings.fxAutoHeight){var _setAutoHeight=function(reset){var heights=$.map(containers.get(),function(el){var h,jq=$(el);if(reset){if($.browser.msie6){el.style.removeExpression('behaviour');el.style.height='';el.minHeight=null;}h=jq.css({'min-height':''}).height();}else{h=jq.height();}return h;}).sort(function(a,b){return b-a;});if($.browser.msie6){containers.each(function(){this.minHeight=heights[0]+'px';this.style.setExpression('behaviour','this.style.height = this.minHeight ? this.minHeight : "1px"');});}else{containers.css({'min-height':heights[0]+'px'});}};_setAutoHeight();var cachedWidth=container.offsetWidth;var cachedHeight=container.offsetHeight;var watchFontSize=$('#tabs-watch-font-size').get(0)||$('M').css({display:'block',position:'absolute',visibility:'hidden'}).appendTo(document.body).get(0);var cachedFontSize=watchFontSize.offsetHeight;setInterval(function(){var currentWidth=container.offsetWidth;var currentHeight=container.offsetHeight;var currentFontSize=watchFontSize.offsetHeight;if(currentHeight>cachedHeight||currentWidth!=cachedWidth||currentFontSize!=cachedFontSize){_setAutoHeight((currentWidth>cachedWidth||currentFontSize
').get(0);tempForm.submit();$(this).trigger('click');if(settings.bookmarkable){$.ajaxHistory.update(hash);}}else{if(settings.bookmarkable){location.hash=hash.replace('#','');}else{$(this).trigger('click');}}});tabs.bind('disableTab',function(){var li=$(this).parents('li:eq(0)');if($.browser.safari){li.animate({opacity:0},1,function(){li.css({opacity:''});});}li.addClass(settings.disabledClass);});if(settings.disabled&&settings.disabled.length){for(var i=0,k=settings.disabled.length;iul:eq(0)',this);var a;if(!tab||typeof tab=='number'){a=$('li a',nav).eq((tab&&tab>0&&tab-1||0));}else if(typeof tab=='string'){a=$('li a[@href$="#'+tab+'"]',nav);}a.trigger(tabEvent);});};})(tabEvents[i]);}$.fn.activeTab=function(){var selectedTabs=[];this.each(function(){var nav=$('ul.tabs-nav',this);nav=nav.size()&&nav||$('>ul:eq(0)',this);var lis=$('li',nav);selectedTabs.push(lis.index(lis.filter('.tabs-selected')[0])+1);});return selectedTabs[0];};})(jQuery); \ No newline at end of file diff --git a/main/inc/lib/javascript/jquery.tabs.pack.js b/main/inc/lib/javascript/jquery.tabs.pack.js new file mode 100755 index 0000000000..e958e76b51 --- /dev/null +++ b/main/inc/lib/javascript/jquery.tabs.pack.js @@ -0,0 +1,14 @@ +/** + * Tabs - jQuery plugin for accessible, unobtrusive tabs + * @requires jQuery v1.1.1 + * + * http://stilbuero.de/tabs/ + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Version: 2.7.4 + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?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}('(4($){$.2l({z:{2k:0}});$.1P.z=4(x,w){3(O x==\'2Y\')w=x;w=$.2l({K:(x&&O x==\'1Z\'&&x>0)?--x:0,12:C,J:$.1f?2h:T,18:T,1r:\'2XQ;\',21:\'18-2F-\',1m:C,1u:C,1l:C,1F:C,1x:\'2u\',2r:C,2p:C,2m:T,2i:C,1d:C,1c:C,1j:\'z-1M\',H:\'z-2b\',14:\'z-12\',16:\'z-26\',1q:\'z-1H\',1L:\'z-2L\',2j:\'10\'},w||{});$.8.1D=$.8.U&&($.8.1Y&&$.8.1Y<7||/2A 6.0/.2y(2x.2w));4 1w(){1V(0,0)}F 5.Y(4(){2 p=5;2 r=$(\'13.\'+w.1j,p);r=r.V()&&r||$(\'>13:9(0)\',p);2 j=$(\'a\',r);3(w.18){j.Y(4(){2 c=w.21+(++$.z.2k),B=\'#\'+c,2f=5.1O;5.1O=B;$(\'<10 S="\'+c+\'" 34="\'+w.16+\'">\').2c(p);$(5).19(\'1B\',4(e,a){2 b=$(5).I(w.1L),X=$(\'X\',5)[0],27=X.1J;3(w.1r){X.1J=\'<24>\'+w.1r+\'\'}1p(4(){$(B).2T(2f,4(){3(w.1r){X.1J=27}b.17(w.1L);a&&a()})},0)})})}2 n=$(\'10.\'+w.16,p);n=n.V()&&n||$(\'>\'+w.2j,p);r.P(\'.\'+w.1j)||r.I(w.1j);n.Y(4(){2 a=$(5);a.P(\'.\'+w.16)||a.I(w.16)});2 s=$(\'A\',r).20($(\'A.\'+w.H,r)[0]);3(s>=0){w.K=s}3(1e.B){j.Y(4(i){3(5.B==1e.B){w.K=i;3(($.8.U||$.8.2E)&&!w.18){2 a=$(1e.B);2 b=a.15(\'S\');a.15(\'S\',\'\');1p(4(){a.15(\'S\',b)},2D)}1w();F T}})}3($.8.U){1w()}n.1a(\':9(\'+w.K+\')\').1C().1n().2C(\':9(\'+w.K+\')\').I(w.1q);$(\'A\',r).17(w.H).9(w.K).I(w.H);j.9(w.K).N(\'1B\').1n();3(w.2m){2 l=4(d){2 c=$.2B(n.1t(),4(a){2 h,1A=$(a);3(d){3($.8.1D){a.Z.2z(\'1X\');a.Z.G=\'\';a.1k=C}h=1A.L({\'1h-G\':\'\'}).G()}E{h=1A.G()}F h}).2v(4(a,b){F b-a});3($.8.1D){n.Y(4(){5.1k=c[0]+\'1W\';5.Z.2t(\'1X\',\'5.Z.G = 5.1k ? 5.1k : "2s"\')})}E{n.L({\'1h-G\':c[0]+\'1W\'})}};l();2 q=p.1U;2 m=p.1v;2 v=$(\'#z-2q-2o-V\').1t(0)||$(\'M\').L({1T:\'2n\',3a:\'39\',38:\'37\'}).2c(Q.1S).1t(0);2 o=v.1v;36(4(){2 b=p.1U;2 a=p.1v;2 c=v.1v;3(a>m||b!=q||c!=o){l((b>q||c<10><32 31="2a" 30="h" />\').1t(0);b.2a();$(5).N(\'1b\');3(w.J){$.1f.1N(a)}}E{3(w.J){1e.B=a.1z(\'#\',\'\')}E{$(5).N(\'1b\')}}});j.19(\'1E\',4(){2 a=$(5).1g(\'A:9(0)\');3($.8.1y){a.1o({W:0},1,4(){a.L({W:\'\'})})}a.I(w.14)});3(w.12&&w.12.1K){29(2 i=0,k=w.12.1K;i13:9(0)\',5);2 a;3(!c||O c==\'1Z\'){a=$(\'A a\',b).9((c&&c>0&&c-1||0))}E 3(O c==\'2J\'){a=$(\'A a[@1O$="#\'+c+\'"]\',b)}a.N(d)})}})(y[i])}$.1P.2I=4(){2 c=[];5.Y(4(){2 a=$(\'13.z-1M\',5);a=a.V()&&a||$(\'>13:9(0)\',5);2 b=$(\'A\',a);c.2H(b.20(b.1a(\'.z-2b\')[0])+1)});F c[0]}})(2G);',62,197,'||var|if|function|this|||browser|eq||||||||||||||||||||||||||tabs|li|hash|null|toShow|else|return|height|selectedClass|addClass|bookmarkable|initial|css||trigger|typeof|is|document|toHide|id|false|msie|size|opacity|span|each|style|div|hideAnim|disabled|ul|disabledClass|attr|containerClass|removeClass|remote|bind|filter|click|onShow|onHide|location|ajaxHistory|parents|min|locked|navClass|minHeight|fxShow|fxFade|end|animate|setTimeout|hideClass|spinner|documentElement|get|fxSlide|offsetHeight|unFocus|fxSpeed|safari|replace|jq|loadRemoteTab|show|msie6|disableTab|fxHide|window|hide|switchTab|innerHTML|length|loadingClass|nav|update|href|fn|hideSpeed|showSpeed|body|display|offsetWidth|scrollTo|px|behaviour|version|number|index|hashPrefix|scrollTop|scrollLeft|em|blur|container|tabTitle|enableTab|for|submit|selected|appendTo|form|triggerTab|url|width|true|onClick|tabStruct|remoteCount|extend|fxAutoHeight|block|font|fxHideSpeed|watch|fxShowSpeed|1px|setExpression|normal|sort|userAgent|navigator|test|removeExpression|MSIE|map|not|500|opera|tab|jQuery|push|activeTab|string|initialize|loading|pageYOffset|pageXOffset|such|no|8230|There|alert|load|siblings|overflow|visible|Loading|object|clientX|value|type|input|action|class|50|setInterval|hidden|visibility|absolute|position'.split('|'),0,{})) \ No newline at end of file diff --git a/main/inc/lib/javascript/loading.gif b/main/inc/lib/javascript/loading.gif new file mode 100755 index 0000000000..85b99d46b9 Binary files /dev/null and b/main/inc/lib/javascript/loading.gif differ diff --git a/main/inc/lib/javascript/tab.png b/main/inc/lib/javascript/tab.png new file mode 100755 index 0000000000..413c755983 Binary files /dev/null and b/main/inc/lib/javascript/tab.png differ diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php new file mode 100755 index 0000000000..8cf381b92b --- /dev/null +++ b/main/inc/lib/social.lib.php @@ -0,0 +1,272 @@ + + *@param integer + *@return void + */ + public function register_friend ($friend_id,$my_user_id,$relation_type) { + $tbl_my_friend = Database :: get_main_table(TABLE_MAIN_USER_FRIEND); + $sql = 'SELECT COUNT(*) as count FROM ' . $tbl_my_friend . ' WHERE friend_user_id=' . $friend_id.' AND user_id='.$my_user_id; + $result = api_sql_query($sql, __FILE__, __LINE__); + $row = Database :: fetch_array($result, 'ASSOC'); + if ($row['count'] == 0) { + $sql_i = 'INSERT INTO ' . $tbl_my_friend . '(friend_user_id,user_id,relation_type)values(' . $friend_id . ','.$my_user_id.','.$relation_type.');'; + api_sql_query($sql_i, __FILE__, __LINE__); + } else { + $sql = 'SELECT COUNT(*) as count FROM ' . $tbl_my_friend . ' WHERE friend_user_id=' . $friend_id . ' AND user_id='.$my_user_id; + $result = api_sql_query($sql, __FILE__, __LINE__); + $row = Database :: fetch_array($result, 'ASSOC'); + if ($row['count'] == 1) { + $sql_i = 'UPDATE ' . $tbl_my_friend . ' SET relation_type='.$relation_type.' WHERE friend_user_id=' . $friend_id.' AND user_id='.$my_user_id; + api_sql_query($sql_i, __FILE__, __LINE__); + } + } + } + + /** + *@author isaac flores paz + *@param integer + *@return void + */ + public function removed_friend ($friend_id) { + $tbl_my_friend = Database :: get_main_table(TABLE_MAIN_USER_FRIEND); + $tbl_my_message = Database :: get_main_table(TABLE_MAIN_MESSAGE); + $user_id=api_get_user_id(); + $sql = 'SELECT COUNT(*) as count FROM ' . $tbl_my_friend . ' WHERE user_id=' . $user_id . ' AND relation_type<>6 AND friend_user_id='.$friend_id; + $result = api_sql_query($sql, __FILE__, __LINE__); + $row = Database :: fetch_array($result, 'ASSOC'); + if ($row['count'] == 1) { + $sql_i = 'UPDATE ' . $tbl_my_friend . ' SET relation_type=6 WHERE user_id=' . $user_id.' AND friend_user_id='.$friend_id; + $sql_j = 'UPDATE ' . $tbl_my_message . ' SET msg_status=7 WHERE user_receiver_id=' . $user_id.' AND user_sender_id='.$friend_id; + api_sql_query($sql_i, __FILE__, __LINE__); + api_sql_query($sql_j, __FILE__, __LINE__); + } + } + + /** + * @author isaac flores paz + * @param int + * @param array + * @param array + * @return array + */ + public function active_friends ($friend_id) { + $tbl_my_friend = Database :: get_main_table(TABLE_MAIN_USER_FRIEND); + $user_id=api_get_user_id(); + $sql = 'SELECT COUNT(*) as count FROM ' . $tbl_my_friend . ' WHERE user_id=' . $user_id . ' AND relation_type<>6 AND friend_user_id='.$friend_id; + $rs = api_sql_query($sql, __FILE__, __LINE__); + $row = Database :: fetch_array($rs, 'ASSOC'); + $name_relation=self::get_relation_name($user_id,$friend_id); + if ($row['count'] == 1) { + $result = '
' . get_lang($name_relation) . '
'; + } else { + $result = '
' . get_lang($name_relation) . '
'; + } + return $result; + + } + /** + * @author isaac flores paz + * @return array + */ + public function show_list_type_friends () { + $friend_relation_list=array(); + $count_list=0; + $tbl_my_friend_relation_type = Database :: get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE); + $sql='SELECT id,title FROM '.$tbl_my_friend_relation_type.' WHERE id<>6 ORDER BY id ASC'; + $result=api_sql_query($sql,__FILE__,__LINE__); + while ($row=Database::fetch_array($result,'ASSOC')) { + $friend_relation_list[]=$row; + } + $count_list=count($friend_relation_list); + if ($count_list==0) { + $friend_relation_list[]=get_lang('UnkNow'); + } else { + return $friend_relation_list; + } + + } + /** + * @author isaac flores paz + * @param string + * @return integer + */ + public function get_relation_type_by_name ($relation_type_name) { + $list_type_friend=array(); + $list_type_friend=self::show_list_type_friends(); + foreach ($list_type_friend as $value_type_friend) { + if (strtolower($value_type_friend['title'])==$relation_type_name) { + return $value_type_friend['id']; + } + } + } + /** + * @author isaac flores paz + * @param int + * @param int + * @param string + */ + public function get_relation_name ($user_id,$user_friend) { + $tbl_my_friend_relation_type = Database :: get_main_table(TABLE_MAIN_USER_FRIEND_RELATION_TYPE); + $tbl_my_friend = Database :: get_main_table(TABLE_MAIN_USER_FRIEND); + $list_info=array(); + $sql= 'SELECT rt.title FROM '.$tbl_my_friend_relation_type.' rt ' . + 'WHERE rt.id=(SELECT uf.relation_type FROM '.$tbl_my_friend.' uf WHERE user_id='.$user_id.' AND friend_user_id='.$user_friend.')'; + $res=api_sql_query($sql,__FILE__,__LINE__); + if ($row=Database::fetch_array($res,'ASSOC')) { + $list_info[]=$row; + } + $count_row=count($list_info); + if ($count_row==0) { + return get_lang('UnKnow'); + } else { + return get_lang($row['title']); + } + + } + /** + * @author isaac flores paz + * @param int + * @return array + */ + public function get_list_id_friends_by_user_id ($user_id,$id_group=null,$search_name=null) { + $list_ids_friends=array(); + $tbl_my_friend = Database :: get_main_table(TABLE_MAIN_USER_FRIEND); + $tbl_my_user = Database :: get_main_table(TABLE_MAIN_USER); + $sql='SELECT friend_user_id FROM '.$tbl_my_friend.' WHERE relation_type<>6 AND friend_user_id<>'.$user_id.' AND user_id='.$user_id; + if (isset($id_group) && $id_group>0) { + $sql.=' AND relation_type='.$id_group; + } + if (isset($search_name) && is_string($search_name)===true) { + $sql.=' AND friend_user_id IN (SELECT user_id FROM '.$tbl_my_user.' WHERE concat(firstName,lastName) like concat("%","'.$search_name.'","%"));'; + } + $res=api_sql_query($sql,__FILE__,__LINE__); + while ($row=Database::fetch_array($res,'ASSOC')) { + $list_ids_friends[]=$row; + } + return $list_ids_friends; + } + /** + * @author isaac flores paz + * @param int + * @param array + */ + public function get_list_path_web_by_user_id ($user_id,$id_group=null,$search_name=null) { + $list_paths=array(); + $list_path_friend=array(); + $array_path_user=array(); + $list_ids = self::get_list_id_friends_by_user_id ($user_id,$id_group,$search_name); + foreach ($list_ids as $values_ids) { + $list_path_image_friend[] = UserManager::get_user_picture_path_by_id($values_ids['friend_user_id'],'web',false,true); + $combine_friend=array('id_friend'=>$list_ids,'path_friend'=>$list_path_image_friend); + } + return $combine_friend; + } + /** + * @author isaac flores paz + * @param int + * @param array + */ + public function get_list_web_path_user_invitation_by_user_id ($user_id) { + $list_paths=array(); + $list_path_friend=array(); + $list_ids = self::get_list_invitation_of_friends_by_user_id($user_id); + foreach ($list_ids as $values_ids) { + $list_path_image_friend[] = UserManager::get_user_picture_path_by_id($values_ids['user_sender_id'],'web',false,true); + } + return $list_path_image_friend; + } + /** + * @author isaac flores paz + * @param int + * @param int + * @param string + * @param string + * @return boolean + */ + public function send_invitation_friend ($user_id,$friend_id,$message_title,$message_content) { + $tbl_message=Database::get_main_table(TABLE_MAIN_MESSAGE); + $current_date=date('Y-m-d H:i:s',time()); + $status_invitation=5;//status of pending invitation + $sql_exist='SELECT COUNT(*) AS count FROM '.$tbl_message.' WHERE user_sender_id='.$user_id.' AND user_receiver_id='.$friend_id.' AND msg_status IN(5,6,7);'; + $res_exist=api_sql_query($sql_exist,__FILE__,__LINE__); + $row_exist=Database::fetch_array($res_exist,'ASSOC'); + if ($row_exist['count']==0) { + $sql='INSERT INTO '.$tbl_message.'(user_sender_id,user_receiver_id,msg_status,send_date,title,content) VALUES('.$user_id.','.$friend_id.','.$status_invitation.',"'.$current_date.'","'.$message_title.'","'.$message_content.'")'; + api_sql_query($sql,__FILE__,__LINE__); + return true; + } elseif($row_exist['count']==1) { + $sql_if_exist='SELECT COUNT(*) AS count FROM '.$tbl_message.' WHERE user_sender_id='.$user_id.' AND user_receiver_id='.$friend_id.' AND msg_status=7'; + $res_if_exist=api_sql_query($sql_if_exist,__FILE__,__LINE__); + $row_if_exist=Database::fetch_array($res_if_exist,'ASSOC'); + if ($row_if_exist['count']==1) { + $sql_if_exist_up='UPDATE '.$tbl_message.'SET msg_status=5 WHERE user_sender_id='.$user_id.' AND user_receiver_id='.$friend_id.';'; + api_sql_query($sql_if_exist_up,__FILE__,__LINE__); + return true; + } else { + return false; + } + + } else { + return false; + } + + } + /** + * @author isaac flores paz + * @param int + * @return int + */ + public function get_message_number_invitation_by_user_id ($user_receiver_id) { + $status_invitation=5;//status of pending invitation + $tbl_message=Database::get_main_table(TABLE_MAIN_MESSAGE); + $sql='SELECT COUNT(*) as count_message_in_box FROM '.$tbl_message.' WHERE user_receiver_id='.$user_receiver_id.' AND msg_status=5;'; + $res=api_sql_query($sql,__FILE__,__LINE__); + $row=Database::fetch_array($res,'ASSOC'); + return $row['count_message_in_box']; + } + /** + * @author isaac flores paz + * @param int + * @return array() + */ + public function get_list_invitation_of_friends_by_user_id ($user_id) { + $list_friend_invitation=array(); + $tbl_message=Database::get_main_table(TABLE_MAIN_MESSAGE); + $sql='SELECT user_sender_id,send_date,title,content FROM '.$tbl_message.' WHERE user_receiver_id='.$user_id.' AND msg_status=5;'; + $res=api_sql_query($sql,__FILE__,__LINE__); + while ($row=Database::fetch_array($res,'ASSOC')) { + $list_friend_invitation[]=$row; + } + return $list_friend_invitation; + } + public function invitation_accepted ($user_send_id,$user_receiver_id) { + $tbl_message=Database::get_main_table(TABLE_MAIN_MESSAGE); + $msg_status=6;// friend accepted + $sql='UPDATE '.$tbl_message.' SET msg_status='.$msg_status.' WHERE user_sender_id='.$user_send_id.' AND user_receiver_id='.$user_receiver_id.';'; + api_sql_query($sql,__FILE__,__LINE__); + } + public function invitation_denied($user_send_id,$user_receiver_id) { + $tbl_message=Database::get_main_table(TABLE_MAIN_MESSAGE); + $msg_status=7; + $sql='UPDATE '.$tbl_message.' SET msg_status='.$msg_status.' WHERE user_sender_id='.$user_send_id.' AND user_receiver_id='.$user_receiver_id.';'; + api_sql_query($sql,__FILE__,__LINE__); + } + public function qualify_friend($id_friend_qualify,$type_qualify) { + $tbl_user_friend=Database::get_main_table(TABLE_MAIN_USER_FRIEND); + $user_id=api_get_user_id(); + $sql='UPDATE '.$tbl_user_friend.' SET relation_type='.$type_qualify.' WHERE user_id='.$user_id.' AND friend_user_id='.$id_friend_qualify.';'; + api_sql_query($sql,__FILE__,__LINE__); + } + public function get_list_of_groups() { + + } + + +} +?> \ No newline at end of file diff --git a/main/social/contacts.inc.php b/main/social/contacts.inc.php new file mode 100755 index 0000000000..c5294520b6 --- /dev/null +++ b/main/social/contacts.inc.php @@ -0,0 +1,135 @@ + +
+ +
+ +
+ + + + + + + + + + + + + +
+ + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + +
+ " width="90" height="100" style="margin-left:5px ;margin-rigth:5px;margin-top:5px;margin-bottom:5px;" />
+ + + + + +
 
+ + + + +
+ + + + + +
+ + +
+ + +
+
+ + + + +
+ + + + + + + +
+ + + + +
+'; +require_once 'show_search_image.inc.php'; +echo ''; + +?> +
+
\ No newline at end of file diff --git a/main/social/data_personal.inc.php b/main/social/data_personal.inc.php new file mode 100755 index 0000000000..ca7c11a447 --- /dev/null +++ b/main/social/data_personal.inc.php @@ -0,0 +1,13 @@ + + + + + + + + +
+
diff --git a/main/social/group_contact.inc.php b/main/social/group_contact.inc.php new file mode 100755 index 0000000000..5c6618d65a --- /dev/null +++ b/main/social/group_contact.inc.php @@ -0,0 +1,91 @@ + +
+ +
+ +
+ + + + + + '; + } + $friend_html.='
+ + + + + +
+'; + for ($k=0;$k<$loop_friends;$k++) { + $friend_html.='
'; + if ($j==$number_of_images) { + $number_of_images=$number_of_images*2; + } + while ($j<$number_of_images) { + if ($list_friends_file[$j]<>"") { + $user_info=api_get_user_info($list_friends_id[$j]); + $name_user=$user_info['firstName'].' '.$user_info['lastName']; + $friend_html.=' 
 '; + } + $j++; + } + $friend_html.='
'; + echo $friend_html; +} else { + $friend_html.= ''; + $friend_html.=''; + $friend_html.='
   '.get_lang('Message'); + $friend_html.='
'; + echo $friend_html; +} +?> + + + + +
+ +
\ No newline at end of file diff --git a/main/social/index.php b/main/social/index.php new file mode 100755 index 0000000000..125830542b --- /dev/null +++ b/main/social/index.php @@ -0,0 +1,205 @@ +'; //jQuery +$htmlHeadXtra[] = ''; +$htmlHeadXtra[] = ''; +$htmlHeadXtra[] = ''; +$htmlHeadXtra[] = ''; +$htmlHeadXtra[] = ''; +$htmlHeadXtra[] = ' + + + '; +$htmlHeadXtra[] = ''; +$_SESSION['social_dest'] = 'index.php'; +$interbreadcrumb[]= array ( + 'url' => '#', + 'name' => get_lang('ModifyProfile') +); +$interbreadcrumb[]= array ( + 'url' => $_SESSION['social_dest'], + 'name' => get_lang('Social') +); +Display :: display_header(''); +?> +
+
    +
  • + +
  • +
  • + +
  • +
  • +
  • + +
+
';?> +
+ \ No newline at end of file diff --git a/main/social/message.php b/main/social/message.php new file mode 100755 index 0000000000..98666d8d2c --- /dev/null +++ b/main/social/message.php @@ -0,0 +1,41 @@ + +
+Bienvenido a la herramienta mensajes...desde aqui usted puede comunicarse con todos los usuarios en linea +
+ +

'.get_lang('Message').'

+

+ '.get_lang('Inbox').$cant_msg.'
+ '.get_lang('Compose').'
+ '.get_lang('Outbox').'
+

'; + +echo '
'; +} + +?> diff --git a/main/social/qualify_contact.inc.php b/main/social/qualify_contact.inc.php new file mode 100755 index 0000000000..4559d6126d --- /dev/null +++ b/main/social/qualify_contact.inc.php @@ -0,0 +1,31 @@ + + + + + + + + +
+ + + + + + + +
+
\ No newline at end of file diff --git a/main/social/register_friend.php b/main/social/register_friend.php new file mode 100755 index 0000000000..3dc744e72a --- /dev/null +++ b/main/social/register_friend.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/main/social/response.inc.php b/main/social/response.inc.php new file mode 100755 index 0000000000..38776e54b3 --- /dev/null +++ b/main/social/response.inc.php @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/main/social/select_friend.php b/main/social/select_friend.php new file mode 100755 index 0000000000..21ca00fdec --- /dev/null +++ b/main/social/select_friend.php @@ -0,0 +1,165 @@ +'; //jQuery +$htmlHeadXtra[] =''; +Display :: display_header(get_lang('MyFriends')); +?> + +
+ + + + + + + +
+ + + +
Dokeos - +Solicitud de Amigos
+ + + + +
+ + + + + + + +
+ + + + +
+ + + + +
+ " width="90" height="100" style="margin-left:5px ;margin-rigth:5px;margin-top:5px;margin-bottom:5px;" />
+ + + + + + + + + + + + +
+ + + + +
+
+ + + + +
+ + + +
+ + + +
+ " value="Aceptar" /> + " value="Denegar" /> +
+
+
+ + diff --git a/main/social/select_friend_response.php b/main/social/select_friend_response.php new file mode 100755 index 0000000000..14e58dd2e0 --- /dev/null +++ b/main/social/select_friend_response.php @@ -0,0 +1,127 @@ + +
+Desde aqui puede ver sus invitaciones +
+
+ +
+ + + + + + + +
+ + + +
Dokeos - +Solicitud de Amigos
+ + + + +
+ + + + + + + +
+ + + + +
+ + + + +
+ " width="90" height="100" style="margin-left:5px ;margin-rigth:5px;margin-top:5px;margin-bottom:5px;" />
+ + + + + + + + + + + + +
+ + + + +
+
+ + + + +
+ + + +
+ + + +
+ " value="Aceptar" onclick="javascript:register_friend(this)" /> + " value="Denegar" onclick="javascript:denied_friend(this)" /> +
+
+
+ \ No newline at end of file diff --git a/main/social/select_options.php b/main/social/select_options.php new file mode 100755 index 0000000000..54a4832a27 --- /dev/null +++ b/main/social/select_options.php @@ -0,0 +1,21 @@ +'; +$sql='SELECT DISTINCT u.user_id as id,concat(u.firstname," ",u.lastname," ","( ",u.email," )") as name FROM '.$tbl_my_user.' u + INNER JOIN '.$track_online_table.' t + ON u.user_id=t.login_user_id INNER JOIN '.$tbl_my_user_friend.' uf + ON uf.friend_user_id=u.user_id ;'; +$res=api_sql_query($sql,__FILE__,__LINE__); +while ($row=Database::fetch_array($res,'ASSOC')) { + $html_form.=''; +} +$html_form.=''; +echo $html_form; +?> \ No newline at end of file diff --git a/main/social/show_search_image.inc.php b/main/social/show_search_image.inc.php new file mode 100755 index 0000000000..4b48b6ad6f --- /dev/null +++ b/main/social/show_search_image.inc.php @@ -0,0 +1,54 @@ +'; + for ($k=0;$k<$loop_friends;$k++) { + $friend_html.=''; + if ($j==$number_of_images) { + $number_of_images=$number_of_images*2; + } + while ($j<$number_of_images) { + if ($list_friends_file[$j]<>"") { + $user_info=api_get_user_info($list_friends_id[$j]); + $name_user=$user_info['firstName'].' '.$user_info['lastName']; + $friend_html.=' 
 '; + } + $j++; + } + $friend_html.=''; + } + $friend_html.='
'; +} +echo $friend_html; +?> diff --git a/main/social/social_friend.php b/main/social/social_friend.php new file mode 100755 index 0000000000..5a785c2969 --- /dev/null +++ b/main/social/social_friend.php @@ -0,0 +1,110 @@ + +function confirmation(name) +{ + if (confirm("'.get_lang('AreYouSureToDelete').' " + name + " ?")) + {return true;} + else + {return false;} +} + +function show_image(image,width,height) { + width = parseInt(width) + 20; + height = parseInt(height) + 20; + window_x = window.open(image,\'windowX\',\'width=\'+ width + \', height=\'+ height + \'\'); + +} + +'; +$htmlHeadXtra[] = ''; //jQuery + $htmlHeadXtra[] =''; + +/*if (api_get_setting('allow_message_tool')=='true') { + $htmlHeadXtra[] =''; +}*/ +Display :: display_header(get_lang('ModifyProfile')); +?> + + + + + + + +
+ + + + +
+ \ No newline at end of file