diff options
| author | spider <spider@bitweaver.org> | 2015-02-18 12:21:07 -0500 |
|---|---|---|
| committer | spider <spider@bitweaver.org> | 2015-02-18 12:21:07 -0500 |
| commit | 6c205972f2b8d8fdeacdd0569567a594b8017750 (patch) | |
| tree | 6e82c6a24fa631c1d98b64f579a02b7ec7ded6be /javascript/libs | |
| parent | 3e766d4c2a8a0db7446272f262c453954f583af0 (diff) | |
| download | util-6c205972f2b8d8fdeacdd0569567a594b8017750.tar.gz util-6c205972f2b8d8fdeacdd0569567a594b8017750.tar.bz2 util-6c205972f2b8d8fdeacdd0569567a594b8017750.zip | |
move all javascript/libs/* to javascript/*
Diffstat (limited to 'javascript/libs')
194 files changed, 0 insertions, 27498 deletions
diff --git a/javascript/libs/drag/dragdrop.js b/javascript/libs/drag/dragdrop.js deleted file mode 100644 index 71e5ec7..0000000 --- a/javascript/libs/drag/dragdrop.js +++ /dev/null @@ -1 +0,0 @@ -eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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 g={30:l f(0,0),15:c(p){6 x=1i(p.q.1m);6 y=1i(p.q.1g);b l f(1h(x)?0:x,1h(y)?0:y)},1r:c(p){b g.15(p).12(l f(p.2n,p.2q))},J:c(p,1x){6 1f=l f(p.2H,p.Y);8(!1x)b 1f;6 K=p.2o;E(K){1f=1f.12(l f(K.2H,K.Y));K=K.2o}b 1f},1b:c(p,1x){b g.J(p,1x).12(l f(p.2n,p.2q))},V:c(j){j.1q=l f(j.2P,j.2Q)}};c f(x,y){4.x=x;4.y=y}f.M.2R=c(){b"("+4.x+","+4.y+")"};f.M.12=c(n){b l f(4.x+n.x,4.y+n.y)};f.M.1H=c(n){b l f(4.x-n.x,4.y-n.y)};f.M.1z=c(n){6 1E=4.x-n.x;6 1A=4.y-n.y;b C.2S(C.2r(1E,2)+C.2r(1A,2))};f.M.z=c(n){6 x=C.z(4.x,n.x);6 y=C.z(4.y,n.y);b l f(x,y)};f.M.1n=c(N,z){8(N.x>z.x||N.y>z.y)b 4;6 x=4.x;6 y=4.y;8(N.x!=9)x=C.z(x,N.x);8(z.x!=9)x=C.N(x,z.x);8(N.y!=9)y=C.z(y,N.y);8(z.y!=9)y=C.N(y,z.y);b l f(x,y)};f.M.1J=c(p){p.q["1g"]=4.y+"2t";p.q["1m"]=4.x+"2t"};f.M.2d=c(n){8(4==n)b m;8(!n||n==9)b B;b 4.x==n.x&&4.y==n.y};f.M.S=c(F,G){8((4.x>=F.x)&&(4.x<=G.x)&&(4.y>=F.y)&&(4.y<=G.y)){b m}b B};6 d={2E:2U,3:9,17:B,2B:c(3){3.H=3;3.H.3=3;3.Z=9;3.10=9;3.1j=9;3.1k=9;3.v=0;3.1B=0;3.1F=0;3.1l=l U();3.1d=l U();3.1p=l U();3.29=d.29;3.1C=d.1C;3.1W=d.1W;3.1X=d.1X;3.1n=d.1n;3.1S=d.1S;3.1T=d.1T;3.1V=d.1Y},1S:c(){6 h=g.J(4,m);4.Z=h.x;4.1j=h.x},1T:c(){6 h=g.J(4,m);4.10=h.y;4.1k=h.y},1n:c(k,t){4.Z=k.x;4.10=k.y;4.1j=t.x;4.1k=t.y},29:c(H){8(H&&H!=9)4.H=H;14 4.H=4;4.H.3=4;4.1V=9;4.H.1V=d.1Y},1C:c(v){8(1h(1i(v)))b;4.v=v},1W:c(v){8(1h(1i(v)))b;4.1F=v},1X:c(v){8(1h(1i(v)))b;4.1B=v},1Y:c(j){8(j.2W.2X==\'2Y\'){b}j=d.V(j);d.3=4.3;6 3=4.3;6 u=j.1q;6 h=g.J(3,m);6 k=g.15(3);6 t=g.1r(3);6 r=g.1b(3,m);3.2k=3.q.1N;3.2i=3.q.1L;3.1D=u;3.2a=u;d.27(u,k,t,h,r);3.1l(k,t,h,r);8(3.Z!=9)3.22=u.x-k.x+3.Z-h.x;8(3.1j!=9)3.2x=3.22+3.1j-3.Z;8(3.10!=9)3.2c=u.y-k.y+3.10-h.y;8(3.1k!=9)3.2y=3.2c+3.1k-3.10;3.2F=l f(3.22,3.2c);3.2G=l f(3.2x,3.2y);18.2g=d.2z;18.2h=d.2f;b B},27:c(u,k,t,h,r){},2z:c(j){j=d.V(j);6 3=d.3;6 u=j.1q;6 h=g.J(3,m);6 k=g.15(3);6 t=g.1r(3);6 r=g.1b(3,m);d.27(u,k,t,h,r);8(!d.17){8(3.v>0){6 1z=3.1D.1z(u);8(1z<3.v)b m}14 8(3.1B>0){6 1A=C.2D(3.1D.y-u.y);8(1A<3.1B)b m}14 8(3.1F>0){6 1E=C.2D(3.1D.x-u.x);8(1E<3.1F)b m}d.17=m;3.q["1L"]=d.2E;3.q["1N"]=0.2Z}6 2b=u.1n(3.2F,3.2G);k=k.12(2b.1H(3.2a));k.1J(3);3.2a=2b;6 1G=g.J(3,m);3.1p(k,t,h,r);6 1I=g.J(3,m);8(!1G.2d(1I)){6 2e=1G.1H(1I);k=g.15(3).12(2e);k.1J(3)}b B},2f:c(j){j=d.V(j);6 3=d.3;6 u=j.1q;6 h=g.J(3,m);6 k=g.15(3);6 t=g.1r(3);6 r=g.1b(3,m);18.2g=9;18.2h=9;3.1d(k,t,h,r);8(d.17){3.q["1L"]=3.2i;3.q["1N"]=3.2k}d.3=9;d.17=B;b B},V:c(j){8(2J j==\'2m\')j=2L.j;g.V(j);b j}};c 21(a,1Q){6 1c=0;6 1v="";6 1w;8(1Q>0){1U(6 1a 2M a){1c=1c+1;6 O=a[1a].O;8(O=="2m")O=1;1v=1v+"s:"+1a.O+":\\""+1a+"\\";"+"s:"+O+":\\""+a[1a]+"\\";";1w="a:"+1c+":{"+1v+"}";8(1c==1Q){1y}}}14{1w="a:0:{}"}b 1w}6 I={Q:9,1o:9,26:9,1s:9,2O:c(w,3){8(4.Q==9){4.Q=4.1o=w;w.2p=9;w.D=9}14{w.2p=4.1o;w.D=9;4.1o.D=w;4.1o=w}w.1t=l U();w.1K=l U();w.2j=l U();w.3=3;6 W=w.1O("2v");1U(6 i=0;i<W.O;i++){I.2A(W[i])}},2T:c(3,28){6 7=I.Q;6 23=l 2u();6 24=0;E(7!=9){8(28!=9&&7.1e!=28){7=7.D;2s}8(3!=9&&7.3!=3){7=7.D;2s}6 1Z=l 2u();6 20=0;6 W=7.1O("2v");1U(6 i=0;i<W.O;i++){20++;1Z[i]=W[i].1e}23[7.1e]=21(1Z,20);24++;7=7.D}6 25=\'\';25=21(23,24);b 25},2A:c(e){d.2B(e);e.1C(5);e.L=B;e.1l=I.1l;e.1p=I.1p;e.1d=I.1d},1l:c(k,t,h,r){6 7=I.Q;E(7!=9){7.F=g.J(7,m);7.G=g.1b(7,m);7=7.D}4.o.1t();26=4.o.1e;1s=4.o.3},1p:c(k,t,h,r){8(4.L){6 7=I.Q;E(7!=9){8((h.S(7.F,7.G)||r.S(7.F,7.G))&&7.3==1s){7.1t();4.L=B;6 P=4.o;P.11(4);7.16(4);P.o.11(P);1y}7=7.D}8(4.L)b}14 8(!(h.S(4.o.F,4.o.G)||r.S(4.o.F,4.o.G))){4.o.1K();4.L=m;6 7=I.Q;E(7!=9){8((h.S(7.F,7.G)||r.S(7.F,7.G))&&7.3==1s){7.1t();4.L=B;4.o.11(4);7.16(4);1y}7=7.D}8(4.L){6 P=4.o.2I(B);4.o.11(4);P.16(4);P.q.2K=0;18.1O("2N").e(0).16(P);b}}6 K=4.o;6 e=4;6 X=R.1M(e);E(X!=9&&4.Y>=X.Y-2){6 e=X;6 X=R.1M(e)}8(4!=e){R.1P(4,X);b}6 e=4;6 19=R.1R(e);E(19!=9&&4.Y<=19.Y+2){6 e=19;6 19=R.1R(e)}8(4!=e){R.1P(4,e);b}},1d:c(k,t,h,r){8(4.L){6 7=I.Q;E(7!=9){8(7.1e==26){1y}7=7.D}4.L=B;4.o.11(4);7.16(4);4.q["1g"]="T";4.q["1m"]="T";b}4.o.1K();4.o.2j();4.q["1g"]="T";4.q["1m"]="T"}};6 R={1P:c(13,2w){6 K=13.o;K.11(13);K.2V(13,2w);13.q["1g"]="T";13.q["1m"]="T"},1M:c(e){6 A=e.2l;E(A!=9){8(A.1u==e.1u)b A;A=A.2l}b 9},1R:c(e){6 A=e.2C;E(A!=9){8(A.1u==e.1u)b A;A=A.2C}b 9}};',62,187,'|||group|this||var|container|if|null||return|function|Drag|item|Coordinate|Coordinates|nwOffset||event|nwPosition|new|true|that|parentNode|element|style|seOffset||sePosition|mouse|threshold|list|||max|sibling|false|Math|nextContainer|while|northwest|southeast|handle|DragDrop|northwestOffset|parent|isOutside|prototype|min|length|tempParent|firstContainer|DragUtils|inside|0px|Function|fixEvent|items|next|offsetTop|minX|minY|removeChild|plus|item1|else|northwestPosition|appendChild|isDragging|document|previous|key|southeastOffset|counter|onDragEnd|id|offset|top|isNaN|parseInt|maxX|maxY|onDragStart|left|constrain|lastContainer|onDrag|windowCoordinate|southeastPosition|parent_group|onDragOver|nodeName|vardef|serialized|isRecursive|break|distance|deltaY|thresholdY|setDragThreshold|initialWindowCoordinate|deltaX|thresholdX|offsetBefore|minus|offsetAfter|reposition|onDragOut|zIndex|nextItem|opacity|getElementsByTagName|swap|count|previousItem|constrainVertical|constrainHorizontal|for|onmousedown|setDragThresholdX|setDragThresholdY|onMouseDown|tmpHash|tmpHashCount|serialize|minMouseX|hash|hashCount|string|parent_id|showStatus|theid|setDragHandle|dragCoordinate|adjusted|minMouseY|equals|errorDelta|onMouseUp|onmousemove|onmouseup|originalZIndex|onDragDrop|originalOpacity|nextSibling|undefined|offsetWidth|offsetParent|previousContainer|offsetHeight|pow|continue|px|Array|li|item2|maxMouseX|maxMouseY|onMouseMove|makeItemDragable|makeDraggable|previousSibling|abs|BIG_Z_INDEX|mouseMin|mouseMax|offsetLeft|cloneNode|typeof|border|window|in|body|makeListContainer|clientX|clientY|toString|sqrt|serData|10000|insertBefore|target|tagName|INPUT|75|ORIGIN'.split('|'),0,{})) diff --git a/javascript/libs/drag/dragdrop_original.js b/javascript/libs/drag/dragdrop_original.js deleted file mode 100644 index 58664e3..0000000 --- a/javascript/libs/drag/dragdrop_original.js +++ /dev/null @@ -1,640 +0,0 @@ -/********************************************************** - Very minorly modified from the example by Tim Taylor - http://tool-man.org/examples/sorting.html - - Added Coordinate.prototype.inside( northwest, southeast ); - **********************************************************/ - -var Coordinates = { - ORIGIN : new Coordinate(0, 0), - - northwestPosition : function(element) { - var x = parseInt(element.style.left); - var y = parseInt(element.style.top); - - return new Coordinate(isNaN(x) ? 0 : x, isNaN(y) ? 0 : y); - }, - - southeastPosition : function(element) { - return Coordinates.northwestPosition(element).plus( - new Coordinate(element.offsetWidth, element.offsetHeight)); - }, - - northwestOffset : function(element, isRecursive) { - var offset = new Coordinate(element.offsetLeft, element.offsetTop); - - if (!isRecursive) return offset; - - var parent = element.offsetParent; - while (parent) { - offset = offset.plus( - new Coordinate(parent.offsetLeft, parent.offsetTop)); - parent = parent.offsetParent; - } - return offset; - }, - - southeastOffset : function(element, isRecursive) { - return Coordinates.northwestOffset(element, isRecursive).plus( - new Coordinate(element.offsetWidth, element.offsetHeight)); - }, - - fixEvent : function(event) { - event.windowCoordinate = new Coordinate(event.clientX, event.clientY); - } -}; - -function Coordinate(x, y) { - this.x = x; - this.y = y; -} - -Coordinate.prototype.toString = function() { - return "(" + this.x + "," + this.y + ")"; -}; - -Coordinate.prototype.plus = function(that) { - return new Coordinate(this.x + that.x, this.y + that.y); -}; - -Coordinate.prototype.minus = function(that) { - return new Coordinate(this.x - that.x, this.y - that.y); -}; - -Coordinate.prototype.distance = function(that) { - var deltaX = this.x - that.x; - var deltaY = this.y - that.y; - - return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2)); -}; - -Coordinate.prototype.max = function(that) { - var x = Math.max(this.x, that.x); - var y = Math.max(this.y, that.y); - return new Coordinate(x, y); -}; - -Coordinate.prototype.constrain = function(min, max) { - if (min.x > max.x || min.y > max.y) return this; - - var x = this.x; - var y = this.y; - - if (min.x != null) x = Math.max(x, min.x); - if (max.x != null) x = Math.min(x, max.x); - if (min.y != null) y = Math.max(y, min.y); - if (max.y != null) y = Math.min(y, max.y); - - return new Coordinate(x, y); -}; - -Coordinate.prototype.reposition = function(element) { - element.style["top"] = this.y + "px"; - element.style["left"] = this.x + "px"; -}; - -Coordinate.prototype.equals = function(that) { - if (this == that) return true; - if (!that || that == null) return false; - - return this.x == that.x && this.y == that.y; -}; - -// returns true of this point is inside specified box -Coordinate.prototype.inside = function(northwest, southeast) { - if ((this.x >= northwest.x) && (this.x <= southeast.x) && - (this.y >= northwest.y) && (this.y <= southeast.y)) { - return true; - } - return false; -}; - -/* - * drag.js - click & drag DOM elements - * - * originally based on Youngpup's dom-drag.js, www.youngpup.net - */ - -/********************************************************** - Further modified from the example by Tim Taylor - http://tool-man.org/examples/sorting.html - - Changed onMouseMove where it calls group.onDrag and then - adjusts the offset for changes to the DOM. If the item - being moved changed parents it would be off so changed to - get the absolute offset (recursive northwestOffset). - - **********************************************************/ - -var Drag = { - BIG_Z_INDEX : 10000, - group : null, - isDragging : false, - - makeDraggable : function(group) { - group.handle = group; - group.handle.group = group; - - group.minX = null; - group.minY = null; - group.maxX = null; - group.maxY = null; - group.threshold = 0; - group.thresholdY = 0; - group.thresholdX = 0; - - group.onDragStart = new Function(); - group.onDragEnd = new Function(); - group.onDrag = new Function(); - - // TODO: use element.prototype.myFunc - group.setDragHandle = Drag.setDragHandle; - group.setDragThreshold = Drag.setDragThreshold; - group.setDragThresholdX = Drag.setDragThresholdX; - group.setDragThresholdY = Drag.setDragThresholdY; - group.constrain = Drag.constrain; - group.constrainVertical = Drag.constrainVertical; - group.constrainHorizontal = Drag.constrainHorizontal; - - group.onmousedown = Drag.onMouseDown; - }, - - constrainVertical : function() { - var nwOffset = Coordinates.northwestOffset(this, true); - this.minX = nwOffset.x; - this.maxX = nwOffset.x; - }, - - constrainHorizontal : function() { - var nwOffset = Coordinates.northwestOffset(this, true); - this.minY = nwOffset.y; - this.maxY = nwOffset.y; - }, - - constrain : function(nwPosition, sePosition) { - this.minX = nwPosition.x; - this.minY = nwPosition.y; - this.maxX = sePosition.x; - this.maxY = sePosition.y; - }, - - setDragHandle : function(handle) { - if (handle && handle != null) - this.handle = handle; - else - this.handle = this; - - this.handle.group = this; - this.onmousedown = null; - this.handle.onmousedown = Drag.onMouseDown; - }, - - setDragThreshold : function(threshold) { - if (isNaN(parseInt(threshold))) return; - - this.threshold = threshold; - }, - - setDragThresholdX : function(threshold) { - if (isNaN(parseInt(threshold))) return; - - this.thresholdX = threshold; - }, - - setDragThresholdY : function(threshold) { - if (isNaN(parseInt(threshold))) return; - - this.thresholdY = threshold; - }, - - onMouseDown : function(event) { -// BIT_MOD {{ Ignore events on INPUT items so they still work as expected. - if (event.target.tagName == 'INPUT' ) { - return; - } -// }} - event = Drag.fixEvent(event); - Drag.group = this.group; - - var group = this.group; - var mouse = event.windowCoordinate; - var nwOffset = Coordinates.northwestOffset(group, true); - var nwPosition = Coordinates.northwestPosition(group); - var sePosition = Coordinates.southeastPosition(group); - var seOffset = Coordinates.southeastOffset(group, true); - - group.originalOpacity = group.style.opacity; - group.originalZIndex = group.style.zIndex; - group.initialWindowCoordinate = mouse; - // TODO: need a better name, but don't yet understand how it - // participates in the magic while dragging - group.dragCoordinate = mouse; - - Drag.showStatus(mouse, nwPosition, sePosition, nwOffset, seOffset); - - group.onDragStart(nwPosition, sePosition, nwOffset, seOffset); - - // TODO: need better constraint API - if (group.minX != null) - group.minMouseX = mouse.x - nwPosition.x + - group.minX - nwOffset.x; - if (group.maxX != null) - group.maxMouseX = group.minMouseX + group.maxX - group.minX; - - if (group.minY != null) - group.minMouseY = mouse.y - nwPosition.y + - group.minY - nwOffset.y; - if (group.maxY != null) - group.maxMouseY = group.minMouseY + group.maxY - group.minY; - - group.mouseMin = new Coordinate(group.minMouseX, group.minMouseY); - group.mouseMax = new Coordinate(group.maxMouseX, group.maxMouseY); - - document.onmousemove = Drag.onMouseMove; - document.onmouseup = Drag.onMouseUp; - - return false; - }, - - showStatus : function(mouse, nwPosition, sePosition, nwOffset, seOffset) { - /*window.status = - "mouse: " + mouse.toString() + " " + - "NW pos: " + nwPosition.toString() + " " + - "SE pos: " + sePosition.toString() + " " + - "NW offset: " + nwOffset.toString() + " " + - "SE offset: " + seOffset.toString();*/ - }, - - onMouseMove : function(event) { - event = Drag.fixEvent(event); - var group = Drag.group; - var mouse = event.windowCoordinate; - var nwOffset = Coordinates.northwestOffset(group, true); - var nwPosition = Coordinates.northwestPosition(group); - var sePosition = Coordinates.southeastPosition(group); - var seOffset = Coordinates.southeastOffset(group, true); - - Drag.showStatus(mouse, nwPosition, sePosition, nwOffset, seOffset); - - if (!Drag.isDragging) { - if (group.threshold > 0) { - var distance = group.initialWindowCoordinate.distance( - mouse); - if (distance < group.threshold) return true; - } else if (group.thresholdY > 0) { - var deltaY = Math.abs(group.initialWindowCoordinate.y - mouse.y); - if (deltaY < group.thresholdY) return true; - } else if (group.thresholdX > 0) { - var deltaX = Math.abs(group.initialWindowCoordinate.x - mouse.x); - if (deltaX < group.thresholdX) return true; - } - - Drag.isDragging = true; - group.style["zIndex"] = Drag.BIG_Z_INDEX; - group.style["opacity"] = 0.75; - } - - // TODO: need better constraint API - var adjusted = mouse.constrain(group.mouseMin, group.mouseMax); - nwPosition = nwPosition.plus(adjusted.minus(group.dragCoordinate)); - nwPosition.reposition(group); - group.dragCoordinate = adjusted; - - // once dragging has started, the position of the group - // relative to the mouse should stay fixed. They can get out - // of sync if the DOM is manipulated while dragging, so we - // correct the error here - // - // TODO: what we really want to do is find the offset from - // our corner to the mouse coordinate and adjust to keep it - // the same - - // changed to be recursive/use absolute offset for corrections - var offsetBefore = Coordinates.northwestOffset(group, true); - group.onDrag(nwPosition, sePosition, nwOffset, seOffset); - var offsetAfter = Coordinates.northwestOffset(group, true); - - if (!offsetBefore.equals(offsetAfter)) { - var errorDelta = offsetBefore.minus(offsetAfter); - nwPosition = Coordinates.northwestPosition(group).plus(errorDelta); - nwPosition.reposition(group); - } - - return false; - }, - - onMouseUp : function(event) { - event = Drag.fixEvent(event); - var group = Drag.group; - - var mouse = event.windowCoordinate; - var nwOffset = Coordinates.northwestOffset(group, true); - var nwPosition = Coordinates.northwestPosition(group); - var sePosition = Coordinates.southeastPosition(group); - var seOffset = Coordinates.southeastOffset(group, true); - - document.onmousemove = null; - document.onmouseup = null; - group.onDragEnd(nwPosition, sePosition, nwOffset, seOffset); - - if (Drag.isDragging) { - // restoring zIndex before opacity avoids visual flicker in Firefox - group.style["zIndex"] = group.originalZIndex; - group.style["opacity"] = group.originalOpacity; - } - - Drag.group = null; - Drag.isDragging = false; - - return false; - }, - - fixEvent : function(event) { - if (typeof event == 'undefined') event = window.event; - Coordinates.fixEvent(event); - - return event; - } -}; - -/********************************************************** - Adapted from the sortable lists example by Tim Taylor - http://tool-man.org/examples/sorting.html - Modified by Tom Westcott : http://www.cyberdummy.co.uk - **********************************************************/ - -// {{{ BIT_MOD -// add a basic serializer -function serialize(a, count) { - var counter = 0; - var vardef = ""; - var serialized; - // Prototype adds properties to the array - // which the for loop tries to serialize. - if (count > 0) { - for (var key in a) { - counter = counter +1; - var length = a[key].length; - if (length == "undefined") length = 1; - vardef = vardef + "s:" + key.length + ":\"" + key + "\";" + "s:" + length + ":\"" + a[key] + "\";"; - serialized = "a:" + counter + ":{" + vardef + "}"; - // break out early to avoid prototype properties - if (counter == count) { - break; - } - } - } - else { - serialized = "a:0:{}"; - } - - return serialized; -} -// BIT_MOD }}} - -var DragDrop = { - firstContainer : null, - lastContainer : null, - parent_id : null, - parent_group : null, - makeListContainer : function(list, group) { - // each container becomes a linked list node - if (this.firstContainer == null) { - this.firstContainer = this.lastContainer = list; - list.previousContainer = null; - list.nextContainer = null; - } else { - list.previousContainer = this.lastContainer; - list.nextContainer = null; - this.lastContainer.nextContainer = list; - this.lastContainer = list; - } - - // these functions are called when an item is draged over - // a container or out of a container bounds. onDragOut - // is also called when the drag ends with an item having - // been added to the container - list.onDragOver = new Function(); - list.onDragOut = new Function(); - list.onDragDrop = new Function(); - list.group = group; - - var items = list.getElementsByTagName( "li" ); - - for (var i = 0; i < items.length; i++) { - DragDrop.makeItemDragable(items[i]); - } - }, - - // {{{ BIT-MOD - start - // modified out string to make it compatible with eval( $_REQUEST['id'] ); - serData : function ( group, theid ) { - var container = DragDrop.firstContainer; - var hash = new Array(); - - var hashCount = 0; - while(container != null) { - if(theid != null && container.id != theid) { - container = container.nextContainer; - continue; - } - - if(group != null && container.group != group) { - container = container.nextContainer; - continue; - } - - var tmpHash = new Array(); - var tmpHashCount = 0; - var items = container.getElementsByTagName( "li" ); - for(var i = 0; i < items.length; i++) { - tmpHashCount++; - tmpHash[i] = items[i].id; - } - hash[container.id] = serialize(tmpHash, tmpHashCount); - hashCount++; - container = container.nextContainer; - } - var string = ''; - string = serialize(hash, hashCount); - return string; - }, - // }}} BIT_MOD end - - makeItemDragable : function(item) { - Drag.makeDraggable(item); - item.setDragThreshold(5); - - // tracks if the item is currently outside all containers - item.isOutside = false; - - item.onDragStart = DragDrop.onDragStart; - item.onDrag = DragDrop.onDrag; - item.onDragEnd = DragDrop.onDragEnd; - }, - - onDragStart : function(nwPosition, sePosition, nwOffset, seOffset) { - // update all container bounds, since they may have changed - // on a previous drag - // - // could be more smart about when to do this - var container = DragDrop.firstContainer; - while (container != null) { - container.northwest = Coordinates.northwestOffset( container, true ); - container.southeast = Coordinates.southeastOffset( container, true ); - container = container.nextContainer; - } - - // item starts out over current parent - this.parentNode.onDragOver(); - parent_id = this.parentNode.id; - parent_group = this.parentNode.group; - }, - - onDrag : function(nwPosition, sePosition, nwOffset, seOffset) { - // check if we were nowhere - if (this.isOutside) { - // check each container to see if in its bounds - var container = DragDrop.firstContainer; - while (container != null) { - - if ((nwOffset.inside( container.northwest, container.southeast ) || - seOffset.inside( container.northwest, container.southeast )) && container.group == parent_group) { - // we're inside this one - container.onDragOver(); - this.isOutside = false; - - // since isOutside was true, the current parent is a - // temporary clone of some previous container node and - // it needs to be removed from the document - var tempParent = this.parentNode; - tempParent.removeChild( this ); - container.appendChild( this ); - tempParent.parentNode.removeChild( tempParent ); - break; - } - container = container.nextContainer; - } - // we're still not inside the bounds of any container - if (this.isOutside) - return; - - // check if we're outside our parent's bounds - } else if (!(nwOffset.inside( this.parentNode.northwest, this.parentNode.southeast ) || - seOffset.inside( this.parentNode.northwest, this.parentNode.southeast ))) { - - this.parentNode.onDragOut(); - this.isOutside = true; - - // check if we're inside a new container's bounds - var container = DragDrop.firstContainer; - while (container != null) { - if ((nwOffset.inside( container.northwest, container.southeast ) || - seOffset.inside( container.northwest, container.southeast )) && container.group == parent_group) { - // we're inside this one - container.onDragOver(); - this.isOutside = false; - this.parentNode.removeChild( this ); - container.appendChild( this ); - break; - } - container = container.nextContainer; - } - // if we're not in any container now, make a temporary clone of - // the previous container node and add it to the document - if (this.isOutside) { - var tempParent = this.parentNode.cloneNode( false ); - this.parentNode.removeChild( this ); - tempParent.appendChild( this ); - // body puts a border or item at bottom of page if do not have this - tempParent.style.border = 0; - document.getElementsByTagName( "body" ).item(0).appendChild( tempParent ); - return; - } - } - - // if we get here, we're inside some container bounds, so we do - // everything the original dragsort script did to swap us into the - // correct position - - var parent = this.parentNode; - - var item = this; - var next = DragUtils.nextItem(item); - while (next != null && this.offsetTop >= next.offsetTop - 2) { - var item = next; - var next = DragUtils.nextItem(item); - } - if (this != item) { - DragUtils.swap(this, next); - return; - } - - var item = this; - var previous = DragUtils.previousItem(item); - while (previous != null && this.offsetTop <= previous.offsetTop + 2) { - var item = previous; - var previous = DragUtils.previousItem(item); - } - if (this != item) { - DragUtils.swap(this, item); - return; - } - }, - - onDragEnd : function(nwPosition, sePosition, nwOffset, seOffset) { - // if the drag ends and we're still outside all containers - // it's time to remove ourselves from the document or add - // to the trash bin - if (this.isOutside) { - var container = DragDrop.firstContainer; - while (container != null) { - if(container.id == parent_id) { - break; - } - container = container.nextContainer; - } - this.isOutside = false; - this.parentNode.removeChild( this ); - container.appendChild( this ); - this.style["top"] = "0px"; - this.style["left"] = "0px"; - //var container = DragDrop.firstContainer; - //container.appendChild( this ); - return; - } - this.parentNode.onDragOut(); - this.parentNode.onDragDrop(); - this.style["top"] = "0px"; - this.style["left"] = "0px"; - } -}; - -var DragUtils = { - swap : function(item1, item2) { - var parent = item1.parentNode; - parent.removeChild(item1); - parent.insertBefore(item1, item2); - - item1.style["top"] = "0px"; - item1.style["left"] = "0px"; - }, - - nextItem : function(item) { - var sibling = item.nextSibling; - while (sibling != null) { - if (sibling.nodeName == item.nodeName) return sibling; - sibling = sibling.nextSibling; - } - return null; - }, - - previousItem : function(item) { - var sibling = item.previousSibling; - while (sibling != null) { - if (sibling.nodeName == item.nodeName) return sibling; - sibling = sibling.previousSibling; - } - return null; - } -}; diff --git a/javascript/libs/dynarch/jscalendar/ChangeLog b/javascript/libs/dynarch/jscalendar/ChangeLog deleted file mode 100644 index 712f773..0000000 --- a/javascript/libs/dynarch/jscalendar/ChangeLog +++ /dev/null @@ -1,761 +0,0 @@ -2005-03-07 Mihai Bazon <mihai_bazon@yahoo.com> - - * skins/aqua/theme.css: *** empty log message *** - - * release-notes.html: updated release notes - - * calendar-setup.js: - use a better approach to initialize the calendar--don't call _init twice, - it's the most time consuming function in the calendar. Instead, determine - the date beforehand if possible and pass it to the calendar at constructor. - - * calendar.js: - avoid keyboard operation when 'multiple dates' is set (very buggy for now) - - * calendar.js: - fixed keyboard handling problems: now it works fine when "showsOtherMonths" - is passed; it also seems to be fine with disabled dates (won't normally - allow selection)--however this area is still likely to be buggy, i.e. in a - month that has all the dates disabled. - - * calendar.js: - some trivial performance improvements in the _init function - Added Date.parseDate (old Calendar.prototype.parseDate now calls this one) - -2005-03-05 Mihai Bazon <mihai_bazon@yahoo.com> - - * release-notes.html: updated release notes - - * dayinfo.html: *** empty log message *** - - * calendar-setup.js: - bugfix--update an inputField even if flat calendar is selected - - * calendar.js: - fixed bugs in parseDate function (if for some reason the input string is - totally broken, then check numbers for NaN and use values from the current - date instead) - - * make-release.pl: copy the skins subdirectory and all skins - - * index.html: added Aqua skin - - * skins/aqua/active-bg.gif, skins/aqua/dark-bg.gif, skins/aqua/hover-bg.gif, skins/aqua/menuarrow.gif, skins/aqua/normal-bg.gif, skins/aqua/rowhover-bg.gif, skins/aqua/status-bg.gif, skins/aqua/theme.css, skins/aqua/title-bg.gif, skins/aqua/today-bg.gif: - in the future, skins will go to this directory, each in a separate subdir; for now there's only Aqua, an excellent new skin - - * calendar.js: workaround IE bug, needed in the Aqua theme - don't hide select elements unless browser is IE or Opera - - * lang/calendar-bg.js, lang/calendar-big5-utf8.js, lang/calendar-big5.js, lang/calendar-br.js, lang/calendar-ca.js, lang/calendar-cs-utf8.js, lang/calendar-cs-win.js, lang/calendar-da.js, lang/calendar-de.js, lang/calendar-el.js, lang/calendar-en.js, lang/calendar-es.js, lang/calendar-fi.js, lang/calendar-fr.js, lang/calendar-he-utf8.js, lang/calendar-hu.js, lang/calendar-it.js, lang/calendar-ko-utf8.js, lang/calendar-ko.js, lang/calendar-lt-utf8.js, lang/calendar-lt.js, lang/calendar-lv.js, lang/calendar-nl.js, lang/calendar-no.js, lang/calendar-pl-utf8.js, lang/calendar-pl.js, lang/calendar-pt.js, lang/calendar-ro.js, lang/calendar-ru.js, lang/calendar-ru_win_.js, lang/calendar-si.js, lang/calendar-sk.js, lang/calendar-sp.js, lang/calendar-sv.js, lang/calendar-zh.js, lang/cn_utf8.js: - updated urls, copyright notices - - * doc/reference.tex: updated documentation - - * calendar.js, index.html: - renamed the global variable to _dynarch_popupCalendar to avoid name clashes - - * multiple-dates.html: start with an empty array - - * calendar.js: - fixed bugs in the time selector (12:XX pm was wrongfully understood as 12:XX am) - - * calendar.js: - using innerHTML instead of text nodes; works better in Safari and also makes - a smaller, cleaner code - -2005-03-04 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: - fixed a performance regression that occurred after adding support for multiple dates - fixed the time selection bug (now it keeps time correctly) - clicking today will close the calendar if "today" is already selected - - * lang/cn_utf8.js: new translation - -2005-02-17 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-ar-utf8.zip: Added arabic translation - -2004-10-19 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-zh.js: updated - -2004-09-20 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-no.js: updated (Daniel Holmen) - -2004-09-20 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-no.js: updated (Daniel Holmen) - -2004-08-11 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-nl.js: updated language file (thanks to Arjen Duursma) - - * lang/calendar-sp.js: updated (thanks to Rafael Velasco) - -2004-07-21 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-br.js: updated - - * calendar-setup.js: fixed bug (dateText) - -2004-07-21 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-br.js: updated - - * calendar-setup.js: fixed bug (dateText) - -2004-07-04 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-lv.js: - added LV translation (thanks to Juris Valdovskis) - -2004-06-25 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: - fixed bug in IE (el.calendar.tooltips is null or not an object) - -2004-06-24 Mihai Bazon <mihai_bazon@yahoo.com> - - * doc/reference.tex: fixed latex compilation - - * index.html: linking other sample files - - * calendar-setup.js, calendar.js, dayinfo.html: - ability to display day info (dateText parameter) + sample file - -2004-06-23 Mihai Bazon <mihai_bazon@yahoo.com> - - * doc/reference.tex, lang/calendar-bg.js, lang/calendar-br.js, lang/calendar-ca.js, lang/calendar-en.js, lang/calendar-es.js, lang/calendar-fr.js, lang/calendar-it.js, lang/calendar-ko-utf8.js, lang/calendar-ko.js, lang/calendar-nl.js, lang/calendar-sv.js, README, calendar.js, index.html: - email address changed - -2004-06-14 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-cs-utf8.js, lang/calendar-cs-win.js: - updated translations - - * calendar-system.css: added z-index to drop downs - - * lang/calendar-en.js: - first day of week can now be part of the language file - - * lang/calendar-es.js: - updated language file (thanks to Servilio Afre Puentes) - - * calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-tas.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css, calendar-blue.css: - added z-index property to drop downs (fixes bug) - -2004-06-13 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar-setup.js: fixed bug (apply showOthers to flat calendars too) - -2004-06-06 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar-setup.js: - firstDay defaults to "null", in which case the value in the language file - will be used - - * calendar.js: - firstDayOfWeek can now default to a value specified in the language definition file - - * index.html: first day of week is now numeric - -2004-06-02 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: added date tooltip function - -2004-05-28 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-br.js: updated (thanks to Marcos Pont) - - * calendar-setup.js: fixed small bug - -2004-05-01 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar-setup.js: returns the calendar object - -2004-04-28 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar-setup.js: - patch to read the date value from the inputField, according to ifFormat (if - both are passed), for flat calendars. (thanks Colin T. Hill) - -2004-04-20 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar-setup.js, calendar.js, multiple-dates.html: - added support for multiple dates selection - - * lang/calendar-nl.js: - updated Dutch translation, thanks to Jeroen Wolsink - - * lang/calendar-big5-utf8.js, lang/calendar-big5.js: - Traditional Chinese language (thanks GaryFu) - -2004-03-26 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-fr.js, lang/calendar-pt.js: updated - - * lang/calendar-ru_win_.js, lang/calendar-ru.js: - updated, thanks to Sly Golovanov - -2004-03-25 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-fr.js: updated (thanks to David Duret) - -2004-03-24 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-da.js: updated (thanks to Michael Thingmand Henriksen) - -2004-03-21 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-ca.js: updated (thanks to David Valls) - -2004-03-17 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-de.js: updated to UTF8 (thanks to Jack (tR)) - -2004-03-09 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-bg.js: Bulgarian translation - -2004-03-08 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-he-utf8.js: Hebrew translation (thanks to Idan Sofer) - - * lang/calendar-hu.js: updated (thanks to Istvan Karaszi) - -2004-02-27 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-it.js: updated (thanks to Fabio Di Bernardini) - -2004-02-25 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: fix for Safari (thanks to Olivier Chirouze / XPWeb) - -2004-02-22 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-al.js: Albanian language file - -2004-02-17 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-fr.js: fixed - - * lang/calendar-fr.js: - FR translation updated (thanks to SIMON Alexandre) - - * lang/calendar-es.js: ES translation updated, thanks to David Gonzales - -2004-02-10 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-pt.js: - updated Portugese translation, thanks to Elcio Ferreira - -2004-02-09 Mihai Bazon <mihai_bazon@yahoo.com> - - * TODO: updated - -2004-02-06 Mihai Bazon <mihai_bazon@yahoo.com> - - * README: describe the PHP files - - * make-release.pl: includes php files - - * make-release.pl: ChangeLog included in the distribution (if found) - - * calendar.js, doc/reference.tex, index.html: switched to version 0.9.6 - - * doc/Calendar.setup.tex, doc/reference.tex: updated documentation - - * release-notes.html: updated release notes - - * calendar.js: Fixed bug: Feb/29 and year change now keeps Feb in view - - * calendar.js: fixed the "ESC" problem (call the close handler) - - * calendar.js: fixed day of year range (1 to 366 instead of 0 to 365) - - * calendar.js: fixed week number calculations - - * doc/reference.tex: fixed (date input format) - - * calendar.php: removed comment - - * calendar-blue.css, calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-tas.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css, calendar.js: - workaround for IE bug (you can't normally specify through CSS the style for - an element having two classes or more; we had to change a classname) - - * calendar-blue.css, calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-tas.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css: - smaller fonts on days that are in neighbor months - -2004-02-04 Mihai Bazon <mihai_bazon@yahoo.com> - - * index.html: first demo shows the "showOtherMonths" capability - - * calendar-setup.js: support new parameters in the calendar. - added: firstDay, showOthers, cache. - - * calendar-blue.css, calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css, calendar.js, lang/calendar-en.js, lang/calendar-ro.js: - new parameters: firstDayOfWeek, showsOtherMonths; removed mondayFirst. - This adds support for setting any day to be the first day of week (by just - clicking the day name in the display); also, if showsOtherMonths is enabled - then dates belonging to adjacent months that are in the current view will be - displayed and the calendar will have a fixed height. - - all themes updated. - - * test.php: test for calendar.php - - * calendar.php: fixed bug (pass numeric values as numbers) - -2004-02-01 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.php: added PHP wrapper - - * img.gif: icon updated - - * TODO: updated TODO list - -2004-01-27 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: - Janusz Piwowarski sent over a patch for IE5 compatibility which is much more - elegant than the atrocities that I had wrote :-D I'm gettin' old.. Thanks Janusz! - - * lang/calendar-fi.js: updated - -2004-01-15 Mihai Bazon <mihai_bazon@yahoo.com> - - * TODO: updated TODO list - - * calendar-setup.js: default align changed to "Br" - - * doc/reference.tex: changed default value for "align" - - * calendar-setup.js: calling onchange event handler, if available - - * calendar-setup.js: added "position" option - - * simple-1.html: demonstrates "step" option - - * calendar-setup.js: added "step" option - - * calendar.js: added yearStep config parameter - - * calendar.js: - fixed parseDate routine (the NaN bug which occurred when there was a space - after the date and no time) - -2004-01-14 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-en.js: added "Time:" - - * test-position.html: test for the new position algorithm - - * index.html: do not destroy() the calendar - avoid bug in parseDate (%p must be separated by non-word characters) - - * menuarrow2.gif: for calendar-blue2.css - - * calendar-setup.js: honor "date" parameter if passed - - * calendar.js: IE5 support is back - performance improvements in IE6 (mouseover combo boxes) - display "Time:" beside the clock area, if defined in the language file - new positioning algorithm (try to keep the calendar in page) - rewrote parseDate a little cleaner - - * lang/calendar-el.js: - updated Greek translation (thanks Alexandros Pappas) - -2004-01-13 Mihai Bazon <mihai_bazon@yahoo.com> - - * index.html: added style blue2, using utf-8 instead of iso-8859-2 - - * calendar.js: performance under IE (which sucks, by the way) - - * doc/reference.tex: Sunny added to sponsor list - - * doc/Calendar.setup.tex: documenting parameter 'electric' - - * calendar-blue.css, calendar-blue2.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css: - fixed IE text size problems - -2004-01-08 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-pl.js: - Polish translation updated to UTF-8 (thanks to Artur Filipiak) - -2004-01-07 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-si.js: updated (David Milost) - - * lang/calendar-si.js: Slovenian translation (thanks to David Milost) - -2003-12-21 Mihai Bazon <mihai_bazon@yahoo.com> - - * TODO: updated TODO list - - * lang/calendar-de.js: German translation (thanks to Peter Strotmann) - -2003-12-19 Mihai Bazon <mihai_bazon@yahoo.com> - - * doc/reference.tex: Thank you, Ian Barrak - -2003-12-18 Mihai Bazon <mihai_bazon@yahoo.com> - - * doc/reference.tex: fixed documentation bug (thanks Mike) - -2003-12-05 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-ko-utf8.js: - UTF8 version of the Korean language (hopefully correct) - - * lang/calendar-pl-utf8.js, lang/calendar-pl.js: - updated Polish translation (thanks to Janusz Piwowarski) - -2003-12-04 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-fr.js: - French translation updated (thanks to Angiras Rama) - -2003-11-22 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-da.js: updated (thanks to Jesper M. Christensen) - -2003-11-20 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar-blue2.css, calendar-tas.css: - new styles (thanks to Wendall Mosemann for blue2, Mark Lynch for tas) - - * lang/calendar-lt-utf8.js, lang/calendar-lt.js: - Lithuanian translation (thanks to Martynas Majeris) - - * lang/calendar-sp.js: updated - -2003-11-17 Mihai Bazon <mihai_bazon@yahoo.com> - - * TODO: added TODO list - -2003-11-14 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-ko.js: Korean translation (thanks to Yourim Yi) - -2003-11-12 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-jp.js: small bug fixed (thanks to TAHARA Yusei) - -2003-11-10 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-fr.js: translation updated, thanks to Florent Ramiere - - * calendar-setup.js: - added new parameter: electric (if false then the field will not get updated on each move) - - * index.html: fixed DOCTYPE - -2003-11-07 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar-setup.js: - fixed minor problem (maybe we're passing object reference instead of ID for - the flat calendar parent) - -2003-11-06 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-fi.js: - added Finnish translation (thanks to Antti Tuppurainen) - -2003-11-05 Mihai Bazon <mihai_bazon@yahoo.com> - - * release-notes.html: fixed typo - - * doc/reference.tex, index.html, calendar.js: 0.9.5 - - * README: fixed license statement - - * release-notes.html: updated release notes (0.9.5) - -2003-11-03 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-de.js: - updated German translation (thanks to Gerhard Neiner) - - * calendar-setup.js: fixed license statement - - * calendar.js: whitespace - - * calendar.js: fixed license statement - - * calendar.js: - fixed positioning problem when input field is inside scrolled divs - -2003-11-01 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-af.js: Afrikaan language (thanks to Derick Olivier) - -2003-10-31 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-it.js: - updated IT translation (thanks to Christian Blaser) - - * lang/calendar-es.js: updated ES translation, thanks to Raul - -2003-10-30 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-hu.js: updated thanks to Istvan Karaszi - - * index.html, simple-1.html, simple-2.html, simple-3.html: - switched to utf-8 all encodings - - * lang/calendar-sk.js: - added Slovak translation (thanks to Peter Valach) - - * lang/calendar-ro.js: switched to utf-8 - -2003-10-29 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-es.js: - updated translation, thanks to Jose Ma. Martinez Miralles - - * doc/reference.tex: - fixed the footnote problem (thanks Dominique de Waleffe for the tip) - - * lang/calendar-ro.js: fixed typo - - * lang/calendar-sv.js: oops, license should be LGPL - - * lang/calendar-sw.js: new swedish translation is calendar-sv.js - - * menuarrow.gif, menuarrow.png: - oops, forgot little drop-down menu arrows - - * lang/calendar-sv.js: swedish translation thanks to Leonard Norrgard - - * index.html: oops, some other minor changes - - * index.html, release-notes.html: - latest changes in release-notes and index page for 0.9.4 - - * doc/reference.tex, calendar.js: - added %s date format (# of seconds since Epoch) - - * calendar.js: - A click on TODAY will not close the calendar, even in single-click mode - -2003-10-28 Mihai Bazon <mihai_bazon@yahoo.com> - - * index.html: previous cal.html - - * cal.html: moved to index.html - - * README, cal.html, doc/reference.tex, lang/calendar-de.js, lang/calendar-en.js, lang/calendar-ro.js, release-notes.html: - LGPL license, forever. - - * doc/Calendar.setup.tex, simple-1.html: - doc updated for the onUpdate parameter to Calendar.setup - -2003-10-26 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: fixed bug (correct display of the dropdown menus) - - * doc/Calendar.setup.tex, doc/reference.tex, lang/calendar-de.js, lang/calendar-en.js, lang/calendar-ro.js, README, cal.html, calendar-blue.css, calendar-brown.css, calendar-green.css, calendar-setup.js, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css, calendar.js, release-notes.html, simple-1.html, simple-3.html: - lots of changes for the 0.9.4 release (see the release-notes.html) - -2003-10-15 Mihai Bazon <mihai_bazon@yahoo.com> - - * doc/reference.tex: - documentation updated for 0.9.4 (not yet finished though) - -2003-10-07 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js, doc/reference.tex, release-notes.html, README, cal.html, calendar-setup.js: - modified project website - -2003-10-06 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar-setup.js: - added some properties (onSelect, onClose, date) (thanks altblue) - -2003-09-24 Mihai Bazon <mihai_bazon@yahoo.com> - - * simple-3.html: dateIsSpecial does not need the "date" argument ;-) - -2003-09-24 fsoft <fsoft@mishoo> - - * calendar.js, simple-3.html: - added year, month, day to getDateStatus() function - -2003-09-24 Mihai Bazon <mihai_bazon@yahoo.com> - - * simple-3.html: example on how to use special dates - - * calendar-setup.js, calendar.js, simple-1.html: - support for special dates (thanks fabio) - -2003-09-17 Mihai Bazon <mihai_bazon@yahoo.com> - - * doc/reference.tex: fixed error in section 3. - -2003-08-01 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-jp.js: added Japanese translation - -2003-07-16 Mihai Bazon <mihai_bazon@yahoo.com> - - * simple-1.html: fixed problem with first example [IE,Opera] - -2003-07-09 Mihai Bazon <mihai_bazon@yahoo.com> - - * doc/Calendar.setup.tex: fixed typo (closing parenthesis) - - * lang/calendar-de.js: - added German translation, thanks to Hartwig Weinkauf - -2003-07-08 Mihai Bazon <mihai_bazon@yahoo.com> - - * cal.html: added link to release-notes - - * release-notes.html: 0.9.3 release notes - - * make-release.pl: - Script to create distribution archive. It needs some additional packages: - - - LaTeX - - tex2page - - jscrunch (JS compressor) - - * doc/html/makedoc.sh, doc/html/reference.css, doc/reference.tex, doc/makedoc.sh: - documentation updates... - - * calendar.js: added semicolon to make the code "compressible" - -2003-07-06 Mihai Bazon <mihai_bazon@yahoo.com> - - * doc/reference.tex: spell checked - - * doc/reference.tex: [minor] changed credits order - - * doc/reference.tex: various improvements and additions - - * doc/html/reference.css: minor eye-candy tweaks - -2003-07-05 Mihai Bazon <mihai_bazon@yahoo.com> - - * doc/html/Calendar.setup.html.tex, doc/html/makedoc.sh, doc/html/reference.css, doc/html/reference.t2p, doc/hyperref.cfg, doc/makedoc.sh, doc/reference.tex, doc/Calendar.setup.tex, doc/Calendar.setup.pdf.tex: - full documentation in LaTeX, for PDF and HTML formats - - * simple-2.html: - added demonstration of flat calendar with Calendar.setup - - * simple-1.html: - modified some links, added link to documentation, added demonstration of - disableFunc property - - * calendar-setup.js: added the ability to create flat calendar too - - * cal.html: added links to documentation and simple-[12].html pages - - * README: up-to-date... - - * calendar-setup.html: removed: the documentation is unified - -2003-07-03 Mihai Bazon <mihai_bazon@yahoo.com> - - * cal.html: some links to newly added files - - * calendar-setup.html, calendar-setup.js, img.gif, simple-1.html: - added some files to simplify calendar creation for non-(JS)-programmers - - * lang/calendar-zh.js: added simplified chinese (thanks ATang) - -2003-07-02 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: * "yy"-related... [small fix] - - * calendar.js: - * #721833 fixed (yy format will understand years prior to 29 as 20xx) - - * calendar.js: * added refresh() function - - * calendar.js: * fixed bug when in single click mode - * added alignment options to "showAtElement" member function - -2003-06-25 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-pt.js: - added portugese translation (thanks Nuno Barreto) - -2003-06-24 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: - call user handler when the date was changed using the keyboard - - * bugtest-hidden-selects.html: - file to test bug with hidden select-s (thanks Ying Zhang for reporting and for this test file) - - * lang/calendar-hr-utf8.js: - added croatian translation in utf8 (thanks Krunoslav Zubrinic) - -2003-06-23 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-hu.js: added hungarian translation - - * lang/calendar-hr.js: - added croatian translation (thanks to Krunoslav Zubrinic) - -2003-06-22 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: - * #723335 fixed (clicking TODAY will not select the today date if the - disabledHandler rejects it) - - * cal.html: * new code for to work with fix for bug #703238 - * switch to new version - - * calendar.js: - * some patches to make code compatible with Opera 7 (well, almost compatible) - * bug #703238 fixed (fix breaks compatibility with older code that uses - calendar in single-click mode) - * bug #703814 fixed - -2003-04-09 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-tr.js: added turkish lang file - -2003-03-19 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-ru.js: russian translation added - - * lang/calendar-no.js: norwegian translation added - -2003-03-15 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-no.js: norwegian translation - -2003-03-12 Mihai Bazon <mihai_bazon@yahoo.com> - - * lang/calendar-pl.js: added polish translation - -2003-03-11 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js: - bugfix in parseDate (added base to parseInt, thanks Alan!) - -2003-03-05 Mihai Bazon <mihai_bazon@yahoo.com> - - * calendar.js, lang/calendar-br.js, lang/calendar-ca.js, lang/calendar-cs-win.js, lang/calendar-da.js, lang/calendar-du.js, lang/calendar-el.js, lang/calendar-en.js, lang/calendar-es.js, lang/calendar-fr.js, lang/calendar-it.js, lang/calendar-nl.js, lang/calendar-ro.js, lang/calendar-sp.js, lang/calendar-sw.js: - New file. - - * calendar.js, lang/calendar-br.js, lang/calendar-ca.js, lang/calendar-cs-win.js, lang/calendar-da.js, lang/calendar-du.js, lang/calendar-el.js, lang/calendar-en.js, lang/calendar-es.js, lang/calendar-fr.js, lang/calendar-it.js, lang/calendar-nl.js, lang/calendar-ro.js, lang/calendar-sp.js, lang/calendar-sw.js: - moved to CVS at sourceforge.net - release: 0.9.2 + new language packs - - - * README, cal.html, calendar-blue.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css: - New file. - - * README, cal.html, calendar-blue.css, calendar-brown.css, calendar-green.css, calendar-system.css, calendar-win2k-1.css, calendar-win2k-2.css, calendar-win2k-cold-1.css, calendar-win2k-cold-2.css: - moved to CVS at sourceforge.net - release: 0.9.2 + new language packs - - diff --git a/javascript/libs/dynarch/jscalendar/README b/javascript/libs/dynarch/jscalendar/README deleted file mode 100644 index 455ab3d..0000000 --- a/javascript/libs/dynarch/jscalendar/README +++ /dev/null @@ -1,33 +0,0 @@ -The DHTML Calendar -------------------- - - Author: Mihai Bazon, <mihai_bazon@yahoo.com> - http://dynarch.com/mishoo/ - - This program is free software published under the - terms of the GNU Lesser General Public License. - - For the entire license text please refer to - http://www.gnu.org/licenses/lgpl.html - -Contents ---------- - - calendar.js -- the main program file - lang/*.js -- internalization files - *.css -- color themes - cal.html -- example usage file - doc/ -- documentation, in PDF and HTML - simple-1.html -- quick setup examples [popup calendars] - simple-2.html -- quick setup example for flat calendar - calendar.php -- PHP wrapper - test.php -- test file for the PHP wrapper - -Homepage ---------- - - For details and latest versions please refer to calendar - homepage, located on my website: - - http://dynarch.com/mishoo/calendar.epl - diff --git a/javascript/libs/dynarch/jscalendar/bugtest-hidden-selects.html b/javascript/libs/dynarch/jscalendar/bugtest-hidden-selects.html deleted file mode 100644 index df35337..0000000 --- a/javascript/libs/dynarch/jscalendar/bugtest-hidden-selects.html +++ /dev/null @@ -1,108 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ro" lang="ro">
-
-<head>
-<title>Bug</title>
-<link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-1.css" title="win2k-1" />
-
-<!-- import the calendar script -->
-<script type="text/javascript" src="calendar.js"></script>
-
-<!-- import the language module -->
-<script type="text/javascript" src="lang/calendar-en.js"></script>
-
-<!-- helper script that uses the calendar -->
-<script type="text/javascript">
-// This function gets called when the end-user clicks on some date.
-function selected(cal, date) {
- cal.sel.value = date; // just update the date in the input field.
- if (cal.sel.id == "sel1" || cal.sel.id == "sel3")
- // if we add this call we close the calendar on single-click.
- // just to exemplify both cases, we are using this only for the 1st
- // and the 3rd field, while 2nd and 4th will still require double-click.
- cal.callCloseHandler();
-}
-
-// And this gets called when the end-user clicks on the _selected_ date,
-// or clicks on the "Close" button. It just hides the calendar without
-// destroying it.
-function closeHandler(cal) {
- cal.hide(); // hide the calendar
-}
-
-// This function shows the calendar under the element having the given id.
-// It takes care of catching "mousedown" signals on document and hiding the
-// calendar if the click was outside.
-function showCalendar(id, format) {
- var el = document.getElementById(id);
- if (calendar != null) {
- // we already have some calendar created
- calendar.hide(); // so we hide it first.
- } else {
- // first-time call, create the calendar.
- var cal = new Calendar(false, null, selected, closeHandler);
- // uncomment the following line to hide the week numbers
- // cal.weekNumbers = false;
- calendar = cal; // remember it in the global var
- cal.setRange(1900, 2070); // min/max year allowed.
- cal.create();
- }
- calendar.setDateFormat(format); // set the specified date format
- calendar.parseDate(el.value); // try to parse the text in field
- calendar.sel = el; // inform it what input field we use
- calendar.showAtElement(el); // show the calendar below it
-
- return false;
-}
-
-var MINUTE = 60 * 1000;
-var HOUR = 60 * MINUTE;
-var DAY = 24 * HOUR;
-var WEEK = 7 * DAY;
-
-// If this handler returns true then the "date" given as
-// parameter will be disabled. In this example we enable
-// only days within a range of 10 days from the current
-// date.
-// You can use the functions date.getFullYear() -- returns the year
-// as 4 digit number, date.getMonth() -- returns the month as 0..11,
-// and date.getDate() -- returns the date of the month as 1..31, to
-// make heavy calculations here. However, beware that this function
-// should be very fast, as it is called for each day in a month when
-// the calendar is (re)constructed.
-function isDisabled(date) {
- var today = new Date();
- return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
-}
-</script>
-</head>
-
-<body>
-<form>
-<b>Date:</b>
-<br>
-<input type="text" name="date1" id="sel1" size="30">
-<input type="button" value="..." onclick="return showCalendar('sel1', 'y-m-d');">
-<p>
-<br>
-<br><b>Visible <select>, hides and unhides as expected</b>
-<br>
-<select name="foo" multiple>
-<option value="1">can use the functions date.getFullYear() -- returns</option>
-<option value="2">4 digit number, date.getMonth() -- returns the month</option>
-<option value="3">heavy calculations here. However, beware that this</option>
-</select>
-
-<p>
-<br><b>Hidden <select>, it should stay hidden (but doesn't)</b>
-<br>
-<select name="foo2" multiple style="visibility: hidden">
-<option value="1">this should</option>
-<option value="2">remain hidden right?</option>
-</select>
-
-<p>
-<br><b>Hidden textbox below, it stays hidden as expected</b>
-<br>
-<input type="text" name="foo3" value="this stays hidden just fine" style="visibility: hidden">
-</form>
-</body></html>
diff --git a/javascript/libs/dynarch/jscalendar/calendar-blue.css b/javascript/libs/dynarch/jscalendar/calendar-blue.css deleted file mode 100644 index ca33cde..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-blue.css +++ /dev/null @@ -1,232 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #556; - font-size: 11px; - color: #000; - cursor: default; - background: #eef; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ -} - -.calendar .nav { - background: #778 url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - background: #fff; - color: #000; - padding: 2px; -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ - background: #778; - color: #fff; -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ - background: #bdf; -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #556; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #a66; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background-color: #aaf; - color: #000; - border: 1px solid #04f; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background-color: #77c; - padding: 2px 0px 0px 2px; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - color: #456; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #bbb; -} -.calendar tbody .day.othermonth.oweekend { - color: #fbb; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #bdf; -} - -.calendar tbody .rowhilite td { - background: #def; -} - -.calendar tbody .rowhilite td.wn { - background: #eef; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - background: #def; - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - background: #cde; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #fff; - color: #000; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #a66; -} - -.calendar tbody td.today { /* Cell showing selected date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ - text-align: center; - background: #556; - color: #fff; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - background: #fff; - color: #445; - border-top: 1px solid #556; - padding: 1px; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #aaf; - border: 1px solid #04f; - color: #000; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #77c; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #655; - background: #def; - color: #000; - font-size: 90%; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .hilite { - background: #acf; -} - -.calendar .combo .active { - border-top: 1px solid #46a; - border-bottom: 1px solid #46a; - background: #eef; - font-weight: bold; -} - -.calendar td.time { - border-top: 1px solid #000; - padding: 1px 0px; - text-align: center; - background-color: #f4f0e8; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #889; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #667; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar-blue2.css b/javascript/libs/dynarch/jscalendar/calendar-blue2.css deleted file mode 100644 index 47128ec..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-blue2.css +++ /dev/null @@ -1,236 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #206A9B; - font-size: 11px; - color: #000; - cursor: default; - background: #F1F8FC; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ -} - -.calendar .nav { - background: #007ED1 url(menuarrow2.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - background: #000; - color: #fff; - padding: 2px; -} - -.calendar thead tr { /* Row <TR> containing navigation buttons */ - background: #007ED1; - color: #fff; -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ - background: #C7E1F3; -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #206A9B; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #a66; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background-color: #34ABFA; - color: #000; - border: 1px solid #016DC5; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background-color: #006AA9; - border: 1px solid #008AFF; - padding: 2px 0px 0px 2px; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - color: #456; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #bbb; -} -.calendar tbody .day.othermonth.oweekend { - color: #fbb; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #C7E1F3; -} - -.calendar tbody .rowhilite td { - background: #def; -} - -.calendar tbody .rowhilite td.wn { - background: #F1F8FC; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - background: #def; - padding: 1px 3px 1px 1px; - border: 1px solid #8FC4E8; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - background: #cde; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #fff; - color: #000; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #a66; -} - -.calendar tbody td.today { /* Cell showing selected date */ - font-weight: bold; - color: #D50000; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ - text-align: center; - background: #206A9B; - color: #fff; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - background: #000; - color: #fff; - border-top: 1px solid #206A9B; - padding: 1px; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #B8DAF0; - border: 1px solid #178AEB; - color: #000; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #006AA9; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #655; - background: #def; - color: #000; - font-size: 90%; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .hilite { - background: #34ABFA; - border-top: 1px solid #46a; - border-bottom: 1px solid #46a; - font-weight: bold; -} - -.calendar .combo .active { - border-top: 1px solid #46a; - border-bottom: 1px solid #46a; - background: #F1F8FC; - font-weight: bold; -} - -.calendar td.time { - border-top: 1px solid #000; - padding: 1px 0px; - text-align: center; - background-color: #E3F0F9; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #889; - font-weight: bold; - background-color: #F1F8FC; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #267DB7; - color: #fff; -} - -.calendar td.time span.active { - border-color: red; - background-color: #000; - color: #A5FF00; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar-brown.css b/javascript/libs/dynarch/jscalendar/calendar-brown.css deleted file mode 100644 index c42da5e..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-brown.css +++ /dev/null @@ -1,225 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #655; - font-size: 11px; - color: #000; - cursor: default; - background: #ffd; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ -} - -.calendar .nav { - background: #edc url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - background: #654; - color: #fed; - padding: 2px; -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ - background: #edc; - color: #000; -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #655; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background-color: #faa; - color: #000; - border: 1px solid #f40; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background-color: #c77; - padding: 2px 0px 0px 2px; -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ - background: #fed; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #bbb; -} -.calendar tbody .day.othermonth.oweekend { - color: #fbb; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #fed; -} - -.calendar tbody .rowhilite td { - background: #ddf; -} - -.calendar tbody .rowhilite td.wn { - background: #efe; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - background: #ffe; - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - background: #ddc; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #fea; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { font-weight: bold; } - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ - text-align: center; - background: #988; - color: #000; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - border-top: 1px solid #655; - background: #dcb; - color: #840; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #faa; - border: 1px solid #f40; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #c77; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #655; - background: #ffe; - color: #000; - font-size: 90%; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .hilite { - background: #fc8; -} - -.calendar .combo .active { - border-top: 1px solid #a64; - border-bottom: 1px solid #a64; - background: #fee; - font-weight: bold; -} - -.calendar td.time { - border-top: 1px solid #a88; - padding: 1px 0px; - text-align: center; - background-color: #fed; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #988; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #866; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar-green.css b/javascript/libs/dynarch/jscalendar/calendar-green.css deleted file mode 100644 index 2e1867a..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-green.css +++ /dev/null @@ -1,229 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #565; - font-size: 11px; - color: #000; - cursor: default; - background: #efe; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ - background: #676; - color: #fff; - font-size: 90%; -} - -.calendar .nav { - background: #676 url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - padding: 2px; - background: #250; - color: #efa; -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #565; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #a66; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background-color: #afa; - color: #000; - border: 1px solid #084; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background-color: #7c7; - padding: 2px 0px 0px 2px; -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ - background: #dfb; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - color: #564; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #bbb; -} -.calendar tbody .day.othermonth.oweekend { - color: #fbb; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #8a8; - background: #dfb; -} - -.calendar tbody .rowhilite td { - background: #dfd; -} - -.calendar tbody .rowhilite td.wn { - background: #efe; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - background: #efd; - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - background: #dec; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #f8fff8; - color: #000; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #a66; -} - -.calendar tbody td.today { font-weight: bold; color: #0a0; } - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ - text-align: center; - background: #565; - color: #fff; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - padding: 2px; - background: #250; - color: #efa; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #afa; - border: 1px solid #084; - color: #000; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #7c7; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #565; - background: #efd; - color: #000; - font-size: 90%; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .hilite { - background: #af8; -} - -.calendar .combo .active { - border-top: 1px solid #6a4; - border-bottom: 1px solid #6a4; - background: #efe; - font-weight: bold; -} - -.calendar td.time { - border-top: 1px solid #8a8; - padding: 1px 0px; - text-align: center; - background-color: #dfb; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #898; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #686; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar-setup.js b/javascript/libs/dynarch/jscalendar/calendar-setup.js deleted file mode 100644 index 952ead5..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-setup.js +++ /dev/null @@ -1,200 +0,0 @@ -/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/ - * --------------------------------------------------------------------------- - * - * The DHTML Calendar - * - * Details and latest version at: - * http://dynarch.com/mishoo/calendar.epl - * - * This script is distributed under the GNU Lesser General Public License. - * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html - * - * This file defines helper functions for setting up the calendar. They are - * intended to help non-programmers get a working calendar on their site - * quickly. This script should not be seen as part of the calendar. It just - * shows you what one can do with the calendar, while in the same time - * providing a quick and simple method for setting it up. If you need - * exhaustive customization of the calendar creation process feel free to - * modify this code to suit your needs (this is recommended and much better - * than modifying calendar.js itself). - */ - -// $Id: calendar-setup.js,v 1.1 2008/12/19 17:34:04 spiderr Exp $ - -/** - * This function "patches" an input field (or other element) to use a calendar - * widget for date selection. - * - * The "params" is a single object that can have the following properties: - * - * prop. name | description - * ------------------------------------------------------------------------------------------------- - * inputField | the ID of an input field to store the date - * displayArea | the ID of a DIV or other element to show the date - * button | ID of a button or other element that will trigger the calendar - * eventName | event that will trigger the calendar, without the "on" prefix (default: "click") - * ifFormat | date format that will be stored in the input field - * daFormat | the date format that will be used to display the date in displayArea - * singleClick | (true/false) wether the calendar is in single click mode or not (default: true) - * firstDay | numeric: 0 to 6. "0" means display Sunday first, "1" means display Monday first, etc. - * align | alignment (default: "Br"); if you don't know what's this see the calendar documentation - * range | array with 2 elements. Default: [1900, 2999] -- the range of years available - * weekNumbers | (true/false) if it's true (default) the calendar will display week numbers - * flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID - * flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar) - * disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar - * onSelect | function that gets called when a date is selected. You don't _have_ to supply this (the default is generally okay) - * onClose | function that gets called when the calendar is closed. [default] - * onUpdate | function that gets called after the date is updated in the input field. Receives a reference to the calendar. - * date | the date that the calendar will be initially displayed to - * showsTime | default: false; if true the calendar will include a time selector - * timeFormat | the time format; can be "12" or "24", default is "12" - * electric | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close - * step | configures the step of the years in drop-down boxes; default: 2 - * position | configures the calendar absolute position; default: null - * cache | if "true" (but default: "false") it will reuse the same calendar object, where possible - * showOthers | if "true" (but default: "false") it will show days from other months too - * - * None of them is required, they all have default values. However, if you - * pass none of "inputField", "displayArea" or "button" you'll get a warning - * saying "nothing to setup". - */ -Calendar.setup = function (params) { - function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; - - param_default("inputField", null); - param_default("displayArea", null); - param_default("button", null); - param_default("eventName", "click"); - param_default("ifFormat", "%Y/%m/%d"); - param_default("daFormat", "%Y/%m/%d"); - param_default("singleClick", true); - param_default("disableFunc", null); - param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined - param_default("dateText", null); - param_default("firstDay", null); - param_default("align", "Br"); - param_default("range", [1900, 2999]); - param_default("weekNumbers", true); - param_default("flat", null); - param_default("flatCallback", null); - param_default("onSelect", null); - param_default("onClose", null); - param_default("onUpdate", null); - param_default("date", null); - param_default("showsTime", false); - param_default("timeFormat", "24"); - param_default("electric", true); - param_default("step", 2); - param_default("position", null); - param_default("cache", false); - param_default("showOthers", false); - param_default("multiple", null); - - var tmp = ["inputField", "displayArea", "button"]; - for (var i in tmp) { - if (typeof params[tmp[i]] == "string") { - params[tmp[i]] = document.getElementById(params[tmp[i]]); - } - } - if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) { - alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); - return false; - } - - function onSelect(cal) { - var p = cal.params; - var update = (cal.dateClicked || p.electric); - if (update && p.inputField) { - p.inputField.value = cal.date.print(p.ifFormat); - if (typeof p.inputField.onchange == "function") - p.inputField.onchange(); - } - if (update && p.displayArea) - p.displayArea.innerHTML = cal.date.print(p.daFormat); - if (update && typeof p.onUpdate == "function") - p.onUpdate(cal); - if (update && p.flat) { - if (typeof p.flatCallback == "function") - p.flatCallback(cal); - } - if (update && p.singleClick && cal.dateClicked) - cal.callCloseHandler(); - }; - - if (params.flat != null) { - if (typeof params.flat == "string") - params.flat = document.getElementById(params.flat); - if (!params.flat) { - alert("Calendar.setup:\n Flat specified but can't find parent."); - return false; - } - var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); - cal.showsOtherMonths = params.showOthers; - cal.showsTime = params.showsTime; - cal.time24 = (params.timeFormat == "24"); - cal.params = params; - cal.weekNumbers = params.weekNumbers; - cal.setRange(params.range[0], params.range[1]); - cal.setDateStatusHandler(params.dateStatusFunc); - cal.getDateText = params.dateText; - if (params.ifFormat) { - cal.setDateFormat(params.ifFormat); - } - if (params.inputField && typeof params.inputField.value == "string") { - cal.parseDate(params.inputField.value); - } - cal.create(params.flat); - cal.show(); - return false; - } - - var triggerEl = params.button || params.displayArea || params.inputField; - triggerEl["on" + params.eventName] = function() { - var dateEl = params.inputField || params.displayArea; - var dateFmt = params.inputField ? params.ifFormat : params.daFormat; - var mustCreate = false; - var cal = window.calendar; - if (dateEl) - params.date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt); - if (!(cal && params.cache)) { - window.calendar = cal = new Calendar(params.firstDay, - params.date, - params.onSelect || onSelect, - params.onClose || function(cal) { cal.hide(); }); - cal.showsTime = params.showsTime; - cal.time24 = (params.timeFormat == "24"); - cal.weekNumbers = params.weekNumbers; - mustCreate = true; - } else { - if (params.date) - cal.setDate(params.date); - cal.hide(); - } - if (params.multiple) { - cal.multiple = {}; - for (var i = params.multiple.length; --i >= 0;) { - var d = params.multiple[i]; - var ds = d.print("%Y%m%d"); - cal.multiple[ds] = d; - } - } - cal.showsOtherMonths = params.showOthers; - cal.yearStep = params.step; - cal.setRange(params.range[0], params.range[1]); - cal.params = params; - cal.setDateStatusHandler(params.dateStatusFunc); - cal.getDateText = params.dateText; - cal.setDateFormat(dateFmt); - if (mustCreate) - cal.create(); - cal.refresh(); - if (!params.position) - cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); - else - cal.showAt(params.position[0], params.position[1]); - return false; - }; - - return cal; -}; diff --git a/javascript/libs/dynarch/jscalendar/calendar-setup_stripped.js b/javascript/libs/dynarch/jscalendar/calendar-setup_stripped.js deleted file mode 100644 index 91c927f..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-setup_stripped.js +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/ - * --------------------------------------------------------------------------- - * - * The DHTML Calendar - * - * Details and latest version at: - * http://dynarch.com/mishoo/calendar.epl - * - * This script is distributed under the GNU Lesser General Public License. - * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html - * - * This file defines helper functions for setting up the calendar. They are - * intended to help non-programmers get a working calendar on their site - * quickly. This script should not be seen as part of the calendar. It just - * shows you what one can do with the calendar, while in the same time - * providing a quick and simple method for setting it up. If you need - * exhaustive customization of the calendar creation process feel free to - * modify this code to suit your needs (this is recommended and much better - * than modifying calendar.js itself). - */ - Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateText",null);param_default("firstDay",null);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",false);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]]);}}if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");return false;}function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function")p.inputField.onchange();}if(update&&p.displayArea)p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")p.onUpdate(cal);if(update&&p.flat){if(typeof p.flatCallback=="function")p.flatCallback(cal);}if(update&&p.singleClick&&cal.dateClicked)cal.callCloseHandler();};if(params.flat!=null){if(typeof params.flat=="string")params.flat=document.getElementById(params.flat);if(!params.flat){alert("Calendar.setup:\n Flat specified but can't find parent.");return false;}var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){cal.setDateFormat(params.ifFormat);}if(params.inputField&&typeof params.inputField.value=="string"){cal.parseDate(params.inputField.value);}cal.create(params.flat);cal.show();return false;}var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl)params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&¶ms.cache)){window.calendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide();});cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true;}else{if(params.date)cal.setDate(params.date);cal.hide();}if(params.multiple){cal.multiple={};for(var i=params.multiple.length;--i>=0;){var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d;}}cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate)cal.create();cal.refresh();if(!params.position)cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else cal.showAt(params.position[0],params.position[1]);return false;};return cal;};
\ No newline at end of file diff --git a/javascript/libs/dynarch/jscalendar/calendar-system.css b/javascript/libs/dynarch/jscalendar/calendar-system.css deleted file mode 100644 index b224885..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-system.css +++ /dev/null @@ -1,251 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border: 1px solid; - border-color: #fff #000 #000 #fff; - font-size: 11px; - cursor: default; - background: Window; - color: WindowText; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border: 1px solid; - border-color: #fff #000 #000 #fff; - font-size: 11px; - cursor: default; - background: Window; - color: WindowText; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; - background: ButtonFace; -} - -.calendar .nav { - background: ButtonFace url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: ActiveCaption; - color: CaptionText; - text-align: center; -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid ButtonShadow; - padding: 2px; - text-align: center; - background: ButtonFace; - color: ButtonText; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border: 2px solid; - padding: 0px; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - border-width: 1px; - padding: 2px 0px 0px 2px; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #aaa; -} -.calendar tbody .day.othermonth.oweekend { - color: #faa; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid ButtonShadow; - background: ButtonFace; - color: ButtonText; -} - -.calendar tbody .rowhilite td { - background: Highlight; - color: HighlightText; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - padding: 1px 3px 1px 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - padding: 2px 2px 0px 2px; - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; - padding: 2px 2px 0px 2px; - background: ButtonFace; - color: ButtonText; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody td.disabled { color: GrayText; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - background: ButtonFace; - padding: 1px; - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; - color: ButtonText; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #e4e0d8; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; - background: Menu; - color: MenuText; - font-size: 90%; - padding: 1px; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .active { - padding: 0px; - border: 1px solid #000; -} - -.calendar .combo .hilite { - background: Highlight; - color: HighlightText; -} - -.calendar td.time { - border-top: 1px solid ButtonShadow; - padding: 1px 0px; - text-align: center; - background-color: ButtonFace; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #889; - font-weight: bold; - background-color: Menu; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: Highlight; - color: HighlightText; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar-tas.css b/javascript/libs/dynarch/jscalendar/calendar-tas.css deleted file mode 100644 index c2f8721..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-tas.css +++ /dev/null @@ -1,239 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #655; - font-size: 11px; - color: #000; - cursor: default; - background: #ffd; - font-family: tahoma,verdana,sans-serif; - filter: -progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#DDDCCC,EndColorStr=#FFFFFF); -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ - color:#363636; -} - -.calendar .nav { - background: #edc url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - background: #654; - color: #363636; - padding: 2px; - filter: -progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffff,EndColorStr=#dddccc); -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ - /*background: #3B86A0;*/ - color: #363636; - font-weight: bold; -filter: -progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffff,EndColorStr=#3b86a0); -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #655; - padding: 2px; - text-align: center; - color: #363636; - filter: -progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#DDDCCC,EndColorStr=#FFFFFF); -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background-color: #ffcc86; - color: #000; - border: 1px solid #b59345; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background-color: #c77; - padding: 2px 0px 0px 2px; -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ - background: #fed; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #aaa; -} -.calendar tbody .day.othermonth.oweekend { - color: #faa; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #fed; -} - -.calendar tbody .rowhilite td { - background: #ddf; - -} - -.calendar tbody .rowhilite td.wn { - background: #efe; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - background: #ffe; - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - background: #ddc; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #fea; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { font-weight: bold; } - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ - text-align: center; - background: #988; - color: #000; - -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - border-top: 1px solid #655; - background: #dcb; - color: #363636; - font-weight: bold; - filter: -progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#FFFFFF,EndColorStr=#DDDCCC); -} -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #faa; - border: 1px solid #f40; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #c77; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #655; - background: #ffe; - color: #000; - font-size: smaller; - z-index: 100; -} - -.combo .label, -.combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.combo .label-IEfix { - width: 4em; -} - -.combo .hilite { - background: #fc8; -} - -.combo .active { - border-top: 1px solid #a64; - border-bottom: 1px solid #a64; - background: #fee; - font-weight: bold; -} - -.calendar td.time { - border-top: 1px solid #a88; - padding: 1px 0px; - text-align: center; - background-color: #fed; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #988; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #866; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar-win2k-1.css b/javascript/libs/dynarch/jscalendar/calendar-win2k-1.css deleted file mode 100644 index 8c5d026..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-win2k-1.css +++ /dev/null @@ -1,271 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - font-size: 11px; - color: #000; - cursor: default; - background: #d4d0c8; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - font-size: 11px; - color: #000; - cursor: default; - background: #d4d0c8; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar .nav { - background: transparent url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: #848078; - color: #fff; - text-align: center; -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #000; - padding: 2px; - text-align: center; - background: #f4f0e8; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - padding: 0px; - background-color: #e4e0d8; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - background-color: #c4c0b8; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #aaa; -} -.calendar tbody .day.othermonth.oweekend { - color: #faa; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #f4f0e8; -} - -.calendar tbody .rowhilite td { - background: #e4e0d8; -} - -.calendar tbody .rowhilite td.wn { - background: #d4d0c8; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - padding: 1px 3px 1px 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - padding: 2px 2px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - padding: 2px 2px 0px 2px; - background: #e4e0d8; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - background: #f4f0e8; - padding: 1px; - border: 1px solid #000; - background: #848078; - color: #fff; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #e4e0d8; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - background: #e4e0d8; - font-size: 90%; - padding: 1px; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .active { - background: #c4c0b8; - padding: 0px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar .combo .hilite { - background: #048; - color: #fea; -} - -.calendar td.time { - border-top: 1px solid #000; - padding: 1px 0px; - text-align: center; - background-color: #f4f0e8; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #889; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #766; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar-win2k-2.css b/javascript/libs/dynarch/jscalendar/calendar-win2k-2.css deleted file mode 100644 index 6f37b7d..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-win2k-2.css +++ /dev/null @@ -1,271 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - font-size: 11px; - color: #000; - cursor: default; - background: #d4c8d0; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - font-size: 11px; - color: #000; - cursor: default; - background: #d4c8d0; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar .nav { - background: transparent url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: #847880; - color: #fff; - text-align: center; -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #000; - padding: 2px; - text-align: center; - background: #f4e8f0; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - padding: 0px; - background-color: #e4d8e0; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - background-color: #c4b8c0; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #aaa; -} -.calendar tbody .day.othermonth.oweekend { - color: #faa; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #f4e8f0; -} - -.calendar tbody .rowhilite td { - background: #e4d8e0; -} - -.calendar tbody .rowhilite td.wn { - background: #d4c8d0; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - padding: 1px 3px 1px 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - padding: 2px 2px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - padding: 2px 2px 0px 2px; - background: #e4d8e0; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - background: #f4e8f0; - padding: 1px; - border: 1px solid #000; - background: #847880; - color: #fff; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #e4d8e0; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - background: #e4d8e0; - font-size: 90%; - padding: 1px; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .active { - background: #d4c8d0; - padding: 0px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar .combo .hilite { - background: #408; - color: #fea; -} - -.calendar td.time { - border-top: 1px solid #000; - padding: 1px 0px; - text-align: center; - background-color: #f4f0e8; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #889; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #766; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar-win2k-cold-1.css b/javascript/libs/dynarch/jscalendar/calendar-win2k-cold-1.css deleted file mode 100644 index fa5c093..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-win2k-cold-1.css +++ /dev/null @@ -1,265 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - font-size: 11px; - color: #000; - cursor: default; - background: #c8d0d4; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - font-size: 11px; - color: #000; - cursor: default; - background: #c8d0d4; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar .nav { - background: transparent url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: #788084; - color: #fff; - text-align: center; -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #000; - padding: 2px; - text-align: center; - background: #e8f0f4; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - padding: 0px; - background-color: #d8e0e4; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - background-color: #b8c0c4; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #aaa; -} -.calendar tbody .day.othermonth.oweekend { - color: #faa; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #e8f4f0; -} - -.calendar tbody .rowhilite td { - background: #d8e4e0; -} - -.calendar tbody .rowhilite td.wn { - background: #c8d4d0; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - padding: 1px 3px 1px 1px; - border: 1px solid; - border-color: #fff #000 #000 #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - padding: 2px 2px 0px 2px; - border: 1px solid; - border-color: #000 #fff #fff #000; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - padding: 2px 2px 0px 2px; - border: 1px solid; - border-color: #000 #fff #fff #000; - background: #d8e0e4; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - background: #e8f0f4; - padding: 1px; - border: 1px solid #000; - background: #788084; - color: #fff; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #d8e0e4; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - background: #d8e0e4; - font-size: 90%; - padding: 1px; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .active { - background: #c8d0d4; - padding: 0px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar .combo .hilite { - background: #048; - color: #aef; -} - -.calendar td.time { - border-top: 1px solid #000; - padding: 1px 0px; - text-align: center; - background-color: #e8f0f4; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #889; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #667; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar-win2k-cold-2.css b/javascript/libs/dynarch/jscalendar/calendar-win2k-cold-2.css deleted file mode 100644 index 8e930c8..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar-win2k-cold-2.css +++ /dev/null @@ -1,271 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -.calendar { - position: relative; - display: none; - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - font-size: 11px; - color: #000; - cursor: default; - background: #c8d4d0; - font-family: tahoma,verdana,sans-serif; -} - -.calendar table { - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - font-size: 11px; - color: #000; - cursor: default; - background: #c8d4d0; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; - padding: 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar .nav { - background: transparent url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; - padding: 1px; - border: 1px solid #000; - background: #788480; - color: #fff; - text-align: center; -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #000; - padding: 2px; - text-align: center; - background: #e8f4f0; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #f00; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - border-top: 2px solid #fff; - border-right: 2px solid #000; - border-bottom: 2px solid #000; - border-left: 2px solid #fff; - padding: 0px; - background-color: #d8e4e0; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - background-color: #b8c4c0; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - width: 2em; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #aaa; -} -.calendar tbody .day.othermonth.oweekend { - color: #faa; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #e8f4f0; -} - -.calendar tbody .rowhilite td { - background: #d8e4e0; -} - -.calendar tbody .rowhilite td.wn { - background: #c8d4d0; -} - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - padding: 1px 3px 1px 1px; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - padding: 2px 2px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; - padding: 2px 2px 0px 2px; - background: #d8e4e0; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #f00; -} - -.calendar tbody td.today { /* Cell showing today date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - background: #e8f4f0; - padding: 1px; - border: 1px solid #000; - background: #788480; - color: #fff; - text-align: center; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - padding: 1px; - background: #d8e4e0; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - padding: 2px 0px 0px 2px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - width: 4em; - top: 0px; - left: 0px; - cursor: default; - border-top: 1px solid #fff; - border-right: 1px solid #000; - border-bottom: 1px solid #000; - border-left: 1px solid #fff; - background: #d8e4e0; - font-size: 90%; - padding: 1px; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .active { - background: #c8d4d0; - padding: 0px; - border-top: 1px solid #000; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #000; -} - -.calendar .combo .hilite { - background: #048; - color: #aef; -} - -.calendar td.time { - border-top: 1px solid #000; - padding: 1px 0px; - text-align: center; - background-color: #e8f0f4; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #889; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #667; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/javascript/libs/dynarch/jscalendar/calendar.js b/javascript/libs/dynarch/jscalendar/calendar.js deleted file mode 100644 index b00509d..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar.js +++ /dev/null @@ -1,1806 +0,0 @@ -/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo - * ----------------------------------------------------------- - * - * The DHTML Calendar, version 1.0 "It is happening again" - * - * Details and latest version at: - * www.dynarch.com/projects/calendar - * - * This script is developed by Dynarch.com. Visit us at www.dynarch.com. - * - * This script is distributed under the GNU Lesser General Public License. - * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html - */ - -// $Id: calendar.js,v 1.1 2008/12/19 17:34:05 spiderr Exp $ - -/** The Calendar object constructor. */ -Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) { - // member variables - this.activeDiv = null; - this.currentDateEl = null; - this.getDateStatus = null; - this.getDateToolTip = null; - this.getDateText = null; - this.timeout = null; - this.onSelected = onSelected || null; - this.onClose = onClose || null; - this.dragging = false; - this.hidden = false; - this.minYear = 1970; - this.maxYear = 2050; - this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"]; - this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"]; - this.isPopup = true; - this.weekNumbers = true; - this.firstDayOfWeek = typeof firstDayOfWeek == "number" ? firstDayOfWeek : Calendar._FD; // 0 for Sunday, 1 for Monday, etc. - this.showsOtherMonths = false; - this.dateStr = dateStr; - this.ar_days = null; - this.showsTime = false; - this.time24 = true; - this.yearStep = 2; - this.hiliteToday = true; - this.multiple = null; - // HTML elements - this.table = null; - this.element = null; - this.tbody = null; - this.firstdayname = null; - // Combo boxes - this.monthsCombo = null; - this.yearsCombo = null; - this.hilitedMonth = null; - this.activeMonth = null; - this.hilitedYear = null; - this.activeYear = null; - // Information - this.dateClicked = false; - - // one-time initializations - if (typeof Calendar._SDN == "undefined") { - // table of short day names - if (typeof Calendar._SDN_len == "undefined") - Calendar._SDN_len = 3; - var ar = new Array(); - for (var i = 8; i > 0;) { - ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len); - } - Calendar._SDN = ar; - // table of short month names - if (typeof Calendar._SMN_len == "undefined") - Calendar._SMN_len = 3; - ar = new Array(); - for (var i = 12; i > 0;) { - ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len); - } - Calendar._SMN = ar; - } -}; - -// ** constants - -/// "static", needed for event handlers. -Calendar._C = null; - -/// detect a special case of "web browser" -Calendar.is_ie = ( /msie/i.test(navigator.userAgent) && - !/opera/i.test(navigator.userAgent) ); - -Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) ); - -/// detect Opera browser -Calendar.is_opera = /opera/i.test(navigator.userAgent); - -/// detect KHTML-based browsers -Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent); - -// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate -// library, at some point. - -Calendar.getAbsolutePos = function(el) { - var SL = 0, ST = 0; - var is_div = /^div$/i.test(el.tagName); - if (is_div && el.scrollLeft) - SL = el.scrollLeft; - if (is_div && el.scrollTop) - ST = el.scrollTop; - var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST }; - if (el.offsetParent) { - var tmp = this.getAbsolutePos(el.offsetParent); - r.x += tmp.x; - r.y += tmp.y; - } - return r; -}; - -Calendar.isRelated = function (el, evt) { - var related = evt.relatedTarget; - if (!related) { - var type = evt.type; - if (type == "mouseover") { - related = evt.fromElement; - } else if (type == "mouseout") { - related = evt.toElement; - } - } - while (related) { - if (related == el) { - return true; - } - related = related.parentNode; - } - return false; -}; - -Calendar.removeClass = function(el, className) { - if (!(el && el.className)) { - return; - } - var cls = el.className.split(" "); - var ar = new Array(); - for (var i = cls.length; i > 0;) { - if (cls[--i] != className) { - ar[ar.length] = cls[i]; - } - } - el.className = ar.join(" "); -}; - -Calendar.addClass = function(el, className) { - Calendar.removeClass(el, className); - el.className += " " + className; -}; - -// FIXME: the following 2 functions totally suck, are useless and should be replaced immediately. -Calendar.getElement = function(ev) { - var f = Calendar.is_ie ? window.event.srcElement : ev.currentTarget; - while (f.nodeType != 1 || /^div$/i.test(f.tagName)) - f = f.parentNode; - return f; -}; - -Calendar.getTargetElement = function(ev) { - var f = Calendar.is_ie ? window.event.srcElement : ev.target; - while (f.nodeType != 1) - f = f.parentNode; - return f; -}; - -Calendar.stopEvent = function(ev) { - ev || (ev = window.event); - if (Calendar.is_ie) { - ev.cancelBubble = true; - ev.returnValue = false; - } else { - ev.preventDefault(); - ev.stopPropagation(); - } - return false; -}; - -Calendar.addEvent = function(el, evname, func) { - if (el.attachEvent) { // IE - el.attachEvent("on" + evname, func); - } else if (el.addEventListener) { // Gecko / W3C - el.addEventListener(evname, func, true); - } else { - el["on" + evname] = func; - } -}; - -Calendar.removeEvent = function(el, evname, func) { - if (el.detachEvent) { // IE - el.detachEvent("on" + evname, func); - } else if (el.removeEventListener) { // Gecko / W3C - el.removeEventListener(evname, func, true); - } else { - el["on" + evname] = null; - } -}; - -Calendar.createElement = function(type, parent) { - var el = null; - if (document.createElementNS) { - // use the XHTML namespace; IE won't normally get here unless - // _they_ "fix" the DOM2 implementation. - el = document.createElementNS("http://www.w3.org/1999/xhtml", type); - } else { - el = document.createElement(type); - } - if (typeof parent != "undefined") { - parent.appendChild(el); - } - return el; -}; - -// END: UTILITY FUNCTIONS - -// BEGIN: CALENDAR STATIC FUNCTIONS - -/** Internal -- adds a set of events to make some element behave like a button. */ -Calendar._add_evs = function(el) { - with (Calendar) { - addEvent(el, "mouseover", dayMouseOver); - addEvent(el, "mousedown", dayMouseDown); - addEvent(el, "mouseout", dayMouseOut); - if (is_ie) { - addEvent(el, "dblclick", dayMouseDblClick); - el.setAttribute("unselectable", true); - } - } -}; - -Calendar.findMonth = function(el) { - if (typeof el.month != "undefined") { - return el; - } else if (typeof el.parentNode.month != "undefined") { - return el.parentNode; - } - return null; -}; - -Calendar.findYear = function(el) { - if (typeof el.year != "undefined") { - return el; - } else if (typeof el.parentNode.year != "undefined") { - return el.parentNode; - } - return null; -}; - -Calendar.showMonthsCombo = function () { - var cal = Calendar._C; - if (!cal) { - return false; - } - var cal = cal; - var cd = cal.activeDiv; - var mc = cal.monthsCombo; - if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - if (cal.activeMonth) { - Calendar.removeClass(cal.activeMonth, "active"); - } - var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()]; - Calendar.addClass(mon, "active"); - cal.activeMonth = mon; - var s = mc.style; - s.display = "block"; - if (cd.navtype < 0) - s.left = cd.offsetLeft + "px"; - else { - var mcw = mc.offsetWidth; - if (typeof mcw == "undefined") - // Konqueror brain-dead techniques - mcw = 50; - s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px"; - } - s.top = (cd.offsetTop + cd.offsetHeight) + "px"; -}; - -Calendar.showYearsCombo = function (fwd) { - var cal = Calendar._C; - if (!cal) { - return false; - } - var cal = cal; - var cd = cal.activeDiv; - var yc = cal.yearsCombo; - if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - if (cal.activeYear) { - Calendar.removeClass(cal.activeYear, "active"); - } - cal.activeYear = null; - var Y = cal.date.getFullYear() + (fwd ? 1 : -1); - var yr = yc.firstChild; - var show = false; - for (var i = 12; i > 0; --i) { - if (Y >= cal.minYear && Y <= cal.maxYear) { - yr.innerHTML = Y; - yr.year = Y; - yr.style.display = "block"; - show = true; - } else { - yr.style.display = "none"; - } - yr = yr.nextSibling; - Y += fwd ? cal.yearStep : -cal.yearStep; - } - if (show) { - var s = yc.style; - s.display = "block"; - if (cd.navtype < 0) - s.left = cd.offsetLeft + "px"; - else { - var ycw = yc.offsetWidth; - if (typeof ycw == "undefined") - // Konqueror brain-dead techniques - ycw = 50; - s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px"; - } - s.top = (cd.offsetTop + cd.offsetHeight) + "px"; - } -}; - -// event handlers - -Calendar.tableMouseUp = function(ev) { - var cal = Calendar._C; - if (!cal) { - return false; - } - if (cal.timeout) { - clearTimeout(cal.timeout); - } - var el = cal.activeDiv; - if (!el) { - return false; - } - var target = Calendar.getTargetElement(ev); - ev || (ev = window.event); - Calendar.removeClass(el, "active"); - if (target == el || target.parentNode == el) { - Calendar.cellClick(el, ev); - } - var mon = Calendar.findMonth(target); - var date = null; - if (mon) { - date = new Date(cal.date); - if (mon.month != date.getMonth()) { - date.setMonth(mon.month); - cal.setDate(date); - cal.dateClicked = false; - cal.callHandler(); - } - } else { - var year = Calendar.findYear(target); - if (year) { - date = new Date(cal.date); - if (year.year != date.getFullYear()) { - date.setFullYear(year.year); - cal.setDate(date); - cal.dateClicked = false; - cal.callHandler(); - } - } - } - with (Calendar) { - removeEvent(document, "mouseup", tableMouseUp); - removeEvent(document, "mouseover", tableMouseOver); - removeEvent(document, "mousemove", tableMouseOver); - cal._hideCombos(); - _C = null; - return stopEvent(ev); - } -}; - -Calendar.tableMouseOver = function (ev) { - var cal = Calendar._C; - if (!cal) { - return; - } - var el = cal.activeDiv; - var target = Calendar.getTargetElement(ev); - if (target == el || target.parentNode == el) { - Calendar.addClass(el, "hilite active"); - Calendar.addClass(el.parentNode, "rowhilite"); - } else { - if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2))) - Calendar.removeClass(el, "active"); - Calendar.removeClass(el, "hilite"); - Calendar.removeClass(el.parentNode, "rowhilite"); - } - ev || (ev = window.event); - if (el.navtype == 50 && target != el) { - var pos = Calendar.getAbsolutePos(el); - var w = el.offsetWidth; - var x = ev.clientX; - var dx; - var decrease = true; - if (x > pos.x + w) { - dx = x - pos.x - w; - decrease = false; - } else - dx = pos.x - x; - - if (dx < 0) dx = 0; - var range = el._range; - var current = el._current; - var count = Math.floor(dx / 10) % range.length; - for (var i = range.length; --i >= 0;) - if (range[i] == current) - break; - while (count-- > 0) - if (decrease) { - if (--i < 0) - i = range.length - 1; - } else if ( ++i >= range.length ) - i = 0; - var newval = range[i]; - el.innerHTML = newval; - - cal.onUpdateTime(); - } - var mon = Calendar.findMonth(target); - if (mon) { - if (mon.month != cal.date.getMonth()) { - if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - Calendar.addClass(mon, "hilite"); - cal.hilitedMonth = mon; - } else if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - } else { - if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - var year = Calendar.findYear(target); - if (year) { - if (year.year != cal.date.getFullYear()) { - if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - Calendar.addClass(year, "hilite"); - cal.hilitedYear = year; - } else if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - } else if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - } - return Calendar.stopEvent(ev); -}; - -Calendar.tableMouseDown = function (ev) { - if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) { - return Calendar.stopEvent(ev); - } -}; - -Calendar.calDragIt = function (ev) { - var cal = Calendar._C; - if (!(cal && cal.dragging)) { - return false; - } - var posX; - var posY; - if (Calendar.is_ie) { - posY = window.event.clientY + document.body.scrollTop; - posX = window.event.clientX + document.body.scrollLeft; - } else { - posX = ev.pageX; - posY = ev.pageY; - } - cal.hideShowCovered(); - var st = cal.element.style; - st.left = (posX - cal.xOffs) + "px"; - st.top = (posY - cal.yOffs) + "px"; - return Calendar.stopEvent(ev); -}; - -Calendar.calDragEnd = function (ev) { - var cal = Calendar._C; - if (!cal) { - return false; - } - cal.dragging = false; - with (Calendar) { - removeEvent(document, "mousemove", calDragIt); - removeEvent(document, "mouseup", calDragEnd); - tableMouseUp(ev); - } - cal.hideShowCovered(); -}; - -Calendar.dayMouseDown = function(ev) { - var el = Calendar.getElement(ev); - if (el.disabled) { - return false; - } - var cal = el.calendar; - cal.activeDiv = el; - Calendar._C = cal; - if (el.navtype != 300) with (Calendar) { - if (el.navtype == 50) { - el._current = el.innerHTML; - addEvent(document, "mousemove", tableMouseOver); - } else - addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver); - addClass(el, "hilite active"); - addEvent(document, "mouseup", tableMouseUp); - } else if (cal.isPopup) { - cal._dragStart(ev); - } - if (el.navtype == -1 || el.navtype == 1) { - if (cal.timeout) clearTimeout(cal.timeout); - cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250); - } else if (el.navtype == -2 || el.navtype == 2) { - if (cal.timeout) clearTimeout(cal.timeout); - cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250); - } else { - cal.timeout = null; - } - return Calendar.stopEvent(ev); -}; - -Calendar.dayMouseDblClick = function(ev) { - Calendar.cellClick(Calendar.getElement(ev), ev || window.event); - if (Calendar.is_ie) { - document.selection.empty(); - } -}; - -Calendar.dayMouseOver = function(ev) { - var el = Calendar.getElement(ev); - if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) { - return false; - } - if (el.ttip) { - if (el.ttip.substr(0, 1) == "_") { - el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1); - } - el.calendar.tooltips.innerHTML = el.ttip; - } - if (el.navtype != 300) { - Calendar.addClass(el, "hilite"); - if (el.caldate) { - Calendar.addClass(el.parentNode, "rowhilite"); - } - } - return Calendar.stopEvent(ev); -}; - -Calendar.dayMouseOut = function(ev) { - with (Calendar) { - var el = getElement(ev); - if (isRelated(el, ev) || _C || el.disabled) - return false; - removeClass(el, "hilite"); - if (el.caldate) - removeClass(el.parentNode, "rowhilite"); - if (el.calendar) - el.calendar.tooltips.innerHTML = _TT["SEL_DATE"]; - return stopEvent(ev); - } -}; - -/** - * A generic "click" handler :) handles all types of buttons defined in this - * calendar. - */ -Calendar.cellClick = function(el, ev) { - var cal = el.calendar; - var closing = false; - var newdate = false; - var date = null; - if (typeof el.navtype == "undefined") { - if (cal.currentDateEl) { - Calendar.removeClass(cal.currentDateEl, "selected"); - Calendar.addClass(el, "selected"); - closing = (cal.currentDateEl == el); - if (!closing) { - cal.currentDateEl = el; - } - } - cal.date.setDateOnly(el.caldate); - date = cal.date; - var other_month = !(cal.dateClicked = !el.otherMonth); - if (!other_month && !cal.currentDateEl) - cal._toggleMultipleDate(new Date(date)); - else - newdate = !el.disabled; - // a date was clicked - if (other_month) - cal._init(cal.firstDayOfWeek, date); - } else { - if (el.navtype == 200) { - Calendar.removeClass(el, "hilite"); - cal.callCloseHandler(); - return; - } - date = new Date(cal.date); - if (el.navtype == 0) - date.setDateOnly(new Date()); // TODAY - // unless "today" was clicked, we assume no date was clicked so - // the selected handler will know not to close the calenar when - // in single-click mode. - // cal.dateClicked = (el.navtype == 0); - cal.dateClicked = false; - var year = date.getFullYear(); - var mon = date.getMonth(); - function setMonth(m) { - var day = date.getDate(); - var max = date.getMonthDays(m); - if (day > max) { - date.setDate(max); - } - date.setMonth(m); - }; - switch (el.navtype) { - case 400: - Calendar.removeClass(el, "hilite"); - var text = Calendar._TT["ABOUT"]; - if (typeof text != "undefined") { - text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : ""; - } else { - // FIXME: this should be removed as soon as lang files get updated! - text = "Help and about box text is not translated into this language.\n" + - "If you know this language and you feel generous please update\n" + - "the corresponding file in \"lang\" subdir to match calendar-en.js\n" + - "and send it back to <mihai_bazon@yahoo.com> to get it into the distribution ;-)\n\n" + - "Thank you!\n" + - "http://dynarch.com/mishoo/calendar.epl\n"; - } - alert(text); - return; - case -2: - if (year > cal.minYear) { - date.setFullYear(year - 1); - } - break; - case -1: - if (mon > 0) { - setMonth(mon - 1); - } else if (year-- > cal.minYear) { - date.setFullYear(year); - setMonth(11); - } - break; - case 1: - if (mon < 11) { - setMonth(mon + 1); - } else if (year < cal.maxYear) { - date.setFullYear(year + 1); - setMonth(0); - } - break; - case 2: - if (year < cal.maxYear) { - date.setFullYear(year + 1); - } - break; - case 100: - cal.setFirstDayOfWeek(el.fdow); - return; - case 50: - var range = el._range; - var current = el.innerHTML; - for (var i = range.length; --i >= 0;) - if (range[i] == current) - break; - if (ev && ev.shiftKey) { - if (--i < 0) - i = range.length - 1; - } else if ( ++i >= range.length ) - i = 0; - var newval = range[i]; - el.innerHTML = newval; - cal.onUpdateTime(); - return; - case 0: - // TODAY will bring us here - if ((typeof cal.getDateStatus == "function") && - cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) { - return false; - } - break; - } - if (!date.equalsTo(cal.date)) { - cal.setDate(date); - newdate = true; - } else if (el.navtype == 0) - newdate = closing = true; - } - if (newdate) { - ev && cal.callHandler(); - } - if (closing) { - Calendar.removeClass(el, "hilite"); - ev && cal.callCloseHandler(); - } -}; - -// END: CALENDAR STATIC FUNCTIONS - -// BEGIN: CALENDAR OBJECT FUNCTIONS - -/** - * This function creates the calendar inside the given parent. If _par is - * null than it creates a popup calendar inside the BODY element. If _par is - * an element, be it BODY, then it creates a non-popup calendar (still - * hidden). Some properties need to be set before calling this function. - */ -Calendar.prototype.create = function (_par) { - var parent = null; - if (! _par) { - // default parent is the document body, in which case we create - // a popup calendar. - parent = document.getElementsByTagName("body")[0]; - this.isPopup = true; - } else { - parent = _par; - this.isPopup = false; - } - this.date = this.dateStr ? new Date(this.dateStr) : new Date(); - - var table = Calendar.createElement("table"); - this.table = table; - table.cellSpacing = 0; - table.cellPadding = 0; - table.calendar = this; - Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown); - - var div = Calendar.createElement("div"); - this.element = div; - div.className = "calendar"; - if (this.isPopup) { - div.style.position = "absolute"; - div.style.display = "none"; - } - div.appendChild(table); - - var thead = Calendar.createElement("thead", table); - var cell = null; - var row = null; - - var cal = this; - var hh = function (text, cs, navtype) { - cell = Calendar.createElement("td", row); - cell.colSpan = cs; - cell.className = "button"; - if (navtype != 0 && Math.abs(navtype) <= 2) - cell.className += " nav"; - Calendar._add_evs(cell); - cell.calendar = cal; - cell.navtype = navtype; - cell.innerHTML = "<div unselectable='on'>" + text + "</div>"; - return cell; - }; - - row = Calendar.createElement("tr", thead); - var title_length = 6; - (this.isPopup) && --title_length; - (this.weekNumbers) && ++title_length; - - hh("?", 1, 400).ttip = Calendar._TT["INFO"]; - this.title = hh("", title_length, 300); - this.title.className = "title"; - if (this.isPopup) { - this.title.ttip = Calendar._TT["DRAG_TO_MOVE"]; - this.title.style.cursor = "move"; - hh("×", 1, 200).ttip = Calendar._TT["CLOSE"]; - } - - row = Calendar.createElement("tr", thead); - row.className = "headrow"; - - this._nav_py = hh("«", 1, -2); - this._nav_py.ttip = Calendar._TT["PREV_YEAR"]; - - this._nav_pm = hh("‹", 1, -1); - this._nav_pm.ttip = Calendar._TT["PREV_MONTH"]; - - this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0); - this._nav_now.ttip = Calendar._TT["GO_TODAY"]; - - this._nav_nm = hh("›", 1, 1); - this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"]; - - this._nav_ny = hh("»", 1, 2); - this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"]; - - // day names - row = Calendar.createElement("tr", thead); - row.className = "daynames"; - if (this.weekNumbers) { - cell = Calendar.createElement("td", row); - cell.className = "name wn"; - cell.innerHTML = Calendar._TT["WK"]; - } - for (var i = 7; i > 0; --i) { - cell = Calendar.createElement("td", row); - if (!i) { - cell.navtype = 100; - cell.calendar = this; - Calendar._add_evs(cell); - } - } - this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild; - this._displayWeekdays(); - - var tbody = Calendar.createElement("tbody", table); - this.tbody = tbody; - - for (i = 6; i > 0; --i) { - row = Calendar.createElement("tr", tbody); - if (this.weekNumbers) { - cell = Calendar.createElement("td", row); - } - for (var j = 7; j > 0; --j) { - cell = Calendar.createElement("td", row); - cell.calendar = this; - Calendar._add_evs(cell); - } - } - - if (this.showsTime) { - row = Calendar.createElement("tr", tbody); - row.className = "time"; - - cell = Calendar.createElement("td", row); - cell.className = "time"; - cell.colSpan = 2; - cell.innerHTML = Calendar._TT["TIME"] || " "; - - cell = Calendar.createElement("td", row); - cell.className = "time"; - cell.colSpan = this.weekNumbers ? 4 : 3; - - (function(){ - function makeTimePart(className, init, range_start, range_end) { - var part = Calendar.createElement("span", cell); - part.className = className; - part.innerHTML = init; - part.calendar = cal; - part.ttip = Calendar._TT["TIME_PART"]; - part.navtype = 50; - part._range = []; - if (typeof range_start != "number") - part._range = range_start; - else { - for (var i = range_start; i <= range_end; ++i) { - var txt; - if (i < 10 && range_end >= 10) txt = '0' + i; - else txt = '' + i; - part._range[part._range.length] = txt; - } - } - Calendar._add_evs(part); - return part; - }; - var hrs = cal.date.getHours(); - var mins = cal.date.getMinutes(); - var t12 = !cal.time24; - var pm = (hrs > 12); - if (t12 && pm) hrs -= 12; - var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23); - var span = Calendar.createElement("span", cell); - span.innerHTML = ":"; - span.className = "colon"; - var M = makeTimePart("minute", mins, 0, 59); - var AP = null; - cell = Calendar.createElement("td", row); - cell.className = "time"; - cell.colSpan = 2; - if (t12) - AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]); - else - cell.innerHTML = " "; - - cal.onSetTime = function() { - var pm, hrs = this.date.getHours(), - mins = this.date.getMinutes(); - if (t12) { - pm = (hrs >= 12); - if (pm) hrs -= 12; - if (hrs == 0) hrs = 12; - AP.innerHTML = pm ? "pm" : "am"; - } - H.innerHTML = (hrs < 10) ? ("0" + hrs) : hrs; - M.innerHTML = (mins < 10) ? ("0" + mins) : mins; - }; - - cal.onUpdateTime = function() { - var date = this.date; - var h = parseInt(H.innerHTML, 10); - if (t12) { - if (/pm/i.test(AP.innerHTML) && h < 12) - h += 12; - else if (/am/i.test(AP.innerHTML) && h == 12) - h = 0; - } - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); - date.setHours(h); - date.setMinutes(parseInt(M.innerHTML, 10)); - date.setFullYear(y); - date.setMonth(m); - date.setDate(d); - this.dateClicked = false; - this.callHandler(); - }; - })(); - } else { - this.onSetTime = this.onUpdateTime = function() {}; - } - - var tfoot = Calendar.createElement("tfoot", table); - - row = Calendar.createElement("tr", tfoot); - row.className = "footrow"; - - cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300); - cell.className = "ttip"; - if (this.isPopup) { - cell.ttip = Calendar._TT["DRAG_TO_MOVE"]; - cell.style.cursor = "move"; - } - this.tooltips = cell; - - div = Calendar.createElement("div", this.element); - this.monthsCombo = div; - div.className = "combo"; - for (i = 0; i < Calendar._MN.length; ++i) { - var mn = Calendar.createElement("div"); - mn.className = Calendar.is_ie ? "label-IEfix" : "label"; - mn.month = i; - mn.innerHTML = Calendar._SMN[i]; - div.appendChild(mn); - } - - div = Calendar.createElement("div", this.element); - this.yearsCombo = div; - div.className = "combo"; - for (i = 12; i > 0; --i) { - var yr = Calendar.createElement("div"); - yr.className = Calendar.is_ie ? "label-IEfix" : "label"; - div.appendChild(yr); - } - - this._init(this.firstDayOfWeek, this.date); - parent.appendChild(this.element); -}; - -/** keyboard navigation, only for popup calendars */ -Calendar._keyEvent = function(ev) { - var cal = window._dynarch_popupCalendar; - if (!cal || cal.multiple) - return false; - (Calendar.is_ie) && (ev = window.event); - var act = (Calendar.is_ie || ev.type == "keypress"), - K = ev.keyCode; - if (ev.ctrlKey) { - switch (K) { - case 37: // KEY left - act && Calendar.cellClick(cal._nav_pm); - break; - case 38: // KEY up - act && Calendar.cellClick(cal._nav_py); - break; - case 39: // KEY right - act && Calendar.cellClick(cal._nav_nm); - break; - case 40: // KEY down - act && Calendar.cellClick(cal._nav_ny); - break; - default: - return false; - } - } else switch (K) { - case 32: // KEY space (now) - Calendar.cellClick(cal._nav_now); - break; - case 27: // KEY esc - act && cal.callCloseHandler(); - break; - case 37: // KEY left - case 38: // KEY up - case 39: // KEY right - case 40: // KEY down - if (act) { - var prev, x, y, ne, el, step; - prev = K == 37 || K == 38; - step = (K == 37 || K == 39) ? 1 : 7; - function setVars() { - el = cal.currentDateEl; - var p = el.pos; - x = p & 15; - y = p >> 4; - ne = cal.ar_days[y][x]; - };setVars(); - function prevMonth() { - var date = new Date(cal.date); - date.setDate(date.getDate() - step); - cal.setDate(date); - }; - function nextMonth() { - var date = new Date(cal.date); - date.setDate(date.getDate() + step); - cal.setDate(date); - }; - while (1) { - switch (K) { - case 37: // KEY left - if (--x >= 0) - ne = cal.ar_days[y][x]; - else { - x = 6; - K = 38; - continue; - } - break; - case 38: // KEY up - if (--y >= 0) - ne = cal.ar_days[y][x]; - else { - prevMonth(); - setVars(); - } - break; - case 39: // KEY right - if (++x < 7) - ne = cal.ar_days[y][x]; - else { - x = 0; - K = 40; - continue; - } - break; - case 40: // KEY down - if (++y < cal.ar_days.length) - ne = cal.ar_days[y][x]; - else { - nextMonth(); - setVars(); - } - break; - } - break; - } - if (ne) { - if (!ne.disabled) - Calendar.cellClick(ne); - else if (prev) - prevMonth(); - else - nextMonth(); - } - } - break; - case 13: // KEY enter - if (act) - Calendar.cellClick(cal.currentDateEl, ev); - break; - default: - return false; - } - return Calendar.stopEvent(ev); -}; - -/** - * (RE)Initializes the calendar to the given date and firstDayOfWeek - */ -Calendar.prototype._init = function (firstDayOfWeek, date) { - var today = new Date(), - TY = today.getFullYear(), - TM = today.getMonth(), - TD = today.getDate(); - this.table.style.visibility = "hidden"; - var year = date.getFullYear(); - if (year < this.minYear) { - year = this.minYear; - date.setFullYear(year); - } else if (year > this.maxYear) { - year = this.maxYear; - date.setFullYear(year); - } - this.firstDayOfWeek = firstDayOfWeek; - this.date = new Date(date); - var month = date.getMonth(); - var mday = date.getDate(); - var no_days = date.getMonthDays(); - - // calendar voodoo for computing the first day that would actually be - // displayed in the calendar, even if it's from the previous month. - // WARNING: this is magic. ;-) - date.setDate(1); - var day1 = (date.getDay() - this.firstDayOfWeek) % 7; - if (day1 < 0) - day1 += 7; - date.setDate(-day1); - date.setDate(date.getDate() + 1); - - var row = this.tbody.firstChild; - var MN = Calendar._SMN[month]; - var ar_days = this.ar_days = new Array(); - var weekend = Calendar._TT["WEEKEND"]; - var dates = this.multiple ? (this.datesCells = {}) : null; - for (var i = 0; i < 6; ++i, row = row.nextSibling) { - var cell = row.firstChild; - if (this.weekNumbers) { - cell.className = "day wn"; - cell.innerHTML = date.getWeekNumber(); - cell = cell.nextSibling; - } - row.className = "daysrow"; - var hasdays = false, iday, dpos = ar_days[i] = []; - for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(iday + 1)) { - iday = date.getDate(); - var wday = date.getDay(); - cell.className = "day"; - cell.pos = i << 4 | j; - dpos[j] = cell; - var current_month = (date.getMonth() == month); - if (!current_month) { - if (this.showsOtherMonths) { - cell.className += " othermonth"; - cell.otherMonth = true; - } else { - cell.className = "emptycell"; - cell.innerHTML = " "; - cell.disabled = true; - continue; - } - } else { - cell.otherMonth = false; - hasdays = true; - } - cell.disabled = false; - cell.innerHTML = this.getDateText ? this.getDateText(date, iday) : iday; - if (dates) - dates[date.print("%Y%m%d")] = cell; - if (this.getDateStatus) { - var status = this.getDateStatus(date, year, month, iday); - if (this.getDateToolTip) { - var toolTip = this.getDateToolTip(date, year, month, iday); - if (toolTip) - cell.title = toolTip; - } - if (status === true) { - cell.className += " disabled"; - cell.disabled = true; - } else { - if (/disabled/i.test(status)) - cell.disabled = true; - cell.className += " " + status; - } - } - if (!cell.disabled) { - cell.caldate = new Date(date); - cell.ttip = "_"; - if (!this.multiple && current_month - && iday == mday && this.hiliteToday) { - cell.className += " selected"; - this.currentDateEl = cell; - } - if (date.getFullYear() == TY && - date.getMonth() == TM && - iday == TD) { - cell.className += " today"; - cell.ttip += Calendar._TT["PART_TODAY"]; - } - if (weekend.indexOf(wday.toString()) != -1) - cell.className += cell.otherMonth ? " oweekend" : " weekend"; - } - } - if (!(hasdays || this.showsOtherMonths)) - row.className = "emptyrow"; - } - this.title.innerHTML = Calendar._MN[month] + ", " + year; - this.onSetTime(); - this.table.style.visibility = "visible"; - this._initMultipleDates(); - // PROFILE - // this.tooltips.innerHTML = "Generated in " + ((new Date()) - today) + " ms"; -}; - -Calendar.prototype._initMultipleDates = function() { - if (this.multiple) { - for (var i in this.multiple) { - var cell = this.datesCells[i]; - var d = this.multiple[i]; - if (!d) - continue; - if (cell) - cell.className += " selected"; - } - } -}; - -Calendar.prototype._toggleMultipleDate = function(date) { - if (this.multiple) { - var ds = date.print("%Y%m%d"); - var cell = this.datesCells[ds]; - if (cell) { - var d = this.multiple[ds]; - if (!d) { - Calendar.addClass(cell, "selected"); - this.multiple[ds] = date; - } else { - Calendar.removeClass(cell, "selected"); - delete this.multiple[ds]; - } - } - } -}; - -Calendar.prototype.setDateToolTipHandler = function (unaryFunction) { - this.getDateToolTip = unaryFunction; -}; - -/** - * Calls _init function above for going to a certain date (but only if the - * date is different than the currently selected one). - */ -Calendar.prototype.setDate = function (date) { - if (!date.equalsTo(this.date)) { - this._init(this.firstDayOfWeek, date); - } -}; - -/** - * Refreshes the calendar. Useful if the "disabledHandler" function is - * dynamic, meaning that the list of disabled date can change at runtime. - * Just * call this function if you think that the list of disabled dates - * should * change. - */ -Calendar.prototype.refresh = function () { - this._init(this.firstDayOfWeek, this.date); -}; - -/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */ -Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) { - this._init(firstDayOfWeek, this.date); - this._displayWeekdays(); -}; - -/** - * Allows customization of what dates are enabled. The "unaryFunction" - * parameter must be a function object that receives the date (as a JS Date - * object) and returns a boolean value. If the returned value is true then - * the passed date will be marked as disabled. - */ -Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) { - this.getDateStatus = unaryFunction; -}; - -/** Customization of allowed year range for the calendar. */ -Calendar.prototype.setRange = function (a, z) { - this.minYear = a; - this.maxYear = z; -}; - -/** Calls the first user handler (selectedHandler). */ -Calendar.prototype.callHandler = function () { - if (this.onSelected) { - this.onSelected(this, this.date.print(this.dateFormat)); - } -}; - -/** Calls the second user handler (closeHandler). */ -Calendar.prototype.callCloseHandler = function () { - if (this.onClose) { - this.onClose(this); - } - this.hideShowCovered(); -}; - -/** Removes the calendar object from the DOM tree and destroys it. */ -Calendar.prototype.destroy = function () { - var el = this.element.parentNode; - el.removeChild(this.element); - Calendar._C = null; - window._dynarch_popupCalendar = null; -}; - -/** - * Moves the calendar element to a different section in the DOM tree (changes - * its parent). - */ -Calendar.prototype.reparent = function (new_parent) { - var el = this.element; - el.parentNode.removeChild(el); - new_parent.appendChild(el); -}; - -// This gets called when the user presses a mouse button anywhere in the -// document, if the calendar is shown. If the click was outside the open -// calendar this function closes it. -Calendar._checkCalendar = function(ev) { - var calendar = window._dynarch_popupCalendar; - if (!calendar) { - return false; - } - var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev); - for (; el != null && el != calendar.element; el = el.parentNode); - if (el == null) { - // calls closeHandler which should hide the calendar. - window._dynarch_popupCalendar.callCloseHandler(); - return Calendar.stopEvent(ev); - } -}; - -/** Shows the calendar. */ -Calendar.prototype.show = function () { - var rows = this.table.getElementsByTagName("tr"); - for (var i = rows.length; i > 0;) { - var row = rows[--i]; - Calendar.removeClass(row, "rowhilite"); - var cells = row.getElementsByTagName("td"); - for (var j = cells.length; j > 0;) { - var cell = cells[--j]; - Calendar.removeClass(cell, "hilite"); - Calendar.removeClass(cell, "active"); - } - } - this.element.style.display = "block"; - this.hidden = false; - if (this.isPopup) { - window._dynarch_popupCalendar = this; - Calendar.addEvent(document, "keydown", Calendar._keyEvent); - Calendar.addEvent(document, "keypress", Calendar._keyEvent); - Calendar.addEvent(document, "mousedown", Calendar._checkCalendar); - } - this.hideShowCovered(); -}; - -/** - * Hides the calendar. Also removes any "hilite" from the class of any TD - * element. - */ -Calendar.prototype.hide = function () { - if (this.isPopup) { - Calendar.removeEvent(document, "keydown", Calendar._keyEvent); - Calendar.removeEvent(document, "keypress", Calendar._keyEvent); - Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar); - } - this.element.style.display = "none"; - this.hidden = true; - this.hideShowCovered(); -}; - -/** - * Shows the calendar at a given absolute position (beware that, depending on - * the calendar element style -- position property -- this might be relative - * to the parent's containing rectangle). - */ -Calendar.prototype.showAt = function (x, y) { - var s = this.element.style; - s.left = x + "px"; - s.top = y + "px"; - this.show(); -}; - -/** Shows the calendar near a given element. */ -Calendar.prototype.showAtElement = function (el, opts) { - var self = this; - var p = Calendar.getAbsolutePos(el); - if (!opts || typeof opts != "string") { - this.showAt(p.x, p.y + el.offsetHeight); - return true; - } - function fixPosition(box) { - if (box.x < 0) - box.x = 0; - if (box.y < 0) - box.y = 0; - var cp = document.createElement("div"); - var s = cp.style; - s.position = "absolute"; - s.right = s.bottom = s.width = s.height = "0px"; - document.body.appendChild(cp); - var br = Calendar.getAbsolutePos(cp); - document.body.removeChild(cp); - if (Calendar.is_ie) { - br.y += document.body.scrollTop; - br.x += document.body.scrollLeft; - } else { - br.y += window.scrollY; - br.x += window.scrollX; - } - var tmp = box.x + box.width - br.x; - if (tmp > 0) box.x -= tmp; - tmp = box.y + box.height - br.y; - if (tmp > 0) box.y -= tmp; - }; - this.element.style.display = "block"; - Calendar.continuation_for_the_fucking_khtml_browser = function() { - var w = self.element.offsetWidth; - var h = self.element.offsetHeight; - self.element.style.display = "none"; - var valign = opts.substr(0, 1); - var halign = "l"; - if (opts.length > 1) { - halign = opts.substr(1, 1); - } - // vertical alignment - switch (valign) { - case "T": p.y -= h; break; - case "B": p.y += el.offsetHeight; break; - case "C": p.y += (el.offsetHeight - h) / 2; break; - case "t": p.y += el.offsetHeight - h; break; - case "b": break; // already there - } - // horizontal alignment - switch (halign) { - case "L": p.x -= w; break; - case "R": p.x += el.offsetWidth; break; - case "C": p.x += (el.offsetWidth - w) / 2; break; - case "l": p.x += el.offsetWidth - w; break; - case "r": break; // already there - } - p.width = w; - p.height = h + 40; - self.monthsCombo.style.display = "none"; - fixPosition(p); - self.showAt(p.x, p.y); - }; - if (Calendar.is_khtml) - setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10); - else - Calendar.continuation_for_the_fucking_khtml_browser(); -}; - -/** Customizes the date format. */ -Calendar.prototype.setDateFormat = function (str) { - this.dateFormat = str; -}; - -/** Customizes the tooltip date format. */ -Calendar.prototype.setTtDateFormat = function (str) { - this.ttDateFormat = str; -}; - -/** - * Tries to identify the date represented in a string. If successful it also - * calls this.setDate which moves the calendar to the given date. - */ -Calendar.prototype.parseDate = function(str, fmt) { - if (!fmt) - fmt = this.dateFormat; - this.setDate(Date.parseDate(str, fmt)); -}; - -Calendar.prototype.hideShowCovered = function () { - if (!Calendar.is_ie && !Calendar.is_opera) - return; - function getVisib(obj){ - var value = obj.style.visibility; - if (!value) { - if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C - if (!Calendar.is_khtml) - value = document.defaultView. - getComputedStyle(obj, "").getPropertyValue("visibility"); - else - value = ''; - } else if (obj.currentStyle) { // IE - value = obj.currentStyle.visibility; - } else - value = ''; - } - return value; - }; - - var tags = new Array("applet", "iframe", "select"); - var el = this.element; - - var p = Calendar.getAbsolutePos(el); - var EX1 = p.x; - var EX2 = el.offsetWidth + EX1; - var EY1 = p.y; - var EY2 = el.offsetHeight + EY1; - - for (var k = tags.length; k > 0; ) { - var ar = document.getElementsByTagName(tags[--k]); - var cc = null; - - for (var i = ar.length; i > 0;) { - cc = ar[--i]; - - p = Calendar.getAbsolutePos(cc); - var CX1 = p.x; - var CX2 = cc.offsetWidth + CX1; - var CY1 = p.y; - var CY2 = cc.offsetHeight + CY1; - - if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) { - if (!cc.__msh_save_visibility) { - cc.__msh_save_visibility = getVisib(cc); - } - cc.style.visibility = cc.__msh_save_visibility; - } else { - if (!cc.__msh_save_visibility) { - cc.__msh_save_visibility = getVisib(cc); - } - cc.style.visibility = "hidden"; - } - } - } -}; - -/** Internal function; it displays the bar with the names of the weekday. */ -Calendar.prototype._displayWeekdays = function () { - var fdow = this.firstDayOfWeek; - var cell = this.firstdayname; - var weekend = Calendar._TT["WEEKEND"]; - for (var i = 0; i < 7; ++i) { - cell.className = "day name"; - var realday = (i + fdow) % 7; - if (i) { - cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]); - cell.navtype = 100; - cell.calendar = this; - cell.fdow = realday; - Calendar._add_evs(cell); - } - if (weekend.indexOf(realday.toString()) != -1) { - Calendar.addClass(cell, "weekend"); - } - cell.innerHTML = Calendar._SDN[(i + fdow) % 7]; - cell = cell.nextSibling; - } -}; - -/** Internal function. Hides all combo boxes that might be displayed. */ -Calendar.prototype._hideCombos = function () { - this.monthsCombo.style.display = "none"; - this.yearsCombo.style.display = "none"; -}; - -/** Internal function. Starts dragging the element. */ -Calendar.prototype._dragStart = function (ev) { - if (this.dragging) { - return; - } - this.dragging = true; - var posX; - var posY; - if (Calendar.is_ie) { - posY = window.event.clientY + document.body.scrollTop; - posX = window.event.clientX + document.body.scrollLeft; - } else { - posY = ev.clientY + window.scrollY; - posX = ev.clientX + window.scrollX; - } - var st = this.element.style; - this.xOffs = posX - parseInt(st.left); - this.yOffs = posY - parseInt(st.top); - with (Calendar) { - addEvent(document, "mousemove", calDragIt); - addEvent(document, "mouseup", calDragEnd); - } -}; - -// BEGIN: DATE OBJECT PATCHES - -/** Adds the number of days array to the Date object. */ -Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31); - -/** Constants used for time computations */ -Date.SECOND = 1000 /* milliseconds */; -Date.MINUTE = 60 * Date.SECOND; -Date.HOUR = 60 * Date.MINUTE; -Date.DAY = 24 * Date.HOUR; -Date.WEEK = 7 * Date.DAY; - -Date.parseDate = function(str, fmt) { - var today = new Date(); - var y = 0; - var m = -1; - var d = 0; - var a = str.split(/\W+/); - var b = fmt.match(/%./g); - var i = 0, j = 0; - var hr = 0; - var min = 0; - for (i = 0; i < a.length; ++i) { - if (!a[i]) - continue; - switch (b[i]) { - case "%d": - case "%e": - d = parseInt(a[i], 10); - break; - - case "%m": - m = parseInt(a[i], 10) - 1; - break; - - case "%Y": - case "%y": - y = parseInt(a[i], 10); - (y < 100) && (y += (y > 29) ? 1900 : 2000); - break; - - case "%b": - case "%B": - for (j = 0; j < 12; ++j) { - if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; } - } - break; - - case "%H": - case "%I": - case "%k": - case "%l": - hr = parseInt(a[i], 10); - break; - - case "%P": - case "%p": - if (/pm/i.test(a[i]) && hr < 12) - hr += 12; - else if (/am/i.test(a[i]) && hr >= 12) - hr -= 12; - break; - - case "%M": - min = parseInt(a[i], 10); - break; - } - } - if (isNaN(y)) y = today.getFullYear(); - if (isNaN(m)) m = today.getMonth(); - if (isNaN(d)) d = today.getDate(); - if (isNaN(hr)) hr = today.getHours(); - if (isNaN(min)) min = today.getMinutes(); - if (y != 0 && m != -1 && d != 0) - return new Date(y, m, d, hr, min, 0); - y = 0; m = -1; d = 0; - for (i = 0; i < a.length; ++i) { - if (a[i].search(/[a-zA-Z]+/) != -1) { - var t = -1; - for (j = 0; j < 12; ++j) { - if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; } - } - if (t != -1) { - if (m != -1) { - d = m+1; - } - m = t; - } - } else if (parseInt(a[i], 10) <= 12 && m == -1) { - m = a[i]-1; - } else if (parseInt(a[i], 10) > 31 && y == 0) { - y = parseInt(a[i], 10); - (y < 100) && (y += (y > 29) ? 1900 : 2000); - } else if (d == 0) { - d = a[i]; - } - } - if (y == 0) - y = today.getFullYear(); - if (m != -1 && d != 0) - return new Date(y, m, d, hr, min, 0); - return today; -}; - -/** Returns the number of days in the current month */ -Date.prototype.getMonthDays = function(month) { - var year = this.getFullYear(); - if (typeof month == "undefined") { - month = this.getMonth(); - } - if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) { - return 29; - } else { - return Date._MD[month]; - } -}; - -/** Returns the number of day in the year. */ -Date.prototype.getDayOfYear = function() { - var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); - var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0); - var time = now - then; - return Math.floor(time / Date.DAY); -}; - -/** Returns the number of the week in year, as defined in ISO 8601. */ -Date.prototype.getWeekNumber = function() { - var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); - var DoW = d.getDay(); - d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu - var ms = d.valueOf(); // GMT - d.setMonth(0); - d.setDate(4); // Thu in Week 1 - return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1; -}; - -/** Checks date and time equality */ -Date.prototype.equalsTo = function(date) { - return ((this.getFullYear() == date.getFullYear()) && - (this.getMonth() == date.getMonth()) && - (this.getDate() == date.getDate()) && - (this.getHours() == date.getHours()) && - (this.getMinutes() == date.getMinutes())); -}; - -/** Set only the year, month, date parts (keep existing time) */ -Date.prototype.setDateOnly = function(date) { - var tmp = new Date(date); - this.setDate(1); - this.setFullYear(tmp.getFullYear()); - this.setMonth(tmp.getMonth()); - this.setDate(tmp.getDate()); -}; - -/** Prints the date in a string according to the given format. */ -Date.prototype.print = function (str) { - var m = this.getMonth(); - var d = this.getDate(); - var y = this.getFullYear(); - var wn = this.getWeekNumber(); - var w = this.getDay(); - var s = {}; - var hr = this.getHours(); - var pm = (hr >= 12); - var ir = (pm) ? (hr - 12) : hr; - var dy = this.getDayOfYear(); - if (ir == 0) - ir = 12; - var min = this.getMinutes(); - var sec = this.getSeconds(); - s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N] - s["%A"] = Calendar._DN[w]; // full weekday name - s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N] - s["%B"] = Calendar._MN[m]; // full month name - // FIXME: %c : preferred date and time representation for the current locale - s["%C"] = 1 + Math.floor(y / 100); // the century number - s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31) - s["%e"] = d; // the day of the month (range 1 to 31) - // FIXME: %D : american date style: %m/%d/%y - // FIXME: %E, %F, %G, %g, %h (man strftime) - s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format) - s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format) - s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366) - s["%k"] = hr; // hour, range 0 to 23 (24h format) - s["%l"] = ir; // hour, range 1 to 12 (12h format) - s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12 - s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59 - s["%n"] = "\n"; // a newline character - s["%p"] = pm ? "PM" : "AM"; - s["%P"] = pm ? "pm" : "am"; - // FIXME: %r : the time in am/pm notation %I:%M:%S %p - // FIXME: %R : the time in 24-hour notation %H:%M - s["%s"] = Math.floor(this.getTime() / 1000); - s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59 - s["%t"] = "\t"; // a tab character - // FIXME: %T : the time in 24-hour notation (%H:%M:%S) - s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn; - s["%u"] = w + 1; // the day of the week (range 1 to 7, 1 = MON) - s["%w"] = w; // the day of the week (range 0 to 6, 0 = SUN) - // FIXME: %x : preferred date representation for the current locale without the time - // FIXME: %X : preferred time representation for the current locale without the date - s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99) - s["%Y"] = y; // year with the century - s["%%"] = "%"; // a literal '%' character - - var re = /%./g; - if (!Calendar.is_ie5 && !Calendar.is_khtml) - return str.replace(re, function (par) { return s[par] || par; }); - - var a = str.match(re); - for (var i = 0; i < a.length; i++) { - var tmp = s[a[i]]; - if (tmp) { - re = new RegExp(a[i], 'g'); - str = str.replace(re, tmp); - } - } - - return str; -}; - -Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear; -Date.prototype.setFullYear = function(y) { - var d = new Date(this); - d.__msh_oldSetFullYear(y); - if (d.getMonth() != this.getMonth()) - this.setDate(28); - this.__msh_oldSetFullYear(y); -}; - -// END: DATE OBJECT PATCHES - - -// global object that remembers the calendar -window._dynarch_popupCalendar = null; diff --git a/javascript/libs/dynarch/jscalendar/calendar.php b/javascript/libs/dynarch/jscalendar/calendar.php deleted file mode 100644 index 5b9120d..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php - -/** - * File: calendar.php | (c) dynarch.com 2004 - * Distributed as part of "The Coolest DHTML Calendar" - * under the same terms. - * ----------------------------------------------------------------- - * This file implements a simple PHP wrapper for the calendar. It - * allows you to easily include all the calendar files and setup the - * calendar by instantiating and calling a PHP object. - */ - -define('NEWLINE', "\n"); - -class DHTML_Calendar { - var $calendar_lib_path; - - var $calendar_file; - var $calendar_lang_file; - var $calendar_setup_file; - var $calendar_theme_file; - var $calendar_options; - - function DHTML_Calendar($calendar_lib_path = '/calendar/', - $lang = 'en', - $theme = 'calendar-win2k-1', - $stripped = true) { - if ($stripped) { - $this->calendar_file = 'calendar_stripped.js'; - $this->calendar_setup_file = 'calendar-setup_stripped.js'; - } else { - $this->calendar_file = 'calendar.js'; - $this->calendar_setup_file = 'calendar-setup.js'; - } - $this->calendar_lang_file = 'lang/calendar-' . $lang . '.js'; - $this->calendar_theme_file = $theme.'.css'; - $this->calendar_lib_path = preg_replace('/\/+$/', '/', $calendar_lib_path); - $this->calendar_options = array('ifFormat' => '%Y/%m/%d', - 'daFormat' => '%Y/%m/%d'); - } - - function set_option($name, $value) { - $this->calendar_options[$name] = $value; - } - - function load_files() { - echo $this->get_load_files_code(); - } - - function get_load_files_code() { - $code = ( '<link rel="stylesheet" type="text/css" media="all" href="' . - $this->calendar_lib_path . $this->calendar_theme_file . - '" />' . NEWLINE ); - $code .= ( '<script type="text/javascript" src="' . - $this->calendar_lib_path . $this->calendar_file . - '"></script>' . NEWLINE ); - $code .= ( '<script type="text/javascript" src="' . - $this->calendar_lib_path . $this->calendar_lang_file . - '"></script>' . NEWLINE ); - $code .= ( '<script type="text/javascript" src="' . - $this->calendar_lib_path . $this->calendar_setup_file . - '"></script>' ); - return $code; - } - - function _make_calendar($other_options = array()) { - $js_options = $this->_make_js_hash(array_merge($this->calendar_options, $other_options)); - $code = ( '<script type="text/javascript">Calendar.setup({' . - $js_options . - '});</script>' ); - return $code; - } - - function make_input_field($cal_options = array(), $field_attributes = array()) { - $id = $this->_gen_id(); - $attrstr = $this->_make_html_attr(array_merge($field_attributes, - array('id' => $this->_field_id($id), - 'type' => 'text'))); - echo '<input ' . $attrstr .'/>'; - echo '<a href="#" id="'. $this->_trigger_id($id) . '">' . - '<img align="middle" border="0" src="' . $this->calendar_lib_path . 'img.gif" alt="" /></a>'; - - $options = array_merge($cal_options, - array('inputField' => $this->_field_id($id), - 'button' => $this->_trigger_id($id))); - echo $this->_make_calendar($options); - } - - /// PRIVATE SECTION - - function _field_id($id) { return 'f-calendar-field-' . $id; } - function _trigger_id($id) { return 'f-calendar-trigger-' . $id; } - function _gen_id() { static $id = 0; return ++$id; } - - function _make_js_hash($array) { - $jstr = ''; - reset($array); - while (list($key, $val) = each($array)) { - if (is_bool($val)) - $val = $val ? 'true' : 'false'; - else if (!is_numeric($val)) - $val = '"'.$val.'"'; - if ($jstr) $jstr .= ','; - $jstr .= '"' . $key . '":' . $val; - } - return $jstr; - } - - function _make_html_attr($array) { - $attrstr = ''; - reset($array); - while (list($key, $val) = each($array)) { - $attrstr .= $key . '="' . $val . '" '; - } - return $attrstr; - } -}; - -?>
\ No newline at end of file diff --git a/javascript/libs/dynarch/jscalendar/calendar_stripped.js b/javascript/libs/dynarch/jscalendar/calendar_stripped.js deleted file mode 100644 index 4fe03f1..0000000 --- a/javascript/libs/dynarch/jscalendar/calendar_stripped.js +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo - * ----------------------------------------------------------- - * - * The DHTML Calendar, version 1.0 "It is happening again" - * - * Details and latest version at: - * www.dynarch.com/projects/calendar - * - * This script is developed by Dynarch.com. Visit us at www.dynarch.com. - * - * This script is distributed under the GNU Lesser General Public License. - * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html - */ - Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("×",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("«",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("‹",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("›",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("»",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||" ";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML=" ";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn);}div=Calendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++y<cal.ar_days.length)ne=cal.ar_days[y][x];else{nextMonth();setVars();}break;}break;}if(ne){if(!ne.disabled)Calendar.cellClick(ne);else if(prev)prevMonth();else nextMonth();}}break;case 13:if(act)Calendar.cellClick(cal.currentDateEl,ev);break;default:return false;}return Calendar.stopEvent(ev);};Calendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;date.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML=" ";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)cell.title=toolTip;}if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&¤t_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="emptyrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "l":p.x+=el.offsetWidth-w;break;case "r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView. getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility="hidden";}}}};Calendar.prototype._displayWeekdays=function(){var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell);}if(weekend.indexOf(realday.toString())!=-1){Calendar.addClass(cell,"weekend");}cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};Calendar.prototype._dragStart=function(ev){if(this.dragging){return;}this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])continue;switch(b[i]){case "%d":case "%e":d=parseInt(a[i],10);break;case "%m":m=parseInt(a[i],10)-1;break;case "%Y":case "%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case "%b":case "%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case "%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}if(t!=-1){if(m!=-1){d=m+1;}m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())this.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupCalendar=null;
\ No newline at end of file diff --git a/javascript/libs/dynarch/jscalendar/dayinfo.html b/javascript/libs/dynarch/jscalendar/dayinfo.html deleted file mode 100644 index bc415c8..0000000 --- a/javascript/libs/dynarch/jscalendar/dayinfo.html +++ /dev/null @@ -1,109 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> <head> -<title>How to include additional info in day cells</title> -<script type="text/javascript" src="calendar.js"></script> -<script type="text/javascript" src="lang/calendar-en.js"></script> -<script type="text/javascript" src="calendar-setup.js"></script> -<script type="text/javascript"> - // define info for dates in this table: - var dateInfo = { - "20050308" : "Mishoo's birthday", - "20050310" : "foo", - "20050315" : "bar", - "20050318" : "25$", - "20050324" : "60$" - }; -</script> -<style type="text/css"> - @import url(calendar-win2k-1.css); - .calendar .inf { font-size: 80%; color: #444; } - .calendar .wn { font-weight: bold; vertical-align: top; } -</style> -</head> - -<body> -<h1>How to include additional info in day cells</h1> - -<div id="flatcal" style="float: right"></div> - -<script type="text/javascript"> - function getDateText(date, d) { - var inf = dateInfo[date.print("%Y%m%d")]; - if (!inf) { - return d + "<div class='inf'> </div>"; - } else { - return d + "<div class='inf'>" + inf + "</div>"; - } - }; - function flatCallback(cal) { - if (cal.dateClicked) { - // do something here - window.status = "Selected: " + cal.date; - var inf = dateInfo[cal.date.print("%Y%m%d")]; - if (inf) { - window.status += ". Additional info: " + inf; - } - } - }; - Calendar.setup({ - flat: "flatcal", - dateText: getDateText, - flatCallback: flatCallback - }); -</script> - -<p>The idea is simple:</p> - -<ol> - <li> - <p>Define a callback that takes two parameters like this:</p> - <pre>function getDateText(date, d)</pre> - <p> - This function will receive the date object as the first - parameter and the current date number (1..31) as the second (you - can get it as well by calling date.getDate() but since it's very - probably useful I thought I'd pass it too so that we can avoid a - function call). - </p> - <p> - This function <em>must</em> return the text to be inserted in - the cell of the passed date. That is, one should at least - "return d;". - </p> - </li> - <li> - Pass the above function as the "dateText" parameter to - Calendar.setup. - </li> -</ol> - -<p> - The function could simply look like: -</p> - -<pre -> function getDateText(date, d) { - if (d == 12) { - return "12th"; - } else if (d == 13) { - return "bad luck"; - } /* ... etc ... */ - }</pre> - -<p> - but it's easy to imagine that this approach sucks. For a better - way, see the source of this page and note the usage of an externally - defined "dateText" object which maps "date" to "date info", also - taking into account the year and month. This object can be easily - generated from a database, and the getDateText function becomes - extremely simple (and static). -</p> - -<p> - Cheers! -</p> - -<hr /> -<address><a href="http://dynarch.com/mishoo/">mishoo</a></address> -<!-- hhmts start --> Last modified: Sat Mar 5 17:18:06 EET 2005 <!-- hhmts end --> -</body> </html> diff --git a/javascript/libs/dynarch/jscalendar/doc/html/field-button.jpg b/javascript/libs/dynarch/jscalendar/doc/html/field-button.jpg Binary files differdeleted file mode 100644 index ecbe9d8..0000000 --- a/javascript/libs/dynarch/jscalendar/doc/html/field-button.jpg +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/doc/html/reference-Z-S.css b/javascript/libs/dynarch/jscalendar/doc/html/reference-Z-S.css deleted file mode 100644 index 02a6f88..0000000 --- a/javascript/libs/dynarch/jscalendar/doc/html/reference-Z-S.css +++ /dev/null @@ -1,193 +0,0 @@ - - body { - color: black; - /* background-color: #e5e5e5;*/ - background-color: #ffffff; - /*background-color: beige;*/ - margin-top: 2em; - margin-left: 8%; - margin-right: 8%; - } - - h1,h2,h3,h4,h5,h6 { - margin-top: .5em; - } - - .title { - font-size: 200%; - font-weight: normal; - } - - .partheading { - font-size: 100%; - } - - .chapterheading { - font-size: 100%; - } - - .beginsection { - font-size: 110%; - } - - .tiny { - font-size: 40%; - } - - .scriptsize { - font-size: 60%; - } - - .footnotesize { - font-size: 75%; - } - - .small { - font-size: 90%; - } - - .normalsize { - font-size: 100%; - } - - .large { - font-size: 120%; - } - - .largecap { - font-size: 150%; - } - - .largeup { - font-size: 200%; - } - - .huge { - font-size: 300%; - } - - .hugecap { - font-size: 350%; - } - - pre { - margin-left: 2em; - } - - blockquote { - margin-left: 2em; - } - - ol { - list-style-type: decimal; - } - - ol ol { - list-style-type: lower-alpha; - } - - ol ol ol { - list-style-type: lower-roman; - } - - ol ol ol ol { - list-style-type: upper-alpha; - } - - /* - .verbatim { - color: #4d0000; - } - */ - - tt i { - font-family: serif; - } - - .verbatim em { - font-family: serif; - } - - .scheme em { - font-family: serif; - color: black; - } - - .scheme { - color: brown; - } - - .scheme .keyword { - color: #990000; - font-weight: bold; - } - - .scheme .builtin { - color: #990000; - } - - .scheme .variable { - color: navy; - } - - .scheme .global { - color: purple; - } - - .scheme .selfeval { - color: green; - } - - .scheme .comment { - color: teal; - } - - .schemeresponse { - color: green; - } - - .navigation { - color: red; - text-align: right; - font-size: medium; - font-style: italic; - } - - .disable { - /* color: #e5e5e5; */ - color: gray; - } - - .smallcaps { - font-size: 75%; - } - - .smallprint { - color: gray; - font-size: 75%; - text-align: right; - } - - /* - .smallprint hr { - text-align: left; - width: 40%; - } - */ - - .footnoterule { - text-align: left; - width: 40%; - } - - .colophon { - color: gray; - font-size: 80%; - text-align: right; - } - - .colophon a { - color: gray; - } - -
\ No newline at end of file diff --git a/javascript/libs/dynarch/jscalendar/doc/html/reference.css b/javascript/libs/dynarch/jscalendar/doc/html/reference.css deleted file mode 100644 index 42e9283..0000000 --- a/javascript/libs/dynarch/jscalendar/doc/html/reference.css +++ /dev/null @@ -1,34 +0,0 @@ -html { margin: 0px; padding: 0px; background-color: #08f; color: #444; font-family: georgia,serif; } -body { margin: 2em 8%; background-color: #fff; padding: 1em; border: 2px ridge #048; } - -a:link, a:visited { text-decoration: none; color: #00f; } -a:hover { color: #f00; text-decoration: underline; } -a:active { color: #f84; } - -h1, h2, h3, h4, h5, h6 { font-family: tahoma,verdana,sans-serif; } - -h2, h3 { font-weight: normal; } - -h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { text-decoration: none; } - -h1 { font-size: 170%; border: 2px ridge #048; letter-spacing: 2px; color: #000; margin-left: -2em; margin-right: -2em; -background-color: #fff; padding: 2px 1em; background-color: #def; } -h2 { font-size: 140%; color: #222; } -h3 { font-size: 120%; color: #444; } - -h1.title { font-size: 300%; font-family: georgia,serif; font-weight: normal; color: #846; letter-spacing: -1px; -border: none; -padding: none; -background-color: #fff; -border-bottom: 3px double #624; padding-bottom: 2px; margin-left: 8%; margin-right: 8%; } - -.colophon { padding-top: 2em; color: #999; font-size: 90%; font-family: georgia,"times new roman",serif; } -.colophon a:link, .colophon a:visited { color: #755; } -.colophon a:hover { color: #422; text-decoration: underline; } - -.footnote { font-size: 90%; font-style: italic; font-family: georgia,"times new roman",serif; margin: 0px 3em; } -.footnote sup { font-size: 120%; padding: 0px 0.3em; position: relative; top: -0.2em; } - -.small { font-size: 90%; } - -.verbatim { background-color: #eee; padding: 0.2em 1em; border: 1px solid #aaa; } diff --git a/javascript/libs/dynarch/jscalendar/doc/html/reference.html b/javascript/libs/dynarch/jscalendar/doc/html/reference.html deleted file mode 100644 index 37a360b..0000000 --- a/javascript/libs/dynarch/jscalendar/doc/html/reference.html +++ /dev/null @@ -1,1738 +0,0 @@ -<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<!-- - -Generated from ../reference.tex by tex2page, v 2004-09-11 -(running on MzScheme 209, unix), -(c) Dorai Sitaram, -http://www.ccs.neu.edu/~dorai/tex2page/tex2page-doc.html - ---> -<head> -<title> -DHTML Calendar Widget -</title> -<link rel="stylesheet" type="text/css" href="reference.css" title=default> -<link rel="stylesheet" type="text/css" href="reference-Z-S.css" title=default> -<meta name=robots content="index,follow"> -</head> -<body> -<p> -</p> -<p> -</p> -<p> -</p> -<p> -</p> -<p> -</p> -<p> -</p> -<p> - - - - -</p> -<p> - - -</p> -<p> -</p> -<p> -</p> -<h1 class=title align=center><br><br>DHTML Calendar Widget</h1> -<p></p> -<div align=center> -Mihai Bazon, <tt><mihai_bazon@yahoo.com></tt><br> -© Dynarch.com 2002-2005, <a href="http://www.dynarch.com/"><tt>www.dynarch.com</tt></a><p>March 7, 2005<br></p> -<p></p> -<p> -<span class=small>calendar version: 1.0 ``It is happening again''</span> -</p> -</div> -<p></p> -<p> -<span class=small><code class=verbatim>$Id: reference.html,v 1.1 2008/12/19 17:34:05 spiderr Exp $</code></span> -</p> -<span class=small><blockquote> -<div align=right><table><tr><td> - -</td></tr></table></div> - -</blockquote></span> -<a name="node_sec_Temp_1"></a> -<h1><a href="#node_toc_node_sec_Temp_1">Contents</a></h1> -<p><a name="node_toc_start"></a></p> -<p><b> - <a name="node_toc_node_sec_1"></a><a href="#node_sec_1">1 Overview</a></b><br> - <a name="node_toc_node_sec_1.1"></a><a href="#node_sec_1.1">1.1 How does this thing work?</a><br> - <a name="node_toc_node_sec_1.2"></a><a href="#node_sec_1.2">1.2 Project files</a><br> - <a name="node_toc_node_sec_1.3"></a><a href="#node_sec_1.3">1.3 License</a><br> -</p> -<p><b> - <a name="node_toc_node_sec_2"></a><a href="#node_sec_2">2 Quick startup</a></b><br> - <a name="node_toc_node_sec_2.1"></a><a href="#node_sec_2.1">2.1 Installing a popup calendar</a><br> - <a name="node_toc_node_sec_2.2"></a><a href="#node_sec_2.2">2.2 Installing a flat calendar</a><br> - <a name="node_toc_node_sec_2.3"></a><a href="#node_sec_2.3">2.3 <tt>Calendar.setup</tt> in detail</a><br> -</p> -<p><b> - <a name="node_toc_node_sec_3"></a><a href="#node_sec_3">3 Recipes</a></b><br> - <a name="node_toc_node_sec_3.1"></a><a href="#node_sec_3.1">3.1 Popup calendars</a><br> - <a name="node_toc_node_sec_3.1.1"></a><a href="#node_sec_3.1.1">3.1.1 Simple text field with calendar attached to a button</a><br> - <a name="node_toc_node_sec_3.1.2"></a><a href="#node_sec_3.1.2">3.1.2 Simple field with calendar attached to an image</a><br> - <a name="node_toc_node_sec_3.1.3"></a><a href="#node_sec_3.1.3">3.1.3 Hidden field, plain text triggers</a><br> - <a name="node_toc_node_sec_3.1.4"></a><a href="#node_sec_3.1.4">3.1.4 2 Linked fields, no trigger buttons</a><br> - <a name="node_toc_node_sec_3.2"></a><a href="#node_sec_3.2">3.2 Flat calendars</a><br> - <a name="node_toc_node_sec_3.3"></a><a href="#node_sec_3.3">3.3 Highlight special dates</a><br> - <a name="node_toc_node_sec_3.4"></a><a href="#node_sec_3.4">3.4 Select multiple dates</a><br> -</p> -<p><b> - <a name="node_toc_node_sec_4"></a><a href="#node_sec_4">4 The Calendar object overview</a></b><br> - <a name="node_toc_node_sec_4.1"></a><a href="#node_sec_4.1">4.1 Creating a calendar</a><br> - <a name="node_toc_node_sec_4.2"></a><a href="#node_sec_4.2">4.2 Order does matter ;-)</a><br> - <a name="node_toc_node_sec_4.3"></a><a href="#node_sec_4.3">4.3 Caching the object</a><br> - <a name="node_toc_node_sec_4.4"></a><a href="#node_sec_4.4">4.4 Callback functions</a><br> -</p> -<p><b> - <a name="node_toc_node_sec_5"></a><a href="#node_sec_5">5 The Calendar object API reference</a></b><br> - <a name="node_toc_node_sec_5.1"></a><a href="#node_sec_5.1">5.1 <tt>Calendar</tt> constructor</a><br> - <a name="node_toc_node_sec_5.2"></a><a href="#node_sec_5.2">5.2 Useful member variables (properties)</a><br> - <a name="node_toc_node_sec_5.3"></a><a href="#node_sec_5.3">5.3 Public methods</a><br> - <a name="node_toc_node_sec_5.3.1"></a><a href="#node_sec_5.3.1">5.3.1 <tt>Calendar.create</tt></a><br> - <a name="node_toc_node_sec_5.3.2"></a><a href="#node_sec_5.3.2">5.3.2 <tt>Calendar.callHandler</tt></a><br> - <a name="node_toc_node_sec_5.3.3"></a><a href="#node_sec_5.3.3">5.3.3 <tt>Calendar.callCloseHandler</tt></a><br> - <a name="node_toc_node_sec_5.3.4"></a><a href="#node_sec_5.3.4">5.3.4 <tt>Calendar.hide</tt></a><br> - <a name="node_toc_node_sec_5.3.5"></a><a href="#node_sec_5.3.5">5.3.5 <tt>Calendar.setDateFormat</tt></a><br> - <a name="node_toc_node_sec_5.3.6"></a><a href="#node_sec_5.3.6">5.3.6 <tt>Calendar.setTtDateFormat</tt></a><br> - <a name="node_toc_node_sec_5.3.7"></a><a href="#node_sec_5.3.7">5.3.7 <tt>Calendar.setDisabledHandler</tt></a><br> - <a name="node_toc_node_sec_5.3.8"></a><a href="#node_sec_5.3.8">5.3.8 <tt>Calendar.setDateStatusHandler</tt></a><br> - <a name="node_toc_node_sec_5.3.9"></a><a href="#node_sec_5.3.9">5.3.9 <tt>Calendar.show</tt></a><br> - <a name="node_toc_node_sec_5.3.10"></a><a href="#node_sec_5.3.10">5.3.10 <tt>Calendar.showAt</tt></a><br> - <a name="node_toc_node_sec_5.3.11"></a><a href="#node_sec_5.3.11">5.3.11 <tt>Calendar.showAtElement</tt></a><br> - <a name="node_toc_node_sec_5.3.12"></a><a href="#node_sec_5.3.12">5.3.12 <tt>Calendar.setDate</tt></a><br> - <a name="node_toc_node_sec_5.3.13"></a><a href="#node_sec_5.3.13">5.3.13 <tt>Calendar.setFirstDayOfWeek</tt></a><br> - <a name="node_toc_node_sec_5.3.14"></a><a href="#node_sec_5.3.14">5.3.14 <tt>Calendar.parseDate</tt></a><br> - <a name="node_toc_node_sec_5.3.15"></a><a href="#node_sec_5.3.15">5.3.15 <tt>Calendar.setRange</tt></a><br> -</p> -<p><b> - <a name="node_toc_node_sec_6"></a><a href="#node_sec_6">6 Side effects</a></b><br> -</p> -<p><b> - <a name="node_toc_node_sec_7"></a><a href="#node_sec_7">7 Credits</a></b><br> -</p> -<p> -</p> -<p> -</p> -<a name="node_sec_1"></a> -<h1><a href="#node_toc_node_sec_1">1 Overview</a></h1> -<p>The DHTML Calendar widget<a name="call_footnote_Temp_2"></a><a href="#footnote_Temp_2"><sup><small>1</small></sup></a> -is an (HTML) user interface element that gives end-users a friendly way to -select date and time. It works in a web browser. The first versions only provided -support for popup calendars, while starting with version 0.9 it also supports -``flat'' display. A ``flat'' calendar is a calendar that stays visible in the -page all the time. In this mode it could be very useful for ``blog'' pages and -other pages that require the calendar to be always present.</p> -<p> -The calendar is compatible with most popular browsers nowadays. While it's -created using web standards and it should generally work with any compliant -browser, the following browsers were found to work: Mozilla/Firefox (the -development platform), Netscape 6.0 or better, all other Gecko-based browsers, -Internet Explorer 5.0 or better <em>for Windows</em><a name="call_footnote_Temp_3"></a><a href="#footnote_Temp_3"><sup><small>2</small></sup></a>, Opera 7<a name="call_footnote_Temp_4"></a><a href="#footnote_Temp_4"><sup><small>3</small></sup></a>, Konqueror 3.1.2 and Apple Safari for -MacOSX.</p> -<p> -You can find the latest info and version at the calendar homepage:</p> -<p> -</p> -<div align=center><table><tr><td> - -<a href="http://www.dynarch.com/projects/calendar/"><tt>www.dynarch.com/projects/calendar</tt></a> -</td></tr></table></div> -<p> -</p> -<a name="node_sec_1.1"></a> -<h2><a href="#node_toc_node_sec_1.1">1.1 How does this thing work?</a></h2> -<p>DHTML is not ``another kind of HTML''. It's merely a naming convention. DHTML -refers to the combination of HTML, CSS, JavaScript and DOM. DOM (Document -Object Model) is a set of interfaces that glues the other three together. In -other words, DOM allows dynamic modification of an HTML page through a program. -JavaScript is our programming language, since that's what browsers like. CSS -is a way to make it look good ;-). So all this soup is generically known as -DHTML.</p> -<p> -Using DOM calls, the program dynamically creates a <tt><table></tt> element -that contains a calendar for the given date and then inserts it in the document -body. Then it shows this table at a specified position. Usually the position -is related to some element in which the date needs to be displayed/entered, -such as an input field.</p> -<p> -By assigning a certain CSS class to the table we can control the look of the -calendar through an external CSS file; therefore, in order to change the -colors, backgrounds, rollover effects and other stuff, you can only change a -CSS file -- modification of the program itself is not necessary.</p> -<p> -</p> -<a name="node_sec_1.2"></a> -<h2><a href="#node_toc_node_sec_1.2">1.2 Project files</a></h2> -<p>Here's a description of the project files, excluding documentation and example -files.</p> -<p> -</p> -<ul><p> -</p> -<li><p>the main program file (<tt>calendar.js</tt>). This defines all the logic -behind the calendar widget.</p> -<p> -</p> -<li><p>the CSS files (<tt>calendar-*.css</tt>). Loading one of them is -necessary in order to see the calendar as intended.</p> -<p> -</p> -<li><p>the language definition files (<tt>lang/calendar-*.js</tt>). They are -plain JavaScript files that contain all texts that are displayed by the -calendar. Loading one of them is necessary.</p> -<p> -</p> -<li><p>helper functions for quick setup of the calendar -(<tt>calendar-setup.js</tt>). You can do fine without it, but starting with -version 0.9.3 this is the recommended way to setup a calendar.</p> -<p> -</p> -</ul><p></p> -<p> -</p> -<a name="node_sec_1.3"></a> -<h2><a href="#node_toc_node_sec_1.3">1.3 License</a></h2> -<p></p> -<div align=center><table><tr><td> - -© Dynarch.com 2002-2005, -<a href="http://www.dynarch.com/"><tt>www.dynarch.com</tt></a> -Author: Mihai Bazon -</td></tr></table></div> -<p> -The calendar is released under the -<a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a>.</p> -<p> -</p> -<a name="node_sec_2"></a> -<h1><a href="#node_toc_node_sec_2">2 Quick startup</a></h1> -<p></p> -<p> -Installing the calendar used to be quite a task until version 0.9.3. Starting -with 0.9.3 I have included the file <tt>calendar-setup.js</tt> whose goal is to -assist you to setup a popup or flat calendar in minutes. You are -encouraged to modify this file and <em>not</em> calendar.js if you need -extra customization, but you're on your own.</p> -<p> -First you have to include the needed scripts and style-sheet. Make sure you do -this in your document's <tt><head></tt> section, also make sure you put the -correct paths to the scripts.</p> -<p> -</p> -<pre class=verbatim><style type="text/css">@import url(calendar-win2k-1.css);</style> -<script type="text/javascript" src="calendar.js"></script> -<script type="text/javascript" src="lang/calendar-en.js"></script> -<script type="text/javascript" src="calendar-setup.js"></script> -</pre><p></p> -<p> -</p> -<a name="node_sec_2.1"></a> -<h2><a href="#node_toc_node_sec_2.1">2.1 Installing a popup calendar</a></h2> -<p></p> -<p> -Now suppose you have the following HTML:</p> -<p> -</p> -<pre class=verbatim><form ...> - <input type="text" id="data" name="data" /> - <button id="trigger">...</button> -</form> -</pre><p></p> -<p> -You want the button to popup a calendar widget when clicked? Just -insert the following code immediately <em>after</em> the HTML form:</p> -<p> -</p> -<pre class=verbatim><script type="text/javascript"> - Calendar.setup( - { - inputField : "data", // ID of the input field - ifFormat : "%m %d, %Y", // the date format - button : "trigger" // ID of the button - } - ); -</script> -</pre><p></p> -<p> -The <tt>Calendar.setup</tt> function, defined in <tt>calendar-setup.js</tt> -takes care of ``patching'' the button to display a calendar when clicked. The -calendar is by default in single-click mode and linked with the given input -field, so that when the end-user selects a date it will update the input field -with the date in the given format and close the calendar. If you are a -long-term user of the calendar you probably remember that for doing this you -needed to write a couple functions and add an ``onclick'' handler for the -button by hand.</p> -<p> -By looking at the example above we can see that the function -<tt>Calendar.setup</tt> receives only one parameter: a JavaScript object. -Further, that object can have lots of properties that tell to the setup -function how would we like to have the calendar. For instance, if we would -like a calendar that closes at double-click instead of single-click we would -also include the following: <tt>singleClick:false</tt>.</p> -<p> -For a list of all supported parameters please see the section -<a href="#node_sec_2.3">2.3</a>.</p> -<p> -</p> -<a name="node_sec_2.2"></a> -<h2><a href="#node_toc_node_sec_2.2">2.2 Installing a flat calendar</a></h2> -<p></p> -<p> -Here's how to configure a flat calendar, using the same <tt>Calendar.setup</tt> -function. First, you should have an empty element with an ID. This element -will act as a container for the calendar. It can be any block-level element, -such as DIV, TABLE, etc. We will use a DIV in this example.</p> -<p> -</p> -<pre class=verbatim><div id="calendar-container"></div> -</pre><p></p> -<p> -Then there is the JavaScript code that sets up the calendar into the -``calendar-container'' DIV. The code can occur anywhere in HTML -<em>after</em> the DIV element.</p> -<p> -</p> -<pre class=verbatim><script type="text/javascript"> - function dateChanged(calendar) { - // Beware that this function is called even if the end-user only - // changed the month/year. In order to determine if a date was - // clicked you can use the dateClicked property of the calendar: - if (calendar.dateClicked) { - // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php - var y = calendar.date.getFullYear(); - var m = calendar.date.getMonth(); // integer, 0..11 - var d = calendar.date.getDate(); // integer, 1..31 - // redirect... - window.location = "/" + y + "/" + m + "/" + d + "/index.php"; - } - }; - - Calendar.setup( - { - flat : "calendar-container", // ID of the parent element - flatCallback : dateChanged // our callback function - } - ); -</script> -</pre><p></p> -<p> -</p> -<a name="node_sec_2.3"></a> -<h2><a href="#node_toc_node_sec_2.3">2.3 <tt>Calendar.setup</tt> in detail</a></h2> -<p></p> -<p> -Following there is the complete list of properties interpreted by -Calendar.setup. All of them have default values, so you can pass only those -which you would like to customize. Anyway, you <em>must</em> pass at least one -of <tt>inputField</tt>, <tt>displayArea</tt> or <tt>button</tt>, for a popup -calendar, or <tt>flat</tt> for a flat calendar. Otherwise you will get a -warning message saying that there's nothing to setup.</p> -<p> -</p> -<span class=small><table border=0><tr><td valign=top ><b>property</b> </td><td valign=top ><b>type</b> </td><td valign=top ><b>description</b> </td><td valign=top ><b>default</b> -</td></tr> -<tr><td valign=top ><tt>inputField</tt> -</td><td valign=top >string </td><td valign=top >The ID of your input field. -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>displayArea</tt> -</td><td valign=top >string </td><td valign=top >This is the ID of a <span>, <div>, or any other element that you would like to use to display the current date. This is generally useful only if the input field is hidden, as an area to display the date. -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>button</tt> -</td><td valign=top >string </td><td valign=top >The ID of the calendar ``trigger''. This is an element (ordinarily a button or an image) that will dispatch a certain event (usually ``click'') to the function that creates and displays the calendar. -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>eventName</tt> -</td><td valign=top >string </td><td valign=top >The name of the event that will trigger the calendar. The name should be without the ``on'' prefix, such as ``click'' instead of ``onclick''. Virtually all users will want to let this have the default value (``click''). Anyway, it could be useful if, say, you want the calendar to appear when the input field is focused and have no trigger button (in this case use ``focus'' as the event name). -</td><td valign=top >``click'' -</td></tr> -<tr><td valign=top ><tt>ifFormat</tt> -</td><td valign=top >string </td><td valign=top >The format string that will be used to enter the date in the input field. This format will be honored even if the input field is hidden. -</td><td valign=top >``%Y/%m/%d'' -</td></tr> -<tr><td valign=top ><tt>daFormat</tt> -</td><td valign=top >string </td><td valign=top >Format of the date displayed in the displayArea (if specified). -</td><td valign=top >``%Y/%m/%d'' -</td></tr> -<tr><td valign=top ><tt>singleClick</tt> -</td><td valign=top >boolean </td><td valign=top >Wether the calendar is in ``single-click mode'' or ``double-click mode''. If true (the default) the calendar will be created in single-click mode. -</td><td valign=top >true -</td></tr> -<tr><td valign=top ><tt>disableFunc</tt> -</td><td valign=top >function </td><td valign=top >A function that receives a JS Date object. It should return -<tt>true</tt> if that date has to be disabled, <tt>false</tt> otherwise. -<font color="red">DEPRECATED (see below).</font> -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>dateStatusFunc</tt> -</td><td valign=top >function </td><td valign=top >A function that receives a JS Date object and returns a boolean -or a string. This function allows one to set a certain CSS class to some -date, therefore making it look different. If it returns <tt>true</tt> then -the date will be disabled. If it returns <tt>false</tt> nothing special -happens with the given date. If it returns a string then that will be taken -as a CSS class and appended to the date element. If this string is -``disabled'' then the date is also disabled (therefore is like returning -<tt>true</tt>). For more information please also refer to section -<a href="#node_sec_5.3.8">5.3.8</a>. -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>firstDay</tt> -</td><td valign=top >integer </td><td valign=top >Specifies which day is to be displayed as the first day of -week. Possible values are 0 to 6; 0 means Sunday, 1 means Monday, ..., 6 -means Saturday. The end user can easily change this too, by clicking on the -day name in the calendar header. -</td><td valign=top >0 -</td></tr> -<tr><td valign=top ><tt>weekNumbers</tt> -</td><td valign=top >boolean </td><td valign=top >If ``true'' then the calendar will display week numbers. -</td><td valign=top >true -</td></tr> -<tr><td valign=top ><tt>align</tt> -</td><td valign=top >string </td><td valign=top >Alignment of the calendar, relative to the reference element. The -reference element is dynamically chosen like this: if a displayArea is -specified then it will be the reference element. Otherwise, the input field -is the reference element. For the meaning of the alignment characters -please section <a href="#node_sec_5.3.11">5.3.11</a>. -</td><td valign=top >``Bl'' -</td></tr> -<tr><td valign=top ><tt>range</tt> -</td><td valign=top >array </td><td valign=top >An array having exactly 2 elements, integers. (!) The first [0] element is the minimum year that is available, and the second [1] element is the maximum year that the calendar will allow. -</td><td valign=top >[1900, 2999] -</td></tr> -<tr><td valign=top ><tt>flat</tt> -</td><td valign=top >string </td><td valign=top >If you want a flat calendar, pass the ID of the parent object in -this property. If not, pass <tt>null</tt> here (or nothing at all as -<tt>null</tt> is the default value). -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>flatCallback</tt> -</td><td valign=top >function </td><td valign=top >You should provide this function if the calendar is flat. It -will be called when the date in the calendar is changed with a reference to -the calendar object. See section <a href="#node_sec_2.2">2.2</a> for an example -of how to setup a flat calendar. -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>onSelect</tt> -</td><td valign=top >function </td><td valign=top >If you provide a function handler here then you have to manage -the ``click-on-date'' event by yourself. Look in the calendar-setup.js and -take as an example the onSelect handler that you can see there. -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>onClose</tt> -</td><td valign=top >function </td><td valign=top >This handler will be called when the calendar needs to close. -You don't need to provide one, but if you do it's your responsibility to -hide/destroy the calendar. You're on your own. Check the calendar-setup.js -file for an example. -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>onUpdate</tt> -</td><td valign=top >function </td><td valign=top >If you supply a function handler here, it will be called right -after the target field is updated with a new date. You can use this to -chain 2 calendars, for instance to setup a default date in the second just -after a date was selected in the first. -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>date</tt> -</td><td valign=top >date </td><td valign=top >This allows you to setup an initial date where the calendar will be -positioned to. If absent then the calendar will open to the today date. -</td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>showsTime</tt> -</td><td valign=top >boolean </td><td valign=top >If this is set to <tt>true</tt> then the calendar will also -allow time selection. -</td><td valign=top >false -</td></tr> -<tr><td valign=top ><tt>timeFormat</tt> -</td><td valign=top >string </td><td valign=top >Set this to ``12'' or ``24'' to configure the way that the -calendar will display time. -</td><td valign=top >``24'' -</td></tr> -<tr><td valign=top ><tt>electric</tt> -</td><td valign=top >boolean </td><td valign=top >Set this to ``false'' if you want the calendar to update the -field only when closed (by default it updates the field at each date change, -even if the calendar is not closed) </td><td valign=top >true -</td></tr> -<tr><td valign=top ><tt>position</tt> -</td><td valign=top >array </td><td valign=top >Specifies the [x, y] position, relative to page's top-left corner, -where the calendar will be displayed. If not passed then the position will -be computed based on the ``align'' parameter. Defaults to ``null'' (not -used). </td><td valign=top >null -</td></tr> -<tr><td valign=top ><tt>cache</tt> -</td><td valign=top >boolean </td><td valign=top >Set this to ``true'' if you want to cache the calendar object. -This means that a single calendar object will be used for all fields that -require a popup calendar </td><td valign=top >false -</td></tr> -<tr><td valign=top ><tt>showOthers</tt> -</td><td valign=top >boolean </td><td valign=top >If set to ``true'' then days belonging to months overlapping -with the currently displayed month will also be displayed in the calendar -(but in a ``faded-out'' color) </td><td valign=top >false - -</td></tr></table> - -</span><p> -</p> -<a name="node_sec_3"></a> -<h1><a href="#node_toc_node_sec_3">3 Recipes</a></h1> -<p>This section presents some common ways to setup a calendar using the -<tt>Calendar.setup</tt> function detailed in the previous section.</p> -<p> -We don't discuss here about loading the JS or CSS code -- so make sure you -add the proper <script> and <style> or <link> elements in your -HTML code. Also, when we present input fields, please note that they should -be embedded in some form in order for data to be actually sent to server; we -don't discuss these things here because they are not related to our -calendar.</p> -<p> -</p> -<a name="node_sec_3.1"></a> -<h2><a href="#node_toc_node_sec_3.1">3.1 Popup calendars</a></h2> -<p>These samples can be found in the file “<tt>simple-1.html</tt>” from the -calendar package.</p> -<p> -</p> -<a name="node_sec_3.1.1"></a> -<h3><a href="#node_toc_node_sec_3.1.1">3.1.1 Simple text field with calendar attached to a button</a></h3> -<p></p> -<p> -This piece of code will create a calendar for a simple input field with a -button that will open the calendar when clicked.</p> -<p> -</p> -<pre class=verbatim><input type="text" name="date" id="f_date_b" - /><button type="reset" id="f_trigger_b" - >...</button> -<script type="text/javascript"> - Calendar.setup({ - inputField : "f_date_b", //* - ifFormat : "%m/%d/%Y %I:%M %p", - showsTime : true, - button : "f_trigger_b", //* - step : 1 - }); -</script> -</pre><p></p> -<p> -Note that this code does more actually; the only <em>required</em> fields are -those marked with “//*” -- that is, the ID of the input field and the ID of -the button need to be passed to <tt>Calendar.setup</tt> in order for the -calendar to be properly assigned to this input field. As one can easily -guess from the argument names, the other arguments configure a certain date -format, instruct the calendar to also include a time selector and display -every year in the drop-down boxes (the “step” parameter) -- instead of showing -every other year as the default calendar does.</p> -<p> -</p> -<a name="node_sec_3.1.2"></a> -<h3><a href="#node_toc_node_sec_3.1.2">3.1.2 Simple field with calendar attached to an image</a></h3> -<p>Same as the above, but the element that triggers the calendar is this time -an image, not a button.</p> -<p> -</p> -<pre class=verbatim><input type="text" name="date" id="f_date_c" readonly="1" /> -<img src="img.gif" id="f_trigger_c" - style="cursor: pointer; border: 1px solid red;" - title="Date selector" - onmouseover="this.style.background='red';" - onmouseout="this.style.background=''" /> -<script type="text/javascript"> - Calendar.setup({ - inputField : "f_date_c", - ifFormat : "%B %e, %Y", - button : "f_trigger_c", - align : "Tl", - singleClick : false - }); -</script> -</pre><p></p> -<p> -Note that the same 2 parameters are required as in the previous case; the -difference is that the 'button' parameter now gets the ID of the image -instead of the ID of the button. But the event is the same: at 'onclick' on -the element that is passed as 'button', the calendar will be shown.</p> -<p> -The above code additionally sets an alignment mode -- the parameters are -described in <a href="#node_sec_5.3.11">5.3.11</a>.</p> -<p> -</p> -<a name="node_sec_3.1.3"></a> -<h3><a href="#node_toc_node_sec_3.1.3">3.1.3 Hidden field, plain text triggers</a></h3> -<p>Sometimes, to assure that the date is well formatted, you might want not to -allow the end user to write a date manually. This can easily be achieved -with an input field by setting its <tt>readonly</tt> attribute, which is -defined by the HTML4 standard; however, here's an even nicer approach: our -calendar widget allows you to use a hidden field as the way to pass data to -server, and a “display area” to show the end user the selected date. The -“display area” can be any HTML element, such as a DIV or a SPAN or -whatever -- we will use a SPAN in our sample.</p> -<p> -</p> -<pre class=verbatim><input type="hidden" name="date" id="f_date_d" /> - -<p>Your birthday: - <span style="background-color: #ff8; cursor: default;" - onmouseover="this.style.backgroundColor='#ff0';" - onmouseout="this.style.backgroundColor='#ff8';" - id="show_d" - >Click to open date selector</span>.</p> - -<script type="text/javascript"> - Calendar.setup({ - inputField : "f_date_d", - ifFormat : "%Y/%d/%m", - displayArea : "show_d", - daFormat : "%A, %B %d, %Y", - }); -</script> -</pre><p></p> -<p> -The above code will configure a calendar attached to the hidden field and to -the SPAN having the id=“show_d”. When the SPAN element is clicked, the -calendar opens and allows the end user to chose a date. When the date is -chosen, the input field will be updated with the value in the format -“<tt>%Y/%d/%m</tt>”, and the SPAN element will display the date in a -friendlier format (defined by “<tt>daFormat</tt>”).</p> -<p> -Beware that using this approach will make your page unfunctional in browsers -that do not support JavaScript or our calendar.</p> -<p> -</p> -<a name="node_sec_3.1.4"></a> -<h3><a href="#node_toc_node_sec_3.1.4">3.1.4 2 Linked fields, no trigger buttons</a></h3> -<p>Supposing you want to create 2 fields that hold an interval of exactly one -week. The first is the starting date, and the second is the ending date. -You want the fields to be automatically updated when some date is clicked in -one or the other, in order to keep exactly one week difference between them.</p> -<p> -</p> -<pre class=verbatim><input type="text" name="date" id="f_date_a" /> -<input type="text" name="date" id="f_calcdate" /> - -<script type="text/javascript"> - function catcalc(cal) { - var date = cal.date; - var time = date.getTime() - // use the _other_ field - var field = document.getElementById("f_calcdate"); - if (field == cal.params.inputField) { - field = document.getElementById("f_date_a"); - time -= Date.WEEK; // substract one week - } else { - time += Date.WEEK; // add one week - } - var date2 = new Date(time); - field.value = date2.print("%Y-%m-%d %H:%M"); - } - Calendar.setup({ - inputField : "f_date_a", - ifFormat : "%Y-%m-%d %H:%M", - showsTime : true, - timeFormat : "24", - onUpdate : catcalc - }); - Calendar.setup({ - inputField : "f_calcdate", - ifFormat : "%Y-%m-%d %H:%M", - showsTime : true, - timeFormat : "24", - onUpdate : catcalc - }); -</script> -</pre><p></p> -<p> -The above code will configure 2 input fields with calendars attached, as -usual. The first thing to note is that there's no trigger button -- in such -case, the calendar will popup when one clicks into the input field. Using -the <tt>onUpdate</tt> parameter, we pass a reference to a function of ours -that will get called after a date was selected. In that function we -determine what field was updated and we compute the date in the other input -field such that it keeps a one week difference between the two. Enjoy! :-)</p> -<p> -</p> -<a name="node_sec_3.2"></a> -<h2><a href="#node_toc_node_sec_3.2">3.2 Flat calendars</a></h2> -<p>This sample can be found in “<tt>simple-2.html</tt>”. It will configure a -flat calendar that is always displayed in the page, in the DIV having the -id=“calendar-container”. When a date is clicked our function hander gets -called (<tt>dateChanged</tt>) and it will compute an URL to jump to based on -the selected date, then use <tt>window.location</tt> to visit the new link.</p> -<p> -</p> -<pre class=verbatim><div style="float: right; margin-left: 1em; margin-bottom: 1em;" -id="calendar-container"></div> - -<script type="text/javascript"> - function dateChanged(calendar) { - // Beware that this function is called even if the end-user only - // changed the month/year. In order to determine if a date was - // clicked you can use the dateClicked property of the calendar: - if (calendar.dateClicked) { - // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php - var y = calendar.date.getFullYear(); - var m = calendar.date.getMonth(); // integer, 0..11 - var d = calendar.date.getDate(); // integer, 1..31 - // redirect... - window.location = "/" + y + "/" + m + "/" + d + "/index.php"; - } - }; - - Calendar.setup( - { - flat : "calendar-container", // ID of the parent element - flatCallback : dateChanged // our callback function - } - ); -</script> -</pre><p></p> -<p> -</p> -<a name="node_sec_3.3"></a> -<h2><a href="#node_toc_node_sec_3.3">3.3 Highlight special dates</a></h2> -<p>So you want to display certain dates in a different color, or with bold -font, or whatever, right? Well, no problem -- our calendar can do this as -well. It doesn't matter if it's a flat or popup calendar -- we'll use a flat -one for this sample. The idea, however, is that you need to have the dates -in an array or a JavaScript object -- whatever is suitable for your way of -thinking -- and use it from a function that returns a value, telling the -calendar what kind of date is the passed one.</p> -<p> -Too much talking, here's the code ;-)</p> -<p> -</p> -<pre class=verbatim><!-- this goes into the <head> tag --> -<style type="text/css"> - .special { background-color: #000; color: #fff; } -</style> - -<!-- and the rest inside the <body> --> -<div style="float: right; margin-left: 1em; margin-bottom: 1em;" -id="calendar-container"></div> - -<script type="text/javascript"> - var SPECIAL_DAYS = { - 0 : [ 13, 24 ], // special days in January - 2 : [ 1, 6, 8, 12, 18 ], // special days in March - 8 : [ 21, 11 ] // special days in September - }; - - function dateIsSpecial(year, month, day) { - var m = SPECIAL_DAYS[month]; - if (!m) return false; - for (var i in m) if (m[i] == day) return true; - return false; - }; - - function dateChanged(calendar) { - // Beware that this function is called even if the end-user only - // changed the month/year. In order to determine if a date was - // clicked you can use the dateClicked property of the calendar: - if (calendar.dateClicked) { - // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php - var y = calendar.date.getFullYear(); - var m = calendar.date.getMonth(); // integer, 0..11 - var d = calendar.date.getDate(); // integer, 1..31 - // redirect... - window.location = "/" + y + "/" + m + "/" + d + "/index.php"; - } - }; - - function ourDateStatusFunc(date, y, m, d) { - if (dateIsSpecial(y, m, d)) - return "special"; - else - return false; // other dates are enabled - // return true if you want to disable other dates - }; - - Calendar.setup( - { - flat : "calendar-container", // ID of the parent element - flatCallback : dateChanged, // our callback function - dateStatusFunc : ourDateStatusFunc - } - ); -</script> -</pre><p></p> -<p> -So the above code creates a normal flat calendar, like in the previous -sample. We hook into it with the function “<tt>ourDateStatusFunc</tt>”, -which receives a date object as the first argument, and also the year, -month, date as the next 3 arguments (normally, you can extract year, month, -date from the first parameter too, but we pass them separately for -convenience, as it's very likely that they are going to be used in this -function).</p> -<p> -So, this function receives a date. It can return <tt>false</tt> if you want -no special action to be taken on that date, <tt>true</tt> if that date -should be disabled (unselectable), or a string if you want to assign a -special CSS class to that date. We return “special” for the dates that we -want to highlight -- and note that we defined a “special” look for them in -the CSS section.</p> -<p> -I used a simple approach here to define what dates are special. There's a -JavaScript object (the SPECIAL_DAYS global variable) which holds an array -of dates for each month. Month numbers start at zero (January). Months -that don't contain special dates can be absent from this object. Note that -the way to implement this is completely separated from the calendar -code -- therefore, feel free to use your imagination if you have better -ideas. :-)</p> -<p> -</p> -<a name="node_sec_3.4"></a> -<h2><a href="#node_toc_node_sec_3.4">3.4 Select multiple dates</a></h2> -<p>Starting version 1.0, the calendar is able to handle multiple dates -selection. You just need to pass the “<tt>multiple</tt>” parameter to -<tt>Calendar.setup</tt> and add some special code that interprets the -selection once the calendar is closed.</p> -<p> -</p> -<pre class=verbatim><a id="trigger" href="#">[open calendar...]</a> -<div id="output"></div> -<script type="text/javascript">//<![CDATA[ - // the default multiple dates selected, - // first time the calendar is displayed - var MA = []; - - function closed(cal) { - - // here we'll write the output; this is only for example. You - // will normally fill an input field or something with the dates. - var el = document.getElementById("output"); - - // reset initial content. - el.innerHTML = ""; - - // Reset the "MA", in case one triggers the calendar again. - // CAREFUL! You don't want to do "MA = [];". We need to modify - // the value of the current array, instead of creating a new one. - // Calendar.setup is called only once! :-) So be careful. - MA.length = 0; - - // walk the calendar's multiple dates selection hash - for (var i in cal.multiple) { - var d = cal.multiple[i]; - // sometimes the date is not actually selected, - // so let's check - if (d) { - // OK, selected. Fill an input field or something. - el.innerHTML += d.print("%A, %Y %B %d") + "<br />"; - // and push it in the "MA", in case one triggers the calendar again. - MA[MA.length] = d; - } - } - cal.hide(); - return true; - }; - - Calendar.setup({ - align : "BR", - showOthers : true, - multiple : MA, // pass the initial or computed array of multiple dates - onClose : closed, - button : "trigger" - }); -//]]></script> -</pre><p></p> -<p> -The above code creates a popup calendar and passes to it an array of dates, -which is initially empty, in the “multiple” argument. When the calendar is -closed it will call our “<tt>closed</tt>” function handler; in this handler -we determine what dates were actually selected, inspecting the -“<tt>cal.multiple</tt>” property, we display them in a DIV element right -next to the <a> element that opens the calendar, and we reinitialize the -global array of selected dates (which will be used if the end user opens the -calendar again). I guess the code speaks for itself, right? :-)</p> -<p> -</p> -<a name="node_sec_4"></a> -<h1><a href="#node_toc_node_sec_4">4 The Calendar object overview</a></h1> -<p></p> -<p> -Basically you should be able to setup the calendar with the function presented -in the previous section. However, if for some reason <tt>Calendar.setup</tt> -doesn't provide all the functionality that you need and you want to tweak into -the process of creating and configuring the calendar ``by hand'', then this -section is the way to go.</p> -<p> -The file <tt>calendar.js</tt> implements the functionality of the calendar. -All (well, almost all) functions and variables are embedded in the JavaScript -object ``Calendar''.</p> -<p> -You can instantiate a <tt>Calendar</tt> object by calling the constructor, like -this: <tt>var cal = new Calendar(<tt>...</tt>)</tt>. We will discuss the parameters -later. After creating the object, the variable <tt>cal</tt> will contain a -reference to it. You can use this reference to access further options of the -calendar, for instance:</p> -<p> -</p> -<pre class=verbatim>cal.weekNumbers = false; // do not display week numbers -cal.showsTime = true; // include a time selector -cal.setDateFormat("%Y.%m.%d %H:%M"); // set this format: 2003.12.31 23:59 -cal.setDisabledHandler(function(date, year, month, day) { - // verify date and return true if it has to be disabled - // ``date'' is a JS Date object, but if you only need the - // year, month and/or day you can get them separately as - // next 3 parameters, as you can see in the declaration - if (year == 2004) { - // disable all dates from 2004 - return true; - } - return false; -}); -</pre><p></p> -<p> -etc. Prior to version -0.9.3 this was the only way to configure it. The <tt>Calendar.setup</tt> -function, documented in section <a href="#node_sec_2">2</a>, basically does the same -things (actually more) in order to setup the calendar, based on the parameters -that you provided.</p> -<p> -</p> -<a name="node_sec_4.1"></a> -<h2><a href="#node_toc_node_sec_4.1">4.1 Creating a calendar</a></h2> -<p>The calendar is created by following some steps (even the function -<tt>Calendar.setup</tt>, described in section <a href="#node_sec_2">2</a>, does the -same). While you can skip optional (marked ``opt'') steps if you're happy with -the defaults, please respect the order below.</p> -<p> -</p> -<ol><p> -</p> -<li><p><em>Instantiate</em> a <tt>Calendar</tt> object. Details about this in -section <a href="#node_sec_5.1">5.1</a>.</p> -<p> -</p> -<li><p><b>opt</b> Set the <tt>weekNumbers</tt> property to <tt>false</tt> if you don't want -the calendar to display week numbers.</p> -<p> -</p> -<li><p><b>opt</b> Set the <tt>showsTime</tt> property to <tt>true</tt> if you -want the calendar to also provide a time selector.</p> -<p> -</p> -<li><p><b>opt</b> Set the <tt>time24</tt> property to <tt>false</tt> if you want -the time selector to be in 12-hour format. Default is 24-hour format. This -property only has effect if you also set <tt>showsTime</tt> to -<tt>true</tt>.</p> -<p> -</p> -<li><p><b>opt</b> Set the range of years available for selection (see section -<a href="#node_sec_5.3.15">5.3.15</a>). The default range is [1970..2050].</p> -<p> -</p> -<li><p><b>opt</b> Set the <tt>getDateStatus</tt> property. You should pass -here a function that receives a JavaScript <tt>Date</tt> object and returns -<tt>true</tt> if the given date should be disabled, false otherwise (details in -section <a href="#node_sec_5.3.7">5.3.7</a>).</p> -<p> -</p> -<li><p><b>opt</b> Set a date format. Your handler function, passed to the -calendar constructor, will be called when a date is selected with a reference -to the calendar and a date string in this format.</p> -<p> -</p> -<li><p><em>Create</em> the HTML elements related to the calendar. This step -practically puts the calendar in your HTML page. You simply call -<tt>Calendar.create()</tt>. You can give an optional parameter if you wanna -create a flat calendar (details in section <a href="#node_sec_5.3.1">5.3.1</a>).</p> -<p> -</p> -<li><p><b>opt</b> Initialize the calendar to a certain date, for instance from -the input field.</p> -<p> -</p> -<li><p>Show the calendar (details in section <a href="#node_sec_5.3.9">5.3.9</a>).</p> -<p> -</p> -</ol><p></p> -<p> -</p> -<a name="node_sec_4.2"></a> -<h2><a href="#node_toc_node_sec_4.2">4.2 Order does matter ;-)</a></h2> -<p>As you could see in the previous section, there are more steps to be followed -in order to setup the calendar. This happens because there are two different -things that need to be accomplished: first there is the JavaScript object, that -is created with <tt>new Calendar(<tt>...</tt>)</tt>. Secondly there are the HTML -elements that actually lets you see and manipulate the calendar.</p> -<p> -</p> -<span class=small>[ Those that did UI<a name="call_footnote_Temp_5"></a><a href="#footnote_Temp_5"><sup><small>4</small></sup></a> programming, no matter in what -language and on what platform, may be familiar with this concept. First there -is the object in memory that lets you manipulate the UI element, and secondly -there is the UI element (known as ``control'', ``window'', ``widget'', etc.), -also in memory but you don't usually access it directly. ] -</span><p> -By instantiating the calendar we create the JavaScript object. It lets us -configure some properties and it also knows how to create the UI element (the -HTML elements actually) that will eventually be what the end-user sees on -screen. Creation of the HTML element is accomplished by the function -<tt>Calendar.create</tt>. It knows how to create popup or flat calendars. -This function is described in section <a href="#node_sec_5.3.1">5.3.1</a>.</p> -<p> -Some properties need to be set prior to creating the HTML elements, because -otherwise they wouldn't have any effect. Such a property is -<tt>weekNumbers</tt> -- it has the default value ``true'', and if you don't -want the calendar to display the week numbers you have to set it to false. If, -however, you do that <em>after</em> calling <tt>Calendar.create</tt> the calendar -would still display the week numbers, because the HTML elements are already -created (including the <tt><td></tt>-s in the <tt><table></tt> element that -should contain the week numbers). For this reason the order of the steps above -is important.</p> -<p> -Another example is when you want to show the calendar. The ``create'' function -does create the HTML elements, but they are initially hidden (have the style -``display: none'') unless the calendar is a flat calendar that should be always -visible in the page. Obviously, the <tt>Calendar.show</tt> function should be -called <em>after</em> calling <tt>Calendar.create</tt>.</p> -<p> -</p> -<a name="node_sec_4.3"></a> -<h2><a href="#node_toc_node_sec_4.3">4.3 Caching the object</a></h2> -<p>Suppose the end-user has popped up a calendar and selects a date. The calendar -then closes. What really happens now?</p> -<p> -There are two approaches. The first (used in very old versions of the -calendar) was to drop completely the Calendar object and when the end-user pops -up the calendar again to create another one. This approach is bad for more -reasons:</p> -<p> -</p> -<ul><p> -</p> -<li><p>creating the JavaScript object and HTML elements is time-consuming</p> -<p> -</p> -<li><p>we may loose some end-user preferences (i.e. he might prefer to have -Monday for the first day of week and probably already clicked it the first time -when the calendar was opened, but now he has to do it again)</p> -<p> -</p> -</ul><p></p> -<p> -The second approach, implemented by the <tt>Calendar.setup</tt> function, is to -cache the JavaScript object. It does this by checking the global variable -<tt>window.calendar</tt> and if it is not null it assumes it is the created -Calendar object. When the end-user closes the calendar, our code will only -call ``<tt>hide</tt>'' on it, therefore keeping the JavaScript object and the -HTML elements in place.</p> -<p> -<font color="red">CAVEAT:</font> Since time selection support was introduced, this -``object caching'' mechanism has the following drawback: if you once created -the calendar with the time selection support, then other items that may not -require this functionality will still get a calendar with the time selection -support enabled. And reciprocal. ;-) Hopefully this will be corrected in a -later version, but for now it doesn't seem such a big problem.</p> -<p> -</p> -<a name="node_sec_4.4"></a> -<h2><a href="#node_toc_node_sec_4.4">4.4 Callback functions</a></h2> -<p>You might rightfully wonder how is the calendar related to the input field? -Who tells it that it has to update <em>that</em> input field when a date is -selected, or that it has to jump to <em>that</em> URL when a date is clicked in -flat mode?</p> -<p> -All this magic is done through callback functions. The calendar doesn't know -anything about the existence of an input field, nor does it know where to -redirect the browser when a date is clicked in flat mode. It just calls your -callback when a particular event is happening, and you're responsible to handle -it from there. For a general purpose library I think this is the best model of -making a truly reusable thing.</p> -<p> -The calendar supports the following user callbacks:</p> -<p> -</p> -<ul><p> -</p> -<li><p><b>onSelect</b> -- this gets called when the end-user changes the date in the -calendar. Documented in section <a href="#node_sec_5.1">5.1</a>.</p> -<p> -</p> -<li><p><b>onClose</b> -- this gets called when the calendar should close. It's -user's responsibility to close the calendar. Details in section -<a href="#node_sec_5.1">5.1</a>.</p> -<p> -</p> -<li><p><b>getDateStatus</b> -- this function gets called for any day in a month, -just before displaying the month. It is called with a JavaScript <tt>Date</tt> -object and should return <tt>true</tt> if that date should be disabled, false -if it's an ordinary date and no action should be taken, or it can return a -string in which case the returned value will be appended to the element's CSS -class (this way it provides a powerful way to make some dates ``special'', -i.e. highlight them differently). Details in section -<a href="#node_sec_5.3.8">5.3.8</a>.</p> -<p> -</p> -</ul><p></p> -<p> -</p> -<a name="node_sec_5"></a> -<h1><a href="#node_toc_node_sec_5">5 The Calendar object API reference</a></h1> -<p></p> -<p> -</p> -<a name="node_sec_5.1"></a> -<h2><a href="#node_toc_node_sec_5.1">5.1 <tt>Calendar</tt> constructor</a></h2> -<p></p> -<p> -Synopsis:</p> -<p> -</p> -<pre class=verbatim>var calendar = Calendar(firstDayOfWeek, date, onSelect, onClose); -</pre><p></p> -<p> -Parameters are as follows:</p> -<p> -</p> -<ul><p> -</p> -<li><p><b>firstDayOfWeek</b> -- specifies which day is to be displayed as the first -day of week. Possible values are 0 to 6; 0 means Sunday, 1 means Monday, -..., 6 means Saturday.</p> -<p> -</p> -<li><p><b>date</b> -- a JavaScript Date object or <tt>null</tt>. If <tt>null</tt> -is passed then the calendar will default to today date. Otherwise it will -initialize on the given date.</p> -<p> -</p> -<li><p><b>onSelect</b> -- your callback for the ``onChange'' event. See above.</p> -<p> -</p> -<li><p><b>onClose</b> -- your callback for the ``onClose'' event. See above.</p> -<p> -</p> -</ul><p></p> -<p> -</p> -<a name="node_sec_Temp_6"></a> -<h3><a href="#node_toc_node_sec_Temp_6">The <tt>onSelect</tt> event</a></h3> -<p></p> -<p> -Here is a typical implementation of this function:</p> -<p> -</p> -<pre class=verbatim>function onSelect(calendar, date) { - var input_field = document.getElementById("date"); - input_field.value = date; -}; -</pre><p></p> -<p> -<tt>date</tt> is in the format selected with <tt>calendar.setDateFormat</tt> -(see section <a href="#node_sec_5.3.5">5.3.5</a>). This code simply updates the -input field. If you want the calendar to be in single-click mode then you -should also close the calendar after you updated the input field, so we come to -the following version:</p> -<p> -</p> -<pre class=verbatim>function onSelect(calendar, date) { - var input_field = document.getElementById("date"); - input_field.value = date; - if (calendar.dateClicked) { - calendar.callCloseHandler(); // this calls "onClose" (see above) - } -}; -</pre><p></p> -<p> -Note that we checked the member variable <tt>dateClicked</tt> and -only hide the calendar if it's <tt>true</tt>. If this variable is <tt>false</tt> it -means that no date was actually selected, but the user only changed the -month/year using the navigation buttons or the menus. We don't want to hide -the calendar in that case.</p> -<p> -</p> -<a name="node_sec_Temp_7"></a> -<h3><a href="#node_toc_node_sec_Temp_7">The <tt>onClose</tt> event</a></h3> -<p></p> -<p> -This event is triggered when the calendar should close. It should hide or -destroy the calendar object -- the calendar itself just triggers the event, but -it won't close itself.</p> -<p> -A typical implementation of this function is the following:</p> -<p> -</p> -<pre class=verbatim>function onClose(calendar) { - calendar.hide(); - // or calendar.destroy(); -}; -</pre><p></p> -<p> -</p> -<a name="node_sec_5.2"></a> -<h2><a href="#node_toc_node_sec_5.2">5.2 Useful member variables (properties)</a></h2> -<p></p> -<p> -After creating the Calendar object you can access the following properties:</p> -<p> -</p> -<ul><p> -</p> -<li><p><tt>date</tt> -- is a JavaScript <tt>Date</tt> object. It will always -reflect the date shown in the calendar (yes, even if the calendar is hidden).</p> -<p> -</p> -<li><p><tt>isPopup</tt> -- if this is true then the current Calendar object is -a popup calendar. Otherwise (false) we have a flat calendar. This variable is -set from <tt>Calendar.create</tt> and has no meaning before this function was -called.</p> -<p> -</p> -<li><p><tt>dateClicked</tt> -- particularly useful in the <tt>onSelect</tt> -handler, this variable tells us if a date was really clicked. That's because -the <tt>onSelect</tt> handler is called even if the end-user only changed the -month/year but did not select a date. We don't want to close the calendar in -that case.</p> -<p> -</p> -<li><p><tt>weekNumbers</tt> -- if <tt>true</tt> (default) then the calendar -displays week numbers. If you don't want week numbers you have to set this -variable to <tt>false</tt> <em>before</em> calling <tt>Calendar.create</tt>.</p> -<p> -</p> -<li><p><tt>showsTime</tt> - if you set this to <tt>true</tt> (it is -<tt>false</tt> by default) then the calendar will also include a time selector.</p> -<p> -</p> -<li><p><tt>time24</tt> - if you set this to <tt>false</tt> then the time -selector will be in 12-hour format. It is in 24-hour format by default.</p> -<p> -</p> -<li><p><tt>firstDayOfWeek</tt> -- specifies the first day of week (0 to 6, pass -0 for Sunday, 1 for Monday, ..., 6 for Saturday). This variable is set from -constructor, but you still have a chance to modify it <em>before</em> calling -<tt>Calendar.create</tt>.</p> -<p> -</p> -</ul><p></p> -<p> -There are lots of other member variables, but one should access them only -through member functions so I won't document them here.</p> -<p> -</p> -<a name="node_sec_5.3"></a> -<h2><a href="#node_toc_node_sec_5.3">5.3 Public methods</a></h2> -<p></p> -<a name="node_sec_5.3.1"></a> -<h3><a href="#node_toc_node_sec_5.3.1">5.3.1 <tt>Calendar.create</tt></a></h3> -<p></p> -<p> -This function creates the afferent HTML elements that are needed to display the -calendar. You should call it after setting the calendar properties. Synopsis: -</p> -<pre class=verbatim>calendar.create(); // creates a popup calendar - // -- or -- -calendar.create(document.getElementById(parent_id)); // makes a flat calendar -</pre><p></p> -<p> -It can create a popup calendar or a flat calendar. If the ``parent'' argument -is present (it should be a <em>reference</em> -- not ID -- to an HTML element) then -a flat calendar is created and it is inserted in the given element.</p> -<p> -At any moment, given a reference to a calendar object, we can inspect if it's a -popup or a flat calendar by checking the boolean member variable -<tt>isPopup</tt>:</p> -<p> -</p> -<pre class=verbatim>if (calendar.isPopup) { - // this is a popup calendar -} else { - // this is a flat calendar -} -</pre><p></p> -<p> -</p> -<a name="node_sec_5.3.2"></a> -<h3><a href="#node_toc_node_sec_5.3.2">5.3.2 <tt>Calendar.callHandler</tt></a></h3> -<p></p> -<p> -This function calls the first user callback (the -<tt>onSelect</tt> handler) with the required parameters.</p> -<p> -</p> -<a name="node_sec_5.3.3"></a> -<h3><a href="#node_toc_node_sec_5.3.3">5.3.3 <tt>Calendar.callCloseHandler</tt></a></h3> -<p></p> -<p> -This function calls the second user callback (the -<tt>onClose</tt> handler). It's useful when you want to have a -``single-click'' calendar -- just call this in your <tt>onSelect</tt> handler, -if a date was clicked.</p> -<p> -</p> -<a name="node_sec_5.3.4"></a> -<h3><a href="#node_toc_node_sec_5.3.4">5.3.4 <tt>Calendar.hide</tt></a></h3> -<p></p> -<p> -Call this function to hide the calendar. The calendar object and HTML elements -will not be destroyed, thus you can later call one of the <tt>show</tt> -functions on the same element.</p> -<p> -</p> -<a name="node_sec_5.3.5"></a> -<h3><a href="#node_toc_node_sec_5.3.5">5.3.5 <tt>Calendar.setDateFormat</tt></a></h3> -<p></p> -<p> -This function configures the format in which the calendar reports the date to -your ``onSelect'' handler. Call it like this:</p> -<p> -</p> -<pre class=verbatim>calendar.setDateFormat("%y/%m/%d"); -</pre><p></p> -<p> -As you can see, it receives only one parameter, the required format. The magic -characters are the following:</p> -<p> -</p> -<table border=0><tr><td valign=top ></td></tr> -<tr><td valign=top ><tt>%a</tt> </td><td valign=top >abbreviated weekday name </td></tr> -<tr><td valign=top ><tt>%A</tt> </td><td valign=top >full weekday name </td></tr> -<tr><td valign=top ><tt>%b</tt> </td><td valign=top >abbreviated month name </td></tr> -<tr><td valign=top ><tt>%B</tt> </td><td valign=top >full month name </td></tr> -<tr><td valign=top ><tt>%C</tt> </td><td valign=top >century number </td></tr> -<tr><td valign=top ><tt>%d</tt> </td><td valign=top >the day of the month ( 00 .. 31 ) </td></tr> -<tr><td valign=top ><tt>%e</tt> </td><td valign=top >the day of the month ( 0 .. 31 ) </td></tr> -<tr><td valign=top ><tt>%H</tt> </td><td valign=top >hour ( 00 .. 23 ) </td></tr> -<tr><td valign=top ><tt>%I</tt> </td><td valign=top >hour ( 01 .. 12 ) </td></tr> -<tr><td valign=top ><tt>%j</tt> </td><td valign=top >day of the year ( 000 .. 366 ) </td></tr> -<tr><td valign=top ><tt>%k</tt> </td><td valign=top >hour ( 0 .. 23 ) </td></tr> -<tr><td valign=top ><tt>%l</tt> </td><td valign=top >hour ( 1 .. 12 ) </td></tr> -<tr><td valign=top ><tt>%m</tt> </td><td valign=top >month ( 01 .. 12 ) </td></tr> -<tr><td valign=top ><tt>%M</tt> </td><td valign=top >minute ( 00 .. 59 ) </td></tr> -<tr><td valign=top ><tt>%n</tt> </td><td valign=top >a newline character </td></tr> -<tr><td valign=top ><tt>%p</tt> </td><td valign=top >``PM'' or ``AM'' </td></tr> -<tr><td valign=top ><tt>%P</tt> </td><td valign=top >``pm'' or ``am'' </td></tr> -<tr><td valign=top ><tt>%S</tt> </td><td valign=top >second ( 00 .. 59 ) </td></tr> -<tr><td valign=top ><tt>%s</tt> </td><td valign=top >number of seconds since Epoch (since Jan 01 1970 00:00:00 UTC) </td></tr> -<tr><td valign=top ><tt>%t</tt> </td><td valign=top >a tab character </td></tr> -<tr><td valign=top ><tt>%U, %W, %V</tt> </td><td valign=top >the week number</td></tr> -<tr><td valign=top ><tt>%u</tt> </td><td valign=top >the day of the week ( 1 .. 7, 1 = MON )</td></tr> -<tr><td valign=top ><tt>%w</tt> </td><td valign=top >the day of the week ( 0 .. 6, 0 = SUN )</td></tr> -<tr><td valign=top ><tt>%y</tt> </td><td valign=top >year without the century ( 00 .. 99 )</td></tr> -<tr><td valign=top ><tt>%Y</tt> </td><td valign=top >year including the century ( ex. 1979 )</td></tr> -<tr><td valign=top ><tt>%%</tt> </td><td valign=top >a literal <tt>%</tt> character -</td></tr></table><p> -There are more algorithms for computing the week number. All -three specifiers currently implement the same one, as defined by ISO 8601: -``the week 01 is the week that has the Thursday in the current year, which is -equivalent to the week that contains the fourth day of January. Weeks start on -Monday.''</p> -<p> -</p> -<a name="node_sec_5.3.6"></a> -<h3><a href="#node_toc_node_sec_5.3.6">5.3.6 <tt>Calendar.setTtDateFormat</tt></a></h3> -<p></p> -<p> -Has the same prototype as <tt>Calendar.setDateFormat</tt>, but refers to the -format of the date displayed in the ``status bar'' when the mouse is over some -date.</p> -<p> -</p> -<a name="node_sec_5.3.7"></a> -<h3><a href="#node_toc_node_sec_5.3.7">5.3.7 <tt>Calendar.setDisabledHandler</tt></a></h3> -<p></p> -<p> -This function allows you to specify a callback function that checks if a -certain date must be disabled by the calendar. You are responsible to write -the callback function. Synopsis:</p> -<p> -</p> -<pre class=verbatim>function disallowDate(date) { - // date is a JS Date object - if ( date.getFullYear() == 2003 && - date.getMonth() == 6 /* July, it's zero-based */ && - date.getDate() == 5 ) { - return true; // disable July 5 2003 - } - return false; // enable other dates -}; - -calendar.setDisabledHandler(disallowDate); -</pre><p></p> -<p> -If you change this function in ``real-time'', meaning, without creating a new -calendar, then you have to call <tt>calendar.refresh()</tt> to make it -redisplay the month and take into account the new disabledHandler. -<tt>Calendar.setup</tt> does this, so you have no such trouble with it.</p> -<p> -Note that <tt>disallowDate</tt> should be very fast, as it is called for each -date in the month. Thus, it gets called, say, 30 times before displaying the -calendar, and 30 times when the month is changed. Tests I've done so far show -that it's still good, but in the future I might switch it to a different design -(for instance, to call it once per month and to return an array of dates that -must be disabled).</p> -<p> -This function should be considered deprecated in the favor of -<tt>Calendar.setDateStatusHandler</tt>, described below.</p> -<p> -</p> -<a name="node_sec_5.3.8"></a> -<h3><a href="#node_toc_node_sec_5.3.8">5.3.8 <tt>Calendar.setDateStatusHandler</tt></a></h3> -<p></p> -<p> -This function obsoletes <tt>Calendar.setDisabledHandler</tt>. You call it with -a function parameter, but this function can return a boolean -<em>or a string</em>. If the return value is a boolean (<tt>true</tt> or -<tt>false</tt>) then it behaves just like <tt>setDisabledHandler</tt>, -therefore disabling the date if the return value is <tt>true</tt>.</p> -<p> -If the returned value is a string then the given date will gain an additional -CSS class, namely the returned value. You can use this to highlight some dates -in some way. Note that you are responsible for defining the CSS class that you -return. If you return the string ``disabled'' then that date will be disabled, -just as if you returned <tt>true</tt>.</p> -<p> -Here is a simple scenario that shows what you can do with this function. The -following should be present in some of your styles, or in the document head in -a STYLE tag (but put it <em>after</em> the place where the calendar styles were -loaded):</p> -<p> -</p> -<pre class=verbatim>.special { background-color: #000; color: #fff; } -</pre><p></p> -<p> -And you would use the following code before calling <tt>Calendar.create()</tt>:</p> -<p> -</p> -<pre class=verbatim>// this table holds your special days, so that we can automatize -// things a bit: -var SPECIAL_DAYS = { - 0 : [ 13, 24 ], // special days in January - 2 : [ 1, 6, 8, 12, 18 ], // special days in March - 8 : [ 21, 11 ], // special days in September - 11 : [ 25, 28 ] // special days in December -}; - -// this function returns true if the passed date is special -function dateIsSpecial(year, month, day) { - var m = SPECIAL_DAYS[month]; - if (!m) return false; - for (var i in m) if (m[i] == day) return true; - return false; -} - -// this is the actual date status handler. Note that it receives the -// date object as well as separate values of year, month and date, for -// your confort. -function dateStatusHandler(date, y, m, d) { - if (dateIsSpecial(y, m, d)) return ``special''; - else return false; - // return true above if you want to disable other dates -} - -// configure it to the calendar -calendar.setDateStatusHandler(dateStatusHandler); -</pre><p></p> -<p> -The above code adds the ``special'' class name to some dates that are defined -in the SPECIAL_DAYS table. Other dates will simply be displayed as default, -enabled.</p> -<p> -</p> -<a name="node_sec_5.3.9"></a> -<h3><a href="#node_toc_node_sec_5.3.9">5.3.9 <tt>Calendar.show</tt></a></h3> -<p></p> -<p> -Call this function do show the calendar. It basically sets the CSS ``display'' -property to ``block''. It doesn't modify the calendar position.</p> -<p> -This function only makes sense when the calendar is in popup mode.</p> -<p> -</p> -<a name="node_sec_5.3.10"></a> -<h3><a href="#node_toc_node_sec_5.3.10">5.3.10 <tt>Calendar.showAt</tt></a></h3> -<p></p> -<p> -Call this to show the calendar at a certain (x, y) position. Prototype:</p> -<p> -</p> -<pre class=verbatim>calendar.showAt(x, y); -</pre><p></p> -<p> -The parameters are absolute coordinates relative to the top left -corner <em>of the page</em>, thus they are <em>page</em> coordinates not screen -coordinates.</p> -<p> -After setting the given coordinates it calls Calendar.show. This function only -makes sense when the calendar is in popup mode.</p> -<p> -</p> -<a name="node_sec_5.3.11"></a> -<h3><a href="#node_toc_node_sec_5.3.11">5.3.11 <tt>Calendar.showAtElement</tt></a></h3> -<p></p> -<p> -This function is useful if you want to display the calendar near some element. -You call it like this:</p> -<p> -</p> -<pre class=verbatim>calendar.showAtElement(element, align); -</pre><p></p> -<p> -where element is a reference to your element (for instance it can be the input -field that displays the date) and align is an optional parameter, of type string, -containing one or two characters. For instance, if you pass <tt>"Br"</tt> as -align, the calendar will appear <em>below</em> the element and with its right -margin continuing the element's right margin.</p> -<p> -As stated above, align may contain one or two characters. The first character -dictates the vertical alignment, relative to the element, and the second -character dictates the horizontal alignment. If the second character is -missing it will be assumed <tt>"l"</tt> (the left margin of the calendar will -be at the same horizontal position as the left margin of the element).</p> -<p> -The characters given for the align parameters are case sensitive. This -function only makes sense when the calendar is in popup mode. After computing -the position it uses <tt>Calendar.showAt</tt> to display the calendar there.</p> -<p> -</p> -<a name="node_sec_Temp_8"></a> -<h4><a href="#node_toc_node_sec_Temp_8">Vertical alignment</a></h4> -<p>The first character in ``<tt>align</tt>'' can take one of the following values:</p> -<p> -</p> -<ul><p> -</p> -<li><p><tt>T</tt> -- completely above the reference element (bottom margin of -the calendar aligned to the top margin of the element).</p> -<p> -</p> -<li><p><tt>t</tt> -- above the element but may overlap it (bottom margin of the calendar aligned to -the bottom margin of the element).</p> -<p> -</p> -<li><p><tt>c</tt> -- the calendar displays vertically centered to the reference -element. It might overlap it (that depends on the horizontal alignment).</p> -<p> -</p> -<li><p><tt>b</tt> -- below the element but may overlap it (top margin of the calendar aligned to -the top margin of the element).</p> -<p> -</p> -<li><p><tt>B</tt> -- completely below the element (top margin of the calendar -aligned to the bottom margin of the element).</p> -<p> -</p> -</ul><p></p> -<p> -</p> -<a name="node_sec_Temp_9"></a> -<h4><a href="#node_toc_node_sec_Temp_9">Horizontal alignment</a></h4> -<p>The second character in ``<tt>align</tt>'' can take one of the following values:</p> -<p> -</p> -<ul><p> -</p> -<li><p><tt>L</tt> -- completely to the left of the reference element (right -margin of the calendar aligned to the left margin of the element).</p> -<p> -</p> -<li><p><tt>l</tt> -- to the left of the element but may overlap it (left margin -of the calendar aligned to the left margin of the element).</p> -<p> -</p> -<li><p><tt>c</tt> -- horizontally centered to the element. Might overlap it, -depending on the vertical alignment.</p> -<p> -</p> -<li><p><tt>r</tt> -- to the right of the element but may overlap it (right -margin of the calendar aligned to the right margin of the element).</p> -<p> -</p> -<li><p><tt>R</tt> -- completely to the right of the element (left margin of the -calendar aligned to the right margin of the element).</p> -<p> -</p> -</ul><p></p> -<p> -</p> -<a name="node_sec_Temp_10"></a> -<h4><a href="#node_toc_node_sec_Temp_10">Default values</a></h4> -<p>If the ``<tt>align</tt>'' parameter is missing the calendar will choose -``<tt>Br</tt>''.</p> -<p> -</p> -<a name="node_sec_5.3.12"></a> -<h3><a href="#node_toc_node_sec_5.3.12">5.3.12 <tt>Calendar.setDate</tt></a></h3> -<p></p> -<p> -Receives a JavaScript <tt>Date</tt> object. Sets the given date in the -calendar. If the calendar is visible the new date is displayed immediately.</p> -<p> -</p> -<pre class=verbatim>calendar.setDate(new Date()); // go today -</pre><p></p> -<p> -</p> -<a name="node_sec_5.3.13"></a> -<h3><a href="#node_toc_node_sec_5.3.13">5.3.13 <tt>Calendar.setFirstDayOfWeek</tt></a></h3> -<p></p> -<p> -Changes the first day of week. The parameter has to be a numeric value ranging -from 0 to 6. Pass 0 for Sunday, 1 for Monday, ..., 6 for Saturday.</p> -<p> -</p> -<pre class=verbatim>calendar.setFirstDayOfWeek(5); // start weeks on Friday -</pre><p></p> -<p> -</p> -<a name="node_sec_5.3.14"></a> -<h3><a href="#node_toc_node_sec_5.3.14">5.3.14 <tt>Calendar.parseDate</tt></a></h3> -<p></p> -<p> -Use this function to parse a date given as string and to move the calendar to -that date.</p> -<p> -The algorithm tries to parse the date according to the format that was -previously set with <tt>Calendar.setDateFormat</tt>; if that fails, it still -tries to get some valid date out of it (it doesn't read your thoughts, though).</p> -<p> -</p> -<pre class=verbatim>calendar.parseDate("2003/07/06"); -</pre><p></p> -<p> -</p> -<a name="node_sec_5.3.15"></a> -<h3><a href="#node_toc_node_sec_5.3.15">5.3.15 <tt>Calendar.setRange</tt></a></h3> -<p></p> -<p> -Sets the range of years that are allowed in the calendar. Synopsis:</p> -<p> -</p> -<pre class=verbatim>calendar.setRange(1970, 2050); -</pre><p></p> -<p> -</p> -<a name="node_sec_6"></a> -<h1><a href="#node_toc_node_sec_6">6 Side effects</a></h1> -<p>The calendar code was intentionally embedded in an object to make it have as -less as possible side effects. However, there are some -- not harmful, after -all. Here is a list of side effects; you can count they already happened after -<tt>calendar.js</tt> was loaded.</p> -<p> -</p> -<ol><p> -</p> -<li><p>The global variable <tt>window.calendar</tt> will be set to null. This -variable is used by the calendar code, especially when doing drag & drop for -moving the calendar. In the future I might get rid of it, but for now it -didn't harm anyone.</p> -<p> -</p> -<li><p>The JavaScript <tt>Date</tt> object is modified. We add some properties -and functions that are very useful to our calendar. It made more sense to add -them directly to the <tt>Date</tt> object than to the calendar itself. -Complete list:</p> -<p> -</p> -<ol><p> -</p> -<li><p><tt>Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);</tt> -</p> -<li><p><tt>Date.SECOND = 1000 /* milliseconds */;</tt> -</p> -<li><p><tt>Date.MINUTE = 60 * Date.SECOND;</tt> -</p> -<li><p><tt>Date.HOUR = 60 * Date.MINUTE;</tt> -</p> -<li><p><tt>Date.DAY = 24 * Date.HOUR;</tt> -</p> -<li><p><tt>Date.WEEK = 7 * Date.DAY;</tt></p> -<p> -</p> -<li><p><tt>Date.prototype.getMonthDays</tt>(month) -- returns the number of days -of the given month, or of the current date object if no month was given.</p> -<p> -</p> -<li><p><tt>Date.prototype.getWeekNumber</tt>() -- returns the week number of the -date in the current object.</p> -<p> -</p> -<li><p><tt>Date.prototype.equalsTo</tt>(other_date) -- compare the current date -object with <tt>other_date</tt> and returns <tt>true</tt> if the dates are -equal. <em>It ignores time</em>.</p> -<p> -</p> -<li><p><tt>Date.prototype.print</tt>(format) -- returns a string with the -current date object represented in the given format. It implements the format -specified in section <a href="#node_sec_5.3.5">5.3.5</a>.</p> -<p> -</p> -</ol><p></p> -<p> -</p> -</ol><p></p> -<p> -</p> -<a name="node_sec_7"></a> -<h1><a href="#node_toc_node_sec_7">7 Credits</a></h1> -<p>The following people either sponsored, donated money to the project or bought -commercial licenses (listed in reverse chronological order). Your name could -be here too! If you wish to sponsor the project (for instance request a -feature and pay me for implementing it) or donate some money please -<em>please</em> contact me at <tt><a href="mailto:mihai\_bazon@yahoo.com">mihai_bazon@yahoo.com</a></tt>.</p> -<p> -</p> -<ul><p> -</p> -<li><p>Sunny Chowdhury (<a href="http://www.ex3.com">www.ex3.com</a>)</p> -<p> -</p> -<li><p>Ian Barrack (<a href="http://www.simban.com">www.simban.com</a>)</p> -<p> -</p> -<li><p>Himanshukumar Shah</p> -<p> -</p> -<li><p>Seyhan Ersoy (<a href="http://www.oocgi.com">www.oocgi.com</a>)</p> -<p> -</p> -<li><p>Jon Stokkeland (<a href="http://www.sauen.com">www.sauen.com</a>)</p> -<p> -</p> -</ul><p></p> -<p> -</p> -<div align=right><table><tr><td> - -<b>Thank you!</b><br> - -- <tt>mihai_bazon@yahoo.com</tt> -</td></tr></table></div> -<p> -</p> -<div class=footnoterule><hr></div><p></p> -<div class=footnote><p><a name="footnote_Temp_2"></a><a href="#call_footnote_Temp_2"><sup><small>1</small></sup></a> -by the term ``widget'' I understand a single element of user interface. -But that's in Linux world. For those that did lots of Windows -programming the term ``control'' might be more familiar -</p> -<p><a name="footnote_Temp_3"></a><a href="#call_footnote_Temp_3"><sup><small>2</small></sup></a> people report that the calendar does -not work with IE5/Mac. However, this browser was discontinued and we -believe that supporting it doesn't worth the efforts, given the fact that -it has the worst, buggiest implementation for DOM I've ever seen.</p> -<p><a name="footnote_Temp_4"></a><a href="#call_footnote_Temp_4"><sup><small>3</small></sup></a> under Opera 7 the calendar still lacks some functionality, such as -keyboard navigation; also Opera doesn't seem to allow disabling text -selection when one drags the mouse on the page; despite all that, the -calendar is still highly functional under Opera 7 and looks as good as -in other supported browsers. </p> -<p><a name="footnote_Temp_5"></a><a href="#call_footnote_Temp_5"><sup><small>4</small></sup></a> user interface</p> -</div> -<div align=right class=colophon> -<i>Last modified: Saturday, March 5th, 2005<br> -HTML conversion by <a href="http://www.ccs.neu.edu/~dorai/tex2page/tex2page-doc.html">TeX2page 2004-09-11</a></i> -</div> -</body> -</html> diff --git a/javascript/libs/dynarch/jscalendar/doc/reference.pdf b/javascript/libs/dynarch/jscalendar/doc/reference.pdf Binary files differdeleted file mode 100644 index a09497f..0000000 --- a/javascript/libs/dynarch/jscalendar/doc/reference.pdf +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/img.gif b/javascript/libs/dynarch/jscalendar/img.gif Binary files differdeleted file mode 100644 index cd2c4a5..0000000 --- a/javascript/libs/dynarch/jscalendar/img.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/index.html b/javascript/libs/dynarch/jscalendar/index.html deleted file mode 100644 index 0d6f0d8..0000000 --- a/javascript/libs/dynarch/jscalendar/index.html +++ /dev/null @@ -1,330 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<!-- $Id: index.html,v 1.1 2008/12/19 17:34:05 spiderr Exp $ --> - -<head> -<meta http-equiv="content-type" content="text/xml; charset=utf-8" /> -<title>The Coolest DHTML Calendar - Online Demo</title> -<link rel="stylesheet" type="text/css" media="all" href="skins/aqua/theme.css" title="Aqua" /> -<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-blue.css" title="winter" /> -<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-blue2.css" title="blue" /> -<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-brown.css" title="summer" /> -<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-green.css" title="green" /> -<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-win2k-1.css" title="win2k-1" /> -<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-win2k-2.css" title="win2k-2" /> -<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-win2k-cold-1.css" title="win2k-cold-1" /> -<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-win2k-cold-2.css" title="win2k-cold-2" /> -<link rel="alternate stylesheet" type="text/css" media="all" href="calendar-system.css" title="system" /> - -<!-- import the calendar script --> -<script type="text/javascript" src="calendar.js"></script> - -<!-- import the language module --> -<script type="text/javascript" src="lang/calendar-en.js"></script> - -<!-- other languages might be available in the lang directory; please check -your distribution archive. --> - -<!-- helper script that uses the calendar --> -<script type="text/javascript"> - -var oldLink = null; -// code to change the active stylesheet -function setActiveStyleSheet(link, title) { - var i, a, main; - for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { - if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { - a.disabled = true; - if(a.getAttribute("title") == title) a.disabled = false; - } - } - if (oldLink) oldLink.style.fontWeight = 'normal'; - oldLink = link; - link.style.fontWeight = 'bold'; - return false; -} - -// This function gets called when the end-user clicks on some date. -function selected(cal, date) { - cal.sel.value = date; // just update the date in the input field. - if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3")) - // if we add this call we close the calendar on single-click. - // just to exemplify both cases, we are using this only for the 1st - // and the 3rd field, while 2nd and 4th will still require double-click. - cal.callCloseHandler(); -} - -// And this gets called when the end-user clicks on the _selected_ date, -// or clicks on the "Close" button. It just hides the calendar without -// destroying it. -function closeHandler(cal) { - cal.hide(); // hide the calendar -// cal.destroy(); - _dynarch_popupCalendar = null; -} - -// This function shows the calendar under the element having the given id. -// It takes care of catching "mousedown" signals on document and hiding the -// calendar if the click was outside. -function showCalendar(id, format, showsTime, showsOtherMonths) { - var el = document.getElementById(id); - if (_dynarch_popupCalendar != null) { - // we already have some calendar created - _dynarch_popupCalendar.hide(); // so we hide it first. - } else { - // first-time call, create the calendar. - var cal = new Calendar(1, null, selected, closeHandler); - // uncomment the following line to hide the week numbers - // cal.weekNumbers = false; - if (typeof showsTime == "string") { - cal.showsTime = true; - cal.time24 = (showsTime == "24"); - } - if (showsOtherMonths) { - cal.showsOtherMonths = true; - } - _dynarch_popupCalendar = cal; // remember it in the global var - cal.setRange(1900, 2070); // min/max year allowed. - cal.create(); - } - _dynarch_popupCalendar.setDateFormat(format); // set the specified date format - _dynarch_popupCalendar.parseDate(el.value); // try to parse the text in field - _dynarch_popupCalendar.sel = el; // inform it what input field we use - - // the reference element that we pass to showAtElement is the button that - // triggers the calendar. In this example we align the calendar bottom-right - // to the button. - _dynarch_popupCalendar.showAtElement(el.nextSibling, "Br"); // show the calendar - - return false; -} - -var MINUTE = 60 * 1000; -var HOUR = 60 * MINUTE; -var DAY = 24 * HOUR; -var WEEK = 7 * DAY; - -// If this handler returns true then the "date" given as -// parameter will be disabled. In this example we enable -// only days within a range of 10 days from the current -// date. -// You can use the functions date.getFullYear() -- returns the year -// as 4 digit number, date.getMonth() -- returns the month as 0..11, -// and date.getDate() -- returns the date of the month as 1..31, to -// make heavy calculations here. However, beware that this function -// should be very fast, as it is called for each day in a month when -// the calendar is (re)constructed. -function isDisabled(date) { - var today = new Date(); - return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10; -} - -function flatSelected(cal, date) { - var el = document.getElementById("preview"); - el.innerHTML = date; -} - -function showFlatCalendar() { - var parent = document.getElementById("display"); - - // construct a calendar giving only the "selected" handler. - var cal = new Calendar(0, null, flatSelected); - - // hide week numbers - cal.weekNumbers = false; - - // We want some dates to be disabled; see function isDisabled above - cal.setDisabledHandler(isDisabled); - cal.setDateFormat("%A, %B %e"); - - // this call must be the last as it might use data initialized above; if - // we specify a parent, as opposite to the "showCalendar" function above, - // then we create a flat calendar -- not popup. Hidden, though, but... - cal.create(parent); - - // ... we can show it here. - cal.show(); -} -</script> - -<style type="text/css"> -.ex { font-weight: bold; background: #fed; color: #080 } -.help { color: #080; font-style: italic; } -body { background: #fea; font: 10pt tahoma,verdana,sans-serif; } -table { font: 13px verdana,tahoma,sans-serif; } -a { color: #00f; } -a:visited { color: #00f; } -a:hover { color: #f00; background: #fefaf0; } -a:active { color: #08f; } -.key { border: 1px solid #000; background: #fff; color: #008; -padding: 0px 5px; cursor: default; font-size: 80%; } -</style> - -</head> -<body onload="showFlatCalendar()"> - -<h2><a href="http://www.dynarch.com/projects/calendar/" -title="Visit the project website">jscalendar</a>-1.0 -"It is happening again"</h2> - -<p> -<div style="float: right; border: 1px solid #b87; padding: 2px; font-size: 90%; background: #ffb;"> -Theme:<br /> -<a href="#" id="defaultTheme" onclick="return setActiveStyleSheet(this, 'Aqua');">Aqua</a> -| -<a href="#" onclick="return setActiveStyleSheet(this, 'winter');">winter</a> -| -<a href="#" onclick="return setActiveStyleSheet(this, 'blue');">blue</a> -| -<a href="#" onclick="return setActiveStyleSheet(this, 'summer');">summer</a> -| -<a href="#" onclick="return setActiveStyleSheet(this, 'green');">green</a> -<br /> -<a href="#" onclick="return setActiveStyleSheet(this, 'win2k-1');">win2k-1</a> -| -<a href="#" onclick="return setActiveStyleSheet(this, 'win2k-2');">win2k-2</a> -| -<a href="#" onclick="return setActiveStyleSheet(this, 'win2k-cold-1');">win2k-cold-1</a> -| -<a href="#" onclick="return setActiveStyleSheet(this, 'win2k-cold-2');">win2k-cold-2</a> -<br /> -<a href="#" onclick="return setActiveStyleSheet(this, 'system');">system</a> -<script type="text/javascript"> -setActiveStyleSheet(document.getElementById("defaultTheme"), "Aqua"); -</script> -</div> -<a href="release-notes.html">Release notes</a>. -<br /> -Set it up in minutes: - <a href="simple-1.html">popup calendar</a>, - <a href="simple-2.html">flat calendar</a>. -Other samples: - <a href="simple-3.html">special days</a>, - <a href="dayinfo.html">day info</a>, - <a href="multiple-dates.html">multiple dates selection</a> -<br /> -Documentation: - <a href="doc/html/reference.html">HTML</a>, - <a href="doc/reference.pdf">PDF</a>. -<br /> -</p> - -<div style="padding-left:20px; font-size: 90%; font-style: italic;"> - -</div> - -<table style="width: 100%"> -<tr valign="top"> -<td style="background: #ffa; padding: 5px; border: 1px solid #995;"> - -<form action="#"> -<div style="background: #995; color: #ffa; font-weight: bold; padding: 2px;"> -Popup examples -</div> - -<br /> - -<b>Date #1:</b> <input type="text" name="date1" id="sel1" size="30" -><input type="reset" value=" ... " -onclick="return showCalendar('sel1', '%Y-%m-%d [%W] %H:%M', '24', true);"> %Y-%m-%d [%W] %H:%M -- single -click<br /> - -<b>Date #2:</b> <input type="text" name="date2" id="sel2" size="30" -><input type="reset" value=" ... " -onclick="return showCalendar('sel2', '%a, %b %e, %Y [%I:%M %p]', '12');"> %a, %b %e, %Y [%I:%M %p] --- double click - -<br /><br /> -<!-- -if you remove this comment and leave the following HTML code -you will see a horrible effect, in all supported browsers (IE and Mozilla). ---> -<SELECT multiple size="4" name="component-select"> - <OPTION selected value="Component_1_a">Component_1</OPTION> - <OPTION selected value="Component_1_b">Component_2</OPTION> - <OPTION>Component_3</OPTION> - <OPTION>Component_4</OPTION> - <OPTION>Component_5</OPTION> - <OPTION>Component_6</OPTION> - <OPTION>Component_7</OPTION> -</SELECT> -this select should hide when the calendar is above it. -<br /><br /> - -<b>Date #3:</b> <input type="text" name="date3" id="sel3" size="30" -><input type="reset" value=" ... " -onclick="return showCalendar('sel3', '%d/%m/%Y');"> %d/%m/%Y --- single click -<br /> - -<b>Date #4:</b> <input type="text" name="date4" id="sel4" size="30" -><input type="reset" value=" ... " -onclick="return showCalendar('sel4', '%A, %B %e, %Y');"> %A, %B %e, %Y -- -double click - -</form> - -<p>This is release <b>1.0</b>. Works on MSIE/Win 5.0 or better (really), -Opera 7+, Mozilla, Firefox, Netscape 6.x, 7.0 and all other Gecko-s, -Konqueror and Safari.</p> - -<h4>Keyboard navigation</h4> - -<p>Starting with version 0.9.2, you can also use the keyboard to select -dates (only for popup calendars; does <em>not</em> work with Opera -7 or Konqueror/Safari). The following keys are available:</p> - -<ul> - - <li><span class="key">←</span> , <span class="key">→</span> , - <span class="key">↑</span> , <span class="key">↓</span> -- select date</li> - <li><span class="key">CTRL</span> + <span class="key">←</span> , - <span class="key">→</span> -- select month</li> - <li><span class="key">CTRL</span> + <span class="key">↑</span> , - <span class="key">↓</span> -- select year</li> - <li><span class="key">SPACE</span> -- go to <em>today</em> date</li> - <li><span class="key">ENTER</span> -- accept the currently selected date</li> - <li><span class="key">ESC</span> -- cancel selection</li> - -</ul> - - </td> - - <td style="padding: 5px; margin: 5px; border: 1px solid #984; background: #ed9; width: 19em;"> - - <div style="background: #984; color: #fea; font-weight: bold; padding: 2px; text-align: center"> - Flat calendar - </div> - - <p style="width: 12em"><small>A non-popup version will appear below as soon - as the page is loaded. Note that it doesn't show the week number.</small></p> - - <!-- the calendar will be inserted here --> - <div id="display" style="float: right; clear: both;"></div> - <div id="preview" style="font-size: 80%; text-align: center; padding: 2px"> </div> - - <p style="clear: both;"><small> - The example above uses the <code>setDisabledHandler()</code> member function - to setup a handler that would only enable days withing a range of 10 days, - forward or backward, from the current date. - </small></p> - - </div> - - </td> - - </tr> - </table> - -<hr /><address> -© <a href="http://www.dynarch.com/">dynarch.com</a> 2002-2005 <br /> -Author: <a href="http://www.bazon.net/mishoo/">Mihai -Bazon</a><br /> Distributed under the <a -href="http://www.gnu.org/licenses/lgpl.html">GNU LGPL</a>.</address> - -<p style="font-size: smaller">If you use this script on a public page we -would love it if you would <a href="http://www.dynarch.com/contact.html">let us -know</a>.</p> - -</body></html> diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-af.js b/javascript/libs/dynarch/jscalendar/lang/calendar-af.js deleted file mode 100644 index aeda581..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-af.js +++ /dev/null @@ -1,39 +0,0 @@ -// ** I18N Afrikaans -Calendar._DN = new Array -("Sondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrydag", - "Saterdag", - "Sondag"); -Calendar._MN = new Array -("Januarie", - "Februarie", - "Maart", - "April", - "Mei", - "Junie", - "Julie", - "Augustus", - "September", - "Oktober", - "November", - "Desember"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Verander eerste dag van die week"; -Calendar._TT["PREV_YEAR"] = "Vorige jaar (hou vir keuselys)"; -Calendar._TT["PREV_MONTH"] = "Vorige maand (hou vir keuselys)"; -Calendar._TT["GO_TODAY"] = "Gaan na vandag"; -Calendar._TT["NEXT_MONTH"] = "Volgende maand (hou vir keuselys)"; -Calendar._TT["NEXT_YEAR"] = "Volgende jaar (hou vir keuselys)"; -Calendar._TT["SEL_DATE"] = "Kies datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te skuif"; -Calendar._TT["PART_TODAY"] = " (vandag)"; -Calendar._TT["MON_FIRST"] = "Vertoon Maandag eerste"; -Calendar._TT["SUN_FIRST"] = "Display Sunday first"; -Calendar._TT["CLOSE"] = "Close"; -Calendar._TT["TODAY"] = "Today"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-al.js b/javascript/libs/dynarch/jscalendar/lang/calendar-al.js deleted file mode 100644 index 4f701cf..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-al.js +++ /dev/null @@ -1,101 +0,0 @@ -// Calendar ALBANIAN language -//author Rigels Gordani rige@hotmail.com - -// ditet -Calendar._DN = new Array -("E Diele", -"E Hene", -"E Marte", -"E Merkure", -"E Enjte", -"E Premte", -"E Shtune", -"E Diele"); - -//ditet shkurt -Calendar._SDN = new Array -("Die", -"Hen", -"Mar", -"Mer", -"Enj", -"Pre", -"Sht", -"Die"); - -// muajt -Calendar._MN = new Array -("Janar", -"Shkurt", -"Mars", -"Prill", -"Maj", -"Qeshor", -"Korrik", -"Gusht", -"Shtator", -"Tetor", -"Nentor", -"Dhjetor"); - -// muajte shkurt -Calendar._SMN = new Array -("Jan", -"Shk", -"Mar", -"Pri", -"Maj", -"Qes", -"Kor", -"Gus", -"Sht", -"Tet", -"Nen", -"Dhj"); - -// ndihmesa -Calendar._TT = {}; -Calendar._TT["INFO"] = "Per kalendarin"; - -Calendar._TT["ABOUT"] = -"Zgjedhes i ores/dates ne DHTML \n" + -"\n\n" +"Zgjedhja e Dates:\n" + -"- Perdor butonat \xab, \xbb per te zgjedhur vitin\n" + -"- Perdor butonat" + String.fromCharCode(0x2039) + ", " + -String.fromCharCode(0x203a) + -" per te zgjedhur muajin\n" + -"- Mbani shtypur butonin e mousit per nje zgjedje me te shpejte."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Zgjedhja e kohes:\n" + -"- Kliko tek ndonje nga pjeset e ores per ta rritur ate\n" + -"- ose kliko me Shift per ta zvogeluar ate\n" + -"- ose cliko dhe terhiq per zgjedhje me te shpejte."; - -Calendar._TT["PREV_YEAR"] = "Viti i shkuar (prit per menune)"; -Calendar._TT["PREV_MONTH"] = "Muaji i shkuar (prit per menune)"; -Calendar._TT["GO_TODAY"] = "Sot"; -Calendar._TT["NEXT_MONTH"] = "Muaji i ardhshem (prit per menune)"; -Calendar._TT["NEXT_YEAR"] = "Viti i ardhshem (prit per menune)"; -Calendar._TT["SEL_DATE"] = "Zgjidh daten"; -Calendar._TT["DRAG_TO_MOVE"] = "Terhiqe per te levizur"; -Calendar._TT["PART_TODAY"] = " (sot)"; - -// "%s" eshte dita e pare e javes -// %s do te zevendesohet me emrin e dite -Calendar._TT["DAY_FIRST"] = "Trego te %s te paren"; - - -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Mbyll"; -Calendar._TT["TODAY"] = "Sot"; -Calendar._TT["TIME_PART"] = "Kliko me (Shift-)ose terhiqe per te ndryshuar -vleren"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Java"; -Calendar._TT["TIME"] = "Koha:"; - diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-bg.js b/javascript/libs/dynarch/jscalendar/lang/calendar-bg.js deleted file mode 100644 index 5eb73ec..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-bg.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N
-
-// Calendar BG language
-// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
-// Translator: Valentin Sheiretsky, <valio@valio.eu.org>
-// Encoding: Windows-1251
-// Distributed under the same terms as the calendar itself.
-
-// For translators: please use UTF-8 if possible. We strongly believe that
-// Unicode is the answer to a real internationalized world. Also please
-// include your contact information in the header, as can be seen above.
-
-// full day names
-Calendar._DN = new Array
-("",
- "",
- "",
- "",
- "",
- "",
- "",
- "");
-
-// Please note that the following array of short day names (and the same goes
-// for short month names, _SMN) isn't absolutely necessary. We give it here
-// for exemplification on how one can customize the short day names, but if
-// they are simply the first N letters of the full name you can simply say:
-//
-// Calendar._SDN_len = N; // short day name length
-// Calendar._SMN_len = N; // short month name length
-//
-// If N = 3 then this is not needed either since we assume a value of 3 if not
-// present, to be compatible with translation files that were written before
-// this feature.
-
-// short day names
-Calendar._SDN = new Array
-("",
- "",
- "",
- "",
- "",
- "",
- "",
- "");
-
-// full month names
-Calendar._MN = new Array
-("",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "");
-
-// short month names
-Calendar._SMN = new Array
-("",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "");
-
-// tooltips
-Calendar._TT = {};
-Calendar._TT["INFO"] = " ";
-
-Calendar._TT["ABOUT"] =
-"DHTML Date/Time Selector\n" +
-"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
-"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
-"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
-"\n\n" +
-"Date selection:\n" +
-"- Use the \xab, \xbb buttons to select year\n" +
-"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
-"- Hold mouse button on any of the above buttons for faster selection.";
-Calendar._TT["ABOUT_TIME"] = "\n\n" +
-"Time selection:\n" +
-"- Click on any of the time parts to increase it\n" +
-"- or Shift-click to decrease it\n" +
-"- or click and drag for faster selection.";
-
-Calendar._TT["PREV_YEAR"] = " ( )";
-Calendar._TT["PREV_MONTH"] = " ( )";
-Calendar._TT["GO_TODAY"] = " ";
-Calendar._TT["NEXT_MONTH"] = " ( )";
-Calendar._TT["NEXT_YEAR"] = " ( )";
-Calendar._TT["SEL_DATE"] = " ";
-Calendar._TT["DRAG_TO_MOVE"] = "";
-Calendar._TT["PART_TODAY"] = " ()";
-
-// the following is to inform that "%s" is to be the first day of week
-// %s will be replaced with the day name.
-Calendar._TT["DAY_FIRST"] = "%s ";
-
-// This may be locale-dependent. It specifies the week-end days, as an array
-// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
-// means Monday, etc.
-Calendar._TT["WEEKEND"] = "0,6";
-
-Calendar._TT["CLOSE"] = "";
-Calendar._TT["TODAY"] = "";
-Calendar._TT["TIME_PART"] = "(Shift-)Click drag ";
-
-// date formats
-Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
-Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y";
-
-Calendar._TT["WK"] = "";
-Calendar._TT["TIME"] = ":";
diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-big5-utf8.js b/javascript/libs/dynarch/jscalendar/lang/calendar-big5-utf8.js deleted file mode 100644 index 14e0d5d..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-big5-utf8.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar big5-utf8 language -// Author: Gary Fu, <gary@garyfu.idv.tw> -// Encoding: utf8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("星期日", - "星期一", - "星期二", - "星期三", - "星期四", - "星期五", - "星期六", - "星期日"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("日", - "一", - "二", - "三", - "四", - "五", - "六", - "日"); - -// full month names -Calendar._MN = new Array -("一月", - "二月", - "三月", - "四月", - "五月", - "六月", - "七月", - "八月", - "九月", - "十月", - "十一月", - "十二月"); - -// short month names -Calendar._SMN = new Array -("一月", - "二月", - "三月", - "四月", - "五月", - "六月", - "七月", - "八月", - "九月", - "十月", - "十一月", - "十二月"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "關於"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"日期選擇方法:\n" + -"- 使用 \xab, \xbb 按鈕可選擇年份\n" + -"- 使用 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 按鈕可選擇月份\n" + -"- 按住上面的按鈕可以加快選取"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"時間選擇方法:\n" + -"- 點擊任何的時間部份可增加其值\n" + -"- 同時按Shift鍵再點擊可減少其值\n" + -"- 點擊並拖曳可加快改變的值"; - -Calendar._TT["PREV_YEAR"] = "上一年 (按住選單)"; -Calendar._TT["PREV_MONTH"] = "下一年 (按住選單)"; -Calendar._TT["GO_TODAY"] = "到今日"; -Calendar._TT["NEXT_MONTH"] = "上一月 (按住選單)"; -Calendar._TT["NEXT_YEAR"] = "下一月 (按住選單)"; -Calendar._TT["SEL_DATE"] = "選擇日期"; -Calendar._TT["DRAG_TO_MOVE"] = "拖曳"; -Calendar._TT["PART_TODAY"] = " (今日)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "將 %s 顯示在前"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "關閉"; -Calendar._TT["TODAY"] = "今日"; -Calendar._TT["TIME_PART"] = "點擊or拖曳可改變時間(同時按Shift為減)"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "週"; -Calendar._TT["TIME"] = "Time:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-big5.js b/javascript/libs/dynarch/jscalendar/lang/calendar-big5.js deleted file mode 100644 index a589358..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-big5.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar big5 language -// Author: Gary Fu, <gary@garyfu.idv.tw> -// Encoding: big5 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("P", - "P@", - "PG", - "PT", - "P|", - "P", - "P", - "P"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "@", - "G", - "T", - "|", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("@", - "G", - "T", - "|", - "", - "", - "C", - "K", - "E", - "Q", - "Q@", - "QG"); - -// short month names -Calendar._SMN = new Array -("@", - "G", - "T", - "|", - "", - "", - "C", - "K", - "E", - "Q", - "Q@", - "QG"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = ""; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"ܤk:\n" + -"- ϥ \xab, \xbb siܦ~\n" + -"- ϥ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " siܤ\n" + -"- WsiH[ֿ"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"ɶܤk:\n" + -"- IɶiW[\n" + -"- PɫShiftAIi֨\n" + -"- Ié즲i[֧ܪ"; - -Calendar._TT["PREV_YEAR"] = "W@~ ()"; -Calendar._TT["PREV_MONTH"] = "U@~ ()"; -Calendar._TT["GO_TODAY"] = "줵"; -Calendar._TT["NEXT_MONTH"] = "W@ ()"; -Calendar._TT["NEXT_YEAR"] = "U@ ()"; -Calendar._TT["SEL_DATE"] = "ܤ"; -Calendar._TT["DRAG_TO_MOVE"] = "즲"; -Calendar._TT["PART_TODAY"] = " ()"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "N %s ܦbe"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = ""; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "Ior즲iܮɶ(PɫShift)"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "g"; -Calendar._TT["TIME"] = "Time:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-br.js b/javascript/libs/dynarch/jscalendar/lang/calendar-br.js deleted file mode 100644 index bfb0747..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-br.js +++ /dev/null @@ -1,108 +0,0 @@ -// ** I18N - -// Calendar pt-BR language -// Author: Fernando Dourado, <fernando.dourado@ig.com.br> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sabádo", - "Domingo"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -// [No changes using default values] - -// full month names -Calendar._MN = new Array -("Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro"); - -// short month names -// [No changes using default values] - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Sobre o calendário"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Translate to portuguese Brazil (pt-BR) by Fernando Dourado (fernando.dourado@ig.com.br)\n" + -"Tradução para o português Brasil (pt-BR) por Fernando Dourado (fernando.dourado@ig.com.br)" + -"\n\n" + -"Selecionar data:\n" + -"- Use as teclas \xab, \xbb para selecionar o ano\n" + -"- Use as teclas " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para selecionar o mês\n" + -"- Clique e segure com o mouse em qualquer botão para selecionar rapidamente."; - -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selecionar hora:\n" + -"- Clique em qualquer uma das partes da hora para aumentar\n" + -"- ou Shift-clique para diminuir\n" + -"- ou clique e arraste para selecionar rapidamente."; - -Calendar._TT["PREV_YEAR"] = "Ano anterior (clique e segure para menu)"; -Calendar._TT["PREV_MONTH"] = "Mês anterior (clique e segure para menu)"; -Calendar._TT["GO_TODAY"] = "Ir para a data atual"; -Calendar._TT["NEXT_MONTH"] = "Próximo mês (clique e segure para menu)"; -Calendar._TT["NEXT_YEAR"] = "Próximo ano (clique e segure para menu)"; -Calendar._TT["SEL_DATE"] = "Selecione uma data"; -Calendar._TT["DRAG_TO_MOVE"] = "Clique e segure para mover"; -Calendar._TT["PART_TODAY"] = " (hoje)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Exibir %s primeiro"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fechar"; -Calendar._TT["TODAY"] = "Hoje"; -Calendar._TT["TIME_PART"] = "(Shift-)Clique ou arraste para mudar o valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%d de %B de %Y"; - -Calendar._TT["WK"] = "sem"; -Calendar._TT["TIME"] = "Hora:"; - diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-ca.js b/javascript/libs/dynarch/jscalendar/lang/calendar-ca.js deleted file mode 100644 index a2121bc..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-ca.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar CA language -// Author: Mihai Bazon, <mihai_bazon@yahoo.com> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Diumenge", - "Dilluns", - "Dimarts", - "Dimecres", - "Dijous", - "Divendres", - "Dissabte", - "Diumenge"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Diu", - "Dil", - "Dmt", - "Dmc", - "Dij", - "Div", - "Dis", - "Diu"); - -// full month names -Calendar._MN = new Array -("Gener", - "Febrer", - "Mar", - "Abril", - "Maig", - "Juny", - "Juliol", - "Agost", - "Setembre", - "Octubre", - "Novembre", - "Desembre"); - -// short month names -Calendar._SMN = new Array -("Gen", - "Feb", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Oct", - "Nov", - "Des"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Sobre el calendari"; - -Calendar._TT["ABOUT"] = -"DHTML Selector de Data/Hora\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Sel.lecci de Dates:\n" + -"- Fes servir els botons \xab, \xbb per sel.leccionar l'any\n" + -"- Fes servir els botons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per se.lecciconar el mes\n" + -"- Mant el ratol apretat en qualsevol dels anteriors per sel.lecci rpida."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Time selection:\n" + -"- claca en qualsevol de les parts de la hora per augmentar-les\n" + -"- o Shift-click per decrementar-la\n" + -"- or click and arrastra per sel.lecci rpida."; - -Calendar._TT["PREV_YEAR"] = "Any anterior (Mantenir per menu)"; -Calendar._TT["PREV_MONTH"] = "Mes anterior (Mantenir per menu)"; -Calendar._TT["GO_TODAY"] = "Anar a avui"; -Calendar._TT["NEXT_MONTH"] = "Mes segent (Mantenir per menu)"; -Calendar._TT["NEXT_YEAR"] = "Any segent (Mantenir per menu)"; -Calendar._TT["SEL_DATE"] = "Sel.leccionar data"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar per moure"; -Calendar._TT["PART_TODAY"] = " (avui)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostra %s primer"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Tanca"; -Calendar._TT["TODAY"] = "Avui"; -Calendar._TT["TIME_PART"] = "(Shift-)Click a arrastra per canviar el valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "st"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-cs-utf8.js b/javascript/libs/dynarch/jscalendar/lang/calendar-cs-utf8.js deleted file mode 100644 index f6bbbeb..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-cs-utf8.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - calendar-cs-win.js - language: Czech - encoding: windows-1250 - author: Lubos Jerabek (xnet@seznam.cz) - Jan Uhlir (espinosa@centrum.cz) -*/ - -// ** I18N -Calendar._DN = new Array('Neděle','Pondělí','Úterý','Středa','Čtvrtek','Pátek','Sobota','Neděle'); -Calendar._SDN = new Array('Ne','Po','Út','St','Čt','Pá','So','Ne'); -Calendar._MN = new Array('Leden','Únor','Březen','Duben','Květen','Červen','Červenec','Srpen','Září','Říjen','Listopad','Prosinec'); -Calendar._SMN = new Array('Led','Úno','Bře','Dub','Kvě','Črv','Čvc','Srp','Zář','Říj','Lis','Pro'); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O komponentě kalendář"; -Calendar._TT["TOGGLE"] = "Změna prvního dne v týdnu"; -Calendar._TT["PREV_YEAR"] = "Předchozí rok (přidrž pro menu)"; -Calendar._TT["PREV_MONTH"] = "Předchozí měsíc (přidrž pro menu)"; -Calendar._TT["GO_TODAY"] = "Dnešní datum"; -Calendar._TT["NEXT_MONTH"] = "Další měsíc (přidrž pro menu)"; -Calendar._TT["NEXT_YEAR"] = "Další rok (přidrž pro menu)"; -Calendar._TT["SEL_DATE"] = "Vyber datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Chyť a táhni, pro přesun"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "Ukaž jako první Pondělí"; -//Calendar._TT["SUN_FIRST"] = "Ukaž jako první Neděli"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Výběr datumu:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Použijte tlačítka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k výběru měsíce\n" + -"- Podržte tlačítko myši na jakémkoliv z těch tlačítek pro rychlejší výběr."; - -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Výběr času:\n" + -"- Klikněte na jakoukoliv z částí výběru času pro zvýšení.\n" + -"- nebo Shift-click pro snížení\n" + -"- nebo klikněte a táhněte pro rychlejší výběr."; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Zobraz %s první"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Zavřít"; -Calendar._TT["TODAY"] = "Dnes"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo táhni pro změnu hodnoty"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Čas:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-cs-win.js b/javascript/libs/dynarch/jscalendar/lang/calendar-cs-win.js deleted file mode 100644 index 140dff3..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-cs-win.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - calendar-cs-win.js - language: Czech - encoding: windows-1250 - author: Lubos Jerabek (xnet@seznam.cz) - Jan Uhlir (espinosa@centrum.cz) -*/ - -// ** I18N -Calendar._DN = new Array('Nedle','Pondl','ter','Steda','tvrtek','Ptek','Sobota','Nedle'); -Calendar._SDN = new Array('Ne','Po','t','St','t','P','So','Ne'); -Calendar._MN = new Array('Leden','nor','Bezen','Duben','Kvten','erven','ervenec','Srpen','Z','jen','Listopad','Prosinec'); -Calendar._SMN = new Array('Led','no','Be','Dub','Kv','rv','vc','Srp','Z','j','Lis','Pro'); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O komponent kalend"; -Calendar._TT["TOGGLE"] = "Zmna prvnho dne v tdnu"; -Calendar._TT["PREV_YEAR"] = "Pedchoz rok (pidr pro menu)"; -Calendar._TT["PREV_MONTH"] = "Pedchoz msc (pidr pro menu)"; -Calendar._TT["GO_TODAY"] = "Dnen datum"; -Calendar._TT["NEXT_MONTH"] = "Dal msc (pidr pro menu)"; -Calendar._TT["NEXT_YEAR"] = "Dal rok (pidr pro menu)"; -Calendar._TT["SEL_DATE"] = "Vyber datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Chy a thni, pro pesun"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "Uka jako prvn Pondl"; -//Calendar._TT["SUN_FIRST"] = "Uka jako prvn Nedli"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Vbr datumu:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Pouijte tlatka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k vbru msce\n" + -"- Podrte tlatko myi na jakmkoliv z tch tlatek pro rychlej vbr."; - -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Vbr asu:\n" + -"- Kliknte na jakoukoliv z st vbru asu pro zven.\n" + -"- nebo Shift-click pro snen\n" + -"- nebo kliknte a thnte pro rychlej vbr."; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Zobraz %s prvn"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Zavt"; -Calendar._TT["TODAY"] = "Dnes"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo thni pro zmnu hodnoty"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "as:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-da.js b/javascript/libs/dynarch/jscalendar/lang/calendar-da.js deleted file mode 100644 index a99b598..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-da.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar DA language -// Author: Michael Thingmand Henriksen, <michael (a) thingmand dot dk> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Søndag", -"Mandag", -"Tirsdag", -"Onsdag", -"Torsdag", -"Fredag", -"Lørdag", -"Søndag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Søn", -"Man", -"Tir", -"Ons", -"Tor", -"Fre", -"Lør", -"Søn"); - -// full month names -Calendar._MN = new Array -("Januar", -"Februar", -"Marts", -"April", -"Maj", -"Juni", -"Juli", -"August", -"September", -"Oktober", -"November", -"December"); - -// short month names -Calendar._SMN = new Array -("Jan", -"Feb", -"Mar", -"Apr", -"Maj", -"Jun", -"Jul", -"Aug", -"Sep", -"Okt", -"Nov", -"Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Om Kalenderen"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For den seneste version besøg: http://www.dynarch.com/projects/calendar/\n"; + -"Distribueret under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detajler." + -"\n\n" + -"Valg af dato:\n" + -"- Brug \xab, \xbb knapperne for at vælge år\n" + -"- Brug " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knapperne for at vælge måned\n" + -"- Hold knappen på musen nede på knapperne ovenfor for hurtigere valg."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Valg af tid:\n" + -"- Klik på en vilkårlig del for større værdi\n" + -"- eller Shift-klik for for mindre værdi\n" + -"- eller klik og træk for hurtigere valg."; - -Calendar._TT["PREV_YEAR"] = "Ét år tilbage (hold for menu)"; -Calendar._TT["PREV_MONTH"] = "Én måned tilbage (hold for menu)"; -Calendar._TT["GO_TODAY"] = "Gå til i dag"; -Calendar._TT["NEXT_MONTH"] = "Én måned frem (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "Ét år frem (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Vælg dag"; -Calendar._TT["DRAG_TO_MOVE"] = "Træk vinduet"; -Calendar._TT["PART_TODAY"] = " (i dag)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Vis %s først"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Luk"; -Calendar._TT["TODAY"] = "I dag"; -Calendar._TT["TIME_PART"] = "(Shift-)klik eller træk for at ændre værdi"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Uge"; -Calendar._TT["TIME"] = "Tid:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-de.js b/javascript/libs/dynarch/jscalendar/lang/calendar-de.js deleted file mode 100644 index 4bc1137..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-de.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar DE language -// Author: Jack (tR), <jack@jtr.de> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sonntag", - "Montag", - "Dienstag", - "Mittwoch", - "Donnerstag", - "Freitag", - "Samstag", - "Sonntag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("So", - "Mo", - "Di", - "Mi", - "Do", - "Fr", - "Sa", - "So"); - -// full month names -Calendar._MN = new Array -("Januar", - "Februar", - "M\u00e4rz", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Dezember"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "M\u00e4r", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Okt", - "Nov", - "Dez"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "\u00DCber dieses Kalendarmodul"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Datum ausw\u00e4hlen:\n" + -"- Benutzen Sie die \xab, \xbb Buttons um das Jahr zu w\u00e4hlen\n" + -"- Benutzen Sie die " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " Buttons um den Monat zu w\u00e4hlen\n" + -"- F\u00fcr eine Schnellauswahl halten Sie die Maustaste \u00fcber diesen Buttons fest."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Zeit ausw\u00e4hlen:\n" + -"- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\u00F6hen\n" + -"- oder klicken Sie mit festgehaltener Shift-Taste um diese zu verringern\n" + -"- oder klicken und festhalten f\u00fcr Schnellauswahl."; - -Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\u00e4hlen"; -Calendar._TT["PREV_YEAR"] = "Voriges Jahr (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["PREV_MONTH"] = "Voriger Monat (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["GO_TODAY"] = "Heute ausw\u00e4hlen"; -Calendar._TT["NEXT_MONTH"] = "N\u00e4chst. Monat (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["NEXT_YEAR"] = "N\u00e4chst. Jahr (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["SEL_DATE"] = "Datum ausw\u00e4hlen"; -Calendar._TT["DRAG_TO_MOVE"] = "Zum Bewegen festhalten"; -Calendar._TT["PART_TODAY"] = " (Heute)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Woche beginnt mit %s "; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Schlie\u00dfen"; -Calendar._TT["TODAY"] = "Heute"; -Calendar._TT["TIME_PART"] = "(Shift-)Klick oder Festhalten und Ziehen um den Wert zu \u00e4ndern"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Zeit:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-du.js b/javascript/libs/dynarch/jscalendar/lang/calendar-du.js deleted file mode 100644 index 2200448..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-du.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Zondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag"); -Calendar._MN = new Array -("Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Toggle startdag van de week"; -Calendar._TT["PREV_YEAR"] = "Vorig jaar (indrukken voor menu)"; -Calendar._TT["PREV_MONTH"] = "Vorige month (indrukken voor menu)"; -Calendar._TT["GO_TODAY"] = "Naar Vandaag"; -Calendar._TT["NEXT_MONTH"] = "Volgende Maand (indrukken voor menu)"; -Calendar._TT["NEXT_YEAR"] = "Volgend jaar (indrukken voor menu)"; -Calendar._TT["SEL_DATE"] = "Selecteer datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te verplaatsen"; -Calendar._TT["PART_TODAY"] = " (vandaag)"; -Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; -Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; -Calendar._TT["CLOSE"] = "Sluiten"; -Calendar._TT["TODAY"] = "Vandaag"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "wk"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-el.js b/javascript/libs/dynarch/jscalendar/lang/calendar-el.js deleted file mode 100644 index 43a9b2c..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-el.js +++ /dev/null @@ -1,89 +0,0 @@ -// ** I18N
-Calendar._DN = new Array
-("Κυριακή",
- "Δευτέρα",
- "Τρίτη",
- "Τετάρτη",
- "Πέμπτη",
- "Παρασκευή",
- "Σάββατο",
- "Κυριακή");
-
-Calendar._SDN = new Array
-("Κυ",
- "Δε",
- "Tρ",
- "Τε",
- "Πε",
- "Πα",
- "Σα",
- "Κυ");
-
-Calendar._MN = new Array
-("Ιανουάριος",
- "Φεβρουάριος",
- "Μάρτιος",
- "Απρίλιος",
- "Μάϊος",
- "Ιούνιος",
- "Ιούλιος",
- "Αύγουστος",
- "Σεπτέμβριος",
- "Οκτώβριος",
- "Νοέμβριος",
- "Δεκέμβριος");
-
-Calendar._SMN = new Array
-("Ιαν",
- "Φεβ",
- "Μαρ",
- "Απρ",
- "Μαι",
- "Ιουν",
- "Ιουλ",
- "Αυγ",
- "Σεπ",
- "Οκτ",
- "Νοε",
- "Δεκ");
-
-// tooltips
-Calendar._TT = {};
-Calendar._TT["INFO"] = "Για το ημερολόγιο";
-
-Calendar._TT["ABOUT"] =
-"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" +
-"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
-"Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n" +
-"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
-"\n\n" +
-"Επιλογή ημερομηνίας:\n" +
-"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" +
-"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" +
-"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή.";
-Calendar._TT["ABOUT_TIME"] = "\n\n" +
-"Επιλογή ώρας:\n" +
-"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" +
-"- ή Shift-κλικ για μείωση\n" +
-"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή.";
-Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας";
-Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)";
-Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)";
-Calendar._TT["GO_TODAY"] = "Σήμερα";
-Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)";
-Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)";
-Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία";
-Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε";
-Calendar._TT["PART_TODAY"] = " (σήμερα)";
-Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα";
-Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα";
-Calendar._TT["CLOSE"] = "Κλείσιμο";
-Calendar._TT["TODAY"] = "Σήμερα";
-Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή";
-
-// date formats
-Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
-Calendar._TT["TT_DATE_FORMAT"] = "D, d M";
-
-Calendar._TT["WK"] = "εβδ";
-
diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-en.js b/javascript/libs/dynarch/jscalendar/lang/calendar-en.js deleted file mode 100644 index 0dbde79..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-en.js +++ /dev/null @@ -1,127 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, <mihai_bazon@yahoo.com> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat", - "Sun"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 0; - -// full month names -Calendar._MN = new Array -("January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "About the calendar"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Date selection:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + -"- Hold mouse button on any of the above buttons for faster selection."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Time selection:\n" + -"- Click on any of the time parts to increase it\n" + -"- or Shift-click to decrease it\n" + -"- or click and drag for faster selection."; - -Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)"; -Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)"; -Calendar._TT["GO_TODAY"] = "Go Today"; -Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Select date"; -Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; -Calendar._TT["PART_TODAY"] = " (today)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Display %s first"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Close"; -Calendar._TT["TODAY"] = "Today"; -Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Time:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-es.js b/javascript/libs/dynarch/jscalendar/lang/calendar-es.js deleted file mode 100644 index 19c1b30..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-es.js +++ /dev/null @@ -1,129 +0,0 @@ -// ** I18N - -// Calendar ES (spanish) language -// Author: Mihai Bazon, <mihai_bazon@yahoo.com> -// Updater: Servilio Afre Puentes <servilios@yahoo.com> -// Updated: 2004-06-03 -// Encoding: utf-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Lunes", - "Martes", - "Mircoles", - "Jueves", - "Viernes", - "Sbado", - "Domingo"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dom", - "Lun", - "Mar", - "Mi", - "Jue", - "Vie", - "Sb", - "Dom"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 1; - -// full month names -Calendar._MN = new Array -("Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre"); - -// short month names -Calendar._SMN = new Array -("Ene", - "Feb", - "Mar", - "Abr", - "May", - "Jun", - "Jul", - "Ago", - "Sep", - "Oct", - "Nov", - "Dic"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Acerca del calendario"; - -Calendar._TT["ABOUT"] = -"Selector DHTML de Fecha/Hora\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Para conseguir la ltima versin visite: http://www.dynarch.com/projects/calendar/\n" + -"Distribuido bajo licencia GNU LGPL. Visite http://gnu.org/licenses/lgpl.html para ms detalles." + -"\n\n" + -"Seleccin de fecha:\n" + -"- Use los botones \xab, \xbb para seleccionar el ao\n" + -"- Use los botones " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" + -"- Mantenga pulsado el ratn en cualquiera de estos botones para una seleccin rpida."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Seleccin de hora:\n" + -"- Pulse en cualquiera de las partes de la hora para incrementarla\n" + -"- o pulse las maysculas mientras hace clic para decrementarla\n" + -"- o haga clic y arrastre el ratn para una seleccin ms rpida."; - -Calendar._TT["PREV_YEAR"] = "Ao anterior (mantener para men)"; -Calendar._TT["PREV_MONTH"] = "Mes anterior (mantener para men)"; -Calendar._TT["GO_TODAY"] = "Ir a hoy"; -Calendar._TT["NEXT_MONTH"] = "Mes siguiente (mantener para men)"; -Calendar._TT["NEXT_YEAR"] = "Ao siguiente (mantener para men)"; -Calendar._TT["SEL_DATE"] = "Seleccionar fecha"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar para mover"; -Calendar._TT["PART_TODAY"] = " (hoy)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Hacer %s primer da de la semana"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Cerrar"; -Calendar._TT["TODAY"] = "Hoy"; -Calendar._TT["TIME_PART"] = "(Mayscula-)Clic o arrastre para cambiar valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; - -Calendar._TT["WK"] = "sem"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-fi.js b/javascript/libs/dynarch/jscalendar/lang/calendar-fi.js deleted file mode 100644 index 328eabb..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-fi.js +++ /dev/null @@ -1,98 +0,0 @@ -// ** I18N - -// Calendar FI language (Finnish, Suomi) -// Author: Jarno Käyhkö, <gambler@phnet.fi> -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("Sunnuntai", - "Maanantai", - "Tiistai", - "Keskiviikko", - "Torstai", - "Perjantai", - "Lauantai", - "Sunnuntai"); - -// short day names -Calendar._SDN = new Array -("Su", - "Ma", - "Ti", - "Ke", - "To", - "Pe", - "La", - "Su"); - -// full month names -Calendar._MN = new Array -("Tammikuu", - "Helmikuu", - "Maaliskuu", - "Huhtikuu", - "Toukokuu", - "Kesäkuu", - "Heinäkuu", - "Elokuu", - "Syyskuu", - "Lokakuu", - "Marraskuu", - "Joulukuu"); - -// short month names -Calendar._SMN = new Array -("Tam", - "Hel", - "Maa", - "Huh", - "Tou", - "Kes", - "Hei", - "Elo", - "Syy", - "Lok", - "Mar", - "Jou"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Tietoja kalenterista"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Uusin versio osoitteessa: http://www.dynarch.com/projects/calendar/\n" + -"Julkaistu GNU LGPL lisenssin alaisuudessa. Lisätietoja osoitteessa http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Päivämäärä valinta:\n" + -"- Käytä \xab, \xbb painikkeita valitaksesi vuosi\n" + -"- Käytä " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " painikkeita valitaksesi kuukausi\n" + -"- Pitämällä hiiren painiketta minkä tahansa yllä olevan painikkeen kohdalla, saat näkyviin valikon nopeampaan siirtymiseen."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Ajan valinta:\n" + -"- Klikkaa kellonajan numeroita lisätäksesi aikaa\n" + -"- tai pitämällä Shift-näppäintä pohjassa saat aikaa taaksepäin\n" + -"- tai klikkaa ja pidä hiiren painike pohjassa sekä liikuta hiirtä muuttaaksesi aikaa nopeasti eteen- ja taaksepäin."; - -Calendar._TT["PREV_YEAR"] = "Edell. vuosi (paina hetki, näet valikon)"; -Calendar._TT["PREV_MONTH"] = "Edell. kuukausi (paina hetki, näet valikon)"; -Calendar._TT["GO_TODAY"] = "Siirry tähän päivään"; -Calendar._TT["NEXT_MONTH"] = "Seur. kuukausi (paina hetki, näet valikon)"; -Calendar._TT["NEXT_YEAR"] = "Seur. vuosi (paina hetki, näet valikon)"; -Calendar._TT["SEL_DATE"] = "Valitse päivämäärä"; -Calendar._TT["DRAG_TO_MOVE"] = "Siirrä kalenterin paikkaa"; -Calendar._TT["PART_TODAY"] = " (tänään)"; -Calendar._TT["MON_FIRST"] = "Näytä maanantai ensimmäisenä"; -Calendar._TT["SUN_FIRST"] = "Näytä sunnuntai ensimmäisenä"; -Calendar._TT["CLOSE"] = "Sulje"; -Calendar._TT["TODAY"] = "Tänään"; -Calendar._TT["TIME_PART"] = "(Shift-) Klikkaa tai liikuta muuttaaksesi aikaa"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%d.%m.%Y"; - -Calendar._TT["WK"] = "Vko"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-fr.js b/javascript/libs/dynarch/jscalendar/lang/calendar-fr.js deleted file mode 100644 index 2a9e0b2..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-fr.js +++ /dev/null @@ -1,125 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, <mihai_bazon@yahoo.com> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// Translator: David Duret, <pilgrim@mala-template.net> from previous french version - -// full day names -Calendar._DN = new Array -("Dimanche", - "Lundi", - "Mardi", - "Mercredi", - "Jeudi", - "Vendredi", - "Samedi", - "Dimanche"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dim", - "Lun", - "Mar", - "Mar", - "Jeu", - "Ven", - "Sam", - "Dim"); - -// full month names -Calendar._MN = new Array -("Janvier", - "Fvrier", - "Mars", - "Avril", - "Mai", - "Juin", - "Juillet", - "Aot", - "Septembre", - "Octobre", - "Novembre", - "Dcembre"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Fev", - "Mar", - "Avr", - "Mai", - "Juin", - "Juil", - "Aout", - "Sep", - "Oct", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "A propos du calendrier"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Heure Selecteur\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Pour la derniere version visitez : http://www.dynarch.com/projects/calendar/\n" + -"Distribu par GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les details." + -"\n\n" + -"Selection de la date :\n" + -"- Utiliser les bouttons \xab, \xbb pour selectionner l\'annee\n" + -"- Utiliser les bouttons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour selectionner les mois\n" + -"- Garder la souris sur n'importe quels boutons pour une selection plus rapide"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selection de l\'heure :\n" + -"- Cliquer sur heures ou minutes pour incrementer\n" + -"- ou Maj-clic pour decrementer\n" + -"- ou clic et glisser-deplacer pour une selection plus rapide"; - -Calendar._TT["PREV_YEAR"] = "Anne prc. (maintenir pour menu)"; -Calendar._TT["PREV_MONTH"] = "Mois prc. (maintenir pour menu)"; -Calendar._TT["GO_TODAY"] = "Atteindre la date du jour"; -Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)"; -Calendar._TT["NEXT_YEAR"] = "Anne suiv. (maintenir pour menu)"; -Calendar._TT["SEL_DATE"] = "Slectionner une date"; -Calendar._TT["DRAG_TO_MOVE"] = "Dplacer"; -Calendar._TT["PART_TODAY"] = " (Aujourd'hui)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Afficher %s en premier"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fermer"; -Calendar._TT["TODAY"] = "Aujourd'hui"; -Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour modifier la valeur"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Sem."; -Calendar._TT["TIME"] = "Heure :"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-he-utf8.js b/javascript/libs/dynarch/jscalendar/lang/calendar-he-utf8.js deleted file mode 100644 index 7861217..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-he-utf8.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Idan Sofer, <idan@idanso.dyndns.org> -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("ראשון", - "שני", - "שלישי", - "רביעי", - "חמישי", - "שישי", - "שבת", - "ראשון"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("א", - "ב", - "ג", - "ד", - "ה", - "ו", - "ש", - "א"); - -// full month names -Calendar._MN = new Array -("ינואר", - "פברואר", - "מרץ", - "אפריל", - "מאי", - "יוני", - "יולי", - "אוגוסט", - "ספטמבר", - "אוקטובר", - "נובמבר", - "דצמבר"); - -// short month names -Calendar._SMN = new Array -("ינא", - "פבר", - "מרץ", - "אפר", - "מאי", - "יונ", - "יול", - "אוג", - "ספט", - "אוק", - "נוב", - "דצמ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "אודות השנתון"; - -Calendar._TT["ABOUT"] = -"בחרן תאריך/שעה DHTML\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"הגירסא האחרונה זמינה ב: http://www.dynarch.com/projects/calendar/\n" + -"מופץ תחת זיכיון ה GNU LGPL. עיין ב http://gnu.org/licenses/lgpl.html לפרטים נוספים." + -"\n\n" + -בחירת תאריך:\n" + -"- השתמש בכפתורים \xab, \xbb לבחירת שנה\n" + -"- השתמש בכפתורים " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " לבחירת חודש\n" + -"- החזק העכבר לחוץ מעל הכפתורים המוזכרים לעיל לבחירה מהירה יותר."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"בחירת זמן:\n" + -"- לחץ על כל אחד מחלקי הזמן כדי להוסיף\n" + -"- או shift בשילוב עם לחיצה כדי להחסיר\n" + -"- או לחץ וגרור לפעולה מהירה יותר."; - -Calendar._TT["PREV_YEAR"] = "שנה קודמת - החזק לקבלת תפריט"; -Calendar._TT["PREV_MONTH"] = "חודש קודם - החזק לקבלת תפריט"; -Calendar._TT["GO_TODAY"] = "עבור להיום"; -Calendar._TT["NEXT_MONTH"] = "חודש הבא - החזק לתפריט"; -Calendar._TT["NEXT_YEAR"] = "שנה הבאה - החזק לתפריט"; -Calendar._TT["SEL_DATE"] = "בחר תאריך"; -Calendar._TT["DRAG_TO_MOVE"] = "גרור להזזה"; -Calendar._TT["PART_TODAY"] = " )היום("; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "הצג %s קודם"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "6"; - -Calendar._TT["CLOSE"] = "סגור"; -Calendar._TT["TODAY"] = "היום"; -Calendar._TT["TIME_PART"] = "(שיפט-)לחץ וגרור כדי לשנות ערך"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "שעה::"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-hr-utf8.js b/javascript/libs/dynarch/jscalendar/lang/calendar-hr-utf8.js deleted file mode 100644 index d569cfd..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-hr-utf8.js +++ /dev/null @@ -1,49 +0,0 @@ -/* Croatian language file for the DHTML Calendar version 0.9.2
-* Author Krunoslav Zubrinic <krunoslav.zubrinic@vip.hr>, June 2003.
-* Feel free to use this script under the terms of the GNU Lesser General
-* Public License, as long as you do not remove or alter this notice.
-*/
-Calendar._DN = new Array
-("Nedjelja",
- "Ponedjeljak",
- "Utorak",
- "Srijeda",
- "Četvrtak",
- "Petak",
- "Subota",
- "Nedjelja");
-Calendar._MN = new Array
-("Siječanj",
- "Veljača",
- "Ožujak",
- "Travanj",
- "Svibanj",
- "Lipanj",
- "Srpanj",
- "Kolovoz",
- "Rujan",
- "Listopad",
- "Studeni",
- "Prosinac");
-
-// tooltips
-Calendar._TT = {};
-Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan";
-Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)";
-Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)";
-Calendar._TT["GO_TODAY"] = "Idi na tekući dan";
-Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)";
-Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)";
-Calendar._TT["SEL_DATE"] = "Izaberite datum";
-Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije";
-Calendar._TT["PART_TODAY"] = " (today)";
-Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan";
-Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan";
-Calendar._TT["CLOSE"] = "Zatvori";
-Calendar._TT["TODAY"] = "Danas";
-
-// date formats
-Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
-Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y";
-
-Calendar._TT["WK"] = "Tje";
\ No newline at end of file diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-hr.js b/javascript/libs/dynarch/jscalendar/lang/calendar-hr.js Binary files differdeleted file mode 100644 index 6c27f60..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-hr.js +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-hu.js b/javascript/libs/dynarch/jscalendar/lang/calendar-hu.js deleted file mode 100644 index f5bf057..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-hu.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar HU language -// Author: ??? -// Modifier: KARASZI Istvan, <jscalendar@spam.raszi.hu> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Vasrnap", - "Htf", - "Kedd", - "Szerda", - "Cstrtk", - "Pntek", - "Szombat", - "Vasrnap"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("v", - "h", - "k", - "sze", - "cs", - "p", - "szo", - "v"); - -// full month names -Calendar._MN = new Array -("janur", - "februr", - "mrcius", - "prilis", - "mjus", - "jnius", - "jlius", - "augusztus", - "szeptember", - "oktber", - "november", - "december"); - -// short month names -Calendar._SMN = new Array -("jan", - "feb", - "mr", - "pr", - "mj", - "jn", - "jl", - "aug", - "sze", - "okt", - "nov", - "dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "A kalendriumrl"; - -Calendar._TT["ABOUT"] = -"DHTML dtum/id kivlaszt\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"a legfrissebb verzi megtallhat: http://www.dynarch.com/projects/calendar/\n" + -"GNU LGPL alatt terjesztve. Lsd a http://gnu.org/licenses/lgpl.html oldalt a rszletekhez." + -"\n\n" + -"Dtum vlaszts:\n" + -"- hasznlja a \xab, \xbb gombokat az v kivlasztshoz\n" + -"- hasznlja a " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gombokat a hnap kivlasztshoz\n" + -"- tartsa lenyomva az egrgombot a gyors vlasztshoz."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Id vlaszts:\n" + -"- kattintva nvelheti az idt\n" + -"- shift-tel kattintva cskkentheti\n" + -"- lenyomva tartva s hzva gyorsabban kivlaszthatja."; - -Calendar._TT["PREV_YEAR"] = "Elz v (tartsa nyomva a menhz)"; -Calendar._TT["PREV_MONTH"] = "Elz hnap (tartsa nyomva a menhz)"; -Calendar._TT["GO_TODAY"] = "Mai napra ugrs"; -Calendar._TT["NEXT_MONTH"] = "Kv. hnap (tartsa nyomva a menhz)"; -Calendar._TT["NEXT_YEAR"] = "Kv. v (tartsa nyomva a menhz)"; -Calendar._TT["SEL_DATE"] = "Vlasszon dtumot"; -Calendar._TT["DRAG_TO_MOVE"] = "Hzza a mozgatshoz"; -Calendar._TT["PART_TODAY"] = " (ma)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s legyen a ht els napja"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Bezr"; -Calendar._TT["TODAY"] = "Ma"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikk vagy hzs az rtk vltoztatshoz"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%b %e, %a"; - -Calendar._TT["WK"] = "ht"; -Calendar._TT["TIME"] = "id:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-it.js b/javascript/libs/dynarch/jscalendar/lang/calendar-it.js deleted file mode 100644 index 7f84cde..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-it.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, <mihai_bazon@yahoo.com> -// Translator: Fabio Di Bernardini, <altraqua@email.it> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domenica", - "Lunedì", - "Martedì", - "Mercoledì", - "Giovedì", - "Venerdì", - "Sabato", - "Domenica"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dom", - "Lun", - "Mar", - "Mer", - "Gio", - "Ven", - "Sab", - "Dom"); - -// full month names -Calendar._MN = new Array -("Gennaio", - "Febbraio", - "Marzo", - "Aprile", - "Maggio", - "Giugno", - "Luglio", - "Augosto", - "Settembre", - "Ottobre", - "Novembre", - "Dicembre"); - -// short month names -Calendar._SMN = new Array -("Gen", - "Feb", - "Mar", - "Apr", - "Mag", - "Giu", - "Lug", - "Ago", - "Set", - "Ott", - "Nov", - "Dic"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Informazioni sul calendario"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Per gli aggiornamenti: http://www.dynarch.com/projects/calendar/\n" + -"Distribuito sotto licenza GNU LGPL. Vedi http://gnu.org/licenses/lgpl.html per i dettagli." + -"\n\n" + -"Selezione data:\n" + -"- Usa \xab, \xbb per selezionare l'anno\n" + -"- Usa " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per i mesi\n" + -"- Tieni premuto a lungo il mouse per accedere alle funzioni di selezione veloce."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selezione orario:\n" + -"- Clicca sul numero per incrementarlo\n" + -"- o Shift+click per decrementarlo\n" + -"- o click e sinistra o destra per variarlo."; - -Calendar._TT["PREV_YEAR"] = "Anno prec.(clicca a lungo per il menù)"; -Calendar._TT["PREV_MONTH"] = "Mese prec. (clicca a lungo per il menù)"; -Calendar._TT["GO_TODAY"] = "Oggi"; -Calendar._TT["NEXT_MONTH"] = "Pross. mese (clicca a lungo per il menù)"; -Calendar._TT["NEXT_YEAR"] = "Pross. anno (clicca a lungo per il menù)"; -Calendar._TT["SEL_DATE"] = "Seleziona data"; -Calendar._TT["DRAG_TO_MOVE"] = "Trascina per spostarlo"; -Calendar._TT["PART_TODAY"] = " (oggi)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostra prima %s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Chiudi"; -Calendar._TT["TODAY"] = "Oggi"; -Calendar._TT["TIME_PART"] = "(Shift-)Click o trascina per cambiare il valore"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a:%b:%e"; - -Calendar._TT["WK"] = "set"; -Calendar._TT["TIME"] = "Ora:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-jp.js b/javascript/libs/dynarch/jscalendar/lang/calendar-jp.js deleted file mode 100644 index 3bca7eb..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-jp.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("", - "", - "", - "", - "", - "", - "y", - ""); -Calendar._MN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "T̍ŏ̗jւ"; -Calendar._TT["PREV_YEAR"] = "ON"; -Calendar._TT["PREV_MONTH"] = "O"; -Calendar._TT["GO_TODAY"] = ""; -Calendar._TT["NEXT_MONTH"] = ""; -Calendar._TT["NEXT_YEAR"] = "N"; -Calendar._TT["SEL_DATE"] = "tI"; -Calendar._TT["DRAG_TO_MOVE"] = "EBhËړ"; -Calendar._TT["PART_TODAY"] = " ()"; -Calendar._TT["MON_FIRST"] = "j擪"; -Calendar._TT["SUN_FIRST"] = "j擪"; -Calendar._TT["CLOSE"] = ""; -Calendar._TT["TODAY"] = ""; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "%m %d (%a)"; - -Calendar._TT["WK"] = "T"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-ko-utf8.js b/javascript/libs/dynarch/jscalendar/lang/calendar-ko-utf8.js deleted file mode 100644 index 035dd74..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-ko-utf8.js +++ /dev/null @@ -1,120 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, <mihai_bazon@yahoo.com> -// Translation: Yourim Yi <yyi@yourim.net> -// Encoding: EUC-KR -// lang : ko -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names - -Calendar._DN = new Array -("일요일", - "월요일", - "화요일", - "수요일", - "목요일", - "금요일", - "토요일", - "일요일"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("일", - "월", - "화", - "수", - "목", - "금", - "토", - "일"); - -// full month names -Calendar._MN = new Array -("1월", - "2월", - "3월", - "4월", - "5월", - "6월", - "7월", - "8월", - "9월", - "10월", - "11월", - "12월"); - -// short month names -Calendar._SMN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "calendar 에 대해서"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"\n"+ -"최신 버전을 받으시려면 http://www.dynarch.com/projects/calendar/ 에 방문하세요\n" + -"\n"+ -"GNU LGPL 라이센스로 배포됩니다. \n"+ -"라이센스에 대한 자세한 내용은 http://gnu.org/licenses/lgpl.html 을 읽으세요." + -"\n\n" + -"날짜 선택:\n" + -"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" + -"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" + -"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"시간 선택:\n" + -"- 마우스로 누르면 시간이 증가합니다\n" + -"- Shift 키와 함께 누르면 감소합니다\n" + -"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n"; - -Calendar._TT["PREV_YEAR"] = "지난 해 (길게 누르면 목록)"; -Calendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목록)"; -Calendar._TT["GO_TODAY"] = "오늘 날짜로"; -Calendar._TT["NEXT_MONTH"] = "다음 달 (길게 누르면 목록)"; -Calendar._TT["NEXT_YEAR"] = "다음 해 (길게 누르면 목록)"; -Calendar._TT["SEL_DATE"] = "날짜를 선택하세요"; -Calendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 이동 하세요"; -Calendar._TT["PART_TODAY"] = " (오늘)"; -Calendar._TT["MON_FIRST"] = "월요일을 한 주의 시작 요일로"; -Calendar._TT["SUN_FIRST"] = "일요일을 한 주의 시작 요일로"; -Calendar._TT["CLOSE"] = "닫기"; -Calendar._TT["TODAY"] = "오늘"; -Calendar._TT["TIME_PART"] = "(Shift-)클릭 또는 드래그 하세요"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; - -Calendar._TT["WK"] = "주"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-ko.js b/javascript/libs/dynarch/jscalendar/lang/calendar-ko.js deleted file mode 100644 index 8cddf58..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-ko.js +++ /dev/null @@ -1,120 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, <mihai_bazon@yahoo.com> -// Translation: Yourim Yi <yyi@yourim.net> -// Encoding: EUC-KR -// lang : ko -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names - -Calendar._DN = new Array -("Ͽ", - "", - "ȭ", - "", - "", - "ݿ", - "", - "Ͽ"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "", - "ȭ", - "", - "", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// short month names -Calendar._SMN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "calendar ؼ"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"\n"+ -"ֽ ÷ http://www.dynarch.com/projects/calendar/ 湮ϼ\n" + -"\n"+ -"GNU LGPL ̼ ˴ϴ. \n"+ -"̼ ڼ http://gnu.org/licenses/lgpl.html ." + -"\n\n" + -"¥ :\n" + -"- Ϸ \xab, \xbb ư մϴ\n" + -"- Ϸ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ư \n" + -"- Ͻ ֽϴ."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"ð :\n" + -"- 콺 ð մϴ\n" + -"- Shift Ű Բ մϴ\n" + -"- ¿ 콺 ̸ մϴ.\n"; - -Calendar._TT["PREV_YEAR"] = " ( )"; -Calendar._TT["PREV_MONTH"] = " ( )"; -Calendar._TT["GO_TODAY"] = " ¥"; -Calendar._TT["NEXT_MONTH"] = " ( )"; -Calendar._TT["NEXT_YEAR"] = " ( )"; -Calendar._TT["SEL_DATE"] = "¥ ϼ"; -Calendar._TT["DRAG_TO_MOVE"] = "콺 巡 ̵ ϼ"; -Calendar._TT["PART_TODAY"] = " ()"; -Calendar._TT["MON_FIRST"] = " Ϸ"; -Calendar._TT["SUN_FIRST"] = "Ͽ Ϸ"; -Calendar._TT["CLOSE"] = "ݱ"; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "(Shift-)Ŭ Ǵ 巡 ϼ"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; - -Calendar._TT["WK"] = ""; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-lt-utf8.js b/javascript/libs/dynarch/jscalendar/lang/calendar-lt-utf8.js deleted file mode 100644 index d39653b..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-lt-utf8.js +++ /dev/null @@ -1,114 +0,0 @@ -// ** I18N - -// Calendar LT language -// Author: Martynas Majeris, <martynas@solmetra.lt> -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sekmadienis", - "Pirmadienis", - "Antradienis", - "Trečiadienis", - "Ketvirtadienis", - "Pentadienis", - "Šeštadienis", - "Sekmadienis"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sek", - "Pir", - "Ant", - "Tre", - "Ket", - "Pen", - "Šeš", - "Sek"); - -// full month names -Calendar._MN = new Array -("Sausis", - "Vasaris", - "Kovas", - "Balandis", - "Gegužė", - "Birželis", - "Liepa", - "Rugpjūtis", - "Rugsėjis", - "Spalis", - "Lapkritis", - "Gruodis"); - -// short month names -Calendar._SMN = new Array -("Sau", - "Vas", - "Kov", - "Bal", - "Geg", - "Bir", - "Lie", - "Rgp", - "Rgs", - "Spa", - "Lap", - "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Apie kalendorių"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Naujausią versiją rasite: http://www.dynarch.com/projects/calendar/\n" + -"Platinamas pagal GNU LGPL licenciją. Aplankykite http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Datos pasirinkimas:\n" + -"- Metų pasirinkimas: \xab, \xbb\n" + -"- Mėnesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + -"- Nuspauskite ir laikykite pelės klavišą greitesniam pasirinkimui."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Laiko pasirinkimas:\n" + -"- Spustelkite ant valandų arba minučių - skaičius padidės vienetu.\n" + -"- Jei spausite kartu su Shift, skaičius sumažės.\n" + -"- Greitam pasirinkimui spustelkite ir pajudinkite pelę."; - -Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)"; -Calendar._TT["PREV_MONTH"] = "Ankstesnis mėnuo (laikykite, jei norite meniu)"; -Calendar._TT["GO_TODAY"] = "Pasirinkti šiandieną"; -Calendar._TT["NEXT_MONTH"] = "Kitas mėnuo (laikykite, jei norite meniu)"; -Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)"; -Calendar._TT["SEL_DATE"] = "Pasirinkite datą"; -Calendar._TT["DRAG_TO_MOVE"] = "Tempkite"; -Calendar._TT["PART_TODAY"] = " (šiandien)"; -Calendar._TT["MON_FIRST"] = "Pirma savaitės diena - pirmadienis"; -Calendar._TT["SUN_FIRST"] = "Pirma savaitės diena - sekmadienis"; -Calendar._TT["CLOSE"] = "Uždaryti"; -Calendar._TT["TODAY"] = "Šiandien"; -Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d"; - -Calendar._TT["WK"] = "sav"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-lt.js b/javascript/libs/dynarch/jscalendar/lang/calendar-lt.js deleted file mode 100644 index 43b93d6..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-lt.js +++ /dev/null @@ -1,114 +0,0 @@ -// ** I18N - -// Calendar LT language -// Author: Martynas Majeris, <martynas@solmetra.lt> -// Encoding: Windows-1257 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sekmadienis", - "Pirmadienis", - "Antradienis", - "Treiadienis", - "Ketvirtadienis", - "Pentadienis", - "etadienis", - "Sekmadienis"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sek", - "Pir", - "Ant", - "Tre", - "Ket", - "Pen", - "e", - "Sek"); - -// full month names -Calendar._MN = new Array -("Sausis", - "Vasaris", - "Kovas", - "Balandis", - "Gegu", - "Birelis", - "Liepa", - "Rugpjtis", - "Rugsjis", - "Spalis", - "Lapkritis", - "Gruodis"); - -// short month names -Calendar._SMN = new Array -("Sau", - "Vas", - "Kov", - "Bal", - "Geg", - "Bir", - "Lie", - "Rgp", - "Rgs", - "Spa", - "Lap", - "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Apie kalendori"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Naujausi versij rasite: http://www.dynarch.com/projects/calendar/\n" + -"Platinamas pagal GNU LGPL licencij. Aplankykite http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Datos pasirinkimas:\n" + -"- Met pasirinkimas: \xab, \xbb\n" + -"- Mnesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + -"- Nuspauskite ir laikykite pels klavi greitesniam pasirinkimui."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Laiko pasirinkimas:\n" + -"- Spustelkite ant valand arba minui - skaius padids vienetu.\n" + -"- Jei spausite kartu su Shift, skaiius sumas.\n" + -"- Greitam pasirinkimui spustelkite ir pajudinkite pel."; - -Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)"; -Calendar._TT["PREV_MONTH"] = "Ankstesnis mnuo (laikykite, jei norite meniu)"; -Calendar._TT["GO_TODAY"] = "Pasirinkti iandien"; -Calendar._TT["NEXT_MONTH"] = "Kitas mnuo (laikykite, jei norite meniu)"; -Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)"; -Calendar._TT["SEL_DATE"] = "Pasirinkite dat"; -Calendar._TT["DRAG_TO_MOVE"] = "Tempkite"; -Calendar._TT["PART_TODAY"] = " (iandien)"; -Calendar._TT["MON_FIRST"] = "Pirma savaits diena - pirmadienis"; -Calendar._TT["SUN_FIRST"] = "Pirma savaits diena - sekmadienis"; -Calendar._TT["CLOSE"] = "Udaryti"; -Calendar._TT["TODAY"] = "iandien"; -Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d"; - -Calendar._TT["WK"] = "sav"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-lv.js b/javascript/libs/dynarch/jscalendar/lang/calendar-lv.js deleted file mode 100644 index 407699d..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-lv.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar LV language -// Author: Juris Valdovskis, <juris@dc.lv> -// Encoding: cp1257 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Svtdiena", - "Pirmdiena", - "Otrdiena", - "Trediena", - "Ceturdiena", - "Piektdiena", - "Sestdiena", - "Svtdiena"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sv", - "Pr", - "Ot", - "Tr", - "Ce", - "Pk", - "Se", - "Sv"); - -// full month names -Calendar._MN = new Array -("Janvris", - "Februris", - "Marts", - "Aprlis", - "Maijs", - "Jnijs", - "Jlijs", - "Augusts", - "Septembris", - "Oktobris", - "Novembris", - "Decembris"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Mai", - "Jn", - "Jl", - "Aug", - "Sep", - "Okt", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Par kalendru"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Datuma izvle:\n" + -"- Izmanto \xab, \xbb pogas, lai izvltos gadu\n" + -"- Izmanto " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "pogas, lai izvltos mnesi\n" + -"- Turi nospiestu peles pogu uz jebkuru no augstk mintajm pogm, lai patrintu izvli."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Laika izvle:\n" + -"- Uzklikini uz jebkuru no laika dam, lai palielintu to\n" + -"- vai Shift-klikis, lai samazintu to\n" + -"- vai noklikini un velc uz attiecgo virzienu lai maintu trk."; - -Calendar._TT["PREV_YEAR"] = "Iepr. gads (turi izvlnei)"; -Calendar._TT["PREV_MONTH"] = "Iepr. mnesis (turi izvlnei)"; -Calendar._TT["GO_TODAY"] = "odien"; -Calendar._TT["NEXT_MONTH"] = "Nkoais mnesis (turi izvlnei)"; -Calendar._TT["NEXT_YEAR"] = "Nkoais gads (turi izvlnei)"; -Calendar._TT["SEL_DATE"] = "Izvlies datumu"; -Calendar._TT["DRAG_TO_MOVE"] = "Velc, lai prvietotu"; -Calendar._TT["PART_TODAY"] = " (odien)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Attlot %s k pirmo"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "1,7"; - -Calendar._TT["CLOSE"] = "Aizvrt"; -Calendar._TT["TODAY"] = "odien"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikis vai prvieto, lai maintu"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Laiks:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-nl.js b/javascript/libs/dynarch/jscalendar/lang/calendar-nl.js deleted file mode 100644 index a1dea94..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-nl.js +++ /dev/null @@ -1,73 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Zondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag"); - -Calendar._SDN_len = 2; - -Calendar._MN = new Array -("Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Info"; - -Calendar._TT["ABOUT"] = -"DHTML Datum/Tijd Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + -"Ga voor de meest recente versie naar: http://www.dynarch.com/projects/calendar/\n" + -"Verspreid onder de GNU LGPL. Zie http://gnu.org/licenses/lgpl.html voor details." + -"\n\n" + -"Datum selectie:\n" + -"- Gebruik de \xab \xbb knoppen om een jaar te selecteren\n" + -"- Gebruik de " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knoppen om een maand te selecteren\n" + -"- Houd de muis ingedrukt op de genoemde knoppen voor een snellere selectie."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Tijd selectie:\n" + -"- Klik op een willekeurig onderdeel van het tijd gedeelte om het te verhogen\n" + -"- of Shift-klik om het te verlagen\n" + -"- of klik en sleep voor een snellere selectie."; - -//Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag"; -Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)"; -Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)"; -Calendar._TT["GO_TODAY"] = "Ga naar Vandaag"; -Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)"; -Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)"; -Calendar._TT["SEL_DATE"] = "Selecteer datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen"; -Calendar._TT["PART_TODAY"] = " (vandaag)"; -//Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; -//Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; - -Calendar._TT["DAY_FIRST"] = "Toon %s eerst"; - -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Sluiten"; -Calendar._TT["TODAY"] = "(vandaag)"; -Calendar._TT["TIME_PART"] = "(Shift-)Klik of sleep om de waarde te veranderen"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b %Y"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Tijd:";
\ No newline at end of file diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-no.js b/javascript/libs/dynarch/jscalendar/lang/calendar-no.js deleted file mode 100644 index d9297d1..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-no.js +++ /dev/null @@ -1,114 +0,0 @@ -// ** I18N - -// Calendar NO language -// Author: Daniel Holmen, <daniel.holmen@ciber.no> -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Søndag", - "Mandag", - "Tirsdag", - "Onsdag", - "Torsdag", - "Fredag", - "Lørdag", - "Søndag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Søn", - "Man", - "Tir", - "Ons", - "Tor", - "Fre", - "Lør", - "Søn"); - -// full month names -Calendar._MN = new Array -("Januar", - "Februar", - "Mars", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Desember"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Mai", - "Jun", - "Jul", - "Aug", - "Sep", - "Okt", - "Nov", - "Des"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Om kalenderen"; - -Calendar._TT["ABOUT"] = -"DHTML Dato-/Tidsvelger\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For nyeste versjon, gå til: http://www.dynarch.com/projects/calendar/\n" + -"Distribuert under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detaljer." + -"\n\n" + -"Datovalg:\n" + -"- Bruk knappene \xab og \xbb for å velge år\n" + -"- Bruk knappene " + String.fromCharCode(0x2039) + " og " + String.fromCharCode(0x203a) + " for å velge måned\n" + -"- Hold inne musknappen eller knappene over for raskere valg."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Tidsvalg:\n" + -"- Klikk på en av tidsdelene for å øke den\n" + -"- eller Shift-klikk for å senke verdien\n" + -"- eller klikk-og-dra for raskere valg.."; - -Calendar._TT["PREV_YEAR"] = "Forrige. år (hold for meny)"; -Calendar._TT["PREV_MONTH"] = "Forrige. måned (hold for meny)"; -Calendar._TT["GO_TODAY"] = "Gå til idag"; -Calendar._TT["NEXT_MONTH"] = "Neste måned (hold for meny)"; -Calendar._TT["NEXT_YEAR"] = "Neste år (hold for meny)"; -Calendar._TT["SEL_DATE"] = "Velg dato"; -Calendar._TT["DRAG_TO_MOVE"] = "Dra for å flytte"; -Calendar._TT["PART_TODAY"] = " (idag)"; -Calendar._TT["MON_FIRST"] = "Vis mandag først"; -Calendar._TT["SUN_FIRST"] = "Vis søndag først"; -Calendar._TT["CLOSE"] = "Lukk"; -Calendar._TT["TODAY"] = "Idag"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikk eller dra for å endre verdi"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "uke";
\ No newline at end of file diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-pl-utf8.js b/javascript/libs/dynarch/jscalendar/lang/calendar-pl-utf8.js deleted file mode 100644 index 6b8ca67..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-pl-utf8.js +++ /dev/null @@ -1,93 +0,0 @@ -// ** I18N - -// Calendar PL language -// Author: Dariusz Pietrzak, <eyck@ghost.anime.pl> -// Author: Janusz Piwowarski, <jpiw@go2.pl> -// Encoding: utf-8 -// Distributed under the same terms as the calendar itself. - -Calendar._DN = new Array -("Niedziela", - "Poniedziałek", - "Wtorek", - "Środa", - "Czwartek", - "Piątek", - "Sobota", - "Niedziela"); -Calendar._SDN = new Array -("Nie", - "Pn", - "Wt", - "Śr", - "Cz", - "Pt", - "So", - "Nie"); -Calendar._MN = new Array -("Styczeń", - "Luty", - "Marzec", - "Kwiecień", - "Maj", - "Czerwiec", - "Lipiec", - "Sierpień", - "Wrzesień", - "Październik", - "Listopad", - "Grudzień"); -Calendar._SMN = new Array -("Sty", - "Lut", - "Mar", - "Kwi", - "Maj", - "Cze", - "Lip", - "Sie", - "Wrz", - "Paź", - "Lis", - "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendarzu"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Aby pobrać najnowszą wersję, odwiedź: http://www.dynarch.com/projects/calendar/\n" + -"Dostępny na licencji GNU LGPL. Zobacz szczegóły na http://gnu.org/licenses/lgpl.html." + -"\n\n" + -"Wybór daty:\n" + -"- Użyj przycisków \xab, \xbb by wybrać rok\n" + -"- Użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " by wybrać miesiąc\n" + -"- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Wybór czasu:\n" + -"- Kliknij na jednym z pól czasu by zwiększyć jego wartość\n" + -"- lub kliknij trzymając Shift by zmiejszyć jego wartość\n" + -"- lub kliknij i przeciągnij dla szybszego wyboru."; - -//Calendar._TT["TOGGLE"] = "Zmień pierwszy dzień tygodnia"; -Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)"; -Calendar._TT["PREV_MONTH"] = "Poprzedni miesiąc (przytrzymaj dla menu)"; -Calendar._TT["GO_TODAY"] = "Idź do dzisiaj"; -Calendar._TT["NEXT_MONTH"] = "Następny miesiąc (przytrzymaj dla menu)"; -Calendar._TT["NEXT_YEAR"] = "Następny rok (przytrzymaj dla menu)"; -Calendar._TT["SEL_DATE"] = "Wybierz datę"; -Calendar._TT["DRAG_TO_MOVE"] = "Przeciągnij by przesunąć"; -Calendar._TT["PART_TODAY"] = " (dzisiaj)"; -Calendar._TT["MON_FIRST"] = "Wyświetl poniedziałek jako pierwszy"; -Calendar._TT["SUN_FIRST"] = "Wyświetl niedzielę jako pierwszą"; -Calendar._TT["CLOSE"] = "Zamknij"; -Calendar._TT["TODAY"] = "Dzisiaj"; -Calendar._TT["TIME_PART"] = "(Shift-)Kliknij lub przeciągnij by zmienić wartość"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%e %B, %A"; - -Calendar._TT["WK"] = "ty"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-pl.js b/javascript/libs/dynarch/jscalendar/lang/calendar-pl.js deleted file mode 100644 index 76e0551..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-pl.js +++ /dev/null @@ -1,56 +0,0 @@ -// ** I18N -// Calendar PL language -// Author: Artur Filipiak, <imagen@poczta.fm> -// January, 2004 -// Encoding: UTF-8 -Calendar._DN = new Array -("Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota", "Niedziela"); - -Calendar._SDN = new Array -("N", "Pn", "Wt", "Śr", "Cz", "Pt", "So", "N"); - -Calendar._MN = new Array -("Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"); - -Calendar._SMN = new Array -("Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendarzu"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Wybór daty:\n" + -"- aby wybrać rok użyj przycisków \xab, \xbb\n" + -"- aby wybrać miesiąc użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + -"- aby przyspieszyć wybór przytrzymaj wciśnięty przycisk myszy nad ww. przyciskami."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Wybór czasu:\n" + -"- aby zwiększyć wartość kliknij na dowolnym elemencie selekcji czasu\n" + -"- aby zmniejszyć wartość użyj dodatkowo klawisza Shift\n" + -"- możesz również poruszać myszkę w lewo i prawo wraz z wciśniętym lewym klawiszem."; - -Calendar._TT["PREV_YEAR"] = "Poprz. rok (przytrzymaj dla menu)"; -Calendar._TT["PREV_MONTH"] = "Poprz. miesiąc (przytrzymaj dla menu)"; -Calendar._TT["GO_TODAY"] = "Pokaż dziś"; -Calendar._TT["NEXT_MONTH"] = "Nast. miesiąc (przytrzymaj dla menu)"; -Calendar._TT["NEXT_YEAR"] = "Nast. rok (przytrzymaj dla menu)"; -Calendar._TT["SEL_DATE"] = "Wybierz datę"; -Calendar._TT["DRAG_TO_MOVE"] = "Przesuń okienko"; -Calendar._TT["PART_TODAY"] = " (dziś)"; -Calendar._TT["MON_FIRST"] = "Pokaż Poniedziałek jako pierwszy"; -Calendar._TT["SUN_FIRST"] = "Pokaż Niedzielę jako pierwszą"; -Calendar._TT["CLOSE"] = "Zamknij"; -Calendar._TT["TODAY"] = "Dziś"; -Calendar._TT["TIME_PART"] = "(Shift-)klik | drag, aby zmienić wartość"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y.%m.%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk";
\ No newline at end of file diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-pt.js b/javascript/libs/dynarch/jscalendar/lang/calendar-pt.js deleted file mode 100644 index deee8a1..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-pt.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar pt_BR language -// Author: Adalberto Machado, <betosm@terra.com.br> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Segunda", - "Terca", - "Quarta", - "Quinta", - "Sexta", - "Sabado", - "Domingo"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sab", - "Dom"); - -// full month names -Calendar._MN = new Array -("Janeiro", - "Fevereiro", - "Marco", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Sobre o calendario"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Ultima versao visite: http://www.dynarch.com/projects/calendar/\n" + -"Distribuido sobre GNU LGPL. Veja http://gnu.org/licenses/lgpl.html para detalhes." + -"\n\n" + -"Selecao de data:\n" + -"- Use os botoes \xab, \xbb para selecionar o ano\n" + -"- Use os botoes " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para selecionar o mes\n" + -"- Segure o botao do mouse em qualquer um desses botoes para selecao rapida."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selecao de hora:\n" + -"- Clique em qualquer parte da hora para incrementar\n" + -"- ou Shift-click para decrementar\n" + -"- ou clique e segure para selecao rapida."; - -Calendar._TT["PREV_YEAR"] = "Ant. ano (segure para menu)"; -Calendar._TT["PREV_MONTH"] = "Ant. mes (segure para menu)"; -Calendar._TT["GO_TODAY"] = "Hoje"; -Calendar._TT["NEXT_MONTH"] = "Prox. mes (segure para menu)"; -Calendar._TT["NEXT_YEAR"] = "Prox. ano (segure para menu)"; -Calendar._TT["SEL_DATE"] = "Selecione a data"; -Calendar._TT["DRAG_TO_MOVE"] = "Arraste para mover"; -Calendar._TT["PART_TODAY"] = " (hoje)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostre %s primeiro"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fechar"; -Calendar._TT["TODAY"] = "Hoje"; -Calendar._TT["TIME_PART"] = "(Shift-)Click ou arraste para mudar valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; - -Calendar._TT["WK"] = "sm"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-ro.js b/javascript/libs/dynarch/jscalendar/lang/calendar-ro.js deleted file mode 100644 index 116e358..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-ro.js +++ /dev/null @@ -1,66 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Duminică", - "Luni", - "Marţi", - "Miercuri", - "Joi", - "Vineri", - "Sâmbătă", - "Duminică"); -Calendar._SDN_len = 2; -Calendar._MN = new Array -("Ianuarie", - "Februarie", - "Martie", - "Aprilie", - "Mai", - "Iunie", - "Iulie", - "August", - "Septembrie", - "Octombrie", - "Noiembrie", - "Decembrie"); - -// tooltips -Calendar._TT = {}; - -Calendar._TT["INFO"] = "Despre calendar"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Pentru ultima versiune vizitaţi: http://www.dynarch.com/projects/calendar/\n" + -"Distribuit sub GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Selecţia datei:\n" + -"- Folosiţi butoanele \xab, \xbb pentru a selecta anul\n" + -"- Folosiţi butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" + -"- Tineţi butonul mouse-ului apăsat pentru selecţie mai rapidă."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selecţia orei:\n" + -"- Click pe ora sau minut pentru a mări valoarea cu 1\n" + -"- Sau Shift-Click pentru a micşora valoarea cu 1\n" + -"- Sau Click şi drag pentru a selecta mai repede."; - -Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)"; -Calendar._TT["PREV_MONTH"] = "Luna precedentă (lung pt menu)"; -Calendar._TT["GO_TODAY"] = "Data de azi"; -Calendar._TT["NEXT_MONTH"] = "Luna următoare (lung pt menu)"; -Calendar._TT["NEXT_YEAR"] = "Anul următor (lung pt menu)"; -Calendar._TT["SEL_DATE"] = "Selectează data"; -Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a mişca"; -Calendar._TT["PART_TODAY"] = " (astăzi)"; -Calendar._TT["DAY_FIRST"] = "Afişează %s prima zi"; -Calendar._TT["WEEKEND"] = "0,6"; -Calendar._TT["CLOSE"] = "Închide"; -Calendar._TT["TODAY"] = "Astăzi"; -Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B"; - -Calendar._TT["WK"] = "spt"; -Calendar._TT["TIME"] = "Ora:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-ru.js b/javascript/libs/dynarch/jscalendar/lang/calendar-ru.js deleted file mode 100644 index 9f75a6a..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-ru.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar RU language -// Translation: Sly Golovanov, http://golovanov.net, <sly@golovanov.net> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("воскресенье", - "понедельник", - "вторник", - "среда", - "четверг", - "пятница", - "суббота", - "воскресенье"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("вск", - "пон", - "втр", - "срд", - "чет", - "пят", - "суб", - "вск"); - -// full month names -Calendar._MN = new Array -("январь", - "февраль", - "март", - "апрель", - "май", - "июнь", - "июль", - "август", - "сентябрь", - "октябрь", - "ноябрь", - "декабрь"); - -// short month names -Calendar._SMN = new Array -("янв", - "фев", - "мар", - "апр", - "май", - "июн", - "июл", - "авг", - "сен", - "окт", - "ноя", - "дек"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "О календаре..."; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Как выбрать дату:\n" + -"- При помощи кнопок \xab, \xbb можно выбрать год\n" + -"- При помощи кнопок " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " можно выбрать месяц\n" + -"- Подержите эти кнопки нажатыми, чтобы появилось меню быстрого выбора."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Как выбрать время:\n" + -"- При клике на часах или минутах они увеличиваются\n" + -"- при клике с нажатой клавишей Shift они уменьшаются\n" + -"- если нажать и двигать мышкой влево/вправо, они будут меняться быстрее."; - -Calendar._TT["PREV_YEAR"] = "На год назад (удерживать для меню)"; -Calendar._TT["PREV_MONTH"] = "На месяц назад (удерживать для меню)"; -Calendar._TT["GO_TODAY"] = "Сегодня"; -Calendar._TT["NEXT_MONTH"] = "На месяц вперед (удерживать для меню)"; -Calendar._TT["NEXT_YEAR"] = "На год вперед (удерживать для меню)"; -Calendar._TT["SEL_DATE"] = "Выберите дату"; -Calendar._TT["DRAG_TO_MOVE"] = "Перетаскивайте мышкой"; -Calendar._TT["PART_TODAY"] = " (сегодня)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Первый день недели будет %s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Закрыть"; -Calendar._TT["TODAY"] = "Сегодня"; -Calendar._TT["TIME_PART"] = "(Shift-)клик или нажать и двигать"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; - -Calendar._TT["WK"] = "нед"; -Calendar._TT["TIME"] = "Время:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-ru_win_.js b/javascript/libs/dynarch/jscalendar/lang/calendar-ru_win_.js deleted file mode 100644 index de455af..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-ru_win_.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar RU language -// Translation: Sly Golovanov, http://golovanov.net, <sly@golovanov.net> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// short month names -Calendar._SMN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = " ..."; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -" :\n" + -"- \xab, \xbb \n" + -"- " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " \n" + -"- , ."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -" :\n" + -"- \n" + -"- Shift \n" + -"- /, ."; - -Calendar._TT["PREV_YEAR"] = " ( )"; -Calendar._TT["PREV_MONTH"] = " ( )"; -Calendar._TT["GO_TODAY"] = ""; -Calendar._TT["NEXT_MONTH"] = " ( )"; -Calendar._TT["NEXT_YEAR"] = " ( )"; -Calendar._TT["SEL_DATE"] = " "; -Calendar._TT["DRAG_TO_MOVE"] = " "; -Calendar._TT["PART_TODAY"] = " ()"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = " %s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = ""; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "(Shift-) "; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; - -Calendar._TT["WK"] = ""; -Calendar._TT["TIME"] = ":"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-si.js b/javascript/libs/dynarch/jscalendar/lang/calendar-si.js deleted file mode 100644 index cb3dfb9..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-si.js +++ /dev/null @@ -1,94 +0,0 @@ -/* Slovenian language file for the DHTML Calendar version 0.9.2
-* Author David Milost <mercy@volja.net>, January 2004.
-* Feel free to use this script under the terms of the GNU Lesser General
-* Public License, as long as you do not remove or alter this notice.
-*/
- // full day names
-Calendar._DN = new Array
-("Nedelja",
- "Ponedeljek",
- "Torek",
- "Sreda",
- "Četrtek",
- "Petek",
- "Sobota",
- "Nedelja");
- // short day names
- Calendar._SDN = new Array
-("Ned",
- "Pon",
- "Tor",
- "Sre",
- "Čet",
- "Pet",
- "Sob",
- "Ned");
-// short month names
-Calendar._SMN = new Array
-("Jan",
- "Feb",
- "Mar",
- "Apr",
- "Maj",
- "Jun",
- "Jul",
- "Avg",
- "Sep",
- "Okt",
- "Nov",
- "Dec");
- // full month names
-Calendar._MN = new Array
-("Januar",
- "Februar",
- "Marec",
- "April",
- "Maj",
- "Junij",
- "Julij",
- "Avgust",
- "September",
- "Oktober",
- "November",
- "December");
-
-// tooltips
-// tooltips
-Calendar._TT = {};
-Calendar._TT["INFO"] = "O koledarju";
-
-Calendar._TT["ABOUT"] =
-"DHTML Date/Time Selector\n" +
-"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
-"Za zadnjo verzijo pojdine na naslov: http://www.dynarch.com/projects/calendar/\n" +
-"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." +
-"\n\n" +
-"Izbor datuma:\n" +
-"- Uporabite \xab, \xbb gumbe za izbor leta\n" +
-"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" +
-"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor.";
-Calendar._TT["ABOUT_TIME"] = "\n\n" +
-"Izbor ćasa:\n" +
-"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" +
-"- ali Shift-click za zmanj. le-tega\n" +
-"- ali kliknite in povlecite za hiter izbor.";
-
-Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden";
-Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)";
-Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)";
-Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan";
-Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)";
-Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)";
-Calendar._TT["SEL_DATE"] = "Izberite datum";
-Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije";
-Calendar._TT["PART_TODAY"] = " (danes)";
-Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan";
-Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan";
-Calendar._TT["CLOSE"] = "Zapri";
-Calendar._TT["TODAY"] = "Danes";
-
-// date formats
-Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
-Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
-
-Calendar._TT["WK"] = "Ted";
\ No newline at end of file diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-sk.js b/javascript/libs/dynarch/jscalendar/lang/calendar-sk.js deleted file mode 100644 index 4fe6a3c..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-sk.js +++ /dev/null @@ -1,99 +0,0 @@ -// ** I18N - -// Calendar SK language -// Author: Peter Valach (pvalach@gmx.net) -// Encoding: utf-8 -// Last update: 2003/10/29 -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("NedeÄľa", - "Pondelok", - "Utorok", - "Streda", - "Ĺ tvrtok", - "Piatok", - "Sobota", - "NedeÄľa"); - -// short day names -Calendar._SDN = new Array -("Ned", - "Pon", - "Uto", - "Str", - "Ĺ tv", - "Pia", - "Sob", - "Ned"); - -// full month names -Calendar._MN = new Array -("Január", - "Február", - "Marec", - "AprĂl", - "Máj", - "JĂşn", - "JĂşl", - "August", - "September", - "OktĂłber", - "November", - "December"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Máj", - "JĂşn", - "JĂşl", - "Aug", - "Sep", - "Okt", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendári"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + -"PoslednĂş verziu nájdete na: http://www.dynarch.com/projects/calendar/\n" + -"DistribuovanĂ© pod GNU LGPL. ViÄŹ http://gnu.org/licenses/lgpl.html pre detaily." + -"\n\n" + -"VĂ˝ber dátumu:\n" + -"- PouĹľite tlaÄŤidlá \xab, \xbb pre vĂ˝ber roku\n" + -"- PouĹľite tlaÄŤidlá " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pre vĂ˝ber mesiaca\n" + -"- Ak ktorĂ©koÄľvek z tĂ˝chto tlaÄŤidiel podrĹľĂte dlhšie, zobrazĂ sa rĂ˝chly vĂ˝ber."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"VĂ˝ber ÄŤasu:\n" + -"- Kliknutie na niektorĂş poloĹľku ÄŤasu ju zvýši\n" + -"- Shift-klik ju znĂĹľi\n" + -"- Ak podrĹľĂte tlaÄŤĂtko stlaÄŤenĂ©, posĂşvanĂm menĂte hodnotu."; - -Calendar._TT["PREV_YEAR"] = "PredošlĂ˝ rok (podrĹľte pre menu)"; -Calendar._TT["PREV_MONTH"] = "PredošlĂ˝ mesiac (podrĹľte pre menu)"; -Calendar._TT["GO_TODAY"] = "PrejsĹĄ na dnešok"; -Calendar._TT["NEXT_MONTH"] = "Nasl. mesiac (podrĹľte pre menu)"; -Calendar._TT["NEXT_YEAR"] = "Nasl. rok (podrĹľte pre menu)"; -Calendar._TT["SEL_DATE"] = "ZvoÄľte dátum"; -Calendar._TT["DRAG_TO_MOVE"] = "PodrĹľanĂm tlaÄŤĂtka zmenĂte polohu"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "ZobraziĹĄ pondelok ako prvĂ˝"; -Calendar._TT["SUN_FIRST"] = "ZobraziĹĄ nedeÄľu ako prvĂş"; -Calendar._TT["CLOSE"] = "ZavrieĹĄ"; -Calendar._TT["TODAY"] = "Dnes"; -Calendar._TT["TIME_PART"] = "(Shift-)klik/ĹĄahanie zmenĂ hodnotu"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "$d. %m. %Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b"; - -Calendar._TT["WK"] = "týž"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-sp.js b/javascript/libs/dynarch/jscalendar/lang/calendar-sp.js deleted file mode 100644 index 239d1b3..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-sp.js +++ /dev/null @@ -1,110 +0,0 @@ -// ** I18N - -// Calendar SP language -// Author: Rafael Velasco <rvu_at_idecnet_dot_com> -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Lunes", - "Martes", - "Miercoles", - "Jueves", - "Viernes", - "Sabado", - "Domingo"); - -Calendar._SDN = new Array -("Dom", - "Lun", - "Mar", - "Mie", - "Jue", - "Vie", - "Sab", - "Dom"); - -// full month names -Calendar._MN = new Array -("Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre"); - -// short month names -Calendar._SMN = new Array -("Ene", - "Feb", - "Mar", - "Abr", - "May", - "Jun", - "Jul", - "Ago", - "Sep", - "Oct", - "Nov", - "Dic"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Informacin del Calendario"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Nuevas versiones en: http://www.dynarch.com/projects/calendar/\n" + -"Distribuida bajo licencia GNU LGPL. Para detalles vea http://gnu.org/licenses/lgpl.html ." + -"\n\n" + -"Seleccin de Fechas:\n" + -"- Use \xab, \xbb para seleccionar el ao\n" + -"- Use " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" + -"- Mantenga presionado el botn del ratn en cualquiera de las opciones superiores para un acceso rapido ."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Seleccin del Reloj:\n" + -"- Seleccione la hora para cambiar el reloj\n" + -"- o presione Shift-click para disminuirlo\n" + -"- o presione click y arrastre del ratn para una seleccin rapida."; - -Calendar._TT["PREV_YEAR"] = "Ao anterior (Presione para menu)"; -Calendar._TT["PREV_MONTH"] = "Mes Anterior (Presione para menu)"; -Calendar._TT["GO_TODAY"] = "Ir a Hoy"; -Calendar._TT["NEXT_MONTH"] = "Mes Siguiente (Presione para menu)"; -Calendar._TT["NEXT_YEAR"] = "Ao Siguiente (Presione para menu)"; -Calendar._TT["SEL_DATE"] = "Seleccione fecha"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastre y mueva"; -Calendar._TT["PART_TODAY"] = " (Hoy)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostrar %s primero"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Cerrar"; -Calendar._TT["TODAY"] = "Hoy"; -Calendar._TT["TIME_PART"] = "(Shift-)Click o arrastra para cambar el valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%dd-%mm-%yy"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; - -Calendar._TT["WK"] = "Sm"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-sv.js b/javascript/libs/dynarch/jscalendar/lang/calendar-sv.js deleted file mode 100644 index db1f4b8..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-sv.js +++ /dev/null @@ -1,93 +0,0 @@ -// ** I18N - -// Calendar SV language (Swedish, svenska) -// Author: Mihai Bazon, <mihai_bazon@yahoo.com> -// Translation team: <sv@li.org> -// Translator: Leonard Norrgrd <leonard.norrgard@refactor.fi> -// Last translator: Leonard Norrgrd <leonard.norrgard@refactor.fi> -// Encoding: iso-latin-1 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("sndag", - "mndag", - "tisdag", - "onsdag", - "torsdag", - "fredag", - "lrdag", - "sndag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. -Calendar._SDN_len = 2; -Calendar._SMN_len = 3; - -// full month names -Calendar._MN = new Array -("januari", - "februari", - "mars", - "april", - "maj", - "juni", - "juli", - "augusti", - "september", - "oktober", - "november", - "december"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Om kalendern"; - -Calendar._TT["ABOUT"] = -"DHTML Datum/tid-vljare\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Fr senaste version g till: http://www.dynarch.com/projects/calendar/\n" + -"Distribueras under GNU LGPL. Se http://gnu.org/licenses/lgpl.html fr detaljer." + -"\n\n" + -"Val av datum:\n" + -"- Anvnd knapparna \xab, \xbb fr att vlja r\n" + -"- Anvnd knapparna " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " fr att vlja mnad\n" + -"- Hll musknappen nedtryckt p ngon av ovanstende knappar fr snabbare val."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Val av tid:\n" + -"- Klicka p en del av tiden fr att ka den delen\n" + -"- eller skift-klicka fr att minska den\n" + -"- eller klicka och drag fr snabbare val."; - -Calendar._TT["PREV_YEAR"] = "Fregende r (hll fr menu)"; -Calendar._TT["PREV_MONTH"] = "Fregende mnad (hll fr menu)"; -Calendar._TT["GO_TODAY"] = "G till dagens datum"; -Calendar._TT["NEXT_MONTH"] = "Fljande mnad (hll fr menu)"; -Calendar._TT["NEXT_YEAR"] = "Fljande r (hll fr menu)"; -Calendar._TT["SEL_DATE"] = "Vlj datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Drag fr att flytta"; -Calendar._TT["PART_TODAY"] = " (idag)"; -Calendar._TT["MON_FIRST"] = "Visa mndag frst"; -Calendar._TT["SUN_FIRST"] = "Visa sndag frst"; -Calendar._TT["CLOSE"] = "Stng"; -Calendar._TT["TODAY"] = "Idag"; -Calendar._TT["TIME_PART"] = "(Skift-)klicka eller drag fr att ndra tid"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A %d %b %Y"; - -Calendar._TT["WK"] = "vecka"; diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-tr.js b/javascript/libs/dynarch/jscalendar/lang/calendar-tr.js deleted file mode 100644 index 2164687..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-tr.js +++ /dev/null @@ -1,58 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////////////////////
-// Turkish Translation by Nuri AKMAN
-// Location: Ankara/TURKEY
-// e-mail : nuriakman@hotmail.com
-// Date : April, 9 2003
-//
-// Note: if Turkish Characters does not shown on you screen
-// please include falowing line your html code:
-//
-// <meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
-//
-//////////////////////////////////////////////////////////////////////////////////////////////
-
-// ** I18N
-Calendar._DN = new Array
-("Pazar",
- "Pazartesi",
- "Sal",
- "aramba",
- "Perembe",
- "Cuma",
- "Cumartesi",
- "Pazar");
-Calendar._MN = new Array
-("Ocak",
- "ubat",
- "Mart",
- "Nisan",
- "Mays",
- "Haziran",
- "Temmuz",
- "Austos",
- "Eyll",
- "Ekim",
- "Kasm",
- "Aralk");
-
-// tooltips
-Calendar._TT = {};
-Calendar._TT["TOGGLE"] = "Haftann ilk gnn kaydr";
-Calendar._TT["PREV_YEAR"] = "nceki Yl (Men iin basl tutunuz)";
-Calendar._TT["PREV_MONTH"] = "nceki Ay (Men iin basl tutunuz)";
-Calendar._TT["GO_TODAY"] = "Bugn'e git";
-Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Men iin basl tutunuz)";
-Calendar._TT["NEXT_YEAR"] = "Sonraki Yl (Men iin basl tutunuz)";
-Calendar._TT["SEL_DATE"] = "Tarih seiniz";
-Calendar._TT["DRAG_TO_MOVE"] = "Tamak iin srkleyiniz";
-Calendar._TT["PART_TODAY"] = " (bugn)";
-Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gnnden balasn";
-Calendar._TT["SUN_FIRST"] = "Takvim Pazar gnnden balasn";
-Calendar._TT["CLOSE"] = "Kapat";
-Calendar._TT["TODAY"] = "Bugn";
-
-// date formats
-Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
-Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD";
-
-Calendar._TT["WK"] = "Hafta";
diff --git a/javascript/libs/dynarch/jscalendar/lang/calendar-zh.js b/javascript/libs/dynarch/jscalendar/lang/calendar-zh.js deleted file mode 100644 index 4a0feb6..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/calendar-zh.js +++ /dev/null @@ -1,119 +0,0 @@ -// ** I18N - -// Calendar ZH language -// Author: muziq, <muziq@sina.com> -// Encoding: GB2312 or GBK -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("", - "һ", - "ڶ", - "", - "", - "", - "", - ""); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "һ", - "", - "", - "", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("һ", - "", - "", - "", - "", - "", - "", - "", - "", - "ʮ", - "ʮһ", - "ʮ"); - -// short month names -Calendar._SMN = new Array -("һ", - "", - "", - "", - "", - "", - "", - "", - "", - "ʮ", - "ʮһ", - "ʮ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = ""; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"ѡ:\n" + -"- \xab, \xbb ťѡ\n" + -"- " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ťѡ·\n" + -"- ϰťɴӲ˵пѡݻ·"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"ѡʱ:\n" + -"- Сʱӿʹֵһ\n" + -"- סShiftСʱӿʹֵһ\n" + -"- ϶ɽпѡ"; - -Calendar._TT["PREV_YEAR"] = "һ (ס˵)"; -Calendar._TT["PREV_MONTH"] = "һ (ס˵)"; -Calendar._TT["GO_TODAY"] = "ת"; -Calendar._TT["NEXT_MONTH"] = "һ (ס˵)"; -Calendar._TT["NEXT_YEAR"] = "һ (ס˵)"; -Calendar._TT["SEL_DATE"] = "ѡ"; -Calendar._TT["DRAG_TO_MOVE"] = "϶"; -Calendar._TT["PART_TODAY"] = " ()"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "ʾ%s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "ر"; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "(Shift-)϶ıֵ"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %b %e"; - -Calendar._TT["WK"] = ""; -Calendar._TT["TIME"] = "ʱ:"; diff --git a/javascript/libs/dynarch/jscalendar/lang/cn_utf8.js b/javascript/libs/dynarch/jscalendar/lang/cn_utf8.js deleted file mode 100644 index a0ef7c6..0000000 --- a/javascript/libs/dynarch/jscalendar/lang/cn_utf8.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N
-
-// Calendar EN language
-// Author: Mihai Bazon, <mishoo@infoiasi.ro>
-// Encoding: any
-// Translator : Niko <nikoused@gmail.com>
-// Distributed under the same terms as the calendar itself.
-
-// For translators: please use UTF-8 if possible. We strongly believe that
-// Unicode is the answer to a real internationalized world. Also please
-// include your contact information in the header, as can be seen above.
-
-// full day names
-Calendar._DN = new Array
-("\u5468\u65e5",//\u5468\u65e5
- "\u5468\u4e00",//\u5468\u4e00
- "\u5468\u4e8c",//\u5468\u4e8c
- "\u5468\u4e09",//\u5468\u4e09
- "\u5468\u56db",//\u5468\u56db
- "\u5468\u4e94",//\u5468\u4e94
- "\u5468\u516d",//\u5468\u516d
- "\u5468\u65e5");//\u5468\u65e5
-
-// Please note that the following array of short day names (and the same goes
-// for short month names, _SMN) isn't absolutely necessary. We give it here
-// for exemplification on how one can customize the short day names, but if
-// they are simply the first N letters of the full name you can simply say:
-//
-// Calendar._SDN_len = N; // short day name length
-// Calendar._SMN_len = N; // short month name length
-//
-// If N = 3 then this is not needed either since we assume a value of 3 if not
-// present, to be compatible with translation files that were written before
-// this feature.
-
-// short day names
-Calendar._SDN = new Array
-("\u5468\u65e5",
- "\u5468\u4e00",
- "\u5468\u4e8c",
- "\u5468\u4e09",
- "\u5468\u56db",
- "\u5468\u4e94",
- "\u5468\u516d",
- "\u5468\u65e5");
-
-// full month names
-Calendar._MN = new Array
-("\u4e00\u6708",
- "\u4e8c\u6708",
- "\u4e09\u6708",
- "\u56db\u6708",
- "\u4e94\u6708",
- "\u516d\u6708",
- "\u4e03\u6708",
- "\u516b\u6708",
- "\u4e5d\u6708",
- "\u5341\u6708",
- "\u5341\u4e00\u6708",
- "\u5341\u4e8c\u6708");
-
-// short month names
-Calendar._SMN = new Array
-("\u4e00\u6708",
- "\u4e8c\u6708",
- "\u4e09\u6708",
- "\u56db\u6708",
- "\u4e94\u6708",
- "\u516d\u6708",
- "\u4e03\u6708",
- "\u516b\u6708",
- "\u4e5d\u6708",
- "\u5341\u6708",
- "\u5341\u4e00\u6708",
- "\u5341\u4e8c\u6708");
-
-// tooltips
-Calendar._TT = {};
-Calendar._TT["INFO"] = "\u5173\u4e8e";
-
-Calendar._TT["ABOUT"] =
-" DHTML \u65e5\u8d77/\u65f6\u95f4\u9009\u62e9\u63a7\u4ef6\n" +
-"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
-"For latest version visit: \u6700\u65b0\u7248\u672c\u8bf7\u767b\u9646http://www.dynarch.com/projects/calendar/\u5bdf\u770b\n" +
-"\u9075\u5faaGNU LGPL. \u7ec6\u8282\u53c2\u9605 http://gnu.org/licenses/lgpl.html" +
-"\n\n" +
-"\u65e5\u671f\u9009\u62e9:\n" +
-"- \u70b9\u51fb\xab(\xbb)\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e00\u5e74\u5ea6.\n" +
-"- \u70b9\u51fb" + String.fromCharCode(0x2039) + "(" + String.fromCharCode(0x203a) + ")\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e2a\u6708\u4efd.\n" +
-"- \u957f\u65f6\u95f4\u6309\u7740\u6309\u94ae\u5c06\u51fa\u73b0\u66f4\u591a\u9009\u62e9\u9879.";
-Calendar._TT["ABOUT_TIME"] = "\n\n" +
-"\u65f6\u95f4\u9009\u62e9:\n" +
-"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u589e\u52a0\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\n" +
-"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u6309\u4f4fShift\u952e\u540e\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u51cf\u5c11\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2).";
-
-Calendar._TT["PREV_YEAR"] = "\u4e0a\u4e00\u5e74";
-Calendar._TT["PREV_MONTH"] = "\u4e0a\u4e2a\u6708";
-Calendar._TT["GO_TODAY"] = "\u5230\u4eca\u5929";
-Calendar._TT["NEXT_MONTH"] = "\u4e0b\u4e2a\u6708";
-Calendar._TT["NEXT_YEAR"] = "\u4e0b\u4e00\u5e74";
-Calendar._TT["SEL_DATE"] = "\u9009\u62e9\u65e5\u671f";
-Calendar._TT["DRAG_TO_MOVE"] = "\u62d6\u52a8";
-Calendar._TT["PART_TODAY"] = " (\u4eca\u5929)";
-
-// the following is to inform that "%s" is to be the first day of week
-// %s will be replaced with the day name.
-Calendar._TT["DAY_FIRST"] = "%s\u4e3a\u8fd9\u5468\u7684\u7b2c\u4e00\u5929";
-
-// This may be locale-dependent. It specifies the week-end days, as an array
-// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
-// means Monday, etc.
-Calendar._TT["WEEKEND"] = "0,6";
-
-Calendar._TT["CLOSE"] = "\u5173\u95ed";
-Calendar._TT["TODAY"] = "\u4eca\u5929";
-Calendar._TT["TIME_PART"] = "(\u6309\u7740Shift\u952e)\u5355\u51fb\u6216\u62d6\u52a8\u6539\u53d8\u503c";
-
-// date formats
-Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
-Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e\u65e5";
-
-Calendar._TT["WK"] = "\u5468";
-Calendar._TT["TIME"] = "\u65f6\u95f4:";
diff --git a/javascript/libs/dynarch/jscalendar/menuarrow.gif b/javascript/libs/dynarch/jscalendar/menuarrow.gif Binary files differdeleted file mode 100644 index ed2dee0..0000000 --- a/javascript/libs/dynarch/jscalendar/menuarrow.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/menuarrow2.gif b/javascript/libs/dynarch/jscalendar/menuarrow2.gif Binary files differdeleted file mode 100644 index 40c0aad..0000000 --- a/javascript/libs/dynarch/jscalendar/menuarrow2.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/multiple-dates.html b/javascript/libs/dynarch/jscalendar/multiple-dates.html deleted file mode 100644 index caf1920..0000000 --- a/javascript/libs/dynarch/jscalendar/multiple-dates.html +++ /dev/null @@ -1,82 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>Sample for the multiple dates feature</title> - <!-- calendar stylesheet --> - <link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-cold-1.css" title="win2k-cold-1" /> - - <!-- main calendar program --> - <script type="text/javascript" src="calendar.js"></script> - - <!-- language for the calendar --> - <script type="text/javascript" src="lang/calendar-en.js"></script> - - <!-- the following script defines the Calendar.setup helper function, which makes - adding a calendar a matter of 1 or 2 lines of code. --> - <script type="text/javascript" src="calendar-setup.js"></script> -</head> - -<body> - <h1>Sample for the multiple dates feature</h1> - - <p> - Starting version 0.9.7, - the calendar is able to handle multiple dates selection, in either - flat or popup form. For this to happen one needs to pass the - "<tt>multiple: true</tt>" parameter to - <tt>Calendar.setup</tt> and to install an <tt>onUpdate</tt> - handler that watches for modifications. - </p> - - <a id="trigger" href="#">[open calendar...]</a> - - <div id="output"></div> - - <script type="text/javascript">//<![CDATA[ - // the default multiple dates selected, first time the calendar is instantiated - var MA = []; - - function closed(cal) { - - // here we'll write the output; this is only for example. You - // will normally fill an input field or something with the dates. - var el = document.getElementById("output"); - - // reset initial content. - el.innerHTML = ""; - - // Reset the "MA", in case one triggers the calendar again. - // CAREFUL! You don't want to do "MA = [];". We need to modify - // the value of the current array, instead of creating a new one. - // Calendar.setup is called only once! :-) So be careful. - MA.length = 0; - - // walk the calendar's multiple dates selection hash - for (var i in cal.multiple) { - var d = cal.multiple[i]; - // sometimes the date is not actually selected, that's why we need to check. - if (d) { - // OK, selected. Fill an input field. Or something. Just for example, - // we will display all selected dates in the element having the id "output". - el.innerHTML += d.print("%A, %Y %B %d") + "<br />"; - - // and push it in the "MA", in case one triggers the calendar again. - MA[MA.length] = d; - } - } - cal.hide(); - return true; - }; - - Calendar.setup({ - align : "BR", - showOthers : true, - multiple : MA, // pass the initial or computed array of multiple dates to be initially selected - onClose : closed, - button : "trigger" - }); - //]]></script> - -<hr /> -<address><a href="http://dynarch.com/mishoo/">mishoo</a></address> -<!-- hhmts start --> Last modified: Thu Mar 3 20:17:42 EET 2005 <!-- hhmts end --> -</body> </html> diff --git a/javascript/libs/dynarch/jscalendar/release-notes.html b/javascript/libs/dynarch/jscalendar/release-notes.html deleted file mode 100644 index 9addddb..0000000 --- a/javascript/libs/dynarch/jscalendar/release-notes.html +++ /dev/null @@ -1,435 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN"> -<html> - <head> - <title>jscalendar release notes</title> - - <style type="text/css"> - h1 { border-bottom: 1px solid #000; } - h2 { border-bottom: 1px solid #444; } - ul li { margin-top: 0.5em; margin-bottom: 0.5em; } - </style> - </head> - - <body> - <div style="float: right; border: 1px solid #000; background: #fff; padding: 10px; "> - <a href="http://www.dynarch.com/projects/calendar/">The Coolest DHTML Calendar</a><br /> - © <a href="http://www.dynarch.com/">Dynarch.com</a> 2002 and later. - </div> - <h1>jscalendar release notes</h1> - - <p>This release compiled at Monday, 7 Mar 2005 (19:06).</p> - - <h2>1.0</h2> - - <ul> - - <li> - Added support for multiple dates selection. In this mode the - calendar will allow the user to select more than one date, and - will maintain an array of selected dates that can be - investigated from your custom handlers. Sample in <a - href="multiple-dates.html">multiple-dates.html</a>. - </li> - - <li> - Support for “day info”. Using this feature you can display - custom information for certain dates. Sample in <a - href="dayinfo.html">dayinfo.html</a>. Note that if the text - is really big the calendar layout might appear somehow broken; - this is something that should be easy to fix in the CSS file. - </li> - - <li> - Clicking on “Today” will now close the calendar if the current - date is already selected. - </li> - - <li> - The “first day of week” setting can now be defined in the - language file--after all, it is locale-specific. The new - parameter is “Calendar._FD”. Language files should be - updated, but the calendar will not complain nor fail to - function if the parameter is not present. - </li> - - <li> - Some fixes to make the thing work in Safari. It now seems to - be properly supported, please let me know if you encounter any - problems. - </li> - - <li> - New skin: Aqua theme, appropriate for MacOSX fan sites :-) - This theme is located in “skins/aqua/theme.css” (in the - future, all themes will go to this directory). - </li> - - <li> - <b>Bug fixes.</b> - <ul> - <li> - Keyboard operation now functions normally when the - calendar is displaying days from adjacent months; it might - even work correctly for months containing disabled dates - :). This fix was originally developed under contract for - <a - href="http://www.zapatec.com/website/main/products/prod1/">The - Zapatec Calendar</a>. Zapatec kindly allowed us to - include the bugfixes back in the open source calendar. - </li> - <li> - Fixed the time selection bug: the previous version would - reset the time to current time when a new date was - clicked. - </li> - <li> - Parsing hours like "12:XX pm" would wrongfully replace - "pm" with "am"--fixed. - </li> - <li> - Fixed critical bugs in parseDate function that would - initialize the calendar with 'NaN' values in all cells if - the string to be parsed is not a valid date. - </li> - <li> - The golbal variable that we are using was renamed to - “_dynarch_popupCalendar” to minimize the risk of name - clashes. It's still difficult to get rid of it. - </li> - <li> - Added z-index property to drop-down menus style. - </li> - <li> - The calendar will update an input field even in flat mode, - if an input field was passed. Also, the “showOthers” - parameter will be effective in both popup and flat mode. - </li> - <li> - Others, probably. - </li> - </ul> - </li> - - <li> - Documentation & sample files updated. - </li> - - </ul> - - <h2>0.9.6</h2> - - <ul> - - <li> - "Smart" (TM :-) positioning algorithm. The new algorithm will - try to keep the calendar in the browser view, which is helpful - in situations when the input field is near the bottom or the - right edge. This code is only tested with IE and Mozilla, but - it should work with other browsers too. Many thanks to <a - href="http://www.ex3.com">Sunny Chowdhury</a> for sponsoring - this feature! - </li> - - <li> - Support for IE5/Win is back. I also want to thank Janusz - Piwowarski for keeping his eye on the CVS ;-) He reviewed my - IE5-related changes and sent me a much cleaner patch. - </li> - - <li> - The calendar will now allow any day of week to be "the first - day of week". This was requested long time ago, by someone - whose name I forgot (sorry). The reason was that in certain - countries weeks start on Saturday. So I thought that instead - of having a "mondayFirst" and a "saturdayFirst" parameter, - :-), it's better to have a "firstDayOfWeek" parameter; now - it's present and its meaning is: "0 for Sunday", "1 for - Monday", "2 for Tuesday", etc. The equivalent parameter for - Calendar.setup is "firstDay". The end user can also change - it very easy: click on the day name in the calendar display. - </li> - - <li> - The above feature triggered one <b>important change</b>: the - notion of "weekend" is now defined in the language file. - Added parameters: - - <pre> - Calendar._TT["WEEKEND"] = "0,6"; - Calendar._TT["DAY_FIRST"] = "Display %s first";</pre> - - "WEEKEND" specifies a string with comma-separated numbers from - 0 to 7; they define what days are marked as "weekend". 5 and - 6 mean, of course, "Sunday" and "Saturday". Day first is the - tooltip displayed when a day name is hovered; "%s" will get - replaced with the day name. Updated languages are "en" and - "ro", which I maintain. Please note that languages wich are - not updated <b>will not work</b>. If yours is one of them, - please consider fixing it and sending me the fix so that I can - include it in the distro. - </li> - - <li> - The calendar can now display days from the months adjacent to - the currently displayed one. This is optional, of course, and - the parameter name is "showsOtherMonths" (or "showOthers" in - Calendar.setup). All theme files were updated. - </li> - - <li> - Displays "Time:" near the time selector, only if defined in - the language file. - </li> - - <li> - Some bugs fixed in the date parsing code (which has also been - rewritten a little bit cleaner). - </li> - - <li> - Calendar.setup will now configure the calendar to trigger the - input fields' "onchange" event, if specified, when a date is - selected. - </li> - - <li> - New parameter in Calendar.setup: "cache" (<b>defaults to - false</b>). If set to true then the popup calendar object - will be "cached", meaning, it will be created only once, no - matter how many input fields are there in the page. Sometimes - this is not desirable, which is why I've added this - parameter. Please note that it defaults to "false" (thus the - default behavior has changed). - </li> - - <li> - Added a simple PHP wrapper. It provides code which loads all - the required scripts and theme file, and one function which - creates and configures an input field for date input. It - takes care of creating and assigning unique ID-s for the - calendar fields and it also creates the "Calendar.setup" code. - Functions to create more specialized fields can be added very - easily. This feature was requested by the FreeMED.org project - (thanks for donating!). - </li> - - </ul> - - <p>Wow, there were quite some changes :-D Enjoy it!</p> - - <h2>0.9.5</h2> - - <p> - This release's primary goal is to fix a wrong license statement which - can be found in some files from 0.9.4. For instance in README or - calendar.js, the statement was that the code is distributed under the - GNU GPL; that's because I had plans to change the license, then - changed my mind but unfortunately I committed files so. I am sorry - for this inconvenience, please use the latest (0.9.5) release which is - fully covered by LGPL. - </p> - - <p>Other changes:</p> - - <ul> - - <li> - <b>Fixed</b> an annoying bug that prevented the calendar to display - correctly when it was configured for an input field inside a - <b>scrolling area</b>. <b>Many thanks</b> to Ian Barrack (<a - href="http://www.simban.com">Simban.com</a>) who pointed it up and - donated quite some money for the Calendar project! - </li> - - <li> - All examples use UTF-8 now; the translations may not be all - up-to-date, but I <strong>strongly</strong> suggest everyone to use - UTF-8; other encodings are a plain mess. So far I know for sure - that Romanian translation will work with UTF-8 and <em>not - anymore</em> with ISO-8859-2. Other translations are probably - usable under UTF-8, but if your preferred language isn't... ;-) - please make it and send it to me for inclusion. - </li> - - <li> - Fixed small bug in the documentation (one footnote didn't appear - where it should have). - </li> - - <li> - Updated translations: DE, ES, HU, IT, RO. Thanks to everyone who - sent translations! - </li> - - </ul> - - <h2>0.9.4</h2> - - <h3>New stuff</h3> - - <ul> - - <li>Supports time selection. Yes. ;-) This work has been largely - sponsored by <strong>Himanshukumar Shah</strong> (thank you!). See - the docs and example files for details on how to setup.</li> - - <li>Easy to link 2 or more fields by using the new - <code>onUpdate</code> parameter of <code>Calendar.setup</code>. This - is useful, say, to automatically set a value in a second field based - on the value selected in the first field. See the documentation and - first sample in <a href="simple-1.html">simple-1.html</a>.</li> - - <li>Other <code>Calendar.setup</code> low-level parameters, for those - wanting to have the complete control: <code>onSelect</code> and - <code>onClose</code>. The handlers are called when something is - selected in the calendar or when the calendar is closed.</li> - - <li>The translation files can optionally include the short day names - and the short month names. That's because in some languages, like - German, the short form is not the first 3 letters of the entire name - but only the first 2. Also in other languages short names can't be - as easily derived from the full name by just calling substr, so this - patch solves the problem.</li> - - <li>Implemented a nice way to make some dates "special" (look - different). Specifically, the <code>setDisabledHandler</code> method - was replaced with the more general <code>setDateStatusHandler</code> - method (the old one is still available for backwards compatibility but - <em>will</em> be removed). More details about this in the - documentation. Also see <a href="simple-3.html">simple-3.html</a> - for a live sample.</li> - - <li>Date parsing and formatting engine is now rewritten and supports a - subset of <code>strftime</code> format specifiers from ANSI C. This - makes it possible to use dates like "YYYYMMDD" (the corresponding - format for this would be "%Y%m%d"). Details in the documentation. - <b>Please note that the new engine is not compatibile with older - calendar releases!</b></li> - - <li>Along with the new date parser I workarounded an unpleasant crash - that occurred in IE when certain accented characters appeared in the - texts. I think German was one of the language with such problems, and - the workaround was to use the letter without an accent. Well, now you - can translate to whatever you want.</li> - - <li>"Fixes" (I mean, "horrible workarounds") for Konqueror (and - hopefully Safari). Unfortunately, this otherwise excellent browser - still has some bugs that keep the calendar from working - <em>exactly</em> as it should.. But they're going to be fixed, - right? ;-)</li> - - <li>CSS themes got pretty much modified too so if you wrote your theme - you need to update it. Aside for the time selector support, the CSS - themes contain a simple hack that makes the navigation buttons show - a little arrow in the lower-right corner which indicates that if one - holds the mouse a menu will appear.</li> - - </ul> - - <h3>Translation files</h3> - - <p>The translation files need to be updated in order for the calendar to - work properly. Currently the only updated files are calendar-en.js - (main file) and calendar-ro.js (well, yes, I am a Romanian ;-).</p> - - <p>Specifically, they need the following:</p> - - <ul> - - <li>Correct date format, according with the new format specifiers - introduced in 0.9.4. Details about the available format specifiers - in the documentation</li> - - <li>Short day or month names, <em>if required</em>. If they can be - derived by taking the first N letters of the full name then a simple - Calendar._SDN_len = N or Calendar._SMN_len = N will suffice. If N - is 3 then nothing needs to be done as we take it for granted if no - other option is offered ;-)</li> - - <li>We have some new texts that shows short usage information as well - as copyright information.</li> - - </ul> - - <p>If your favorite language is not there yet, or it is but not updated - according to the main calendar-en.js file, then please consider - translating calendar-en.js and send the translation back to me so that - I include it in the official distribution.</p> - - <h3>Bug status</h3> - - <p>Check <a - href="http://sourceforge.net/tracker/?atid=544285&group_id=75569&func=browse">SourceForge</a>, - I didn't keep track. However, there were a lot of bugfixes.</p> - - <h2>0.9.3</h2> - - <h3>New stuff</h3> - - <ul> - - <li>Opera 7 compatibility — keyboard navigation is - still not available; text selection can't be disabled, leading to an - ugly effect when walking through the month/year menus.</li> - - <li>Ability to align the calendar relative to the input field (or any - other element). Vertical: top, center, bottom. Horizontal: left, - center, right. This is established as a new parameter for - <tt>showAtElement</tt>.</li> - - <li>Added <tt>dateClicked</tt> property (boolean). This can be - inspected in the "onSelect" handler to determine if a date was - really clicked or the user only changed month/year using the menus. - You <em>need</em> to check this for "single-click" calendars and - only close/hide the calendar if it's <tt>true</tt>.</li> - - <li>Full documentation in <a href="doc/html/reference.html">HTML</a> - and <a href="doc/reference.pdf">PDF</a> format is now available in the - distribution archive.</li> - - <li>New language definition files: HU, HR, PT, ZH. Thanks those who - submitted!</li> - - </ul> - - <h3>Bug status</h3> - - <p>This covers only those bugs that have been reported <a - href="http://sourceforge.net/projects/jscalendar" target="_blank" - title="Project page at SourceForge">at SourceForge</a>.</p> - - <ol> - - <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=703238&group_id=75569&atid=544285" target="_blank" - title="Go to bug description at sourceforge"><tt>#703,238</tt></a> — fixed</li> - <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=703814&group_id=75569&atid=544285" target="_blank" - title="Go to bug description at sourceforge"><tt>#703,814</tt></a> — fixed</li> - <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=716777&group_id=75569&atid=544285" target="_blank" - title="Go to bug description at sourceforge"><tt>#716,777</tt></a> — closed (was fixed already in 0.9.2-1)</li> - <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=723335&group_id=75569&atid=544285" target="_blank" - title="Go to bug description at sourceforge"><tt>#723,335</tt></a> — fixed</li> - <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=715122&group_id=75569&atid=544285" target="_blank" - title="Go to bug description at sourceforge"><tt>#715,122</tt></a> — feature request; implemented.</li> - <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=721206&group_id=75569&atid=544285" target="_blank" - title="Go to bug description at sourceforge"><tt>#721,206</tt></a> — fixed (added "refresh()" function)</li> - <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=721833&group_id=75569&atid=544285" target="_blank" - title="Go to bug description at sourceforge"><tt>#721,833</tt></a> — fixed (bug concerning the "yy" format - parsing)</li> - <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=721833&group_id=75569&atid=544285" target="_blank" - title="Go to bug description at sourceforge"><tt>#721,833</tt></a> — won't fix (we won't set the time to - midnight; time might actually be useful when we implement support - for time selection). - - </ol> - - <hr /> - <address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address> -<!-- Created: Tue Jul 8 17:29:37 EEST 2003 --> -<!-- hhmts start --> -Last modified on Wed Oct 29 02:37:07 2003 -<!-- hhmts end --> -<!-- doc-lang: English --> - </body> -</html> - - diff --git a/javascript/libs/dynarch/jscalendar/simple-1.html b/javascript/libs/dynarch/jscalendar/simple-1.html deleted file mode 100644 index c2a944a..0000000 --- a/javascript/libs/dynarch/jscalendar/simple-1.html +++ /dev/null @@ -1,244 +0,0 @@ -<html style="background-color: buttonface; color: buttontext;"> - -<head> -<meta http-equiv="content-type" content="text/xml; charset=utf-8" /> - -<title>Simple calendar setups [popup calendar]</title> - - <!-- calendar stylesheet --> - <link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-cold-1.css" title="win2k-cold-1" /> - - <!-- main calendar program --> - <script type="text/javascript" src="calendar.js"></script> - - <!-- language for the calendar --> - <script type="text/javascript" src="lang/calendar-en.js"></script> - - <!-- the following script defines the Calendar.setup helper function, which makes - adding a calendar a matter of 1 or 2 lines of code. --> - <script type="text/javascript" src="calendar-setup.js"></script> - -</head> - -<body> - -<h2>DHTML Calendar — for the impatient</h2> - - <blockquote> - <p> - This page lists some common setups for the popup calendar. In - order to see how to do any of them please see the source of this - page. For each example it's structured like this: there's the - <form> that contains the input field, and following there is - the JavaScript snippet that setups that form. An example of - <em>flat</em> calendar is available in <a - href="simple-2.html">another page</a>. - </p> - <p> - The code in this page uses a helper function defined in - "calendar-setup.js". With it you can setup the calendar in - minutes. If you're not <em>that</em> impatient, ;-) <a - href="doc/html/reference.html">complete documenation</a> is - available. - </p> - </blockquote> - - - -<hr /> - -<p><b>Basic setup: one input per calendar.</b> Clicking in the input field -activates the calendar. The date format is "%m/%d/%Y %I:%M %p". The -calendar defaults to "single-click mode".</p> - -<p>The example below has been updated to show you how to create "linked" -fields. Basically, when some field is filled with a date, the other -is updated so that the difference between them remains one week. The -property useful here is "onUpdate".</p> - -<form action="#" method="get"> -<input type="text" name="date" id="f_date_a" /> -<input type="text" name="date" id="f_calcdate" /> -</form> - -<script type="text/javascript"> - function catcalc(cal) { - var date = cal.date; - var time = date.getTime() - // use the _other_ field - var field = document.getElementById("f_calcdate"); - if (field == cal.params.inputField) { - field = document.getElementById("f_date_a"); - time -= Date.WEEK; // substract one week - } else { - time += Date.WEEK; // add one week - } - var date2 = new Date(time); - field.value = date2.print("%Y-%m-%d %H:%M"); - } - Calendar.setup({ - inputField : "f_date_a", // id of the input field - ifFormat : "%Y-%m-%d %H:%M", // format of the input field - showsTime : true, - timeFormat : "24", - onUpdate : catcalc - }); - Calendar.setup({ - inputField : "f_calcdate", - ifFormat : "%Y-%m-%d %H:%M", - showsTime : true, - timeFormat : "24", - onUpdate : catcalc - }); -</script> - - - -<hr /> - -<p><b>Input field with a trigger button.</b> Clicking the button activates -the calendar. Note that this one needs double-click (singleClick parameter -is explicitely set to false). Also demonstrates the "step" parameter -introduced in 0.9.6 (show all years in drop-down boxes, instead of every -other year as default).</p> - -<form action="#" method="get"> -<input type="text" name="date" id="f_date_b" /><button type="reset" id="f_trigger_b">...</button> -</form> - -<script type="text/javascript"> - Calendar.setup({ - inputField : "f_date_b", // id of the input field - ifFormat : "%m/%d/%Y %I:%M %p", // format of the input field - showsTime : true, // will display a time selector - button : "f_trigger_b", // trigger for the calendar (button ID) - singleClick : false, // double-click mode - step : 1 // show all years in drop-down boxes (instead of every other year as default) - }); -</script> - - - -<hr /> - -<p><b>Input field with a trigger image.</b> Note that the Calendar.setup -function doesn't care if the trigger is a button, image, or anything else. -Also in this example we setup a different alignment, just to show how it's -done. The input field is read-only (that is set from HTML).</p> - -<form action="#" method="get"> -<table cellspacing="0" cellpadding="0" style="border-collapse: collapse"><tr> - <td><input type="text" name="date" id="f_date_c" readonly="1" /></td> - <td><img src="img.gif" id="f_trigger_c" style="cursor: pointer; border: 1px solid red;" title="Date selector" - onmouseover="this.style.background='red';" onmouseout="this.style.background=''" /></td> -</table> -</form> - -<script type="text/javascript"> - Calendar.setup({ - inputField : "f_date_c", // id of the input field - ifFormat : "%B %e, %Y", // format of the input field - button : "f_trigger_c", // trigger for the calendar (button ID) - align : "Tl", // alignment (defaults to "Bl") - singleClick : true - }); -</script> - - - -<hr /> - -<p><b>Hidden field, display area.</b> The calendar now puts the date into 2 -elements: one is an input field of type "hidden"—so that the user -can't directly see or modify it— and one is a <span> element in -which the date is displayed. Note that if the trigger is not specified the -calendar will use the displayArea (or inputField as in the first example). -The display area can have it's own format. This is useful if, for instance, -we need to store one format in the database (thus pass it in the input -field) but we wanna show a friendlier format to the end-user.</p> - -<form action="#" method="get" style="visibility: hidden"> -<input type="hidden" name="date" id="f_date_d" /> -</form> - -<p>Your birthday: - <span style="background-color: #ff8; cursor: default;" - onmouseover="this.style.backgroundColor='#ff0';" - onmouseout="this.style.backgroundColor='#ff8';" - id="show_d" - >Click to open date selector</span>.</p> - -<script type="text/javascript"> - Calendar.setup({ - inputField : "f_date_d", // id of the input field - ifFormat : "%Y/%d/%m", // format of the input field (even if hidden, this format will be honored) - displayArea : "show_d", // ID of the span where the date is to be shown - daFormat : "%A, %B %d, %Y",// format of the displayed date - align : "Tl", // alignment (defaults to "Bl") - singleClick : true - }); -</script> - - - -<hr /> - -<p><b>Hidden field, display area, trigger image.</b> Very similar to the -previous example. The difference is that we also have a trigger image.</p> - -<form action="#" method="get" style="visibility: hidden"> -<input type="hidden" name="date" id="f_date_e" /> -</form> - -<p>Your birthday: <span id="show_e">-- not entered --</span> <img -src="img.gif" id="f_trigger_e" style="cursor: pointer; border: 1px solid -red;" title="Date selector" onmouseover="this.style.background='red';" -onmouseout="this.style.background=''" />.</p> - -<script type="text/javascript"> - Calendar.setup({ - inputField : "f_date_e", // id of the input field - ifFormat : "%Y/%d/%m", // format of the input field (even if hidden, this format will be honored) - displayArea : "show_e", // ID of the span where the date is to be shown - daFormat : "%A, %B %d, %Y",// format of the displayed date - button : "f_trigger_e", // trigger button (well, IMG in our case) - align : "Tl", // alignment (defaults to "Bl") - singleClick : true - }); -</script> - - - -<hr /> - -<p><b>Hidden field, display area.</b> Very much like the previous examples, -but we now disable some dates (all weekends, that is, Saturdays and -Sundays).</p> - -<form action="#" method="get" style="visibility: hidden"> -<input type="hidden" name="date" id="f_date_f" /> -</form> - -<p>Your birthday: - <span style="background-color: #ff8; cursor: default;" - onmouseover="this.style.backgroundColor='#ff0';" - onmouseout="this.style.backgroundColor='#ff8';" - id="show_f" - >Click to open date selector</span>.</p> - -<script type="text/javascript"> - Calendar.setup({ - inputField : "f_date_f", // id of the input field - ifFormat : "%Y/%d/%m", // format of the input field (even if hidden, this format will be honored) - displayArea : "show_f", // ID of the span where the date is to be shown - daFormat : "%A, %B %d, %Y",// format of the displayed date - align : "Tl", // alignment (defaults to "Bl") - dateStatusFunc : function (date) { // disable weekend days (Saturdays == 6 and Subdays == 0) - return (date.getDay() == 6 || date.getDay() == 0) ? true : false; - } - }); -</script> - - -</body> -</html> diff --git a/javascript/libs/dynarch/jscalendar/simple-2.html b/javascript/libs/dynarch/jscalendar/simple-2.html deleted file mode 100644 index b55bae8..0000000 --- a/javascript/libs/dynarch/jscalendar/simple-2.html +++ /dev/null @@ -1,108 +0,0 @@ -<html style="background-color: buttonface; color: buttontext;"> - -<head> -<meta http-equiv="content-type" content="text/xml; charset=utf-8" /> - -<title>Simple calendar setup [flat calendar]</title> - - <!-- calendar stylesheet --> - <link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-cold-1.css" title="win2k-cold-1" /> - - <!-- main calendar program --> - <script type="text/javascript" src="calendar.js"></script> - - <!-- language for the calendar --> - <script type="text/javascript" src="lang/calendar-en.js"></script> - - <!-- the following script defines the Calendar.setup helper function, which makes - adding a calendar a matter of 1 or 2 lines of code. --> - <script type="text/javascript" src="calendar-setup.js"></script> - -</head> - -<body> - -<h2>DHTML Calendar — for the impatient</h2> - - <blockquote> - <p> - This page demonstrates how to setup a flat calendar. Examples of - <em>popup</em> calendars are available in <a - href="simple-1.html">another page</a>. - </p> - <p> - The code in this page uses a helper function defined in - "calendar-setup.js". With it you can setup the calendar in - minutes. If you're not <em>that</em> impatient, ;-) <a - href="doc/html/reference.html">complete documenation</a> is - available. - </p> - </blockquote> - - - -<hr /> - -<div style="float: right; margin-left: 1em; margin-bottom: 1em;" -id="calendar-container"></div> - -<script type="text/javascript"> - function dateChanged(calendar) { - // Beware that this function is called even if the end-user only - // changed the month/year. In order to determine if a date was - // clicked you can use the dateClicked property of the calendar: - if (calendar.dateClicked) { - // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php - var y = calendar.date.getFullYear(); - var m = calendar.date.getMonth(); // integer, 0..11 - var d = calendar.date.getDate(); // integer, 1..31 - // redirect... - window.location = "/" + y + "/" + m + "/" + d + "/index.php"; - } - }; - - Calendar.setup( - { - flat : "calendar-container", // ID of the parent element - flatCallback : dateChanged // our callback function - } - ); -</script> - -<p>The positioning of the DIV that contains the calendar is entirely your -job. For instance, the "calendar-container" DIV from this page has the -following style: "float: right; margin-left: 1em; margin-bottom: 1em".</p> - -<p>Following there is the code that has been used to create this calendar. -You can find the full description of the <tt>Calendar.setup()</tt> function -in the <a href="doc/html/reference.html">calendar documenation</a>.</p> - -<pre -><div style="float: right; margin-left: 1em; margin-bottom: 1em;" -id="calendar-container"></div> - -<script type="text/javascript"> - function dateChanged(calendar) { - // Beware that this function is called even if the end-user only - // changed the month/year. In order to determine if a date was - // clicked you can use the dateClicked property of the calendar: - if (calendar.dateClicked) { - // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php - var y = calendar.date.getFullYear(); - var m = calendar.date.getMonth(); // integer, 0..11 - var d = calendar.date.getDate(); // integer, 1..31 - // redirect... - window.location = "/" + y + "/" + m + "/" + d + "/index.php"; - } - }; - - Calendar.setup( - { - flat : "calendar-container", // ID of the parent element - flatCallback : dateChanged // our callback function - } - ); -</script></pre> - -</body> -</html> diff --git a/javascript/libs/dynarch/jscalendar/simple-3.html b/javascript/libs/dynarch/jscalendar/simple-3.html deleted file mode 100644 index c096e87..0000000 --- a/javascript/libs/dynarch/jscalendar/simple-3.html +++ /dev/null @@ -1,130 +0,0 @@ -<html style="background-color: buttonface; color: buttontext;"> - -<head> -<meta http-equiv="content-type" content="text/xml; charset=utf-8" /> - -<title>Simple calendar setup [flat calendar]</title> - - <!-- calendar stylesheet --> - <link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-cold-1.css" title="win2k-cold-1" /> - - <!-- main calendar program --> - <script type="text/javascript" src="calendar.js"></script> - - <!-- language for the calendar --> - <script type="text/javascript" src="lang/calendar-en.js"></script> - - <!-- the following script defines the Calendar.setup helper function, which makes - adding a calendar a matter of 1 or 2 lines of code. --> - <script type="text/javascript" src="calendar-setup.js"></script> - - <style type="text/css"> - .special { background-color: #000; color: #fff; } - </style> - -</head> - -<body> - -<h2>DHTML Calendar — for the impatient</h2> - - <blockquote> - <p> - This page demonstrates how to setup a flat calendar. Examples of - <em>popup</em> calendars are available in <a - href="simple-1.html">another page</a>. - </p> - <p> - The code in this page uses a helper function defined in - "calendar-setup.js". With it you can setup the calendar in - minutes. If you're not <em>that</em> impatient, ;-) <a - href="doc/html/reference.html">complete documenation</a> is - available. - </p> - </blockquote> - - - -<hr /> - -<div style="float: right; margin-left: 1em; margin-bottom: 1em;" -id="calendar-container"></div> - -<script type="text/javascript"> - var SPECIAL_DAYS = { - 0 : [ 13, 24 ], // special days in January - 2 : [ 1, 6, 8, 12, 18 ], // special days in March - 8 : [ 21, 11 ] // special days in September - }; - - function dateIsSpecial(year, month, day) { - var m = SPECIAL_DAYS[month]; - if (!m) return false; - for (var i in m) if (m[i] == day) return true; - return false; - }; - - function dateChanged(calendar) { - // Beware that this function is called even if the end-user only - // changed the month/year. In order to determine if a date was - // clicked you can use the dateClicked property of the calendar: - if (calendar.dateClicked) { - // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php - var y = calendar.date.getFullYear(); - var m = calendar.date.getMonth(); // integer, 0..11 - var d = calendar.date.getDate(); // integer, 1..31 - // redirect... - window.location = "/" + y + "/" + m + "/" + d + "/index.php"; - } - }; - - Calendar.setup( - { - flat : "calendar-container", // ID of the parent element - flatCallback : dateChanged, // our callback function - dateStatusFunc : function(date, y, m, d) { - if (dateIsSpecial(y, m, d)) return "special"; - else return false; // other dates are enabled - // return true if you want to disable other dates - } - } - ); -</script> - -<p>The positioning of the DIV that contains the calendar is entirely your -job. For instance, the "calendar-container" DIV from this page has the -following style: "float: right; margin-left: 1em; margin-bottom: 1em".</p> - -<p>Following there is the code that has been used to create this calendar. -You can find the full description of the <tt>Calendar.setup()</tt> function -in the <a href="doc/html/reference.html">calendar documenation</a>.</p> - -<pre -><div style="float: right; margin-left: 1em; margin-bottom: 1em;" -id="calendar-container"></div> - -<script type="text/javascript"> - function dateChanged(calendar) { - // Beware that this function is called even if the end-user only - // changed the month/year. In order to determine if a date was - // clicked you can use the dateClicked property of the calendar: - if (calendar.dateClicked) { - // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php - var y = calendar.date.getFullYear(); - var m = calendar.date.getMonth(); // integer, 0..11 - var d = calendar.date.getDate(); // integer, 1..31 - // redirect... - window.location = "/" + y + "/" + m + "/" + d + "/index.php"; - } - }; - - Calendar.setup( - { - flat : "calendar-container", // ID of the parent element - flatCallback : dateChanged // our callback function - } - ); -</script></pre> - -</body> -</html> diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/active-bg.gif b/javascript/libs/dynarch/jscalendar/skins/aqua/active-bg.gif Binary files differdeleted file mode 100644 index d608c54..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/active-bg.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/dark-bg.gif b/javascript/libs/dynarch/jscalendar/skins/aqua/dark-bg.gif Binary files differdeleted file mode 100644 index 1dea48a..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/dark-bg.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/hover-bg.gif b/javascript/libs/dynarch/jscalendar/skins/aqua/hover-bg.gif Binary files differdeleted file mode 100644 index fbf94fc..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/hover-bg.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/menuarrow.gif b/javascript/libs/dynarch/jscalendar/skins/aqua/menuarrow.gif Binary files differdeleted file mode 100644 index 40c0aad..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/menuarrow.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/normal-bg.gif b/javascript/libs/dynarch/jscalendar/skins/aqua/normal-bg.gif Binary files differdeleted file mode 100644 index bdb5068..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/normal-bg.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/rowhover-bg.gif b/javascript/libs/dynarch/jscalendar/skins/aqua/rowhover-bg.gif Binary files differdeleted file mode 100644 index 7715342..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/rowhover-bg.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/status-bg.gif b/javascript/libs/dynarch/jscalendar/skins/aqua/status-bg.gif Binary files differdeleted file mode 100644 index 857108c..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/status-bg.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/theme.css b/javascript/libs/dynarch/jscalendar/skins/aqua/theme.css deleted file mode 100644 index 18dd6cf..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/theme.css +++ /dev/null @@ -1,236 +0,0 @@ -/* Distributed as part of The Coolest DHTML Calendar - Author: Mihai Bazon, www.bazon.net/mishoo - Copyright Dynarch.com 2005, www.dynarch.com -*/ - -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #bdb2bf; - font-size: 11px; - color: #000; - cursor: default; - background: url("normal-bg.gif"); - font-family: "trebuchet ms",verdana,tahoma,sans-serif; -} - -.calendar { - border-color: #797979; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ - background: url("title-bg.gif") repeat-x 0 100%; color: #000; - font-weight: bold; -} - -.calendar .nav { - font-family: verdana,tahoma,sans-serif; -} - -.calendar .nav div { - background: transparent url("menuarrow.gif") no-repeat 100% 100%; -} - -.calendar thead tr { background: url("title-bg.gif") repeat-x 0 100%; color: #000; } - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - padding: 2px; - background: url("title-bg.gif") repeat-x 0 100%; color: #000; -} - -.calendar thead .headrow { /* Row <TR> containing navigation buttons */ -} - -.calendar thead .name { /* Cells <TD> containing the day names */ - border-bottom: 1px solid #797979; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #c44; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background: url("hover-bg.gif"); - border-bottom: 1px solid #797979; - padding: 2px 2px 1px 2px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background: url("active-bg.gif"); color: #fff; - padding: 3px 1px 0px 3px; - border-bottom: 1px solid #797979; -} - -.calendar thead .daynames { /* Row <TR> containing the day names */ - background: url("dark-bg.gif"); -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells <TD> containing month days dates */ - font-family: verdana,tahoma,sans-serif; - width: 2em; - color: #000; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #999; -} -.calendar tbody .day.othermonth.oweekend { - color: #f99; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #797979; - background: url("dark-bg.gif"); -} - -.calendar tbody .rowhilite td, -.calendar tbody .rowhilite td.wn { - background: url("rowhover-bg.gif"); -} - -.calendar tbody td.today { font-weight: bold; /* background: url("today-bg.gif") no-repeat 70% 50%; */ } - -.calendar tbody td.hilite { /* Hovered cells <TD> */ - background: url("hover-bg.gif"); - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells <TD> */ - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #c44; -} - -.calendar tbody td.selected { /* Cell showing selected date */ - font-weight: bold; - border: 1px solid #797979; - padding: 1px 3px 1px 1px; - background: url("active-bg.gif"); color: #fff; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */ - text-align: center; - background: #565; - color: #fff; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */ - padding: 2px; - background: url("status-bg.gif") repeat-x 0 0; color: #000; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #afa; - border: 1px solid #084; - color: #000; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #7c7; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #797979; - background: url("normal-bg.gif"); color: #000; - z-index: 100; - font-size: 90%; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .hilite { - background: url("hover-bg.gif"); color: #000; -} - -.calendar .combo .active { - background: url("active-bg.gif"); color: #fff; - font-weight: bold; -} - -.calendar td.time { - border-top: 1px solid #797979; - padding: 1px 0px; - text-align: center; - background: url("dark-bg.gif"); -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 5px 0px 6px; - font-weight: bold; - background: url("normal-bg.gif"); color: #000; -} - -.calendar td.time .hour, -.calendar td.time .minute { - font-family: monospace; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - background: url("hover-bg.gif"); color: #000; -} - -.calendar td.time span.active { - background: url("active-bg.gif"); color: #fff; -} diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/title-bg.gif b/javascript/libs/dynarch/jscalendar/skins/aqua/title-bg.gif Binary files differdeleted file mode 100644 index 6a541b3..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/title-bg.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/skins/aqua/today-bg.gif b/javascript/libs/dynarch/jscalendar/skins/aqua/today-bg.gif Binary files differdeleted file mode 100644 index 7161538..0000000 --- a/javascript/libs/dynarch/jscalendar/skins/aqua/today-bg.gif +++ /dev/null diff --git a/javascript/libs/dynarch/jscalendar/test-position.html b/javascript/libs/dynarch/jscalendar/test-position.html deleted file mode 100644 index 5544871..0000000 --- a/javascript/libs/dynarch/jscalendar/test-position.html +++ /dev/null @@ -1,40 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml"> - - <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <title>JS Calendar (positioning test)</title> - <script type="text/javascript" src="calendar.js"></script> - <script type="text/javascript" src="calendar-setup.js"></script> - <script type="text/javascript" src="lang/calendar-en.js"></script> - <style type="text/css"> @import url("calendar-win2k-cold-1.css"); </style> - </head> - - <body style="height: 100%; margin: 0px; padding: 0px;"> - <table style="height: 100%; width: 100%;" cellspacing="0" cellpadding="0"> - <tr style="height: 100%;"> - <td style="vertical-align: top; text-align: left;"> - <input type="text" id="cal-field-1" /> - <button type="submit" id="cal-button-1">...</button> - <script type="text/javascript"> - Calendar.setup({ - inputField : "cal-field-1", - button : "cal-button-1", - align : "Tr" - }); - </script> - </td> - <td style="vertical-align: bottom; text-align: right;"> - <input type="text" id="cal-field-2" /> - <button type="submit" id="cal-button-2">...</button> - <script type="text/javascript"> - Calendar.setup({ - inputField : "cal-field-2", - button : "cal-button-2" - }); - </script> - </td> - </tr> - </table> - </body> - -</html> diff --git a/javascript/libs/dynarch/jscalendar/test.php b/javascript/libs/dynarch/jscalendar/test.php deleted file mode 100644 index c9c2e28..0000000 --- a/javascript/libs/dynarch/jscalendar/test.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php - -$lang = $_GET['lang']; -if (!$lang) { - $lang = $_REQUEST['lang']; -} -if (!$lang) { - $lang = 'en'; -} -setcookie('lang', $lang); - -?> -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<title> -Test for calendar.php -</title> - -<?php - -// put here the correct path to "calendar.php"; don't move the file -// "calendar.php" -- I think it's best if you leave it inside the -// "/jscalendar/" directory. Just put here the correct path to it, such as -// "../jscalendar/calendar.php" or something. -require_once ('calendar.php'); - -// parameters to constructor: -// 1. the absolute URL path to the calendar files -// 2. the languate used for the calendar (see the lang/ dir) -// 3. the theme file used for the clanedar, without the ".css" extension -// 4. boolean that specifies if the "_stripped" files are to be loaded -// The stripped files are smaller as they have no whitespace and comments -$calendar = new DHTML_Calendar('/jscalendar/', $lang, 'calendar-win2k-2', false); - -// call this in the <head> section; it will "echo" code that loads the calendar -// scripts and theme file. -$calendar->load_files(); - -?> - -</head> - -<body> - -<?php if ($_REQUEST['submitted']) { ?> - -<h1>Form submitted</h1> - -<?php foreach ($_REQUEST as $key => $val) { - echo htmlspecialchars($key) . ' = ' . htmlspecialchars($val) . '<br />'; -} ?> - -<?php } else { ?> - -<h1>Calendar.php test</h1> - - <form action="test.php" method="get"> - Select language: <select name="lang" onchange="this.form.submit()"> - <?php -$cwd = getcwd(); -chdir('lang'); -foreach (glob('*.js') as $filename) { - $l = preg_replace('/(^calendar-|.js$)/', '', $filename); - $selected = ''; - if ($l == $lang) - $selected = 'selected="selected" '; - $display = $l; - if ($l == 'en') - $display = 'EN'; - echo '<option ' . $selected . 'value="' . $l . '">' . $display . '</option>'; -} - ?> - </select> - <blockquote style="font-size: 90%"> - <b>NOTE</b>: as of this release, 0.9.6, only "EN" and "RO", which I - maintain, function correctly. Other language files do not work - because they need to be updated. If you update some language file, - please consider sending it back to me so that I can include it in the - calendar distribution. - </blockquote> - </form> - - <form action="test.php" method="get"> - <input type="hidden" name="submitted" value="1" /> - - <table> - <tr> - <td> - Date 1: - </td> - <td> - <?php $calendar->make_input_field( - // calendar options go here; see the documentation and/or calendar-setup.js - array('firstDay' => 1, // show Monday first - 'showsTime' => true, - 'showOthers' => true, - 'ifFormat' => '%Y-%m-%d %I:%M %P', - 'timeFormat' => '12'), - // field attributes go here - array('style' => 'width: 15em; color: #840; background-color: #ff8; border: 1px solid #000; text-align: center', - 'name' => 'date1', - 'value' => strftime('%Y-%m-%d %I:%M %P', strtotime('now')))); ?> - </td> - </tr> - </table> - - <hr /> - <button>Submit</button> - - </form> - -<?php } ?> - -</body> -</html> diff --git a/javascript/libs/fat.js b/javascript/libs/fat.js deleted file mode 100644 index 9710629..0000000 --- a/javascript/libs/fat.js +++ /dev/null @@ -1,89 +0,0 @@ -// $Header: /cvsroot/bitweaver/_bit_util/javascript/libs/fat.js,v 1.6 2009/08/18 21:35:26 wjames5 Exp $ - -// please modify this file and leave plenty of comments. This file will be -// compressed automatically. Please make sure you only use comments beginning -// with '//' and put comments on separate lines otherwise the packer will choke - -// @name The Fade Anything Technique -// @namespace http://www.axentric.com/aside/fat/ -// @version 1.0-RC1 -// @author Adam Michela - -var Fat = { - make_hex : function (r,g,b) { - r = r.toString(16); if (r.length == 1) r = '0' + r; - g = g.toString(16); if (g.length == 1) g = '0' + g; - b = b.toString(16); if (b.length == 1) b = '0' + b; - return "#" + r + g + b; - }, - fade_all : function () { - var a = document.getElementsByTagName("*"); - for (var i = 0; i < a.length; i++) - { - var o = a[i]; - var r = /fade-?(\w{3,6})?/.exec(o.className); - if (r) - { - if (!r[1]) r[1] = ""; - if (o.id) Fat.fade_element(o.id,null,null,"#"+r[1]); - } - } - }, - fade_element : function (id, fps, duration, from, to) { - if (!fps) fps = 30; - if (!duration) duration = 3000; - if (!from || from=="#") from = "#FFFF33"; - if (!to) to = this.get_bgcolor(id); - - var frames = Math.round(fps * (duration / 1000)); - var interval = duration / frames; - var delay = interval; - var frame = 0; - - if (from.length < 7) from += from.substr(1,3); - if (to.length < 7) to += to.substr(1,3); - - var rf = parseInt(from.substr(1,2),16); - var gf = parseInt(from.substr(3,2),16); - var bf = parseInt(from.substr(5,2),16); - var rt = parseInt(to.substr(1,2),16); - var gt = parseInt(to.substr(3,2),16); - var bt = parseInt(to.substr(5,2),16); - - var r,g,b,h; - while (frame < frames) { - r = Math.floor(rf * ((frames-frame)/frames) + rt * (frame/frames)); - g = Math.floor(gf * ((frames-frame)/frames) + gt * (frame/frames)); - b = Math.floor(bf * ((frames-frame)/frames) + bt * (frame/frames)); - h = this.make_hex(r,g,b); - - setTimeout("Fat.set_bgcolor('"+id+"','"+h+"')", delay); - - frame++; - delay = interval * frame; - } - setTimeout("Fat.set_bgcolor('"+id+"','"+to+"')", delay); - }, - set_bgcolor : function (id, c) { - var o = document.getElementById(id); - o.style.backgroundColor = c; - }, - get_bgcolor : function (id) { - var o = document.getElementById(id); - while(o) { - var c; - if (window.getComputedStyle) c = window.getComputedStyle(o,null).getPropertyValue("background-color"); - if (o.currentStyle) c = o.currentStyle.backgroundColor; - if ((c != "" && c != "transparent") || o.tagName == "BODY") { break; } - o = o.parentNode; - } - if (c == undefined || c == "" || c == "transparent") c = "#FFFFFF"; - var rgb = c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/); - if (rgb) c = this.make_hex(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3])); - return c; - } -}; - -window.onload = function () { - Fat.fade_all(); -}; diff --git a/javascript/libs/fsmenu.js b/javascript/libs/fsmenu.js deleted file mode 100644 index 2469cc9..0000000 --- a/javascript/libs/fsmenu.js +++ /dev/null @@ -1,8 +0,0 @@ -/*
-
-FREESTYLE MENUS v1.0 RC (c) 2001-2006 Angus Turnbull, http://www.twinhelix.com
-Altering this notice or redistributing this file is prohibited.
-
-*/
-
-var isDOM=document.getElementById?1:0,isIE=document.all?1:0,isNS4=navigator.appName=='Netscape'&&!isDOM?1:0,isOp=self.opera?1:0,isDyn=isDOM||isIE||isNS4;function getRef(i,p){p=!p?document:p.navigator?p.document:p;return isIE?p.all[i]:isDOM?(p.getElementById?p:p.ownerDocument).getElementById(i):isNS4?p.layers[i]:null};function getSty(i,p){var r=getRef(i,p);return r?isNS4?r:r.style:null};if(!self.LayerObj)var LayerObj=new Function('i','p','this.ref=getRef(i,p);this.sty=getSty(i,p);return this');function getLyr(i,p){return new LayerObj(i,p)};function LyrFn(n,f){LayerObj.prototype[n]=new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px";with(this){'+f+'}')};LyrFn('x','if(!isNaN(p))sty.left=p+px;else return parseInt(sty.left)');LyrFn('y','if(!isNaN(p))sty.top=p+px;else return parseInt(sty.top)');if(typeof addEvent!='function'){var addEvent=function(o,t,f,l){var d='addEventListener',n='on'+t,rO=o,rT=t,rF=f,rL=l;if(o[d]&&!l)return o[d](t,f,false);if(!o._evts)o._evts={};if(!o._evts[t]){o._evts[t]=o[n]?{b:o[n]}:{};o[n]=new Function('e','var r=true,o=this,a=o._evts["'+t+'"],i;for(i in a){o._f=a[i];r=o._f(e||window.event)!=false&&r;o._f=null}return r');if(t!='unload')addEvent(window,'unload',function(){removeEvent(rO,rT,rF,rL)})}if(!f._i)f._i=addEvent._i++;o._evts[t][f._i]=f};addEvent._i=1;var removeEvent=function(o,t,f,l){var d='removeEventListener';if(o[d]&&!l)return o[d](t,f,false);if(o._evts&&o._evts[t]&&f._i)delete o._evts[t][f._i]}}function FSMenu(myName,nested,cssProp,cssVis,cssHid){this.myName=myName;this.nested=nested;this.cssProp=cssProp;this.cssVis=cssVis;this.cssHid=cssHid;this.cssLitClass='highlighted';this.menus={root:new FSMenuNode('root',true,this)};this.menuToShow=[];this.mtsTimer=null;this.showDelay=0;this.switchDelay=125;this.hideDelay=500;this.showOnClick=0;this.hideOnClick=true;this.animInSpeed=0.2;this.animOutSpeed=0.2;this.animations=[]};FSMenu.prototype.show=function(mN){with(this){menuToShow.length=arguments.length;for(var i=0;i<arguments.length;i++)menuToShow[i]=arguments[i];clearTimeout(mtsTimer);if(!nested)mtsTimer=setTimeout(myName+'.menus.root.over()',10)}};FSMenu.prototype.hide=function(mN){with(this){clearTimeout(mtsTimer);if(menus[mN])menus[mN].out()}};FSMenu.prototype.hideAll=function(){with(this){for(var m in menus)if(menus[m].visible&&!menus[m].isRoot)menus[m].hide(true)}};function FSMenuNode(id,isRoot,obj){this.id=id;this.isRoot=isRoot;this.obj=obj;this.lyr=this.child=this.par=this.timer=this.visible=null;this.args=[];var node=this;this.over=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);clearTimeout(mtsTimer);if(!isRoot&&!visible)node.show();if(menuToShow.length){var a=menuToShow,m=a[0];if(!menus[m]||!menus[m].lyr.ref)menus[m]=new FSMenuNode(m,false,obj);var c=menus[m];if(c==node){menuToShow.length=0;return}clearTimeout(c.timer);if(c!=child&&c.lyr.ref){c.args.length=a.length;for(var i=0;i<a.length;i++)c.args[i]=a[i];var delay=child?switchDelay:showDelay;c.timer=setTimeout('with('+myName+'){menus["'+c.id+'"].par=menus["'+node.id+'"];menus["'+c.id+'"].show()}',delay?delay:1)}menuToShow.length=0}if(!nested&&par)par.over()}};this.out=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);if(!isRoot&&hideDelay>=0){timer=setTimeout(myName+'.menus["'+id+'"].hide()',hideDelay);if(!nested&&par)par.out()}}};if(this.id!='root')with(this)with(lyr=getLyr(id))if(ref){if(isNS4)ref.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);addEvent(ref,'mouseover',this.over);addEvent(ref,'mouseout',this.out);if(obj.nested){addEvent(ref,'focus',this.over);addEvent(ref,'click',this.over);addEvent(ref,'blur',this.out)}}};FSMenuNode.prototype.show=function(forced){with(this)with(obj){if(!lyr||!lyr.ref)return;if(par){if(par.child&&par.child!=this)par.child.hide();par.child=this}var offR=args[1],offX=args[2],offY=args[3],lX=0,lY=0,doX=''+offX!='undefined',doY=''+offY!='undefined';if(self.page&&offR&&(doX||doY)){with(page.elmPos(offR,par.lyr?par.lyr.ref:0))lX=x,lY=y;if(doX)lyr.x(lX+eval(offX));if(doY)lyr.y(lY+eval(offY))}if(offR)lightParent(offR,1);visible=1;if(obj.onshow)obj.onshow(id);lyr.ref.parentNode.style.zIndex='2';setVis(1,forced)}};FSMenuNode.prototype.hide=function(forced){with(this)with(obj){if(!lyr||!lyr.ref||!visible)return;if(isNS4&&self.isMouseIn&&isMouseIn(lyr.ref))return show();if(args[1])lightParent(args[1],0);if(child)child.hide();if(par&&par.child==this)par.child=null;if(lyr){visible=0;if(obj.onhide)obj.onhide(id);lyr.ref.parentNode.style.zIndex='1';setVis(0,forced)}}};FSMenuNode.prototype.lightParent=function(elm,lit){with(this)with(obj){if(!cssLitClass||isNS4)return;if(lit)elm.className+=(elm.className?' ':'')+cssLitClass;else elm.className=elm.className.replace(new RegExp('(\\s*'+cssLitClass+')+$'),'')}};FSMenuNode.prototype.setVis=function(sh,forced){with(this)with(obj){if(lyr.forced&&!forced)return;lyr.forced=forced;lyr.timer=lyr.timer||0;lyr.counter=lyr.counter||0;with(lyr){clearTimeout(timer);if(sh&&!counter)sty[cssProp]=cssVis;var speed=sh?animInSpeed:animOutSpeed;if(isDOM&&speed<1)for(var a=0;a<animations.length;a++)animations[a](ref,counter,sh);counter+=speed*(sh?1:-1);if(counter>1){counter=1;lyr.forced=false}else if(counter<0){counter=0;sty[cssProp]=cssHid;lyr.forced=false}else if(isDOM){timer=setTimeout(myName+'.menus["'+id+'"].setVis('+sh+','+forced+')',50)}}}};FSMenu.animSwipeDown=function(ref,counter,show){if(show&&(counter==0)){ref._fsm_styT=ref.style.top;ref._fsm_styMT=ref.style.marginTop;ref._fsm_offT=ref.offsetTop||0}var cP=Math.pow(Math.sin(Math.PI*counter/2),0.75);var clipY=ref.offsetHeight*(1-cP);ref.style.clip=(counter==1?((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto,auto,auto,auto)'):'rect('+clipY+'px,'+ref.offsetWidth+'px,'+ref.offsetHeight+'px,0)');if(counter==1||(counter<0.01&&!show)){ref.style.top=ref._fsm_styT;ref.style.marginTop=ref._fsm_styMT}else{ref.style.top=((0-clipY)+(ref._fsm_offT))+'px';ref.style.marginTop='0'}};FSMenu.animFade=function(ref,counter,show){var done=(counter==1);if(ref.filters){var alpha=!done?' alpha(opacity='+parseInt(counter*100)+')':'';if(ref.style.filter.indexOf("alpha")==-1)ref.style.filter+=alpha;else ref.style.filter=ref.style.filter.replace(/\s*alpha\([^\)]*\)/i,alpha)}else ref.style.opacity=ref.style.MozOpacity=counter/1.001};FSMenu.animClipDown=function(ref,counter,show){var cP=Math.pow(Math.sin(Math.PI*counter/2),0.75);ref.style.clip=(counter==1?((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto,auto,auto,auto)'):'rect(0,'+ref.offsetWidth+'px,'+(ref.offsetHeight*cP)+'px,0)')};FSMenu.prototype.activateMenu=function(id,subInd){with(this){if(!isDOM||!document.documentElement)return;var fsmFB=getRef('fsmenu-fallback');if(fsmFB){fsmFB.rel='alternate stylesheet';fsmFB.disabled=true}var a,ul,li,parUL,mRoot=getRef(id),nodes,count=1;var lists=mRoot.getElementsByTagName('ul');for(var i=0;i<lists.length;i++){li=ul=lists[i];while(li){if(li.nodeName.toLowerCase()=='li')break;li=li.parentNode}if(!li)continue;parUL=li;while(parUL){if(parUL.nodeName.toLowerCase()=='ul')break;parUL=parUL.parentNode}a=null;for(var j=0;j<li.childNodes.length;j++)if(li.childNodes[j].nodeName.toLowerCase()=='a')a=li.childNodes[j];if(!a)continue;var menuID=myName+'-id-'+count++;if(ul.id)menuID=ul.id;else ul.setAttribute('id',menuID);var sOC=(showOnClick==1&&li.parentNode==mRoot)||(showOnClick==2);var evtProp=navigator.userAgent.indexOf('Safari')>-1||isOp?'safRtnVal':'returnValue';var eShow=new Function('with('+myName+'){var m=menus["'+menuID+'"],pM=menus["'+parUL.id+'"];'+(sOC?'if((pM&&pM.child)||(m&&m.visible))':'')+' show("'+menuID+'",this)}');var eHide=new Function('e','if(e.'+evtProp+'!=false)'+myName+'.hide("'+menuID+'")');addEvent(a,'mouseover',eShow);addEvent(a,'focus',eShow);addEvent(a,'mouseout',eHide);addEvent(a,'blur',eHide);if(sOC)addEvent(a,'click',new Function('e',myName+'.show("'+menuID+'",this);if(e.cancelable&&e.preventDefault)e.preventDefault();e.'+evtProp+'=false;return false'));if(subInd)a.insertBefore(subInd.cloneNode(true),a.firstChild)}if(isIE&&!isOp){var aNodes=mRoot.getElementsByTagName('a');for(var i=0;i<aNodes.length;i++){addEvent(aNodes[i],'focus',new Function('e','var node=this.parentNode;while(node){if(node.onfocus)node.onfocus(e);node=node.parentNode}'));addEvent(aNodes[i],'blur',new Function('e','var node=this.parentNode;while(node){if(node.onblur)node.onblur(e);node=node.parentNode}'))}}if(hideOnClick)addEvent(mRoot,'click',new Function(myName+'.hideAll()'));menus[id]=new FSMenuNode(id,true,this)}};var page={win:self,minW:0,minH:0,MS:isIE&&!isOp,db:document.compatMode&&document.compatMode.indexOf('CSS')>-1?'documentElement':'body'};page.elmPos=function(e,p){var x=0,y=0,w=p?p:this.win;e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}if(e&&this.MS&&navigator.platform.indexOf('Mac')>-1&&e.tagName=='A'){e.onfocus=new Function('with(event){self.tmpX=clientX-offsetX;self.tmpY=clientY-offsetY}');e.focus();x=tmpX;y=tmpY;e.blur()}else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}return{x:x,y:y}};if(isNS4){var fsmMouseX,fsmMouseY,fsmOR=self.onresize,nsWinW=innerWidth,nsWinH=innerHeight;document.fsmMM=document.onmousemove;self.onresize=function(){if(fsmOR)fsmOR();if(nsWinW!=innerWidth||nsWinH!=innerHeight)location.reload()};document.captureEvents(Event.MOUSEMOVE);document.onmousemove=function(e){fsmMouseX=e.pageX;fsmMouseY=e.pageY;return document.fsmMM?document.fsmMM(e):document.routeEvent(e)};function isMouseIn(sty){with(sty)return((fsmMouseX>left)&&(fsmMouseX<left+clip.width)&&(fsmMouseY>top)&&(fsmMouseY<top+clip.height))}}
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/autocomplete/jquery.autocomplete-min.js b/javascript/libs/jquery/plugins/autocomplete/jquery.autocomplete-min.js deleted file mode 100644 index 7018fd0..0000000 --- a/javascript/libs/jquery/plugins/autocomplete/jquery.autocomplete-min.js +++ /dev/null @@ -1,11 +0,0 @@ -/**
-* Ajax Autocomplete for jQuery, version 1.1.3
-* (c) 2010 Tomas Kirda
-*
-* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
-* For details, see the web site: http://www.devbridge.com/projects/autocomplete/jquery/
-*
-* Last Review: 04/19/2010
-*/
-
-(function(d){function l(b,a,c){a="("+c.replace(m,"\\$1")+")";return b.replace(new RegExp(a,"gi"),"<strong>$1</strong>")}function i(b,a){this.el=d(b);this.el.attr("autocomplete","off");this.suggestions=[];this.data=[];this.badQueries=[];this.selectedIndex=-1;this.currentValue=this.el.val();this.intervalId=0;this.cachedResponse=[];this.onChangeInterval=null;this.ignoreValueChange=false;this.serviceUrl=a.serviceUrl;this.isLocal=false;this.options={autoSubmit:false,minChars:1,maxHeight:300,deferRequestBy:0, width:0,highlight:true,params:{},fnFormatResult:l,delimiter:null,zIndex:9999};this.initialize();this.setOptions(a)}var m=new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g");d.fn.autocomplete=function(b){return new i(this.get(0)||d("<input />"),b)};i.prototype={killerFn:null,initialize:function(){var b,a,c;b=this;a=Math.floor(Math.random()*1048576).toString(16);c="Autocomplete_"+a;this.killerFn=function(e){if(d(e.target).parents(".autocomplete").size()===0){b.killSuggestions(); b.disableKillerFn()}};if(!this.options.width)this.options.width=this.el.width();this.mainContainerId="AutocompleteContainter_"+a;d('<div id="'+this.mainContainerId+'" style="position:absolute;z-index:9999;"><div class="autocomplete-w1"><div class="autocomplete" id="'+c+'" style="display:none; width:300px;"></div></div></div>').appendTo("body");this.container=d("#"+c);this.fixPosition();window.opera?this.el.keypress(function(e){b.onKeyPress(e)}):this.el.keydown(function(e){b.onKeyPress(e)});this.el.keyup(function(e){b.onKeyUp(e)}); this.el.blur(function(){b.enableKillerFn()});this.el.focus(function(){b.fixPosition()})},setOptions:function(b){var a=this.options;d.extend(a,b);if(a.lookup){this.isLocal=true;if(d.isArray(a.lookup))a.lookup={suggestions:a.lookup,data:[]}}d("#"+this.mainContainerId).css({zIndex:a.zIndex});this.container.css({maxHeight:a.maxHeight+"px",width:a.width})},clearCache:function(){this.cachedResponse=[];this.badQueries=[]},disable:function(){this.disabled=true},enable:function(){this.disabled=false},fixPosition:function(){var b= this.el.offset();d("#"+this.mainContainerId).css({top:b.top+this.el.innerHeight()+"px",left:b.left+"px"})},enableKillerFn:function(){d(document).bind("click",this.killerFn)},disableKillerFn:function(){d(document).unbind("click",this.killerFn)},killSuggestions:function(){var b=this;this.stopKillSuggestions();this.intervalId=window.setInterval(function(){b.hide();b.stopKillSuggestions()},300)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},onKeyPress:function(b){if(!(this.disabled|| !this.enabled)){switch(b.keyCode){case 27:this.el.val(this.currentValue);this.hide();break;case 9:case 13:if(this.selectedIndex===-1){this.hide();return}this.select(this.selectedIndex);if(b.keyCode===9)return;break;case 38:this.moveUp();break;case 40:this.moveDown();break;default:return}b.stopImmediatePropagation();b.preventDefault()}},onKeyUp:function(b){if(!this.disabled){switch(b.keyCode){case 38:case 40:return}clearInterval(this.onChangeInterval);if(this.currentValue!==this.el.val())if(this.options.deferRequestBy> 0){var a=this;this.onChangeInterval=setInterval(function(){a.onValueChange()},this.options.deferRequestBy)}else this.onValueChange()}},onValueChange:function(){clearInterval(this.onChangeInterval);this.currentValue=this.el.val();var b=this.getQuery(this.currentValue);this.selectedIndex=-1;if(this.ignoreValueChange)this.ignoreValueChange=false;else b===""||b.length<this.options.minChars?this.hide():this.getSuggestions(b)},getQuery:function(b){var a;a=this.options.delimiter;if(!a)return d.trim(b);b= b.split(a);return d.trim(b[b.length-1])},getSuggestionsLocal:function(b){var a,c,e,g,f;c=this.options.lookup;e=c.suggestions.length;a={suggestions:[],data:[]};b=b.toLowerCase();for(f=0;f<e;f++){g=c.suggestions[f];if(g.toLowerCase().indexOf(b)===0){a.suggestions.push(g);a.data.push(c.data[f])}}return a},getSuggestions:function(b){var a,c;if((a=this.isLocal?this.getSuggestionsLocal(b):this.cachedResponse[b])&&d.isArray(a.suggestions)){this.suggestions=a.suggestions;this.data=a.data;this.suggest()}else if(!this.isBadQuery(b)){c= this;c.options.params.query=b;d.get(this.serviceUrl,c.options.params,function(e){c.processResponse(e)},"text")}},isBadQuery:function(b){for(var a=this.badQueries.length;a--;)if(b.indexOf(this.badQueries[a])===0)return true;return false},hide:function(){this.enabled=false;this.selectedIndex=-1;this.container.hide()},suggest:function(){if(this.suggestions.length===0)this.hide();else{var b,a,c,e,g,f,j,k;b=this;a=this.suggestions.length;e=this.options.fnFormatResult;g=this.getQuery(this.currentValue); j=function(h){return function(){b.activate(h)}};k=function(h){return function(){b.select(h)}};this.container.hide().empty();for(f=0;f<a;f++){c=this.suggestions[f];c=d((b.selectedIndex===f?'<div class="selected"':"<div")+' title="'+c+'">'+e(c,this.data[f],g)+"</div>");c.mouseover(j(f));c.click(k(f));this.container.append(c)}this.enabled=true;this.container.show()}},processResponse:function(b){var a;try{a=eval("("+b+")")}catch(c){return}if(!d.isArray(a.data))a.data=[];if(!this.options.noCache){this.cachedResponse[a.query]= a;a.suggestions.length===0&&this.badQueries.push(a.query)}if(a.query===this.getQuery(this.currentValue)){this.suggestions=a.suggestions;this.data=a.data;this.suggest()}},activate:function(b){var a,c;a=this.container.children();this.selectedIndex!==-1&&a.length>this.selectedIndex&&d(a.get(this.selectedIndex)).removeClass();this.selectedIndex=b;if(this.selectedIndex!==-1&&a.length>this.selectedIndex){c=a.get(this.selectedIndex);d(c).addClass("selected")}return c},deactivate:function(b,a){b.className= "";if(this.selectedIndex===a)this.selectedIndex=-1},select:function(b){var a;if(a=this.suggestions[b]){this.el.val(a);if(this.options.autoSubmit){a=this.el.parents("form");a.length>0&&a.get(0).submit()}this.ignoreValueChange=true;this.hide();this.onSelect(b)}},moveUp:function(){if(this.selectedIndex!==-1)if(this.selectedIndex===0){this.container.children().get(0).className="";this.selectedIndex=-1;this.el.val(this.currentValue)}else this.adjustScroll(this.selectedIndex-1)},moveDown:function(){this.selectedIndex!== this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(b){var a,c,e;a=this.activate(b).offsetTop;c=this.container.scrollTop();e=c+this.options.maxHeight-25;if(a<c)this.container.scrollTop(a);else a>e&&this.container.scrollTop(a-this.options.maxHeight+25);this.el.val(this.getValue(this.suggestions[b]))},onSelect:function(b){var a,c;a=this.options.onSelect;c=this.suggestions[b];b=this.data[b];this.el.val(this.getValue(c));d.isFunction(a)&&a(c,b,this.el)},getValue:function(b){var a, c;a=this.options.delimiter;if(!a)return b;c=this.currentValue;a=c.split(a);if(a.length===1)return b;return c.substr(0,c.length-a[a.length-1].length)+b}}})(jQuery);
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/autocomplete/jquery.autocomplete.js b/javascript/libs/jquery/plugins/autocomplete/jquery.autocomplete.js deleted file mode 100644 index 6a7ce87..0000000 --- a/javascript/libs/jquery/plugins/autocomplete/jquery.autocomplete.js +++ /dev/null @@ -1,390 +0,0 @@ -/**
-* Ajax Autocomplete for jQuery, version 1.1.3
-* (c) 2010 Tomas Kirda
-*
-* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
-* For details, see the web site: http://www.devbridge.com/projects/autocomplete/jquery/
-*
-* Last Review: 04/19/2010
-*/
-
-/*jslint onevar: true, evil: true, nomen: true, eqeqeq: true, bitwise: true, regexp: true, newcap: true, immed: true */
-/*global window: true, document: true, clearInterval: true, setInterval: true, jQuery: true */
-
-(function($) {
-
- var reEscape = new RegExp('(\\' + ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'].join('|\\') + ')', 'g');
-
- function fnFormatResult(value, data, currentValue) {
- var pattern = '(' + currentValue.replace(reEscape, '\\$1') + ')';
- return value.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
- }
-
- function Autocomplete(el, options) {
- this.el = $(el);
- this.el.attr('autocomplete', 'off');
- this.suggestions = [];
- this.data = [];
- this.badQueries = [];
- this.selectedIndex = -1;
- this.currentValue = this.el.val();
- this.intervalId = 0;
- this.cachedResponse = [];
- this.onChangeInterval = null;
- this.ignoreValueChange = false;
- this.serviceUrl = options.serviceUrl;
- this.isLocal = false;
- this.options = {
- autoSubmit: false,
- minChars: 1,
- maxHeight: 300,
- deferRequestBy: 0,
- width: 0,
- highlight: true,
- params: {},
- fnFormatResult: fnFormatResult,
- delimiter: null,
- zIndex: 9999
- };
- this.initialize();
- this.setOptions(options);
- }
-
- $.fn.autocomplete = function(options) {
- return new Autocomplete(this.get(0)||$('<input />'), options);
- };
-
-
- Autocomplete.prototype = {
-
- killerFn: null,
-
- initialize: function() {
-
- var me, uid, autocompleteElId;
- me = this;
- uid = Math.floor(Math.random()*0x100000).toString(16);
- autocompleteElId = 'Autocomplete_' + uid;
-
- this.killerFn = function(e) {
- if ($(e.target).parents('.autocomplete').size() === 0) {
- me.killSuggestions();
- me.disableKillerFn();
- }
- };
-
- if (!this.options.width) { this.options.width = this.el.width(); }
- this.mainContainerId = 'AutocompleteContainter_' + uid;
-
- $('<div id="' + this.mainContainerId + '" style="position:absolute;z-index:9999;"><div class="autocomplete-w1"><div class="autocomplete" id="' + autocompleteElId + '" style="display:none; width:300px;"></div></div></div>').appendTo('body');
-
- this.container = $('#' + autocompleteElId);
- this.fixPosition();
- if (window.opera) {
- this.el.keypress(function(e) { me.onKeyPress(e); });
- } else {
- this.el.keydown(function(e) { me.onKeyPress(e); });
- }
- this.el.keyup(function(e) { me.onKeyUp(e); });
- this.el.blur(function() { me.enableKillerFn(); });
- this.el.focus(function() { me.fixPosition(); });
- },
-
- setOptions: function(options){
- var o = this.options;
- $.extend(o, options);
- if(o.lookup){
- this.isLocal = true;
- if($.isArray(o.lookup)){ o.lookup = { suggestions:o.lookup, data:[] }; }
- }
- $('#'+this.mainContainerId).css({ zIndex:o.zIndex });
- this.container.css({ maxHeight: o.maxHeight + 'px', width:o.width });
- },
-
- clearCache: function(){
- this.cachedResponse = [];
- this.badQueries = [];
- },
-
- disable: function(){
- this.disabled = true;
- },
-
- enable: function(){
- this.disabled = false;
- },
-
- fixPosition: function() {
- var offset = this.el.offset();
- $('#' + this.mainContainerId).css({ top: (offset.top + this.el.innerHeight()) + 'px', left: offset.left + 'px' });
- },
-
- enableKillerFn: function() {
- var me = this;
- $(document).bind('click', me.killerFn);
- },
-
- disableKillerFn: function() {
- var me = this;
- $(document).unbind('click', me.killerFn);
- },
-
- killSuggestions: function() {
- var me = this;
- this.stopKillSuggestions();
- this.intervalId = window.setInterval(function() { me.hide(); me.stopKillSuggestions(); }, 300);
- },
-
- stopKillSuggestions: function() {
- window.clearInterval(this.intervalId);
- },
-
- onKeyPress: function(e) {
- if (this.disabled || !this.enabled) { return; }
- // return will exit the function
- // and event will not be prevented
- switch (e.keyCode) {
- case 27: //KEY_ESC:
- this.el.val(this.currentValue);
- this.hide();
- break;
- case 9: //KEY_TAB:
- case 13: //KEY_RETURN:
- if (this.selectedIndex === -1) {
- this.hide();
- return;
- }
- this.select(this.selectedIndex);
- if(e.keyCode === 9){ return; }
- break;
- case 38: //KEY_UP:
- this.moveUp();
- break;
- case 40: //KEY_DOWN:
- this.moveDown();
- break;
- default:
- return;
- }
- e.stopImmediatePropagation();
- e.preventDefault();
- },
-
- onKeyUp: function(e) {
- if(this.disabled){ return; }
- switch (e.keyCode) {
- case 38: //KEY_UP:
- case 40: //KEY_DOWN:
- return;
- }
- clearInterval(this.onChangeInterval);
- if (this.currentValue !== this.el.val()) {
- if (this.options.deferRequestBy > 0) {
- // Defer lookup in case when value changes very quickly:
- var me = this;
- this.onChangeInterval = setInterval(function() { me.onValueChange(); }, this.options.deferRequestBy);
- } else {
- this.onValueChange();
- }
- }
- },
-
- onValueChange: function() {
- clearInterval(this.onChangeInterval);
- this.currentValue = this.el.val();
- var q = this.getQuery(this.currentValue);
- this.selectedIndex = -1;
- if (this.ignoreValueChange) {
- this.ignoreValueChange = false;
- return;
- }
- if (q === '' || q.length < this.options.minChars) {
- this.hide();
- } else {
- this.getSuggestions(q);
- }
- },
-
- getQuery: function(val) {
- var d, arr;
- d = this.options.delimiter;
- if (!d) { return $.trim(val); }
- arr = val.split(d);
- return $.trim(arr[arr.length - 1]);
- },
-
- getSuggestionsLocal: function(q) {
- var ret, arr, len, val, i;
- arr = this.options.lookup;
- len = arr.suggestions.length;
- ret = { suggestions:[], data:[] };
- q = q.toLowerCase();
- for(i=0; i< len; i++){
- val = arr.suggestions[i];
- if(val.toLowerCase().indexOf(q) === 0){
- ret.suggestions.push(val);
- ret.data.push(arr.data[i]);
- }
- }
- return ret;
- },
-
- getSuggestions: function(q) {
- var cr, me;
- cr = this.isLocal ? this.getSuggestionsLocal(q) : this.cachedResponse[q];
- if (cr && $.isArray(cr.suggestions)) {
- this.suggestions = cr.suggestions;
- this.data = cr.data;
- this.suggest();
- } else if (!this.isBadQuery(q)) {
- me = this;
- me.options.params.query = q;
- $.get(this.serviceUrl, me.options.params, function(txt) { me.processResponse(txt); }, 'text');
- }
- },
-
- isBadQuery: function(q) {
- var i = this.badQueries.length;
- while (i--) {
- if (q.indexOf(this.badQueries[i]) === 0) { return true; }
- }
- return false;
- },
-
- hide: function() {
- this.enabled = false;
- this.selectedIndex = -1;
- this.container.hide();
- },
-
- suggest: function() {
- if (this.suggestions.length === 0) {
- this.hide();
- return;
- }
-
- var me, len, div, f, v, i, s, mOver, mClick;
- me = this;
- len = this.suggestions.length;
- f = this.options.fnFormatResult;
- v = this.getQuery(this.currentValue);
- mOver = function(xi) { return function() { me.activate(xi); }; };
- mClick = function(xi) { return function() { me.select(xi); }; };
- this.container.hide().empty();
- for (i = 0; i < len; i++) {
- s = this.suggestions[i];
- div = $((me.selectedIndex === i ? '<div class="selected"' : '<div') + ' title="' + s + '">' + f(s, this.data[i], v) + '</div>');
- div.mouseover(mOver(i));
- div.click(mClick(i));
- this.container.append(div);
- }
- this.enabled = true;
- this.container.show();
- },
-
- processResponse: function(text) {
- var response;
- try {
- response = eval('(' + text + ')');
- } catch (err) { return; }
- if (!$.isArray(response.data)) { response.data = []; }
- if(!this.options.noCache){
- this.cachedResponse[response.query] = response;
- if (response.suggestions.length === 0) { this.badQueries.push(response.query); }
- }
- if (response.query === this.getQuery(this.currentValue)) {
- this.suggestions = response.suggestions;
- this.data = response.data;
- this.suggest();
- }
- },
-
- activate: function(index) {
- var divs, activeItem;
- divs = this.container.children();
- // Clear previous selection:
- if (this.selectedIndex !== -1 && divs.length > this.selectedIndex) {
- $(divs.get(this.selectedIndex)).removeClass();
- }
- this.selectedIndex = index;
- if (this.selectedIndex !== -1 && divs.length > this.selectedIndex) {
- activeItem = divs.get(this.selectedIndex);
- $(activeItem).addClass('selected');
- }
- return activeItem;
- },
-
- deactivate: function(div, index) {
- div.className = '';
- if (this.selectedIndex === index) { this.selectedIndex = -1; }
- },
-
- select: function(i) {
- var selectedValue, f;
- selectedValue = this.suggestions[i];
- if (selectedValue) {
- this.el.val(selectedValue);
- if (this.options.autoSubmit) {
- f = this.el.parents('form');
- if (f.length > 0) { f.get(0).submit(); }
- }
- this.ignoreValueChange = true;
- this.hide();
- this.onSelect(i);
- }
- },
-
- moveUp: function() {
- if (this.selectedIndex === -1) { return; }
- if (this.selectedIndex === 0) {
- this.container.children().get(0).className = '';
- this.selectedIndex = -1;
- this.el.val(this.currentValue);
- return;
- }
- this.adjustScroll(this.selectedIndex - 1);
- },
-
- moveDown: function() {
- if (this.selectedIndex === (this.suggestions.length - 1)) { return; }
- this.adjustScroll(this.selectedIndex + 1);
- },
-
- adjustScroll: function(i) {
- var activeItem, offsetTop, upperBound, lowerBound;
- activeItem = this.activate(i);
- offsetTop = activeItem.offsetTop;
- upperBound = this.container.scrollTop();
- lowerBound = upperBound + this.options.maxHeight - 25;
- if (offsetTop < upperBound) {
- this.container.scrollTop(offsetTop);
- } else if (offsetTop > lowerBound) {
- this.container.scrollTop(offsetTop - this.options.maxHeight + 25);
- }
- this.el.val(this.getValue(this.suggestions[i]));
- },
-
- onSelect: function(i) {
- var me, fn, s, d;
- me = this;
- fn = me.options.onSelect;
- s = me.suggestions[i];
- d = me.data[i];
- me.el.val(me.getValue(s));
- if ($.isFunction(fn)) { fn(s, d, me.el); }
- },
-
- getValue: function(value){
- var del, currVal, arr, me;
- me = this;
- del = me.options.delimiter;
- if (!del) { return value; }
- currVal = me.currentValue;
- arr = currVal.split(del);
- if (arr.length === 1) { return value; }
- return currVal.substr(0, currVal.length - arr[arr.length - 1].length) + value;
- }
-
- };
-
-}(jQuery));
diff --git a/javascript/libs/jquery/plugins/autocomplete/shadow.png b/javascript/libs/jquery/plugins/autocomplete/shadow.png Binary files differdeleted file mode 100644 index a2561df..0000000 --- a/javascript/libs/jquery/plugins/autocomplete/shadow.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/autocomplete/styles.css b/javascript/libs/jquery/plugins/autocomplete/styles.css deleted file mode 100644 index dd9f97e..0000000 --- a/javascript/libs/jquery/plugins/autocomplete/styles.css +++ /dev/null @@ -1,6 +0,0 @@ - -.autocomplete-w1 { background:url(img/shadow.png) no-repeat bottom right; position:absolute; top:0px; left:0px; margin:8px 0 0 6px; /* IE6 fix: */ _background:none; _margin:0; } -.autocomplete { border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px; _margin:0; _overflow-x:hidden; } -.autocomplete .selected { background:#F0F0F0; } -.autocomplete div { padding:2px 5px; white-space:nowrap; } -.autocomplete strong { font-weight:normal; color:#3399FF; } diff --git a/javascript/libs/jquery/plugins/cm_pageflip/pageflip.js b/javascript/libs/jquery/plugins/cm_pageflip/pageflip.js deleted file mode 100644 index 5087d87..0000000 --- a/javascript/libs/jquery/plugins/cm_pageflip/pageflip.js +++ /dev/null @@ -1,380 +0,0 @@ -/* -Javascript Pageflip v0.2 by Charles Mangin (http://option8.com) - - -Creative Commons License: - -Javascript Pageflip v0.2 by Charles Mangin is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License. - -You are free: - -to Share — to copy, distribute, display, and perform the work -to Remix — to make derivative works - -Under the following conditions: - -Attribution. You must attribute this work to Charles Mangin ( with link: http://option8.com ). - - -Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, -similar or a compatible license. - -For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is -with a link to this web page: http://creativecommons.org/licenses/by-sa/3.0/us/ - -Any of the above conditions can be waived if you get permission from the copyright holder. - -Apart from the remix rights granted under this license, nothing in this license impairs or restricts the author's moral rights. - -*/ - -/** - * Modifications performed 06.11.10: - * - In pageLayout(), pageWidth and pageHeight are now set to the current values of .pageimage class - * to enable dynamic resizing of pages - * - Sixth page added to allow visibility thorough 2 consecutive pages with transparent elements. - * - Initialize function changed to be called manually as opposed to window.onload() - * - Add optional parameter to flipForward and flipBack to pass in callback function for when flipping is complete. - * - Add variables to store callback functions for flipForward and flipBack - * @author Brian Stegmann - */ - -//Variables to hold callback functions for flipForward and FlipBack -var onFlipForwardFinish; -var onFlipBackFinish; - -/* set up variables */ - -var imageArray = new Array(); - - -// display page l/r. next spread l/r. previous spread l/r. -var pageN1, page0, page1, page2, page3, page4, page6; - - -// img tags within each page hold the contents -var pageN1img, page0img, page1img, page2img, page3img, page4img, page6img;; - -// originally worked with bg images, but now the bg is shadow -var pageIndex = 0; // initial starting page - -var page1image = new Image(); // Create new Image object -var page2image = new Image(); // Create new Image object - -// next LEFT page -var page3image = new Image(); // Create new Image object -var page3OriginX; // page 3 starting position -var page3x; // page 3 current position -var page3DeltaX; // frame-to-frame diff in page 3 x value -// next RIGHT page -var page4image = new Image(); // Create new Image object - -// previous RIGHT page -var page0image = new Image(); // Create new Image object -var page0OriginX; // page 0 starting position -var page0x; -var page0DeltaX; // frame-to-frame diff in page 3 x value -// previous LEFT page -var pageN1image = new Image(); // Create new Image object - -//second next RIGHT page -var page6image = new Image(); - -// timer -var currentStep, totalSteps; - - -var pageWidth, page2Width, page3Width, page4Width, page6Width, page1Width, page0Width; -var pageHeight; - - -var page3TargetX; // page 3 aims for 0px -var page0TargetX; // page 0 aims for pagewidth px - -// the div that holds it all -var pagesContainer; - -// animating on/off -var flipping; - - -function pageLayout() { - -// console.log("doing layout"); - - - page1image.src = imageArray[pageIndex].src; // Set source path - page1img = document.getElementById('page1img'); - page1img.src = page1image.src ; - - if(typeof(imageArray[pageIndex+1]) != "undefined") { - page2image.src = imageArray[pageIndex+1].src; // Set source path - page2img = document.getElementById('page2img'); - page2img.src = page2image.src ; - } - - if(typeof(imageArray[pageIndex+2]) != "undefined") { - page3image.src = imageArray[pageIndex+2].src; // Set source path - page3img = document.getElementById('page3img'); - page3img.src = page3image.src ; - } - if(typeof(imageArray[pageIndex+3]) != "undefined") { - page4image.src = imageArray[pageIndex+3].src; // Set source path - page4img = document.getElementById('page4img'); - page4img.src = page4image.src ; - } - if(typeof(imageArray[pageIndex+5]) != "undefined") { - page6image.src = imageArray[pageIndex+5].src; // Set source path - page6img = document.getElementById('page6img'); - page6img.src = page6image.src ; - } - if(typeof(imageArray[pageIndex-1]) != "undefined") { - page0image.src = imageArray[pageIndex-1].src; // Set source path - page0img = document.getElementById('page0img'); - page0img.src = page0image.src ; - } - if(typeof(imageArray[pageIndex-2]) != "undefined") { - pageN1image.src = imageArray[pageIndex-2].src; // Set source path - pageN1img = document.getElementById('pageN1img'); - pageN1img.src = pageN1image.src ; - } - -// set the page width all the pages key off. if image1 is an odd size, choose a different one to key - //pageWidth = page1image.width; - //pageHeight = page1image.height; - - pageWidth = $('.pageimage').width(); - pageHeight = $('.pageimage').height(); - -// console.log("page width = " + page1img.width); - - -// set up pages - page1 = document.getElementById('page1'); - - - page2 = document.getElementById('page2'); - page3 = document.getElementById('page3'); - page4 = document.getElementById('page4'); - - page6 = document.getElementById('page6'); - - page0 = document.getElementById('page0'); - pageN1 = document.getElementById('pageN1'); - -// uniform height/width for the page DIVs - page0.style.height = pageN1.style.height = page1.style.height = page2.style.height = - page3.style.height = page4.style.height = page6.style.height = (pageHeight+2) + "px"; - - - page0.style.width = pageN1.style.width = page1.style.width = page2.style.width = - page3.style.width = page4.style.width = page6.style.width = (pageWidth+2) + "px"; - - - page0Width = pageWidth; - page2Width = pageWidth; - -// set the next/previous pages up for their animations - page2.style.left = page4.style.left = page6.style.left = pageWidth + "px"; - page0.style.left = 0 + "px"; - page1.style.left = 0 + "px"; - - page3TargetX = 0; - page0TargetX = pageWidth; - - - -// initial position for page 3 - flip forward - page3OriginX = pageWidth * 2; - page3.style.left = pageWidth * 2 + "px"; - page3Width = 0; - page3.style.width = page3Width + "px"; - -// initial position for page 0 - flip back - page0OriginX = 0; - page0.style.left = 0 + "px"; - page0Width = 0; - page0.style.width = page0Width + "px"; - - -// set up next page flip - currentStep = 1; - totalSteps = flipTime/smoothness; - - // start out the page3 canvas at start position - page3x = 2 * pageWidth; - page0x = 0; - -// hide the previous pages - page0.style.display = "none"; - pageN1.style.display = "none"; - -// clicky cursor - if(typeof(imageArray[pageIndex]) != "undefined") { - page1.style.cursor="hand"; - } else { - page1.style.cursor="default"; - } - - if(typeof(imageArray[pageIndex+1]) != "undefined") { - page2.style.cursor="hand"; - } else { - page2.style.cursor="default"; - } - - // ready to go... - flipping = false; - -} - - -function flipForward() { - -// linear - //page3DeltaX = (page3TargetX-page3OriginX)/totalSteps; // distance per step - //page3x += page3DeltaX; - - page3OldX = page3x; - -// ease out -// page3x = page3OriginX + (Math.sin( (currentStep/totalSteps) * (Math.PI/2) ) * (page3TargetX-page3OriginX) ); - -// ease in/out - page3x = ((1 + Math.cos( (currentStep/totalSteps) * (Math.PI) ))/2) * (page3OriginX - page3TargetX); - - page3DeltaX = page3x - page3OldX; - - // shadow - page3ShadowWidth = -4 * page3DeltaX; - page3.style.paddingLeft = page3ShadowWidth + "px" - - page3.style.left = page3x - page3ShadowWidth + "px"; - - page2Width += page3DeltaX; - - if(page2Width > 0) { // surprise, IE doesn't like negative width - page2.style.width = Math.floor(page2Width) + "px"; - } else { - page2Width = 0; - page2.style.width = Math.floor(page2Width) + "px"; - } - page3Width -= page3DeltaX/2; - page3.style.width = Math.floor(page3Width) + "px"; - - if(currentStep == totalSteps){ - clearInterval(nextPageFlip); - pageIndex += 2; - pageLayout(); - if(onFlipForwardFinish != null) { - onFlipForwardFinish(); - } - } - - currentStep ++; - -} - -/** - * Function to initiate forward flip. - * - * @param flipForwardOnComplete function - */ -function nextPage( flipForwardOnComplete ) { - - onFlipForwardFinish = flipForwardOnComplete; - - if((typeof(imageArray[pageIndex+2]) != "undefined") && (flipping == false) ){ - nextPageFlip = setInterval(flipForward,smoothness); - flipping = true; - } -} - - -function flipBack() { - - page0.style.display = "block"; - pageN1.style.display = "block"; - - - page0OldX = page0x; - - -// ease in/out - page0x = page0OriginX + ((1 - Math.cos( (currentStep/totalSteps) * (Math.PI) ))/2) * (page0TargetX - page0OriginX); - - page0DeltaX = page0x - page0OldX; - - - page0.style.left = page0x + "px"; - page1.style.left = page0x + "px"; - - // move contents over to pretend we're cropping from the left - page0.style.textIndent = -1 * pageWidth + page0x + "px"; - -// grow the -1 page to match the movement of page 0 - pageN1.style.width = page0x + "px"; - -//shrink page 1 to match movement of page 0 - page1Width = page1.style.width.replace('px', ''); - - - page1Width -= page0DeltaX; - if(page1Width < 0) { - page1Width = 0; - } - - page1.style.width = page1Width + 'px'; - page1img.style.width = page1Width + 'px'; - - page0Width += page0DeltaX; - - // shadow - page0ShadowWidth = 4 * page0DeltaX; - page0.style.paddingRight = page0ShadowWidth + "px" - - page0.style.width = Math.floor(page0Width) + page0ShadowWidth + "px"; - - - if(currentStep == totalSteps){ - clearInterval(nextPageFlip); - pageIndex -= 2; - page1img.style.width = pageWidth + 'px'; - pageLayout(); - if(onFlipBackFinish != null) { - onFlipBackFinish(); - } - } - - currentStep ++; - -} - -/** - * Function to initiate back flip. - * - * @param flipForwardOnComplete function - */ -function previousPage( flipBackOnComplete ) { - - onFlipBackFinish = flipBackOnComplete; - - if( (typeof(imageArray[pageIndex-1]) != "undefined") && (flipping == false)){ - nextPageFlip = setInterval(flipBack,smoothness); - flipping = true; - } -} - - -function pageFlipInitialize() { - -// console.log("ready"); - -// build the image array from jquery -imageArray = $(".pageimage"); - -//console.log(imageArray[0].src); - - pageLayout(); - -}; -// window ready diff --git a/javascript/libs/jquery/plugins/colorbox/colorbox.css b/javascript/libs/jquery/plugins/colorbox/colorbox.css deleted file mode 100644 index 1dedd90..0000000 --- a/javascript/libs/jquery/plugins/colorbox/colorbox.css +++ /dev/null @@ -1,69 +0,0 @@ -/* - Colorbox Core Style: - The following CSS is consistent between example themes and should not be altered. -*/ -#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} -#cboxOverlay{position:fixed; width:100%; height:100%;} -#cboxMiddleLeft, #cboxBottomLeft{clear:left;} -#cboxContent{position:relative;} -#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} -#cboxTitle{margin:0;} -#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} -#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} -.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;} -.cboxIframe{width:100%; height:100%; display:block; border:0;} -#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} - -/* - User Style: - Change the following styles to modify the appearance of Colorbox. They are - ordered & tabbed in a way that represents the nesting of the generated HTML. -*/ -#cboxOverlay{background:url(images/overlay.png) repeat 0 0;} -#colorbox{outline:0;} - #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px 0;} - #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px 0;} - #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px -29px;} - #cboxBottomRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px -29px;} - #cboxMiddleLeft{width:21px; background:url(images/controls.png) left top repeat-y;} - #cboxMiddleRight{width:21px; background:url(images/controls.png) right top repeat-y;} - #cboxTopCenter{height:21px; background:url(images/border.png) 0 0 repeat-x;} - #cboxBottomCenter{height:21px; background:url(images/border.png) 0 -29px repeat-x;} - #cboxContent{background:#fff; overflow:hidden;} - .cboxIframe{background:#fff;} - #cboxError{padding:50px; border:1px solid #ccc;} - #cboxLoadedContent{margin-bottom:28px;} - #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;} - #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;} - #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;} - #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} - - /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ - #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; } - - /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ - #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} - - #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;} - #cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;} - #cboxPrevious:hover{background-position:-75px -25px;} - #cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;} - #cboxNext:hover{background-position:-50px -25px;} - #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;} - #cboxClose:hover{background-position:-25px -25px;} - -/* - The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill - when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9. - See: http://jacklmoore.com/notes/ie-transparency-problems/ -*/ -.cboxIE #cboxTopLeft, -.cboxIE #cboxTopCenter, -.cboxIE #cboxTopRight, -.cboxIE #cboxBottomLeft, -.cboxIE #cboxBottomCenter, -.cboxIE #cboxBottomRight, -.cboxIE #cboxMiddleLeft, -.cboxIE #cboxMiddleRight { - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); -}
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/colorbox/images/border.png b/javascript/libs/jquery/plugins/colorbox/images/border.png Binary files differdeleted file mode 100644 index f463a10..0000000 --- a/javascript/libs/jquery/plugins/colorbox/images/border.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorbox/images/controls.png b/javascript/libs/jquery/plugins/colorbox/images/controls.png Binary files differdeleted file mode 100644 index dcfd6fb..0000000 --- a/javascript/libs/jquery/plugins/colorbox/images/controls.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorbox/images/loading.gif b/javascript/libs/jquery/plugins/colorbox/images/loading.gif Binary files differdeleted file mode 100644 index b4695d8..0000000 --- a/javascript/libs/jquery/plugins/colorbox/images/loading.gif +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorbox/images/loading_background.png b/javascript/libs/jquery/plugins/colorbox/images/loading_background.png Binary files differdeleted file mode 100644 index 6ae83e6..0000000 --- a/javascript/libs/jquery/plugins/colorbox/images/loading_background.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorbox/images/overlay.png b/javascript/libs/jquery/plugins/colorbox/images/overlay.png Binary files differdeleted file mode 100644 index 53ea98f..0000000 --- a/javascript/libs/jquery/plugins/colorbox/images/overlay.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorbox/jquery.colorbox-min.js b/javascript/libs/jquery/plugins/colorbox/jquery.colorbox-min.js deleted file mode 100644 index 230da8f..0000000 --- a/javascript/libs/jquery/plugins/colorbox/jquery.colorbox-min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - Colorbox v1.4.27 - 2013-07-16 - jQuery lightbox and modal window plugin - (c) 2013 Jack Moore - http://www.jacklmoore.com/colorbox - license: http://www.opensource.org/licenses/mit-license.php -*/ -(function(t,e,i){function o(i,o,n){var r=e.createElement(i);return o&&(r.id=te+o),n&&(r.style.cssText=n),t(r)}function n(){return i.innerHeight?i.innerHeight:t(i).height()}function r(t){var e=E.length,i=(j+t)%e;return 0>i?e+i:i}function l(t,e){return Math.round((/%/.test(t)?("x"===e?H.width():n())/100:1)*parseInt(t,10))}function h(t,e){return t.photo||t.photoRegex.test(e)}function s(t,e){return t.retinaUrl&&i.devicePixelRatio>1?e.replace(t.photoRegex,t.retinaSuffix):e}function a(t){"contains"in v[0]&&!v[0].contains(t.target)&&(t.stopPropagation(),v.focus())}function d(){var e,i=t.data(A,Z);null==i?(O=t.extend({},Y),console&&console.log&&console.log("Error: cboxElement missing settings object")):O=t.extend({},i);for(e in O)t.isFunction(O[e])&&"on"!==e.slice(0,2)&&(O[e]=O[e].call(A));O.rel=O.rel||A.rel||t(A).data("rel")||"nofollow",O.href=O.href||t(A).attr("href"),O.title=O.title||A.title,"string"==typeof O.href&&(O.href=t.trim(O.href))}function c(i,o){t(e).trigger(i),se.trigger(i),t.isFunction(o)&&o.call(A)}function u(){var t,e,i,o,n,r=te+"Slideshow_",l="click."+te;O.slideshow&&E[1]?(e=function(){clearTimeout(t)},i=function(){(O.loop||E[j+1])&&(t=setTimeout(J.next,O.slideshowSpeed))},o=function(){R.html(O.slideshowStop).unbind(l).one(l,n),se.bind(ne,i).bind(oe,e).bind(re,n),v.removeClass(r+"off").addClass(r+"on")},n=function(){e(),se.unbind(ne,i).unbind(oe,e).unbind(re,n),R.html(O.slideshowStart).unbind(l).one(l,function(){J.next(),o()}),v.removeClass(r+"on").addClass(r+"off")},O.slideshowAuto?o():n()):v.removeClass(r+"off "+r+"on")}function p(i){G||(A=i,d(),E=t(A),j=0,"nofollow"!==O.rel&&(E=t("."+ee).filter(function(){var e,i=t.data(this,Z);return i&&(e=t(this).data("rel")||i.rel||this.rel),e===O.rel}),j=E.index(A),-1===j&&(E=E.add(A),j=E.length-1)),g.css({opacity:parseFloat(O.opacity),cursor:O.overlayClose?"pointer":"auto",visibility:"visible"}).show(),V&&v.add(g).removeClass(V),O.className&&v.add(g).addClass(O.className),V=O.className,O.closeButton?P.html(O.close).appendTo(x):P.appendTo("<div/>"),$||($=q=!0,v.css({visibility:"hidden",display:"block"}),W=o(ae,"LoadedContent","width:0; height:0; overflow:hidden"),x.css({width:"",height:""}).append(W),_=b.height()+k.height()+x.outerHeight(!0)-x.height(),D=T.width()+C.width()+x.outerWidth(!0)-x.width(),N=W.outerHeight(!0),z=W.outerWidth(!0),O.w=l(O.initialWidth,"x"),O.h=l(O.initialHeight,"y"),J.position(),u(),c(ie,O.onOpen),B.add(S).hide(),v.focus(),O.trapFocus&&e.addEventListener&&(e.addEventListener("focus",a,!0),se.one(le,function(){e.removeEventListener("focus",a,!0)})),O.returnFocus&&se.one(le,function(){t(A).focus()})),w())}function f(){!v&&e.body&&(X=!1,H=t(i),v=o(ae).attr({id:Z,"class":t.support.opacity===!1?te+"IE":"",role:"dialog",tabindex:"-1"}).hide(),g=o(ae,"Overlay").hide(),L=t([o(ae,"LoadingOverlay")[0],o(ae,"LoadingGraphic")[0]]),y=o(ae,"Wrapper"),x=o(ae,"Content").append(S=o(ae,"Title"),M=o(ae,"Current"),K=t('<button type="button"/>').attr({id:te+"Previous"}),I=t('<button type="button"/>').attr({id:te+"Next"}),R=o("button","Slideshow"),L),P=t('<button type="button"/>').attr({id:te+"Close"}),y.append(o(ae).append(o(ae,"TopLeft"),b=o(ae,"TopCenter"),o(ae,"TopRight")),o(ae,!1,"clear:left").append(T=o(ae,"MiddleLeft"),x,C=o(ae,"MiddleRight")),o(ae,!1,"clear:left").append(o(ae,"BottomLeft"),k=o(ae,"BottomCenter"),o(ae,"BottomRight"))).find("div div").css({"float":"left"}),F=o(ae,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),B=I.add(K).add(M).add(R),t(e.body).append(g,v.append(y,F)))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),p(this))}return v?(X||(X=!0,I.click(function(){J.next()}),K.click(function(){J.prev()}),P.click(function(){J.close()}),g.click(function(){O.overlayClose&&J.close()}),t(e).bind("keydown."+te,function(t){var e=t.keyCode;$&&O.escKey&&27===e&&(t.preventDefault(),J.close()),$&&O.arrowKey&&E[1]&&!t.altKey&&(37===e?(t.preventDefault(),K.click()):39===e&&(t.preventDefault(),I.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+te,"."+ee,i):t("."+ee).live("click."+te,i)),!0):!1}function w(){var n,r,a,u=J.prep,p=++de;q=!0,U=!1,A=E[j],d(),c(he),c(oe,O.onLoad),O.h=O.height?l(O.height,"y")-N-_:O.innerHeight&&l(O.innerHeight,"y"),O.w=O.width?l(O.width,"x")-z-D:O.innerWidth&&l(O.innerWidth,"x"),O.mw=O.w,O.mh=O.h,O.maxWidth&&(O.mw=l(O.maxWidth,"x")-z-D,O.mw=O.w&&O.w<O.mw?O.w:O.mw),O.maxHeight&&(O.mh=l(O.maxHeight,"y")-N-_,O.mh=O.h&&O.h<O.mh?O.h:O.mh),n=O.href,Q=setTimeout(function(){L.show()},100),O.inline?(a=o(ae).hide().insertBefore(t(n)[0]),se.one(he,function(){a.replaceWith(W.children())}),u(t(n))):O.iframe?u(" "):O.html?u(O.html):h(O,n)?(n=s(O,n),U=e.createElement("img"),t(U).addClass(te+"Photo").bind("error",function(){O.title=!1,u(o(ae,"Error").html(O.imgError))}).one("load",function(){var e;p===de&&(U.alt=t(A).attr("alt")||t(A).attr("data-alt")||"",O.retinaImage&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),O.scalePhotos&&(r=function(){U.height-=U.height*e,U.width-=U.width*e},O.mw&&U.width>O.mw&&(e=(U.width-O.mw)/U.width,r()),O.mh&&U.height>O.mh&&(e=(U.height-O.mh)/U.height,r())),O.h&&(U.style.marginTop=Math.max(O.mh-U.height,0)/2+"px"),E[1]&&(O.loop||E[j+1])&&(U.style.cursor="pointer",U.onclick=function(){J.next()}),U.style.width=U.width+"px",U.style.height=U.height+"px",setTimeout(function(){u(U)},1))}),setTimeout(function(){U.src=n},1)):n&&F.load(n,O.data,function(e,i){p===de&&u("error"===i?o(ae,"Error").html(O.xhrError):t(this).contents())})}var g,v,y,x,b,T,C,k,E,H,W,F,L,S,M,R,I,K,P,B,O,_,D,N,z,A,j,U,$,q,G,Q,J,V,X,Y={transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,className:!1,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,trapFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp)((#|\?).*)?$/i,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0},Z="colorbox",te="cbox",ee=te+"Element",ie=te+"_open",oe=te+"_load",ne=te+"_complete",re=te+"_cleanup",le=te+"_closed",he=te+"_purge",se=t("<a/>"),ae="div",de=0,ce={};t.colorbox||(t(f),J=t.fn[Z]=t[Z]=function(e,i){var o=this;if(e=e||{},f(),m()){if(t.isFunction(o))o=t("<a/>"),e.open=!0;else if(!o[0])return o;i&&(e.onComplete=i),o.each(function(){t.data(this,Z,t.extend({},t.data(this,Z)||Y,e))}).addClass(ee),(t.isFunction(e.open)&&e.open.call(o)||e.open)&&p(o[0])}return o},J.position=function(e,i){function o(){b[0].style.width=k[0].style.width=x[0].style.width=parseInt(v[0].style.width,10)-D+"px",x[0].style.height=T[0].style.height=C[0].style.height=parseInt(v[0].style.height,10)-_+"px"}var r,h,s,a=0,d=0,c=v.offset();if(H.unbind("resize."+te),v.css({top:-9e4,left:-9e4}),h=H.scrollTop(),s=H.scrollLeft(),O.fixed?(c.top-=h,c.left-=s,v.css({position:"fixed"})):(a=h,d=s,v.css({position:"absolute"})),d+=O.right!==!1?Math.max(H.width()-O.w-z-D-l(O.right,"x"),0):O.left!==!1?l(O.left,"x"):Math.round(Math.max(H.width()-O.w-z-D,0)/2),a+=O.bottom!==!1?Math.max(n()-O.h-N-_-l(O.bottom,"y"),0):O.top!==!1?l(O.top,"y"):Math.round(Math.max(n()-O.h-N-_,0)/2),v.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:O.w+z+D,height:O.h+N+_,top:a,left:d},e){var u=0;t.each(r,function(t){return r[t]!==ce[t]?(u=e,void 0):void 0}),e=u}ce=r,e||v.css(r),v.dequeue().animate(r,{duration:e||0,complete:function(){o(),q=!1,y[0].style.width=O.w+z+D+"px",y[0].style.height=O.h+N+_+"px",O.reposition&&setTimeout(function(){H.bind("resize."+te,J.position)},1),i&&i()},step:o})},J.resize=function(t){var e;$&&(t=t||{},t.width&&(O.w=l(t.width,"x")-z-D),t.innerWidth&&(O.w=l(t.innerWidth,"x")),W.css({width:O.w}),t.height&&(O.h=l(t.height,"y")-N-_),t.innerHeight&&(O.h=l(t.innerHeight,"y")),t.innerHeight||t.height||(e=W.scrollTop(),W.css({height:"auto"}),O.h=W.height()),W.css({height:O.h}),e&&W.scrollTop(e),J.position("none"===O.transition?0:O.speed))},J.prep=function(i){function n(){return O.w=O.w||W.width(),O.w=O.mw&&O.mw<O.w?O.mw:O.w,O.w}function l(){return O.h=O.h||W.height(),O.h=O.mh&&O.mh<O.h?O.mh:O.h,O.h}if($){var a,d="none"===O.transition?0:O.speed;W.empty().remove(),W=o(ae,"LoadedContent").append(i),W.hide().appendTo(F.show()).css({width:n(),overflow:O.scrolling?"auto":"hidden"}).css({height:l()}).prependTo(x),F.hide(),t(U).css({"float":"none"}),a=function(){function i(){t.support.opacity===!1&&v[0].style.removeAttribute("filter")}var n,l,a=E.length,u="frameBorder",p="allowTransparency";$&&(l=function(){clearTimeout(Q),L.hide(),c(ne,O.onComplete)},S.html(O.title).add(W).show(),a>1?("string"==typeof O.current&&M.html(O.current.replace("{current}",j+1).replace("{total}",a)).show(),I[O.loop||a-1>j?"show":"hide"]().html(O.next),K[O.loop||j?"show":"hide"]().html(O.previous),O.slideshow&&R.show(),O.preloading&&t.each([r(-1),r(1)],function(){var i,o,n=E[this],r=t.data(n,Z);r&&r.href?(i=r.href,t.isFunction(i)&&(i=i.call(n))):i=t(n).attr("href"),i&&h(r,i)&&(i=s(r,i),o=e.createElement("img"),o.src=i)})):B.hide(),O.iframe?(n=o("iframe")[0],u in n&&(n[u]=0),p in n&&(n[p]="true"),O.scrolling||(n.scrolling="no"),t(n).attr({src:O.href,name:(new Date).getTime(),"class":te+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",l).appendTo(W),se.one(he,function(){n.src="//about:blank"}),O.fastIframe&&t(n).trigger("load")):l(),"fade"===O.transition?v.fadeTo(d,1,i):i())},"fade"===O.transition?v.fadeTo(d,0,function(){J.position(0,a)}):J.position(d,a)}},J.next=function(){!q&&E[1]&&(O.loop||E[j+1])&&(j=r(1),p(E[j]))},J.prev=function(){!q&&E[1]&&(O.loop||j)&&(j=r(-1),p(E[j]))},J.close=function(){$&&!G&&(G=!0,$=!1,c(re,O.onCleanup),H.unbind("."+te),g.fadeTo(O.fadeOut||0,0),v.stop().fadeTo(O.fadeOut||0,0,function(){v.add(g).css({opacity:1,cursor:"auto"}).hide(),c(he),W.empty().remove(),setTimeout(function(){G=!1,c(le,O.onClosed)},1)}))},J.remove=function(){v&&(v.stop(),t.colorbox.close(),v.stop().remove(),g.remove(),G=!1,v=null,t("."+ee).removeData(Z).removeClass(ee),t(e).unbind("click."+te))},J.element=function(){return t(A)},J.settings=Y)})(jQuery,document,window);
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/colorbox/jquery.colorbox.js b/javascript/libs/jquery/plugins/colorbox/jquery.colorbox.js deleted file mode 100644 index db00dac..0000000 --- a/javascript/libs/jquery/plugins/colorbox/jquery.colorbox.js +++ /dev/null @@ -1,1063 +0,0 @@ -/*! - Colorbox v1.4.27 - 2013-07-16 - jQuery lightbox and modal window plugin - (c) 2013 Jack Moore - http://www.jacklmoore.com/colorbox - license: http://www.opensource.org/licenses/mit-license.php -*/ -(function ($, document, window) { - var - // Default settings object. - // See http://jacklmoore.com/colorbox for details. - defaults = { - transition: "elastic", - speed: 300, - fadeOut: 300, - width: false, - initialWidth: "600", - innerWidth: false, - maxWidth: false, - height: false, - initialHeight: "450", - innerHeight: false, - maxHeight: false, - scalePhotos: true, - scrolling: true, - inline: false, - html: false, - iframe: false, - fastIframe: true, - photo: false, - href: false, - title: false, - rel: false, - opacity: 0.9, - preloading: true, - className: false, - - // alternate image paths for high-res displays - retinaImage: false, - retinaUrl: false, - retinaSuffix: '@2x.$1', - - // internationalization - current: "image {current} of {total}", - previous: "previous", - next: "next", - close: "close", - xhrError: "This content failed to load.", - imgError: "This image failed to load.", - - open: false, - returnFocus: true, - trapFocus: true, - reposition: true, - loop: true, - slideshow: false, - slideshowAuto: true, - slideshowSpeed: 2500, - slideshowStart: "start slideshow", - slideshowStop: "stop slideshow", - photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp)((#|\?).*)?$/i, - - onOpen: false, - onLoad: false, - onComplete: false, - onCleanup: false, - onClosed: false, - - overlayClose: true, - escKey: true, - arrowKey: true, - top: false, - bottom: false, - left: false, - right: false, - fixed: false, - data: undefined, - closeButton: true - }, - - // Abstracting the HTML and event identifiers for easy rebranding - colorbox = 'colorbox', - prefix = 'cbox', - boxElement = prefix + 'Element', - - // Events - event_open = prefix + '_open', - event_load = prefix + '_load', - event_complete = prefix + '_complete', - event_cleanup = prefix + '_cleanup', - event_closed = prefix + '_closed', - event_purge = prefix + '_purge', - - // Cached jQuery Object Variables - $overlay, - $box, - $wrap, - $content, - $topBorder, - $leftBorder, - $rightBorder, - $bottomBorder, - $related, - $window, - $loaded, - $loadingBay, - $loadingOverlay, - $title, - $current, - $slideshow, - $next, - $prev, - $close, - $groupControls, - $events = $('<a/>'), - - // Variables for cached values or use across multiple functions - settings, - interfaceHeight, - interfaceWidth, - loadedHeight, - loadedWidth, - element, - index, - photo, - open, - active, - closing, - loadingTimer, - publicMethod, - div = "div", - className, - requests = 0, - previousCSS = {}, - init; - - // **************** - // HELPER FUNCTIONS - // **************** - - // Convenience function for creating new jQuery objects - function $tag(tag, id, css) { - var element = document.createElement(tag); - - if (id) { - element.id = prefix + id; - } - - if (css) { - element.style.cssText = css; - } - - return $(element); - } - - // Get the window height using innerHeight when available to avoid an issue with iOS - // http://bugs.jquery.com/ticket/6724 - function winheight() { - return window.innerHeight ? window.innerHeight : $(window).height(); - } - - // Determine the next and previous members in a group. - function getIndex(increment) { - var - max = $related.length, - newIndex = (index + increment) % max; - - return (newIndex < 0) ? max + newIndex : newIndex; - } - - // Convert '%' and 'px' values to integers - function setSize(size, dimension) { - return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10)); - } - - // Checks an href to see if it is a photo. - // There is a force photo option (photo: true) for hrefs that cannot be matched by the regex. - function isImage(settings, url) { - return settings.photo || settings.photoRegex.test(url); - } - - function retinaUrl(settings, url) { - return settings.retinaUrl && window.devicePixelRatio > 1 ? url.replace(settings.photoRegex, settings.retinaSuffix) : url; - } - - function trapFocus(e) { - if ('contains' in $box[0] && !$box[0].contains(e.target)) { - e.stopPropagation(); - $box.focus(); - } - } - - // Assigns function results to their respective properties - function makeSettings() { - var i, - data = $.data(element, colorbox); - - if (data == null) { - settings = $.extend({}, defaults); - if (console && console.log) { - console.log('Error: cboxElement missing settings object'); - } - } else { - settings = $.extend({}, data); - } - - for (i in settings) { - if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time. - settings[i] = settings[i].call(element); - } - } - - settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow'; - settings.href = settings.href || $(element).attr('href'); - settings.title = settings.title || element.title; - - if (typeof settings.href === "string") { - settings.href = $.trim(settings.href); - } - } - - function trigger(event, callback) { - // for external use - $(document).trigger(event); - - // for internal use - $events.trigger(event); - - if ($.isFunction(callback)) { - callback.call(element); - } - } - - // Slideshow functionality - function slideshow() { - var - timeOut, - className = prefix + "Slideshow_", - click = "click." + prefix, - clear, - set, - start, - stop; - - if (settings.slideshow && $related[1]) { - clear = function () { - clearTimeout(timeOut); - }; - - set = function () { - if (settings.loop || $related[index + 1]) { - timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); - } - }; - - start = function () { - $slideshow - .html(settings.slideshowStop) - .unbind(click) - .one(click, stop); - - $events - .bind(event_complete, set) - .bind(event_load, clear) - .bind(event_cleanup, stop); - - $box.removeClass(className + "off").addClass(className + "on"); - }; - - stop = function () { - clear(); - - $events - .unbind(event_complete, set) - .unbind(event_load, clear) - .unbind(event_cleanup, stop); - - $slideshow - .html(settings.slideshowStart) - .unbind(click) - .one(click, function () { - publicMethod.next(); - start(); - }); - - $box.removeClass(className + "on").addClass(className + "off"); - }; - - if (settings.slideshowAuto) { - start(); - } else { - stop(); - } - } else { - $box.removeClass(className + "off " + className + "on"); - } - } - - function launch(target) { - if (!closing) { - - element = target; - - makeSettings(); - - $related = $(element); - - index = 0; - - if (settings.rel !== 'nofollow') { - $related = $('.' + boxElement).filter(function () { - var data = $.data(this, colorbox), - relRelated; - - if (data) { - relRelated = $(this).data('rel') || data.rel || this.rel; - } - - return (relRelated === settings.rel); - }); - index = $related.index(element); - - // Check direct calls to Colorbox. - if (index === -1) { - $related = $related.add(element); - index = $related.length - 1; - } - } - - $overlay.css({ - opacity: parseFloat(settings.opacity), - cursor: settings.overlayClose ? "pointer" : "auto", - visibility: 'visible' - }).show(); - - - if (className) { - $box.add($overlay).removeClass(className); - } - if (settings.className) { - $box.add($overlay).addClass(settings.className); - } - className = settings.className; - - if (settings.closeButton) { - $close.html(settings.close).appendTo($content); - } else { - $close.appendTo('<div/>'); - } - - if (!open) { - open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys. - - // Show colorbox so the sizes can be calculated in older versions of jQuery - $box.css({visibility:'hidden', display:'block'}); - - $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden'); - $content.css({width:'', height:''}).append($loaded); - - // Cache values needed for size calculations - interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height(); - interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width(); - loadedHeight = $loaded.outerHeight(true); - loadedWidth = $loaded.outerWidth(true); - - // Opens inital empty Colorbox prior to content being loaded. - settings.w = setSize(settings.initialWidth, 'x'); - settings.h = setSize(settings.initialHeight, 'y'); - publicMethod.position(); - - slideshow(); - - trigger(event_open, settings.onOpen); - - $groupControls.add($title).hide(); - - $box.focus(); - - - if (settings.trapFocus) { - // Confine focus to the modal - // Uses event capturing that is not supported in IE8- - if (document.addEventListener) { - - document.addEventListener('focus', trapFocus, true); - - $events.one(event_closed, function () { - document.removeEventListener('focus', trapFocus, true); - }); - } - } - - // Return focus on closing - if (settings.returnFocus) { - $events.one(event_closed, function () { - $(element).focus(); - }); - } - } - - load(); - } - } - - // Colorbox's markup needs to be added to the DOM prior to being called - // so that the browser will go ahead and load the CSS background images. - function appendHTML() { - if (!$box && document.body) { - init = false; - $window = $(window); - $box = $tag(div).attr({ - id: colorbox, - 'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS. - role: 'dialog', - tabindex: '-1' - }).hide(); - $overlay = $tag(div, "Overlay").hide(); - $loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]); - $wrap = $tag(div, "Wrapper"); - $content = $tag(div, "Content").append( - $title = $tag(div, "Title"), - $current = $tag(div, "Current"), - $prev = $('<button type="button"/>').attr({id:prefix+'Previous'}), - $next = $('<button type="button"/>').attr({id:prefix+'Next'}), - $slideshow = $tag('button', "Slideshow"), - $loadingOverlay - ); - - $close = $('<button type="button"/>').attr({id:prefix+'Close'}); - - $wrap.append( // The 3x3 Grid that makes up Colorbox - $tag(div).append( - $tag(div, "TopLeft"), - $topBorder = $tag(div, "TopCenter"), - $tag(div, "TopRight") - ), - $tag(div, false, 'clear:left').append( - $leftBorder = $tag(div, "MiddleLeft"), - $content, - $rightBorder = $tag(div, "MiddleRight") - ), - $tag(div, false, 'clear:left').append( - $tag(div, "BottomLeft"), - $bottomBorder = $tag(div, "BottomCenter"), - $tag(div, "BottomRight") - ) - ).find('div div').css({'float': 'left'}); - - $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none'); - - $groupControls = $next.add($prev).add($current).add($slideshow); - - $(document.body).append($overlay, $box.append($wrap, $loadingBay)); - } - } - - // Add Colorbox's event bindings - function addBindings() { - function clickHandler(e) { - // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt. - // See: http://jacklmoore.com/notes/click-events/ - if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) { - e.preventDefault(); - launch(this); - } - } - - if ($box) { - if (!init) { - init = true; - - // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly. - $next.click(function () { - publicMethod.next(); - }); - $prev.click(function () { - publicMethod.prev(); - }); - $close.click(function () { - publicMethod.close(); - }); - $overlay.click(function () { - if (settings.overlayClose) { - publicMethod.close(); - } - }); - - // Key Bindings - $(document).bind('keydown.' + prefix, function (e) { - var key = e.keyCode; - if (open && settings.escKey && key === 27) { - e.preventDefault(); - publicMethod.close(); - } - if (open && settings.arrowKey && $related[1] && !e.altKey) { - if (key === 37) { - e.preventDefault(); - $prev.click(); - } else if (key === 39) { - e.preventDefault(); - $next.click(); - } - } - }); - - if ($.isFunction($.fn.on)) { - // For jQuery 1.7+ - $(document).on('click.'+prefix, '.'+boxElement, clickHandler); - } else { - // For jQuery 1.3.x -> 1.6.x - // This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed. - // This is not here for jQuery 1.9, it's here for legacy users. - $('.'+boxElement).live('click.'+prefix, clickHandler); - } - } - return true; - } - return false; - } - - // Don't do anything if Colorbox already exists. - if ($.colorbox) { - return; - } - - // Append the HTML when the DOM loads - $(appendHTML); - - - // **************** - // PUBLIC FUNCTIONS - // Usage format: $.colorbox.close(); - // Usage from within an iframe: parent.jQuery.colorbox.close(); - // **************** - - publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { - var $this = this; - - options = options || {}; - - appendHTML(); - - if (addBindings()) { - if ($.isFunction($this)) { // assume a call to $.colorbox - $this = $('<a/>'); - options.open = true; - } else if (!$this[0]) { // colorbox being applied to empty collection - return $this; - } - - if (callback) { - options.onComplete = callback; - } - - $this.each(function () { - $.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options)); - }).addClass(boxElement); - - if (($.isFunction(options.open) && options.open.call($this)) || options.open) { - launch($this[0]); - } - } - - return $this; - }; - - publicMethod.position = function (speed, loadedCallback) { - var - css, - top = 0, - left = 0, - offset = $box.offset(), - scrollTop, - scrollLeft; - - $window.unbind('resize.' + prefix); - - // remove the modal so that it doesn't influence the document width/height - $box.css({top: -9e4, left: -9e4}); - - scrollTop = $window.scrollTop(); - scrollLeft = $window.scrollLeft(); - - if (settings.fixed) { - offset.top -= scrollTop; - offset.left -= scrollLeft; - $box.css({position: 'fixed'}); - } else { - top = scrollTop; - left = scrollLeft; - $box.css({position: 'absolute'}); - } - - // keeps the top and left positions within the browser's viewport. - if (settings.right !== false) { - left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0); - } else if (settings.left !== false) { - left += setSize(settings.left, 'x'); - } else { - left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2); - } - - if (settings.bottom !== false) { - top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0); - } else if (settings.top !== false) { - top += setSize(settings.top, 'y'); - } else { - top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2); - } - - $box.css({top: offset.top, left: offset.left, visibility:'visible'}); - - // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly, - // but it has to be shrank down around the size of div#colorbox when it's done. If not, - // it can invoke an obscure IE bug when using iframes. - $wrap[0].style.width = $wrap[0].style.height = "9999px"; - - function modalDimensions() { - $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px'; - $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px'; - } - - css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left}; - - // setting the speed to 0 if the content hasn't changed size or position - if (speed) { - var tempSpeed = 0; - $.each(css, function(i){ - if (css[i] !== previousCSS[i]) { - tempSpeed = speed; - return; - } - }); - speed = tempSpeed; - } - - previousCSS = css; - - if (!speed) { - $box.css(css); - } - - $box.dequeue().animate(css, { - duration: speed || 0, - complete: function () { - modalDimensions(); - - active = false; - - // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation. - $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px"; - $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px"; - - if (settings.reposition) { - setTimeout(function () { // small delay before binding onresize due to an IE8 bug. - $window.bind('resize.' + prefix, publicMethod.position); - }, 1); - } - - if (loadedCallback) { - loadedCallback(); - } - }, - step: modalDimensions - }); - }; - - publicMethod.resize = function (options) { - var scrolltop; - - if (open) { - options = options || {}; - - if (options.width) { - settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth; - } - - if (options.innerWidth) { - settings.w = setSize(options.innerWidth, 'x'); - } - - $loaded.css({width: settings.w}); - - if (options.height) { - settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight; - } - - if (options.innerHeight) { - settings.h = setSize(options.innerHeight, 'y'); - } - - if (!options.innerHeight && !options.height) { - scrolltop = $loaded.scrollTop(); - $loaded.css({height: "auto"}); - settings.h = $loaded.height(); - } - - $loaded.css({height: settings.h}); - - if(scrolltop) { - $loaded.scrollTop(scrolltop); - } - - publicMethod.position(settings.transition === "none" ? 0 : settings.speed); - } - }; - - publicMethod.prep = function (object) { - if (!open) { - return; - } - - var callback, speed = settings.transition === "none" ? 0 : settings.speed; - - $loaded.empty().remove(); // Using empty first may prevent some IE7 issues. - - $loaded = $tag(div, 'LoadedContent').append(object); - - function getWidth() { - settings.w = settings.w || $loaded.width(); - settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w; - return settings.w; - } - function getHeight() { - settings.h = settings.h || $loaded.height(); - settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h; - return settings.h; - } - - $loaded.hide() - .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations. - .css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'}) - .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height. - .prependTo($content); - - $loadingBay.hide(); - - // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width. - - $(photo).css({'float': 'none'}); - - callback = function () { - var total = $related.length, - iframe, - frameBorder = 'frameBorder', - allowTransparency = 'allowTransparency', - complete; - - if (!open) { - return; - } - - function removeFilter() { // Needed for IE7 & IE8 in versions of jQuery prior to 1.7.2 - if ($.support.opacity === false) { - $box[0].style.removeAttribute('filter'); - } - } - - complete = function () { - clearTimeout(loadingTimer); - $loadingOverlay.hide(); - trigger(event_complete, settings.onComplete); - }; - - - $title.html(settings.title).add($loaded).show(); - - if (total > 1) { // handle grouping - if (typeof settings.current === "string") { - $current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show(); - } - - $next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next); - $prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous); - - if (settings.slideshow) { - $slideshow.show(); - } - - // Preloads images within a rel group - if (settings.preloading) { - $.each([getIndex(-1), getIndex(1)], function(){ - var src, - img, - i = $related[this], - data = $.data(i, colorbox); - - if (data && data.href) { - src = data.href; - if ($.isFunction(src)) { - src = src.call(i); - } - } else { - src = $(i).attr('href'); - } - - if (src && isImage(data, src)) { - src = retinaUrl(data, src); - img = document.createElement('img'); - img.src = src; - } - }); - } - } else { - $groupControls.hide(); - } - - if (settings.iframe) { - iframe = $tag('iframe')[0]; - - if (frameBorder in iframe) { - iframe[frameBorder] = 0; - } - - if (allowTransparency in iframe) { - iframe[allowTransparency] = "true"; - } - - if (!settings.scrolling) { - iframe.scrolling = "no"; - } - - $(iframe) - .attr({ - src: settings.href, - name: (new Date()).getTime(), // give the iframe a unique name to prevent caching - 'class': prefix + 'Iframe', - allowFullScreen : true, // allow HTML5 video to go fullscreen - webkitAllowFullScreen : true, - mozallowfullscreen : true - }) - .one('load', complete) - .appendTo($loaded); - - $events.one(event_purge, function () { - iframe.src = "//about:blank"; - }); - - if (settings.fastIframe) { - $(iframe).trigger('load'); - } - } else { - complete(); - } - - if (settings.transition === 'fade') { - $box.fadeTo(speed, 1, removeFilter); - } else { - removeFilter(); - } - }; - - if (settings.transition === 'fade') { - $box.fadeTo(speed, 0, function () { - publicMethod.position(0, callback); - }); - } else { - publicMethod.position(speed, callback); - } - }; - - function load () { - var href, setResize, prep = publicMethod.prep, $inline, request = ++requests; - - active = true; - - photo = false; - - element = $related[index]; - - makeSettings(); - - trigger(event_purge); - - trigger(event_load, settings.onLoad); - - settings.h = settings.height ? - setSize(settings.height, 'y') - loadedHeight - interfaceHeight : - settings.innerHeight && setSize(settings.innerHeight, 'y'); - - settings.w = settings.width ? - setSize(settings.width, 'x') - loadedWidth - interfaceWidth : - settings.innerWidth && setSize(settings.innerWidth, 'x'); - - // Sets the minimum dimensions for use in image scaling - settings.mw = settings.w; - settings.mh = settings.h; - - // Re-evaluate the minimum width and height based on maxWidth and maxHeight values. - // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead. - if (settings.maxWidth) { - settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth; - settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw; - } - if (settings.maxHeight) { - settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight; - settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh; - } - - href = settings.href; - - loadingTimer = setTimeout(function () { - $loadingOverlay.show(); - }, 100); - - if (settings.inline) { - // Inserts an empty placeholder where inline content is being pulled from. - // An event is bound to put inline content back when Colorbox closes or loads new content. - $inline = $tag(div).hide().insertBefore($(href)[0]); - - $events.one(event_purge, function () { - $inline.replaceWith($loaded.children()); - }); - - prep($(href)); - } else if (settings.iframe) { - // IFrame element won't be added to the DOM until it is ready to be displayed, - // to avoid problems with DOM-ready JS that might be trying to run in that iframe. - prep(" "); - } else if (settings.html) { - prep(settings.html); - } else if (isImage(settings, href)) { - - href = retinaUrl(settings, href); - - photo = document.createElement('img'); - - $(photo) - .addClass(prefix + 'Photo') - .bind('error',function () { - settings.title = false; - prep($tag(div, 'Error').html(settings.imgError)); - }) - .one('load', function () { - var percent; - - if (request !== requests) { - return; - } - - photo.alt = $(element).attr('alt') || $(element).attr('data-alt') || ''; - - if (settings.retinaImage && window.devicePixelRatio > 1) { - photo.height = photo.height / window.devicePixelRatio; - photo.width = photo.width / window.devicePixelRatio; - } - - if (settings.scalePhotos) { - setResize = function () { - photo.height -= photo.height * percent; - photo.width -= photo.width * percent; - }; - if (settings.mw && photo.width > settings.mw) { - percent = (photo.width - settings.mw) / photo.width; - setResize(); - } - if (settings.mh && photo.height > settings.mh) { - percent = (photo.height - settings.mh) / photo.height; - setResize(); - } - } - - if (settings.h) { - photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px'; - } - - if ($related[1] && (settings.loop || $related[index + 1])) { - photo.style.cursor = 'pointer'; - photo.onclick = function () { - publicMethod.next(); - }; - } - - photo.style.width = photo.width + 'px'; - photo.style.height = photo.height + 'px'; - - setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise. - prep(photo); - }, 1); - }); - - setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise. - photo.src = href; - }, 1); - } else if (href) { - $loadingBay.load(href, settings.data, function (data, status) { - if (request === requests) { - prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents()); - } - }); - } - } - - // Navigates to the next page/image in a set. - publicMethod.next = function () { - if (!active && $related[1] && (settings.loop || $related[index + 1])) { - index = getIndex(1); - launch($related[index]); - } - }; - - publicMethod.prev = function () { - if (!active && $related[1] && (settings.loop || index)) { - index = getIndex(-1); - launch($related[index]); - } - }; - - // Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close(); - publicMethod.close = function () { - if (open && !closing) { - - closing = true; - - open = false; - - trigger(event_cleanup, settings.onCleanup); - - $window.unbind('.' + prefix); - - $overlay.fadeTo(settings.fadeOut || 0, 0); - - $box.stop().fadeTo(settings.fadeOut || 0, 0, function () { - - $box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide(); - - trigger(event_purge); - - $loaded.empty().remove(); // Using empty first may prevent some IE7 issues. - - setTimeout(function () { - closing = false; - trigger(event_closed, settings.onClosed); - }, 1); - }); - } - }; - - // Removes changes Colorbox made to the document, but does not remove the plugin. - publicMethod.remove = function () { - if (!$box) { return; } - - $box.stop(); - $.colorbox.close(); - $box.stop().remove(); - $overlay.remove(); - closing = false; - $box = null; - $('.' + boxElement) - .removeData(colorbox) - .removeClass(boxElement); - - $(document).unbind('click.'+prefix); - }; - - // A method for fetching the current element Colorbox is referencing. - // returns a jQuery object. - publicMethod.element = function () { - return $(element); - }; - - publicMethod.settings = defaults; - -}(jQuery, document, window)); diff --git a/javascript/libs/jquery/plugins/colorpicker/css/colorpicker.css b/javascript/libs/jquery/plugins/colorpicker/css/colorpicker.css deleted file mode 100755 index 400263d..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/css/colorpicker.css +++ /dev/null @@ -1,167 +0,0 @@ -.colorpicker {
- width: 356px;
- height: 176px;
- overflow: hidden;
- position: absolute;
- background: url(../images/colorpicker_background.png);
- font-family: Arial, Helvetica, sans-serif;
- display: none;
-}
-.colorpicker_color {
- width: 150px;
- height: 150px;
- left: 14px;
- top: 13px;
- position: absolute;
- background: #f00;
- overflow: hidden;
- cursor: crosshair;
-}
-.colorpicker_color div {
- position: absolute;
- top: 0;
- left: 0;
- width: 150px;
- height: 150px;
- background: url(../images/colorpicker_overlay.png);
-}
-.colorpicker_color div div {
- position: absolute;
- top: 0;
- left: 0;
- width: 11px;
- height: 11px;
- overflow: hidden;
- background: url(../images/colorpicker_select.gif);
- margin: -5px 0 0 -5px;
-}
-.colorpicker_hue {
- position: absolute;
- top: 13px;
- left: 171px;
- width: 35px;
- height: 150px;
- cursor: n-resize;
-}
-.colorpicker_hue div {
- position: absolute;
- width: 35px;
- height: 9px;
- overflow: hidden;
- background: url(../images/colorpicker_indic.gif) left top;
- margin: -4px 0 0 0;
- left: 0px;
-}
-.colorpicker_new_color {
- position: absolute;
- width: 60px;
- height: 30px;
- left: 213px;
- top: 13px;
- background: #f00;
-}
-.colorpicker_current_color {
- position: absolute;
- width: 60px;
- height: 30px;
- left: 283px;
- top: 13px;
- background: #f00;
-}
-.colorpicker input[type="text"]:focus,
-.colorpicker input[type="text"] {
- background-color: transparent;
- border: 1px solid transparent;
- position: absolute;
- font-size: 10px;
- font-family: Arial, Helvetica, sans-serif;
- color: #898989;
- top: 0px;
- right: 11px;
- text-align: right;
- margin: 0;
- padding: 0;
- height: auto;
- width: 50px;
- transition: none;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.colorpicker_hex {
- position: absolute;
- width: 72px;
- height: 22px;
- background: url(../images/colorpicker_hex.png) top;
- left: 212px;
- top: 142px;
-}
-.colorpicker_hex input[type="text"] {
- right: 6px;
-}
-.colorpicker_field {
- height: 22px;
- width: 62px;
- background-position: top;
- position: absolute;
-}
-.colorpicker_field span {
- position: absolute;
- width: 12px;
- height: 22px;
- overflow: hidden;
- top: 0;
- right: 0;
- cursor: n-resize;
-}
-.colorpicker_rgb_r {
- background-image: url(../images/colorpicker_rgb_r.png);
- top: 52px;
- left: 212px;
-}
-.colorpicker_rgb_g {
- background-image: url(../images/colorpicker_rgb_g.png);
- top: 82px;
- left: 212px;
-}
-.colorpicker_rgb_b {
- background-image: url(../images/colorpicker_rgb_b.png);
- top: 112px;
- left: 212px;
-}
-.colorpicker_hsb_h {
- background-image: url(../images/colorpicker_hsb_h.png);
- top: 52px;
- left: 282px;
-}
-.colorpicker_hsb_s {
- background-image: url(../images/colorpicker_hsb_s.png);
- top: 82px;
- left: 282px;
-}
-.colorpicker_hsb_b {
- background-image: url(../images/colorpicker_hsb_b.png);
- top: 112px;
- left: 282px;
-}
-.colorpicker_submit {
- position: absolute;
- width: 22px;
- height: 22px;
- background: url(../images/custom_submit.png) top;
- left: 322px;
- top: 142px;
- overflow: hidden;
-}
-.colorpicker_focus {
- background-position: center;
-}
-.colorpicker_hex.colorpicker_focus {
- background-position: bottom;
-}
-.colorpicker_submit.colorpicker_focus {
- background-position: bottom;
-}
-.colorpicker_slider {
- background-position: bottom;
-}
diff --git a/javascript/libs/jquery/plugins/colorpicker/css/layout.css b/javascript/libs/jquery/plugins/colorpicker/css/layout.css deleted file mode 100755 index 8b3f00f..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/css/layout.css +++ /dev/null @@ -1,218 +0,0 @@ -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
- margin:0;
- padding:0;
-}
-table {
- border-collapse:collapse;
- border-spacing:0;
-}
-fieldset,img {
- border:0;
-}
-address,caption,cite,code,dfn,em,strong,th,var {
- font-style:normal;
- font-weight:normal;
-}
-ol,ul {
- list-style:none;
-}
-caption,th {
- text-align:left;
-}
-h1,h2,h3,h4,h5,h6 {
- font-size:100%;
- font-weight:normal;
-}
-q:before,q:after {
- content:'';
-}
-abbr,acronym { border:0;
-}
-html, body {
- background-color: #fff;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12px;
- line-height: 18px;
- color: #52697E;
-}
-body {
- text-align: center;
- overflow: auto;
-}
-.wrapper {
- width: 700px;
- margin: 0 auto;
- text-align: left;
-}
-h1 {
- font-size: 21px;
- height: 47px;
- line-height: 47px;
- text-transform: uppercase;
-}
-.navigationTabs {
- height: 23px;
- line-height: 23px;
- border-bottom: 1px solid #ccc;
-}
-.navigationTabs li {
- float: left;
- height: 23px;
- line-height: 23px;
- padding-right: 3px;
-}
-.navigationTabs li a{
- float: left;
- dispaly: block;
- height: 23px;
- line-height: 23px;
- padding: 0 10px;
- overflow: hidden;
- color: #52697E;
- background-color: #eee;
- position: relative;
- text-decoration: none;
-}
-.navigationTabs li a:hover {
- background-color: #f0f0f0;
-}
-.navigationTabs li a.active {
- background-color: #fff;
- border: 1px solid #ccc;
- border-bottom: 0px solid;
-}
-.tabsContent {
- border: 1px solid #ccc;
- border-top: 0px solid;
- width: 698px;
- overflow: hidden;
-}
-.tab {
- padding: 16px;
- display: none;
-}
-.tab h2 {
- font-weight: bold;
- font-size: 16px;
-}
-.tab h3 {
- font-weight: bold;
- font-size: 14px;
- margin-top: 20px;
-}
-.tab p {
- margin-top: 16px;
- clear: both;
-}
-.tab ul {
- margin-top: 16px;
- list-style: disc;
-}
-.tab li {
- margin: 10px 0 0 35px;
-}
-.tab a {
- color: #8FB0CF;
-}
-.tab strong {
- font-weight: bold;
-}
-.tab pre {
- font-size: 11px;
- margin-top: 20px;
- width: 668px;
- overflow: auto;
- clear: both;
-}
-.tab table {
- width: 100%;
-}
-.tab table td {
- padding: 6px 10px 6px 0;
- vertical-align: top;
-}
-.tab dt {
- margin-top: 16px;
-}
-
-#colorSelector {
- position: relative;
- width: 36px;
- height: 36px;
- background: url(../images/select.png);
-}
-#colorSelector div {
- position: absolute;
- top: 3px;
- left: 3px;
- width: 30px;
- height: 30px;
- background: url(../images/select.png) center;
-}
-#colorSelector2 {
- position: absolute;
- top: 0;
- left: 0;
- width: 36px;
- height: 36px;
- background: url(../images/select2.png);
-}
-#colorSelector2 div {
- position: absolute;
- top: 4px;
- left: 4px;
- width: 28px;
- height: 28px;
- background: url(../images/select2.png) center;
-}
-#colorpickerHolder2 {
- top: 32px;
- left: 0;
- width: 356px;
- height: 0;
- overflow: hidden;
- position: absolute;
-}
-#colorpickerHolder2 .colorpicker {
- background-image: url(../images/custom_background.png);
- position: absolute;
- bottom: 0;
- left: 0;
-}
-#colorpickerHolder2 .colorpicker_hue div {
- background-image: url(../images/custom_indic.gif);
-}
-#colorpickerHolder2 .colorpicker_hex {
- background-image: url(../images/custom_hex.png);
-}
-#colorpickerHolder2 .colorpicker_rgb_r {
- background-image: url(../images/custom_rgb_r.png);
-}
-#colorpickerHolder2 .colorpicker_rgb_g {
- background-image: url(../images/custom_rgb_g.png);
-}
-#colorpickerHolder2 .colorpicker_rgb_b {
- background-image: url(../images/custom_rgb_b.png);
-}
-#colorpickerHolder2 .colorpicker_hsb_s {
- background-image: url(../images/custom_hsb_s.png);
- display: none;
-}
-#colorpickerHolder2 .colorpicker_hsb_h {
- background-image: url(../images/custom_hsb_h.png);
- display: none;
-}
-#colorpickerHolder2 .colorpicker_hsb_b {
- background-image: url(../images/custom_hsb_b.png);
- display: none;
-}
-#colorpickerHolder2 .colorpicker_submit {
- background-image: url(../images/custom_submit.png);
-}
-#colorpickerHolder2 .colorpicker input {
- color: #778398;
-}
-#customWidget {
- position: relative;
- height: 36px;
-}
diff --git a/javascript/libs/jquery/plugins/colorpicker/images/Thumbs.db b/javascript/libs/jquery/plugins/colorpicker/images/Thumbs.db Binary files differdeleted file mode 100755 index d396c36..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/Thumbs.db +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/blank.gif b/javascript/libs/jquery/plugins/colorpicker/images/blank.gif Binary files differdeleted file mode 100755 index 75b945d..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/blank.gif +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_background.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_background.png Binary files differdeleted file mode 100755 index 8401572..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_background.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hex.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hex.png Binary files differdeleted file mode 100755 index 4e532d7..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hex.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hsb_b.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hsb_b.png Binary files differdeleted file mode 100755 index dfac595..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hsb_b.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hsb_h.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hsb_h.png Binary files differdeleted file mode 100755 index 3977ed9..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hsb_h.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hsb_s.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hsb_s.png Binary files differdeleted file mode 100755 index a2a6997..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_hsb_s.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_indic.gif b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_indic.gif Binary files differdeleted file mode 100755 index f9fa95e..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_indic.gif +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_overlay.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_overlay.png Binary files differdeleted file mode 100755 index 561cdd9..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_overlay.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_rgb_b.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_rgb_b.png Binary files differdeleted file mode 100755 index dfac595..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_rgb_b.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_rgb_g.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_rgb_g.png Binary files differdeleted file mode 100755 index 72b3276..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_rgb_g.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_rgb_r.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_rgb_r.png Binary files differdeleted file mode 100755 index 4855fe0..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_rgb_r.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_select.gif b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_select.gif Binary files differdeleted file mode 100755 index 599f7f1..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_select.gif +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_submit.png b/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_submit.png Binary files differdeleted file mode 100755 index 7f4c082..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/colorpicker_submit.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_background.png b/javascript/libs/jquery/plugins/colorpicker/images/custom_background.png Binary files differdeleted file mode 100755 index cf55ffd..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_background.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_hex.png b/javascript/libs/jquery/plugins/colorpicker/images/custom_hex.png Binary files differdeleted file mode 100755 index 888f444..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_hex.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_hsb_b.png b/javascript/libs/jquery/plugins/colorpicker/images/custom_hsb_b.png Binary files differdeleted file mode 100755 index 2f99dae..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_hsb_b.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_hsb_h.png b/javascript/libs/jquery/plugins/colorpicker/images/custom_hsb_h.png Binary files differdeleted file mode 100755 index a217e92..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_hsb_h.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_hsb_s.png b/javascript/libs/jquery/plugins/colorpicker/images/custom_hsb_s.png Binary files differdeleted file mode 100755 index 7826b41..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_hsb_s.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_indic.gif b/javascript/libs/jquery/plugins/colorpicker/images/custom_indic.gif Binary files differdeleted file mode 100755 index 222fb94..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_indic.gif +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_rgb_b.png b/javascript/libs/jquery/plugins/colorpicker/images/custom_rgb_b.png Binary files differdeleted file mode 100755 index 80764e5..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_rgb_b.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_rgb_g.png b/javascript/libs/jquery/plugins/colorpicker/images/custom_rgb_g.png Binary files differdeleted file mode 100755 index fc9778b..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_rgb_g.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_rgb_r.png b/javascript/libs/jquery/plugins/colorpicker/images/custom_rgb_r.png Binary files differdeleted file mode 100755 index 91b0cd4..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_rgb_r.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/custom_submit.png b/javascript/libs/jquery/plugins/colorpicker/images/custom_submit.png Binary files differdeleted file mode 100755 index 7bd51c0..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/custom_submit.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/select.png b/javascript/libs/jquery/plugins/colorpicker/images/select.png Binary files differdeleted file mode 100755 index 21213bf..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/select.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/select2.png b/javascript/libs/jquery/plugins/colorpicker/images/select2.png Binary files differdeleted file mode 100755 index 2cd2cab..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/select2.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/images/slider.png b/javascript/libs/jquery/plugins/colorpicker/images/slider.png Binary files differdeleted file mode 100755 index 8b03da9..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/images/slider.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/colorpicker/js/colorpicker.js b/javascript/libs/jquery/plugins/colorpicker/js/colorpicker.js deleted file mode 100755 index 10a2b22..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/js/colorpicker.js +++ /dev/null @@ -1,484 +0,0 @@ -/**
- *
- * Color picker
- * Author: Stefan Petre www.eyecon.ro
- *
- * Dual licensed under the MIT and GPL licenses
- *
- */
-(function ($) {
- var ColorPicker = function () {
- var
- ids = {},
- inAction,
- charMin = 65,
- visible,
- tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
- defaults = {
- eventName: 'click',
- onShow: function () {},
- onBeforeShow: function(){},
- onHide: function () {},
- onChange: function () {},
- onSubmit: function () {},
- color: 'ff0000',
- livePreview: true,
- flat: false
- },
- fillRGBFields = function (hsb, cal) {
- var rgb = HSBToRGB(hsb);
- $(cal).data('colorpicker').fields
- .eq(1).val(rgb.r).end()
- .eq(2).val(rgb.g).end()
- .eq(3).val(rgb.b).end();
- },
- fillHSBFields = function (hsb, cal) {
- $(cal).data('colorpicker').fields
- .eq(4).val(hsb.h).end()
- .eq(5).val(hsb.s).end()
- .eq(6).val(hsb.b).end();
- },
- fillHexFields = function (hsb, cal) {
- $(cal).data('colorpicker').fields
- .eq(0).val(HSBToHex(hsb)).end();
- },
- setSelector = function (hsb, cal) {
- $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
- $(cal).data('colorpicker').selectorIndic.css({
- left: parseInt(150 * hsb.s/100, 10),
- top: parseInt(150 * (100-hsb.b)/100, 10)
- });
- },
- setHue = function (hsb, cal) {
- $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
- },
- setCurrentColor = function (hsb, cal) {
- $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
- },
- setNewColor = function (hsb, cal) {
- $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
- },
- keyDown = function (ev) {
- var pressedKey = ev.charCode || ev.keyCode || -1;
- if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
- return false;
- }
- var cal = $(this).parent().parent();
- if (cal.data('colorpicker').livePreview === true) {
- change.apply(this);
- }
- },
- change = function (ev) {
- var cal = $(this).parent().parent(), col;
- if (this.parentNode.className.indexOf('_hex') > 0) {
- cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
- } else if (this.parentNode.className.indexOf('_hsb') > 0) {
- cal.data('colorpicker').color = col = fixHSB({
- h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
- s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
- b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
- });
- } else {
- cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
- r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
- g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
- b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
- }));
- }
- if (ev) {
- fillRGBFields(col, cal.get(0));
- fillHexFields(col, cal.get(0));
- fillHSBFields(col, cal.get(0));
- }
- setSelector(col, cal.get(0));
- setHue(col, cal.get(0));
- setNewColor(col, cal.get(0));
- cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
- },
- blur = function (ev) {
- var cal = $(this).parent().parent();
- cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
- },
- focus = function () {
- charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
- $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
- $(this).parent().addClass('colorpicker_focus');
- },
- downIncrement = function (ev) {
- var field = $(this).parent().find('input').focus();
- var current = {
- el: $(this).parent().addClass('colorpicker_slider'),
- max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
- y: ev.pageY,
- field: field,
- val: parseInt(field.val(), 10),
- preview: $(this).parent().parent().data('colorpicker').livePreview
- };
- $(document).bind('mouseup', current, upIncrement);
- $(document).bind('mousemove', current, moveIncrement);
- },
- moveIncrement = function (ev) {
- ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
- if (ev.data.preview) {
- change.apply(ev.data.field.get(0), [true]);
- }
- return false;
- },
- upIncrement = function (ev) {
- change.apply(ev.data.field.get(0), [true]);
- ev.data.el.removeClass('colorpicker_slider').find('input').focus();
- $(document).unbind('mouseup', upIncrement);
- $(document).unbind('mousemove', moveIncrement);
- return false;
- },
- downHue = function (ev) {
- var current = {
- cal: $(this).parent(),
- y: $(this).offset().top
- };
- current.preview = current.cal.data('colorpicker').livePreview;
- $(document).bind('mouseup', current, upHue);
- $(document).bind('mousemove', current, moveHue);
- },
- moveHue = function (ev) {
- change.apply(
- ev.data.cal.data('colorpicker')
- .fields
- .eq(4)
- .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
- .get(0),
- [ev.data.preview]
- );
- return false;
- },
- upHue = function (ev) {
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
- $(document).unbind('mouseup', upHue);
- $(document).unbind('mousemove', moveHue);
- return false;
- },
- downSelector = function (ev) {
- var current = {
- cal: $(this).parent(),
- pos: $(this).offset()
- };
- current.preview = current.cal.data('colorpicker').livePreview;
- $(document).bind('mouseup', current, upSelector);
- $(document).bind('mousemove', current, moveSelector);
- },
- moveSelector = function (ev) {
- change.apply(
- ev.data.cal.data('colorpicker')
- .fields
- .eq(6)
- .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
- .end()
- .eq(5)
- .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
- .get(0),
- [ev.data.preview]
- );
- return false;
- },
- upSelector = function (ev) {
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
- $(document).unbind('mouseup', upSelector);
- $(document).unbind('mousemove', moveSelector);
- return false;
- },
- enterSubmit = function (ev) {
- $(this).addClass('colorpicker_focus');
- },
- leaveSubmit = function (ev) {
- $(this).removeClass('colorpicker_focus');
- },
- clickSubmit = function (ev) {
- var cal = $(this).parent();
- var col = cal.data('colorpicker').color;
- cal.data('colorpicker').origColor = col;
- setCurrentColor(col, cal.get(0));
- cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
- },
- show = function (ev) {
- var cal = $('#' + $(this).data('colorpickerId'));
- cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
- var pos = $(this).offset();
- var viewPort = getViewport();
- var top = pos.top + this.offsetHeight;
- var left = pos.left;
- if (top + 176 > viewPort.t + viewPort.h) {
- top -= this.offsetHeight + 176;
- }
- if (left + 356 > viewPort.l + viewPort.w) {
- left -= 356;
- }
- cal.css({left: left + 'px', top: top + 'px'});
- if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
- cal.show();
- }
- $(document).bind('mousedown', {cal: cal}, hide);
- return false;
- },
- hide = function (ev) {
- if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
- if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
- ev.data.cal.hide();
- }
- $(document).unbind('mousedown', hide);
- }
- },
- isChildOf = function(parentEl, el, container) {
- if (parentEl == el) {
- return true;
- }
- if (parentEl.contains) {
- return parentEl.contains(el);
- }
- if ( parentEl.compareDocumentPosition ) {
- return !!(parentEl.compareDocumentPosition(el) & 16);
- }
- var prEl = el.parentNode;
- while(prEl && prEl != container) {
- if (prEl == parentEl)
- return true;
- prEl = prEl.parentNode;
- }
- return false;
- },
- getViewport = function () {
- var m = document.compatMode == 'CSS1Compat';
- return {
- l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
- t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
- w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
- h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
- };
- },
- fixHSB = function (hsb) {
- return {
- h: Math.min(360, Math.max(0, hsb.h)),
- s: Math.min(100, Math.max(0, hsb.s)),
- b: Math.min(100, Math.max(0, hsb.b))
- };
- },
- fixRGB = function (rgb) {
- return {
- r: Math.min(255, Math.max(0, rgb.r)),
- g: Math.min(255, Math.max(0, rgb.g)),
- b: Math.min(255, Math.max(0, rgb.b))
- };
- },
- fixHex = function (hex) {
- var len = 6 - hex.length;
- if (len > 0) {
- var o = [];
- for (var i=0; i<len; i++) {
- o.push('0');
- }
- o.push(hex);
- hex = o.join('');
- }
- return hex;
- },
- HexToRGB = function (hex) {
- var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
- return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
- },
- HexToHSB = function (hex) {
- return RGBToHSB(HexToRGB(hex));
- },
- RGBToHSB = function (rgb) {
- var hsb = {
- h: 0,
- s: 0,
- b: 0
- };
- var min = Math.min(rgb.r, rgb.g, rgb.b);
- var max = Math.max(rgb.r, rgb.g, rgb.b);
- var delta = max - min;
- hsb.b = max;
- if (max != 0) {
-
- }
- hsb.s = max != 0 ? 255 * delta / max : 0;
- if (hsb.s != 0) {
- if (rgb.r == max) {
- hsb.h = (rgb.g - rgb.b) / delta;
- } else if (rgb.g == max) {
- hsb.h = 2 + (rgb.b - rgb.r) / delta;
- } else {
- hsb.h = 4 + (rgb.r - rgb.g) / delta;
- }
- } else {
- hsb.h = -1;
- }
- hsb.h *= 60;
- if (hsb.h < 0) {
- hsb.h += 360;
- }
- hsb.s *= 100/255;
- hsb.b *= 100/255;
- return hsb;
- },
- HSBToRGB = function (hsb) {
- var rgb = {};
- var h = Math.round(hsb.h);
- var s = Math.round(hsb.s*255/100);
- var v = Math.round(hsb.b*255/100);
- if(s == 0) {
- rgb.r = rgb.g = rgb.b = v;
- } else {
- var t1 = v;
- var t2 = (255-s)*v/255;
- var t3 = (t1-t2)*(h%60)/60;
- if(h==360) h = 0;
- if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
- else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
- else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
- else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
- else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
- else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
- else {rgb.r=0; rgb.g=0; rgb.b=0}
- }
- return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
- },
- RGBToHex = function (rgb) {
- var hex = [
- rgb.r.toString(16),
- rgb.g.toString(16),
- rgb.b.toString(16)
- ];
- $.each(hex, function (nr, val) {
- if (val.length == 1) {
- hex[nr] = '0' + val;
- }
- });
- return hex.join('');
- },
- HSBToHex = function (hsb) {
- return RGBToHex(HSBToRGB(hsb));
- },
- restoreOriginal = function () {
- var cal = $(this).parent();
- var col = cal.data('colorpicker').origColor;
- cal.data('colorpicker').color = col;
- fillRGBFields(col, cal.get(0));
- fillHexFields(col, cal.get(0));
- fillHSBFields(col, cal.get(0));
- setSelector(col, cal.get(0));
- setHue(col, cal.get(0));
- setNewColor(col, cal.get(0));
- };
- return {
- init: function (opt) {
- opt = $.extend({}, defaults, opt||{});
- if (typeof opt.color == 'string') {
- opt.color = HexToHSB(opt.color);
- } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
- opt.color = RGBToHSB(opt.color);
- } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
- opt.color = fixHSB(opt.color);
- } else {
- return this;
- }
- return this.each(function () {
- if (!$(this).data('colorpickerId')) {
- var options = $.extend({}, opt);
- options.origColor = opt.color;
- var id = 'collorpicker_' + parseInt(Math.random() * 1000);
- $(this).data('colorpickerId', id);
- var cal = $(tpl).attr('id', id);
- if (options.flat) {
- cal.appendTo(this).show();
- } else {
- cal.appendTo(document.body);
- }
- options.fields = cal
- .find('input')
- .bind('keyup', keyDown)
- .bind('change', change)
- .bind('blur', blur)
- .bind('focus', focus);
- cal
- .find('span').bind('mousedown', downIncrement).end()
- .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
- options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
- options.selectorIndic = options.selector.find('div div');
- options.el = this;
- options.hue = cal.find('div.colorpicker_hue div');
- cal.find('div.colorpicker_hue').bind('mousedown', downHue);
- options.newColor = cal.find('div.colorpicker_new_color');
- options.currentColor = cal.find('div.colorpicker_current_color');
- cal.data('colorpicker', options);
- cal.find('div.colorpicker_submit')
- .bind('mouseenter', enterSubmit)
- .bind('mouseleave', leaveSubmit)
- .bind('click', clickSubmit);
- fillRGBFields(options.color, cal.get(0));
- fillHSBFields(options.color, cal.get(0));
- fillHexFields(options.color, cal.get(0));
- setHue(options.color, cal.get(0));
- setSelector(options.color, cal.get(0));
- setCurrentColor(options.color, cal.get(0));
- setNewColor(options.color, cal.get(0));
- if (options.flat) {
- cal.css({
- position: 'relative',
- display: 'block'
- });
- } else {
- $(this).bind(options.eventName, show);
- }
- }
- });
- },
- showPicker: function() {
- return this.each( function () {
- if ($(this).data('colorpickerId')) {
- show.apply(this);
- }
- });
- },
- hidePicker: function() {
- return this.each( function () {
- if ($(this).data('colorpickerId')) {
- $('#' + $(this).data('colorpickerId')).hide();
- }
- });
- },
- setColor: function(col) {
- if (typeof col == 'string') {
- col = HexToHSB(col);
- } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
- col = RGBToHSB(col);
- } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
- col = fixHSB(col);
- } else {
- return this;
- }
- return this.each(function(){
- if ($(this).data('colorpickerId')) {
- var cal = $('#' + $(this).data('colorpickerId'));
- cal.data('colorpicker').color = col;
- cal.data('colorpicker').origColor = col;
- fillRGBFields(col, cal.get(0));
- fillHSBFields(col, cal.get(0));
- fillHexFields(col, cal.get(0));
- setHue(col, cal.get(0));
- setSelector(col, cal.get(0));
- setCurrentColor(col, cal.get(0));
- setNewColor(col, cal.get(0));
- }
- });
- }
- };
- }();
- $.fn.extend({
- ColorPicker: ColorPicker.init,
- ColorPickerHide: ColorPicker.hidePicker,
- ColorPickerShow: ColorPicker.showPicker,
- ColorPickerSetColor: ColorPicker.setColor
- });
-})(jQuery)
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/colorpicker/js/eye.js b/javascript/libs/jquery/plugins/colorpicker/js/eye.js deleted file mode 100755 index ea70e64..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/js/eye.js +++ /dev/null @@ -1,34 +0,0 @@ -/**
- *
- * Zoomimage
- * Author: Stefan Petre www.eyecon.ro
- *
- */
-(function($){
- var EYE = window.EYE = function() {
- var _registered = {
- init: []
- };
- return {
- init: function() {
- $.each(_registered.init, function(nr, fn){
- fn.call();
- });
- },
- extend: function(prop) {
- for (var i in prop) {
- if (prop[i] != undefined) {
- this[i] = prop[i];
- }
- }
- },
- register: function(fn, type) {
- if (!_registered[type]) {
- _registered[type] = [];
- }
- _registered[type].push(fn);
- }
- };
- }();
- $(EYE.init);
-})(jQuery);
diff --git a/javascript/libs/jquery/plugins/colorpicker/js/layout.js b/javascript/libs/jquery/plugins/colorpicker/js/layout.js deleted file mode 100755 index e0dfb8f..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/js/layout.js +++ /dev/null @@ -1,67 +0,0 @@ -(function($){
- var initLayout = function() {
- var hash = window.location.hash.replace('#', '');
- var currentTab = $('ul.navigationTabs a')
- .bind('click', showTab)
- .filter('a[rel=' + hash + ']');
- if (currentTab.size() == 0) {
- currentTab = $('ul.navigationTabs a:first');
- }
- showTab.apply(currentTab.get(0));
- $('#colorpickerHolder').ColorPicker({flat: true});
- $('#colorpickerHolder2').ColorPicker({
- flat: true,
- color: '#00ff00',
- onSubmit: function(hsb, hex, rgb) {
- $('#colorSelector2 div').css('backgroundColor', '#' + hex);
- }
- });
- $('#colorpickerHolder2>div').css('position', 'absolute');
- var widt = false;
- $('#colorSelector2').bind('click', function() {
- $('#colorpickerHolder2').stop().animate({height: widt ? 0 : 173}, 500);
- widt = !widt;
- });
- $('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({
- onSubmit: function(hsb, hex, rgb, el) {
- $(el).val(hex);
- $(el).ColorPickerHide();
- },
- onBeforeShow: function () {
- $(this).ColorPickerSetColor(this.value);
- }
- })
- .bind('keyup', function(){
- $(this).ColorPickerSetColor(this.value);
- });
- $('#colorSelector').ColorPicker({
- color: '#0000ff',
- onShow: function (colpkr) {
- $(colpkr).fadeIn(500);
- return false;
- },
- onHide: function (colpkr) {
- $(colpkr).fadeOut(500);
- return false;
- },
- onChange: function (hsb, hex, rgb) {
- $('#colorSelector div').css('backgroundColor', '#' + hex);
- }
- });
- };
-
- var showTab = function(e) {
- var tabIndex = $('ul.navigationTabs a')
- .removeClass('active')
- .index(this);
- $(this)
- .addClass('active')
- .blur();
- $('div.tab')
- .hide()
- .eq(tabIndex)
- .show();
- };
-
- EYE.register(initLayout, 'init');
-})(jQuery)
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/colorpicker/js/utils.js b/javascript/libs/jquery/plugins/colorpicker/js/utils.js deleted file mode 100755 index cc7ce14..0000000 --- a/javascript/libs/jquery/plugins/colorpicker/js/utils.js +++ /dev/null @@ -1,252 +0,0 @@ -/**
- *
- * Utilities
- * Author: Stefan Petre www.eyecon.ro
- *
- */
-(function($) {
-EYE.extend({
- getPosition : function(e, forceIt)
- {
- var x = 0;
- var y = 0;
- var es = e.style;
- var restoreStyles = false;
- if (forceIt && jQuery.curCSS(e,'display') == 'none') {
- var oldVisibility = es.visibility;
- var oldPosition = es.position;
- restoreStyles = true;
- es.visibility = 'hidden';
- es.display = 'block';
- es.position = 'absolute';
- }
- var el = e;
- if (el.getBoundingClientRect) { // IE
- var box = el.getBoundingClientRect();
- x = box.left + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) - 2;
- y = box.top + Math.max(document.documentElement.scrollTop, document.body.scrollTop) - 2;
- } else {
- x = el.offsetLeft;
- y = el.offsetTop;
- el = el.offsetParent;
- if (e != el) {
- while (el) {
- x += el.offsetLeft;
- y += el.offsetTop;
- el = el.offsetParent;
- }
- }
- if (jQuery.browser.safari && jQuery.curCSS(e, 'position') == 'absolute' ) {
- x -= document.body.offsetLeft;
- y -= document.body.offsetTop;
- }
- el = e.parentNode;
- while (el && el.tagName.toUpperCase() != 'BODY' && el.tagName.toUpperCase() != 'HTML')
- {
- if (jQuery.curCSS(el, 'display') != 'inline') {
- x -= el.scrollLeft;
- y -= el.scrollTop;
- }
- el = el.parentNode;
- }
- }
- if (restoreStyles == true) {
- es.display = 'none';
- es.position = oldPosition;
- es.visibility = oldVisibility;
- }
- return {x:x, y:y};
- },
- getSize : function(e)
- {
- var w = parseInt(jQuery.curCSS(e,'width'), 10);
- var h = parseInt(jQuery.curCSS(e,'height'), 10);
- var wb = 0;
- var hb = 0;
- if (jQuery.curCSS(e, 'display') != 'none') {
- wb = e.offsetWidth;
- hb = e.offsetHeight;
- } else {
- var es = e.style;
- var oldVisibility = es.visibility;
- var oldPosition = es.position;
- es.visibility = 'hidden';
- es.display = 'block';
- es.position = 'absolute';
- wb = e.offsetWidth;
- hb = e.offsetHeight;
- es.display = 'none';
- es.position = oldPosition;
- es.visibility = oldVisibility;
- }
- return {w:w, h:h, wb:wb, hb:hb};
- },
- getClient : function(e)
- {
- var h, w;
- if (e) {
- w = e.clientWidth;
- h = e.clientHeight;
- } else {
- var de = document.documentElement;
- w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
- h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
- }
- return {w:w,h:h};
- },
- getScroll : function (e)
- {
- var t=0, l=0, w=0, h=0, iw=0, ih=0;
- if (e && e.nodeName.toLowerCase() != 'body') {
- t = e.scrollTop;
- l = e.scrollLeft;
- w = e.scrollWidth;
- h = e.scrollHeight;
- } else {
- if (document.documentElement) {
- t = document.documentElement.scrollTop;
- l = document.documentElement.scrollLeft;
- w = document.documentElement.scrollWidth;
- h = document.documentElement.scrollHeight;
- } else if (document.body) {
- t = document.body.scrollTop;
- l = document.body.scrollLeft;
- w = document.body.scrollWidth;
- h = document.body.scrollHeight;
- }
- if (typeof pageYOffset != 'undefined') {
- t = pageYOffset;
- l = pageXOffset;
- }
- iw = self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;
- ih = self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;
- }
- return { t: t, l: l, w: w, h: h, iw: iw, ih: ih };
- },
- getMargins : function(e, toInteger)
- {
- var t = jQuery.curCSS(e,'marginTop') || '';
- var r = jQuery.curCSS(e,'marginRight') || '';
- var b = jQuery.curCSS(e,'marginBottom') || '';
- var l = jQuery.curCSS(e,'marginLeft') || '';
- if (toInteger)
- return {
- t: parseInt(t, 10)||0,
- r: parseInt(r, 10)||0,
- b: parseInt(b, 10)||0,
- l: parseInt(l, 10)
- };
- else
- return {t: t, r: r, b: b, l: l};
- },
- getPadding : function(e, toInteger)
- {
- var t = jQuery.curCSS(e,'paddingTop') || '';
- var r = jQuery.curCSS(e,'paddingRight') || '';
- var b = jQuery.curCSS(e,'paddingBottom') || '';
- var l = jQuery.curCSS(e,'paddingLeft') || '';
- if (toInteger)
- return {
- t: parseInt(t, 10)||0,
- r: parseInt(r, 10)||0,
- b: parseInt(b, 10)||0,
- l: parseInt(l, 10)
- };
- else
- return {t: t, r: r, b: b, l: l};
- },
- getBorder : function(e, toInteger)
- {
- var t = jQuery.curCSS(e,'borderTopWidth') || '';
- var r = jQuery.curCSS(e,'borderRightWidth') || '';
- var b = jQuery.curCSS(e,'borderBottomWidth') || '';
- var l = jQuery.curCSS(e,'borderLeftWidth') || '';
- if (toInteger)
- return {
- t: parseInt(t, 10)||0,
- r: parseInt(r, 10)||0,
- b: parseInt(b, 10)||0,
- l: parseInt(l, 10)||0
- };
- else
- return {t: t, r: r, b: b, l: l};
- },
- traverseDOM : function(nodeEl, func)
- {
- func(nodeEl);
- nodeEl = nodeEl.firstChild;
- while(nodeEl){
- EYE.traverseDOM(nodeEl, func);
- nodeEl = nodeEl.nextSibling;
- }
- },
- getInnerWidth : function(el, scroll) {
- var offsetW = el.offsetWidth;
- return scroll ? Math.max(el.scrollWidth,offsetW) - offsetW + el.clientWidth:el.clientWidth;
- },
- getInnerHeight : function(el, scroll) {
- var offsetH = el.offsetHeight;
- return scroll ? Math.max(el.scrollHeight,offsetH) - offsetH + el.clientHeight:el.clientHeight;
- },
- getExtraWidth : function(el) {
- if($.boxModel)
- return (parseInt($.curCSS(el, 'paddingLeft'))||0)
- + (parseInt($.curCSS(el, 'paddingRight'))||0)
- + (parseInt($.curCSS(el, 'borderLeftWidth'))||0)
- + (parseInt($.curCSS(el, 'borderRightWidth'))||0);
- return 0;
- },
- getExtraHeight : function(el) {
- if($.boxModel)
- return (parseInt($.curCSS(el, 'paddingTop'))||0)
- + (parseInt($.curCSS(el, 'paddingBottom'))||0)
- + (parseInt($.curCSS(el, 'borderTopWidth'))||0)
- + (parseInt($.curCSS(el, 'borderBottomWidth'))||0);
- return 0;
- },
- isChildOf: function(parentEl, el, container) {
- if (parentEl == el) {
- return true;
- }
- if (!el || !el.nodeType || el.nodeType != 1) {
- return false;
- }
- if (parentEl.contains && !$.browser.safari) {
- return parentEl.contains(el);
- }
- if ( parentEl.compareDocumentPosition ) {
- return !!(parentEl.compareDocumentPosition(el) & 16);
- }
- var prEl = el.parentNode;
- while(prEl && prEl != container) {
- if (prEl == parentEl)
- return true;
- prEl = prEl.parentNode;
- }
- return false;
- },
- centerEl : function(el, axis)
- {
- var clientScroll = EYE.getScroll();
- var size = EYE.getSize(el);
- if (!axis || axis == 'vertically')
- $(el).css(
- {
- top: clientScroll.t + ((Math.min(clientScroll.h,clientScroll.ih) - size.hb)/2) + 'px'
- }
- );
- if (!axis || axis == 'horizontally')
- $(el).css(
- {
- left: clientScroll.l + ((Math.min(clientScroll.w,clientScroll.iw) - size.wb)/2) + 'px'
- }
- );
- }
-});
-if (!$.easing.easeout) {
- $.easing.easeout = function(p, n, firstNum, delta, duration) {
- return -delta * ((n=n/duration-1)*n*n*n - 1) + firstNum;
- };
-}
-
-})(jQuery);
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/cropper/cropper.css b/javascript/libs/jquery/plugins/cropper/cropper.css deleted file mode 100644 index 5630fd5..0000000 --- a/javascript/libs/jquery/plugins/cropper/cropper.css +++ /dev/null @@ -1,278 +0,0 @@ -/*! - * Cropper v0.7.7 - * https://github.com/fengyuanchen/cropper - * - * Copyright 2014-2015 Fengyuan Chen - * Released under the MIT license - */ - -.cropper-container { - position: relative; - overflow: hidden; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - - -webkit-tap-highlight-color: transparent; - -webkit-touch-callout: none; -} - -.cropper-container img { - width: 100%; - min-width: 0 !important; - max-width: none !important; - height: 100%; - min-height: 0 !important; - max-height: none !important; -} - -.cropper-modal, -.cropper-canvas { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -.cropper-canvas { - background-color: #fff; - filter: alpha(opacity=0); - opacity: 0; -} - -.cropper-modal { - background-color: #000; - filter: alpha(opacity=50); - opacity: .5; -} - -.cropper-dragger { - position: absolute; - top: 10%; - left: 10%; - width: 80%; - height: 80%; -} - -.cropper-viewer { - display: block; - width: 100%; - height: 100%; - overflow: hidden; - outline-width: 1px; - outline-style: solid; - outline-color: #69f; - outline-color: rgba(51, 102, 255, .75); -} - -.cropper-dashed { - position: absolute; - display: block; - filter: alpha(opacity=50); - border: 0 dashed #fff; - opacity: .5; -} - -.cropper-dashed.dashed-h { - top: 33.3%; - left: 0; - width: 100%; - height: 33.3%; - border-top-width: 1px; - border-bottom-width: 1px; -} - -.cropper-dashed.dashed-v { - top: 0; - left: 33.3%; - width: 33.3%; - height: 100%; - border-right-width: 1px; - border-left-width: 1px; -} - -.cropper-face, -.cropper-line, -.cropper-point { - position: absolute; - display: block; - width: 100%; - height: 100%; - filter: alpha(opacity=10); - opacity: .1; -} - -.cropper-face { - top: 0; - left: 0; - cursor: move; - background-color: #fff; -} - -.cropper-line { - background-color: #69f; -} - -.cropper-line.line-e { - top: 0; - right: -3px; - width: 5px; - cursor: e-resize; -} - -.cropper-line.line-n { - top: -3px; - left: 0; - height: 5px; - cursor: n-resize; -} - -.cropper-line.line-w { - top: 0; - left: -3px; - width: 5px; - cursor: w-resize; -} - -.cropper-line.line-s { - bottom: -3px; - left: 0; - height: 5px; - cursor: s-resize; -} - -.cropper-point { - width: 5px; - height: 5px; - background-color: #69f; - filter: alpha(opacity=75); - opacity: .75; -} - -.cropper-point.point-e { - top: 50%; - right: -3px; - margin-top: -3px; - cursor: e-resize; -} - -.cropper-point.point-n { - top: -3px; - left: 50%; - margin-left: -3px; - cursor: n-resize; -} - -.cropper-point.point-w { - top: 50%; - left: -3px; - margin-top: -3px; - cursor: w-resize; -} - -.cropper-point.point-s { - bottom: -3px; - left: 50%; - margin-left: -3px; - cursor: s-resize; -} - -.cropper-point.point-ne { - top: -3px; - right: -3px; - cursor: ne-resize; -} - -.cropper-point.point-nw { - top: -3px; - left: -3px; - cursor: nw-resize; -} - -.cropper-point.point-sw { - bottom: -3px; - left: -3px; - cursor: sw-resize; -} - -.cropper-point.point-se { - right: -3px; - bottom: -3px; - width: 20px; - height: 20px; - cursor: se-resize; - filter: alpha(opacity=100); - opacity: 1; -} - -.cropper-point.point-se:before { - position: absolute; - right: -50%; - bottom: -50%; - display: block; - width: 200%; - height: 200%; - content: " "; - background-color: #69f; - filter: alpha(opacity=0); - opacity: 0; -} - -@media (min-width: 768px) { - .cropper-point.point-se { - width: 15px; - height: 15px; - } -} - -@media (min-width: 992px) { - .cropper-point.point-se { - width: 10px; - height: 10px; - } -} - -@media (min-width: 1200px) { - .cropper-point.point-se { - width: 5px; - height: 5px; - filter: alpha(opacity=75); - opacity: .75; - } -} - -/* Helper classes for JavaScript */ - -.cropper-hidden { - display: none !important; -} - -.cropper-invisible { - position: fixed; - top: 0; - left: 0; - z-index: -1; - width: auto !important; - max-width: none !important; - height: auto !important; - max-height: none !important; - filter: alpha(opacity=0); - opacity: 0; -} - -.cropper-move { - cursor: move; -} - -.cropper-crop { - cursor: crosshair; -} - -.cropper-disabled .cropper-canvas, -.cropper-disabled .cropper-face, -.cropper-disabled .cropper-line, -.cropper-disabled .cropper-point { - cursor: not-allowed; -} diff --git a/javascript/libs/jquery/plugins/cropper/cropper.js b/javascript/libs/jquery/plugins/cropper/cropper.js deleted file mode 100644 index 678b309..0000000 --- a/javascript/libs/jquery/plugins/cropper/cropper.js +++ /dev/null @@ -1,1588 +0,0 @@ -/*! - * Cropper v0.7.7 - * https://github.com/fengyuanchen/cropper - * - * Copyright 2014-2015 Fengyuan Chen - * Released under the MIT license - */ - -(function (factory) { - if (typeof define === "function" && define.amd) { - // AMD. Register as anonymous module. - define(["jquery"], factory); - } else if (typeof exports === "object") { - // Node / CommonJS - factory(require("jquery")); - } else { - // Browser globals. - factory(jQuery); - } -})(function ($) { - - "use strict"; - - var $window = $(window), - $document = $(document), - location = window.location, - - // Constants - TRUE = true, - FALSE = false, - NULL = null, - NAN = NaN, - INFINITY = Infinity, - STRING_UNDEFINED = "undefined", - STRING_DIRECTIVE = "directive", - CROPPER_NAMESPACE = ".cropper", - - // RegExps - REGEXP_DIRECTIVES = /^(e|n|w|s|ne|nw|sw|se|all|crop|move|zoom)$/, - REGEXP_OPTIONS = /^(x|y|width|height)$/, - REGEXP_PROPERTIES = /^(naturalWidth|naturalHeight|width|height|aspectRatio|ratio|rotate)$/, - - // Classes - CLASS_MODAL = "cropper-modal", - CLASS_HIDDEN = "cropper-hidden", - CLASS_INVISIBLE = "cropper-invisible", - CLASS_MOVE = "cropper-move", - CLASS_CROP = "cropper-crop", - CLASS_DISABLED = "cropper-disabled", - - // Events - EVENT_MOUSE_DOWN = "mousedown touchstart", - EVENT_MOUSE_MOVE = "mousemove touchmove", - EVENT_MOUSE_UP = "mouseup mouseleave touchend touchleave touchcancel", - EVENT_WHEEL = "wheel mousewheel DOMMouseScroll", - EVENT_RESIZE = "resize" + CROPPER_NAMESPACE, // Bind to window with namespace - EVENT_DBLCLICK = "dblclick", - EVENT_BUILD = "build" + CROPPER_NAMESPACE, - EVENT_BUILT = "built" + CROPPER_NAMESPACE, - EVENT_DRAG_START = "dragstart" + CROPPER_NAMESPACE, - EVENT_DRAG_MOVE = "dragmove" + CROPPER_NAMESPACE, - EVENT_DRAG_END = "dragend" + CROPPER_NAMESPACE, - - // Functions - isNumber = function (n) { - return typeof n === "number"; - }, - - toArray = function (obj, offset) { - var args = []; - - if (typeof offset === "number") { // It's necessary for IE8 - args.push(offset); - } - - return args.slice.apply(obj, args); - }, - - // Custom proxy to avoid jQuery's guid - proxy = function (fn, context) { - var args = toArray(arguments, 2); - - return function () { - return fn.apply(context, args.concat(toArray(arguments))); - }; - }, - - addTimestamp = function (url) { - var timestamp = "timestamp=" + (new Date()).getTime(); - - return (url + (url.indexOf("?") === -1 ? "?" : "&") + timestamp); - }, - - // Constructor - Cropper = function (element, options) { - this.element = element; - this.$element = $(element); - this.defaults = $.extend({}, Cropper.DEFAULTS, $.isPlainObject(options) ? options : {}); - this.$original = NULL; - this.ready = FALSE; - this.built = FALSE; - this.cropped = FALSE; - this.rotated = FALSE; - this.disabled = FALSE; - this.replaced = FALSE; - this.init(); - }, - - // Others - sqrt = Math.sqrt, - min = Math.min, - max = Math.max, - abs = Math.abs, - sin = Math.sin, - cos = Math.cos, - num = parseFloat; - - Cropper.prototype = { - constructor: Cropper, - - support: { - canvas: $.isFunction($("<canvas>")[0].getContext) - }, - - init: function () { - var defaults = this.defaults; - - $.each(defaults, function (i, n) { - switch (i) { - case "aspectRatio": - defaults[i] = abs(num(n)) || NAN; // 0 -> NaN - break; - - case "autoCropArea": - defaults[i] = abs(num(n)) || 0.8; // 0 | NaN -> 0.8 - break; - - case "minWidth": - case "minHeight": - defaults[i] = abs(num(n)) || 0; // NaN -> 0 - break; - - case "maxWidth": - case "maxHeight": - defaults[i] = abs(num(n)) || INFINITY; // 0 | NaN -> Infinity - break; - - // No default - } - }); - - // Set default image data - this.image = { - rotate: 0 - }; - - this.load(); - }, - - load: function () { - var _this = this, - $this = this.$element, - element = this.element, - image = this.image, - crossOrigin = "", - $clone, - url; - - if ($this.is("img")) { - url = $this.prop("src"); - } else if ($this.is("canvas") && this.support.canvas) { - url = element.toDataURL(); - } - - if (!url) { - return; - } - - // Reset image rotate degree - if (this.replaced) { - image.rotate = 0; - } - - if (this.defaults.checkImageOrigin) { - if ($this.prop("crossOrigin") || this.isCrossOriginURL(url)) { - crossOrigin = " crossOrigin"; - url = addTimestamp(url); // Bust cache (#119, #148) - } - } - - this.$clone = ($clone = $("<img" + crossOrigin + ' src="' + url + '">')); - - $clone.one("load", function () { - image.naturalWidth = this.naturalWidth || $clone.width(); - image.naturalHeight = this.naturalHeight || $clone.height(); - image.aspectRatio = image.naturalWidth / image.naturalHeight; - - _this.url = url; - _this.ready = TRUE; - _this.build(); - }); - - // Hide and prepend the clone iamge to the document body (Don't append to). - $clone.addClass(CLASS_INVISIBLE).prependTo("body"); - }, - - isCrossOriginURL: function (url) { - var parts = url.match(/^(https?:)\/\/([^\:\/\?#]+):?(\d*)/i); - - if ((parts && (parts[1] !== location.protocol || parts[2] !== location.hostname || parts[3] !== location.port))) { - return TRUE; - } - - return FALSE; - }, - - build: function () { - var $this = this.$element, - defaults = this.defaults, - buildEvent, - $cropper; - - if (!this.ready) { - return; - } - - if (this.built) { - this.unbuild(); - } - - $this.one(EVENT_BUILD, defaults.build); // Only trigger once - buildEvent = $.Event(EVENT_BUILD); - $this.trigger(buildEvent); - - if (buildEvent.isDefaultPrevented()) { - return; - } - - // Create cropper elements - this.$cropper = ($cropper = $(Cropper.TEMPLATE)); - - // Hide the original image - $this.addClass(CLASS_HIDDEN); - - // Show and prepend the clone iamge to the cropper - this.$clone.removeClass(CLASS_INVISIBLE).prependTo($cropper); - - // Save original image for rotation - if (!this.rotated) { - this.$original = this.$clone.clone(); - - // Append the image to document to avoid "NS_ERROR_NOT_AVAILABLE" error on Firefox when call the "drawImage" method. - this.$original.addClass(CLASS_HIDDEN).prependTo(this.$cropper); - - this.originalImage = $.extend({}, this.image); - } - - this.$container = $this.parent(); - this.$container.append($cropper); - - this.$canvas = $cropper.find(".cropper-canvas"); - this.$dragger = $cropper.find(".cropper-dragger"); - this.$viewer = $cropper.find(".cropper-viewer"); - - defaults.autoCrop ? (this.cropped = TRUE) : this.$dragger.addClass(CLASS_HIDDEN); - defaults.modal && this.$canvas.addClass(CLASS_MODAL); - !defaults.dashed && this.$dragger.find(".cropper-dashed").addClass(CLASS_HIDDEN); - !defaults.movable && this.$dragger.find(".cropper-face").data(STRING_DIRECTIVE, "move"); - !defaults.resizable && this.$dragger.find(".cropper-line, .cropper-point").addClass(CLASS_HIDDEN); - - this.addListeners(); - this.initPreview(); - - this.built = TRUE; // Set `true` before update - defaults.dragCrop && this.setDragMode("crop"); // Set after built - this.update(); - this.replaced = FALSE; // Reset to `false` after update - - $this.one(EVENT_BUILT, defaults.built); // Only trigger once - $this.trigger(EVENT_BUILT); - }, - - unbuild: function () { - if (!this.built) { - return; - } - - this.built = FALSE; - this.removeListeners(); - - this.$preview.empty(); - this.$preview = NULL; - - this.$dragger = NULL; - this.$canvas = NULL; - this.$container = NULL; - - this.$cropper.remove(); - this.$cropper = NULL; - }, - - update: function (data) { - this.initContainer(); - this.initCropper(); - this.initImage(); - this.initDragger(); - - if (data) { - this.setData(data, TRUE); - this.setDragMode("crop"); - } else { - this.setData(this.defaults.data); - } - }, - - resize: function () { - clearTimeout(this.resizing); - this.resizing = setTimeout($.proxy(this.update, this, this.getData()), 200); - }, - - preview: function () { - var image = this.image, - dragger = this.dragger, - width = image.width, - height = image.height, - left = dragger.left - image.left, - top = dragger.top - image.top; - - this.$viewer.find("img").css({ - width: width, - height: height, - marginLeft: -left, - marginTop: -top - }); - - this.$preview.each(function () { - var $this = $(this), - ratio = $this.width() / dragger.width; - - $this.find("img").css({ - width: width * ratio, - height: height * ratio, - marginLeft: -left * ratio, - marginTop: -top * ratio - }); - }); - }, - - addListeners: function () { - var defaults = this.defaults; - - this.$element.on(EVENT_DRAG_START, defaults.dragstart).on(EVENT_DRAG_MOVE, defaults.dragmove).on(EVENT_DRAG_END, defaults.dragend); - this.$cropper.on(EVENT_MOUSE_DOWN, $.proxy(this.dragstart, this)).on(EVENT_DBLCLICK, $.proxy(this.dblclick, this)); - - if (defaults.zoomable) { - this.$cropper.on(EVENT_WHEEL, $.proxy(this.wheel, this)); - } - - if (defaults.multiple) { - this.$cropper.on(EVENT_MOUSE_MOVE, $.proxy(this.dragmove, this)).on(EVENT_MOUSE_UP, $.proxy(this.dragend, this)); - } else { - $document.on(EVENT_MOUSE_MOVE, (this._dragmove = proxy(this.dragmove, this))).on(EVENT_MOUSE_UP, (this._dragend = proxy(this.dragend, this))); - } - - $window.on(EVENT_RESIZE, (this._resize = proxy(this.resize, this))); - }, - - removeListeners: function () { - var defaults = this.defaults; - - this.$element.off(EVENT_DRAG_START, defaults.dragstart).off(EVENT_DRAG_MOVE, defaults.dragmove).off(EVENT_DRAG_END, defaults.dragend); - this.$cropper.off(EVENT_MOUSE_DOWN, this.dragstart).off(EVENT_DBLCLICK, this.dblclick); - - if (defaults.zoomable) { - this.$cropper.off(EVENT_WHEEL, this.wheel); - } - - if (defaults.multiple) { - this.$cropper.off(EVENT_MOUSE_MOVE, this.dragmove).off(EVENT_MOUSE_UP, this.dragend); - } else { - $document.off(EVENT_MOUSE_MOVE, this._dragmove).off(EVENT_MOUSE_UP, this._dragend); - } - - $window.off(EVENT_RESIZE, this._resize); - }, - - initPreview: function () { - var img = '<img src="' + this.url + '">'; - - this.$preview = $(this.defaults.preview); - this.$viewer.html(img); - this.$preview.html(img).find("img").css("cssText", "min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;"); - }, - - initContainer: function () { - var $container = this.$container; - - this.container = { - width: max($container.width(), 300), - height: max($container.height(), 150) - }; - }, - - initCropper: function () { - var container = this.container, - image = this.image, - cropper; - - if (((image.naturalWidth * container.height / image.naturalHeight) - container.width) >= 0) { - cropper = { - width: container.width, - height: container.width / image.aspectRatio, - left: 0 - }; - - cropper.top = (container.height - cropper.height) / 2; - } else { - cropper = { - width: container.height * image.aspectRatio, - height: container.height, - top: 0 - }; - - cropper.left = (container.width - cropper.width) / 2; - } - - this.$cropper.css({ - width: cropper.width, - height: cropper.height, - left: cropper.left, - top: cropper.top - }); - - this.cropper = cropper; - }, - - initImage: function () { - var image = this.image, - cropper = this.cropper, - defaultImage = { - _width: cropper.width, - _height: cropper.height, - width: cropper.width, - height: cropper.height, - left: 0, - top: 0, - ratio: cropper.width / image.naturalWidth - }; - - this.defaultImage = $.extend({}, image, defaultImage); - - if (image._width !== cropper.width || image._height !== cropper.height) { - $.extend(image, defaultImage); - } else { - image = $.extend({}, defaultImage, image); - - // Reset image ratio - if (this.replaced) { - image.ratio = defaultImage.ratio; - } - } - - this.image = image; - this.renderImage(); - }, - - renderImage: function (mode) { - var image = this.image; - - if (mode === "zoom") { - image.left -= (image.width - image.oldWidth) / 2; - image.top -= (image.height - image.oldHeight) / 2; - } - - image.left = min(max(image.left, image._width - image.width), 0); - image.top = min(max(image.top, image._height - image.height), 0); - - this.$clone.css({ - width: image.width, - height: image.height, - marginLeft: image.left, - marginTop: image.top - }); - - if (mode) { - this.defaults.done(this.getData()); - this.preview(); - } - }, - - initDragger: function () { - var defaults = this.defaults, - cropper = this.cropper, - // If not set, use the original aspect ratio of the image. - aspectRatio = defaults.aspectRatio || this.image.aspectRatio, - ratio = this.image.ratio, - autoCropDragger, - dragger; - - if (((cropper.height * aspectRatio) - cropper.width) >= 0) { - dragger = { - height: cropper.width / aspectRatio, - width: cropper.width, - left: 0, - top: (cropper.height - (cropper.width / aspectRatio)) / 2, - maxWidth: cropper.width, - maxHeight: cropper.width / aspectRatio - }; - } else { - dragger = { - height: cropper.height, - width: cropper.height * aspectRatio, - left: (cropper.width - (cropper.height * aspectRatio)) / 2, - top: 0, - maxWidth: cropper.height * aspectRatio, - maxHeight: cropper.height - }; - } - - dragger.minWidth = 0; - dragger.minHeight = 0; - - if (defaults.aspectRatio) { - if (isFinite(defaults.maxWidth)) { - dragger.maxWidth = min(dragger.maxWidth, defaults.maxWidth * ratio); - dragger.maxHeight = dragger.maxWidth / aspectRatio; - } else if (isFinite(defaults.maxHeight)) { - dragger.maxHeight = min(dragger.maxHeight, defaults.maxHeight * ratio); - dragger.maxWidth = dragger.maxHeight * aspectRatio; - } - - if (defaults.minWidth > 0) { - dragger.minWidth = max(0, defaults.minWidth * ratio); - dragger.minHeight = dragger.minWidth / aspectRatio; - } else if (defaults.minHeight > 0) { - dragger.minHeight = max(0, defaults.minHeight * ratio); - dragger.minWidth = dragger.minHeight * aspectRatio; - } - } else { - dragger.maxWidth = min(dragger.maxWidth, defaults.maxWidth * ratio); - dragger.maxHeight = min(dragger.maxHeight, defaults.maxHeight * ratio); - dragger.minWidth = max(0, defaults.minWidth * ratio); - dragger.minHeight = max(0, defaults.minHeight * ratio); - } - - // minWidth can't be greater than maxWidth, and minHeight too. - dragger.minWidth = min(dragger.maxWidth, dragger.minWidth); - dragger.minHeight = min(dragger.maxHeight, dragger.minHeight); - - // Center the dragger by default - autoCropDragger = $.extend({}, dragger); - autoCropDragger.height = dragger.height * defaults.autoCropArea; - autoCropDragger.width = dragger.width * defaults.autoCropArea; - autoCropDragger.left = (cropper.width - autoCropDragger.width) / 2; - autoCropDragger.top = (cropper.height - autoCropDragger.height) / 2; - - autoCropDragger.oldLeft = dragger.oldLeft = dragger.left; - autoCropDragger.oldTop = dragger.oldTop = dragger.top; - - this.autoCropDragger = autoCropDragger; - this.defaultDragger = $.extend({}, dragger); - this.dragger = dragger; - }, - - renderDragger: function () { - var dragger = this.dragger, - cropper = this.cropper; - - if (dragger.width > dragger.maxWidth) { - dragger.width = dragger.maxWidth; - dragger.left = dragger.oldLeft; - } else if (dragger.width < dragger.minWidth) { - dragger.width = dragger.minWidth; - dragger.left = dragger.oldLeft; - } - - if (dragger.height > dragger.maxHeight) { - dragger.height = dragger.maxHeight; - dragger.top = dragger.oldTop; - } else if (dragger.height < dragger.minHeight) { - dragger.height = dragger.minHeight; - dragger.top = dragger.oldTop; - } - - dragger.left = min(max(dragger.left, 0), cropper.width - dragger.width); - dragger.top = min(max(dragger.top, 0), cropper.height - dragger.height); - dragger.oldLeft = dragger.left; - dragger.oldTop = dragger.top; - - // Re-render the dragger - this.dragger = dragger; - - if (!this.disabled) { - this.defaults.done(this.getData()); - } - - this.$dragger.css({ - width: dragger.width, - height: dragger.height, - left: dragger.left, - top: dragger.top - }); - - this.preview(); - }, - - reset: function (deep) { - if (!this.cropped) { - return; - } - - if (deep) { - this.defaults.data = {}; - } - - this.image = $.extend({}, this.defaultImage); - this.renderImage(); - this.dragger = $.extend({}, this.defaultDragger); - this.setData(this.defaults.data); - }, - - clear: function () { - if (!this.cropped) { - return; - } - - this.cropped = FALSE; - - this.setData({ - x: 0, - y: 0, - width: 0, - height: 0 - }); - - this.$canvas.removeClass(CLASS_MODAL); - this.$dragger.addClass(CLASS_HIDDEN); - }, - - destroy: function () { - var $this = this.$element; - - if (!this.ready) { - return; - } - - this.unbuild(); - $this.removeClass(CLASS_HIDDEN).removeData("cropper"); - - if (this.rotated) { - $this.attr("src", this.$original.attr("src")); - } - }, - - replace: function (url, /*INTERNAL*/ rotated) { - var _this = this, - $this = this.$element, - element = this.element, - context; - - if (url && url !== this.url && url !== $this.attr("src")) { - if (!rotated) { - this.rotated = FALSE; - this.replaced = TRUE; - } - - if ($this.is("img")) { - $this.attr("src", url); - this.load(); - } else if ($this.is("canvas") && this.support.canvas) { - context = element.getContext("2d"); - - $('<img src="' + url + '">').one("load", function () { - element.width = this.width; - element.height = this.height; - context.clearRect(0, 0, element.width, element.height); - context.drawImage(this, 0, 0); - _this.load(); - }); - } - } - }, - - setData: function (data, /*INTERNAL*/ once) { - var cropper = this.cropper, - dragger = this.dragger, - image = this.image, - aspectRatio = this.defaults.aspectRatio; - - if (!this.built || typeof data === STRING_UNDEFINED) { - return; - } - - if (data === NULL || $.isEmptyObject(data)) { - dragger = $.extend({}, this.autoCropDragger); - } - - if ($.isPlainObject(data) && !$.isEmptyObject(data)) { - - if (!once) { - this.defaults.data = data; - } - - data = this.transformData(data); - - if (isNumber(data.x) && data.x <= cropper.width - image.left) { - dragger.left = data.x + image.left; - } - - if (isNumber(data.y) && data.y <= cropper.height - image.top) { - dragger.top = data.y + image.top; - } - - if (aspectRatio) { - if (isNumber(data.width) && data.width <= dragger.maxWidth && data.width >= dragger.minWidth) { - dragger.width = data.width; - dragger.height = dragger.width / aspectRatio; - } else if (isNumber(data.height) && data.height <= dragger.maxHeight && data.height >= dragger.minHeight) { - dragger.height = data.height; - dragger.width = dragger.height * aspectRatio; - } - } else { - if (isNumber(data.width) && data.width <= dragger.maxWidth && data.width >= dragger.minWidth) { - dragger.width = data.width; - } - - if (isNumber(data.height) && data.height <= dragger.maxHeight && data.height >= dragger.minHeight) { - dragger.height = data.height; - } - } - } - - this.dragger = dragger; - this.renderDragger(); - }, - - getData: function (rounded) { - var dragger = this.dragger, - image = this.image, - data = {}; - - if (this.built) { - data = { - x: dragger.left - image.left, - y: dragger.top - image.top, - width: dragger.width, - height: dragger.height - }; - - data = this.transformData(data, TRUE, rounded); - } - - return data; - }, - - transformData: function (data, reversed, rounded) { - var ratio = this.image.ratio, - result = {}; - - $.each(data, function (i, n) { - n = num(n); - - if (REGEXP_OPTIONS.test(i) && !isNaN(n)) { - result[i] = reversed ? (rounded ? Math.round(n / ratio) : n / ratio) : n * ratio; - } - }); - - return result; - }, - - setAspectRatio: function (aspectRatio) { - var freeRatio = aspectRatio === "auto"; - - aspectRatio = num(aspectRatio); - - if (freeRatio || (!isNaN(aspectRatio) && aspectRatio > 0)) { - this.defaults.aspectRatio = freeRatio ? NAN : aspectRatio; - - if (this.built) { - this.initDragger(); - this.renderDragger(); - } - } - }, - - getImageData: function () { - var data = {}; - - if (this.ready) { - $.each(this.image, function (name, value) { - if (REGEXP_PROPERTIES.test(name)) { - data[name] = value; - } - }); - } - - return data; - }, - - getDataURL: function (options, type, quality) { - var canvas = $("<canvas>")[0], - data = this.getData(), - dataURL = "", - context; - - if (!$.isPlainObject(options)) { - quality = type; - type = options; - options = {}; - } - - options = $.extend({ - width: data.width, - height: data.height - }, options); - - if (this.cropped && this.support.canvas) { - canvas.width = options.width; - canvas.height = options.height; - context = canvas.getContext("2d"); - - if (type === "image/jpeg") { - context.fillStyle = "#fff"; - context.fillRect(0, 0, options.width, options.height); - } - - context.drawImage(this.$clone[0], data.x, data.y, data.width, data.height, 0, 0, options.width, options.height); - dataURL = canvas.toDataURL(type, quality); - } - - return dataURL; - }, - - setDragMode: function (mode) { - var $canvas = this.$canvas, - defaults = this.defaults, - cropable = FALSE, - movable = FALSE; - - if (!this.built || this.disabled) { - return; - } - - switch (mode) { - case "crop": - if (defaults.dragCrop) { - cropable = TRUE; - $canvas.data(STRING_DIRECTIVE, mode); - } - - break; - - case "move": - movable = TRUE; - $canvas.data(STRING_DIRECTIVE, mode); - - break; - - default: - $canvas.removeData(STRING_DIRECTIVE); - } - - $canvas.toggleClass(CLASS_CROP, cropable).toggleClass(CLASS_MOVE, movable); - }, - - enable: function () { - if (this.built) { - this.disabled = FALSE; - this.$cropper.removeClass(CLASS_DISABLED); - } - }, - - disable: function () { - if (this.built) { - this.disabled = TRUE; - this.$cropper.addClass(CLASS_DISABLED); - } - }, - - rotate: function (degree) { - var image = this.image; - - degree = num(degree) || 0; - - if (!this.built || degree === 0 || this.disabled || !this.defaults.rotatable || !this.support.canvas) { - return; - } - - this.rotated = TRUE; - degree = (image.rotate = (image.rotate + degree) % 360); - - // replace with "true" to prevent to override the original image - this.replace(this.getRotatedDataURL(degree), true); - }, - - getRotatedDataURL: function (degree) { - var canvas = $("<canvas>")[0], - context = canvas.getContext("2d"), - arc = degree * Math.PI / 180, - deg = abs(degree) % 180, - acuteAngle = deg > 90 ? (180 - deg) : deg, - acuteAngleArc = acuteAngle * Math.PI / 180, - originalImage = this.originalImage, - naturalWidth = originalImage.naturalWidth, - naturalHeight = originalImage.naturalHeight, - width = abs(naturalWidth * cos(acuteAngleArc) + naturalHeight * sin(acuteAngleArc)), - height = abs(naturalWidth * sin(acuteAngleArc) + naturalHeight * cos(acuteAngleArc)); - - canvas.width = width; - canvas.height = height; - context.save(); - context.translate(width / 2, height / 2); - context.rotate(arc); - context.drawImage(this.$original[0], -naturalWidth / 2, -naturalHeight / 2, naturalWidth, naturalHeight); - context.restore(); - - return canvas.toDataURL(); - }, - - zoom: function (delta) { - var image = this.image, - width, - height, - range; - - delta = num(delta); - - if (!this.built || !delta || this.disabled || !this.defaults.zoomable) { - return; - } - - width = image.width * (1 + delta); - height = image.height * (1 + delta); - range = width / image._width; - - if (range > 10) { - return; - } - - if (range < 1) { - width = image._width; - height = image._height; - } - - if (range <= 1) { - this.setDragMode("crop"); - } else { - this.setDragMode("move"); - } - - image.oldWidth = image.width; - image.oldHeight = image.height; - - image.width = width; - image.height = height; - image.ratio = image.width / image.naturalWidth; - - this.renderImage("zoom"); - }, - - dblclick: function () { - if (this.disabled) { - return; - } - - if (this.$canvas.hasClass(CLASS_CROP)) { - this.setDragMode("move"); - } else { - this.setDragMode("crop"); - } - }, - - wheel: function (event) { - var e = event.originalEvent, - msDeltaY = 117.25, // IE - mozDelatY = 5, // Firefox - webkitDelatY = 166.66665649414062, // Chrome, Opera - zoomDelta = 0.1, // 10% - delta; - - if (this.disabled) { - return; - } - - event.preventDefault(); - - if (e.deltaY) { - delta = e.deltaY; - delta = delta % mozDelatY === 0 ? delta / mozDelatY : delta % msDeltaY === 0 ? delta / msDeltaY : delta / webkitDelatY; - } else { - delta = e.wheelDelta ? -e.wheelDelta / 120 : (e.detail ? e.detail / 3 : 0); - } - - this.zoom(delta * zoomDelta); - }, - - dragstart: function (event) { - var touches = event.originalEvent.touches, - e = event, - directive, - dragStartEvent, - touchesLength; - - if (this.disabled) { - return; - } - - if (touches) { - touchesLength = touches.length; - - if (touchesLength > 1) { - if (this.defaults.zoomable && touchesLength === 2) { - e = touches[1]; - this.startX2 = e.pageX; - this.startY2 = e.pageY; - directive = "zoom"; - } else { - return; - } - } - - e = touches[0]; - } - - directive = directive || $(e.target).data(STRING_DIRECTIVE); - - if (REGEXP_DIRECTIVES.test(directive)) { - event.preventDefault(); - - dragStartEvent = $.Event(EVENT_DRAG_START); - this.$element.trigger(dragStartEvent); - - if (dragStartEvent.isDefaultPrevented()) { - return; - } - - this.directive = directive; - this.cropping = FALSE; - this.startX = e.pageX; - this.startY = e.pageY; - - if (directive === "crop") { - this.cropping = TRUE; - this.$canvas.addClass(CLASS_MODAL); - } - } - }, - - dragmove: function (event) { - var touches = event.originalEvent.touches, - e = event, - dragMoveEvent, - touchesLength; - - if (this.disabled) { - return; - } - - if (touches) { - touchesLength = touches.length; - - if (touchesLength > 1) { - if (this.defaults.zoomable && touchesLength === 2) { - e = touches[1]; - this.endX2 = e.pageX; - this.endY2 = e.pageY; - } else { - return; - } - } - - e = touches[0]; - } - - if (this.directive) { - event.preventDefault(); - - dragMoveEvent = $.Event(EVENT_DRAG_MOVE); - this.$element.trigger(dragMoveEvent); - - if (dragMoveEvent.isDefaultPrevented()) { - return; - } - - this.endX = e.pageX; - this.endY = e.pageY; - - this.dragging(); - } - }, - - dragend: function (event) { - var dragEndEvent; - - if (this.disabled) { - return; - } - - if (this.directive) { - event.preventDefault(); - - dragEndEvent = $.Event(EVENT_DRAG_END); - this.$element.trigger(dragEndEvent); - - if (dragEndEvent.isDefaultPrevented()) { - return; - } - - if (this.cropping) { - this.cropping = FALSE; - this.$canvas.toggleClass(CLASS_MODAL, this.cropped && this.defaults.modal); - } - - this.directive = ""; - } - }, - - dragging: function () { - var directive = this.directive, - image = this.image, - cropper = this.cropper, - maxWidth = cropper.width, - maxHeight = cropper.height, - dragger = this.dragger, - width = dragger.width, - height = dragger.height, - left = dragger.left, - top = dragger.top, - right = left + width, - bottom = top + height, - renderable = TRUE, - defaults = this.defaults, - aspectRatio = defaults.aspectRatio, - range = { - x: this.endX - this.startX, - y: this.endY - this.startY - }, - offset; - - if (aspectRatio) { - range.X = range.y * aspectRatio; - range.Y = range.x / aspectRatio; - } - - switch (directive) { - // Move dragger - case "all": - left += range.x; - top += range.y; - - break; - - // Resize dragger - case "e": - if (range.x >= 0 && (right >= maxWidth || aspectRatio && (top <= 0 || bottom >= maxHeight))) { - renderable = FALSE; - break; - } - - width += range.x; - - if (aspectRatio) { - height = width / aspectRatio; - top -= range.Y / 2; - } - - if (width < 0) { - directive = "w"; - width = 0; - } - - break; - - case "n": - if (range.y <= 0 && (top <= 0 || aspectRatio && (left <= 0 || right >= maxWidth))) { - renderable = FALSE; - break; - } - - height -= range.y; - top += range.y; - - if (aspectRatio) { - width = height * aspectRatio; - left += range.X / 2; - } - - if (height < 0) { - directive = "s"; - height = 0; - } - - break; - - case "w": - if (range.x <= 0 && (left <= 0 || aspectRatio && (top <= 0 || bottom >= maxHeight))) { - renderable = FALSE; - break; - } - - width -= range.x; - left += range.x; - - if (aspectRatio) { - height = width / aspectRatio; - top += range.Y / 2; - } - - if (width < 0) { - directive = "e"; - width = 0; - } - - break; - - case "s": - if (range.y >= 0 && (bottom >= maxHeight || aspectRatio && (left <= 0 || right >= maxWidth))) { - renderable = FALSE; - break; - } - - height += range.y; - - if (aspectRatio) { - width = height * aspectRatio; - left -= range.X / 2; - } - - if (height < 0) { - directive = "n"; - height = 0; - } - - break; - - case "ne": - if (aspectRatio) { - if (range.y <= 0 && (top <= 0 || right >= maxWidth)) { - renderable = FALSE; - break; - } - - height -= range.y; - top += range.y; - width = height * aspectRatio; - } else { - if (range.x >= 0) { - if (right < maxWidth) { - width += range.x; - } else if (range.y <= 0 && top <= 0) { - renderable = FALSE; - } - } else { - width += range.x; - } - - if (range.y <= 0) { - if (top > 0) { - height -= range.y; - top += range.y; - } - } else { - height -= range.y; - top += range.y; - } - } - - if (height < 0) { - directive = "sw"; - height = 0; - width = 0; - } - - break; - - case "nw": - if (aspectRatio) { - if (range.y <= 0 && (top <= 0 || left <= 0)) { - renderable = FALSE; - break; - } - - height -= range.y; - top += range.y; - width = height * aspectRatio; - left += range.X; - } else { - if (range.x <= 0) { - if (left > 0) { - width -= range.x; - left += range.x; - } else if (range.y <= 0 && top <= 0) { - renderable = FALSE; - } - } else { - width -= range.x; - left += range.x; - } - - if (range.y <= 0) { - if (top > 0) { - height -= range.y; - top += range.y; - } - } else { - height -= range.y; - top += range.y; - } - } - - if (height < 0) { - directive = "se"; - height = 0; - width = 0; - } - - break; - - case "sw": - if (aspectRatio) { - if (range.x <= 0 && (left <= 0 || bottom >= maxHeight)) { - renderable = FALSE; - break; - } - - width -= range.x; - left += range.x; - height = width / aspectRatio; - } else { - if (range.x <= 0) { - if (left > 0) { - width -= range.x; - left += range.x; - } else if (range.y >= 0 && bottom >= maxHeight) { - renderable = FALSE; - } - } else { - width -= range.x; - left += range.x; - } - - if (range.y >= 0) { - if (bottom < maxHeight) { - height += range.y; - } - } else { - height += range.y; - } - } - - if (width < 0) { - directive = "ne"; - height = 0; - width = 0; - } - - break; - - case "se": - if (aspectRatio) { - if (range.x >= 0 && (right >= maxWidth || bottom >= maxHeight)) { - renderable = FALSE; - break; - } - - width += range.x; - height = width / aspectRatio; - } else { - if (range.x >= 0) { - if (right < maxWidth) { - width += range.x; - } else if (range.y >= 0 && bottom >= maxHeight) { - renderable = FALSE; - } - } else { - width += range.x; - } - - if (range.y >= 0) { - if (bottom < maxHeight) { - height += range.y; - } - } else { - height += range.y; - } - } - - if (width < 0) { - directive = "nw"; - height = 0; - width = 0; - } - - break; - - // Move image - case "move": - image.left += range.x; - image.top += range.y; - this.renderImage("move"); - renderable = FALSE; - - break; - - // Scale image - case "zoom": - if (defaults.zoomable) { - this.zoom(function (x, y, x1, y1, x2, y2) { - return (sqrt(x2 * x2 + y2 * y2) - sqrt(x1 * x1 + y1 * y1)) / sqrt(x * x + y * y); - }( - image.width, - image.height, - abs(this.startX - this.startX2), - abs(this.startY - this.startY2), - abs(this.endX - this.endX2), - abs(this.endY - this.endY2) - )); - - this.endX2 = this.startX2; - this.endY2 = this.startY2; - } - - break; - - // Crop image - case "crop": - if (range.x && range.y) { - offset = this.$cropper.offset(); - left = this.startX - offset.left; - top = this.startY - offset.top; - width = dragger.minWidth; - height = dragger.minHeight; - - if (range.x > 0) { - if (range.y > 0) { - directive = "se"; - } else { - directive = "ne"; - top -= height; - } - } else { - if (range.y > 0) { - directive = "sw"; - left -= width; - } else { - directive = "nw"; - left -= width; - top -= height; - } - } - - // Show the dragger if is hidden - if (!this.cropped) { - this.cropped = TRUE; - this.$dragger.removeClass(CLASS_HIDDEN); - } - } - - break; - - // No default - } - - if (renderable) { - dragger.width = width; - dragger.height = height; - dragger.left = left; - dragger.top = top; - this.directive = directive; - - this.renderDragger(); - } - - // Override - this.startX = this.endX; - this.startY = this.endY; - } - }; - - // Use the string compressor: Strmin (https://github.com/fengyuanchen/strmin) - Cropper.TEMPLATE = (function (source, words) { - words = words.split(","); - return source.replace(/\d+/g, function (i) { - return words[i]; - }); - })('<0 6="5-container"><0 6="5-canvas"></0><0 6="5-dragger"><1 6="5-viewer"></1><1 6="5-8 8-h"></1><1 6="5-8 8-v"></1><1 6="5-face" 3-2="all"></1><1 6="5-7 7-e" 3-2="e"></1><1 6="5-7 7-n" 3-2="n"></1><1 6="5-7 7-w" 3-2="w"></1><1 6="5-7 7-s" 3-2="s"></1><1 6="5-4 4-e" 3-2="e"></1><1 6="5-4 4-n" 3-2="n"></1><1 6="5-4 4-w" 3-2="w"></1><1 6="5-4 4-s" 3-2="s"></1><1 6="5-4 4-ne" 3-2="ne"></1><1 6="5-4 4-nw" 3-2="nw"></1><1 6="5-4 4-sw" 3-2="sw"></1><1 6="5-4 4-se" 3-2="se"></1></0></0>', "div,span,directive,data,point,cropper,class,line,dashed"); - - /* Template source: - <div class="cropper-container"> - <div class="cropper-canvas"></div> - <div class="cropper-dragger"> - <span class="cropper-viewer"></span> - <span class="cropper-dashed dashed-h"></span> - <span class="cropper-dashed dashed-v"></span> - <span class="cropper-face" data-directive="all"></span> - <span class="cropper-line line-e" data-directive="e"></span> - <span class="cropper-line line-n" data-directive="n"></span> - <span class="cropper-line line-w" data-directive="w"></span> - <span class="cropper-line line-s" data-directive="s"></span> - <span class="cropper-point point-e" data-directive="e"></span> - <span class="cropper-point point-n" data-directive="n"></span> - <span class="cropper-point point-w" data-directive="w"></span> - <span class="cropper-point point-s" data-directive="s"></span> - <span class="cropper-point point-ne" data-directive="ne"></span> - <span class="cropper-point point-nw" data-directive="nw"></span> - <span class="cropper-point point-sw" data-directive="sw"></span> - <span class="cropper-point point-se" data-directive="se"></span> - </div> - </div> - */ - - Cropper.DEFAULTS = { - // Basic - aspectRatio: "auto", - autoCropArea: 0.8, // 80% - data: { - // x: 0, - // y: 0, - // width: 300, - // height: 150 - }, - done: $.noop, - preview: "", - - // Toggles - multiple: FALSE, - autoCrop: TRUE, - dragCrop: TRUE, - dashed: TRUE, - modal: TRUE, - movable: TRUE, - resizable: TRUE, - zoomable: TRUE, - rotatable: TRUE, - checkImageOrigin: TRUE, - - // Dimensions - minWidth: 0, - minHeight: 0, - maxWidth: INFINITY, - maxHeight: INFINITY, - - // Events - build: NULL, - built: NULL, - dragstart: NULL, - dragmove: NULL, - dragend: NULL - }; - - Cropper.setDefaults = function (options) { - $.extend(Cropper.DEFAULTS, options); - }; - - // Save the other cropper - Cropper.other = $.fn.cropper; - - // Register as jQuery plugin - $.fn.cropper = function (options) { - var args = toArray(arguments, 1), - result; - - this.each(function () { - var $this = $(this), - data = $this.data("cropper"), - fn; - - if (!data) { - $this.data("cropper", (data = new Cropper(this, options))); - } - - if (typeof options === "string" && $.isFunction((fn = data[options]))) { - result = fn.apply(data, args); - } - }); - - return (typeof result !== STRING_UNDEFINED ? result : this); - }; - - $.fn.cropper.Constructor = Cropper; - $.fn.cropper.setDefaults = Cropper.setDefaults; - - // No conflict - $.fn.cropper.noConflict = function () { - $.fn.cropper = Cropper.other; - return this; - }; -}); diff --git a/javascript/libs/jquery/plugins/cropper/cropper.min.css b/javascript/libs/jquery/plugins/cropper/cropper.min.css deleted file mode 100644 index 176b533..0000000 --- a/javascript/libs/jquery/plugins/cropper/cropper.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Cropper v0.7.7 - * https://github.com/fengyuanchen/cropper - * - * Copyright 2014-2015 Fengyuan Chen - * Released under the MIT license - */ - -.cropper-container{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.cropper-container img{width:100%;height:100%;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important}.cropper-modal,.cropper-canvas{position:absolute;top:0;right:0;bottom:0;left:0}.cropper-canvas{background-color:#fff;opacity:0;filter:alpha(opacity=0)}.cropper-modal{background-color:#000;opacity:.5;filter:alpha(opacity=50)}.cropper-dragger{position:absolute;top:10%;left:10%;width:80%;height:80%}.cropper-viewer{display:block;width:100%;height:100%;overflow:hidden;outline-width:1px;outline-style:solid;outline-color:#69f;outline-color:rgba(51,102,255,.75)}.cropper-dashed{position:absolute;display:block;border:0 dashed #fff;opacity:.5;filter:alpha(opacity=50)}.cropper-dashed.dashed-h{top:33.3%;left:0;width:100%;height:33.3%;border-top-width:1px;border-bottom-width:1px}.cropper-dashed.dashed-v{top:0;left:33.3%;width:33.3%;height:100%;border-right-width:1px;border-left-width:1px}.cropper-face,.cropper-line,.cropper-point{position:absolute;display:block;width:100%;height:100%;opacity:.1;filter:alpha(opacity=10)}.cropper-face{top:0;left:0;cursor:move;background-color:#fff}.cropper-line{background-color:#69f}.cropper-line.line-e{top:0;right:-3px;width:5px;cursor:e-resize}.cropper-line.line-n{top:-3px;left:0;height:5px;cursor:n-resize}.cropper-line.line-w{top:0;left:-3px;width:5px;cursor:w-resize}.cropper-line.line-s{bottom:-3px;left:0;height:5px;cursor:s-resize}.cropper-point{width:5px;height:5px;background-color:#69f;opacity:.75;filter:alpha(opacity=75)}.cropper-point.point-e{top:50%;right:-3px;margin-top:-3px;cursor:e-resize}.cropper-point.point-n{top:-3px;left:50%;margin-left:-3px;cursor:n-resize}.cropper-point.point-w{top:50%;left:-3px;margin-top:-3px;cursor:w-resize}.cropper-point.point-s{bottom:-3px;left:50%;margin-left:-3px;cursor:s-resize}.cropper-point.point-ne{top:-3px;right:-3px;cursor:ne-resize}.cropper-point.point-nw{top:-3px;left:-3px;cursor:nw-resize}.cropper-point.point-sw{bottom:-3px;left:-3px;cursor:sw-resize}.cropper-point.point-se{right:-3px;bottom:-3px;width:20px;height:20px;cursor:se-resize;opacity:1;filter:alpha(opacity=100)}.cropper-point.point-se:before{position:absolute;right:-50%;bottom:-50%;display:block;width:200%;height:200%;content:" ";background-color:#69f;opacity:0;filter:alpha(opacity=0)}@media (min-width:768px){.cropper-point.point-se{width:15px;height:15px}}@media (min-width:992px){.cropper-point.point-se{width:10px;height:10px}}@media (min-width:1200px){.cropper-point.point-se{width:5px;height:5px;opacity:.75;filter:alpha(opacity=75)}}.cropper-hidden{display:none!important}.cropper-invisible{position:fixed;top:0;left:0;z-index:-1;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;opacity:0;filter:alpha(opacity=0)}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-canvas,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/cropper/cropper.min.js b/javascript/libs/jquery/plugins/cropper/cropper.min.js deleted file mode 100644 index 01cabc0..0000000 --- a/javascript/libs/jquery/plugins/cropper/cropper.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Cropper v0.7.7 - * https://github.com/fengyuanchen/cropper - * - * Copyright 2014-2015 Fengyuan Chen - * Released under the MIT license - */ - -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){"use strict";var b=a(window),c=a(document),d=window.location,e=!0,f=!1,g=null,h=0/0,i=1/0,j="undefined",k="directive",l=".cropper",m=/^(e|n|w|s|ne|nw|sw|se|all|crop|move|zoom)$/,n=/^(x|y|width|height)$/,o=/^(naturalWidth|naturalHeight|width|height|aspectRatio|ratio|rotate)$/,p="cropper-modal",q="cropper-hidden",r="cropper-invisible",s="cropper-move",t="cropper-crop",u="cropper-disabled",v="mousedown touchstart",w="mousemove touchmove",x="mouseup mouseleave touchend touchleave touchcancel",y="wheel mousewheel DOMMouseScroll",z="resize"+l,A="dblclick",B="build"+l,C="built"+l,D="dragstart"+l,E="dragmove"+l,F="dragend"+l,G=function(a){return"number"==typeof a},H=function(a,b){var c=[];return"number"==typeof b&&c.push(b),c.slice.apply(a,c)},I=function(a,b){var c=H(arguments,2);return function(){return a.apply(b,c.concat(H(arguments)))}},J=function(a){var b="timestamp="+(new Date).getTime();return a+(-1===a.indexOf("?")?"?":"&")+b},K=function(b,c){this.element=b,this.$element=a(b),this.defaults=a.extend({},K.DEFAULTS,a.isPlainObject(c)?c:{}),this.$original=g,this.ready=f,this.built=f,this.cropped=f,this.rotated=f,this.disabled=f,this.replaced=f,this.init()},L=Math.sqrt,M=Math.min,N=Math.max,O=Math.abs,P=Math.sin,Q=Math.cos,R=parseFloat;K.prototype={constructor:K,support:{canvas:a.isFunction(a("<canvas>")[0].getContext)},init:function(){var b=this.defaults;a.each(b,function(a,c){switch(a){case"aspectRatio":b[a]=O(R(c))||h;break;case"autoCropArea":b[a]=O(R(c))||.8;break;case"minWidth":case"minHeight":b[a]=O(R(c))||0;break;case"maxWidth":case"maxHeight":b[a]=O(R(c))||i}}),this.image={rotate:0},this.load()},load:function(){var b,c,d=this,f=this.$element,g=this.element,h=this.image,i="";f.is("img")?c=f.prop("src"):f.is("canvas")&&this.support.canvas&&(c=g.toDataURL()),c&&(this.replaced&&(h.rotate=0),this.defaults.checkImageOrigin&&(f.prop("crossOrigin")||this.isCrossOriginURL(c))&&(i=" crossOrigin",c=J(c)),this.$clone=b=a("<img"+i+' src="'+c+'">'),b.one("load",function(){h.naturalWidth=this.naturalWidth||b.width(),h.naturalHeight=this.naturalHeight||b.height(),h.aspectRatio=h.naturalWidth/h.naturalHeight,d.url=c,d.ready=e,d.build()}),b.addClass(r).prependTo("body"))},isCrossOriginURL:function(a){var b=a.match(/^(https?:)\/\/([^\:\/\?#]+):?(\d*)/i);return!b||b[1]===d.protocol&&b[2]===d.hostname&&b[3]===d.port?f:e},build:function(){var b,c,d=this.$element,g=this.defaults;this.ready&&(this.built&&this.unbuild(),d.one(B,g.build),b=a.Event(B),d.trigger(b),b.isDefaultPrevented()||(this.$cropper=c=a(K.TEMPLATE),d.addClass(q),this.$clone.removeClass(r).prependTo(c),this.rotated||(this.$original=this.$clone.clone(),this.$original.addClass(q).prependTo(this.$cropper),this.originalImage=a.extend({},this.image)),this.$container=d.parent(),this.$container.append(c),this.$canvas=c.find(".cropper-canvas"),this.$dragger=c.find(".cropper-dragger"),this.$viewer=c.find(".cropper-viewer"),g.autoCrop?this.cropped=e:this.$dragger.addClass(q),g.modal&&this.$canvas.addClass(p),!g.dashed&&this.$dragger.find(".cropper-dashed").addClass(q),!g.movable&&this.$dragger.find(".cropper-face").data(k,"move"),!g.resizable&&this.$dragger.find(".cropper-line, .cropper-point").addClass(q),this.addListeners(),this.initPreview(),this.built=e,g.dragCrop&&this.setDragMode("crop"),this.update(),this.replaced=f,d.one(C,g.built),d.trigger(C)))},unbuild:function(){this.built&&(this.built=f,this.removeListeners(),this.$preview.empty(),this.$preview=g,this.$dragger=g,this.$canvas=g,this.$container=g,this.$cropper.remove(),this.$cropper=g)},update:function(a){this.initContainer(),this.initCropper(),this.initImage(),this.initDragger(),a?(this.setData(a,e),this.setDragMode("crop")):this.setData(this.defaults.data)},resize:function(){clearTimeout(this.resizing),this.resizing=setTimeout(a.proxy(this.update,this,this.getData()),200)},preview:function(){var b=this.image,c=this.dragger,d=b.width,e=b.height,f=c.left-b.left,g=c.top-b.top;this.$viewer.find("img").css({width:d,height:e,marginLeft:-f,marginTop:-g}),this.$preview.each(function(){var b=a(this),h=b.width()/c.width;b.find("img").css({width:d*h,height:e*h,marginLeft:-f*h,marginTop:-g*h})})},addListeners:function(){var d=this.defaults;this.$element.on(D,d.dragstart).on(E,d.dragmove).on(F,d.dragend),this.$cropper.on(v,a.proxy(this.dragstart,this)).on(A,a.proxy(this.dblclick,this)),d.zoomable&&this.$cropper.on(y,a.proxy(this.wheel,this)),d.multiple?this.$cropper.on(w,a.proxy(this.dragmove,this)).on(x,a.proxy(this.dragend,this)):c.on(w,this._dragmove=I(this.dragmove,this)).on(x,this._dragend=I(this.dragend,this)),b.on(z,this._resize=I(this.resize,this))},removeListeners:function(){var a=this.defaults;this.$element.off(D,a.dragstart).off(E,a.dragmove).off(F,a.dragend),this.$cropper.off(v,this.dragstart).off(A,this.dblclick),a.zoomable&&this.$cropper.off(y,this.wheel),a.multiple?this.$cropper.off(w,this.dragmove).off(x,this.dragend):c.off(w,this._dragmove).off(x,this._dragend),b.off(z,this._resize)},initPreview:function(){var b='<img src="'+this.url+'">';this.$preview=a(this.defaults.preview),this.$viewer.html(b),this.$preview.html(b).find("img").css("cssText","min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;")},initContainer:function(){var a=this.$container;this.container={width:N(a.width(),300),height:N(a.height(),150)}},initCropper:function(){var a,b=this.container,c=this.image;c.naturalWidth*b.height/c.naturalHeight-b.width>=0?(a={width:b.width,height:b.width/c.aspectRatio,left:0},a.top=(b.height-a.height)/2):(a={width:b.height*c.aspectRatio,height:b.height,top:0},a.left=(b.width-a.width)/2),this.$cropper.css({width:a.width,height:a.height,left:a.left,top:a.top}),this.cropper=a},initImage:function(){var b=this.image,c=this.cropper,d={_width:c.width,_height:c.height,width:c.width,height:c.height,left:0,top:0,ratio:c.width/b.naturalWidth};this.defaultImage=a.extend({},b,d),b._width!==c.width||b._height!==c.height?a.extend(b,d):(b=a.extend({},d,b),this.replaced&&(b.ratio=d.ratio)),this.image=b,this.renderImage()},renderImage:function(a){var b=this.image;"zoom"===a&&(b.left-=(b.width-b.oldWidth)/2,b.top-=(b.height-b.oldHeight)/2),b.left=M(N(b.left,b._width-b.width),0),b.top=M(N(b.top,b._height-b.height),0),this.$clone.css({width:b.width,height:b.height,marginLeft:b.left,marginTop:b.top}),a&&(this.defaults.done(this.getData()),this.preview())},initDragger:function(){var b,c,d=this.defaults,e=this.cropper,f=d.aspectRatio||this.image.aspectRatio,g=this.image.ratio;c=e.height*f-e.width>=0?{height:e.width/f,width:e.width,left:0,top:(e.height-e.width/f)/2,maxWidth:e.width,maxHeight:e.width/f}:{height:e.height,width:e.height*f,left:(e.width-e.height*f)/2,top:0,maxWidth:e.height*f,maxHeight:e.height},c.minWidth=0,c.minHeight=0,d.aspectRatio?(isFinite(d.maxWidth)?(c.maxWidth=M(c.maxWidth,d.maxWidth*g),c.maxHeight=c.maxWidth/f):isFinite(d.maxHeight)&&(c.maxHeight=M(c.maxHeight,d.maxHeight*g),c.maxWidth=c.maxHeight*f),d.minWidth>0?(c.minWidth=N(0,d.minWidth*g),c.minHeight=c.minWidth/f):d.minHeight>0&&(c.minHeight=N(0,d.minHeight*g),c.minWidth=c.minHeight*f)):(c.maxWidth=M(c.maxWidth,d.maxWidth*g),c.maxHeight=M(c.maxHeight,d.maxHeight*g),c.minWidth=N(0,d.minWidth*g),c.minHeight=N(0,d.minHeight*g)),c.minWidth=M(c.maxWidth,c.minWidth),c.minHeight=M(c.maxHeight,c.minHeight),b=a.extend({},c),b.height=c.height*d.autoCropArea,b.width=c.width*d.autoCropArea,b.left=(e.width-b.width)/2,b.top=(e.height-b.height)/2,b.oldLeft=c.oldLeft=c.left,b.oldTop=c.oldTop=c.top,this.autoCropDragger=b,this.defaultDragger=a.extend({},c),this.dragger=c},renderDragger:function(){var a=this.dragger,b=this.cropper;a.width>a.maxWidth?(a.width=a.maxWidth,a.left=a.oldLeft):a.width<a.minWidth&&(a.width=a.minWidth,a.left=a.oldLeft),a.height>a.maxHeight?(a.height=a.maxHeight,a.top=a.oldTop):a.height<a.minHeight&&(a.height=a.minHeight,a.top=a.oldTop),a.left=M(N(a.left,0),b.width-a.width),a.top=M(N(a.top,0),b.height-a.height),a.oldLeft=a.left,a.oldTop=a.top,this.dragger=a,this.disabled||this.defaults.done(this.getData()),this.$dragger.css({width:a.width,height:a.height,left:a.left,top:a.top}),this.preview()},reset:function(b){this.cropped&&(b&&(this.defaults.data={}),this.image=a.extend({},this.defaultImage),this.renderImage(),this.dragger=a.extend({},this.defaultDragger),this.setData(this.defaults.data))},clear:function(){this.cropped&&(this.cropped=f,this.setData({x:0,y:0,width:0,height:0}),this.$canvas.removeClass(p),this.$dragger.addClass(q))},destroy:function(){var a=this.$element;this.ready&&(this.unbuild(),a.removeClass(q).removeData("cropper"),this.rotated&&a.attr("src",this.$original.attr("src")))},replace:function(b,c){var d,g=this,h=this.$element,i=this.element;b&&b!==this.url&&b!==h.attr("src")&&(c||(this.rotated=f,this.replaced=e),h.is("img")?(h.attr("src",b),this.load()):h.is("canvas")&&this.support.canvas&&(d=i.getContext("2d"),a('<img src="'+b+'">').one("load",function(){i.width=this.width,i.height=this.height,d.clearRect(0,0,i.width,i.height),d.drawImage(this,0,0),g.load()})))},setData:function(b,c){var d=this.cropper,e=this.dragger,f=this.image,h=this.defaults.aspectRatio;this.built&&typeof b!==j&&((b===g||a.isEmptyObject(b))&&(e=a.extend({},this.autoCropDragger)),a.isPlainObject(b)&&!a.isEmptyObject(b)&&(c||(this.defaults.data=b),b=this.transformData(b),G(b.x)&&b.x<=d.width-f.left&&(e.left=b.x+f.left),G(b.y)&&b.y<=d.height-f.top&&(e.top=b.y+f.top),h?G(b.width)&&b.width<=e.maxWidth&&b.width>=e.minWidth?(e.width=b.width,e.height=e.width/h):G(b.height)&&b.height<=e.maxHeight&&b.height>=e.minHeight&&(e.height=b.height,e.width=e.height*h):(G(b.width)&&b.width<=e.maxWidth&&b.width>=e.minWidth&&(e.width=b.width),G(b.height)&&b.height<=e.maxHeight&&b.height>=e.minHeight&&(e.height=b.height))),this.dragger=e,this.renderDragger())},getData:function(a){var b=this.dragger,c=this.image,d={};return this.built&&(d={x:b.left-c.left,y:b.top-c.top,width:b.width,height:b.height},d=this.transformData(d,e,a)),d},transformData:function(b,c,d){var e=this.image.ratio,f={};return a.each(b,function(a,b){b=R(b),n.test(a)&&!isNaN(b)&&(f[a]=c?d?Math.round(b/e):b/e:b*e)}),f},setAspectRatio:function(a){var b="auto"===a;a=R(a),(b||!isNaN(a)&&a>0)&&(this.defaults.aspectRatio=b?h:a,this.built&&(this.initDragger(),this.renderDragger()))},getImageData:function(){var b={};return this.ready&&a.each(this.image,function(a,c){o.test(a)&&(b[a]=c)}),b},getDataURL:function(b,c,d){var e,f=a("<canvas>")[0],g=this.getData(),h="";return a.isPlainObject(b)||(d=c,c=b,b={}),b=a.extend({width:g.width,height:g.height},b),this.cropped&&this.support.canvas&&(f.width=b.width,f.height=b.height,e=f.getContext("2d"),"image/jpeg"===c&&(e.fillStyle="#fff",e.fillRect(0,0,b.width,b.height)),e.drawImage(this.$clone[0],g.x,g.y,g.width,g.height,0,0,b.width,b.height),h=f.toDataURL(c,d)),h},setDragMode:function(a){var b=this.$canvas,c=this.defaults,d=f,g=f;if(this.built&&!this.disabled){switch(a){case"crop":c.dragCrop&&(d=e,b.data(k,a));break;case"move":g=e,b.data(k,a);break;default:b.removeData(k)}b.toggleClass(t,d).toggleClass(s,g)}},enable:function(){this.built&&(this.disabled=f,this.$cropper.removeClass(u))},disable:function(){this.built&&(this.disabled=e,this.$cropper.addClass(u))},rotate:function(a){var b=this.image;a=R(a)||0,this.built&&0!==a&&!this.disabled&&this.defaults.rotatable&&this.support.canvas&&(this.rotated=e,a=b.rotate=(b.rotate+a)%360,this.replace(this.getRotatedDataURL(a),!0))},getRotatedDataURL:function(b){var c=a("<canvas>")[0],d=c.getContext("2d"),e=b*Math.PI/180,f=O(b)%180,g=f>90?180-f:f,h=g*Math.PI/180,i=this.originalImage,j=i.naturalWidth,k=i.naturalHeight,l=O(j*Q(h)+k*P(h)),m=O(j*P(h)+k*Q(h));return c.width=l,c.height=m,d.save(),d.translate(l/2,m/2),d.rotate(e),d.drawImage(this.$original[0],-j/2,-k/2,j,k),d.restore(),c.toDataURL()},zoom:function(a){var b,c,d,e=this.image;a=R(a),this.built&&a&&!this.disabled&&this.defaults.zoomable&&(b=e.width*(1+a),c=e.height*(1+a),d=b/e._width,d>10||(1>d&&(b=e._width,c=e._height),this.setDragMode(1>=d?"crop":"move"),e.oldWidth=e.width,e.oldHeight=e.height,e.width=b,e.height=c,e.ratio=e.width/e.naturalWidth,this.renderImage("zoom")))},dblclick:function(){this.disabled||this.setDragMode(this.$canvas.hasClass(t)?"move":"crop")},wheel:function(a){var b,c=a.originalEvent,d=117.25,e=5,f=166.66665649414062,g=.1;this.disabled||(a.preventDefault(),c.deltaY?(b=c.deltaY,b=b%e===0?b/e:b%d===0?b/d:b/f):b=c.wheelDelta?-c.wheelDelta/120:c.detail?c.detail/3:0,this.zoom(b*g))},dragstart:function(b){var c,d,g,h=b.originalEvent.touches,i=b;if(!this.disabled){if(h){if(g=h.length,g>1){if(!this.defaults.zoomable||2!==g)return;i=h[1],this.startX2=i.pageX,this.startY2=i.pageY,c="zoom"}i=h[0]}if(c=c||a(i.target).data(k),m.test(c)){if(b.preventDefault(),d=a.Event(D),this.$element.trigger(d),d.isDefaultPrevented())return;this.directive=c,this.cropping=f,this.startX=i.pageX,this.startY=i.pageY,"crop"===c&&(this.cropping=e,this.$canvas.addClass(p))}}},dragmove:function(b){var c,d,e=b.originalEvent.touches,f=b;if(!this.disabled){if(e){if(d=e.length,d>1){if(!this.defaults.zoomable||2!==d)return;f=e[1],this.endX2=f.pageX,this.endY2=f.pageY}f=e[0]}if(this.directive){if(b.preventDefault(),c=a.Event(E),this.$element.trigger(c),c.isDefaultPrevented())return;this.endX=f.pageX,this.endY=f.pageY,this.dragging()}}},dragend:function(b){var c;if(!this.disabled&&this.directive){if(b.preventDefault(),c=a.Event(F),this.$element.trigger(c),c.isDefaultPrevented())return;this.cropping&&(this.cropping=f,this.$canvas.toggleClass(p,this.cropped&&this.defaults.modal)),this.directive=""}},dragging:function(){var a,b=this.directive,c=this.image,d=this.cropper,g=d.width,h=d.height,i=this.dragger,j=i.width,k=i.height,l=i.left,m=i.top,n=l+j,o=m+k,p=e,r=this.defaults,s=r.aspectRatio,t={x:this.endX-this.startX,y:this.endY-this.startY};switch(s&&(t.X=t.y*s,t.Y=t.x/s),b){case"all":l+=t.x,m+=t.y;break;case"e":if(t.x>=0&&(n>=g||s&&(0>=m||o>=h))){p=f;break}j+=t.x,s&&(k=j/s,m-=t.Y/2),0>j&&(b="w",j=0);break;case"n":if(t.y<=0&&(0>=m||s&&(0>=l||n>=g))){p=f;break}k-=t.y,m+=t.y,s&&(j=k*s,l+=t.X/2),0>k&&(b="s",k=0);break;case"w":if(t.x<=0&&(0>=l||s&&(0>=m||o>=h))){p=f;break}j-=t.x,l+=t.x,s&&(k=j/s,m+=t.Y/2),0>j&&(b="e",j=0);break;case"s":if(t.y>=0&&(o>=h||s&&(0>=l||n>=g))){p=f;break}k+=t.y,s&&(j=k*s,l-=t.X/2),0>k&&(b="n",k=0);break;case"ne":if(s){if(t.y<=0&&(0>=m||n>=g)){p=f;break}k-=t.y,m+=t.y,j=k*s}else t.x>=0?g>n?j+=t.x:t.y<=0&&0>=m&&(p=f):j+=t.x,t.y<=0?m>0&&(k-=t.y,m+=t.y):(k-=t.y,m+=t.y);0>k&&(b="sw",k=0,j=0);break;case"nw":if(s){if(t.y<=0&&(0>=m||0>=l)){p=f;break}k-=t.y,m+=t.y,j=k*s,l+=t.X}else t.x<=0?l>0?(j-=t.x,l+=t.x):t.y<=0&&0>=m&&(p=f):(j-=t.x,l+=t.x),t.y<=0?m>0&&(k-=t.y,m+=t.y):(k-=t.y,m+=t.y);0>k&&(b="se",k=0,j=0);break;case"sw":if(s){if(t.x<=0&&(0>=l||o>=h)){p=f;break}j-=t.x,l+=t.x,k=j/s}else t.x<=0?l>0?(j-=t.x,l+=t.x):t.y>=0&&o>=h&&(p=f):(j-=t.x,l+=t.x),t.y>=0?h>o&&(k+=t.y):k+=t.y;0>j&&(b="ne",k=0,j=0);break;case"se":if(s){if(t.x>=0&&(n>=g||o>=h)){p=f;break}j+=t.x,k=j/s}else t.x>=0?g>n?j+=t.x:t.y>=0&&o>=h&&(p=f):j+=t.x,t.y>=0?h>o&&(k+=t.y):k+=t.y;0>j&&(b="nw",k=0,j=0);break;case"move":c.left+=t.x,c.top+=t.y,this.renderImage("move"),p=f;break;case"zoom":r.zoomable&&(this.zoom(function(a,b,c,d,e,f){return(L(e*e+f*f)-L(c*c+d*d))/L(a*a+b*b)}(c.width,c.height,O(this.startX-this.startX2),O(this.startY-this.startY2),O(this.endX-this.endX2),O(this.endY-this.endY2))),this.endX2=this.startX2,this.endY2=this.startY2);break;case"crop":t.x&&t.y&&(a=this.$cropper.offset(),l=this.startX-a.left,m=this.startY-a.top,j=i.minWidth,k=i.minHeight,t.x>0?t.y>0?b="se":(b="ne",m-=k):t.y>0?(b="sw",l-=j):(b="nw",l-=j,m-=k),this.cropped||(this.cropped=e,this.$dragger.removeClass(q)))}p&&(i.width=j,i.height=k,i.left=l,i.top=m,this.directive=b,this.renderDragger()),this.startX=this.endX,this.startY=this.endY}},K.TEMPLATE=function(a,b){return b=b.split(","),a.replace(/\d+/g,function(a){return b[a]})}('<0 6="5-container"><0 6="5-canvas"></0><0 6="5-dragger"><1 6="5-viewer"></1><1 6="5-8 8-h"></1><1 6="5-8 8-v"></1><1 6="5-face" 3-2="all"></1><1 6="5-7 7-e" 3-2="e"></1><1 6="5-7 7-n" 3-2="n"></1><1 6="5-7 7-w" 3-2="w"></1><1 6="5-7 7-s" 3-2="s"></1><1 6="5-4 4-e" 3-2="e"></1><1 6="5-4 4-n" 3-2="n"></1><1 6="5-4 4-w" 3-2="w"></1><1 6="5-4 4-s" 3-2="s"></1><1 6="5-4 4-ne" 3-2="ne"></1><1 6="5-4 4-nw" 3-2="nw"></1><1 6="5-4 4-sw" 3-2="sw"></1><1 6="5-4 4-se" 3-2="se"></1></0></0>',"div,span,directive,data,point,cropper,class,line,dashed"),K.DEFAULTS={aspectRatio:"auto",autoCropArea:.8,data:{},done:a.noop,preview:"",multiple:f,autoCrop:e,dragCrop:e,dashed:e,modal:e,movable:e,resizable:e,zoomable:e,rotatable:e,checkImageOrigin:e,minWidth:0,minHeight:0,maxWidth:i,maxHeight:i,build:g,built:g,dragstart:g,dragmove:g,dragend:g},K.setDefaults=function(b){a.extend(K.DEFAULTS,b)},K.other=a.fn.cropper,a.fn.cropper=function(b){var c,d=H(arguments,1);return this.each(function(){var e,f=a(this),g=f.data("cropper");g||f.data("cropper",g=new K(this,b)),"string"==typeof b&&a.isFunction(e=g[b])&&(c=e.apply(g,d))}),typeof c!==j?c:this},a.fn.cropper.Constructor=K,a.fn.cropper.setDefaults=K.setDefaults,a.fn.cropper.noConflict=function(){return a.fn.cropper=K.other,this}});
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/fancybox/blank.gif b/javascript/libs/jquery/plugins/fancybox/blank.gif Binary files differdeleted file mode 100644 index 35d42e8..0000000 --- a/javascript/libs/jquery/plugins/fancybox/blank.gif +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_close.png b/javascript/libs/jquery/plugins/fancybox/fancy_close.png Binary files differdeleted file mode 100644 index 0703530..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_close.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_closebox.png b/javascript/libs/jquery/plugins/fancybox/fancy_closebox.png Binary files differdeleted file mode 100644 index 4de4396..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_closebox.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_left.png b/javascript/libs/jquery/plugins/fancybox/fancy_left.png Binary files differdeleted file mode 100644 index 61494e6..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_left.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_loading.png b/javascript/libs/jquery/plugins/fancybox/fancy_loading.png Binary files differdeleted file mode 100644 index 2503017..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_loading.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_nav_left.png b/javascript/libs/jquery/plugins/fancybox/fancy_nav_left.png Binary files differdeleted file mode 100644 index ebaa6a4..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_nav_left.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_nav_right.png b/javascript/libs/jquery/plugins/fancybox/fancy_nav_right.png Binary files differdeleted file mode 100644 index 873294e..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_nav_right.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_progress.png b/javascript/libs/jquery/plugins/fancybox/fancy_progress.png Binary files differdeleted file mode 100644 index 06b7c89..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_progress.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_right.png b/javascript/libs/jquery/plugins/fancybox/fancy_right.png Binary files differdeleted file mode 100644 index 0a56042..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_right.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_e.png b/javascript/libs/jquery/plugins/fancybox/fancy_shadow_e.png Binary files differdeleted file mode 100644 index 2eda089..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_e.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_n.png b/javascript/libs/jquery/plugins/fancybox/fancy_shadow_n.png Binary files differdeleted file mode 100644 index 69aa10e..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_n.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_ne.png b/javascript/libs/jquery/plugins/fancybox/fancy_shadow_ne.png Binary files differdeleted file mode 100644 index 79f6980..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_ne.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_nw.png b/javascript/libs/jquery/plugins/fancybox/fancy_shadow_nw.png Binary files differdeleted file mode 100644 index 7182cd9..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_nw.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_s.png b/javascript/libs/jquery/plugins/fancybox/fancy_shadow_s.png Binary files differdeleted file mode 100644 index d8858bf..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_s.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_se.png b/javascript/libs/jquery/plugins/fancybox/fancy_shadow_se.png Binary files differdeleted file mode 100644 index 541e3ff..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_se.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_sw.png b/javascript/libs/jquery/plugins/fancybox/fancy_shadow_sw.png Binary files differdeleted file mode 100644 index b451689..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_sw.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_w.png b/javascript/libs/jquery/plugins/fancybox/fancy_shadow_w.png Binary files differdeleted file mode 100644 index 8a4e4a8..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_shadow_w.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_title_left.png b/javascript/libs/jquery/plugins/fancybox/fancy_title_left.png Binary files differdeleted file mode 100644 index 6049223..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_title_left.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_title_main.png b/javascript/libs/jquery/plugins/fancybox/fancy_title_main.png Binary files differdeleted file mode 100644 index 8044271..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_title_main.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_title_over.png b/javascript/libs/jquery/plugins/fancybox/fancy_title_over.png Binary files differdeleted file mode 100644 index d9f458f..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_title_over.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancy_title_right.png b/javascript/libs/jquery/plugins/fancybox/fancy_title_right.png Binary files differdeleted file mode 100644 index e36d9db..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancy_title_right.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancybox-x.png b/javascript/libs/jquery/plugins/fancybox/fancybox-x.png Binary files differdeleted file mode 100644 index c2130f8..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancybox-x.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancybox-y.png b/javascript/libs/jquery/plugins/fancybox/fancybox-y.png Binary files differdeleted file mode 100644 index 7ef399b..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancybox-y.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancybox.png b/javascript/libs/jquery/plugins/fancybox/fancybox.png Binary files differdeleted file mode 100644 index 65e14f6..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancybox.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancybox_loading.gif b/javascript/libs/jquery/plugins/fancybox/fancybox_loading.gif Binary files differdeleted file mode 100644 index 742131f..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancybox_loading.gif +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/fancybox_sprite.png b/javascript/libs/jquery/plugins/fancybox/fancybox_sprite.png Binary files differdeleted file mode 100644 index 753021b..0000000 --- a/javascript/libs/jquery/plugins/fancybox/fancybox_sprite.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/helpers/fancybox_buttons.png b/javascript/libs/jquery/plugins/fancybox/helpers/fancybox_buttons.png Binary files differdeleted file mode 100644 index e0e1ea8..0000000 --- a/javascript/libs/jquery/plugins/fancybox/helpers/fancybox_buttons.png +++ /dev/null diff --git a/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.css b/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.css deleted file mode 100644 index 1e83200..0000000 --- a/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.css +++ /dev/null @@ -1,85 +0,0 @@ -#fancybox-buttons { - position: fixed; - left: 0; - width: 100%; - z-index: 1005; -} - -#fancybox-buttons.top { - top: 10px; -} - -#fancybox-buttons.bottom { - bottom: 10px; -} - -#fancybox-buttons ul { - display: block; - width: 170px; - height: 30px; - margin: 0 auto; - padding: 0; - list-style: none; - background: #111; - -webkit-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05); - -moz-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05); - background: #111 -webkit-gradient(linear,0% 0%,0% 100%,from(rgba(255,255,255,.2)),color-stop(.5,rgba(255,255,255,.15)),color-stop(.5,rgba(255,255,255,.1)),to(rgba(255,255,255,.15))); - background: #111 -moz-linear-gradient(top,rgba(255,255,255,.2) 0%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.15) 100%); - border-radius: 3px; -} - -#fancybox-buttons ul li { - float: left; - margin: 0; - padding: 0; -} - -#fancybox-buttons a { - display: block; - width: 30px; - height: 30px; - text-indent: -9999px; - background-image: url('fancybox_buttons.png'); - background-repeat: no-repeat; - outline: none; -} - -#fancybox-buttons a.btnPrev { - width: 32px; - background-position: 6px 0; -} - -#fancybox-buttons a.btnNext { - background-position: -33px 0; - border-right: 1px solid #3e3e3e; -} - -#fancybox-buttons a.btnPlay { - background-position: 0 -30px; -} - -#fancybox-buttons a.btnPlayOn { - background-position: -30px -30px; -} - -#fancybox-buttons a.btnToggle { - background-position: 3px -60px; - border-left: 1px solid #111; - border-right: 1px solid #3e3e3e; - width: 35px -} - -#fancybox-buttons a.btnToggleOn { - background-position: -27px -60px; -} - -#fancybox-buttons a.btnClose { - border-left: 1px solid #111; - width: 38px; - background-position: -57px 0px; -} - -#fancybox-buttons a.btnDisabled { - opacity : 0.5; - cursor: default; -}
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.js b/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.js deleted file mode 100644 index e116e38..0000000 --- a/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.js +++ /dev/null @@ -1,115 +0,0 @@ - /*! - * Buttons helper for fancyBox - * version: 1.0.2 - * @requires fancyBox v2.0 or later - * - * Usage: - * $(".fancybox").fancybox({ - * buttons: { - * position : 'top' - * } - * }); - * - * Options: - * tpl - HTML template - * position - 'top' or 'bottom' - * - */ -(function ($) { - //Shortcut for fancyBox object - var F = $.fancybox; - - //Add helper object - F.helpers.buttons = { - tpl: '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:jQuery.fancybox.close();"></a></li></ul></div>', - list: null, - buttons: {}, - - update: function () { - var toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); - - //Size toggle button - if (F.current.canShrink) { - toggle.addClass('btnToggleOn'); - - } else if (!F.current.canExpand) { - toggle.addClass('btnDisabled'); - } - }, - - beforeLoad: function (opts) { - //Remove self if gallery do not have at least two items - if (F.group.length < 2) { - F.coming.helpers.buttons = false; - F.coming.closeBtn = true; - - return; - } - - //Increase top margin to give space for buttons - F.coming.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; - }, - - onPlayStart: function () { - if (this.list) { - this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); - } - }, - - onPlayEnd: function () { - if (this.list) { - this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); - } - }, - - afterShow: function (opts) { - var buttons; - - if (!this.list) { - this.list = $(opts.tpl || this.tpl).addClass(opts.position || 'top').appendTo('body'); - - this.buttons = { - prev : this.list.find('.btnPrev').click( F.prev ), - next : this.list.find('.btnNext').click( F.next ), - play : this.list.find('.btnPlay').click( F.play ), - toggle : this.list.find('.btnToggle').click( F.toggle ) - } - } - - buttons = this.buttons; - - //Prev - if (F.current.index > 0 || F.current.loop) { - buttons.prev.removeClass('btnDisabled'); - } else { - buttons.prev.addClass('btnDisabled'); - } - - //Next / Play - if (F.current.loop || F.current.index < F.group.length - 1) { - buttons.next.removeClass('btnDisabled'); - buttons.play.removeClass('btnDisabled'); - - } else { - buttons.next.addClass('btnDisabled'); - buttons.play.addClass('btnDisabled'); - } - - this.update(); - }, - - onUpdate: function () { - this.update(); - }, - - beforeClose: function () { - if (this.list) { - this.list.remove(); - } - - this.list = null; - this.buttons = {}; - } - }; - -}(jQuery));
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.css b/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.css deleted file mode 100644 index aadfb73..0000000 --- a/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.css +++ /dev/null @@ -1,54 +0,0 @@ -#fancybox-thumbs { - position: fixed; - left: 0px; - width: 100%; - overflow: hidden; - z-index: 1005; -} - -#fancybox-thumbs.bottom { - bottom: 2px; -} - -#fancybox-thumbs.top { - top: 2px; -} - -#fancybox-thumbs ul { - position: relative; - list-style: none; - margin: 0; - padding: 0; -} - -#fancybox-thumbs ul li { - float: left; - padding: 1px; - opacity: 0.5; -} - -#fancybox-thumbs ul li.active { - opacity: 0.75; - padding: 0; - border: 1px solid #fff; -} - -#fancybox-thumbs ul li:hover { - opacity: 1; -} - -#fancybox-thumbs ul li a { - display: block; - position: relative; - overflow: hidden; - border: 1px solid #222; - background: #111; - outline: none; -} - -#fancybox-thumbs ul li img { - display: block; - position: relative; - border: 0; - padding: 0; -}
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.js b/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.js deleted file mode 100644 index 04a97db..0000000 --- a/javascript/libs/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.js +++ /dev/null @@ -1,157 +0,0 @@ - /*! - * Thumbnail helper for fancyBox - * version: 1.0.3 - * @requires fancyBox v2.0 or later - * - * Usage: - * $(".fancybox").fancybox({ - * thumbs: { - * width : 50, - * height : 50 - * } - * }); - * - * Options: - * width - thumbnail width - * height - thumbnail height - * source - function to obtain the URL of the thumbnail image - * position - 'top' or 'bottom' - * - */ -(function ($) { - //Shortcut for fancyBox object - var F = $.fancybox; - - //Add helper object - F.helpers.thumbs = { - wrap: null, - list: null, - width: 0, - - //Default function to obtain the URL of the thumbnail image - source: function (el) { - var img; - - if ($.type(el) === 'string') { - return el; - } - - img = $(el).find('img'); - - return img.length ? img.attr('src') : el.href; - }, - - init: function (opts) { - var that = this, - list, - thumbWidth = opts.width || 50, - thumbHeight = opts.height || 50, - thumbSource = opts.source || this.source; - - //Build list structure - list = ''; - - for (var n = 0; n < F.group.length; n++) { - list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>'; - } - - this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position || 'bottom').appendTo('body'); - this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap); - - //Load each thumbnail - $.each(F.group, function (i) { - $("<img />").load(function () { - var width = this.width, - height = this.height, - widthRatio, heightRatio, parent; - - if (!that.list || !width || !height) { - return; - } - - //Calculate thumbnail width/height and center it - widthRatio = width / thumbWidth; - heightRatio = height / thumbHeight; - parent = that.list.children().eq(i).find('a'); - - if (widthRatio >= 1 && heightRatio >= 1) { - if (widthRatio > heightRatio) { - width = Math.floor(width / heightRatio); - height = thumbHeight; - - } else { - width = thumbWidth; - height = Math.floor(height / widthRatio); - } - } - - $(this).css({ - width: width, - height: height, - top: Math.floor(thumbHeight / 2 - height / 2), - left: Math.floor(thumbWidth / 2 - width / 2) - }); - - parent.width(thumbWidth).height(thumbHeight); - - $(this).hide().appendTo(parent).fadeIn(300); - - }).attr('src', thumbSource( F.group[ i ] )); - }); - - //Set initial width - this.width = this.list.children().eq(0).outerWidth(); - - this.list.width(this.width * (F.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (F.current.index * this.width + this.width * 0.5))); - }, - - //Center list - update: function (opts) { - if (this.list) { - this.list.stop(true).animate({ - 'left': Math.floor($(window).width() * 0.5 - (F.current.index * this.width + this.width * 0.5)) - }, 150); - } - }, - - beforeLoad: function (opts) { - //Remove self if gallery do not have at least two items - if (F.group.length < 2) { - F.coming.helpers.thumbs = false; - - return; - } - - //Increase bottom margin to give space for thumbs - F.coming.margin[ opts.position === 'top' ? 0 : 2 ] = opts.height + 30; - }, - - afterShow: function (opts) { - //Check if exists and create or update list - if (this.list) { - this.update(opts); - - } else { - this.init(opts); - } - - //Set active element - this.list.children().removeClass('active').eq(F.current.index).addClass('active'); - }, - - onUpdate: function () { - this.update(); - }, - - beforeClose: function () { - if (this.wrap) { - this.wrap.remove(); - } - - this.wrap = null; - this.list = null; - this.width = 0; - } - } - -}(jQuery));
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/fancybox/jquery.easing-1.3.pack.js b/javascript/libs/jquery/plugins/fancybox/jquery.easing-1.3.pack.js deleted file mode 100644 index 9028179..0000000 --- a/javascript/libs/jquery/plugins/fancybox/jquery.easing-1.3.pack.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ - * - * Uses the built in easing capabilities added In jQuery 1.1 - * to offer multiple easing options - * - * TERMS OF USE - jQuery Easing - * - * Open source under the BSD License. - * - * Copyright © 2008 George McGinley Smith - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * Neither the name of the author nor the names of contributors may be used to endorse - * or promote products derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * -*/ - -// t: current time, b: begInnIng value, c: change In value, d: duration -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}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{})) - -/* - * - * TERMS OF USE - EASING EQUATIONS - * - * Open source under the BSD License. - * - * Copyright © 2001 Robert Penner - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * Neither the name of the author nor the names of contributors may be used to endorse - * or promote products derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ diff --git a/javascript/libs/jquery/plugins/fancybox/jquery.fancybox.css b/javascript/libs/jquery/plugins/fancybox/jquery.fancybox.css deleted file mode 100644 index fa9ab43..0000000 --- a/javascript/libs/jquery/plugins/fancybox/jquery.fancybox.css +++ /dev/null @@ -1,222 +0,0 @@ -/*! fancyBox v2.0.5 fancyapps.com | fancyapps.com/fancybox/#license */ -.fancybox-tmp iframe, .fancybox-tmp object { - vertical-align: top; - padding: 0; - margin: 0; -} - -.fancybox-wrap { - position: absolute; - top: 0; - left: 0; - z-index: 1002; -} - -.fancybox-outer { - position: relative; - padding: 0; - margin: 0; - background: #f9f9f9; - color: #444; - text-shadow: none; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.fancybox-opened { - z-index: 1003; -} - -.fancybox-opened .fancybox-outer { - -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); - -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); - box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); -} - -.fancybox-inner { - width: 100%; - height: 100%; - padding: 0; - margin: 0; - position: relative; - outline: none; - overflow: hidden; -} - -.fancybox-error { - color: #444; - font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; - margin: 0; - padding: 10px; -} - -.fancybox-image, .fancybox-iframe { - display: block; - width: 100%; - height: 100%; - border: 0; - padding: 0; - margin: 0; - vertical-align: top; -} - -.fancybox-image { - max-width: 100%; - max-height: 100%; -} - -#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { - background-image: url('fancybox_sprite.png'); -} - -#fancybox-loading { - position: fixed; - top: 50%; - left: 50%; - margin-top: -22px; - margin-left: -22px; - background-position: 0 -108px; - opacity: 0.8; - cursor: pointer; - z-index: 1010; -} - -#fancybox-loading div { - width: 44px; - height: 44px; - background: url('fancybox_loading.gif') center center no-repeat; -} - -.fancybox-close { - position: absolute; - top: -18px; - right: -18px; - width: 36px; - height: 36px; - cursor: pointer; - z-index: 1004; -} - -.fancybox-nav { - position: absolute; - top: 0; - width: 40%; - height: 100%; - cursor: pointer; - background: transparent url('blank.gif'); /* helps IE */ - z-index: 1003; -} - -.fancybox-prev { - left: 0; -} - -.fancybox-next { - right: 0; -} - -.fancybox-nav span { - position: absolute; - top: 50%; - width: 36px; - height: 36px; - margin-top: -18px; - cursor: pointer; - z-index: 1003; - visibility: hidden; -} - -.fancybox-prev span { - left: 20px; - background-position: 0 -36px; -} - -.fancybox-next span { - right: 20px; - background-position: 0 -72px; -} - -.fancybox-nav:hover span { - visibility: visible; -} - -.fancybox-tmp { - position: absolute; - top: -9999px; - left: -9999px; - padding: 0; - overflow: visible; - visibility: hidden; -} - -/* Overlay helper */ - -#fancybox-overlay { - position: absolute; - top: 0; - left: 0; - overflow: hidden; - display: none; - z-index: 1001; - background: #000; -} - -/* Title helper */ - -.fancybox-title { - visibility: hidden; - font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; - position: relative; - text-shadow: none; - z-index: 1005; -} - -.fancybox-opened .fancybox-title { - visibility: visible; -} - -.fancybox-title-float-wrap { - position: absolute; - bottom: 0; - right: 50%; - margin-bottom: -35px; - z-index: 1003; - text-align: center; -} - -.fancybox-title-float-wrap .child { - display: inline-block; - margin-right: -100%; - padding: 2px 20px; - background: transparent; /* Fallback for web browsers that doesn't support RGBa */ - background: rgba(0, 0, 0, 0.8); - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; - text-shadow: 0 1px 2px #222; - color: #FFF; - font-weight: bold; - line-height: 24px; - white-space: nowrap; -} - -.fancybox-title-outside-wrap { - position: relative; - margin-top: 10px; - color: #fff; -} - -.fancybox-title-inside-wrap { - margin-top: 10px; -} - -.fancybox-title-over-wrap { - position: absolute; - bottom: 0; - left: 0; - color: #fff; - padding: 10px; - background: #000; - background: rgba(0, 0, 0, .8); -}
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/fancybox/jquery.fancybox.js b/javascript/libs/jquery/plugins/fancybox/jquery.fancybox.js deleted file mode 100644 index 435f8a0..0000000 --- a/javascript/libs/jquery/plugins/fancybox/jquery.fancybox.js +++ /dev/null @@ -1,1456 +0,0 @@ - /*! - * fancyBox - jQuery Plugin - * version: 2.0.5 (02/03/2012) - * @requires jQuery v1.6 or later - * - * Examples at http://fancyapps.com/fancybox/ - * License: www.fancyapps.com/fancybox/#license - * - * Copyright 2012 Janis Skarnelis - janis@fancyapps.com - * - */ -(function (window, document, undefined) { - "use strict"; - - var $ = window.jQuery, - W = $(window), - D = $(document), - F = $.fancybox = function () { - F.open.apply( this, arguments ); - }, - didResize = false, - resizeTimer = null, - isMobile = document.createTouch !== undefined, - isString = function(str) { - return $.type(str) === "string"; - }; - - $.extend(F, { - // The current version of fancyBox - version: '2.0.5', - - defaults: { - padding: 15, - margin: 20, - - width: 800, - height: 600, - minWidth: 100, - minHeight: 100, - maxWidth: 9999, - maxHeight: 9999, - - autoSize: true, - autoResize: !isMobile, - autoCenter : !isMobile, - fitToView: true, - aspectRatio: false, - topRatio: 0.5, - - fixed: !($.browser.msie && $.browser.version <= 6) && !isMobile, - scrolling: 'auto', // 'auto', 'yes' or 'no' - wrapCSS: 'fancybox-default', - - arrows: true, - closeBtn: true, - closeClick: false, - nextClick : false, - mouseWheel: true, - autoPlay: false, - playSpeed: 3000, - preload : 3, - - modal: false, - loop: true, - ajax: { dataType: 'html', headers: { 'X-fancyBox': true } }, - keys: { - next: [13, 32, 34, 39, 40], // enter, space, page down, right arrow, down arrow - prev: [8, 33, 37, 38], // backspace, page up, left arrow, up arrow - close: [27] // escape key - }, - - // Override some properties - index: 0, - type: null, - href: null, - content: null, - title: null, - - // HTML templates - tpl: { - wrap: '<div class="fancybox-wrap"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div>', - image: '<img class="fancybox-image" src="{href}" alt="" />', - iframe: '<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0"' + ($.browser.msie ? ' allowtransparency="true"' : '') + '></iframe>', - swf: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>', - error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', - closeBtn: '<div title="Close" class="fancybox-item fancybox-close"></div>', - next: '<a title="Next" class="fancybox-nav fancybox-next"><span></span></a>', - prev: '<a title="Previous" class="fancybox-nav fancybox-prev"><span></span></a>' - }, - - // Properties for each animation type - // Opening fancyBox - openEffect: 'fade', // 'elastic', 'fade' or 'none' - openSpeed: 250, - openEasing: 'swing', - openOpacity: true, - openMethod: 'zoomIn', - - // Closing fancyBox - closeEffect: 'fade', // 'elastic', 'fade' or 'none' - closeSpeed: 250, - closeEasing: 'swing', - closeOpacity: true, - closeMethod: 'zoomOut', - - // Changing next gallery item - nextEffect: 'elastic', // 'elastic', 'fade' or 'none' - nextSpeed: 300, - nextEasing: 'swing', - nextMethod: 'changeIn', - - // Changing previous gallery item - prevEffect: 'elastic', // 'elastic', 'fade' or 'none' - prevSpeed: 300, - prevEasing: 'swing', - prevMethod: 'changeOut', - - // Enabled helpers - helpers: { - overlay: { - speedIn: 0, - speedOut: 300, - opacity: 0.8, - css: { - cursor: 'pointer' - }, - closeClick: true - }, - title: { - type: 'float' // 'float', 'inside', 'outside' or 'over' - } - }, - - // Callbacks - onCancel: $.noop, // If canceling - beforeLoad: $.noop, // Before loading - afterLoad: $.noop, // After loading - beforeShow: $.noop, // Before changing in current item - afterShow: $.noop, // After opening - beforeClose: $.noop, // Before closing - afterClose: $.noop // After closing - }, - - //Current state - group: {}, // Selected group - opts: {}, // Group options - coming: null, // Element being loaded - current: null, // Currently loaded element - isOpen: false, // Is currently open - isOpened: false, // Have been fully opened at least once - wrap: null, - outer: null, - inner: null, - - player: { - timer: null, - isActive: false - }, - - // Loaders - ajaxLoad: null, - imgPreload: null, - - // Some collections - transitions: {}, - helpers: {}, - - /* - * Static methods - */ - - open: function (group, opts) { - //Kill existing instances - F.close(true); - - //Normalize group - if (group && !$.isArray(group)) { - group = group instanceof $ ? $(group).get() : [group]; - } - - F.isActive = true; - - //Extend the defaults - F.opts = $.extend(true, {}, F.defaults, opts); - - //All options are merged recursive except keys - if ($.isPlainObject(opts) && opts.keys !== undefined) { - F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; - } - - F.group = group; - - F._start(F.opts.index || 0); - }, - - cancel: function () { - if (F.coming && false === F.trigger('onCancel')) { - return; - } - - F.coming = null; - - F.hideLoading(); - - if (F.ajaxLoad) { - F.ajaxLoad.abort(); - } - - F.ajaxLoad = null; - - if (F.imgPreload) { - F.imgPreload.onload = F.imgPreload.onabort = F.imgPreload.onerror = null; - } - }, - - close: function (a) { - F.cancel(); - - if (!F.current || false === F.trigger('beforeClose')) { - return; - } - - F.unbindEvents(); - - //If forced or is still opening then remove immediately - if (!F.isOpen || (a && a[0] === true)) { - $(".fancybox-wrap").stop().trigger('onReset').remove(); - - F._afterZoomOut(); - - } else { - F.isOpen = F.isOpened = false; - - $(".fancybox-item, .fancybox-nav").remove(); - - F.wrap.stop(true).removeClass('fancybox-opened'); - F.inner.css('overflow', 'hidden'); - - F.transitions[F.current.closeMethod](); - } - }, - - // Start/stop slideshow - play: function (a) { - var clear = function () { - clearTimeout(F.player.timer); - }, - set = function () { - clear(); - - if (F.current && F.player.isActive) { - F.player.timer = setTimeout(F.next, F.current.playSpeed); - } - }, - stop = function () { - clear(); - - $('body').unbind('.player'); - - F.player.isActive = false; - - F.trigger('onPlayEnd'); - }, - start = function () { - if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { - F.player.isActive = true; - - $('body').bind({ - 'afterShow.player onUpdate.player': set, - 'onCancel.player beforeClose.player': stop, - 'beforeLoad.player': clear - }); - - set(); - - F.trigger('onPlayStart'); - } - }; - - if (F.player.isActive || (a && a[0] === false)) { - stop(); - } else { - start(); - } - }, - - next: function () { - if (F.current) { - F.jumpto(F.current.index + 1); - } - }, - - prev: function () { - if (F.current) { - F.jumpto(F.current.index - 1); - } - }, - - jumpto: function (index) { - if (!F.current) { - return; - } - - index = parseInt(index, 10); - - if (F.group.length > 1 && F.current.loop) { - if (index >= F.group.length) { - index = 0; - - } else if (index < 0) { - index = F.group.length - 1; - } - } - - if (F.group[index] !== undefined) { - F.cancel(); - - F._start(index); - } - }, - - reposition: function (a, b) { - if (F.isOpen) { - if (b && b.type === 'scroll') { - F.wrap.stop().animate(F._getPosition(a), 200); - } else { - F.wrap.css(F._getPosition(a)); - } - } - }, - - update: function (e) { - if (F.isOpen) { - // It's a very bad idea to attach handlers to the window scroll event, run this code after a delay - if (!didResize) { - resizeTimer = setTimeout(function () { - var current = F.current; - - if (didResize) { - didResize = false; - - if (current) { - if (!e || (e && (e.type === 'orientationchange' || (current.autoResize && e.type === 'resize')))) { - if (current.autoSize) { - F.inner.height('auto'); - current.height = F.inner.height(); - } - - F._setDimension(); - - if (current.canGrow) { - F.inner.height('auto'); - } - } - - if (current.autoCenter) { - F.reposition(null, e); - } - - F.trigger('onUpdate'); - } - } - }, 100); - } - - didResize = true; - } - }, - - toggle: function () { - if (F.isOpen) { - F.current.fitToView = !F.current.fitToView; - - F.update(); - } - }, - - hideLoading: function () { - D.unbind('keypress.fb'); - - $("#fancybox-loading").remove(); - }, - - showLoading: function () { - F.hideLoading(); - - //If user will press the escape-button, the request will be canceled - D.bind('keypress.fb', function(e) { - if (e.keyCode == 27) { - e.preventDefault(); - F.cancel(); - } - }); - - $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body'); - }, - - getViewport: function () { - return { - x: W.scrollLeft(), - y: W.scrollTop(), - w: W.width(), - h: W.height() - }; - }, - - // Unbind the keyboard / clicking actions - unbindEvents: function () { - if (F.wrap) { - F.wrap.unbind('.fb'); - } - - D.unbind('.fb'); - W.unbind('.fb'); - }, - - bindEvents: function () { - var current = F.current, - keys = current.keys; - - if (!current) { - return; - } - - W.bind('resize.fb, orientationchange.fb', F.update); - - if (!current.fixed && current.autoCenter) { - W.bind("scroll.fb", F.update); - } - - if (keys) { - D.bind('keydown.fb', function (e) { - var code; - - // Ignore key combinations and key events within form elements - if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && $.inArray(e.target.tagName.toLowerCase(), ['input', 'textarea', 'select', 'button']) < 0) { - code = e.keyCode; - - if ($.inArray(code, keys.close) > -1) { - F.close(); - e.preventDefault(); - - } else if ($.inArray(code, keys.next) > -1) { - F.next(); - e.preventDefault(); - - } else if ($.inArray(code, keys.prev) > -1) { - F.prev(); - e.preventDefault(); - } - } - }); - } - - if ($.fn.mousewheel && current.mouseWheel && F.group.length > 1) { - F.wrap.bind('mousewheel.fb', function (e, delta) { - var target = e.target || null; - - if (delta !== 0 && (!target || target.clientHeight === 0 || (target.scrollHeight === target.clientHeight && target.scrollWidth === target.clientWidth))) { - e.preventDefault(); - - F[delta > 0 ? 'prev' : 'next'](); - } - }); - } - }, - - trigger: function (event) { - var ret, obj = F[ $.inArray(event, ['onCancel', 'beforeLoad', 'afterLoad']) > -1 ? 'coming' : 'current' ]; - - if (!obj) { - return; - } - - if ($.isFunction( obj[event] )) { - ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); - } - - if (ret === false) { - return false; - } - - if (obj.helpers) { - $.each(obj.helpers, function (helper, opts) { - if (opts && $.isPlainObject(F.helpers[helper]) && $.isFunction(F.helpers[helper][event])) { - F.helpers[helper][event](opts, obj); - } - }); - } - - $.event.trigger(event + '.fb'); - }, - - isImage: function (str) { - return str && str.toString().match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i); - }, - - isSWF: function (str) { - return str && str.toString().match(/\.(swf)(.*)?$/i); - }, - - _start: function (index) { - var coming = {}, - element = F.group[index] || null, - isDom, - href, - type, - rez, - hrefParts; - - if (element && (element.nodeType || element instanceof $)) { - isDom = true; - - if ($.metadata) { - coming = $(element).metadata(); - } - } - - coming = $.extend(true, {}, F.opts, {index : index, element : element}, ($.isPlainObject(element) ? element : coming)); - - // Re-check overridable options - $.each(['href', 'title', 'content', 'type'], function(i,v) { - coming[v] = F.opts[ v ] || (isDom && $(element).attr( v )) || coming[ v ] || null; - }); - - // Convert margin property to array - top, right, bottom, left - if (typeof coming.margin === 'number') { - coming.margin = [coming.margin, coming.margin, coming.margin, coming.margin]; - } - - // 'modal' propery is just a shortcut - if (coming.modal) { - $.extend(true, coming, { - closeBtn : false, - closeClick: false, - nextClick : false, - arrows : false, - mouseWheel : false, - keys : null, - helpers: { - overlay : { - css: { - cursor : 'auto' - }, - closeClick : false - } - } - }); - } - - //Give a chance for callback or helpers to update coming item (type, title, etc) - F.coming = coming; - - if (false === F.trigger('beforeLoad')) { - F.coming = null; - return; - } - - type = coming.type; - href = coming.href || element; - - ///Check if content type is set, if not, try to get - if (!type) { - if (isDom) { - rez = $(element).data('fancybox-type'); - - if (!rez && element.className) { - rez = element.className.match(/fancybox\.(\w+)/); - type = rez ? rez[1] : null; - } - } - - if (!type && isString(href)) { - if (F.isImage(href)) { - type = 'image'; - - } else if (F.isSWF(href)) { - type = 'swf'; - - } else if (href.match(/^#/)) { - type = 'inline'; - } - } - - // ...if not - display element itself - if (!type) { - type = isDom ? 'inline' : 'html'; - } - - coming.type = type; - } - - // Check before try to load; 'inline' and 'html' types need content, others - href - if (type === 'inline' || type === 'html') { - if (!coming.content) { - if (type === 'inline') { - coming.content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 - - } else { - coming.content = element; - } - } - - if (!coming.content || !coming.content.length) { - type = null; - } - - } else if (!href) { - type = null; - } - - /* - Add reference to the group, so it`s possible to access from callbacks, example: - - afterLoad : function() { - this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); - } - - */ - - hrefParts = href.split(/\s+/, 2); - - coming.group = F.group; - coming.isDom = isDom; - coming.href = hrefParts.shift(); - coming.selector = hrefParts.shift(); - - if (type === 'image') { - F._loadImage(); - - } else if (type === 'ajax') { - F._loadAjax(); - - } else if (type) { - F._afterLoad(); - - } else { - F._error( 'type' ); - } - }, - - _error: function ( type ) { - F.hideLoading(); - - $.extend(F.coming, { - type : 'html', - autoSize : true, - minHeight : 0, - hasError : type, - content : F.coming.tpl.error - }); - - F._afterLoad(); - }, - - _loadImage: function () { - // Reset preload image so it is later possible to check "complete" property - F.imgPreload = new Image(); - - F.imgPreload.onload = function () { - this.onload = this.onerror = null; - - F.coming.width = this.width; - F.coming.height = this.height; - - F._afterLoad(); - }; - - F.imgPreload.onerror = function () { - this.onload = this.onerror = null; - - F._error( 'image' ); - }; - - F.imgPreload.src = F.coming.href; - - if (!F.imgPreload.width) { - F.showLoading(); - } - }, - - _loadAjax: function () { - F.showLoading(); - - F.ajaxLoad = $.ajax($.extend({}, F.coming.ajax, { - url: F.coming.href, - error: function (jqXHR, textStatus) { - if (F.coming && textStatus !== 'abort') { - F._error( 'ajax', jqXHR ); - - } else { - F.hideLoading(); - } - }, - success: function (data, textStatus) { - if (textStatus === 'success') { - F.coming.content = data; - - F._afterLoad(); - } - } - })); - }, - - _preloadImages: function() { - var group = F.group, - current = F.current, - len = group.length, - item, - href, - i, - cnt = Math.min(current.preload, len - 1); - - if (!current.preload || group.length < 2) { - return; - } - - for (i = 1; i <= cnt; i += 1) { - item = group[ (current.index + i ) % len ]; - href = $( item ).attr('href') || item; - - if (item.type === 'image' || F.isImage(href)) { - new Image().src = href; - } - } - }, - - _afterLoad: function () { - F.hideLoading(); - - if (!F.coming || false === F.trigger('afterLoad', F.current)) { - F.coming = false; - - return; - } - - if (F.isOpened) { - $(".fancybox-item").remove(); - - F.wrap.stop(true).removeClass('fancybox-opened'); - F.inner.css('overflow', 'hidden'); - - F.transitions[F.current.prevMethod](); - - } else { - $(".fancybox-wrap").stop().trigger('onReset').remove(); - - F.trigger('afterClose'); - } - - F.unbindEvents(); - - F.isOpen = false; - F.current = F.coming; - - //Build the neccessary markup - F.wrap = $(F.current.tpl.wrap).addClass('fancybox-' + (isMobile ? 'mobile' : 'desktop') + ' fancybox-tmp ' + F.current.wrapCSS).appendTo('body'); - F.outer = $('.fancybox-outer', F.wrap).css('padding', F.current.padding + 'px'); - F.inner = $('.fancybox-inner', F.wrap); - - F._setContent(); - }, - - _setContent: function () { - var current = F.current, content = current.content, type = current.type, loadingBay; - - switch (type) { - case 'inline': - case 'ajax': - case 'html': - if (current.selector) { - content = $("<div>").html(content).find(current.selector); - - } else if (content instanceof $) { - content = content.show().detach(); - - if (content.parent().hasClass('fancybox-inner')) { - content.parents('.fancybox-wrap').trigger('onReset').remove(); - } - - $(F.wrap).bind('onReset', function () { - content.appendTo('body').hide(); - }); - } - - if (current.autoSize) { - loadingBay = $('<div class="fancybox-tmp ' + F.current.wrapCSS + '"></div>').appendTo('body').append(content); - current.width = loadingBay.width(); - current.height = loadingBay.height(); - - // Re-check to fix 1px bug in some browsers - loadingBay.width( F.current.width ); - - if (loadingBay.height() > current.height) { - loadingBay.width(current.width + 1); - - current.width = loadingBay.width(); - current.height = loadingBay.height(); - } - - content = loadingBay.contents().detach(); - - loadingBay.remove(); - } - - break; - - case 'image': - content = current.tpl.image.replace('{href}', current.href); - - current.aspectRatio = true; - break; - - case 'swf': - content = current.tpl.swf.replace(/\{width\}/g, current.width).replace(/\{height\}/g, current.height).replace(/\{href\}/g, current.href); - break; - } - - if (type === 'iframe') { - content = $(current.tpl.iframe.replace('{rnd}', new Date().getTime()) ).attr('scrolling', current.scrolling); - - current.scrolling = 'auto'; - - // Set auto height for iframes - if (current.autoSize) { - content.width( current.width ); - - F.showLoading(); - - content.data('ready', false).appendTo(F.inner).bind({ - onCancel : function() { - $(this).unbind(); - - F._afterZoomOut(); - }, - load : function() { - var iframe = $(this), height; - - try { - if (this.contentWindow.document.location) { - height = iframe.contents().find('body').height() + 12; - - iframe.height( height ); - } - - } catch (e) { - current.autoSize = false; - } - - if (iframe.data('ready') === false) { - F.hideLoading(); - - if (height) { - F.current.height = height; - } - - F._beforeShow(); - - iframe.data('ready', true); - - } else if (height) { - F.update(); - } - } - - }).attr('src', current.href); - - return; - } - - content.attr('src', current.href); - - } else if (type === 'image' || type === 'swf') { - current.autoSize = false; - current.scrolling = 'visible'; - } - - F.inner.append(content); - - F._beforeShow(); - }, - - _beforeShow : function() { - F.coming = null; - - //Give a chance for helpers or callbacks to update elements - F.trigger('beforeShow'); - - //Set initial dimensions and hide - F._setDimension(); - - F.wrap.hide().removeClass('fancybox-tmp'); - - F.bindEvents(); - F._preloadImages(); - - F.transitions[ F.isOpened ? F.current.nextMethod : F.current.openMethod ](); - }, - - _setDimension: function () { - var wrap = F.wrap, - outer = F.outer, - inner = F.inner, - current = F.current, - viewport = F.getViewport(), - margin = current.margin, - padding2 = current.padding * 2, - width = current.width, - height = current.height, - maxWidth = current.maxWidth, - maxHeight = current.maxHeight, - minWidth = current.minWidth, - minHeight = current.minHeight, - ratio, - height_, - space; - - viewport.w -= (margin[1] + margin[3]); - viewport.h -= (margin[0] + margin[2]); - - if (width.toString().indexOf('%') > -1) { - width = (((viewport.w - padding2) * parseFloat(width)) / 100); - } - - if (height.toString().indexOf('%') > -1) { - height = (((viewport.h - padding2) * parseFloat(height)) / 100); - } - - ratio = width / height; - - width += padding2; - height += padding2; - - if (current.fitToView) { - maxWidth = Math.min(viewport.w, maxWidth); - maxHeight = Math.min(viewport.h, maxHeight); - } - - if (current.aspectRatio) { - if (width > maxWidth) { - width = maxWidth; - height = ((width - padding2) / ratio) + padding2; - } - - if (height > maxHeight) { - height = maxHeight; - width = ((height - padding2) * ratio) + padding2; - } - - if (width < minWidth) { - width = minWidth; - height = ((width - padding2) / ratio) + padding2; - } - - if (height < minHeight) { - height = minHeight; - width = ((height - padding2) * ratio) + padding2; - } - - } else { - width = Math.max(minWidth, Math.min(width, maxWidth)); - height = Math.max(minHeight, Math.min(height, maxHeight)); - } - - width = Math.round(width); - height = Math.round(height); - - //Reset dimensions - $(wrap.add(outer).add(inner)).width('auto').height('auto'); - - inner.width(width - padding2).height(height - padding2); - wrap.width(width); - - height_ = wrap.height(); // Real wrap height - - //Fit wrapper inside - if (width > maxWidth || height_ > maxHeight) { - while ((width > maxWidth || height_ > maxHeight) && width > minWidth && height_ > minHeight) { - height = height - 10; - - if (current.aspectRatio) { - width = Math.round(((height - padding2) * ratio) + padding2); - - if (width < minWidth) { - width = minWidth; - height = ((width - padding2) / ratio) + padding2; - } - - } else { - width = width - 10; - } - - inner.width(width - padding2).height(height - padding2); - wrap.width(width); - - height_ = wrap.height(); - } - } - - current.dim = { - width: width, - height: height_ - }; - - current.canGrow = current.autoSize && height > minHeight && height < maxHeight; - current.canShrink = false; - current.canExpand = false; - - if ((width - padding2) < current.width || (height - padding2) < current.height) { - current.canExpand = true; - - } else if ((width > viewport.w || height_ > viewport.h) && width > minWidth && height > minHeight) { - current.canShrink = true; - } - - space = height_ - padding2; - - F.innerSpace = space - inner.height(); - F.outerSpace = space - outer.height(); - }, - - _getPosition: function (a) { - var current = F.current, - viewport = F.getViewport(), - margin = current.margin, - width = F.wrap.width() + margin[1] + margin[3], - height = F.wrap.height() + margin[0] + margin[2], - rez = { - position: 'absolute', - top: margin[0] + viewport.y, - left: margin[3] + viewport.x - }; - - if (current.autoCenter && current.fixed && (!a || a[0] === false) && height <= viewport.h && width <= viewport.w) { - rez = { - position: 'fixed', - top: margin[0], - left: margin[3] - }; - } - - rez.top = Math.ceil(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))) + 'px'; - rez.left = Math.ceil(Math.max(rez.left, rez.left + ((viewport.w - width) * 0.5))) + 'px'; - - return rez; - }, - - _afterZoomIn: function () { - var current = F.current, scrolling = current ? current.scrolling : 'no'; - - if (!current) { - return; - } - - F.isOpen = F.isOpened = true; - - F.wrap.addClass('fancybox-opened').css('overflow', 'visible'); - - F.update(); - - F.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); - - //Assign a click event - if (current.closeClick || current.nextClick) { - //This is not the perfect solution but arrows have to be next to content so their height will match - // and I do not want another wrapper around content - F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { - if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { - F[ current.closeClick ? 'close' : 'next' ](); - } - }); - } - - //Create a close button - if (current.closeBtn) { - $(current.tpl.closeBtn).appendTo(F.outer).bind('click.fb', F.close); - } - - //Create navigation arrows - if (current.arrows && F.group.length > 1) { - if (current.loop || current.index > 0) { - $(current.tpl.prev).appendTo(F.inner).bind('click.fb', F.prev); - } - - if (current.loop || current.index < F.group.length - 1) { - $(current.tpl.next).appendTo(F.inner).bind('click.fb', F.next); - } - } - - F.trigger('afterShow'); - - if (F.opts.autoPlay && !F.player.isActive) { - F.opts.autoPlay = false; - - F.play(); - } - }, - - _afterZoomOut: function () { - F.trigger('afterClose'); - - F.wrap.trigger('onReset').remove(); - - $.extend(F, { - group: {}, - opts: {}, - current: null, - isActive: false, - isOpened: false, - isOpen: false, - wrap: null, - outer: null, - inner: null - }); - } - }); - - /* - * Default transitions - */ - - F.transitions = { - getOrigPosition: function () { - var current = F.current, - element = current.element, - padding = current.padding, - orig = $(current.orig), - pos = {}, - width = 50, - height = 50, - viewport; - - if (!orig.length && current.isDom && $(element).is(':visible')) { - orig = $(element).find('img:first'); - - if (!orig.length) { - orig = $(element); - } - } - - if (orig.length) { - pos = orig.offset(); - - if (orig.is('img')) { - width = orig.outerWidth(); - height = orig.outerHeight(); - } - - } else { - viewport = F.getViewport(); - - pos.top = viewport.y + (viewport.h - height) * 0.5; - pos.left = viewport.x + (viewport.w - width) * 0.5; - } - - pos = { - top: Math.ceil(pos.top - padding) + 'px', - left: Math.ceil(pos.left - padding) + 'px', - width: Math.ceil(width + padding * 2) + 'px', - height: Math.ceil(height + padding * 2) + 'px' - }; - - return pos; - }, - - step: function (now, fx) { - var ratio, innerValue, outerValue; - - if (fx.prop === 'width' || fx.prop === 'height') { - innerValue = outerValue = Math.ceil(now - (F.current.padding * 2)); - - if (fx.prop === 'height') { - ratio = (now - fx.start) / (fx.end - fx.start); - - if (fx.start > fx.end) { - ratio = 1 - ratio; - } - - innerValue -= F.innerSpace * ratio; - outerValue -= F.outerSpace * ratio; - } - - F.inner[fx.prop](innerValue); - F.outer[fx.prop](outerValue); - } - }, - - zoomIn: function () { - var wrap = F.wrap, - current = F.current, - startPos, - endPos, - dim = current.dim; - - if (current.openEffect === 'elastic') { - endPos = $.extend({}, dim, F._getPosition(true)); - - //Remove "position" property - delete endPos.position; - - startPos = this.getOrigPosition(); - - if (current.openOpacity) { - startPos.opacity = 0; - endPos.opacity = 1; - } - - F.outer.add(F.inner).width('auto').height('auto'); - - wrap.css(startPos).show(); - - wrap.animate(endPos, { - duration: current.openSpeed, - easing: current.openEasing, - step: this.step, - complete: F._afterZoomIn - }); - - } else { - wrap.css($.extend({}, dim, F._getPosition())); - - if (current.openEffect === 'fade') { - wrap.fadeIn(current.openSpeed, F._afterZoomIn); - - } else { - wrap.show(); - F._afterZoomIn(); - } - } - }, - - zoomOut: function () { - var wrap = F.wrap, - current = F.current, - endPos; - - if (current.closeEffect === 'elastic') { - if (wrap.css('position') === 'fixed') { - wrap.css(F._getPosition(true)); - } - - endPos = this.getOrigPosition(); - - if (current.closeOpacity) { - endPos.opacity = 0; - } - - wrap.animate(endPos, { - duration: current.closeSpeed, - easing: current.closeEasing, - step: this.step, - complete: F._afterZoomOut - }); - - } else { - wrap.fadeOut(current.closeEffect === 'fade' ? current.closeSpeed : 0, F._afterZoomOut); - } - }, - - changeIn: function () { - var wrap = F.wrap, - current = F.current, - startPos; - - if (current.nextEffect === 'elastic') { - startPos = F._getPosition(true); - startPos.opacity = 0; - startPos.top = (parseInt(startPos.top, 10) - 200) + 'px'; - - wrap.css(startPos).show().animate({ - opacity: 1, - top: '+=200px' - }, { - duration: current.nextSpeed, - easing: current.nextEasing, - complete: F._afterZoomIn - }); - - } else { - wrap.css(F._getPosition()); - - if (current.nextEffect === 'fade') { - wrap.hide().fadeIn(current.nextSpeed, F._afterZoomIn); - - } else { - wrap.show(); - F._afterZoomIn(); - } - } - }, - - changeOut: function () { - var wrap = F.wrap, - current = F.current, - cleanUp = function () { - $(this).trigger('onReset').remove(); - }; - - wrap.removeClass('fancybox-opened'); - - if (current.prevEffect === 'elastic') { - wrap.animate({ - 'opacity': 0, - top: '+=200px' - }, { - duration: current.prevSpeed, - easing: current.prevEasing, - complete: cleanUp - }); - - } else { - wrap.fadeOut(current.prevEffect === 'fade' ? current.prevSpeed : 0, cleanUp); - } - } - }; - - /* - * Overlay helper - */ - - F.helpers.overlay = { - overlay: null, - - update: function () { - var width, scrollWidth, offsetWidth; - - //Reset width/height so it will not mess - this.overlay.width(0).height(0); - - if ($.browser.msie) { - scrollWidth = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth); - offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); - - width = scrollWidth < offsetWidth ? W.width() : scrollWidth; - - } else { - width = D.width(); - } - - this.overlay.width(width).height(D.height()); - }, - - beforeShow: function (opts) { - if (this.overlay) { - return; - } - - opts = $.extend(true, { - speedIn : 'fast', - closeClick : true, - opacity : 1, - css : { - background: 'black' - } - }, opts); - - this.overlay = $('<div id="fancybox-overlay"></div>').css(opts.css).appendTo('body'); - - this.update(); - - if (opts.closeClick) { - this.overlay.bind('click.fb', F.close); - } - - W.bind("resize.fb", $.proxy(this.update, this)); - - this.overlay.fadeTo(opts.speedIn, opts.opacity); - }, - - onUpdate: function () { - //Update as content may change document dimensions - this.update(); - }, - - afterClose: function (opts) { - if (this.overlay) { - this.overlay.fadeOut(opts.speedOut || 0, function () { - $(this).remove(); - }); - } - - this.overlay = null; - } - }; - - /* - * Title helper - */ - - F.helpers.title = { - beforeShow: function (opts) { - var title, text = F.current.title; - - if (text) { - title = $('<div class="fancybox-title fancybox-title-' + opts.type + '-wrap">' + text + '</div>').appendTo('body'); - - if (opts.type === 'float') { - //This helps for some browsers - title.width(title.width()); - - title.wrapInner('<span class="child"></span>'); - - //Increase bottom margin so this title will also fit into viewport - F.current.margin[2] += Math.abs(parseInt(title.css('margin-bottom'), 10)); - } - - title.appendTo(opts.type === 'over' ? F.inner : (opts.type === 'outside' ? F.wrap : F.outer)); - } - } - }; - - // jQuery plugin initialization - $.fn.fancybox = function (options) { - var that = $(this), - selector = this.selector || '', - index, - run = function(e) { - var what = this, idx = index, relType, relVal; - - if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) { - e.preventDefault(); - - relType = options.groupAttr || 'data-fancybox-group'; - relVal = $(what).attr(relType); - - if (!relVal) { - relType = 'rel'; - relVal = what[ relType ]; - } - - if (relVal && relVal !== '' && relVal !== 'nofollow') { - what = selector.length ? $(selector) : that; - what = what.filter('[' + relType + '="' + relVal + '"]'); - idx = what.index(this); - } - - options.index = idx; - - F.open(what, options); - } - }; - - options = options || {}; - index = options.index || 0; - - if (selector) { - D.undelegate(selector, 'click.fb-start').delegate(selector, 'click.fb-start', run); - - } else { - that.unbind('click.fb-start').bind('click.fb-start', run); - } - - return this; - }; - -}(window, document));
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/fancybox/jquery.fancybox.pack.js b/javascript/libs/jquery/plugins/fancybox/jquery.fancybox.pack.js deleted file mode 100644 index 4b73736..0000000 --- a/javascript/libs/jquery/plugins/fancybox/jquery.fancybox.pack.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! fancyBox v2.0.5 fancyapps.com | fancyapps.com/fancybox/#license */ -(function(t,n,s){var d=t.jQuery,l=d(t),m=d(n),a=d.fancybox=function(){a.open.apply(this,arguments)},q=!1,r=n.createTouch!==s;d.extend(a,{version:"2.0.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,autoSize:!0,autoResize:!r,autoCenter:!r,fitToView:!0,aspectRatio:!1,topRatio:0.5,fixed:!(d.browser.msie&&6>=d.browser.version)&&!r,scrolling:"auto",wrapCSS:"fancybox-default",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1, -playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},keys:{next:[13,32,34,39,40],prev:[8,33,37,38],close:[27]},tpl:{wrap:'<div class="fancybox-wrap"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0"'+(d.browser.msie?' allowtransparency="true"':"")+"></iframe>",swf:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>', -error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<div title="Close" class="fancybox-item fancybox-close"></div>',next:'<a title="Next" class="fancybox-nav fancybox-next"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut", -nextEffect:"elastic",nextSpeed:300,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:300,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{speedIn:0,speedOut:300,opacity:0.8,css:{cursor:"pointer"},closeClick:!0},title:{type:"float"}}},group:{},opts:{},coming:null,current:null,isOpen:!1,isOpened:!1,wrap:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(b,c){a.close(!0);b&&!d.isArray(b)&&(b= -b instanceof d?d(b).get():[b]);a.isActive=!0;a.opts=d.extend(!0,{},a.defaults,c);d.isPlainObject(c)&&c.keys!==s&&(a.opts.keys=c.keys?d.extend({},a.defaults.keys,c.keys):!1);a.group=b;a._start(a.opts.index||0)},cancel:function(){a.coming&&!1===a.trigger("onCancel")||(a.coming=null,a.hideLoading(),a.ajaxLoad&&a.ajaxLoad.abort(),a.ajaxLoad=null,a.imgPreload&&(a.imgPreload.onload=a.imgPreload.onabort=a.imgPreload.onerror=null))},close:function(b){a.cancel();a.current&&!1!==a.trigger("beforeClose")&&(a.unbindEvents(), -!a.isOpen||b&&!0===b[0]?(d(".fancybox-wrap").stop().trigger("onReset").remove(),a._afterZoomOut()):(a.isOpen=a.isOpened=!1,d(".fancybox-item, .fancybox-nav").remove(),a.wrap.stop(!0).removeClass("fancybox-opened"),a.inner.css("overflow","hidden"),a.transitions[a.current.closeMethod]()))},play:function(b){var c=function(){clearTimeout(a.player.timer)},f=function(){c();a.current&&a.player.isActive&&(a.player.timer=setTimeout(a.next,a.current.playSpeed))},e=function(){c();d("body").unbind(".player"); -a.player.isActive=!1;a.trigger("onPlayEnd")};if(a.player.isActive||b&&!1===b[0])e();else if(a.current&&(a.current.loop||a.current.index<a.group.length-1))a.player.isActive=!0,d("body").bind({"afterShow.player onUpdate.player":f,"onCancel.player beforeClose.player":e,"beforeLoad.player":c}),f(),a.trigger("onPlayStart")},next:function(){a.current&&a.jumpto(a.current.index+1)},prev:function(){a.current&&a.jumpto(a.current.index-1)},jumpto:function(b){a.current&&(b=parseInt(b,10),1<a.group.length&&a.current.loop&& -(b>=a.group.length?b=0:0>b&&(b=a.group.length-1)),a.group[b]!==s&&(a.cancel(),a._start(b)))},reposition:function(b,c){a.isOpen&&(c&&"scroll"===c.type?a.wrap.stop().animate(a._getPosition(b),200):a.wrap.css(a._getPosition(b)))},update:function(b){a.isOpen&&(q||setTimeout(function(){var c=a.current;if(q&&(q=!1,c)){if(!b||b&&("orientationchange"===b.type||c.autoResize&&"resize"===b.type))c.autoSize&&(a.inner.height("auto"),c.height=a.inner.height()),a._setDimension(),c.canGrow&&a.inner.height("auto"); -c.autoCenter&&a.reposition(null,b);a.trigger("onUpdate")}},100),q=!0)},toggle:function(){a.isOpen&&(a.current.fitToView=!a.current.fitToView,a.update())},hideLoading:function(){m.unbind("keypress.fb");d("#fancybox-loading").remove()},showLoading:function(){a.hideLoading();m.bind("keypress.fb",function(b){27==b.keyCode&&(b.preventDefault(),a.cancel())});d('<div id="fancybox-loading"><div></div></div>').click(a.cancel).appendTo("body")},getViewport:function(){return{x:l.scrollLeft(),y:l.scrollTop(), -w:l.width(),h:l.height()}},unbindEvents:function(){a.wrap&&a.wrap.unbind(".fb");m.unbind(".fb");l.unbind(".fb")},bindEvents:function(){var b=a.current,c=b.keys;b&&(l.bind("resize.fb, orientationchange.fb",a.update),!b.fixed&&b.autoCenter&&l.bind("scroll.fb",a.update),c&&m.bind("keydown.fb",function(b){var e;!b.ctrlKey&&!b.altKey&&!b.shiftKey&&!b.metaKey&&0>d.inArray(b.target.tagName.toLowerCase(),["input","textarea","select","button"])&&(e=b.keyCode,-1<d.inArray(e,c.close)?(a.close(),b.preventDefault()): --1<d.inArray(e,c.next)?(a.next(),b.preventDefault()):-1<d.inArray(e,c.prev)&&(a.prev(),b.preventDefault()))}),d.fn.mousewheel&&b.mouseWheel&&1<a.group.length&&a.wrap.bind("mousewheel.fb",function(b,c){var d=b.target||null;if(0!==c&&(!d||0===d.clientHeight||d.scrollHeight===d.clientHeight&&d.scrollWidth===d.clientWidth))b.preventDefault(),a[0<c?"prev":"next"]()}))},trigger:function(b){var c,f=a[-1<d.inArray(b,["onCancel","beforeLoad","afterLoad"])?"coming":"current"];if(f){d.isFunction(f[b])&&(c=f[b].apply(f, -Array.prototype.slice.call(arguments,1)));if(!1===c)return!1;f.helpers&&d.each(f.helpers,function(c,g){if(g&&d.isPlainObject(a.helpers[c])&&d.isFunction(a.helpers[c][b]))a.helpers[c][b](g,f)});d.event.trigger(b+".fb")}},isImage:function(a){return a&&a.toString().match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)},isSWF:function(a){return a&&a.toString().match(/\.(swf)(.*)?$/i)},_start:function(b){var c={},f=a.group[b]||null,e,g,k;if(f&&(f.nodeType||f instanceof d))e=!0,d.metadata&&(c=d(f).metadata());c=d.extend(!0, -{},a.opts,{index:b,element:f},d.isPlainObject(f)?f:c);d.each(["href","title","content","type"],function(b,g){c[g]=a.opts[g]||e&&d(f).attr(g)||c[g]||null});"number"===typeof c.margin&&(c.margin=[c.margin,c.margin,c.margin,c.margin]);c.modal&&d.extend(!0,c,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{css:{cursor:"auto"},closeClick:!1}}});a.coming=c;if(!1===a.trigger("beforeLoad"))a.coming=null;else{b=c.type;g=c.href||f;b||(e&&(k=d(f).data("fancybox-type"), -!k&&f.className&&(b=(k=f.className.match(/fancybox\.(\w+)/))?k[1]:null)),!b&&"string"===d.type(g)&&(a.isImage(g)?b="image":a.isSWF(g)?b="swf":g.match(/^#/)&&(b="inline")),b||(b=e?"inline":"html"),c.type=b);if("inline"===b||"html"===b){if(c.content||(c.content="inline"===b?d("string"===d.type(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):f),!c.content||!c.content.length)b=null}else g||(b=null);g=g.split(/\s+/,2);c.group=a.group;c.isDom=e;c.href=g.shift();c.selector=g.shift();"image"===b?a._loadImage():"ajax"=== -b?a._loadAjax():b?a._afterLoad():a._error("type")}},_error:function(b){a.hideLoading();d.extend(a.coming,{type:"html",autoSize:!0,minHeight:0,hasError:b,content:a.coming.tpl.error});a._afterLoad()},_loadImage:function(){a.imgPreload=new Image;a.imgPreload.onload=function(){this.onload=this.onerror=null;a.coming.width=this.width;a.coming.height=this.height;a._afterLoad()};a.imgPreload.onerror=function(){this.onload=this.onerror=null;a._error("image")};a.imgPreload.src=a.coming.href;a.imgPreload.width|| -a.showLoading()},_loadAjax:function(){a.showLoading();a.ajaxLoad=d.ajax(d.extend({},a.coming.ajax,{url:a.coming.href,error:function(b,c){a.coming&&"abort"!==c?a._error("ajax",b):a.hideLoading()},success:function(b,c){"success"===c&&(a.coming.content=b,a._afterLoad())}}))},_preloadImages:function(){var b=a.group,c=a.current,f=b.length,e,g,k,h=Math.min(c.preload,f-1);if(c.preload&&!(2>b.length))for(k=1;k<=h;k+=1)if(e=b[(c.index+k)%f],g=d(e).attr("href")||e,"image"===e.type||a.isImage(g))(new Image).src= -g},_afterLoad:function(){a.hideLoading();!a.coming||!1===a.trigger("afterLoad",a.current)?a.coming=!1:(a.isOpened?(d(".fancybox-item").remove(),a.wrap.stop(!0).removeClass("fancybox-opened"),a.inner.css("overflow","hidden"),a.transitions[a.current.prevMethod]()):(d(".fancybox-wrap").stop().trigger("onReset").remove(),a.trigger("afterClose")),a.unbindEvents(),a.isOpen=!1,a.current=a.coming,a.wrap=d(a.current.tpl.wrap).addClass("fancybox-"+(r?"mobile":"desktop")+" fancybox-tmp "+a.current.wrapCSS).appendTo("body"), -a.outer=d(".fancybox-outer",a.wrap).css("padding",a.current.padding+"px"),a.inner=d(".fancybox-inner",a.wrap),a._setContent())},_setContent:function(){var b=a.current,c=b.content,f=b.type,e;switch(f){case "inline":case "ajax":case "html":b.selector?c=d("<div>").html(c).find(b.selector):c instanceof d&&(c=c.show().detach(),c.parent().hasClass("fancybox-inner")&&c.parents(".fancybox-wrap").trigger("onReset").remove(),d(a.wrap).bind("onReset",function(){c.appendTo("body").hide()}));b.autoSize&&(e=d('<div class="fancybox-tmp '+ -a.current.wrapCSS+'"></div>').appendTo("body").append(c),b.width=e.width(),b.height=e.height(),e.width(a.current.width),e.height()>b.height&&(e.width(b.width+1),b.width=e.width(),b.height=e.height()),c=e.contents().detach(),e.remove());break;case "image":c=b.tpl.image.replace("{href}",b.href);b.aspectRatio=!0;break;case "swf":c=b.tpl.swf.replace(/\{width\}/g,b.width).replace(/\{height\}/g,b.height).replace(/\{href\}/g,b.href)}if("iframe"===f){c=d(b.tpl.iframe.replace("{rnd}",(new Date).getTime())).attr("scrolling", -b.scrolling);b.scrolling="auto";if(b.autoSize){c.width(b.width);a.showLoading();c.data("ready",!1).appendTo(a.inner).bind({onCancel:function(){d(this).unbind();a._afterZoomOut()},load:function(){var c=d(this),f;try{this.contentWindow.document.location&&(f=c.contents().find("body").height()+12,c.height(f))}catch(e){b.autoSize=!1}!1===c.data("ready")?(a.hideLoading(),f&&(a.current.height=f),a._beforeShow(),c.data("ready",!0)):f&&a.update()}}).attr("src",b.href);return}c.attr("src",b.href)}else if("image"=== -f||"swf"===f)b.autoSize=!1,b.scrolling="visible";a.inner.append(c);a._beforeShow()},_beforeShow:function(){a.coming=null;a.trigger("beforeShow");a._setDimension();a.wrap.hide().removeClass("fancybox-tmp");a.bindEvents();a._preloadImages();a.transitions[a.isOpened?a.current.nextMethod:a.current.openMethod]()},_setDimension:function(){var b=a.wrap,c=a.outer,f=a.inner,e=a.current,g=a.getViewport(),k=e.margin,h=2*e.padding,i=e.width,j=e.height,l=e.maxWidth,o=e.maxHeight,m=e.minWidth,n=e.minHeight,p;g.w-= -k[1]+k[3];g.h-=k[0]+k[2];-1<i.toString().indexOf("%")&&(i=(g.w-h)*parseFloat(i)/100);-1<j.toString().indexOf("%")&&(j=(g.h-h)*parseFloat(j)/100);k=i/j;i+=h;j+=h;e.fitToView&&(l=Math.min(g.w,l),o=Math.min(g.h,o));e.aspectRatio?(i>l&&(i=l,j=(i-h)/k+h),j>o&&(j=o,i=(j-h)*k+h),i<m&&(i=m,j=(i-h)/k+h),j<n&&(j=n,i=(j-h)*k+h)):(i=Math.max(m,Math.min(i,l)),j=Math.max(n,Math.min(j,o)));i=Math.round(i);j=Math.round(j);d(b.add(c).add(f)).width("auto").height("auto");f.width(i-h).height(j-h);b.width(i);p=b.height(); -if(i>l||p>o)for(;(i>l||p>o)&&i>m&&p>n;)j-=10,e.aspectRatio?(i=Math.round((j-h)*k+h),i<m&&(i=m,j=(i-h)/k+h)):i-=10,f.width(i-h).height(j-h),b.width(i),p=b.height();e.dim={width:i,height:p};e.canGrow=e.autoSize&&j>n&&j<o;e.canShrink=!1;e.canExpand=!1;if(i-h<e.width||j-h<e.height)e.canExpand=!0;else if((i>g.w||p>g.h)&&i>m&&j>n)e.canShrink=!0;b=p-h;a.innerSpace=b-f.height();a.outerSpace=b-c.height()},_getPosition:function(b){var c=a.current,f=a.getViewport(),d=c.margin,g=a.wrap.width()+d[1]+d[3],k=a.wrap.height()+ -d[0]+d[2],h={position:"absolute",top:d[0]+f.y,left:d[3]+f.x};if(c.autoCenter&&c.fixed&&(!b||!1===b[0])&&k<=f.h&&g<=f.w)h={position:"fixed",top:d[0],left:d[3]};h.top=Math.ceil(Math.max(h.top,h.top+(f.h-k)*c.topRatio))+"px";h.left=Math.ceil(Math.max(h.left,h.left+0.5*(f.w-g)))+"px";return h},_afterZoomIn:function(){var b=a.current,c=b?b.scrolling:"no";b&&(a.isOpen=a.isOpened=!0,a.wrap.addClass("fancybox-opened").css("overflow","visible"),a.update(),a.inner.css("overflow","yes"===c?"scroll":"no"===c? -"hidden":c),(b.closeClick||b.nextClick)&&a.inner.css("cursor","pointer").bind("click.fb",function(c){if(!d(c.target).is("a")&&!d(c.target).parent().is("a"))a[b.closeClick?"close":"next"]()}),b.closeBtn&&d(b.tpl.closeBtn).appendTo(a.outer).bind("click.fb",a.close),b.arrows&&1<a.group.length&&((b.loop||0<b.index)&&d(b.tpl.prev).appendTo(a.inner).bind("click.fb",a.prev),(b.loop||b.index<a.group.length-1)&&d(b.tpl.next).appendTo(a.inner).bind("click.fb",a.next)),a.trigger("afterShow"),a.opts.autoPlay&& -!a.player.isActive&&(a.opts.autoPlay=!1,a.play()))},_afterZoomOut:function(){a.trigger("afterClose");a.wrap.trigger("onReset").remove();d.extend(a,{group:{},opts:{},current:null,isActive:!1,isOpened:!1,isOpen:!1,wrap:null,outer:null,inner:null})}});a.transitions={getOrigPosition:function(){var b=a.current,c=b.element,f=b.padding,e=d(b.orig),g={},k=50,h=50;!e.length&&b.isDom&&d(c).is(":visible")&&(e=d(c).find("img:first"),e.length||(e=d(c)));e.length?(g=e.offset(),e.is("img")&&(k=e.outerWidth(),h= -e.outerHeight())):(b=a.getViewport(),g.top=b.y+0.5*(b.h-h),g.left=b.x+0.5*(b.w-k));return g={top:Math.ceil(g.top-f)+"px",left:Math.ceil(g.left-f)+"px",width:Math.ceil(k+2*f)+"px",height:Math.ceil(h+2*f)+"px"}},step:function(b,c){var d,e,g;if("width"===c.prop||"height"===c.prop)e=g=Math.ceil(b-2*a.current.padding),"height"===c.prop&&(d=(b-c.start)/(c.end-c.start),c.start>c.end&&(d=1-d),e-=a.innerSpace*d,g-=a.outerSpace*d),a.inner[c.prop](e),a.outer[c.prop](g)},zoomIn:function(){var b=a.wrap,c=a.current, -f,e;f=c.dim;"elastic"===c.openEffect?(e=d.extend({},f,a._getPosition(!0)),delete e.position,f=this.getOrigPosition(),c.openOpacity&&(f.opacity=0,e.opacity=1),a.outer.add(a.inner).width("auto").height("auto"),b.css(f).show(),b.animate(e,{duration:c.openSpeed,easing:c.openEasing,step:this.step,complete:a._afterZoomIn})):(b.css(d.extend({},f,a._getPosition())),"fade"===c.openEffect?b.fadeIn(c.openSpeed,a._afterZoomIn):(b.show(),a._afterZoomIn()))},zoomOut:function(){var b=a.wrap,c=a.current,d;"elastic"=== -c.closeEffect?("fixed"===b.css("position")&&b.css(a._getPosition(!0)),d=this.getOrigPosition(),c.closeOpacity&&(d.opacity=0),b.animate(d,{duration:c.closeSpeed,easing:c.closeEasing,step:this.step,complete:a._afterZoomOut})):b.fadeOut("fade"===c.closeEffect?c.closeSpeed:0,a._afterZoomOut)},changeIn:function(){var b=a.wrap,c=a.current,d;"elastic"===c.nextEffect?(d=a._getPosition(!0),d.opacity=0,d.top=parseInt(d.top,10)-200+"px",b.css(d).show().animate({opacity:1,top:"+=200px"},{duration:c.nextSpeed, -easing:c.nextEasing,complete:a._afterZoomIn})):(b.css(a._getPosition()),"fade"===c.nextEffect?b.hide().fadeIn(c.nextSpeed,a._afterZoomIn):(b.show(),a._afterZoomIn()))},changeOut:function(){var b=a.wrap,c=a.current,f=function(){d(this).trigger("onReset").remove()};b.removeClass("fancybox-opened");"elastic"===c.prevEffect?b.animate({opacity:0,top:"+=200px"},{duration:c.prevSpeed,easing:c.prevEasing,complete:f}):b.fadeOut("fade"===c.prevEffect?c.prevSpeed:0,f)}};a.helpers.overlay={overlay:null,update:function(){var a, -c;this.overlay.width(0).height(0);d.browser.msie?(a=Math.max(n.documentElement.scrollWidth,n.body.scrollWidth),c=Math.max(n.documentElement.offsetWidth,n.body.offsetWidth),a=a<c?l.width():a):a=m.width();this.overlay.width(a).height(m.height())},beforeShow:function(b){this.overlay||(b=d.extend(!0,{speedIn:"fast",closeClick:!0,opacity:1,css:{background:"black"}},b),this.overlay=d('<div id="fancybox-overlay"></div>').css(b.css).appendTo("body"),this.update(),b.closeClick&&this.overlay.bind("click.fb", -a.close),l.bind("resize.fb",d.proxy(this.update,this)),this.overlay.fadeTo(b.speedIn,b.opacity))},onUpdate:function(){this.update()},afterClose:function(a){this.overlay&&this.overlay.fadeOut(a.speedOut||0,function(){d(this).remove()});this.overlay=null}};a.helpers.title={beforeShow:function(b){var c;if(c=a.current.title)c=d('<div class="fancybox-title fancybox-title-'+b.type+'-wrap">'+c+"</div>").appendTo("body"),"float"===b.type&&(c.width(c.width()),c.wrapInner('<span class="child"></span>'),a.current.margin[2]+= -Math.abs(parseInt(c.css("margin-bottom"),10))),c.appendTo("over"===b.type?a.inner:"outside"===b.type?a.wrap:a.outer)}};d.fn.fancybox=function(b){var c=d(this),f=this.selector||"",e,g=function(g){var h=this,i=e,j;!g.ctrlKey&&!g.altKey&&!g.shiftKey&&!g.metaKey&&(g.preventDefault(),g=b.groupAttr||"data-fancybox-group",j=d(h).attr(g),j||(g="rel",j=h[g]),j&&""!==j&&"nofollow"!==j&&(h=f.length?d(f):c,h=h.filter("["+g+'="'+j+'"]'),i=h.index(this)),b.index=i,a.open(h,b))},b=b||{};e=b.index||0;f?m.undelegate(f, -"click.fb-start").delegate(f,"click.fb-start",g):c.unbind("click.fb-start").bind("click.fb-start",g);return this}})(window,document);
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/fancybox/jquery.mousewheel-3.0.4.pack.js b/javascript/libs/jquery/plugins/fancybox/jquery.mousewheel-3.0.4.pack.js deleted file mode 100644 index cb66588..0000000 --- a/javascript/libs/jquery/plugins/fancybox/jquery.mousewheel-3.0.4.pack.js +++ /dev/null @@ -1,14 +0,0 @@ -/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) -* Licensed under the MIT License (LICENSE.txt). -* -* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. -* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. -* Thanks to: Seamus Leahy for adding deltaX and deltaY -* -* Version: 3.0.4 -* -* Requires: 1.2.2+ -*/ - -(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a= -f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.css b/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.css deleted file mode 100644 index 77d0357..0000000 --- a/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.css +++ /dev/null @@ -1,9 +0,0 @@ -#tooltip {
- position: absolute;
- z-index: 3000;
- border: 1px solid #111;
- background-color: #eee;
- padding: 5px; - opacity: 0.85; -}
-#tooltip h3, #tooltip div { margin: 0; }
diff --git a/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.js b/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.js deleted file mode 100644 index af2d3df..0000000 --- a/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.js +++ /dev/null @@ -1,294 +0,0 @@ -/* - * jQuery Tooltip plugin 1.3 - * - * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ - * http://docs.jquery.com/Plugins/Tooltip - * - * Copyright (c) 2006 - 2008 Jörn Zaefferer - * - * $Id: jquery.tooltip.js,v 1.1 2009/11/09 19:06:02 tylerbello Exp $ - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - -;(function($) { - - // the tooltip element - var helper = {}, - // the current tooltipped element - current, - // the title of the current element, used for restoring - title, - // timeout id for delayed tooltips - tID, - // IE 5.5 or 6 - IE = $.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent), - // flag for mouse tracking - track = false; - - $.tooltip = { - blocked: false, - defaults: { - delay: 200, - fade: false, - showURL: true, - extraClass: "", - top: 15, - left: 15, - id: "tooltip" - }, - block: function() { - $.tooltip.blocked = !$.tooltip.blocked; - } - }; - - $.fn.extend({ - tooltip: function(settings) { - settings = $.extend({}, $.tooltip.defaults, settings); - createHelper(settings); - return this.each(function() { - $.data(this, "tooltip", settings); - this.tOpacity = helper.parent.css("opacity"); - // copy tooltip into its own expando and remove the title - this.tooltipText = this.title; - $(this).removeAttr("title"); - // also remove alt attribute to prevent default tooltip in IE - this.alt = ""; - }) - .mouseover(save) - .mouseout(hide) - .click(hide); - }, - fixPNG: IE ? function() { - return this.each(function () { - var image = $(this).css('backgroundImage'); - if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) { - image = RegExp.$1; - $(this).css({ - 'backgroundImage': 'none', - 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" - }).each(function () { - var position = $(this).css('position'); - if (position != 'absolute' && position != 'relative') - $(this).css('position', 'relative'); - }); - } - }); - } : function() { return this; }, - unfixPNG: IE ? function() { - return this.each(function () { - $(this).css({'filter': '', backgroundImage: ''}); - }); - } : function() { return this; }, - hideWhenEmpty: function() { - return this.each(function() { - $(this)[ $(this).html() ? "show" : "hide" ](); - }); - }, - url: function() { - return this.attr('href') || this.attr('src'); - } - }); - - function createHelper(settings) { - // there can be only one tooltip helper - if( helper.parent ) - return; - // create the helper, h3 for title, div for url - helper.parent = $('<div id="' + settings.id + '"><h3></h3><div class="body"></div><div class="url"></div></div>') - // add to document - .appendTo(document.body) - // hide it at first - .hide(); - - // apply bgiframe if available - if ( $.fn.bgiframe ) - helper.parent.bgiframe(); - - // save references to title and url elements - helper.title = $('h3', helper.parent); - helper.body = $('div.body', helper.parent); - helper.url = $('div.url', helper.parent); - } - - function settings(element) { - return $.data(element, "tooltip"); - } - - // main event handler to start showing tooltips - function handle(event) { - // show helper, either with timeout or on instant - if( settings(this).delay ) - tID = setTimeout(show, settings(this).delay); - else - show(); - - // if selected, update the helper position when the mouse moves - track = !!settings(this).track; - $(document.body).bind('mousemove', update); - - // update at least once - update(event); - } - - // save elements title before the tooltip is displayed - function save() { - // if this is the current source, or it has no title (occurs with click event), stop - if ( $.tooltip.blocked || this == current || (!this.tooltipText && !settings(this).bodyHandler) ) - return; - - // save current - current = this; - title = this.tooltipText; - - if ( settings(this).bodyHandler ) { - helper.title.hide(); - var bodyContent = settings(this).bodyHandler.call(this); - if (bodyContent.nodeType || bodyContent.jquery) { - helper.body.empty().append(bodyContent) - } else { - helper.body.html( bodyContent ); - } - helper.body.show(); - } else if ( settings(this).showBody ) { - var parts = title.split(settings(this).showBody); - helper.title.html(parts.shift()).show(); - helper.body.empty(); - for(var i = 0, part; (part = parts[i]); i++) { - if(i > 0) - helper.body.append("<br/>"); - helper.body.append(part); - } - helper.body.hideWhenEmpty(); - } else { - helper.title.html(title).show(); - helper.body.hide(); - } - - // if element has href or src, add and show it, otherwise hide it - if( settings(this).showURL && $(this).url() ) - helper.url.html( $(this).url().replace('http://', '') ).show(); - else - helper.url.hide(); - - // add an optional class for this tip - helper.parent.addClass(settings(this).extraClass); - - // fix PNG background for IE - if (settings(this).fixPNG ) - helper.parent.fixPNG(); - - handle.apply(this, arguments); - } - - // delete timeout and show helper - function show() { - tID = null; - if ((!IE || !$.fn.bgiframe) && settings(current).fade) { - if (helper.parent.is(":animated")) - helper.parent.stop().show().fadeTo(settings(current).fade, current.tOpacity); - else - helper.parent.is(':visible') ? helper.parent.fadeTo(settings(current).fade, current.tOpacity) : helper.parent.fadeIn(settings(current).fade); - } else { - helper.parent.show(); - } - update(); - } - - /** - * callback for mousemove - * updates the helper position - * removes itself when no current element - */ - function update(event) { - if($.tooltip.blocked) - return; - - if (event && event.target.tagName == "OPTION") { - return; - } - - // stop updating when tracking is disabled and the tooltip is visible - if ( !track && helper.parent.is(":visible")) { - $(document.body).unbind('mousemove', update) - } - - // if no current element is available, remove this listener - if( current == null ) { - $(document.body).unbind('mousemove', update); - return; - } - - // remove position helper classes - helper.parent.removeClass("viewport-right").removeClass("viewport-bottom"); - - var left = helper.parent[0].offsetLeft; - var top = helper.parent[0].offsetTop; - if (event) { - // position the helper 15 pixel to bottom right, starting from mouse position - left = event.pageX + settings(current).left; - top = event.pageY + settings(current).top; - var right='auto'; - if (settings(current).positionLeft) { - right = $(window).width() - left; - left = 'auto'; - } - helper.parent.css({ - left: left, - right: right, - top: top - }); - } - - var v = viewport(), - h = helper.parent[0]; - // check horizontal position - if (v.x + v.cx < h.offsetLeft + h.offsetWidth) { - left -= h.offsetWidth + 20 + settings(current).left; - helper.parent.css({left: left + 'px'}).addClass("viewport-right"); - } - // check vertical position - if (v.y + v.cy < h.offsetTop + h.offsetHeight) { - top -= h.offsetHeight + 20 + settings(current).top; - helper.parent.css({top: top + 'px'}).addClass("viewport-bottom"); - } - } - - function viewport() { - return { - x: $(window).scrollLeft(), - y: $(window).scrollTop(), - cx: $(window).width(), - cy: $(window).height() - }; - } - - // hide helper and restore added classes and the title - function hide(event) { - if($.tooltip.blocked) - return; - // clear timeout if possible - if(tID) - clearTimeout(tID); - // no more current element - current = null; - - var tsettings = settings(this); - function complete() { - helper.parent.removeClass( tsettings.extraClass ).hide().css("opacity", ""); - } - if ((!IE || !$.fn.bgiframe) && tsettings.fade) { - if (helper.parent.is(':animated')) - helper.parent.stop().fadeTo(tsettings.fade, 0, complete); - else - helper.parent.stop().fadeOut(tsettings.fade, complete); - } else - complete(); - - if( settings(this).fixPNG ) - helper.parent.unfixPNG(); - } - -})(jQuery); diff --git a/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.min.js b/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.min.js deleted file mode 100644 index 6b66f01..0000000 --- a/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.min.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * jQuery Tooltip plugin 1.3 - * - * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ - * http://docs.jquery.com/Plugins/Tooltip - * - * Copyright (c) 2006 - 2008 Jörn Zaefferer - * - * $Id: jquery.tooltip.min.js,v 1.1 2009/11/09 19:06:02 tylerbello Exp $ - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else -show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else -helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else -helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else -helper.parent.stop().fadeOut(tsettings.fade,complete);}else -complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.pack.js b/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.pack.js deleted file mode 100644 index 76dd88d..0000000 --- a/javascript/libs/jquery/plugins/jquery-tooltip/jquery.tooltip.pack.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * jQuery Tooltip plugin 1.3 - * - * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ - * http://docs.jquery.com/Plugins/Tooltip - * - * Copyright (c) 2006 - 2008 Jörn Zaefferer - * - * $Id: jquery.tooltip.pack.js,v 1.1 2009/11/09 19:06:02 tylerbello Exp $ - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ -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}(';(8($){j e={},9,m,B,A=$.2u.2g&&/29\\s(5\\.5|6\\.)/.1M(1H.2t),M=12;$.k={w:12,1h:{Z:25,r:12,1d:19,X:"",G:15,E:15,16:"k"},2s:8(){$.k.w=!$.k.w}};$.N.1v({k:8(a){a=$.1v({},$.k.1h,a);1q(a);g 2.F(8(){$.1j(2,"k",a);2.11=e.3.n("1g");2.13=2.m;$(2).24("m");2.22=""}).21(1e).1U(q).1S(q)},H:A?8(){g 2.F(8(){j b=$(2).n(\'Y\');4(b.1J(/^o\\(["\']?(.*\\.1I)["\']?\\)$/i)){b=1F.$1;$(2).n({\'Y\':\'1D\',\'1B\':"2r:2q.2m.2l(2j=19, 2i=2h, 1p=\'"+b+"\')"}).F(8(){j a=$(2).n(\'1o\');4(a!=\'2f\'&&a!=\'1u\')$(2).n(\'1o\',\'1u\')})}})}:8(){g 2},1l:A?8(){g 2.F(8(){$(2).n({\'1B\':\'\',Y:\'\'})})}:8(){g 2},1x:8(){g 2.F(8(){$(2)[$(2).D()?"l":"q"]()})},o:8(){g 2.1k(\'28\')||2.1k(\'1p\')}});8 1q(a){4(e.3)g;e.3=$(\'<t 16="\'+a.16+\'"><10></10><t 1i="f"></t><t 1i="o"></t></t>\').27(K.f).q();4($.N.L)e.3.L();e.m=$(\'10\',e.3);e.f=$(\'t.f\',e.3);e.o=$(\'t.o\',e.3)}8 7(a){g $.1j(a,"k")}8 1f(a){4(7(2).Z)B=26(l,7(2).Z);p l();M=!!7(2).M;$(K.f).23(\'W\',u);u(a)}8 1e(){4($.k.w||2==9||(!2.13&&!7(2).U))g;9=2;m=2.13;4(7(2).U){e.m.q();j a=7(2).U.1Z(2);4(a.1Y||a.1V){e.f.1c().T(a)}p{e.f.D(a)}e.f.l()}p 4(7(2).18){j b=m.1T(7(2).18);e.m.D(b.1R()).l();e.f.1c();1Q(j i=0,R;(R=b[i]);i++){4(i>0)e.f.T("<1P/>");e.f.T(R)}e.f.1x()}p{e.m.D(m).l();e.f.q()}4(7(2).1d&&$(2).o())e.o.D($(2).o().1O(\'1N://\',\'\')).l();p e.o.q();e.3.P(7(2).X);4(7(2).H)e.3.H();1f.1L(2,1K)}8 l(){B=S;4((!A||!$.N.L)&&7(9).r){4(e.3.I(":17"))e.3.Q().l().O(7(9).r,9.11);p e.3.I(\':1a\')?e.3.O(7(9).r,9.11):e.3.1G(7(9).r)}p{e.3.l()}u()}8 u(c){4($.k.w)g;4(c&&c.1W.1X=="1E"){g}4(!M&&e.3.I(":1a")){$(K.f).1b(\'W\',u)}4(9==S){$(K.f).1b(\'W\',u);g}e.3.V("z-14").V("z-1A");j b=e.3[0].1z;j a=e.3[0].1y;4(c){b=c.2o+7(9).E;a=c.2n+7(9).G;j d=\'1w\';4(7(9).2k){d=$(C).1r()-b;b=\'1w\'}e.3.n({E:b,14:d,G:a})}j v=z(),h=e.3[0];4(v.x+v.1s<h.1z+h.1n){b-=h.1n+20+7(9).E;e.3.n({E:b+\'1C\'}).P("z-14")}4(v.y+v.1t<h.1y+h.1m){a-=h.1m+20+7(9).G;e.3.n({G:a+\'1C\'}).P("z-1A")}}8 z(){g{x:$(C).2e(),y:$(C).2d(),1s:$(C).1r(),1t:$(C).2p()}}8 q(a){4($.k.w)g;4(B)2c(B);9=S;j b=7(2);8 J(){e.3.V(b.X).q().n("1g","")}4((!A||!$.N.L)&&b.r){4(e.3.I(\':17\'))e.3.Q().O(b.r,0,J);p e.3.Q().2b(b.r,J)}p J();4(7(2).H)e.3.1l()}})(2a);',62,155,'||this|parent|if|||settings|function|current||||||body|return|||var|tooltip|show|title|css|url|else|hide|fade||div|update||blocked|||viewport|IE|tID|window|html|left|each|top|fixPNG|is|complete|document|bgiframe|track|fn|fadeTo|addClass|stop|part|null|append|bodyHandler|removeClass|mousemove|extraClass|backgroundImage|delay|h3|tOpacity|false|tooltipText|right||id|animated|showBody|true|visible|unbind|empty|showURL|save|handle|opacity|defaults|class|data|attr|unfixPNG|offsetHeight|offsetWidth|position|src|createHelper|width|cx|cy|relative|extend|auto|hideWhenEmpty|offsetTop|offsetLeft|bottom|filter|px|none|OPTION|RegExp|fadeIn|navigator|png|match|arguments|apply|test|http|replace|br|for|shift|click|split|mouseout|jquery|target|tagName|nodeType|call||mouseover|alt|bind|removeAttr|200|setTimeout|appendTo|href|MSIE|jQuery|fadeOut|clearTimeout|scrollTop|scrollLeft|absolute|msie|crop|sizingMethod|enabled|positionLeft|AlphaImageLoader|Microsoft|pageY|pageX|height|DXImageTransform|progid|block|userAgent|browser'.split('|'),0,{}))
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.bgiframe.js b/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.bgiframe.js deleted file mode 100644 index 5d270f3..0000000 --- a/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.bgiframe.js +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) - * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. - * - * $LastChangedDate: 2007-06-20 03:23:36 +0200 (Mi, 20 Jun 2007) $ - * $Rev: 2110 $ - * - * Version 2.1 - */ - -(function($){ - -/** - * The bgiframe is chainable and applies the iframe hack to get - * around zIndex issues in IE6. It will only apply itself in IE - * and adds a class to the iframe called 'bgiframe'. The iframe - * is appeneded as the first child of the matched element(s) - * with a tabIndex and zIndex of -1. - * - * By default the plugin will take borders, sized with pixel units, - * into account. If a different unit is used for the border's width, - * then you will need to use the top and left settings as explained below. - * - * NOTICE: This plugin has been reported to cause perfromance problems - * when used on elements that change properties (like width, height and - * opacity) a lot in IE6. Most of these problems have been caused by - * the expressions used to calculate the elements width, height and - * borders. Some have reported it is due to the opacity filter. All - * these settings can be changed if needed as explained below. - * - * @example $('div').bgiframe(); - * @before <div><p>Paragraph</p></div> - * @result <div><iframe class="bgiframe".../><p>Paragraph</p></div> - * - * @param Map settings Optional settings to configure the iframe. - * @option String|Number top The iframe must be offset to the top - * by the width of the top border. This should be a negative - * number representing the border-top-width. If a number is - * is used here, pixels will be assumed. Otherwise, be sure - * to specify a unit. An expression could also be used. - * By default the value is "auto" which will use an expression - * to get the border-top-width if it is in pixels. - * @option String|Number left The iframe must be offset to the left - * by the width of the left border. This should be a negative - * number representing the border-left-width. If a number is - * is used here, pixels will be assumed. Otherwise, be sure - * to specify a unit. An expression could also be used. - * By default the value is "auto" which will use an expression - * to get the border-left-width if it is in pixels. - * @option String|Number width This is the width of the iframe. If - * a number is used here, pixels will be assume. Otherwise, be sure - * to specify a unit. An experssion could also be used. - * By default the value is "auto" which will use an experssion - * to get the offsetWidth. - * @option String|Number height This is the height of the iframe. If - * a number is used here, pixels will be assume. Otherwise, be sure - * to specify a unit. An experssion could also be used. - * By default the value is "auto" which will use an experssion - * to get the offsetHeight. - * @option Boolean opacity This is a boolean representing whether or not - * to use opacity. If set to true, the opacity of 0 is applied. If - * set to false, the opacity filter is not applied. Default: true. - * @option String src This setting is provided so that one could change - * the src of the iframe to whatever they need. - * Default: "javascript:false;" - * - * @name bgiframe - * @type jQuery - * @cat Plugins/bgiframe - * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) - */ -$.fn.bgIframe = $.fn.bgiframe = function(s) { - // This is only for IE6 - if ( $.browser.msie && parseInt($.browser.version) <= 6 ) { - s = $.extend({ - top : 'auto', // auto == .currentStyle.borderTopWidth - left : 'auto', // auto == .currentStyle.borderLeftWidth - width : 'auto', // auto == offsetWidth - height : 'auto', // auto == offsetHeight - opacity : true, - src : 'javascript:false;' - }, s || {}); - var prop = function(n){return n&&n.constructor==Number?n+'px':n;}, - html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+ - 'style="display:block;position:absolute;z-index:-1;'+ - (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+ - 'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+ - 'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+ - 'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+ - 'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+ - '"/>'; - return this.each(function() { - if ( $('> iframe.bgiframe', this).length == 0 ) - this.insertBefore( document.createElement(html), this.firstChild ); - }); - } - return this; -}; - -// Add browser.version if it doesn't exist -if (!$.browser.version) - $.browser.version = navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]; - -})(jQuery);
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.delegate.js b/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.delegate.js deleted file mode 100644 index 09f197d..0000000 --- a/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.delegate.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * jQuery delegate plug-in v1.0 - * - * Copyright (c) 2007 Jörn Zaefferer - * - * $Id: jquery.delegate.js,v 1.1 2009/11/09 19:06:02 tylerbello Exp $ - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - -// provides cross-browser focusin and focusout events -// IE has native support, in other browsers, use event caputuring (neither bubbles) - -// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation -// handler is only called when $(event.target).is(delegate), in the scope of the jQuery-object for event.target - -// provides triggerEvent(type: String, target: Element) to trigger delegated events -;(function($) { - $.each({ - focus: 'focusin', - blur: 'focusout' - }, function( original, fix ){ - $.event.special[fix] = { - setup:function() { - if ( $.browser.msie ) return false; - this.addEventListener( original, $.event.special[fix].handler, true ); - }, - teardown:function() { - if ( $.browser.msie ) return false; - this.removeEventListener( original, - $.event.special[fix].handler, true ); - }, - handler: function(e) { - arguments[0] = $.event.fix(e); - arguments[0].type = fix; - return $.event.handle.apply(this, arguments); - } - }; - }); - - $.extend($.fn, { - delegate: function(type, delegate, handler) { - return this.bind(type, function(event) { - var target = $(event.target); - if (target.is(delegate)) { - return handler.apply(target, arguments); - } - }); - }, - triggerEvent: function(type, target) { - return this.triggerHandler(type, [jQuery.event.fix({ type: type, target: target })]); - } - }) -})(jQuery); diff --git a/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.dimensions.js b/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.dimensions.js deleted file mode 100644 index 2934714..0000000 --- a/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.dimensions.js +++ /dev/null @@ -1,504 +0,0 @@ -/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) - * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. - * - * $LastChangedDate: 2007-06-22 04:38:37 +0200 (Fr, 22 Jun 2007) $ - * $Rev: 2141 $ - * - * Version: 1.0b2 - */ - -(function($){ - -// store a copy of the core height and width methods -var height = $.fn.height, - width = $.fn.width; - -$.fn.extend({ - /** - * If used on document, returns the document's height (innerHeight) - * If used on window, returns the viewport's (window) height - * See core docs on height() to see what happens when used on an element. - * - * @example $("#testdiv").height() - * @result 200 - * - * @example $(document).height() - * @result 800 - * - * @example $(window).height() - * @result 400 - * - * @name height - * @type Object - * @cat Plugins/Dimensions - */ - height: function() { - if ( this[0] == window ) - return self.innerHeight || - $.boxModel && document.documentElement.clientHeight || - document.body.clientHeight; - - if ( this[0] == document ) - return Math.max( document.body.scrollHeight, document.body.offsetHeight ); - - return height.apply(this, arguments); - }, - - /** - * If used on document, returns the document's width (innerWidth) - * If used on window, returns the viewport's (window) width - * See core docs on height() to see what happens when used on an element. - * - * @example $("#testdiv").width() - * @result 200 - * - * @example $(document).width() - * @result 800 - * - * @example $(window).width() - * @result 400 - * - * @name width - * @type Object - * @cat Plugins/Dimensions - */ - width: function() { - if ( this[0] == window ) - return self.innerWidth || - $.boxModel && document.documentElement.clientWidth || - document.body.clientWidth; - - if ( this[0] == document ) - return Math.max( document.body.scrollWidth, document.body.offsetWidth ); - - return width.apply(this, arguments); - }, - - /** - * Returns the inner height value (without border) for the first matched element. - * If used on document, returns the document's height (innerHeight) - * If used on window, returns the viewport's (window) height - * - * @example $("#testdiv").innerHeight() - * @result 800 - * - * @name innerHeight - * @type Number - * @cat Plugins/Dimensions - */ - innerHeight: function() { - return this[0] == window || this[0] == document ? - this.height() : - this.is(':visible') ? - this[0].offsetHeight - num(this, 'borderTopWidth') - num(this, 'borderBottomWidth') : - this.height() + num(this, 'paddingTop') + num(this, 'paddingBottom'); - }, - - /** - * Returns the inner width value (without border) for the first matched element. - * If used on document, returns the document's Width (innerWidth) - * If used on window, returns the viewport's (window) width - * - * @example $("#testdiv").innerWidth() - * @result 1000 - * - * @name innerWidth - * @type Number - * @cat Plugins/Dimensions - */ - innerWidth: function() { - return this[0] == window || this[0] == document ? - this.width() : - this.is(':visible') ? - this[0].offsetWidth - num(this, 'borderLeftWidth') - num(this, 'borderRightWidth') : - this.width() + num(this, 'paddingLeft') + num(this, 'paddingRight'); - }, - - /** - * Returns the outer height value (including border) for the first matched element. - * Cannot be used on document or window. - * - * @example $("#testdiv").outerHeight() - * @result 1000 - * - * @name outerHeight - * @type Number - * @cat Plugins/Dimensions - */ - outerHeight: function() { - return this[0] == window || this[0] == document ? - this.height() : - this.is(':visible') ? - this[0].offsetHeight : - this.height() + num(this,'borderTopWidth') + num(this, 'borderBottomWidth') + num(this, 'paddingTop') + num(this, 'paddingBottom'); - }, - - /** - * Returns the outer width value (including border) for the first matched element. - * Cannot be used on document or window. - * - * @example $("#testdiv").outerHeight() - * @result 1000 - * - * @name outerHeight - * @type Number - * @cat Plugins/Dimensions - */ - outerWidth: function() { - return this[0] == window || this[0] == document ? - this.width() : - this.is(':visible') ? - this[0].offsetWidth : - this.width() + num(this, 'borderLeftWidth') + num(this, 'borderRightWidth') + num(this, 'paddingLeft') + num(this, 'paddingRight'); - }, - - /** - * Returns how many pixels the user has scrolled to the right (scrollLeft). - * Works on containers with overflow: auto and window/document. - * - * @example $("#testdiv").scrollLeft() - * @result 100 - * - * @name scrollLeft - * @type Number - * @cat Plugins/Dimensions - */ - /** - * Sets the scrollLeft property and continues the chain. - * Works on containers with overflow: auto and window/document. - * - * @example $("#testdiv").scrollLeft(10).scrollLeft() - * @result 10 - * - * @name scrollLeft - * @param Number value A positive number representing the desired scrollLeft. - * @type jQuery - * @cat Plugins/Dimensions - */ - scrollLeft: function(val) { - if ( val != undefined ) - // set the scroll left - return this.each(function() { - if (this == window || this == document) - window.scrollTo( val, $(window).scrollTop() ); - else - this.scrollLeft = val; - }); - - // return the scroll left offest in pixels - if ( this[0] == window || this[0] == document ) - return self.pageXOffset || - $.boxModel && document.documentElement.scrollLeft || - document.body.scrollLeft; - - return this[0].scrollLeft; - }, - - /** - * Returns how many pixels the user has scrolled to the bottom (scrollTop). - * Works on containers with overflow: auto and window/document. - * - * @example $("#testdiv").scrollTop() - * @result 100 - * - * @name scrollTop - * @type Number - * @cat Plugins/Dimensions - */ - /** - * Sets the scrollTop property and continues the chain. - * Works on containers with overflow: auto and window/document. - * - * @example $("#testdiv").scrollTop(10).scrollTop() - * @result 10 - * - * @name scrollTop - * @param Number value A positive number representing the desired scrollTop. - * @type jQuery - * @cat Plugins/Dimensions - */ - scrollTop: function(val) { - if ( val != undefined ) - // set the scroll top - return this.each(function() { - if (this == window || this == document) - window.scrollTo( $(window).scrollLeft(), val ); - else - this.scrollTop = val; - }); - - // return the scroll top offset in pixels - if ( this[0] == window || this[0] == document ) - return self.pageYOffset || - $.boxModel && document.documentElement.scrollTop || - document.body.scrollTop; - - return this[0].scrollTop; - }, - - /** - * Returns the top and left positioned offset in pixels. - * The positioned offset is the offset between a positioned - * parent and the element itself. - * - * @example $("#testdiv").position() - * @result { top: 100, left: 100 } - * - * @name position - * @param Map options Optional settings to configure the way the offset is calculated. - * @option Boolean margin Should the margin of the element be included in the calculations? False by default. - * @option Boolean border Should the border of the element be included in the calculations? False by default. - * @option Boolean padding Should the padding of the element be included in the calculations? False by default. - * @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the - * chain will not be broken and the result will be assigned to this object. - * @type Object - * @cat Plugins/Dimensions - */ - position: function(options, returnObject) { - var elem = this[0], parent = elem.parentNode, op = elem.offsetParent, - options = $.extend({ margin: false, border: false, padding: false, scroll: false }, options || {}), - x = elem.offsetLeft, - y = elem.offsetTop, - sl = elem.scrollLeft, - st = elem.scrollTop; - - // Mozilla and IE do not add the border - if ($.browser.mozilla || $.browser.msie) { - // add borders to offset - x += num(elem, 'borderLeftWidth'); - y += num(elem, 'borderTopWidth'); - } - - if ($.browser.mozilla) { - do { - // Mozilla does not add the border for a parent that has overflow set to anything but visible - if ($.browser.mozilla && parent != elem && $.css(parent, 'overflow') != 'visible') { - x += num(parent, 'borderLeftWidth'); - y += num(parent, 'borderTopWidth'); - } - - if (parent == op) break; // break if we are already at the offestParent - } while ((parent = parent.parentNode) && (parent.tagName.toLowerCase() != 'body' || parent.tagName.toLowerCase() != 'html')); - } - - var returnValue = handleOffsetReturn(elem, options, x, y, sl, st); - - if (returnObject) { $.extend(returnObject, returnValue); return this; } - else { return returnValue; } - }, - - /** - * Returns the location of the element in pixels from the top left corner of the viewport. - * - * For accurate readings make sure to use pixel values for margins, borders and padding. - * - * Known issues: - * - Issue: A div positioned relative or static without any content before it and its parent will report an offsetTop of 0 in Safari - * Workaround: Place content before the relative div ... and set height and width to 0 and overflow to hidden - * - * @example $("#testdiv").offset() - * @result { top: 100, left: 100, scrollTop: 10, scrollLeft: 10 } - * - * @example $("#testdiv").offset({ scroll: false }) - * @result { top: 90, left: 90 } - * - * @example var offset = {} - * $("#testdiv").offset({ scroll: false }, offset) - * @result offset = { top: 90, left: 90 } - * - * @name offset - * @param Map options Optional settings to configure the way the offset is calculated. - * @option Boolean margin Should the margin of the element be included in the calculations? True by default. - * @option Boolean border Should the border of the element be included in the calculations? False by default. - * @option Boolean padding Should the padding of the element be included in the calculations? False by default. - * @option Boolean scroll Should the scroll offsets of the parent elements be included in the calculations? True by default. - * When true it adds the totla scroll offets of all parents to the total offset and also adds two properties - * to the returned object, scrollTop and scrollLeft. - * @options Boolean lite Will use offsetLite instead of offset when set to true. False by default. - * @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the - * chain will not be broken and the result will be assigned to this object. - * @type Object - * @cat Plugins/Dimensions - */ - offset: function(options, returnObject) { - var x = 0, y = 0, sl = 0, st = 0, - elem = this[0], parent = this[0], op, parPos, elemPos = $.css(elem, 'position'), - mo = $.browser.mozilla, ie = $.browser.msie, sf = $.browser.safari, oa = $.browser.opera, - absparent = false, relparent = false, - options = $.extend({ margin: true, border: false, padding: false, scroll: true, lite: false }, options || {}); - - // Use offsetLite if lite option is true - if (options.lite) return this.offsetLite(options, returnObject); - - if (elem.tagName.toLowerCase() == 'body') { - // Safari is the only one to get offsetLeft and offsetTop properties of the body "correct" - // Except they all mess up when the body is positioned absolute or relative - x = elem.offsetLeft; - y = elem.offsetTop; - // Mozilla ignores margin and subtracts border from body element - if (mo) { - x += num(elem, 'marginLeft') + (num(elem, 'borderLeftWidth')*2); - y += num(elem, 'marginTop') + (num(elem, 'borderTopWidth') *2); - } else - // Opera ignores margin - if (oa) { - x += num(elem, 'marginLeft'); - y += num(elem, 'marginTop'); - } else - // IE does not add the border in Standards Mode - if (ie && jQuery.boxModel) { - x += num(elem, 'borderLeftWidth'); - y += num(elem, 'borderTopWidth'); - } - } else { - do { - parPos = $.css(parent, 'position'); - - x += parent.offsetLeft; - y += parent.offsetTop; - - // Mozilla and IE do not add the border - if (mo || ie) { - // add borders to offset - x += num(parent, 'borderLeftWidth'); - y += num(parent, 'borderTopWidth'); - - // Mozilla does not include the border on body if an element isn't positioned absolute and is without an absolute parent - if (mo && parPos == 'absolute') absparent = true; - // IE does not include the border on the body if an element is position static and without an absolute or relative parent - if (ie && parPos == 'relative') relparent = true; - } - - op = parent.offsetParent; - if (options.scroll || mo) { - do { - if (options.scroll) { - // get scroll offsets - sl += parent.scrollLeft; - st += parent.scrollTop; - } - - // Mozilla does not add the border for a parent that has overflow set to anything but visible - if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') { - x += num(parent, 'borderLeftWidth'); - y += num(parent, 'borderTopWidth'); - } - - parent = parent.parentNode; - } while (parent != op); - } - parent = op; - - if (parent.tagName.toLowerCase() == 'body' || parent.tagName.toLowerCase() == 'html') { - // Safari and IE Standards Mode doesn't add the body margin for elments positioned with static or relative - if ((sf || (ie && $.boxModel)) && elemPos != 'absolute' && elemPos != 'fixed') { - x += num(parent, 'marginLeft'); - y += num(parent, 'marginTop'); - } - // Mozilla does not include the border on body if an element isn't positioned absolute and is without an absolute parent - // IE does not include the border on the body if an element is positioned static and without an absolute or relative parent - if ( (mo && !absparent && elemPos != 'fixed') || - (ie && elemPos == 'static' && !relparent) ) { - x += num(parent, 'borderLeftWidth'); - y += num(parent, 'borderTopWidth'); - } - break; // Exit the loop - } - } while (parent); - } - - var returnValue = handleOffsetReturn(elem, options, x, y, sl, st); - - if (returnObject) { $.extend(returnObject, returnValue); return this; } - else { return returnValue; } - }, - - /** - * Returns the location of the element in pixels from the top left corner of the viewport. - * This method is much faster than offset but not as accurate. This method can be invoked - * by setting the lite option to true in the offset method. - * - * @name offsetLite - * @param Map options Optional settings to configure the way the offset is calculated. - * @option Boolean margin Should the margin of the element be included in the calculations? True by default. - * @option Boolean border Should the border of the element be included in the calculations? False by default. - * @option Boolean padding Should the padding of the element be included in the calculations? False by default. - * @option Boolean scroll Should the scroll offsets of the parent elements be included in the calculations? True by default. - * When true it adds the totla scroll offets of all parents to the total offset and also adds two properties - * to the returned object, scrollTop and scrollLeft. - * @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the - * chain will not be broken and the result will be assigned to this object. - * @type Object - * @cat Plugins/Dimensions - */ - offsetLite: function(options, returnObject) { - var x = 0, y = 0, sl = 0, st = 0, parent = this[0], op, - options = $.extend({ margin: true, border: false, padding: false, scroll: true }, options || {}); - - do { - x += parent.offsetLeft; - y += parent.offsetTop; - - op = parent.offsetParent; - if (options.scroll) { - // get scroll offsets - do { - sl += parent.scrollLeft; - st += parent.scrollTop; - parent = parent.parentNode; - } while(parent != op); - } - parent = op; - } while (parent && parent.tagName.toLowerCase() != 'body' && parent.tagName.toLowerCase() != 'html'); - - var returnValue = handleOffsetReturn(this[0], options, x, y, sl, st); - - if (returnObject) { $.extend(returnObject, returnValue); return this; } - else { return returnValue; } - } -}); - -/** - * Handles converting a CSS Style into an Integer. - * @private - */ -var num = function(el, prop) { - return parseInt($.css(el.jquery?el[0]:el,prop))||0; -}; - -/** - * Handles the return value of the offset and offsetLite methods. - * @private - */ -var handleOffsetReturn = function(elem, options, x, y, sl, st) { - if ( !options.margin ) { - x -= num(elem, 'marginLeft'); - y -= num(elem, 'marginTop'); - } - - // Safari and Opera do not add the border for the element - if ( options.border && ($.browser.safari || $.browser.opera) ) { - x += num(elem, 'borderLeftWidth'); - y += num(elem, 'borderTopWidth'); - } else if ( !options.border && !($.browser.safari || $.browser.opera) ) { - x -= num(elem, 'borderLeftWidth'); - y -= num(elem, 'borderTopWidth'); - } - - if ( options.padding ) { - x += num(elem, 'paddingLeft'); - y += num(elem, 'paddingTop'); - } - - // do not include scroll offset on the element - if ( options.scroll ) { - sl -= elem.scrollLeft; - st -= elem.scrollTop; - } - - return options.scroll ? { top: y - st, left: x - sl, scrollTop: st, scrollLeft: sl } - : { top: y, left: x }; -}; - -})(jQuery);
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.js b/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.js deleted file mode 100644 index a727a8f..0000000 --- a/javascript/libs/jquery/plugins/jquery-tooltip/lib/jquery.js +++ /dev/null @@ -1,3383 +0,0 @@ -(function(){ -/* - * jQuery 1.2.2 - 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: 2009/11/09 19:06:02 $ - * $Rev: 4454 $ - */ - -// Map over jQuery in case of overwrite -if ( window.jQuery ) - var _jQuery = window.jQuery; - -var jQuery = window.jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.prototype.init( selector, context ); -}; - -// Map over the $ in case of overwrite -if ( window.$ ) - var _$ = window.$; - -// Map the jQuery namespace to the '$' one -window.$ = jQuery; - -// A simple way to check for HTML strings or ID strings -// (both of which we optimize for) -var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/; - -// Is it a simple selector -var isSimple = /^.[^:#\[\.]*$/; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - return this; - - // Handle HTML strings - } else if ( typeof selector == "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Make sure an element was located - if ( elem ) - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - else { - this[0] = elem; - this.length = 1; - return this; - } - - else - selector = []; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return new jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return new jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); - - return this.setArray( - // HANDLE: $(array) - selector.constructor == Array && selector || - - // HANDLE: $(arraylike) - // Watch for when an array-like object, contains DOM nodes, is passed in as the selector - (selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) || - - // HANDLE: $(*) - [ selector ] ); - }, - - // The current version of jQuery being used - jquery: "1.2.2", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // The number of elements contained in the matched element set - length: 0, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == undefined ? - - // Return a 'clean' array - jQuery.makeArray( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - var ret = -1; - - // Locate the position of the desired element - this.each(function(i){ - if ( this == elem ) - ret = i; - }); - - return ret; - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( name.constructor == String ) - if ( value == undefined ) - return this.length && jQuery[ type || "attr" ]( this[0], name ) || undefined; - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text != "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) - // The elements to wrap the target around - jQuery( html, this[0].ownerDocument ) - .clone() - .insertBefore( this[0] ) - .map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }) - .append(this); - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, false, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, true, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - find: function( selector ) { - var elems = jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - }); - - return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? - jQuery.unique( elems ) : - elems ); - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var clone = this.cloneNode(true), - container = document.createElement("div"), - container2 = document.createElement("div"); - container.appendChild(clone); - container2.innerHTML = container.innerHTML; - return container2.firstChild; - } else - return this.cloneNode(true); - }); - - // Need to set the expando to null on the cloned set if it exists - // removeData doesn't work here, IE removes it from the original as well - // this is primarily for IE but the data expando shouldn't be copied over in any browser - var clone = ret.find("*").andSelf().each(function(){ - if ( this[ expando ] != undefined ) - this[ expando ] = null; - }); - - // Copy the events from the original to the clone - if ( events === true ) - this.find("*").andSelf().each(function(i){ - if (this.nodeType == 3) - return; - var events = jQuery.data( this, "events" ); - - for ( var type in events ) - for ( var handler in events[ type ] ) - jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); - }); - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, this ) ); - }, - - not: function( selector ) { - if ( selector.constructor == String ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ) ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return !selector ? this : this.pushStack( jQuery.merge( - this.get(), - selector.constructor == String ? - jQuery( selector ).get() : - selector.length != undefined && (!selector.nodeName || jQuery.nodeName(selector, "form")) ? - selector : [selector] ) ); - }, - - is: function( selector ) { - return selector ? - jQuery.multiFilter( selector, this ).length > 0 : - false; - }, - - hasClass: function( selector ) { - return this.is( "." + selector ); - }, - - val: function( value ) { - if ( value == undefined ) { - - if ( this.length ) { - var elem = this[0]; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - - // Everything else, we just grab the value - } else - return (this[0].value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = value.constructor == Array ? - value : - [ value ]; - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value == undefined ? - (this.length ? - this[0].innerHTML : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - domManip: function( args, table, reverse, callback ) { - var clone = this.length > 1, elems; - - return this.each(function(){ - if ( !elems ) { - elems = jQuery.clean( args, this.ownerDocument ); - - if ( reverse ) - elems.reverse(); - } - - var obj = this; - - if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) - obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); - - var scripts = jQuery( [] ); - - jQuery.each(elems, function(){ - var elem = clone ? - jQuery( this ).clone( true )[0] : - this; - - // execute all scripts after the elements have been injected - if ( jQuery.nodeName( elem, "script" ) ) { - scripts = scripts.add( elem ); - } else { - // Remove any inner scripts for later evaluation - if ( elem.nodeType == 1 ) - scripts = scripts.add( jQuery( "script", elem ).remove() ); - - // Inject the elements into the document - callback.call( obj, elem ); - } - }); - - scripts.each( evalScript ); - }); - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.prototype.init.prototype = jQuery.prototype; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( target.constructor == Boolean ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target != "object" && typeof target != "function" ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == 1 ) { - target = this; - i = 0; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - // Prevent never-ending loop - if ( target === options[ name ] ) - continue; - - // Recurse if we're merging object values - if ( deep && options[ name ] && typeof options[ name ] == "object" && target[ name ] && !options[ name ].nodeType ) - target[ name ] = jQuery.extend( target[ name ], options[ name ] ); - - // Don't bring in undefined values - else if ( options[ name ] != undefined ) - target[ name ] = options[ name ]; - - } - - // Return the modified object - return target; -}; - -var expando = "jQuery" + (new Date()).getTime(), uuid = 0, windowData = {}; - -// exclude the following css properties to add px -var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning this function. - isFunction: function( fn ) { - return !!fn && typeof fn != "string" && !fn.nodeName && - fn.constructor != Array && /function/i.test( fn + "" ); - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.documentElement && !elem.body || - elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - data = jQuery.trim( data ); - - if ( data ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.browser.msie ) - script.text = data; - else - script.appendChild( document.createTextNode( data ) ); - - head.appendChild( script ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - cache: {}, - - data: function( elem, name, data ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // Compute a unique ID for the element - if ( !id ) - id = elem[ expando ] = ++uuid; - - // Only generate the data cache if we're - // trying to access or manipulate it - if ( name && !jQuery.cache[ id ] ) - jQuery.cache[ id ] = {}; - - // Prevent overriding the named cache with undefined values - if ( data != undefined ) - jQuery.cache[ id ][ name ] = data; - - // Return the named cache data, or the ID for the element - return name ? - jQuery.cache[ id ][ name ] : - id; - }, - - removeData: function( elem, name ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // If we want to remove a specific section of the element's data - if ( name ) { - if ( jQuery.cache[ id ] ) { - // Remove the section of cache data - delete jQuery.cache[ id ][ name ]; - - // If we've removed all the data, remove the element's cache - name = ""; - - for ( name in jQuery.cache[ id ] ) - break; - - if ( !name ) - jQuery.removeData( elem ); - } - - // Otherwise, we want to remove all of the element's data - } else { - // Clean up the element expando - try { - delete elem[ expando ]; - } catch(e){ - // IE has trouble directly removing the expando - // but it's ok with using removeAttribute - if ( elem.removeAttribute ) - elem.removeAttribute( expando ); - } - - // Completely remove the data cache - delete jQuery.cache[ id ]; - } - }, - - // args is for internal usage only - each: function( object, callback, args ) { - if ( args ) { - if ( object.length == undefined ) { - for ( var name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( var i = 0, length = object.length; i < length; i++ ) - if ( callback.apply( object[ i ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( object.length == undefined ) { - for ( var name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var i = 0, length = object.length, value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames != undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use is(".class") - has: function( elem, className ) { - return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - var padding = 0, border = 0; - jQuery.each( which, function() { - padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - val -= Math.round(padding + border); - } - - if ( jQuery(elem).is(":visible") ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, val); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret; - - // A helper method for determining if an element's values are broken - function color( elem ) { - if ( !jQuery.browser.safari ) - return false; - - var ret = document.defaultView.getComputedStyle( elem, null ); - return !ret || ret.getPropertyValue("color") == ""; - } - - // We need to handle opacity special in IE - if ( name == "opacity" && jQuery.browser.msie ) { - ret = jQuery.attr( elem.style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - // Opera sometimes will give the wrong display answer, this fixes it, see #2037 - if ( jQuery.browser.opera && name == "display" ) { - var save = elem.style.display; - elem.style.display = "block"; - elem.style.display = save; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && elem.style && elem.style[ name ] ) - ret = elem.style[ name ]; - - else if ( document.defaultView && document.defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - - var getComputedStyle = document.defaultView.getComputedStyle( elem, null ); - - if ( getComputedStyle && !color( elem ) ) - ret = getComputedStyle.getPropertyValue( name ); - - // If the element isn't reporting its values properly in Safari - // then some display: none elements are involved - else { - var swap = [], stack = []; - - // Locate all of the parent display: none elements - for ( var a = elem; a && color(a); a = a.parentNode ) - stack.unshift(a); - - // Go through and make them visible, but in reverse - // (It would be better if we knew the exact display type that they had) - for ( var i = 0; i < stack.length; i++ ) - if ( color( stack[ i ] ) ) { - swap[ i ] = stack[ i ].style.display; - stack[ i ].style.display = "block"; - } - - // Since we flip the display style, we have to handle that - // one special, otherwise get the value - ret = name == "display" && swap[ stack.length - 1 ] != null ? - "none" : - ( getComputedStyle && getComputedStyle.getPropertyValue( name ) ) || ""; - - // Finally, revert the display styles back - for ( var i = 0; i < swap.length; i++ ) - if ( swap[ i ] != null ) - stack[ i ].style.display = swap[ i ]; - } - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var style = elem.style.left, runtimeStyle = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - elem.style.left = ret || 0; - ret = elem.style.pixelLeft + "px"; - - // Revert the changed values - elem.style.left = style; - elem.runtimeStyle.left = runtimeStyle; - } - } - - return ret; - }, - - clean: function( elems, context ) { - var ret = []; - context = context || document; - // !context.createElement fails in IE with an error but returns typeof 'object' - if (typeof context.createElement == 'undefined') - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - jQuery.each(elems, function(i, elem){ - if ( !elem ) - return; - - if ( elem.constructor == Number ) - elem = elem.toString(); - - // Convert html string into DOM nodes - if ( typeof elem == "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + "></" + tag + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); - - var wrap = - // option or optgroup - !tags.indexOf("<opt") && - [ 1, "<select multiple='multiple'>", "</select>" ] || - - !tags.indexOf("<leg") && - [ 1, "<fieldset>", "</fieldset>" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "<table>", "</table>" ] || - - !tags.indexOf("<tr") && - [ 2, "<table><tbody>", "</tbody></table>" ] || - - // <thead> matched above - (!tags.indexOf("<td") || !tags.indexOf("<th")) && - [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] || - - !tags.indexOf("<col") && - [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] || - - // IE can't serialize <link> and <script> tags normally - jQuery.browser.msie && - [ 1, "div<div>", "</div>" ] || - - [ 0, "", "" ]; - - // Go to html and back, then peel off extra wrappers - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( wrap[0]-- ) - div = div.lastChild; - - // Remove IE's autoinserted <tbody> from table fragments - if ( jQuery.browser.msie ) { - - // String was a <table>, *may* have spurious <tbody> - var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare <thead> or <tfoot> - wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ? - div.childNodes : - []; - - for ( var j = tbody.length - 1; j >= 0 ; --j ) - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - - // IE completely kills leading whitespace when innerHTML is used - if ( /^\s/.test( elem ) ) - div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild ); - - } - - elem = jQuery.makeArray( div.childNodes ); - } - - if ( elem.length === 0 && (!jQuery.nodeName( elem, "form" ) && !jQuery.nodeName( elem, "select" )) ) - return; - - if ( elem[0] == undefined || jQuery.nodeName( elem, "form" ) || elem.options ) - ret.push( elem ); - - else - ret = jQuery.merge( ret, elem ); - - }); - - return ret; - }, - - attr: function( elem, name, value ) { - // don't set attributes on text and comment nodes - if (!elem || elem.nodeType == 3 || elem.nodeType == 8) - return undefined; - - var fix = jQuery.isXMLDoc( elem ) ? - {} : - jQuery.props; - - // Safari mis-reports the default selected property of a hidden option - // Accessing the parent's selectedIndex property fixes it - if ( name == "selected" && jQuery.browser.safari ) - elem.parentNode.selectedIndex; - - // Certain attributes only work when accessed via the old DOM 0 way - if ( fix[ name ] ) { - if ( value != undefined ) - elem[ fix[ name ] ] = value; - - return elem[ fix[ name ] ]; - - } else if ( jQuery.browser.msie && name == "style" ) - return jQuery.attr( elem.style, "cssText", value ); - - else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName( elem, "form" ) && (name == "action" || name == "method") ) - return elem.getAttributeNode( name ).nodeValue; - - // IE elem.getAttribute passes even for style - else if ( elem.tagName ) { - - if ( value != undefined ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode ) - throw "type property can't be changed"; - - // convert the value to a string (all browsers do this but IE) see #1070 - elem.setAttribute( name, "" + value ); - } - - if ( jQuery.browser.msie && /href|src/.test( name ) && !jQuery.isXMLDoc( elem ) ) - return elem.getAttribute( name, 2 ); - - return elem.getAttribute( name ); - - // elem is actually elem.style ... set the style - } else { - // IE actually uses filters for opacity - if ( name == "opacity" && jQuery.browser.msie ) { - if ( value != undefined ) { - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - elem.zoom = 1; - - // Set the alpha filter to set the opacity - elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) + - (parseFloat( value ).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); - } - - return elem.filter && elem.filter.indexOf("opacity=") >= 0 ? - (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : - ""; - } - - name = name.replace(/-([a-z])/ig, function(all, letter){ - return letter.toUpperCase(); - }); - - if ( value != undefined ) - elem[ name ] = value; - - return elem[ name ]; - } - }, - - trim: function( text ) { - return (text || "").replace( /^\s+|\s+$/g, "" ); - }, - - makeArray: function( array ) { - var ret = []; - - // Need to use typeof to fight Safari childNodes crashes - if ( typeof array != "array" ) - for ( var i = 0, length = array.length; i < length; i++ ) - ret.push( array[ i ] ); - else - ret = array.slice( 0 ); - - return ret; - }, - - inArray: function( elem, array ) { - for ( var i = 0, length = array.length; i < length; i++ ) - if ( array[ i ] == elem ) - return i; - - return -1; - }, - - merge: function( first, second ) { - // We have to loop this way because IE & Opera overwrite the length - // expando of getElementsByTagName - - // Also, we need to make sure that the correct elements are being returned - // (IE returns comment nodes in a '*' query) - if ( jQuery.browser.msie ) { - for ( var i = 0; second[ i ]; i++ ) - if ( second[ i ].nodeType != 8 ) - first.push( second[ i ] ); - - } else - for ( var i = 0; second[ i ]; i++ ) - first.push( second[ i ] ); - - return first; - }, - - unique: function( array ) { - var ret = [], done = {}; - - try { - - for ( var i = 0, length = array.length; i < length; i++ ) { - var id = jQuery.data( array[ i ] ); - - if ( !done[ id ] ) { - done[ id ] = true; - ret.push( array[ i ] ); - } - } - - } catch( e ) { - ret = array; - } - - return ret; - }, - - grep: function( elems, callback, inv ) { - // If a string is passed in for the function, make a function - // for it (a handy shortcut) - if ( typeof callback == "string" ) - callback = eval("false||function(a,i){return " + callback + "}"); - - var ret = []; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) - if ( !inv && callback( elems[ i ], i ) || inv && !callback( elems[ i ], i ) ) - ret.push( elems[ i ] ); - - return ret; - }, - - map: function( elems, callback ) { - var ret = []; - - // Go through the array, translating each of the items to their - // new value (or values). - for ( var i = 0, length = elems.length; i < length; i++ ) { - var value = callback( elems[ i ], i ); - - if ( value !== null && value != undefined ) { - if ( value.constructor != Array ) - value = [ value ]; - - ret = ret.concat( value ); - } - } - - return ret; - } -}); - -var userAgent = navigator.userAgent.toLowerCase(); - -// Figure out what browser is being used -jQuery.browser = { - version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1], - safari: /webkit/.test( userAgent ), - opera: /opera/.test( userAgent ), - msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), - mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) -}; - -var styleFloat = jQuery.browser.msie ? - "styleFloat" : - "cssFloat"; - -jQuery.extend({ - // Check to see if the W3C box model is being used - boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat", - - props: { - "for": "htmlFor", - "class": "className", - "float": styleFloat, - cssFloat: styleFloat, - styleFloat: styleFloat, - innerHTML: "innerHTML", - className: "className", - value: "value", - disabled: "disabled", - checked: "checked", - readonly: "readOnly", - selected: "selected", - maxlength: "maxLength", - selectedIndex: "selectedIndex", - defaultValue: "defaultValue", - tagName: "tagName", - nodeName: "nodeName" - } -}); - -jQuery.each({ - parent: "elem.parentNode", - parents: "jQuery.dir(elem,'parentNode')", - next: "jQuery.nth(elem,2,'nextSibling')", - prev: "jQuery.nth(elem,2,'previousSibling')", - nextAll: "jQuery.dir(elem,'nextSibling')", - prevAll: "jQuery.dir(elem,'previousSibling')", - siblings: "jQuery.sibling(elem.parentNode.firstChild,elem)", - children: "jQuery.sibling(elem.firstChild)", - contents: "jQuery.nodeName(elem,'iframe')?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)" -}, function(name, fn){ - fn = eval("false||function(elem){return " + fn + "}"); - - jQuery.fn[ name ] = function( selector ) { - var ret = jQuery.map( this, fn ); - - if ( selector && typeof selector == "string" ) - ret = jQuery.multiFilter( selector, ret ); - - return this.pushStack( jQuery.unique( ret ) ); - }; -}); - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function(name, original){ - jQuery.fn[ name ] = function() { - var args = arguments; - - return this.each(function(){ - for ( var i = 0, length = args.length; i < length; i++ ) - jQuery( args[ i ] )[ original ]( this ); - }); - }; -}); - -jQuery.each({ - removeAttr: function( name ) { - jQuery.attr( this, name, "" ); - if (this.nodeType == 1) - this.removeAttribute( name ); - }, - - addClass: function( classNames ) { - jQuery.className.add( this, classNames ); - }, - - removeClass: function( classNames ) { - jQuery.className.remove( this, classNames ); - }, - - toggleClass: function( classNames ) { - jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames ); - }, - - remove: function( selector ) { - if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) { - // Prevent memory leaks - jQuery( "*", this ).add(this).each(function(){ - jQuery.event.remove(this); - jQuery.removeData(this); - }); - if (this.parentNode) - this.parentNode.removeChild( this ); - } - }, - - empty: function() { - // Remove element nodes and prevent memory leaks - jQuery( ">*", this ).remove(); - - // Remove any remaining nodes - while ( this.firstChild ) - this.removeChild( this.firstChild ); - } -}, function(name, fn){ - jQuery.fn[ name ] = function(){ - return this.each( fn, arguments ); - }; -}); - -jQuery.each([ "Height", "Width" ], function(i, name){ - var type = name.toLowerCase(); - - jQuery.fn[ type ] = function( size ) { - // Get window width or height - return this[0] == window ? - // Opera reports document.body.client[Width/Height] properly in both quirks and standards - jQuery.browser.opera && document.body[ "client" + name ] || - - // Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths) - jQuery.browser.safari && window[ "inner" + name ] || - - // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode - document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] : - - // Get document width or height - this[0] == document ? - // Either scroll[Width/Height] or offset[Width/Height], whichever is greater - Math.max( - Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]), - Math.max(document.body["offset" + name], document.documentElement["offset" + name]) - ) : - - // Get or set width or height on the element - size == undefined ? - // Get width or height on the element - (this.length ? jQuery.css( this[0], type ) : null) : - - // Set the width or height on the element (default to pixels if value is unitless) - this.css( type, size.constructor == String ? size : size + "px" ); - }; -}); - -var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ? - "(?:[\\w*_-]|\\\\.)" : - "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)", - quickChild = new RegExp("^>\\s*(" + chars + "+)"), - quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"), - quickClass = new RegExp("^([#.]?)(" + chars + "*)"); - -jQuery.extend({ - expr: { - "": "m[2]=='*'||jQuery.nodeName(a,m[2])", - "#": "a.getAttribute('id')==m[2]", - ":": { - // Position Checks - lt: "i<m[3]-0", - gt: "i>m[3]-0", - nth: "m[3]-0==i", - eq: "m[3]-0==i", - first: "i==0", - last: "i==r.length-1", - even: "i%2==0", - odd: "i%2", - - // Child Checks - "first-child": "a.parentNode.getElementsByTagName('*')[0]==a", - "last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a", - "only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')", - - // Parent Checks - parent: "a.firstChild", - empty: "!a.firstChild", - - // Text Check - contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0", - - // Visibility - visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"', - hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"', - - // Form attributes - enabled: "!a.disabled", - disabled: "a.disabled", - checked: "a.checked", - selected: "a.selected||jQuery.attr(a,'selected')", - - // Form elements - text: "'text'==a.type", - radio: "'radio'==a.type", - checkbox: "'checkbox'==a.type", - file: "'file'==a.type", - password: "'password'==a.type", - submit: "'submit'==a.type", - image: "'image'==a.type", - reset: "'reset'==a.type", - button: '"button"==a.type||jQuery.nodeName(a,"button")', - input: "/input|select|textarea|button/i.test(a.nodeName)", - - // :has() - has: "jQuery.find(m[3],a).length", - - // :header - header: "/h\\d/i.test(a.nodeName)", - - // :animated - animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length" - } - }, - - // The regular expressions that power the parsing engine - parse: [ - // Match: [@value='test'], [@foo] - /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/, - - // Match: :contains('foo') - /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/, - - // Match: :even, :last-chlid, #id, .class - new RegExp("^([:.#]*)(" + chars + "+)") - ], - - multiFilter: function( expr, elems, not ) { - var old, cur = []; - - while ( expr && expr != old ) { - old = expr; - var f = jQuery.filter( expr, elems, not ); - expr = f.t.replace(/^\s*,\s*/, "" ); - cur = not ? elems = f.r : jQuery.merge( cur, f.r ); - } - - return cur; - }, - - find: function( t, context ) { - // Quickly handle non-string expressions - if ( typeof t != "string" ) - return [ t ]; - - // check to make sure context is a DOM element or a document - if ( context && context.nodeType != 1 && context.nodeType != 9) - return [ ]; - - // Set the correct context (if none is provided) - context = context || document; - - // Initialize the search - var ret = [context], done = [], last, nodeName; - - // Continue while a selector expression exists, and while - // we're no longer looping upon ourselves - while ( t && last != t ) { - var r = []; - last = t; - - t = jQuery.trim(t); - - var foundToken = false; - - // An attempt at speeding up child selectors that - // point to a specific element tag - var re = quickChild; - var m = re.exec(t); - - if ( m ) { - nodeName = m[1].toUpperCase(); - - // Perform our own iteration and filter - for ( var i = 0; ret[i]; i++ ) - for ( var c = ret[i].firstChild; c; c = c.nextSibling ) - if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName) ) - r.push( c ); - - ret = r; - t = t.replace( re, "" ); - if ( t.indexOf(" ") == 0 ) continue; - foundToken = true; - } else { - re = /^([>+~])\s*(\w*)/i; - - if ( (m = re.exec(t)) != null ) { - r = []; - - var merge = {}; - nodeName = m[2].toUpperCase(); - m = m[1]; - - for ( var j = 0, rl = ret.length; j < rl; j++ ) { - var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild; - for ( ; n; n = n.nextSibling ) - if ( n.nodeType == 1 ) { - var id = jQuery.data(n); - - if ( m == "~" && merge[id] ) break; - - if (!nodeName || n.nodeName.toUpperCase() == nodeName ) { - if ( m == "~" ) merge[id] = true; - r.push( n ); - } - - if ( m == "+" ) break; - } - } - - ret = r; - - // And remove the token - t = jQuery.trim( t.replace( re, "" ) ); - foundToken = true; - } - } - - // See if there's still an expression, and that we haven't already - // matched a token - if ( t && !foundToken ) { - // Handle multiple expressions - if ( !t.indexOf(",") ) { - // Clean the result set - if ( context == ret[0] ) ret.shift(); - - // Merge the result sets - done = jQuery.merge( done, ret ); - - // Reset the context - r = ret = [context]; - - // Touch up the selector string - t = " " + t.substr(1,t.length); - - } else { - // Optimize for the case nodeName#idName - var re2 = quickID; - var m = re2.exec(t); - - // Re-organize the results, so that they're consistent - if ( m ) { - m = [ 0, m[2], m[3], m[1] ]; - - } else { - // Otherwise, do a traditional filter check for - // ID, class, and element selectors - re2 = quickClass; - m = re2.exec(t); - } - - m[2] = m[2].replace(/\\/g, ""); - - var elem = ret[ret.length-1]; - - // Try to do a global search by ID, where we can - if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) { - // Optimization for HTML document case - var oid = elem.getElementById(m[2]); - - // Do a quick check for the existence of the actual ID attribute - // to avoid selecting by the name attribute in IE - // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form - if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] ) - oid = jQuery('[@id="'+m[2]+'"]', elem)[0]; - - // Do a quick check for node name (where applicable) so - // that div#foo searches will be really fast - ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : []; - } else { - // We need to find all descendant elements - for ( var i = 0; ret[i]; i++ ) { - // Grab the tag name being searched for - var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2]; - - // Handle IE7 being really dumb about <object>s - if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" ) - tag = "param"; - - r = jQuery.merge( r, ret[i].getElementsByTagName( tag )); - } - - // It's faster to filter by class and be done with it - if ( m[1] == "." ) - r = jQuery.classFilter( r, m[2] ); - - // Same with ID filtering - if ( m[1] == "#" ) { - var tmp = []; - - // Try to find the element with the ID - for ( var i = 0; r[i]; i++ ) - if ( r[i].getAttribute("id") == m[2] ) { - tmp = [ r[i] ]; - break; - } - - r = tmp; - } - - ret = r; - } - - t = t.replace( re2, "" ); - } - - } - - // If a selector string still exists - if ( t ) { - // Attempt to filter it - var val = jQuery.filter(t,r); - ret = r = val.r; - t = jQuery.trim(val.t); - } - } - - // An error occurred with the selector; - // just return an empty set instead - if ( t ) - ret = []; - - // Remove the root context - if ( ret && context == ret[0] ) - ret.shift(); - - // And combine the results - done = jQuery.merge( done, ret ); - - return done; - }, - - classFilter: function(r,m,not){ - m = " " + m + " "; - var tmp = []; - for ( var i = 0; r[i]; i++ ) { - var pass = (" " + r[i].className + " ").indexOf( m ) >= 0; - if ( !not && pass || not && !pass ) - tmp.push( r[i] ); - } - return tmp; - }, - - filter: function(t,r,not) { - var last; - - // Look for common filter expressions - while ( t && t != last ) { - last = t; - - var p = jQuery.parse, m; - - for ( var i = 0; p[i]; i++ ) { - m = p[i].exec( t ); - - if ( m ) { - // Remove what we just matched - t = t.substring( m[0].length ); - - m[2] = m[2].replace(/\\/g, ""); - break; - } - } - - if ( !m ) - break; - - // :not() is a special case that can be optimized by - // keeping it out of the expression list - if ( m[1] == ":" && m[2] == "not" ) - // optimize if only one selector found (most common case) - r = isSimple.test( m[3] ) ? - jQuery.filter(m[3], r, true).r : - jQuery( r ).not( m[3] ); - - // We can get a big speed boost by filtering by class here - else if ( m[1] == "." ) - r = jQuery.classFilter(r, m[2], not); - - else if ( m[1] == "[" ) { - var tmp = [], type = m[3]; - - for ( var i = 0, rl = r.length; i < rl; i++ ) { - var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ]; - - if ( z == null || /href|src|selected/.test(m[2]) ) - z = jQuery.attr(a,m[2]) || ''; - - if ( (type == "" && !!z || - type == "=" && z == m[5] || - type == "!=" && z != m[5] || - type == "^=" && z && !z.indexOf(m[5]) || - type == "$=" && z.substr(z.length - m[5].length) == m[5] || - (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not ) - tmp.push( a ); - } - - r = tmp; - - // We can get a speed boost by handling nth-child here - } else if ( m[1] == ":" && m[2] == "nth-child" ) { - var merge = {}, tmp = [], - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( - m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" || - !/\D/.test(m[3]) && "0n+" + m[3] || m[3]), - // calculate the numbers (first)n+(last) including if they are negative - first = (test[1] + (test[2] || 1)) - 0, last = test[3] - 0; - - // loop through all the elements left in the jQuery object - for ( var i = 0, rl = r.length; i < rl; i++ ) { - var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode); - - if ( !merge[id] ) { - var c = 1; - - for ( var n = parentNode.firstChild; n; n = n.nextSibling ) - if ( n.nodeType == 1 ) - n.nodeIndex = c++; - - merge[id] = true; - } - - var add = false; - - if ( first == 0 ) { - if ( node.nodeIndex == last ) - add = true; - } else if ( (node.nodeIndex - last) % first == 0 && (node.nodeIndex - last) / first >= 0 ) - add = true; - - if ( add ^ not ) - tmp.push( node ); - } - - r = tmp; - - // Otherwise, find the expression to execute - } else { - var f = jQuery.expr[m[1]]; - if ( typeof f != "string" ) - f = jQuery.expr[m[1]][m[2]]; - - // Build a custom macro to enclose it - f = eval("false||function(a,i){return " + f + "}"); - - // Execute it against the current filter - r = jQuery.grep( r, f, not ); - } - } - - // Return an array of filtered elements (r) - // and the modified expression string (t) - return { r: r, t: t }; - }, - - dir: function( elem, dir ){ - var matched = []; - var cur = elem[dir]; - while ( cur && cur != document ) { - if ( cur.nodeType == 1 ) - matched.push( cur ); - cur = cur[dir]; - } - return matched; - }, - - nth: function(cur,result,dir,elem){ - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) - if ( cur.nodeType == 1 && ++num == result ) - break; - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType == 1 && (!elem || n != elem) ) - r.push( n ); - } - - return r; - } -}); - -/* - * A number of helper functions used for managing events. - * Many of the ideas behind this code orignated from - * Dean Edwards' addEvent library. - */ -jQuery.event = { - - // Bind an event to an element - // Original by Dean Edwards - add: function(elem, types, handler, data) { - if ( elem.nodeType == 3 || elem.nodeType == 8 ) - return; - - // For whatever reason, IE has trouble passing the window object - // around, causing it to be cloned in the process - if ( jQuery.browser.msie && elem.setInterval != undefined ) - elem = window; - - // Make sure that the function being executed has a unique ID - if ( !handler.guid ) - handler.guid = this.guid++; - - // if data is passed, bind to handler - if( data != undefined ) { - // Create temporary function pointer to original handler - var fn = handler; - - // Create unique handler function, wrapped around original handler - handler = function() { - // Pass arguments and context to original handler - return fn.apply(this, arguments); - }; - - // Store data in unique handler - handler.data = data; - - // Set the guid of unique handler to the same of original handler, so it can be removed - handler.guid = fn.guid; - } - - // Init the element's event structure - var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}), - handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){ - // returned undefined or false - var val; - - // Handle the second event of a trigger and when - // an event is called after a page has unloaded - if ( typeof jQuery == "undefined" || jQuery.event.triggered ) - return val; - - val = jQuery.event.handle.apply(arguments.callee.elem, arguments); - - return val; - }); - // Add elem as a property of the handle function - // This is to prevent a memory leak with non-native - // event in IE. - handle.elem = elem; - - // Handle multiple events seperated by a space - // jQuery(...).bind("mouseover mouseout", fn); - jQuery.each(types.split(/\s+/), function(index, type) { - // Namespaced event handlers - var parts = type.split("."); - type = parts[0]; - handler.type = parts[1]; - - // Get the current list of functions bound to this event - var handlers = events[type]; - - // Init the event handler queue - if (!handlers) { - handlers = events[type] = {}; - - // Check for a special event handler - // Only use addEventListener/attachEvent if the special - // events handler returns false - if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem) === false ) { - // Bind the global event handler to the element - if (elem.addEventListener) - elem.addEventListener(type, handle, false); - else if (elem.attachEvent) - elem.attachEvent("on" + type, handle); - } - } - - // Add the function to the element's handler list - handlers[handler.guid] = handler; - - // Keep track of which events have been used, for global triggering - jQuery.event.global[type] = true; - }); - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - guid: 1, - global: {}, - - // Detach an event or set of events from an element - remove: function(elem, types, handler) { - // don't do events on text and comment nodes - if ( elem.nodeType == 3 || elem.nodeType == 8 ) - return; - - var events = jQuery.data(elem, "events"), ret, index; - - if ( events ) { - // Unbind all events for the element - if ( types == undefined ) - for ( var type in events ) - this.remove( elem, type ); - else { - // types is actually an event object here - if ( types.type ) { - handler = types.handler; - types = types.type; - } - - // Handle multiple events seperated by a space - // jQuery(...).unbind("mouseover mouseout", fn); - jQuery.each(types.split(/\s+/), function(index, type){ - // Namespaced event handlers - var parts = type.split("."); - type = parts[0]; - - if ( events[type] ) { - // remove the given handler for the given type - if ( handler ) - delete events[type][handler.guid]; - - // remove all handlers for the given type - else - for ( handler in events[type] ) - // Handle the removal of namespaced events - if ( !parts[1] || events[type][handler].type == parts[1] ) - delete events[type][handler]; - - // remove generic event handler if no more handlers exist - for ( ret in events[type] ) break; - if ( !ret ) { - if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem) === false ) { - if (elem.removeEventListener) - elem.removeEventListener(type, jQuery.data(elem, "handle"), false); - else if (elem.detachEvent) - elem.detachEvent("on" + type, jQuery.data(elem, "handle")); - } - ret = null; - delete events[type]; - } - } - }); - } - - // Remove the expando if it's no longer used - for ( ret in events ) break; - if ( !ret ) { - var handle = jQuery.data( elem, "handle" ); - if ( handle ) handle.elem = null; - jQuery.removeData( elem, "events" ); - jQuery.removeData( elem, "handle" ); - } - } - }, - - trigger: function(type, data, elem, donative, extra) { - // Clone the incoming data, if any - data = jQuery.makeArray(data || []); - - // Handle a global trigger - if ( !elem ) { - // Only trigger if we've ever bound an event for it - if ( this.global[type] ) - jQuery("*").add([window, document]).trigger(type, data); - - // Handle triggering a single element - } else { - // don't do events on text and comment nodes - if ( elem.nodeType == 3 || elem.nodeType == 8 ) - return undefined; - - var val, ret, fn = jQuery.isFunction( elem[ type ] || null ), - // Check to see if we need to provide a fake event, or not - event = !data[0] || !data[0].preventDefault; - - // Pass along a fake event - if ( event ) - data.unshift( this.fix({ type: type, target: elem }) ); - - // Enforce the right trigger type - data[0].type = type; - - // Trigger the event - if ( jQuery.isFunction( jQuery.data(elem, "handle") ) ) - val = jQuery.data(elem, "handle").apply( elem, data ); - - // Handle triggering native .onfoo handlers - if ( !fn && elem["on"+type] && elem["on"+type].apply( elem, data ) === false ) - val = false; - - // Extra functions don't get the custom event object - if ( event ) - data.shift(); - - // Handle triggering of extra function - if ( extra && jQuery.isFunction( extra ) ) { - // call the extra function and tack the current return value on the end for possible inspection - ret = extra.apply( elem, val == null ? data : data.concat( val ) ); - // if anything is returned, give it precedence and have it overwrite the previous value - if (ret !== undefined) - val = ret; - } - - // Trigger the native events (except for clicks on links) - if ( fn && donative !== false && val !== false && !(jQuery.nodeName(elem, 'a') && type == "click") ) { - this.triggered = true; - try { - elem[ type ](); - // prevent IE from throwing an error for some hidden elements - } catch (e) {} - } - - this.triggered = false; - } - - return val; - }, - - handle: function(event) { - // returned undefined or false - var val; - - // Empty object is for triggered events with no data - event = jQuery.event.fix( event || window.event || {} ); - - // Namespaced event handlers - var parts = event.type.split("."); - event.type = parts[0]; - - var handlers = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 ); - args.unshift( event ); - - for ( var j in handlers ) { - var handler = handlers[j]; - // Pass in a reference to the handler function itself - // So that we can later remove it - args[0].handler = handler; - args[0].data = handler.data; - - // Filter the functions by class - if ( !parts[1] || handler.type == parts[1] ) { - var ret = handler.apply( this, args ); - - if ( val !== false ) - val = ret; - - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - - // Clean up added properties in IE to prevent memory leak - if (jQuery.browser.msie) - event.target = event.preventDefault = event.stopPropagation = - event.handler = event.data = null; - - return val; - }, - - fix: function(event) { - // store a copy of the original event object - // and clone to set read-only properties - var originalEvent = event; - event = jQuery.extend({}, originalEvent); - - // add preventDefault and stopPropagation since - // they will not work on the clone - event.preventDefault = function() { - // if preventDefault exists run it on the original event - if (originalEvent.preventDefault) - originalEvent.preventDefault(); - // otherwise set the returnValue property of the original event to false (IE) - originalEvent.returnValue = false; - }; - event.stopPropagation = function() { - // if stopPropagation exists run it on the original event - if (originalEvent.stopPropagation) - originalEvent.stopPropagation(); - // otherwise set the cancelBubble property of the original event to true (IE) - originalEvent.cancelBubble = true; - }; - - // Fix target property, if necessary - if ( !event.target ) - event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either - - // check if target is a textnode (safari) - if ( event.target.nodeType == 3 ) - event.target = originalEvent.target.parentNode; - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && event.fromElement ) - event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && event.clientX != null ) { - var doc = document.documentElement, body = document.body; - event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); - event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); - } - - // Add which for key events - if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) - event.which = event.charCode || event.keyCode; - - // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) - if ( !event.metaKey && event.ctrlKey ) - event.metaKey = event.ctrlKey; - - // Add which for click: 1 == left; 2 == middle; 3 == right - // Note: button is not normalized, so don't use it - if ( !event.which && event.button ) - event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); - - return event; - }, - - special: { - ready: { - setup: function() { - // Make sure the ready event is setup - bindReady(); - return; - }, - - teardown: function() { return; } - }, - - mouseenter: { - setup: function() { - if ( jQuery.browser.msie ) return false; - jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler); - return true; - }, - - teardown: function() { - if ( jQuery.browser.msie ) return false; - jQuery(this).unbind("mouseover", jQuery.event.special.mouseenter.handler); - return true; - }, - - handler: function(event) { - // If we actually just moused on to a sub-element, ignore it - if ( withinElement(event, this) ) return true; - // Execute the right handlers by setting the event type to mouseenter - arguments[0].type = "mouseenter"; - return jQuery.event.handle.apply(this, arguments); - } - }, - - mouseleave: { - setup: function() { - if ( jQuery.browser.msie ) return false; - jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler); - return true; - }, - - teardown: function() { - if ( jQuery.browser.msie ) return false; - jQuery(this).unbind("mouseout", jQuery.event.special.mouseleave.handler); - return true; - }, - - handler: function(event) { - // If we actually just moused on to a sub-element, ignore it - if ( withinElement(event, this) ) return true; - // Execute the right handlers by setting the event type to mouseleave - arguments[0].type = "mouseleave"; - return jQuery.event.handle.apply(this, arguments); - } - } - } -}; - -jQuery.fn.extend({ - bind: function( type, data, fn ) { - return type == "unload" ? this.one(type, data, fn) : this.each(function(){ - jQuery.event.add( this, type, fn || data, fn && data ); - }); - }, - - one: function( type, data, fn ) { - return this.each(function(){ - jQuery.event.add( this, type, function(event) { - jQuery(this).unbind(event); - return (fn || data).apply( this, arguments); - }, fn && data); - }); - }, - - unbind: function( type, fn ) { - return this.each(function(){ - jQuery.event.remove( this, type, fn ); - }); - }, - - trigger: function( type, data, fn ) { - return this.each(function(){ - jQuery.event.trigger( type, data, this, true, fn ); - }); - }, - - triggerHandler: function( type, data, fn ) { - if ( this[0] ) - return jQuery.event.trigger( type, data, this[0], false, fn ); - return undefined; - }, - - toggle: function() { - // Save reference to arguments for access in closure - var args = arguments; - - return this.click(function(event) { - // Figure out which function to execute - this.lastToggle = 0 == this.lastToggle ? 1 : 0; - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[this.lastToggle].apply( this, arguments ) || false; - }); - }, - - hover: function(fnOver, fnOut) { - return this.bind('mouseenter', fnOver).bind('mouseleave', fnOut); - }, - - ready: function(fn) { - // Attach the listeners - bindReady(); - - // If the DOM is already ready - if ( jQuery.isReady ) - // Execute the function immediately - fn.call( document, jQuery ); - - // Otherwise, remember the function for later - else - // Add the function to the wait list - jQuery.readyList.push( function() { return fn.call(this, jQuery); } ); - - return this; - } -}); - -jQuery.extend({ - isReady: false, - readyList: [], - // Handle when the DOM is ready - ready: function() { - // Make sure that the DOM is not already loaded - if ( !jQuery.isReady ) { - // Remember that the DOM is ready - jQuery.isReady = true; - - // If there are functions bound, to execute - if ( jQuery.readyList ) { - // Execute all of them - jQuery.each( jQuery.readyList, function(){ - this.apply( document ); - }); - - // Reset the list of functions - jQuery.readyList = null; - } - - // Trigger any bound ready events - jQuery(document).triggerHandler("ready"); - } - } -}); - -var readyBound = false; - -function bindReady(){ - if ( readyBound ) return; - readyBound = true; - - // Mozilla, Opera (see further below for it) and webkit nightlies currently support this event - if ( document.addEventListener && !jQuery.browser.opera) - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); - - // If IE is used and is not in a frame - // Continually check to see if the document is ready - if ( jQuery.browser.msie && window == top ) (function(){ - if (jQuery.isReady) return; - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch( error ) { - setTimeout( arguments.callee, 0 ); - return; - } - // and execute any waiting functions - jQuery.ready(); - })(); - - if ( jQuery.browser.opera ) - document.addEventListener( "DOMContentLoaded", function () { - if (jQuery.isReady) return; - for (var i = 0; i < document.styleSheets.length; i++) - if (document.styleSheets[i].disabled) { - setTimeout( arguments.callee, 0 ); - return; - } - // and execute any waiting functions - jQuery.ready(); - }, false); - - if ( jQuery.browser.safari ) { - var numStyles; - (function(){ - if (jQuery.isReady) return; - if ( document.readyState != "loaded" && document.readyState != "complete" ) { - setTimeout( arguments.callee, 0 ); - return; - } - if ( numStyles === undefined ) - numStyles = jQuery("style, link[rel=stylesheet]").length; - if ( document.styleSheets.length != numStyles ) { - setTimeout( arguments.callee, 0 ); - return; - } - // and execute any waiting functions - jQuery.ready(); - })(); - } - - // A fallback to window.onload, that will always work - jQuery.event.add( window, "load", jQuery.ready ); -} - -jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + - "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + - "submit,keydown,keypress,keyup,error").split(","), function(i, name){ - - // Handle event binding - jQuery.fn[name] = function(fn){ - return fn ? this.bind(name, fn) : this.trigger(name); - }; -}); - -// Checks if an event happened on an element within another element -// Used in jQuery.event.special.mouseenter and mouseleave handlers -var withinElement = function(event, elem) { - // Check if mouse(over|out) are still within the same parent element - var parent = event.relatedTarget; - // Traverse up the tree - while ( parent && parent != elem ) try { parent = parent.parentNode; } catch(error) { parent = elem; } - // Return true if we actually just moused on to a sub-element - return parent == elem; -}; - -// Prevent memory leaks in IE -// And prevent errors on refresh with events like mouseover in other browsers -// Window isn't included so as not to unbind existing unload events -jQuery(window).bind("unload", function() { - jQuery("*").add(document).unbind(); -}); -jQuery.fn.extend({ - load: function( url, params, callback ) { - if ( jQuery.isFunction( url ) ) - return this.bind("load", url); - - var off = url.indexOf(" "); - if ( off >= 0 ) { - var selector = url.slice(off, url.length); - url = url.slice(0, off); - } - - callback = callback || function(){}; - - // Default to a GET request - var type = "GET"; - - // If the second parameter was provided - if ( params ) - // If it's a function - if ( jQuery.isFunction( params ) ) { - // We assume that it's the callback - callback = params; - params = null; - - // Otherwise, build a param string - } else { - params = jQuery.param( params ); - type = "POST"; - } - - var self = this; - - // Request the remote document - jQuery.ajax({ - url: url, - type: type, - dataType: "html", - data: params, - complete: function(res, status){ - // If successful, inject the HTML into all the matched elements - if ( status == "success" || status == "notmodified" ) - // See if a selector was specified - self.html( selector ? - // Create a dummy div to hold the results - jQuery("<div/>") - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, "")) - - // Locate the specified elements - .find(selector) : - - // If not, just inject the full result - res.responseText ); - - self.each( callback, [res.responseText, status, res] ); - } - }); - return this; - }, - - serialize: function() { - return jQuery.param(this.serializeArray()); - }, - serializeArray: function() { - return this.map(function(){ - return jQuery.nodeName(this, "form") ? - jQuery.makeArray(this.elements) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - (this.checked || /select|textarea/i.test(this.nodeName) || - /text|hidden|password/i.test(this.type)); - }) - .map(function(i, elem){ - var val = jQuery(this).val(); - return val == null ? null : - val.constructor == Array ? - jQuery.map( val, function(val, i){ - return {name: elem.name, value: val}; - }) : - {name: elem.name, value: val}; - }).get(); - } -}); - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ - jQuery.fn[o] = function(f){ - return this.bind(o, f); - }; -}); - -var jsc = (new Date).getTime(); - -jQuery.extend({ - get: function( url, data, callback, type ) { - // shift arguments if data argument was ommited - if ( jQuery.isFunction( data ) ) { - callback = data; - data = null; - } - - return jQuery.ajax({ - type: "GET", - url: url, - data: data, - success: callback, - dataType: type - }); - }, - - getScript: function( url, callback ) { - return jQuery.get(url, null, callback, "script"); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get(url, data, callback, "json"); - }, - - post: function( url, data, callback, type ) { - if ( jQuery.isFunction( data ) ) { - callback = data; - data = {}; - } - - return jQuery.ajax({ - type: "POST", - url: url, - data: data, - success: callback, - dataType: type - }); - }, - - ajaxSetup: function( settings ) { - jQuery.extend( jQuery.ajaxSettings, settings ); - }, - - ajaxSettings: { - global: true, - type: "GET", - timeout: 0, - contentType: "application/x-www-form-urlencoded", - processData: true, - async: true, - data: null, - username: null, - password: null, - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - script: "text/javascript, application/javascript", - json: "application/json, text/javascript", - text: "text/plain", - _default: "*/*" - } - }, - - // Last-Modified header cache for next request - lastModified: {}, - - ajax: function( s ) { - var jsonp, jsre = /=\?(&|$)/g, status, data; - - // Extend the settings, but re-extend 's' so that it can be - // checked again later (in the test suite, specifically) - s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s)); - - // convert data if not already a string - if ( s.data && s.processData && typeof s.data != "string" ) - s.data = jQuery.param(s.data); - - // Handle JSONP Parameter Callbacks - if ( s.dataType == "jsonp" ) { - if ( s.type.toLowerCase() == "get" ) { - if ( !s.url.match(jsre) ) - s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?"; - } else if ( !s.data || !s.data.match(jsre) ) - s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; - s.dataType = "json"; - } - - // Build temporary JSONP function - if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) { - jsonp = "jsonp" + jsc++; - - // Replace the =? sequence both in the query string and the data - if ( s.data ) - s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1"); - s.url = s.url.replace(jsre, "=" + jsonp + "$1"); - - // We need to make sure - // that a JSONP style response is executed properly - s.dataType = "script"; - - // Handle JSONP-style loading - window[ jsonp ] = function(tmp){ - data = tmp; - success(); - complete(); - // Garbage collect - window[ jsonp ] = undefined; - try{ delete window[ jsonp ]; } catch(e){} - if ( head ) - head.removeChild( script ); - }; - } - - if ( s.dataType == "script" && s.cache == null ) - s.cache = false; - - if ( s.cache === false && s.type.toLowerCase() == "get" ) { - var ts = (new Date()).getTime(); - // try replacing _= if it is there - var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2"); - // if nothing was replaced, add timestamp to the end - s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : ""); - } - - // If data is available, append data to url for get requests - if ( s.data && s.type.toLowerCase() == "get" ) { - s.url += (s.url.match(/\?/) ? "&" : "?") + s.data; - - // IE likes to send both get and post data, prevent this - s.data = null; - } - - // Watch for a new set of requests - if ( s.global && ! jQuery.active++ ) - jQuery.event.trigger( "ajaxStart" ); - - // If we're requesting a remote document - // and trying to load JSON or Script with a GET - if ( (!s.url.indexOf("http") || !s.url.indexOf("//")) && ( s.dataType == "script" || s.dataType =="json" ) && s.type.toLowerCase() == "get" ) { - var head = document.getElementsByTagName("head")[0]; - var script = document.createElement("script"); - script.src = s.url; - if (s.scriptCharset) - script.charset = s.scriptCharset; - - // Handle Script loading - if ( !jsonp ) { - var done = false; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function(){ - if ( !done && (!this.readyState || - this.readyState == "loaded" || this.readyState == "complete") ) { - done = true; - success(); - complete(); - head.removeChild( script ); - } - }; - } - - head.appendChild(script); - - // We handle everything using the script element injection - return undefined; - } - - var requestDone = false; - - // Create the request object; Microsoft failed to properly - // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available - var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); - - // Open the socket - xml.open(s.type, s.url, s.async, s.username, s.password); - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - // Set the correct header, if data is being sent - if ( s.data ) - xml.setRequestHeader("Content-Type", s.contentType); - - // Set the If-Modified-Since header, if ifModified mode. - if ( s.ifModified ) - xml.setRequestHeader("If-Modified-Since", - jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); - - // Set header so the called script knows that it's an XMLHttpRequest - xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); - - // Set the Accepts header for the server, depending on the dataType - xml.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? - s.accepts[ s.dataType ] + ", */*" : - s.accepts._default ); - } catch(e){} - - // Allow custom headers/mimetypes - if ( s.beforeSend ) - s.beforeSend(xml); - - if ( s.global ) - jQuery.event.trigger("ajaxSend", [xml, s]); - - // Wait for a response to come back - var onreadystatechange = function(isTimeout){ - // The transfer is complete and the data is available, or the request timed out - if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) { - requestDone = true; - - // clear poll interval - if (ival) { - clearInterval(ival); - ival = null; - } - - status = isTimeout == "timeout" && "timeout" || - !jQuery.httpSuccess( xml ) && "error" || - s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" || - "success"; - - if ( status == "success" ) { - // Watch for, and catch, XML document parse errors - try { - // process the data (runs the xml through httpData regardless of callback) - data = jQuery.httpData( xml, s.dataType ); - } catch(e) { - status = "parsererror"; - } - } - - // Make sure that the request was successful or notmodified - if ( status == "success" ) { - // Cache Last-Modified header, if ifModified mode. - var modRes; - try { - modRes = xml.getResponseHeader("Last-Modified"); - } catch(e) {} // swallow exception thrown by FF if header is not available - - if ( s.ifModified && modRes ) - jQuery.lastModified[s.url] = modRes; - - // JSONP handles its own success callback - if ( !jsonp ) - success(); - } else - jQuery.handleError(s, xml, status); - - // Fire the complete handlers - complete(); - - // Stop memory leaks - if ( s.async ) - xml = null; - } - }; - - if ( s.async ) { - // don't attach the handler to the request, just poll it instead - var ival = setInterval(onreadystatechange, 13); - - // Timeout checker - if ( s.timeout > 0 ) - setTimeout(function(){ - // Check to see if the request is still happening - if ( xml ) { - // Cancel the request - xml.abort(); - - if( !requestDone ) - onreadystatechange( "timeout" ); - } - }, s.timeout); - } - - // Send the data - try { - xml.send(s.data); - } catch(e) { - jQuery.handleError(s, xml, null, e); - } - - // firefox 1.5 doesn't fire statechange for sync requests - if ( !s.async ) - onreadystatechange(); - - function success(){ - // If a local callback was specified, fire it and pass it the data - if ( s.success ) - s.success( data, status ); - - // Fire the global callback - if ( s.global ) - jQuery.event.trigger( "ajaxSuccess", [xml, s] ); - } - - function complete(){ - // Process result - if ( s.complete ) - s.complete(xml, status); - - // The request was completed - if ( s.global ) - jQuery.event.trigger( "ajaxComplete", [xml, s] ); - - // Handle the global AJAX counter - if ( s.global && ! --jQuery.active ) - jQuery.event.trigger( "ajaxStop" ); - } - - // return XMLHttpRequest to allow aborting the request etc. - return xml; - }, - - handleError: function( s, xml, status, e ) { - // If a local callback was specified, fire it - if ( s.error ) s.error( xml, status, e ); - - // Fire the global callback - if ( s.global ) - jQuery.event.trigger( "ajaxError", [xml, s, e] ); - }, - - // Counter for holding the number of active queries - active: 0, - - // Determines if an XMLHttpRequest was successful or not - httpSuccess: function( r ) { - try { - // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 - return !r.status && location.protocol == "file:" || - ( r.status >= 200 && r.status < 300 ) || r.status == 304 || r.status == 1223 || - jQuery.browser.safari && r.status == undefined; - } catch(e){} - return false; - }, - - // Determines if an XMLHttpRequest returns NotModified - httpNotModified: function( xml, url ) { - try { - var xmlRes = xml.getResponseHeader("Last-Modified"); - - // Firefox always returns 200. check Last-Modified date - return xml.status == 304 || xmlRes == jQuery.lastModified[url] || - jQuery.browser.safari && xml.status == undefined; - } catch(e){} - return false; - }, - - httpData: function( r, type ) { - var ct = r.getResponseHeader("content-type"); - var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0; - var data = xml ? r.responseXML : r.responseText; - - if ( xml && data.documentElement.tagName == "parsererror" ) - throw "parsererror"; - - // If the type is "script", eval it in global context - if ( type == "script" ) - jQuery.globalEval( data ); - - // Get the JavaScript object, if JSON is used. - if ( type == "json" ) - data = eval("(" + data + ")"); - - return data; - }, - - // Serialize an array of form elements or a set of - // key/values into a query string - param: function( a ) { - var s = []; - - // If an array was passed in, assume that it is an array - // of form elements - if ( a.constructor == Array || a.jquery ) - // Serialize the form elements - jQuery.each( a, function(){ - s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) ); - }); - - // Otherwise, assume that it's an object of key/value pairs - else - // Serialize the key/values - for ( var j in a ) - // If the value is an array then the key names need to be repeated - if ( a[j] && a[j].constructor == Array ) - jQuery.each( a[j], function(){ - s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) ); - }); - else - s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) ); - - // Return the resulting serialization - return s.join("&").replace(/%20/g, "+"); - } - -}); -jQuery.fn.extend({ - show: function(speed,callback){ - return speed ? - this.animate({ - height: "show", width: "show", opacity: "show" - }, speed, callback) : - - this.filter(":hidden").each(function(){ - this.style.display = this.oldblock || ""; - if ( jQuery.css(this,"display") == "none" ) { - var elem = jQuery("<" + this.tagName + " />").appendTo("body"); - this.style.display = elem.css("display"); - // handle an edge condition where css is - div { display:none; } or similar - if (this.style.display == "none") - this.style.display = "block"; - elem.remove(); - } - }).end(); - }, - - hide: function(speed,callback){ - return speed ? - this.animate({ - height: "hide", width: "hide", opacity: "hide" - }, speed, callback) : - - this.filter(":visible").each(function(){ - this.oldblock = this.oldblock || jQuery.css(this,"display"); - this.style.display = "none"; - }).end(); - }, - - // Save the old toggle function - _toggle: jQuery.fn.toggle, - - toggle: function( fn, fn2 ){ - return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? - this._toggle( fn, fn2 ) : - fn ? - this.animate({ - height: "toggle", width: "toggle", opacity: "toggle" - }, fn, fn2) : - this.each(function(){ - jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); - }); - }, - - slideDown: function(speed,callback){ - return this.animate({height: "show"}, speed, callback); - }, - - slideUp: function(speed,callback){ - return this.animate({height: "hide"}, speed, callback); - }, - - slideToggle: function(speed, callback){ - return this.animate({height: "toggle"}, speed, callback); - }, - - fadeIn: function(speed, callback){ - return this.animate({opacity: "show"}, speed, callback); - }, - - fadeOut: function(speed, callback){ - return this.animate({opacity: "hide"}, speed, callback); - }, - - fadeTo: function(speed,to,callback){ - return this.animate({opacity: to}, speed, callback); - }, - - animate: function( prop, speed, easing, callback ) { - var optall = jQuery.speed(speed, easing, callback); - - return this[ optall.queue === false ? "each" : "queue" ](function(){ - if ( this.nodeType != 1) - return false; - - var opt = jQuery.extend({}, optall); - var hidden = jQuery(this).is(":hidden"), self = this; - - for ( var p in prop ) { - if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) - return jQuery.isFunction(opt.complete) && opt.complete.apply(this); - - if ( p == "height" || p == "width" ) { - // Store display property - opt.display = jQuery.css(this, "display"); - - // Make sure that nothing sneaks out - opt.overflow = this.style.overflow; - } - } - - if ( opt.overflow != null ) - this.style.overflow = "hidden"; - - opt.curAnim = jQuery.extend({}, prop); - - jQuery.each( prop, function(name, val){ - var e = new jQuery.fx( self, opt, name ); - - if ( /toggle|show|hide/.test(val) ) - e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop ); - else { - var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), - start = e.cur(true) || 0; - - if ( parts ) { - var end = parseFloat(parts[2]), - unit = parts[3] || "px"; - - // We need to compute starting value - if ( unit != "px" ) { - self.style[ name ] = (end || 1) + unit; - start = ((end || 1) / e.cur(true)) * start; - self.style[ name ] = start + unit; - } - - // If a +=/-= token was provided, we're doing a relative animation - if ( parts[1] ) - end = ((parts[1] == "-=" ? -1 : 1) * end) + start; - - e.custom( start, end, unit ); - } else - e.custom( start, val, "" ); - } - }); - - // For JS strict compliance - return true; - }); - }, - - queue: function(type, fn){ - if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) { - fn = type; - type = "fx"; - } - - if ( !type || (typeof type == "string" && !fn) ) - return queue( this[0], type ); - - return this.each(function(){ - if ( fn.constructor == Array ) - queue(this, type, fn); - else { - queue(this, type).push( fn ); - - if ( queue(this, type).length == 1 ) - fn.apply(this); - } - }); - }, - - stop: function(clearQueue, gotoEnd){ - var timers = jQuery.timers; - - if (clearQueue) - this.queue([]); - - this.each(function(){ - // go in reverse order so anything added to the queue during the loop is ignored - for ( var i = timers.length - 1; i >= 0; i-- ) - if ( timers[i].elem == this ) { - if (gotoEnd) - // force the next step to be the last - timers[i](true); - timers.splice(i, 1); - } - }); - - // start the next in the queue if the last step wasn't forced - if (!gotoEnd) - this.dequeue(); - - return this; - } - -}); - -var queue = function( elem, type, array ) { - if ( !elem ) - return undefined; - - type = type || "fx"; - - var q = jQuery.data( elem, type + "queue" ); - - if ( !q || array ) - q = jQuery.data( elem, type + "queue", - array ? jQuery.makeArray(array) : [] ); - - return q; -}; - -jQuery.fn.dequeue = function(type){ - type = type || "fx"; - - return this.each(function(){ - var q = queue(this, type); - - q.shift(); - - if ( q.length ) - q[0].apply( this ); - }); -}; - -jQuery.extend({ - - speed: function(speed, easing, fn) { - var opt = speed && speed.constructor == Object ? speed : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && easing.constructor != Function && easing - }; - - opt.duration = (opt.duration && opt.duration.constructor == Number ? - opt.duration : - { slow: 600, fast: 200 }[opt.duration]) || 400; - - // Queueing - opt.old = opt.complete; - opt.complete = function(){ - if ( opt.queue !== false ) - jQuery(this).dequeue(); - if ( jQuery.isFunction( opt.old ) ) - opt.old.apply( this ); - }; - - return opt; - }, - - easing: { - linear: function( p, n, firstNum, diff ) { - return firstNum + diff * p; - }, - swing: function( p, n, firstNum, diff ) { - return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; - } - }, - - timers: [], - timerId: null, - - fx: function( elem, options, prop ){ - this.options = options; - this.elem = elem; - this.prop = prop; - - if ( !options.orig ) - options.orig = {}; - } - -}); - -jQuery.fx.prototype = { - - // Simple function for setting a style value - update: function(){ - if ( this.options.step ) - this.options.step.apply( this.elem, [ this.now, this ] ); - - (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); - - // Set display property to block for height/width animations - if ( this.prop == "height" || this.prop == "width" ) - this.elem.style.display = "block"; - }, - - // Get the current size - cur: function(force){ - if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null ) - return this.elem[ this.prop ]; - - var r = parseFloat(jQuery.css(this.elem, this.prop, force)); - return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0; - }, - - // Start an animation from one number to another - custom: function(from, to, unit){ - this.startTime = (new Date()).getTime(); - this.start = from; - this.end = to; - this.unit = unit || this.unit || "px"; - this.now = this.start; - this.pos = this.state = 0; - this.update(); - - var self = this; - function t(gotoEnd){ - return self.step(gotoEnd); - } - - t.elem = this.elem; - - jQuery.timers.push(t); - - if ( jQuery.timerId == null ) { - jQuery.timerId = setInterval(function(){ - var timers = jQuery.timers; - - for ( var i = 0; i < timers.length; i++ ) - if ( !timers[i]() ) - timers.splice(i--, 1); - - if ( !timers.length ) { - clearInterval( jQuery.timerId ); - jQuery.timerId = null; - } - }, 13); - } - }, - - // Simple 'show' function - show: function(){ - // Remember where we started, so that we can go back to it later - this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); - this.options.show = true; - - // Begin the animation - this.custom(0, this.cur()); - - // Make sure that we start at a small width/height to avoid any - // flash of content - if ( this.prop == "width" || this.prop == "height" ) - this.elem.style[this.prop] = "1px"; - - // Start by showing the element - jQuery(this.elem).show(); - }, - - // Simple 'hide' function - hide: function(){ - // Remember where we started, so that we can go back to it later - this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); - this.options.hide = true; - - // Begin the animation - this.custom(this.cur(), 0); - }, - - // Each step of an animation - step: function(gotoEnd){ - var t = (new Date()).getTime(); - - if ( gotoEnd || t > this.options.duration + this.startTime ) { - this.now = this.end; - this.pos = this.state = 1; - this.update(); - - this.options.curAnim[ this.prop ] = true; - - var done = true; - for ( var i in this.options.curAnim ) - if ( this.options.curAnim[i] !== true ) - done = false; - - if ( done ) { - if ( this.options.display != null ) { - // Reset the overflow - this.elem.style.overflow = this.options.overflow; - - // Reset the display - this.elem.style.display = this.options.display; - if ( jQuery.css(this.elem, "display") == "none" ) - this.elem.style.display = "block"; - } - - // Hide the element if the "hide" operation was done - if ( this.options.hide ) - this.elem.style.display = "none"; - - // Reset the properties, if the item has been hidden or shown - if ( this.options.hide || this.options.show ) - for ( var p in this.options.curAnim ) - jQuery.attr(this.elem.style, p, this.options.orig[p]); - } - - // If a callback was provided, execute it - if ( done && jQuery.isFunction( this.options.complete ) ) - // Execute the complete function - this.options.complete.apply( this.elem ); - - return false; - } else { - var n = t - this.startTime; - this.state = n / this.options.duration; - - // Perform the easing function, defaults to swing - this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration); - this.now = this.start + ((this.end - this.start) * this.pos); - - // Perform the next step of the animation - this.update(); - } - - return true; - } - -}; - -jQuery.fx.step = { - scrollLeft: function(fx){ - fx.elem.scrollLeft = fx.now; - }, - - scrollTop: function(fx){ - fx.elem.scrollTop = fx.now; - }, - - opacity: function(fx){ - jQuery.attr(fx.elem.style, "opacity", fx.now); - }, - - _default: function(fx){ - fx.elem.style[ fx.prop ] = fx.now + fx.unit; - } -}; -// The Offset Method -// Originally By Brandon Aaron, part of the Dimension Plugin -// http://jquery.com/plugins/project/dimensions -jQuery.fn.offset = function() { - var left = 0, top = 0, elem = this[0], results; - - if ( elem ) with ( jQuery.browser ) { - var parent = elem.parentNode, - offsetChild = elem, - offsetParent = elem.offsetParent, - doc = elem.ownerDocument, - safari2 = safari && parseInt(version) < 522, - fixed = jQuery.css(elem, "position") == "fixed"; - - // Use getBoundingClientRect if available - if ( elem.getBoundingClientRect ) { - var box = elem.getBoundingClientRect(); - - // Add the document scroll offsets - add(box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), - box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop)); - - // IE adds the HTML element's border, by default it is medium which is 2px - // IE 6 and 7 quirks mode the border width is overwritable by the following css html { border: 0; } - // IE 7 standards mode, the border is always 2px - // This border/offset is typically represented by the clientLeft and clientTop properties - // However, in IE6 and 7 quirks mode the clientLeft and clientTop properties are not updated when overwriting it via CSS - // Therefore this method will be off by 2px in IE while in quirksmode - add( -doc.documentElement.clientLeft, -doc.documentElement.clientTop ); - - // Otherwise loop through the offsetParents and parentNodes - } else { - - // Initial element offsets - add( elem.offsetLeft, elem.offsetTop ); - - // Get parent offsets - while ( offsetParent ) { - // Add offsetParent offsets - add( offsetParent.offsetLeft, offsetParent.offsetTop ); - - // Mozilla and Safari > 2 does not include the border on offset parents - // However Mozilla adds the border for table or table cells - if ( mozilla && !/^t(able|d|h)$/i.test(offsetParent.tagName) || safari && !safari2 ) - border( offsetParent ); - - // Add the document scroll offsets if position is fixed on any offsetParent - if ( !fixed && jQuery.css(offsetParent, "position") == "fixed" ) - fixed = true; - - // Set offsetChild to previous offsetParent unless it is the body element - offsetChild = /^body$/i.test(offsetParent.tagName) ? offsetChild : offsetParent; - // Get next offsetParent - offsetParent = offsetParent.offsetParent; - } - - // Get parent scroll offsets - while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) { - // Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug - if ( !/^inline|table.*$/i.test(jQuery.css(parent, "display")) ) - // Subtract parent scroll offsets - add( -parent.scrollLeft, -parent.scrollTop ); - - // Mozilla does not add the border for a parent that has overflow != visible - if ( mozilla && jQuery.css(parent, "overflow") != "visible" ) - border( parent ); - - // Get next parent - parent = parent.parentNode; - } - - // Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild - // Mozilla doubles body offsets with a non-absolutely positioned offsetChild - if ( (safari2 && (fixed || jQuery.css(offsetChild, "position") == "absolute")) || - (mozilla && jQuery.css(offsetChild, "position") != "absolute") ) - add( -doc.body.offsetLeft, -doc.body.offsetTop ); - - // Add the document scroll offsets if position is fixed - if ( fixed ) - add(Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), - Math.max(doc.documentElement.scrollTop, doc.body.scrollTop)); - } - - // Return an object with top and left properties - results = { top: top, left: left }; - } - - function border(elem) { - add( jQuery.curCSS(elem, "borderLeftWidth", true), jQuery.curCSS(elem, "borderTopWidth", true) ); - } - - function add(l, t) { - left += parseInt(l) || 0; - top += parseInt(t) || 0; - } - - return results; -}; -})(); diff --git a/javascript/libs/jquery/plugins/migrate/jquery.migrate.js b/javascript/libs/jquery/plugins/migrate/jquery.migrate.js deleted file mode 100644 index 25b6c81..0000000 --- a/javascript/libs/jquery/plugins/migrate/jquery.migrate.js +++ /dev/null @@ -1,521 +0,0 @@ -/*! - * jQuery Migrate - v1.2.1 - 2013-05-08 - * https://github.com/jquery/jquery-migrate - * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT - */ -(function( jQuery, window, undefined ) { -// See http://bugs.jquery.com/ticket/13335 -// "use strict"; - - -var warnedAbout = {}; - -// List of warnings already given; public read only -jQuery.migrateWarnings = []; - -// Set to true to prevent console output; migrateWarnings still maintained -// jQuery.migrateMute = false; - -// Show a message on the console so devs know we're active -if ( !jQuery.migrateMute && window.console && window.console.log ) { - window.console.log("JQMIGRATE: Logging is active"); -} - -// Set to false to disable traces that appear with warnings -if ( jQuery.migrateTrace === undefined ) { - jQuery.migrateTrace = true; -} - -// Forget any warnings we've already given; public -jQuery.migrateReset = function() { - warnedAbout = {}; - jQuery.migrateWarnings.length = 0; -}; - -function migrateWarn( msg) { - var console = window.console; - if ( !warnedAbout[ msg ] ) { - warnedAbout[ msg ] = true; - jQuery.migrateWarnings.push( msg ); - if ( console && console.warn && !jQuery.migrateMute ) { - console.warn( "JQMIGRATE: " + msg ); - if ( jQuery.migrateTrace && console.trace ) { - console.trace(); - } - } - } -} - -function migrateWarnProp( obj, prop, value, msg ) { - if ( Object.defineProperty ) { - // On ES5 browsers (non-oldIE), warn if the code tries to get prop; - // allow property to be overwritten in case some other plugin wants it - try { - Object.defineProperty( obj, prop, { - configurable: true, - enumerable: true, - get: function() { - migrateWarn( msg ); - return value; - }, - set: function( newValue ) { - migrateWarn( msg ); - value = newValue; - } - }); - return; - } catch( err ) { - // IE8 is a dope about Object.defineProperty, can't warn there - } - } - - // Non-ES5 (or broken) browser; just set the property - jQuery._definePropertyBroken = true; - obj[ prop ] = value; -} - -if ( document.compatMode === "BackCompat" ) { - // jQuery has never supported or tested Quirks Mode - migrateWarn( "jQuery is not compatible with Quirks Mode" ); -} - - -var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn, - oldAttr = jQuery.attr, - valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get || - function() { return null; }, - valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set || - function() { return undefined; }, - rnoType = /^(?:input|button)$/i, - rnoAttrNodeType = /^[238]$/, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - ruseDefault = /^(?:checked|selected)$/i; - -// jQuery.attrFn -migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" ); - -jQuery.attr = function( elem, name, value, pass ) { - var lowerName = name.toLowerCase(), - nType = elem && elem.nodeType; - - if ( pass ) { - // Since pass is used internally, we only warn for new jQuery - // versions where there isn't a pass arg in the formal params - if ( oldAttr.length < 4 ) { - migrateWarn("jQuery.fn.attr( props, pass ) is deprecated"); - } - if ( elem && !rnoAttrNodeType.test( nType ) && - (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) { - return jQuery( elem )[ name ]( value ); - } - } - - // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking - // for disconnected elements we don't warn on $( "<button>", { type: "button" } ). - if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) && elem.parentNode ) { - migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8"); - } - - // Restore boolHook for boolean property/attribute synchronization - if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) { - jQuery.attrHooks[ lowerName ] = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && - ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } - }; - - // Warn only for attributes that can remain distinct from their properties post-1.9 - if ( ruseDefault.test( lowerName ) ) { - migrateWarn( "jQuery.fn.attr('" + lowerName + "') may use property instead of attribute" ); - } - } - - return oldAttr.call( jQuery, elem, name, value ); -}; - -// attrHooks: value -jQuery.attrHooks.value = { - get: function( elem, name ) { - var nodeName = ( elem.nodeName || "" ).toLowerCase(); - if ( nodeName === "button" ) { - return valueAttrGet.apply( this, arguments ); - } - if ( nodeName !== "input" && nodeName !== "option" ) { - migrateWarn("jQuery.fn.attr('value') no longer gets properties"); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value ) { - var nodeName = ( elem.nodeName || "" ).toLowerCase(); - if ( nodeName === "button" ) { - return valueAttrSet.apply( this, arguments ); - } - if ( nodeName !== "input" && nodeName !== "option" ) { - migrateWarn("jQuery.fn.attr('value', val) no longer sets properties"); - } - // Does not return so that setAttribute is also used - elem.value = value; - } -}; - - -var matched, browser, - oldInit = jQuery.fn.init, - oldParseJSON = jQuery.parseJSON, - // Note: XSS check is done below after string is trimmed - rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/; - -// $(html) "looks like html" rule change -jQuery.fn.init = function( selector, context, rootjQuery ) { - var match; - - if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) && - (match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) { - // This is an HTML string according to the "old" rules; is it still? - if ( selector.charAt( 0 ) !== "<" ) { - migrateWarn("$(html) HTML strings must start with '<' character"); - } - if ( match[ 3 ] ) { - migrateWarn("$(html) HTML text after last tag is ignored"); - } - // Consistently reject any HTML-like string starting with a hash (#9521) - // Note that this may break jQuery 1.6.x code that otherwise would work. - if ( match[ 0 ].charAt( 0 ) === "#" ) { - migrateWarn("HTML string cannot start with a '#' character"); - jQuery.error("JQMIGRATE: Invalid selector string (XSS)"); - } - // Now process using loose rules; let pre-1.8 play too - if ( context && context.context ) { - // jQuery object as context; parseHTML expects a DOM object - context = context.context; - } - if ( jQuery.parseHTML ) { - return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ), - context, rootjQuery ); - } - } - return oldInit.apply( this, arguments ); -}; -jQuery.fn.init.prototype = jQuery.fn; - -// Let $.parseJSON(falsy_value) return null -jQuery.parseJSON = function( json ) { - if ( !json && json !== null ) { - migrateWarn("jQuery.parseJSON requires a valid JSON string"); - return null; - } - return oldParseJSON.apply( this, arguments ); -}; - -jQuery.uaMatch = function( ua ) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; -}; - -// Don't clobber any existing jQuery.browser in case it's different -if ( !jQuery.browser ) { - matched = jQuery.uaMatch( navigator.userAgent ); - browser = {}; - - if ( matched.browser ) { - browser[ matched.browser ] = true; - browser.version = matched.version; - } - - // Chrome is Webkit, but Webkit is also Safari. - if ( browser.chrome ) { - browser.webkit = true; - } else if ( browser.webkit ) { - browser.safari = true; - } - - jQuery.browser = browser; -} - -// Warn if the code tries to get jQuery.browser -migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" ); - -jQuery.sub = function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - migrateWarn( "jQuery.sub() is deprecated" ); - return jQuerySub; -}; - - -// Ensure that $.ajax gets the new parseJSON defined in core.js -jQuery.ajaxSetup({ - converters: { - "text json": jQuery.parseJSON - } -}); - - -var oldFnData = jQuery.fn.data; - -jQuery.fn.data = function( name ) { - var ret, evt, - elem = this[0]; - - // Handles 1.7 which has this behavior and 1.8 which doesn't - if ( elem && name === "events" && arguments.length === 1 ) { - ret = jQuery.data( elem, name ); - evt = jQuery._data( elem, name ); - if ( ( ret === undefined || ret === evt ) && evt !== undefined ) { - migrateWarn("Use of jQuery.fn.data('events') is deprecated"); - return evt; - } - } - return oldFnData.apply( this, arguments ); -}; - - -var rscriptType = /\/(java|ecma)script/i, - oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack; - -jQuery.fn.andSelf = function() { - migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"); - return oldSelf.apply( this, arguments ); -}; - -// Since jQuery.clean is used internally on older versions, we only shim if it's missing -if ( !jQuery.clean ) { - jQuery.clean = function( elems, context, fragment, scripts ) { - // Set context per 1.8 logic - context = context || document; - context = !context.nodeType && context[0] || context; - context = context.ownerDocument || context; - - migrateWarn("jQuery.clean() is deprecated"); - - var i, elem, handleScript, jsTags, - ret = []; - - jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes ); - - // Complex logic lifted directly from jQuery 1.8 - if ( fragment ) { - // Special handling of each script element - handleScript = function( elem ) { - // Check if we consider it executable - if ( !elem.type || rscriptType.test( elem.type ) ) { - // Detach the script and store it in the scripts array (if provided) or the fragment - // Return truthy to indicate that it has been handled - return scripts ? - scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : - fragment.appendChild( elem ); - } - }; - - for ( i = 0; (elem = ret[i]) != null; i++ ) { - // Check if we're done after handling an executable script - if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { - // Append to fragment and handle embedded scripts - fragment.appendChild( elem ); - if ( typeof elem.getElementsByTagName !== "undefined" ) { - // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration - jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); - - // Splice the scripts into ret after their former ancestor and advance our index beyond them - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - i += jsTags.length; - } - } - } - } - - return ret; - }; -} - -var eventAdd = jQuery.event.add, - eventRemove = jQuery.event.remove, - eventTrigger = jQuery.event.trigger, - oldToggle = jQuery.fn.toggle, - oldLive = jQuery.fn.live, - oldDie = jQuery.fn.die, - ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess", - rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ), - rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, - hoverHack = function( events ) { - if ( typeof( events ) !== "string" || jQuery.event.special.hover ) { - return events; - } - if ( rhoverHack.test( events ) ) { - migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"); - } - return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -// Event props removed in 1.9, put them back if needed; no practical way to warn them -if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) { - jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" ); -} - -// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7 -if ( jQuery.event.dispatch ) { - migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" ); -} - -// Support for 'hover' pseudo-event and ajax event warnings -jQuery.event.add = function( elem, types, handler, data, selector ){ - if ( elem !== document && rajaxEvent.test( types ) ) { - migrateWarn( "AJAX events should be attached to document: " + types ); - } - eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector ); -}; -jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){ - eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes ); -}; - -jQuery.fn.error = function() { - var args = Array.prototype.slice.call( arguments, 0); - migrateWarn("jQuery.fn.error() is deprecated"); - args.splice( 0, 0, "error" ); - if ( arguments.length ) { - return this.bind.apply( this, args ); - } - // error event should not bubble to window, although it does pre-1.7 - this.triggerHandler.apply( this, args ); - return this; -}; - -jQuery.fn.toggle = function( fn, fn2 ) { - - // Don't mess with animation or css toggles - if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) { - return oldToggle.apply( this, arguments ); - } - migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated"); - - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); -}; - -jQuery.fn.live = function( types, data, fn ) { - migrateWarn("jQuery.fn.live() is deprecated"); - if ( oldLive ) { - return oldLive.apply( this, arguments ); - } - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; -}; - -jQuery.fn.die = function( types, fn ) { - migrateWarn("jQuery.fn.die() is deprecated"); - if ( oldDie ) { - return oldDie.apply( this, arguments ); - } - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; -}; - -// Turn global events into document-triggered events -jQuery.event.trigger = function( event, data, elem, onlyHandlers ){ - if ( !elem && !rajaxEvent.test( event ) ) { - migrateWarn( "Global events are undocumented and deprecated" ); - } - return eventTrigger.call( this, event, data, elem || document, onlyHandlers ); -}; -jQuery.each( ajaxEvents.split("|"), - function( _, name ) { - jQuery.event.special[ name ] = { - setup: function() { - var elem = this; - - // The document needs no shimming; must be !== for oldIE - if ( elem !== document ) { - jQuery.event.add( document, name + "." + jQuery.guid, function() { - jQuery.event.trigger( name, null, elem, true ); - }); - jQuery._data( this, name, jQuery.guid++ ); - } - return false; - }, - teardown: function() { - if ( this !== document ) { - jQuery.event.remove( document, name + "." + jQuery._data( this, name ) ); - } - return false; - } - }; - } -); - - -})( jQuery, window ); diff --git a/javascript/libs/jquery/plugins/touch-punch/jquery.ui.touch-punch.js b/javascript/libs/jquery/plugins/touch-punch/jquery.ui.touch-punch.js deleted file mode 100644 index 16ce41d..0000000 --- a/javascript/libs/jquery/plugins/touch-punch/jquery.ui.touch-punch.js +++ /dev/null @@ -1,180 +0,0 @@ -/*! - * jQuery UI Touch Punch 0.2.3 - * - * Copyright 2011–2014, Dave Furfero - * Dual licensed under the MIT or GPL Version 2 licenses. - * - * Depends: - * jquery.ui.widget.js - * jquery.ui.mouse.js - */ -(function ($) { - - // Detect touch support - $.support.touch = 'ontouchend' in document; - - // Ignore browsers without touch support - if (!$.support.touch) { - return; - } - - var mouseProto = $.ui.mouse.prototype, - _mouseInit = mouseProto._mouseInit, - _mouseDestroy = mouseProto._mouseDestroy, - touchHandled; - - /** - * Simulate a mouse event based on a corresponding touch event - * @param {Object} event A touch event - * @param {String} simulatedType The corresponding mouse event - */ - function simulateMouseEvent (event, simulatedType) { - - // Ignore multi-touch events - if (event.originalEvent.touches.length > 1) { - return; - } - - event.preventDefault(); - - var touch = event.originalEvent.changedTouches[0], - simulatedEvent = document.createEvent('MouseEvents'); - - // Initialize the simulated mouse event using the touch event's coordinates - simulatedEvent.initMouseEvent( - simulatedType, // type - true, // bubbles - true, // cancelable - window, // view - 1, // detail - touch.screenX, // screenX - touch.screenY, // screenY - touch.clientX, // clientX - touch.clientY, // clientY - false, // ctrlKey - false, // altKey - false, // shiftKey - false, // metaKey - 0, // button - null // relatedTarget - ); - - // Dispatch the simulated event to the target element - event.target.dispatchEvent(simulatedEvent); - } - - /** - * Handle the jQuery UI widget's touchstart events - * @param {Object} event The widget element's touchstart event - */ - mouseProto._touchStart = function (event) { - - var self = this; - - // Ignore the event if another widget is already being handled - if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) { - return; - } - - // Set the flag to prevent other widgets from inheriting the touch event - touchHandled = true; - - // Track movement to determine if interaction was a click - self._touchMoved = false; - - // Simulate the mouseover event - simulateMouseEvent(event, 'mouseover'); - - // Simulate the mousemove event - simulateMouseEvent(event, 'mousemove'); - - // Simulate the mousedown event - simulateMouseEvent(event, 'mousedown'); - }; - - /** - * Handle the jQuery UI widget's touchmove events - * @param {Object} event The document's touchmove event - */ - mouseProto._touchMove = function (event) { - - // Ignore event if not handled - if (!touchHandled) { - return; - } - - // Interaction was not a click - this._touchMoved = true; - - // Simulate the mousemove event - simulateMouseEvent(event, 'mousemove'); - }; - - /** - * Handle the jQuery UI widget's touchend events - * @param {Object} event The document's touchend event - */ - mouseProto._touchEnd = function (event) { - - // Ignore event if not handled - if (!touchHandled) { - return; - } - - // Simulate the mouseup event - simulateMouseEvent(event, 'mouseup'); - - // Simulate the mouseout event - simulateMouseEvent(event, 'mouseout'); - - // If the touch interaction did not move, it should trigger a click - if (!this._touchMoved) { - - // Simulate the click event - simulateMouseEvent(event, 'click'); - } - - // Unset the flag to allow other widgets to inherit the touch event - touchHandled = false; - }; - - /** - * A duck punch of the $.ui.mouse _mouseInit method to support touch events. - * This method extends the widget with bound touch event handlers that - * translate touch events to mouse events and pass them to the widget's - * original mouse event handling methods. - */ - mouseProto._mouseInit = function () { - - var self = this; - - // Delegate the touch handlers to the widget's element - self.element.bind({ - touchstart: $.proxy(self, '_touchStart'), - touchmove: $.proxy(self, '_touchMove'), - touchend: $.proxy(self, '_touchEnd') - }); - - // Call the original $.ui.mouse init method - _mouseInit.call(self); - }; - - /** - * Remove the touch event handlers - */ - mouseProto._mouseDestroy = function () { - - var self = this; - - // Delegate the touch handlers to the widget's element - self.element.unbind({ - touchstart: $.proxy(self, '_touchStart'), - touchmove: $.proxy(self, '_touchMove'), - touchend: $.proxy(self, '_touchEnd') - }); - - // Call the original $.ui.mouse destroy method - _mouseDestroy.call(self); - }; - -})(jQuery);
\ No newline at end of file diff --git a/javascript/libs/jquery/plugins/touch-punch/jquery.ui.touch-punch.min.js b/javascript/libs/jquery/plugins/touch-punch/jquery.ui.touch-punch.min.js deleted file mode 100644 index 31272ce..0000000 --- a/javascript/libs/jquery/plugins/touch-punch/jquery.ui.touch-punch.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * jQuery UI Touch Punch 0.2.3 - * - * Copyright 2011–2014, Dave Furfero - * Dual licensed under the MIT or GPL Version 2 licenses. - * - * Depends: - * jquery.ui.widget.js - * jquery.ui.mouse.js - */ -!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
\ No newline at end of file diff --git a/javascript/libs/live_search.js b/javascript/libs/live_search.js deleted file mode 100644 index 42ebfbc..0000000 --- a/javascript/libs/live_search.js +++ /dev/null @@ -1,70 +0,0 @@ -/*
-Written by: Adam Crownoble (adam@bryan.edu)
-Date: April 3 2006
-License: LGPL (http://www.gnu.org/copyleft/lesser.html)
-*/
-
-var LiveSearch = Class.create();
-LiveSearch.prototype = {
- initialize: function(searchBox, results) {
- this.form = searchBox.form;
- this.searchBox = searchBox;
- this.results = results;
- this.url = this.form.action;
- this.method = this.form.method;
- this.stopSubmit = true;
- this.searchString = this.searchBox.value;
- this.starterText = this.searchString;
- this.searchingMessage = 'Searching...';
- this.minLength = 3;
- this.timeoutID = 0;
- this.delay = 500;
-
- Event.observe(this.form, 'submit', this.submit.bind(this));
- Event.observe(this.searchBox, 'keyup', this.update.bind(this));
- Event.observe(this.searchBox, 'focus', this.handleStarterText.bind(this));
- Event.observe(this.searchBox, 'blur', this.handleStarterText.bind(this));
-
- this.form.reset();
- },
-
- handleStarterText: function(event) {
- switch(event.type) {
- case 'focus':
- if(this.searchBox.value == this.starterText) {
- Field.clear(this.searchBox);
- }
- break;
-
- case 'blur':
- if(this.searchBox.value == '') {
- this.searchBox.value = this.starterText;
- }
- break;
- }
- },
-
- update: function() {
- if(this.searchString != this.searchBox.value && this.searchBox.value != this.starterText) {
-
- this.searchString = this.searchBox.value;
- clearTimeout(this.timeoutID);
-
- if(this.searchString.length >= this.minLength) {
- this.results.innerHTML = this.searchingMessage;
- this.timeoutID = setTimeout(this.search.bind(this), this.delay);
- } else {
- this.results.innerHTML = '';
- }
- }
- },
-
- search: function() {
- var parameters = Form.serialize(this.form);
- var ajax = new Ajax.Updater(this.results, this.url, { method: this.method, parameters: parameters });
- },
-
- submit: function(event) {
- if(this.stopSubmit) { Event.stop(event); }
- }
-};
diff --git a/javascript/libs/multifile.js b/javascript/libs/multifile.js deleted file mode 100644 index 9b3ce11..0000000 --- a/javascript/libs/multifile.js +++ /dev/null @@ -1,134 +0,0 @@ -// $Header: /cvsroot/bitweaver/_bit_util/javascript/libs/multifile.js,v 1.5 2007/07/09 18:29:25 squareing Exp $ - -// please modify this file and leave plenty of comments. This file will be -// compressed automatically. Please make sure you only use comments beginning -// with '//' and put comments on separate lines otherwise the packer will choke - -// Multiple file selector by Stickman -- http://www.the-stickman.com -function MultiSelector( list_target, max ){ - this.list_target = list_target; - this.count = 0; - this.id = 0; - if( max ){ - this.max = max; - } else { - this.max = -1; - }; - -// BitMod allow us to know what the maximum for each named item is. - this.max_elements = Array(); - -// BitMod allow us to add elements that are disabled and enabled in unison - this.disable_array = Array(); - -// BitMod Added setType to allow us to add something besides a div. - this.type = 'file'; - - this.addDisableElement = function(element) { - this.disable_array[element] = element; - }; - - this.setType = function(type) { - this.type = type; - }; - -// BitMod Added to allow us to include a title textbox - this.includeText = 0; - this.setIncludeText = function(include) { - this.includeText = include; - }; - -// BitMod Added to allow us to set the new item dragable - this.makeDragable = 0; - this.setMakeDragable = function(drag) { - this.makeDragable = drag; - }; - -// BitMod Added addNamedElement function to allow us to name these. -// Thus we can have multiple on the same form - this.addNamedElement = function(element, name) { -// BitMod We need a way to tell where the end is to avoid an infinite -// loop when processing the uploads because ones in the middle may get removed -// so we can't reliably tell when we hit the end without some magic - if(name in this.max_elements) { - this.max_elements[name].value = this.id; - } - else { - var max_element = document.createElement('input'); - max_element.type = 'hidden'; - max_element.name = name + '_max'; - max_element.value = this.count; - this.max_elements[name] = max_element; - this.list_target.appendChild(max_element); - }; - if( element.tagName == 'INPUT' && element.type == 'file' ){ - element.base_name = name; - element.name = name + '_' + this.id++; - element.multi_selector = this; - element.onchange = function(){ - var new_element = document.createElement( 'input' ); - new_element.type = 'file'; - this.parentNode.insertBefore( new_element, this ); - this.multi_selector.addNamedElement( new_element, element.base_name); - this.multi_selector.addListRow( this , element.name); - this.style.position = 'absolute'; - this.style.left = '-1000px'; - }; - if( this.max != -1 && this.count >= this.max ){ - element.disabled = true; - for (var item in this.disable_array) { - var elem = document.getElementById(item); - if (elem) { - elem.disabled = true; - } - } - }; - this.count++; - this.current_element = element; - } else { - alert( 'Error: not a file input element' ); - }; - }; - - this.addElement = function( element ){ - this.addNamedElement(element, 'file'); - }; - - this.addListRow = function( element , name){ - // BitMod create by type and set id so we can use it - // in a drag and drop li. - var new_row = document.createElement( this.type ); - if (this.makeDragable) { - DragDrop.makeItemDragable(new_row); - }; - new_row.id = name; - var new_row_button = document.createElement( 'input' ); - new_row_button.type = 'button'; - new_row_button.value = 'Remove'; - new_row.element = element; - new_row_button.onclick= function(){ - this.parentNode.element.parentNode.removeChild( this.parentNode.element ); - this.parentNode.parentNode.removeChild( this.parentNode ); - this.parentNode.element.multi_selector.count--; - this.parentNode.element.multi_selector.current_element.disabled = false; - for (var item in this.parentNode.element.multi_selector.disable_array) { - var elem = document.getElementById(item); - if (elem) { - elem.disabled = false; - }; - }; - return false; - }; - new_row.innerHTML = '<span>'+element.value+'</span>'; - // BitMod to allow us to add a text box - if (this.includeText) { - new_row.innerHTML += "<br />"; - var new_row_text = document.createElement( 'input' ); - new_row_text.type = 'text'; - new_row_text.name = name + '_text'; - new_row.appendChild(new_row_text); - }; - new_row.appendChild( new_row_button ); - this.list_target.appendChild( new_row ); - }; -}; diff --git a/javascript/libs/natcompare.js b/javascript/libs/natcompare.js deleted file mode 100644 index 9988643..0000000 --- a/javascript/libs/natcompare.js +++ /dev/null @@ -1,156 +0,0 @@ -/* -natcompare.js -- Perform 'natural order' comparisons of strings in JavaScript. -Copyright (C) 2005 by SCK-CEN (Belgian Nucleair Research Centre) -Written by Kristof Coomans <kristof[dot]coomans[at]sckcen[dot]be> - -Based on the Java version by Pierre-Luc Paour, of which this is more or less a straight conversion. -Copyright (C) 2003 by Pierre-Luc Paour <natorder@paour.com> - -The Java version was based on the C version by Martin Pool. -Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au> - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -function isWhitespaceChar(a) -{ - var charCode; - charCode = a.charCodeAt(0); - - if ( charCode <= 32 ) - { - return true; - } - else - { - return false; - } -} - -function isDigitChar(a) -{ - var charCode; - charCode = a.charCodeAt(0); - - if ( charCode >= 48 && charCode <= 57 ) - { - return true; - } - else - { - return false; - } -} - -function compareRight(a,b) -{ - var bias = 0; - var ia = 0; - var ib = 0; - - var ca; - var cb; - - // The longest run of digits wins. That aside, the greatest - // value wins, but we can't know that it will until we've scanned - // both numbers to know that they have the same magnitude, so we - // remember it in BIAS. - for (;; ia++, ib++) { - ca = a.charAt(ia); - cb = b.charAt(ib); - - if (!isDigitChar(ca) - && !isDigitChar(cb)) { - return bias; - } else if (!isDigitChar(ca)) { - return -1; - } else if (!isDigitChar(cb)) { - return +1; - } else if (ca < cb) { - if (bias == 0) { - bias = -1; - } - } else if (ca > cb) { - if (bias == 0) - bias = +1; - } - } -} - -function natcompare(a,b) { - - var ia = 0, ib = 0; - var nza = 0, nzb = 0; - var ca, cb; - var result; - - while (true) - { - // only count the number of zeroes leading the last number compared - nza = nzb = 0; - - ca = a.charAt(ia); - cb = b.charAt(ib); - - // skip over leading spaces or zeros - while ( isWhitespaceChar( ca ) || ca =='0' ) { - if (ca == '0') { - nza++; - } else { - // only count consecutive zeroes - nza = 0; - } - - ca = a.charAt(++ia); - } - - while ( isWhitespaceChar( cb ) || cb == '0') { - if (cb == '0') { - nzb++; - } else { - // only count consecutive zeroes - nzb = 0; - } - - cb = b.charAt(++ib); - } - - // process run of digits - if (isDigitChar(ca) && isDigitChar(cb)) { - if ((result = compareRight(a.substring(ia), b.substring(ib))) != 0) { - return result; - } - } - - if (ca == 0 && cb == 0) { - // The strings compare the same. Perhaps the caller - // will want to call strcmp to break the tie. - return nza - nzb; - } - - if (ca < cb) { - return -1; - } else if (ca > cb) { - return +1; - } - - ++ia; ++ib; - } -} - - diff --git a/javascript/libs/suggest/suggest.js b/javascript/libs/suggest/suggest.js deleted file mode 100755 index 4c46ff9..0000000 --- a/javascript/libs/suggest/suggest.js +++ /dev/null @@ -1,446 +0,0 @@ -//-------------------- mContentLoader.js -var net = new Object(); - -net.READY_STATE_UNINITIALIZED= 0; -net.READY_STATE_LOADING = 1; -net.READY_STATE_LOADED = 2; -net.READY_STATE_INTERACTIVE = 3; -net.READY_STATE_COMPLETE = 4; - -net.ContentLoader = function( component, url, method, requestParams ) { - this.component = component; - this.url = url; - this.requestParams = requestParams; - this.method = method; -} - -net.ContentLoader.prototype = { - - getTransport: function() { - var transport; - if ( window.XMLHttpRequest ) - transport = new XMLHttpRequest(); - else if ( window.ActiveXObject ) { - try { - transport = new ActiveXObject('Msxml2.XMLHTTP'); - } - catch(err) { - transport = new ActiveXObject('Microsoft.XMLHTTP'); - } - } - return transport; - }, - - sendRequest: function() { - - //if ( window.netscape && window.netscape.security.PrivilegeManager.enablePrivilege) - // netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead'); - - var requestParams = [] - for ( var i = 0 ; i < arguments.length ; i++ ) - requestParams.push(arguments[i]); - - var oThis = this; - var request = this.getTransport(); - request.open( this.method, this.url, true ); - request.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded'); - request.onreadystatechange = function() { oThis.handleAjaxResponse(request) }; - request.send( this.queryString(requestParams) ); - }, - - queryString: function(args) { - - var requestParams = []; - for ( var i = 0 ; i < this.requestParams.length ; i++ ) - requestParams.push(this.requestParams[i]); - for ( var j = 0 ; j < args.length ; j++ ) - requestParams.push(args[j]); - - var queryString = ""; - if ( requestParams && requestParams.length > 0 ) { - for ( var i = 0 ; i < requestParams.length ; i++ ) - queryString += requestParams[i] + '&'; - queryString = queryString.substring(0, queryString.length-1); - } - return queryString; - }, - - handleAjaxResponse: function(request) { - if ( request.readyState == net.READY_STATE_COMPLETE ) { - if ( this.isSuccess(request) ) - this.component.ajaxUpdate(request); - else - this.component.handleError(request); - } - }, - - isSuccess: function(request) { - return request.status == 0 - || (request.status >= 200 && request.status < 300); - } - -}; - - -//-------------------- mTextSuggest.js - -TextSuggest = Class.create(); - -TextSuggest.prototype = { - - initialize: function(anId, url, options) { - this.id = anId; - var browser = navigator.userAgent.toLowerCase(); - this.isIE = browser.indexOf("msie") != -1; - this.isOpera = browser.indexOf("opera")!= -1; - this.textInput = $(this.id); - this.suggestions = []; - this.setOptions(options); - this.initAjax(url); - - this.injectSuggestBehavior(); - }, - - initAjax: function(url) { - ajaxEngine.registerRequest( this.id + '_request', url ); - ajaxEngine.registerAjaxObject( this.id + '_updater', this ); - }, - - setOptions: function(options) { - this.options = { - suggestDivClassName: 'suggest', - suggestionClassName: 'suggestion', - matchClassName : 'match', - matchTextWidth : true, - selectionColor : '#b1c09c', - matchAnywhere : false, - ignoreCase : false, - count : 10 - }.extend(options || {}); - }, - - injectSuggestBehavior: function() { - - if ( this.isIE ) - this.textInput.autocomplete = "off"; - - var keyEventHandler = new TextSuggestKeyHandler(this); - new Insertion.After( this.textInput, - '<input type="text" id="'+this.id+'_preventtsubmit'+'" style="display:none"/>' ); - new Insertion.After( this.textInput, - '<input type="hidden" name="'+this.id+'_hidden'+'" id="'+this.id+'_hidden'+'"/>' ); - - this.createSuggestionsDiv(); - }, - - handleTextInput: function() { - var previousRequest = this.lastRequestString; - this.lastRequestString = this.textInput.value; - if ( this.lastRequestString == "" ) - this.hideSuggestions(); - else if ( this.lastRequestString != previousRequest ) { - this.sendRequestForSuggestions(); - } - }, - - moveSelectionUp: function() { - if ( this.selectedIndex > 0 ) { - this.updateSelection(this.selectedIndex - 1); - } - }, - - moveSelectionDown: function() { - if ( this.selectedIndex < (this.suggestions.length - 1) ) { - this.updateSelection(this.selectedIndex + 1); - } - }, - - updateSelection: function(n) { - var span = $( this.id + "_" + this.selectedIndex ); - if ( span ){ - span.style.backgroundColor = ""; - } - this.selectedIndex = n; - var span = $( this.id + "_" + this.selectedIndex ); - if ( span ){ - span.style.backgroundColor = this.options.selectionColor; - } - }, - - sendRequestForSuggestions: function() { - - if ( this.handlingRequest ) { - this.pendingRequest = true; - return; - } - - this.handlingRequest = true; - this.callRicoAjaxEngine(); - }, - - callRicoAjaxEngine: function() { - var callParms = []; - callParms.push( this.id + '_request'); - callParms.push( 'ajax_xml=1' ); - callParms.push( 'id=' + this.id); - callParms.push( 'count=' + this.options.count); - callParms.push( 'find=' + this.lastRequestString); - callParms.push( 'match_anywhere=' + this.options.matchAnywhere); - callParms.push( 'ignore_case=' + this.options.ignoreCase); - - var additionalParms = this.options.requestParameters || []; - for( var i=0 ; i < additionalParms.length ; i++ ) - callParms.push(additionalParms[i]); - - ajaxEngine.sendRequest.apply( ajaxEngine, callParms ); - }, - - ajaxUpdate: function( ajaxResponse ) { - - this.createSuggestions( ajaxResponse ); - - if ( this.suggestions.length == 0 ) { - this.hideSuggestions(); - $( this.id + "_hidden" ).value = ""; - } - else { - this.updateSuggestionsDiv(); - this.showSuggestions(); - this.updateSelection(0); - } - - this.handlingRequest = false; - - if ( this.pendingRequest ) { - this.pendingRequest = false; - this.lastRequestString = this.textInput.value; - this.sendRequestForSuggestions(); - } - }, - - createSuggestions: function(ajaxResponse) { - this.suggestions = []; - var entries = ajaxResponse.getElementsByTagName('entry'); - for ( var i = 0 ; i < entries.length ; i++ ) { - var strText = this.getElementContent(entries[i].getElementsByTagName('text')[0]); - var strValue = this.getElementContent(entries[i].getElementsByTagName('value')[0]); - this.suggestions.push( { text: strText, value: strValue } ); - } - }, - - setInputFromSelection: function() { - var hiddenInput = $( this.id + "_hidden" ); - var suggestion = this.suggestions[ this.selectedIndex ]; - - this.textInput.value = suggestion.text; - hiddenInput.value = suggestion.value; - this.hideSuggestions(); - }, - - showSuggestions: function() { - var divStyle = this.suggestionsDiv.style; - if ( divStyle.display == '' ) - return; - this.positionSuggestionsDiv(); - divStyle.display = ''; - }, - - positionSuggestionsDiv: function() { - var textPos = RicoUtil.toDocumentPosition(this.textInput); - var divStyle = this.suggestionsDiv.style; - divStyle.top = (textPos.y + this.textInput.offsetHeight) + "px"; - divStyle.left = textPos.x + "px"; - - if ( this.options.matchTextWidth ) - divStyle.width = (this.textInput.offsetWidth- this.padding()) + "px"; - }, - - padding: function() { - try{ - var styleFunc = RicoUtil.getElementsComputedStyle; - var lPad = styleFunc( this.suggestionsDiv, "paddingLeft", "padding-left" ); - var rPad = styleFunc( this.suggestionsDiv, "paddingRight", "padding-right" ); - var lBorder = styleFunc( this.suggestionsDiv, "borderLeftWidth", "border-left-width" ); - var rBorder = styleFunc( this.suggestionsDiv, "borderRightWidth", "border-right-width" ); - - lPad = isNaN(lPad) ? 0 : lPad; - rPad = isNaN(rPad) ? 0 : rPad; - lBorder = isNaN(lBorder) ? 0 : lBorder; - rBorder = isNaN(rBorder) ? 0 : rBorder; - - return parseInt(lPad) + parseInt(rPad) + parseInt(lBorder) + parseInt(rBorder); - }catch (e){ - return 0; - } - }, - - hideSuggestions: function() { - this.suggestionsDiv.style.display = 'none'; - }, - - createSuggestionsDiv: function() { - this.suggestionsDiv = document.createElement("div"); - this.suggestionsDiv.className = this.options.suggestDivClassName; - - var divStyle = this.suggestionsDiv.style; - divStyle.position = 'absolute'; - divStyle.zIndex = 101; - divStyle.display = "none"; - - this.textInput.parentNode.appendChild(this.suggestionsDiv); - }, - - updateSuggestionsDiv: function() { - this.suggestionsDiv.innerHTML = ""; - var suggestLines = this.createSuggestionSpans(); - for ( var i = 0 ; i < suggestLines.length ; i++ ) - this.suggestionsDiv.appendChild(suggestLines[i]); - }, - - createSuggestionSpans: function() { - var regExpFlags = ""; - if ( this.options.ignoreCase ) - regExpFlags = 'i'; - var startRegExp = "^"; - if ( this.options.matchAnywhere ) - startRegExp = ''; - - var regExp = new RegExp( startRegExp + this.lastRequestString, regExpFlags ); - - var suggestionSpans = []; - for ( var i = 0 ; i < this.suggestions.length ; i++ ) - suggestionSpans.push( this.createSuggestionSpan( i, regExp ) ) - - return suggestionSpans; - }, - - createSuggestionSpan: function( n, regExp ) { - var suggestion = this.suggestions[n]; - - var suggestionSpan = document.createElement("span"); - suggestionSpan.className = this.options.suggestionClassName; - suggestionSpan.style.width = '100%'; - suggestionSpan.style.display = 'block'; - suggestionSpan.id = this.id + "_" + n; - suggestionSpan.onmouseover = this.mouseoverHandler.bindAsEventListener(this); - suggestionSpan.onclick = this.itemClickHandler.bindAsEventListener(this); - - var textValues = this.splitTextValues( suggestion.text, - this.lastRequestString.length, - regExp ); - - var textMatchSpan = document.createElement("span"); - textMatchSpan.id = this.id + "_match_" + n; - textMatchSpan.className = this.options.matchClassName; - textMatchSpan.onmouseover = this.mouseoverHandler.bindAsEventListener(this); - textMatchSpan.onclick = this.itemClickHandler.bindAsEventListener(this); - - textMatchSpan.appendChild( document.createTextNode(textValues.mid) ); - - suggestionSpan.appendChild( document.createTextNode( textValues.start ) ); - suggestionSpan.appendChild( textMatchSpan ); - suggestionSpan.appendChild( document.createTextNode( textValues.end ) ); - - return suggestionSpan; - }, - - mouseoverHandler: function(e) { - var src = e.srcElement ? e.srcElement : e.target; - var index = parseInt(src.id.substring(src.id.lastIndexOf('_')+1)); - this.updateSelection(index); - }, - - itemClickHandler: function(e) { - this.mouseoverHandler(e); - this.hideSuggestions(); - this.textInput.focus(); - }, - - splitTextValues: function( text, len, regExp ) { - var startPos = text.search(regExp); - var matchText = text.substring( startPos, startPos + len ); - var startText = startPos == 0 ? "" : text.substring(0, startPos); - var endText = text.substring( startPos + len ); - return { start: startText, mid: matchText, end: endText }; - }, - - getElementContent: function(element) { - return element.firstChild.data; - } -} - -TextSuggestKeyHandler = Class.create(); - -TextSuggestKeyHandler.prototype = { - - initialize: function( textSuggest ) { - this.textSuggest = textSuggest; - this.input = this.textSuggest.textInput; - this.addKeyHandling(); - }, - - addKeyHandling: function() { - this.input.onkeyup = this.keyupHandler.bindAsEventListener(this); - this.input.onkeydown = this.keydownHandler.bindAsEventListener(this); - this.input.onblur = this.onblurHandler.bindAsEventListener(this); - if ( this.isOpera ) - this.input.onkeypress = this.keyupHandler.bindAsEventListener(this); - }, - - keydownHandler: function(e) { - var upArrow = 38; - var downArrow = 40; - - if ( e.keyCode == upArrow ) { - this.textSuggest.moveSelectionUp(); - setTimeout( this.moveCaretToEnd.bind(this), 1 ); - } - else if ( e.keyCode == downArrow ){ - this.textSuggest.moveSelectionDown(); - } - }, - - keyupHandler: function(e) { - if ( this.input.length == 0 && !this.isOpera ) - this.textSuggest.hideSuggestions(); - - if ( !this.handledSpecialKeys(e) ) - this.textSuggest.handleTextInput(); - }, - - handledSpecialKeys: function(e) { - var enterKey = 13; - var upArrow = 38; - var downArrow = 40; - - if ( e.keyCode == upArrow || e.keyCode == downArrow ) { - return true; - } - else if ( e.keyCode == enterKey ) { - this.textSuggest.setInputFromSelection(); - return true; - } - - return false; - }, - - moveCaretToEnd: function() { - var pos = this.input.value.length; - if (this.input.setSelectionRange) { - this.input.setSelectionRange(pos,pos); - } - else if(this.input.createTextRange){ - var m = this.input.createTextRange(); - m.moveStart('character',pos); - m.collapse(); - m.select(); - } - }, - - onblurHandler: function(e) { - if ( this.textSuggest.suggestionsDiv.style.display == '' ) - this.textSuggest.setInputFromSelection(); - this.textSuggest.hideSuggestions(); - } - -}; diff --git a/javascript/libs/suggest/suggest_lib.php b/javascript/libs/suggest/suggest_lib.php deleted file mode 100644 index 6d5272c..0000000 --- a/javascript/libs/suggest/suggest_lib.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -class SuggestLib { - - function exportXml( $pHash, $pFieldName ) { - $ret = '<?xml version="1.0" ?><ajax-response><response type="object" id="'.$pFieldName.'_updater"><matches>'; - foreach( $pHash as $value=>$name ) { - $ret .= "<entry><text>".htmlentities( $name )."</text><value>".htmlentities( $value )."</value></entry>"; - } - $ret .= "</matches></response></ajax-response>"; - return $ret; - } -} - -?> |
