Index: trunk/extensions/SemanticResultFormats/jqPlot/jqplot.barRenderer.min.js |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +/** |
| 3 | + * Copyright (c) 2009 Chris Leonello |
| 4 | + * jqPlot is currently available for use in all personal or commercial projects |
| 5 | + * under both the MIT and GPL version 2.0 licenses. This means that you can |
| 6 | + * choose the license that best suits your project and use it accordingly. |
| 7 | + * |
| 8 | + * Although not required, the author would appreciate an email letting him |
| 9 | + * know of any substantial use of jqPlot. You can reach the author at: |
| 10 | + * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . |
| 11 | + * |
| 12 | + * If you are feeling kind and generous, consider supporting the project by |
| 13 | + * making a donation at: http://www.jqplot.com/donate.php . |
| 14 | + */ |
| 15 | +(function(b){b.jqplot.BarRenderer=function(){b.jqplot.LineRenderer.call(this)};b.jqplot.BarRenderer.prototype=new b.jqplot.LineRenderer();b.jqplot.BarRenderer.prototype.constructor=b.jqplot.BarRenderer;b.jqplot.BarRenderer.prototype.init=function(d){this.barPadding=8;this.barMargin=10;this.barDirection="vertical";this.barWidth=null;this.shadowOffset=2;this.shadowDepth=5;this.shadowAlpha=0.08;this.waterfall=false;this.varyBarColor=false;b.extend(true,this,d);this.fill=true;if(this.waterfall){this.fillToZero=false;this.disableStack=true}if(this.barDirection=="vertical"){this._primaryAxis="_xaxis";this._stackAxis="y";this.fillAxis="y"}else{this._primaryAxis="_yaxis";this._stackAxis="x";this.fillAxis="x"}var e={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,strokeStyle:this.color,fillStyle:this.color,closePath:this.fill};this.renderer.shapeRenderer.init(e);var c={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,closePath:this.fill};this.renderer.shadowRenderer.init(c)};function a(h,g,f,c){if(this.rendererOptions.barDirection=="horizontal"){this._stackAxis="x";this._primaryAxis="_yaxis"}if(this.rendererOptions.waterfall==true){this._data=b.extend(true,[],this.data);var e=0;var j=(!this.rendererOptions.barDirection||this.rendererOptions.barDirection=="vertical")?1:0;for(var d=0;d<this.data.length;d++){e+=this.data[d][j];if(d>0){this.data[d][j]+=this.data[d-1][j]}}this.data[this.data.length]=(j==1)?[this.data.length+1,e]:[e,this.data.length+1];this._data[this._data.length]=(j==1)?[this._data.length+1,e]:[e,this._data.length+1]}}b.jqplot.preSeriesInitHooks.push(a);b.jqplot.BarRenderer.prototype.calcSeriesNumbers=function(){var g=0;var h=0;var f=this[this._primaryAxis];var e,d,j;for(var c=0;c<f._series.length;c++){d=f._series[c];if(d===this){j=c}if(d.renderer.constructor==b.jqplot.BarRenderer){g+=d.data.length;h+=1}}return[g,h,j]};b.jqplot.BarRenderer.prototype.setBarWidth=function(){var f;var c=0;var d=0;var h=this[this._primaryAxis];var m,g,k;var l=this.renderer.calcSeriesNumbers.call(this);c=l[0];d=l[1];var j=h.numberTicks;var e=(j-1)/2;if(h.name=="xaxis"||h.name=="x2axis"){if(this._stack){this.barWidth=(h._offsets.max-h._offsets.min)/c*d-this.barMargin}else{this.barWidth=((h._offsets.max-h._offsets.min)/e-this.barPadding*(d-1)-this.barMargin*2)/d}}else{if(this._stack){this.barWidth=(h._offsets.min-h._offsets.max)/c*d-this.barMargin}else{this.barWidth=((h._offsets.min-h._offsets.max)/e-this.barPadding*(d-1)-this.barMargin*2)/d}}return[c,d]};b.jqplot.BarRenderer.prototype.draw=function(s,x,e){var u;var o=(e!=undefined)?e:{};var k=(o.shadow!=undefined)?o.shadow:this.shadow;var A=(o.showLine!=undefined)?o.showLine:this.showLine;var t=(o.fill!=undefined)?o.fill:this.fill;var d=this.xaxis;var v=this.yaxis;var n=this._xaxis.series_u2p;var w=this._yaxis.series_u2p;var r,q,m,l,g;if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var z=this.renderer.calcSeriesNumbers.call(this);m=z[0];l=z[1];g=z[2];if(this._stack){this._barNudge=0}else{this._barNudge=(-Math.abs(l/2-0.5)+g)*(this.barWidth+this.barPadding)}if(A){var j=new b.jqplot.ColorGenerator(this.negativeSeriesColors);var p=new b.jqplot.ColorGenerator(this.seriesColors);var y=j.get(this.index);if(!this.useNegativeColors){y=o.fillStyle}var h=o.fillStyle;if(this.barDirection=="vertical"){for(var u=0;u<x.length;u++){points=[];var f=x[u][0]+this._barNudge;var c;if(this._stack&&this._prevGridData.length){c=this._prevGridData[u][1]}else{if(this.fillToZero){c=this._yaxis.series_u2p(0)}else{if(this.waterfall&&u>0&&u<this.gridData.length-1){c=this.gridData[u-1][1]}else{c=s.canvas.height}}}if((this.fillToZero&&this._plotData[u][1]<0)||(this.waterfall&&this._data[u][1]<0)){if(this.varyBarColor){if(this.useNegativeColors){o.fillStyle=j.next()}else{o.fillStyle=p.next()}}else{o.fillStyle=y}}else{if(this.varyBarColor){o.fillStyle=p.next()}else{o.fillStyle=h}}points.push([f-this.barWidth/2,c]);points.push([f-this.barWidth/2,x[u][1]]);points.push([f+this.barWidth/2,x[u][1]]);points.push([f+this.barWidth/2,c]);if(k&&!this._stack){this.renderer.shadowRenderer.draw(s,points,o)}this.renderer.shapeRenderer.draw(s,points,o)}}else{if(this.barDirection=="horizontal"){for(var u=0;u<x.length;u++){points=[];var f=x[u][1]-this._barNudge;var B;if(this._stack&&this._prevGridData.length){B=this._prevGridData[u][0]}else{if(this.fillToZero){B=this._xaxis.series_u2p(0)}else{if(this.waterfall&&u>0&&u<this.gridData.length-1){B=this.gridData[u-1][1]}else{B=0}}}if((this.fillToZero&&this._plotData[u][1]<0)||(this.waterfall&&this._data[u][1]<0)){if(this.varyBarColor){if(this.useNegativeColors){o.fillStyle=j.next()}else{o.fillStyle=p.next()}}}else{if(this.varyBarColor){o.fillStyle=p.next()}else{o.fillStyle=h}}points.push([B,f+this.barWidth/2]);points.push([x[u][0],f+this.barWidth/2]);points.push([x[u][0],f-this.barWidth/2]);points.push([B,f-this.barWidth/2]);if(k&&!this._stack){this.renderer.shadowRenderer.draw(s,points,o)}this.renderer.shapeRenderer.draw(s,points,o)}}}}};b.jqplot.BarRenderer.prototype.drawShadow=function(p,u,e){var r;var m=(e!=undefined)?e:{};var h=(m.shadow!=undefined)?m.shadow:this.shadow;var w=(m.showLine!=undefined)?m.showLine:this.showLine;var q=(m.fill!=undefined)?m.fill:this.fill;var d=this.xaxis;var s=this.yaxis;var l=this._xaxis.series_u2p;var t=this._yaxis.series_u2p;var o,n,k,j,g;if(this._stack&&this.shadow){if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var v=this.renderer.calcSeriesNumbers.call(this);k=v[0];j=v[1];g=v[2];if(this._stack){this._barNudge=0}else{this._barNudge=(-Math.abs(j/2-0.5)+g)*(this.barWidth+this.barPadding)}if(w){if(this.barDirection=="vertical"){for(var r=0;r<u.length;r++){points=[];var f=u[r][0]+this._barNudge;var c;if(this._stack&&this._prevGridData.length){c=this._prevGridData[r][1]}else{if(this.fillToZero){c=this._yaxis.series_u2p(0)}else{c=p.canvas.height}}points.push([f-this.barWidth/2,c]);points.push([f-this.barWidth/2,u[r][1]]);points.push([f+this.barWidth/2,u[r][1]]);points.push([f+this.barWidth/2,c]);this.renderer.shadowRenderer.draw(p,points,m)}}else{if(this.barDirection=="horizontal"){for(var r=0;r<u.length;r++){points=[];var f=u[r][1]-this._barNudge;var x;if(this._stack&&this._prevGridData.length){x=this._prevGridData[r][0]}else{x=0}points.push([x,f+this.barWidth/2]);points.push([u[r][0],f+this.barWidth/2]);points.push([u[r][0],f-this.barWidth/2]);points.push([x,f-this.barWidth/2]);this.renderer.shadowRenderer.draw(p,points,m)}}}}}}})(jQuery); |
\ No newline at end of file |
Index: trunk/extensions/SemanticResultFormats/jqPlot/jquery.jqplot.min.js |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +/** |
| 3 | + * Copyright (c) 2009 Chris Leonello |
| 4 | + * jqPlot is currently available for use in all personal or commercial projects |
| 5 | + * under both the MIT and GPL version 2.0 licenses. This means that you can |
| 6 | + * choose the license that best suits your project and use it accordingly. |
| 7 | + * |
| 8 | + * Although not required, the author would appreciate an email letting him |
| 9 | + * know of any substantial use of jqPlot. You can reach the author at: |
| 10 | + * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . |
| 11 | + * |
| 12 | + * If you are feeling kind and generous, consider supporting the project by |
| 13 | + * making a donation at: http://www.jqplot.com/donate.php . |
| 14 | + */ |
| 15 | +(function(h){var c;h.jqplot=function(A,y,w){var x,v;if(y==null){throw"No data specified"}if(y.constructor==Array&&y.length==0||y[0].constructor!=Array){throw"Improper Data Array"}if(w==null){if(y instanceof Array){x=y;v=null}else{if(y.constructor==Object){x=null;v=y}}}else{x=y;v=w}var z=new n();z.init(A,x,v);z.draw();return z};h.jqplot.debug=1;h.jqplot.config={debug:1,enablePlugins:true,defaultHeight:300,defaultWidth:400};h.jqplot.enablePlugins=h.jqplot.config.enablePlugins;h.jqplot.preInitHooks=[];h.jqplot.postInitHooks=[];h.jqplot.preParseOptionsHooks=[];h.jqplot.postParseOptionsHooks=[];h.jqplot.preDrawHooks=[];h.jqplot.postDrawHooks=[];h.jqplot.preDrawSeriesHooks=[];h.jqplot.postDrawSeriesHooks=[];h.jqplot.preDrawLegendHooks=[];h.jqplot.addLegendRowHooks=[];h.jqplot.preSeriesInitHooks=[];h.jqplot.postSeriesInitHooks=[];h.jqplot.preParseSeriesOptionsHooks=[];h.jqplot.postParseSeriesOptionsHooks=[];h.jqplot.eventListenerHooks=[];h.jqplot.preDrawSeriesShadowHooks=[];h.jqplot.postDrawSeriesShadowHooks=[];h.jqplot.ElemContainer=function(){this._elem;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}};h.jqplot.ElemContainer.prototype.getWidth=function(){if(this._elem){return this._elem.outerWidth(true)}else{return null}};h.jqplot.ElemContainer.prototype.getHeight=function(){if(this._elem){return this._elem.outerHeight(true)}else{return null}};h.jqplot.ElemContainer.prototype.getPosition=function(){if(this._elem){return this._elem.position()}else{return{top:null,left:null,bottom:null,right:null}}};h.jqplot.ElemContainer.prototype.getTop=function(){return this.getPosition().top};h.jqplot.ElemContainer.prototype.getLeft=function(){return this.getPosition().left};h.jqplot.ElemContainer.prototype.getBottom=function(){return this._elem.css("bottom")};h.jqplot.ElemContainer.prototype.getRight=function(){return this._elem.css("right")};function l(v){h.jqplot.ElemContainer.call(this);this.name=v;this._series=[];this.show=false;this.tickRenderer=h.jqplot.AxisTickRenderer;this.tickOptions={};this.labelRenderer=h.jqplot.AxisLabelRenderer;this.labelOptions={};this.label=null;this.showLabel=true;this.min=null;this.max=null;this.autoscale=false;this.pad=1.2;this.padMax=null;this.padMin=null;this.ticks=[];this.numberTicks;this.tickInterval;this.renderer=h.jqplot.LinearAxisRenderer;this.rendererOptions={};this.showTicks=true;this.showTickMarks=true;this.showMinorTicks=true;this.useSeriesColor=false;this.borderWidth=null;this.borderColor=null;this._dataBounds={min:null,max:null};this._offsets={min:null,max:null};this._ticks=[];this._label=null;this.syncTicks=null;this.tickSpacing=75;this._min=null;this._max=null;this._tickInterval=null;this._numberTicks=null;this.__ticks=null}l.prototype=new h.jqplot.ElemContainer();l.prototype.constructor=l;l.prototype.init=function(){this.renderer=new this.renderer();this.tickOptions.axis=this.name;if(this.label==null||this.label==""){this.showLabel=false}else{this.labelOptions.label=this.label}if(this.showLabel==false){this.labelOptions.show=false}if(this.pad==0){this.pad=1}if(this.padMax==0){this.padMax=1}if(this.padMin==0){this.padMin=1}if(this.padMax==null){this.padMax=(this.pad-1)/2+1}if(this.padMin==null){this.padMin=(this.pad-1)/2+1}this.pad=this.padMax+this.padMin-1;if(this.min!=null||this.max!=null){this.autoscale=false}if(this.syncTicks==null&&this.name.indexOf("y")>-1){this.syncTicks=true}else{if(this.syncTicks==null){this.syncTicks=false}}this.renderer.init.call(this,this.rendererOptions)};l.prototype.draw=function(v){return this.renderer.draw.call(this,v)};l.prototype.set=function(){this.renderer.set.call(this)};l.prototype.pack=function(w,v){if(this.show){this.renderer.pack.call(this,w,v)}if(this._min==null){this._min=this.min;this._max=this.max;this._tickInterval=this.tickInterval;this._numberTicks=this.numberTicks;this.__ticks=this._ticks}};l.prototype.reset=function(){this.renderer.reset.call(this)};l.prototype.resetScale=function(){this.min=null;this.max=null;this.numberTicks=null;this.tickInterval=null};function b(v){h.jqplot.ElemContainer.call(this);this.show=false;this.location="ne";this.xoffset=12;this.yoffset=12;this.border;this.background;this.textColor;this.fontFamily;this.fontSize;this.rowSpacing="0.5em";this.renderer=h.jqplot.TableLegendRenderer;this.rendererOptions={};this.preDraw=false;this.escapeHtml=false;this._series=[];h.extend(true,this,v)}b.prototype=new h.jqplot.ElemContainer();b.prototype.constructor=b;b.prototype.init=function(){this.renderer=new this.renderer();this.renderer.init.call(this,this.rendererOptions)};b.prototype.draw=function(w){for(var v=0;v<h.jqplot.preDrawLegendHooks.length;v++){h.jqplot.preDrawLegendHooks[v].call(this,w)}return this.renderer.draw.call(this,w)};b.prototype.pack=function(v){this.renderer.pack.call(this,v)};function k(v){h.jqplot.ElemContainer.call(this);this.text=v;this.show=true;this.fontFamily;this.fontSize;this.textAlign;this.textColor;this.renderer=h.jqplot.DivTitleRenderer;this.rendererOptions={}}k.prototype=new h.jqplot.ElemContainer();k.prototype.constructor=k;k.prototype.init=function(){this.renderer=new this.renderer();this.renderer.init.call(this,this.rendererOptions)};k.prototype.draw=function(v){return this.renderer.draw.call(this,v)};k.prototype.pack=function(){this.renderer.pack.call(this)};function o(){h.jqplot.ElemContainer.call(this);this.show=true;this.xaxis="xaxis";this._xaxis;this.yaxis="yaxis";this._yaxis;this.gridBorderWidth=2;this.renderer=h.jqplot.LineRenderer;this.rendererOptions={};this.data=[];this.gridData=[];this.label="";this.showLabel=true;this.color;this.lineWidth=2.5;this.shadow=true;this.shadowAngle=45;this.shadowOffset=1.25;this.shadowDepth=3;this.shadowAlpha="0.1";this.breakOnNull=false;this.markerRenderer=h.jqplot.MarkerRenderer;this.markerOptions={};this.showLine=true;this.showMarker=true;this.index;this.fill=false;this.fillColor;this.fillAlpha;this.fillAndStroke=false;this.disableStack=false;this._stack=false;this.neighborThreshold=4;this.fillToZero=false;this.fillAxis="y";this.useNegativeColors=true;this._stackData=[];this._plotData=[];this._plotValues={x:[],y:[]};this._intervals={x:{},y:{}};this._prevPlotData=[];this._prevGridData=[];this._stackAxis="y";this._primaryAxis="_xaxis";this.canvas=new h.jqplot.GenericCanvas();this.shadowCanvas=new h.jqplot.GenericCanvas();this.plugins={};this._sumy=0;this._sumx=0}o.prototype=new h.jqplot.ElemContainer();o.prototype.constructor=o;o.prototype.init=function(w,B,y){this.index=w;this.gridBorderWidth=B;var A=this.data;for(var x=0;x<A.length;x++){if(!this.breakOnNull){if(A[x]==null||A[x][0]==null||A[x][1]==null){A.splice(x,1);continue}}else{if(A[x]==null||A[x][0]==null||A[x][1]==null){var z}}}if(!this.fillColor){this.fillColor=this.color}if(this.fillAlpha){var v=h.jqplot.normalize2rgb(this.fillColor);var v=h.jqplot.getColorComponents(v);this.fillColor="rgba("+v[0]+","+v[1]+","+v[2]+","+this.fillAlpha+")"}this.renderer=new this.renderer();this.renderer.init.call(this,this.rendererOptions,y);this.markerRenderer=new this.markerRenderer();if(!this.markerOptions.color){this.markerOptions.color=this.color}if(this.markerOptions.show==null){this.markerOptions.show=this.showMarker}this.markerRenderer.init(this.markerOptions)};o.prototype.draw=function(B,y,A){var w=(y==c)?{}:y;B=(B==c)?this.canvas._ctx:B;for(var v=0;v<h.jqplot.preDrawSeriesHooks.length;v++){h.jqplot.preDrawSeriesHooks[v].call(this,B,w)}if(this.show){this.renderer.setGridData.call(this,A);if(!w.preventJqPlotSeriesDrawTrigger){h(B.canvas).trigger("jqplotSeriesDraw",[this.data,this.gridData])}var z=[];if(w.data){z=w.data}else{if(!this._stack){z=this.data}else{z=this._plotData}}var x=w.gridData||this.renderer.makeGridData.call(this,z,A);this.renderer.draw.call(this,B,x,w)}for(var v=0;v<h.jqplot.postDrawSeriesHooks.length;v++){h.jqplot.postDrawSeriesHooks[v].call(this,B,w)}};o.prototype.drawShadow=function(B,y,A){var w=(y==c)?{}:y;B=(B==c)?this.shadowCanvas._ctx:B;for(var v=0;v<h.jqplot.preDrawSeriesShadowHooks.length;v++){h.jqplot.preDrawSeriesShadowHooks[v].call(this,B,w)}if(this.shadow){this.renderer.setGridData.call(this,A);var z=[];if(w.data){z=w.data}else{if(!this._stack){z=this.data}else{z=this._plotData}}var x=w.gridData||this.renderer.makeGridData.call(this,z,A);this.renderer.drawShadow.call(this,B,x,w)}for(var v=0;v<h.jqplot.postDrawSeriesShadowHooks.length;v++){h.jqplot.postDrawSeriesShadowHooks[v].call(this,B,w)}};function g(){h.jqplot.ElemContainer.call(this);this.drawGridlines=true;this.gridLineColor="#cccccc";this.gridLineWidth=1;this.background="#fffdf6";this.borderColor="#999999";this.borderWidth=2;this.shadow=true;this.shadowAngle=45;this.shadowOffset=1.5;this.shadowWidth=3;this.shadowDepth=3;this.shadowAlpha="0.07";this._left;this._top;this._right;this._bottom;this._width;this._height;this._axes=[];this.renderer=h.jqplot.CanvasGridRenderer;this.rendererOptions={};this._offsets={top:null,bottom:null,left:null,right:null}}g.prototype=new h.jqplot.ElemContainer();g.prototype.constructor=g;g.prototype.init=function(){this.renderer=new this.renderer();this.renderer.init.call(this,this.rendererOptions)};g.prototype.createElement=function(v){this._offsets=v;return this.renderer.createElement.call(this)};g.prototype.draw=function(){this.renderer.draw.call(this)};h.jqplot.GenericCanvas=function(){h.jqplot.ElemContainer.call(this);this._ctx};h.jqplot.GenericCanvas.prototype=new h.jqplot.ElemContainer();h.jqplot.GenericCanvas.prototype.constructor=h.jqplot.GenericCanvas;h.jqplot.GenericCanvas.prototype.createElement=function(z,x,w){this._offsets=z;var v="jqplot";if(x!=c){v=x}var y=document.createElement("canvas");if(w!=c){this._plotDimensions=w}y.width=this._plotDimensions.width-this._offsets.left-this._offsets.right;y.height=this._plotDimensions.height-this._offsets.top-this._offsets.bottom;this._elem=h(y);this._elem.addClass(v);this._elem.css({position:"absolute",left:this._offsets.left,top:this._offsets.top});if(h.browser.msie){window.G_vmlCanvasManager.init_(document)}if(h.browser.msie){y=window.G_vmlCanvasManager.initElement(y)}return this._elem};h.jqplot.GenericCanvas.prototype.setContext=function(){this._ctx=this._elem.get(0).getContext("2d");return this._ctx};function n(){this.data=[];this.targetId=null;this.target=null;this.defaults={axesDefaults:{},axes:{xaxis:{},yaxis:{},x2axis:{},y2axis:{},y3axis:{},y4axis:{},y5axis:{},y6axis:{},y7axis:{},y8axis:{},y9axis:{}},seriesDefaults:{},gridPadding:{top:10,right:10,bottom:23,left:10},series:[]};this.series=[];this.axes={xaxis:new l("xaxis"),yaxis:new l("yaxis"),x2axis:new l("x2axis"),y2axis:new l("y2axis"),y3axis:new l("y3axis"),y4axis:new l("y4axis"),y5axis:new l("y5axis"),y6axis:new l("y6axis"),y7axis:new l("y7axis"),y8axis:new l("y8axis"),y9axis:new l("y9axis")};this.grid=new g();this.legend=new b();this.baseCanvas=new h.jqplot.GenericCanvas();this.eventCanvas=new h.jqplot.GenericCanvas();this._width=null;this._height=null;this._plotDimensions={height:null,width:null};this._gridPadding={top:10,right:10,bottom:10,left:10};this.syncXTicks=true;this.syncYTicks=true;this.seriesColors=["#4bb2c5","#EAA228","#c5b47f","#579575","#839557","#958c12","#953579","#4b5de4","#d8b83f","#ff5800","#0085cc","#c747a3","#cddf54","#FBD178","#26B4E3","#bd70c7"];this.negativeSeriesColors=["#498991","#C08840","#9F9274","#546D61","#646C4A","#6F6621","#6E3F5F","#4F64B0","#A89050","#C45923","#187399","#945381","#959E5C","#C7AF7B","#478396","#907294"];this.sortData=true;var y=0;this.textColor;this.fontFamily;this.fontSize;this.title=new k();this.options={};this.stackSeries=false;this._stackData=[];this._plotData=[];this.plugins={};this._drawCount=0;this.drawIfHidden=false;this._sumy=0;this._sumx=0;this.colorGenerator=h.jqplot.ColorGenerator;this.init=function(G,F,C){for(var D=0;D<h.jqplot.preInitHooks.length;D++){h.jqplot.preInitHooks[D].call(this,G,F,C)}this.targetId="#"+G;this.target=h("#"+G);if(!this.target.get(0)){throw"No plot target specified"}if(this.target.css("position")=="static"){this.target.css("position","relative")}if(!this.target.hasClass("jqplot-target")){this.target.addClass("jqplot-target")}if(!this.target.height()){var E;if(C&&C.height){E=parseInt(C.height,10)}else{if(this.target.attr("data-height")){E=parseInt(this.target.attr("data-height"),10)}else{E=parseInt(h.jqplot.config.defaultHeight,10)}}this._height=E;this.target.css("height",E+"px")}else{this._height=this.target.height()}if(!this.target.width()){var z;if(C&&C.width){z=parseInt(C.width,10)}else{if(this.target.attr("data-width")){z=parseInt(this.target.attr("data-width"),10)}else{z=parseInt(h.jqplot.config.defaultWidth,10)}}this._width=z;this.target.css("width",z+"px")}else{this._width=this.target.width()}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;if(this._height<=0||this._width<=0||!this._height||!this._width){throw"Canvas dimension not set"}this.data=F;this.parseOptions(C);if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;for(var D=0;D<this.series.length;D++){this.series[D].shadowCanvas._plotDimensions=this._plotDimensions;this.series[D].canvas._plotDimensions=this._plotDimensions;for(var B=0;B<h.jqplot.preSeriesInitHooks.length;B++){h.jqplot.preSeriesInitHooks[B].call(this.series[D],G,F,this.options.seriesDefaults,this.options.series[D])}this.populatePlotData(this.series[D],D);this.series[D]._plotDimensions=this._plotDimensions;this.series[D].init(D,this.grid.borderWidth,this);for(var B=0;B<h.jqplot.postSeriesInitHooks.length;B++){h.jqplot.postSeriesInitHooks[B].call(this.series[D],G,F,this.options.seriesDefaults,this.options.series[D])}this._sumy+=this.series[D]._sumy;this._sumx+=this.series[D]._sumx}for(var A in this.axes){this.axes[A]._plotDimensions=this._plotDimensions;this.axes[A].init()}if(this.sortData){v(this.series)}this.grid.init();this.grid._axes=this.axes;this.legend._series=this.series;for(var D=0;D<h.jqplot.postInitHooks.length;D++){h.jqplot.postInitHooks[D].call(this,G,F,C)}};this.resetAxesScale=function(C){var B=(C!=c)?C:this.axes;if(B===true){B=this.axes}if(B.constructor===Array){for(var A=0;A<B.length;A++){this.axes[B[A]].resetScale()}}else{if(B.constructor===Object){for(var z in B){this.axes[z].resetScale()}}}};this.reInitialize=function(){if(!this.target.height()){var D;if(options&&options.height){D=parseInt(options.height,10)}else{if(this.target.attr("data-height")){D=parseInt(this.target.attr("data-height"),10)}else{D=parseInt(h.jqplot.config.defaultHeight,10)}}this._height=D;this.target.css("height",D+"px")}else{this._height=this.target.height()}if(!this.target.width()){var z;if(options&&options.width){z=parseInt(options.width,10)}else{if(this.target.attr("data-width")){z=parseInt(this.target.attr("data-width"),10)}else{z=parseInt(h.jqplot.config.defaultWidth,10)}}this._width=z;this.target.css("width",z+"px")}else{this._width=this.target.width()}if(this._height<=0||this._width<=0||!this._height||!this._width){throw"Target dimension not set"}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;for(var E in this.axes){var C=this.axes[E];C._plotWidth=this._width;C._plotHeight=this._height}this.title._plotWidth=this._width;if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this._sumy=0;this._sumx=0;for(var B=0;B<this.series.length;B++){this.populatePlotData(this.series[B],B);this.series[B]._plotDimensions=this._plotDimensions;this.series[B].canvas._plotDimensions=this._plotDimensions;this._sumy+=this.series[B]._sumy;this._sumx+=this.series[B]._sumx}for(var A in this.axes){this.axes[A]._plotDimensions=this._plotDimensions;this.axes[A]._ticks=[];this.axes[A].renderer.init.call(this.axes[A],{})}if(this.sortData){v(this.series)}this.grid._axes=this.axes;this.legend._series=this.series};function v(D){var E,B;for(var C=0;C<D.length;C++){E=D[C].data;var z=true;if(D[C]._stackAxis=="x"){for(var A=0;A<E.length;A++){if(typeof(E[A][1])!="number"){z=false;break}}if(z){E.sort(function(G,F){return G[1]-F[1]})}}else{for(var A=0;A<E.length;A++){if(typeof(E[A][0])!="number"){z=false;break}}if(z){E.sort(function(G,F){return G[0]-F[0]})}}}}this.populatePlotData=function(D,E){this._plotData=[];this._stackData=[];D._stackData=[];D._plotData=[];var H={x:[],y:[]};if(this.stackSeries&&!D.disableStack){D._stack=true;var F=D._stackAxis=="x"?0:1;var G=F?0:1;var I=h.extend(true,[],D.data);var J=h.extend(true,[],D.data);for(var B=0;B<E;B++){var z=this.series[B].data;for(var A=0;A<z.length;A++){I[A][0]+=z[A][0];I[A][1]+=z[A][1];J[A][F]+=z[A][F]}}for(var C=0;C<J.length;C++){H.x.push(J[C][0]);H.y.push(J[C][1])}this._plotData.push(J);this._stackData.push(I);D._stackData=I;D._plotData=J;D._plotValues=H}else{for(var C=0;C<D.data.length;C++){H.x.push(D.data[C][0]);H.y.push(D.data[C][1])}this._stackData.push(D.data);this.series[E]._stackData=D.data;this._plotData.push(D.data);D._plotData=D.data;D._plotValues=H}if(E>0){D._prevPlotData=this.series[E-1]._plotData}D._sumy=0;D._sumx=0;for(C=D.data.length-1;C>-1;C--){D._sumy+=D.data[C][1];D._sumx+=D.data[C][0]}};this.getNextSeriesColor=(function(A){var z=0;var B=A.seriesColors;return function(){if(z<B.length){return B[z++]}else{z=0;return B[z++]}}})(this);this.parseOptions=function(H){for(var E=0;E<h.jqplot.preParseOptionsHooks.length;E++){h.jqplot.preParseOptionsHooks[E].call(this,H)}this.options=h.extend(true,{},this.defaults,H);this.stackSeries=this.options.stackSeries;if(this.options.seriesColors){this.seriesColors=this.options.seriesColors}var z=new this.colorGenerator(this.seriesColors);h.extend(true,this._gridPadding,this.options.gridPadding);this.sortData=(this.options.sortData!=null)?this.options.sortData:this.sortData;for(var A in this.axes){var C=this.axes[A];h.extend(true,C,this.options.axesDefaults,this.options.axes[A]);C._plotWidth=this._width;C._plotHeight=this._height}if(this.data.length==0){this.data=[];for(var E=0;E<this.options.series.length;E++){this.data.push(this.options.series.data)}}var F=function(L,J){var I=[];var K;J=J||"vertical";if(!(L[0] instanceof Array)){for(var K=0;K<L.length;K++){if(J=="vertical"){I.push([K+1,L[K]])}else{I.push([L[K],K+1])}}}else{h.extend(true,I,L)}return I};for(var E=0;E<this.data.length;E++){var G=new o();for(var D=0;D<h.jqplot.preParseSeriesOptionsHooks.length;D++){h.jqplot.preParseSeriesOptionsHooks[D].call(G,this.options.seriesDefaults,this.options.series[E])}h.extend(true,G,{seriesColors:this.seriesColors,negativeSeriesColors:this.negativeSeriesColors},this.options.seriesDefaults,this.options.series[E]);var B="vertical";if(G.renderer.constructor==h.jqplot.barRenderer&&G.rendererOptions&&G.rendererOptions.barDirection=="horizontal"){B="horizontal"}G.data=F(this.data[E],B);switch(G.xaxis){case"xaxis":G._xaxis=this.axes.xaxis;break;case"x2axis":G._xaxis=this.axes.x2axis;break;default:break}G._yaxis=this.axes[G.yaxis];G._xaxis._series.push(G);G._yaxis._series.push(G);if(G.show){G._xaxis.show=true;G._yaxis.show=true}if(!G.color&&G.show!=false){G.color=z.next()}if(!G.label){G.label="Series "+(E+1).toString()}this.series.push(G);for(var D=0;D<h.jqplot.postParseSeriesOptionsHooks.length;D++){h.jqplot.postParseSeriesOptionsHooks[D].call(this.series[E],this.options.seriesDefaults,this.options.series[E])}}h.extend(true,this.grid,this.options.grid);for(var A in this.axes){var C=this.axes[A];if(C.borderWidth==null){C.borderWidth=this.grid.borderWidth}if(C.borderColor==null){if(A!="xaxis"&&A!="x2axis"&&C.useSeriesColor===true&&C.show){C.borderColor=C._series[0].color}else{C.borderColor=this.grid.borderColor}}}if(typeof this.options.title=="string"){this.title.text=this.options.title}else{if(typeof this.options.title=="object"){h.extend(true,this.title,this.options.title)}}this.title._plotWidth=this._width;h.extend(true,this.legend,this.options.legend);for(var E=0;E<h.jqplot.postParseOptionsHooks.length;E++){h.jqplot.postParseOptionsHooks[E].call(this,H)}};this.replot=function(A){var B=(A!=c)?A:{};var z=(B.clear!=c)?B.clear:true;var C=(B.resetAxes!=c)?B.resetAxes:false;this.target.trigger("jqplotPreReplot");if(z){this.target.empty()}if(C){this.resetAxesScale(C)}this.reInitialize();this.draw();this.target.trigger("jqplotPostReplot")};this.redraw=function(z){z=(z!=null)?z:true;this.target.trigger("jqplotPreRedraw");if(z){this.target.empty()}for(var B in this.axes){this.axes[B]._ticks=[]}for(var A=0;A<this.series.length;A++){this.populatePlotData(this.series[A],A)}this._sumy=0;this._sumx=0;for(A=0;A<this.series.length;A++){this._sumy+=this.series[A]._sumy;this._sumx+=this.series[A]._sumx}this.draw();this.target.trigger("jqplotPostRedraw")};this.draw=function(){if(this.drawIfHidden||this.target.is(":visible")){this.target.trigger("jqplotPreDraw");var F;for(F=0;F<h.jqplot.preDrawHooks.length;F++){h.jqplot.preDrawHooks[F].call(this)}this.target.append(this.baseCanvas.createElement({left:0,right:0,top:0,bottom:0},"jqplot-base-canvas"));var E=this.baseCanvas.setContext();this.target.append(this.title.draw());this.title.pack({top:0,left:0});for(var B in this.axes){this.target.append(this.axes[B].draw(E));this.axes[B].set()}if(this.axes.yaxis.show){this._gridPadding.left=this.axes.yaxis.getWidth()}var C=["y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];var A=[0,0,0,0];var H=0;var D,z;for(D=8;D>0;D--){z=this.axes[C[D-1]];if(z.show){A[D-1]=H;H+=z.getWidth()}}if(H>this._gridPadding.right){this._gridPadding.right=H}if(this.title.show&&this.axes.x2axis.show){this._gridPadding.top=this.title.getHeight()+this.axes.x2axis.getHeight()}else{if(this.title.show){this._gridPadding.top=this.title.getHeight()}else{if(this.axes.x2axis.show){this._gridPadding.top=this.axes.x2axis.getHeight()}}}if(this.axes.xaxis.show){this._gridPadding.bottom=this.axes.xaxis.getHeight()}this.axes.xaxis.pack({position:"absolute",bottom:0,left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});this.axes.yaxis.pack({position:"absolute",top:0,left:0,height:this._height},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});this.axes.x2axis.pack({position:"absolute",top:this.title.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});for(F=8;F>0;F--){this.axes[C[F-1]].pack({position:"absolute",top:0,right:A[F-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}this.target.append(this.grid.createElement(this._gridPadding));this.grid.draw();for(F=0;F<this.series.length;F++){this.target.append(this.series[F].shadowCanvas.createElement(this._gridPadding,"jqplot-series-canvas jqplot-shadow"));this.series[F].shadowCanvas.setContext()}for(F=0;F<this.series.length;F++){this.target.append(this.series[F].canvas.createElement(this._gridPadding,"jqplot-series-canvas"));this.series[F].canvas.setContext()}this.target.append(this.eventCanvas.createElement(this._gridPadding,"jqplot-event-canvas"));var I=this.eventCanvas.setContext();I.fillStyle="rgba(0,0,0,0)";I.fillRect(0,0,I.canvas.width,I.canvas.height);this.bindCustomEvents();if(this.legend.preDraw){this.target.append(this.legend.draw());this.legend.pack(this._gridPadding);if(this.legend._elem){this.drawSeries({legendInfo:{location:this.legend.location,width:this.legend.getWidth(),height:this.legend.getHeight(),xoffset:this.legend.xoffset,yoffset:this.legend.yoffset}})}else{this.drawSeries()}}else{this.drawSeries();h(this.series[this.series.length-1].canvas._elem).after(this.legend.draw());this.legend.pack(this._gridPadding)}for(var F=0;F<h.jqplot.eventListenerHooks.length;F++){var G=h.jqplot.eventListenerHooks[F];this.eventCanvas._elem.bind(G[0],{plot:this},G[1])}for(var F=0;F<h.jqplot.postDrawHooks.length;F++){h.jqplot.postDrawHooks[F].call(this)}if(this.target.is(":visible")){this._drawCount+=1}this.target.trigger("jqplotPostDraw",[this])}};this.bindCustomEvents=function(){this.eventCanvas._elem.bind("click",{plot:this},this.onClick);this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("mousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("mouseup",{plot:this},this.onMouseUp);this.eventCanvas._elem.bind("mousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave)};function w(H){var G=H.data.plot;var C=G.eventCanvas._elem.offset();var F={x:H.pageX-C.left,y:H.pageY-C.top};var D={xaxis:null,yaxis:null,x2axis:null,y2axis:null,y3axis:null,y4axis:null,y5axis:null,y6axis:null,y7axis:null,y8axis:null,y9axis:null};var E=["xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];var z=G.axes;for(var A=11;A>0;A--){var B=E[A-1];if(z[B].show){D[B]=z[B].series_p2u(F[B.charAt(0)])}}return({offsets:C,gridPos:F,dataPos:D})}function x(F,J,I){var G=null;var K,D,B,H,C,A;var E;for(var D=0;D<F.series.length;D++){K=F.series[D];A=K.renderer;if(K.show){E=Math.abs(K.markerRenderer.size/2+K.neighborThreshold);for(var C=0;C<K.gridData.length;C++){p=K.gridData[C];if(A.constructor==h.jqplot.OHLCRenderer){if(A.candleStick){var z=K._yaxis.series_u2p;if(J>=p[0]-A._bodyWidth/2&&J<=p[0]+A._bodyWidth/2&&I>=z(K.data[C][2])&&I<=z(K.data[C][3])){G={seriesIndex:D,pointIndex:C,gridData:p,data:K.data[C]}}}else{if(!A.hlc){var z=K._yaxis.series_u2p;if(J>=p[0]-A._tickLength&&J<=p[0]+A._tickLength&&I>=z(K.data[C][2])&&I<=z(K.data[C][3])){G={seriesIndex:D,pointIndex:C,gridData:p,data:K.data[C]}}}else{var z=K._yaxis.series_u2p;if(J>=p[0]-A._tickLength&&J<=p[0]+A._tickLength&&I>=z(K.data[C][1])&&I<=z(K.data[C][2])){G={seriesIndex:D,pointIndex:C,gridData:p,data:K.data[C]}}}}}else{H=Math.sqrt((J-p[0])*(J-p[0])+(I-p[1])*(I-p[1]));if(H<=E&&(H<=B||B==null)){B=H;G={seriesIndex:D,pointIndex:C,gridData:p,data:K.data[C]}}}}}}return G}this.onClick=function(A){var z=w(A);var C=A.data.plot;var B=x(C,z.gridPos.x,z.gridPos.y);A.data.plot.eventCanvas._elem.trigger("jqplotClick",[z.gridPos,z.dataPos,B,C])};this.onDblClick=function(A){var z=w(A);var C=A.data.plot;var B=x(C,z.gridPos.x,z.gridPos.y);A.data.plot.eventCanvas._elem.trigger("jqplotDblClick",[z.gridPos,z.dataPos,B,C])};this.onMouseDown=function(A){var z=w(A);var C=A.data.plot;var B=x(C,z.gridPos.x,z.gridPos.y);A.data.plot.eventCanvas._elem.trigger("jqplotMouseDown",[z.gridPos,z.dataPos,B,C])};this.onMouseUp=function(A){var z=w(A);A.data.plot.eventCanvas._elem.trigger("jqplotMouseUp",[z.gridPos,z.dataPos,null,A.data.plot])};this.onMouseMove=function(A){var z=w(A);var C=A.data.plot;var B=x(C,z.gridPos.x,z.gridPos.y);A.data.plot.eventCanvas._elem.trigger("jqplotMouseMove",[z.gridPos,z.dataPos,B,C])};this.onMouseEnter=function(A){var z=w(A);var B=A.data.plot;A.data.plot.eventCanvas._elem.trigger("jqplotMouseEnter",[z.gridPos,z.dataPos,null,B])};this.onMouseLeave=function(A){var z=w(A);var B=A.data.plot;A.data.plot.eventCanvas._elem.trigger("jqplotMouseLeave",[z.gridPos,z.dataPos,null,B])};this.drawSeries=function(B,z){var D,C,A;if(z!=c){C=this.series[z];A=C.shadowCanvas._ctx;A.clearRect(0,0,A.canvas.width,A.canvas.height);C.drawShadow(A,B,this);A=C.canvas._ctx;A.clearRect(0,0,A.canvas.width,A.canvas.height);C.draw(A,B,this)}else{for(D=0;D<this.series.length;D++){C=this.series[D];A=C.shadowCanvas._ctx;A.clearRect(0,0,A.canvas.width,A.canvas.height);C.drawShadow(A,B,this);A=C.canvas._ctx;A.clearRect(0,0,A.canvas.width,A.canvas.height);C.draw(A,B,this)}}}}h.jqplot.ColorGenerator=function(w){var v=0;this.next=function(){if(v<w.length){return w[v++]}else{v=0;return w[v++]}};this.previous=function(){if(v>0){return w[v--]}else{v=w.length-1;return w[v]}};this.get=function(x){return w[x]};this.setColors=function(x){w=x};this.reset=function(){v=0}};h.jqplot.hex2rgb=function(x,v){x=x.replace("#","");if(x.length==3){x=x[0]+x[0]+x[1]+x[1]+x[2]+x[2]}var w;w="rgba("+parseInt(x.slice(0,2),16)+", "+parseInt(x.slice(2,4),16)+", "+parseInt(x.slice(4,6),16);if(v){w+=", "+v}w+=")";return w};h.jqplot.rgb2hex=function(z){var x=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var v=z.match(x);var y="#";for(i=1;i<4;i++){var w;if(v[i].search(/%/)!=-1){w=parseInt(255*v[i]/100,10).toString(16);if(w.length==1){w="0"+w}}else{w=parseInt(v[i],10).toString(16);if(w.length==1){w="0"+w}}y+=w}return y};h.jqplot.normalize2rgb=function(w,v){if(w.search(/^ *rgba?\(/)!=-1){return w}else{if(w.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return h.jqplot.hex2rgb(w,v)}else{throw"invalid color spec"}}};h.jqplot.getColorComponents=function(z){var y=h.jqplot.normalize2rgb(z);var x=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var v=y.match(x);var w=[];for(i=1;i<4;i++){if(v[i].search(/%/)!=-1){w[i-1]=parseInt(255*v[i]/100,10)}else{w[i-1]=parseInt(v[i],10)}}w[3]=parseFloat(v[4])?parseFloat(v[4]):1;return w};h.jqplot.log=function(){if(window.console&&h.jqplot.debug){if(arguments.length==1){console.log(arguments[0])}else{console.log(arguments)}}};var f=h.jqplot.log;h.jqplot.AxisLabelRenderer=function(v){h.jqplot.ElemContainer.call(this);this.axis;this.show=true;this.label="";this._elem;this.escapeHTML=false;h.extend(true,this,v)};h.jqplot.AxisLabelRenderer.prototype=new h.jqplot.ElemContainer();h.jqplot.AxisLabelRenderer.prototype.constructor=h.jqplot.AxisLabelRenderer;h.jqplot.AxisLabelRenderer.prototype.init=function(v){h.extend(true,this,v)};h.jqplot.AxisLabelRenderer.prototype.draw=function(){this._elem=h('<div style="position:absolute;" class="jqplot-'+this.axis+'-label"></div>');if(Number(this.label)){this._elem.css("white-space","nowrap")}if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}return this._elem};h.jqplot.AxisLabelRenderer.prototype.pack=function(){};h.jqplot.AxisTickRenderer=function(v){h.jqplot.ElemContainer.call(this);this.mark="outside";this.axis;this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.size=4;this.markSize=6;this.show=true;this.showLabel=true;this.label="";this.value=null;this._styles={};this.formatter=h.jqplot.DefaultTickFormatter;this.formatString="";this.fontFamily;this.fontSize;this.textColor;this._elem;h.extend(true,this,v)};h.jqplot.AxisTickRenderer.prototype.init=function(v){h.extend(true,this,v)};h.jqplot.AxisTickRenderer.prototype=new h.jqplot.ElemContainer();h.jqplot.AxisTickRenderer.prototype.constructor=h.jqplot.AxisTickRenderer;h.jqplot.AxisTickRenderer.prototype.setTick=function(v,x,w){this.value=v;this.axis=x;if(w){this.isMinorTick=true}return this};h.jqplot.AxisTickRenderer.prototype.draw=function(){if(!this.label){this.label=this.formatter(this.formatString,this.value)}style='style="position:absolute;';if(Number(this.label)){style+="white-space:nowrap;"}style+='"';this._elem=h("<div "+style+' class="jqplot-'+this.axis+'-tick">'+this.label+"</div>");for(var v in this._styles){this._elem.css(v,this._styles[v])}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}return this._elem};h.jqplot.DefaultTickFormatter=function(v,w){if(typeof w=="number"){if(!v){v="%.1f"}return h.jqplot.sprintf(v,w)}else{return String(w)}};h.jqplot.AxisTickRenderer.prototype.pack=function(){};h.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new h.jqplot.ShadowRenderer()};h.jqplot.CanvasGridRenderer.prototype.init=function(w){this._ctx;h.extend(true,this,w);var v={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false};this.renderer.shadowRenderer.init(v)};h.jqplot.CanvasGridRenderer.prototype.createElement=function(){var y=document.createElement("canvas");var v=this._plotDimensions.width;var x=this._plotDimensions.height;y.width=v;y.height=x;this._elem=h(y);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});if(h.browser.msie){window.G_vmlCanvasManager.init_(document)}if(h.browser.msie){y=window.G_vmlCanvasManager.initElement(y)}this._top=this._offsets.top;this._bottom=x-this._offsets.bottom;this._left=this._offsets.left;this._right=v-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;return this._elem};h.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var L=this._ctx;var E=this._axes;L.save();L.fillStyle=this.background;L.fillRect(this._left,this._top,this._width,this._height);if(this.drawGridlines){L.save();L.lineJoin="miter";L.lineCap="butt";L.lineWidth=this.gridLineWidth;L.strokeStyle=this.gridLineColor;var G,D;var v=["xaxis","yaxis","x2axis","y2axis"];for(var A=4;A>0;A--){var w=v[A-1];var y=E[w];var H=y._ticks;if(y.show){for(var z=H.length;z>0;z--){var K=H[z-1];if(K.show){var F=Math.round(y.u2p(K.value))+0.5;switch(w){case"xaxis":if(K.showGridline){C(F,this._top,F,this._bottom)}if(K.showMark&&K.mark){s=K.markSize;m=K.mark;var F=Math.round(y.u2p(K.value))+0.5;switch(m){case"outside":G=this._bottom;D=this._bottom+s;break;case"inside":G=this._bottom-s;D=this._bottom;break;case"cross":G=this._bottom-s;D=this._bottom+s;break;default:G=this._bottom;D=this._bottom+s;break}if(this.shadow){this.renderer.shadowRenderer.draw(L,[[F,G],[F,D]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}C(F,G,F,D)}break;case"yaxis":if(K.showGridline){C(this._right,F,this._left,F)}if(K.showMark&&K.mark){s=K.markSize;m=K.mark;var F=Math.round(y.u2p(K.value))+0.5;switch(m){case"outside":G=this._left-s;D=this._left;break;case"inside":G=this._left;D=this._left+s;break;case"cross":G=this._left-s;D=this._left+s;break;default:G=this._left-s;D=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(L,[[G,F],[D,F]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}C(G,F,D,F,{strokeStyle:y.borderColor})}break;case"x2axis":if(K.showGridline){C(F,this._bottom,F,this._top)}if(K.showMark&&K.mark){s=K.markSize;m=K.mark;var F=Math.round(y.u2p(K.value))+0.5;switch(m){case"outside":G=this._top-s;D=this._top;break;case"inside":G=this._top;D=this._top+s;break;case"cross":G=this._top-s;D=this._top+s;break;default:G=this._top-s;D=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(L,[[F,G],[F,D]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}C(F,G,F,D)}break;case"y2axis":if(K.showGridline){C(this._left,F,this._right,F)}if(K.showMark&&K.mark){s=K.markSize;m=K.mark;var F=Math.round(y.u2p(K.value))+0.5;switch(m){case"outside":G=this._right;D=this._right+s;break;case"inside":G=this._right-s;D=this._right;break;case"cross":G=this._right-s;D=this._right+s;break;default:G=this._right;D=this._right+s;break}if(this.shadow){this.renderer.shadowRenderer.draw(L,[[G,F],[D,F]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}C(G,F,D,F,{strokeStyle:y.borderColor})}break;default:break}}}}}v=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];for(var A=7;A>0;A--){var y=E[v[A-1]];var H=y._ticks;if(y.show){var J=H[y.numberTicks-1];var B=H[0];var x=y.getLeft();var I=[[x,J.getTop()+J.getHeight()/2],[x,B.getTop()+B.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(L,I,{lineCap:"butt",fill:false,closePath:false})}C(I[0][0],I[0][1],I[1][0],I[1][1],{lineCap:"butt",strokeStyle:y.borderColor,lineWidth:y.borderWidth});for(var z=H.length;z>0;z--){var K=H[z-1];s=K.markSize;m=K.mark;var F=Math.round(y.u2p(K.value))+0.5;if(K.showMark&&K.mark){switch(m){case"outside":G=x;D=x+s;break;case"inside":G=x-s;D=x;break;case"cross":G=x-s;D=x+s;break;default:G=x;D=x+s;break}I=[[G,F],[D,F]];if(this.shadow){this.renderer.shadowRenderer.draw(L,I,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}C(G,F,D,F,{strokeStyle:y.borderColor})}}}}L.restore()}function C(Q,P,N,M,O){L.save();O=O||{};h.extend(true,L,O);L.beginPath();L.moveTo(Q,P);L.lineTo(N,M);L.stroke();L.restore()}if(this.shadow){var I=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(L,I)}C(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:E.x2axis.borderColor,lineWidth:E.x2axis.borderWidth});C(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:E.y2axis.borderColor,lineWidth:E.y2axis.borderWidth});C(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:E.xaxis.borderColor,lineWidth:E.xaxis.borderWidth});C(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:E.yaxis.borderColor,lineWidth:E.yaxis.borderWidth});L.restore()};var r=24*60*60*1000;var j=function(v,w){v=String(v);while(v.length<w){v="0"+v}return v};var e={millisecond:1,second:1000,minute:60*1000,hour:60*60*1000,day:r,week:7*r,month:{add:function(x,v){e.year.add(x,Math[v>0?"floor":"ceil"](v/12));var w=x.getMonth()+(v%12);if(w==12){w=0;x.setYear(x.getFullYear()+1)}else{if(w==-1){w=11;x.setYear(x.getFullYear()-1)}}x.setMonth(w)},diff:function(z,x){var v=z.getFullYear()-x.getFullYear();var w=z.getMonth()-x.getMonth()+(v*12);var y=z.getDate()-x.getDate();return w+(y/30)}},year:{add:function(w,v){w.setYear(w.getFullYear()+Math[v>0?"floor":"ceil"](v))},diff:function(w,v){return e.month.diff(w,v)/12}}};for(var u in e){if(u.substring(u.length-1)!="s"){e[u+"s"]=e[u]}}var t=function(y,x){if(Date.prototype.strftime.formatShortcuts[x]){return y.strftime(Date.prototype.strftime.formatShortcuts[x])}else{var v=(Date.prototype.strftime.formatCodes[x]||"").split(".");var w=y["get"+v[0]]?y["get"+v[0]]():"";if(v[1]){w=j(w,v[1])}return w}};var q={succ:function(v){return this.clone().add(1,v)},add:function(x,w){var v=e[w]||e.day;if(typeof v=="number"){this.setTime(this.getTime()+(v*x))}else{v.add(this,x)}return this},diff:function(w,z,v){w=Date.create(w);if(w===null){return null}var x=e[z]||e.day;if(typeof x=="number"){var y=(this.getTime()-w.getTime())/x}else{var y=x.diff(this,w)}return(v?y:Math[y>0?"floor":"ceil"](y))},strftime:function(w){var y=w||"%Y-%m-%d",v="",x;while(y.length>0){if(x=y.match(Date.prototype.strftime.formatCodes.matcher)){v+=y.slice(0,x.index);v+=(x[1]||"")+t(this,x[2]);y=y.slice(x.index+x[0].length)}else{v+=y;y=""}}return v},getShortYear:function(){return this.getYear()%100},getMonthNumber:function(){return this.getMonth()+1},getMonthName:function(){return Date.MONTHNAMES[this.getMonth()]},getAbbrMonthName:function(){return Date.ABBR_MONTHNAMES[this.getMonth()]},getDayName:function(){return Date.DAYNAMES[this.getDay()]},getAbbrDayName:function(){return Date.ABBR_DAYNAMES[this.getDay()]},getDayOrdinal:function(){return Date.ORDINALNAMES[this.getDate()%10]},getHours12:function(){var v=this.getHours();return v>12?v-12:(v==0?12:v)},getAmPm:function(){return this.getHours()>=12?"PM":"AM"},getUnix:function(){return Math.round(this.getTime()/1000,0)},getGmtOffset:function(){var v=this.getTimezoneOffset()/60;var w=v<0?"+":"-";v=Math.abs(v);return w+j(Math.floor(v),2)+":"+j((v%1)*60,2)},getTimezoneName:function(){var v=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return v[1]||v[2]||"GMT"+this.getGmtOffset()},toYmdInt:function(){return(this.getFullYear()*10000)+(this.getMonthNumber()*100)+this.getDate()},clone:function(){return new Date(this.getTime())}};for(var a in q){Date.prototype[a]=q[a]}var d={create:function(v){if(v instanceof Date){return v}if(typeof v=="number"){return new Date(v)}var A=String(v).replace(/^\s*(.+)\s*$/,"$1"),w=0,x=Date.create.patterns.length,y;var z=A;while(w<x){ms=Date.parse(z);if(!isNaN(ms)){return new Date(ms)}y=Date.create.patterns[w];if(typeof y=="function"){obj=y(z);if(obj instanceof Date){return obj}}else{z=A.replace(y[0],y[1])}w++}return NaN},MONTHNAMES:"January February March April May June July August September October November December".split(" "),ABBR_MONTHNAMES:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAYNAMES:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ABBR_DAYNAMES:"Sun Mon Tue Wed Thu Fri Sat".split(" "),ORDINALNAMES:"th st nd rd th th th th th th".split(" "),ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S",daysInMonth:function(v,w){if(w==2){return new Date(v,1,29).getDate()==29?29:28}return[c,31,c,31,30,31,30,31,31,30,31,30,31][w]}};for(var a in d){Date[a]=d[a]}Date.prototype.strftime.formatCodes={matcher:/()%(#?(%|[a-z]))/i,Y:"FullYear",y:"ShortYear.2",m:"MonthNumber.2","#m":"MonthNumber",B:"MonthName",b:"AbbrMonthName",d:"Date.2","#d":"Date",e:"Date",A:"DayName",a:"AbbrDayName",w:"Day",o:"DayOrdinal",H:"Hours.2","#H":"Hours",I:"Hours12.2","#I":"Hours12",p:"AmPm",M:"Minutes.2","#M":"Minutes",S:"Seconds.2","#S":"Seconds",s:"Unix",N:"Milliseconds.3","#N":"Milliseconds",O:"TimezoneOffset",Z:"TimezoneName",G:"GmtOffset"};Date.prototype.strftime.formatShortcuts={F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",D:"%m/%d/%y","#c":"%a %b %e %H:%M:%S %Y",v:"%e-%b-%Y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"};Date.create.patterns=[[/-/g,"/"],[/st|nd|rd|th/g,""],[/(3[01]|[0-2]\d)\s*\.\s*(1[0-2]|0\d)\s*\.\s*([1-9]\d{3})/,"$2/$1/$3"],[/([1-9]\d{3})\s*-\s*(1[0-2]|0\d)\s*-\s*(3[01]|[0-2]\d)/,"$2/$3/$1"],function(y){var w=y.match(/^(?:(.+)\s+)?([012]?\d)(?:\s*\:\s*(\d\d))?(?:\s*\:\s*(\d\d(\.\d*)?))?\s*(am|pm)?\s*$/i);if(w){if(w[1]){var x=Date.create(w[1]);if(isNaN(x)){return}}else{var x=new Date();x.setMilliseconds(0)}var v=parseFloat(w[2]);if(w[6]){v=w[6].toLowerCase()=="am"?(v==12?0:v):(v==12?12:v+12)}x.setHours(v,parseInt(w[3]||0,10),parseInt(w[4]||0,10),((parseFloat(w[5]||0))||0)*1000);return x}else{return y}},function(y){var w=y.match(/^(?:(.+))[T|\s+]([012]\d)(?:\:(\d\d))(?:\:(\d\d))(?:\.\d+)([\+\-]\d\d\:\d\d)$/i);if(w){if(w[1]){var x=Date.create(w[1]);if(isNaN(x)){return}}else{var x=new Date();x.setMilliseconds(0)}var v=parseFloat(w[2]);x.setHours(v,parseInt(w[3],10),parseInt(w[4],10),parseFloat(w[5])*1000);return x}else{return y}},function(A){var x=A.match(/^([0-3]?\d)\s*[-\/.\s]{1}\s*([a-zA-Z]{3,9})\s*[-\/.\s]{1}\s*([0-3]?\d)$/);if(x){var z=new Date();var B=parseFloat(String(z.getFullYear()).slice(2,4));var C=parseInt(String(z.getFullYear())/100,10)*100;var E=1;var F=parseFloat(x[1]);var D=parseFloat(x[3]);var w,v,G;if(F>31){v=x[3];if(F<B+E){w=C+F}else{w=C-100+F}}else{v=x[1];if(D<B+E){w=C+D}else{w=C-100+D}}var G=h.inArray(x[2],Date.ABBR_MONTHNAMES);if(G==-1){G=h.inArray(x[2],Date.MONTHNAMES)}z.setFullYear(w,G,v);z.setHours(0,0,0,0);return z}else{return A}}];if(h.jqplot.config.debug){h.date=Date.create}h.jqplot.DivTitleRenderer=function(){};h.jqplot.DivTitleRenderer.prototype.init=function(v){h.extend(true,this,v)};h.jqplot.DivTitleRenderer.prototype.draw=function(){var w=this.renderer;if(!this.text){this.show=false;this._elem=h('<div style="height:0px;width:0px;"></div>')}else{if(this.text){var v="position:absolute;top:0px;left:0px;";v+=(this._plotWidth)?"width:"+this._plotWidth+"px;":"";v+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";v+=(this.fontSize)?"font-size:"+this.fontSize+";":"";v+=(this.textAlign)?"text-align:"+this.textAlign+";":"text-align:center;";v+=(this.textColor)?"color:"+this.textColor+";":"";this._elem=h('<div class="jqplot-title" style="'+v+'">'+this.text+"</div>")}}return this._elem};h.jqplot.DivTitleRenderer.prototype.pack=function(){};h.jqplot.LineRenderer=function(){this.shapeRenderer=new h.jqplot.ShapeRenderer();this.shadowRenderer=new h.jqplot.ShadowRenderer()};h.jqplot.LineRenderer.prototype.init=function(w){h.extend(true,this.renderer,w);var y={lineJoin:"round",lineCap:"round",fill:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.fillColor,lineWidth:this.lineWidth,closePath:this.fill};this.renderer.shapeRenderer.init(y);if(this.lineWidth>2.5){var x=this.shadowOffset*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{var x=this.shadowOffset*Math.atan((this.lineWidth/2.5))/0.785398163}var v={lineJoin:"round",lineCap:"round",fill:this.fill,isarc:false,angle:this.shadowAngle,offset:x,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,closePath:this.fill};this.renderer.shadowRenderer.init(v)};h.jqplot.LineRenderer.prototype.setGridData=function(A){var w=this._xaxis.series_u2p;var z=this._yaxis.series_u2p;var x=this._plotData;var y=this._prevPlotData;this.gridData=[];this._prevGridData=[];for(var v=0;v<this.data.length;v++){if(x[v]!=null){this.gridData.push([w.call(this._xaxis,x[v][0]),z.call(this._yaxis,x[v][1])])}if(y[v]!=null){this._prevGridData.push([w.call(this._xaxis,y[v][0]),z.call(this._yaxis,y[v][1])])}}};h.jqplot.LineRenderer.prototype.makeGridData=function(y,A){var x=this._xaxis.series_u2p;var z=this._yaxis.series_u2p;var w=[];var B=[];for(var v=0;v<y.length;v++){if(y[v]!=null){w.push([x.call(this._xaxis,y[v][0]),z.call(this._yaxis,y[v][1])])}}return w};h.jqplot.LineRenderer.prototype.draw=function(G,N,w){var K;var E=(w!=c)?w:{};var y=(E.shadow!=c)?E.shadow:this.shadow;var P=(E.showLine!=c)?E.showLine:this.showLine;var J=(E.fill!=c)?E.fill:this.fill;var v=(E.fillAndStroke!=c)?E.fillAndStroke:this.fillAndStroke;G.save();if(N.length){if(P){if(J){if(this.fillToZero){var z=new h.jqplot.ColorGenerator(this.negativeSeriesColors);var L=z.get(this.index);if(!this.useNegativeColors){L=E.fillStyle}var C=false;var D=E.fillStyle;if(v){var O=N.slice(0)}if(this.index==0||!this._stack){var H=[];var M=this._yaxis.series_u2p(0);var x=this._xaxis.series_u2p(0);if(this.fillAxis=="y"){H.push([N[0][0],M]);for(var K=0;K<N.length-1;K++){H.push(N[K]);if(this._plotData[K][1]*this._plotData[K+1][1]<0){if(this._plotData[K][1]<0){C=true;E.fillStyle=L}else{C=false;E.fillStyle=D}var B=N[K][0]+(N[K+1][0]-N[K][0])*(M-N[K][1])/(N[K+1][1]-N[K][1]);H.push([B,M]);if(y){this.renderer.shadowRenderer.draw(G,H,E)}this.renderer.shapeRenderer.draw(G,H,E);H=[[B,M]]}}if(this._plotData[N.length-1][1]<0){C=true;E.fillStyle=L}else{C=false;E.fillStyle=D}H.push(N[N.length-1]);H.push([N[N.length-1][0],M])}if(y){this.renderer.shadowRenderer.draw(G,H,E)}this.renderer.shapeRenderer.draw(G,H,E)}else{var F=this._prevGridData;for(var K=F.length;K>0;K--){N.push(F[K-1])}if(y){this.renderer.shadowRenderer.draw(G,N,E)}this.renderer.shapeRenderer.draw(G,N,E)}}else{if(v){var O=N.slice(0)}if(this.index==0||!this._stack){var A=G.canvas.height;N.unshift([N[0][0],A]);len=N.length;N.push([N[len-1][0],A])}else{var F=this._prevGridData;for(var K=F.length;K>0;K--){N.push(F[K-1])}}if(y){this.renderer.shadowRenderer.draw(G,N,E)}this.renderer.shapeRenderer.draw(G,N,E)}if(v){var I=h.extend(true,{},E,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(G,O,I);if(this.markerRenderer.show){for(K=0;K<O.length;K++){this.markerRenderer.draw(O[K][0],O[K][1],G,E.markerOptions)}}}}else{if(y){this.renderer.shadowRenderer.draw(G,N,E)}this.renderer.shapeRenderer.draw(G,N,E)}}if(this.markerRenderer.show&&!J){for(K=0;K<N.length;K++){this.markerRenderer.draw(N[K][0],N[K][1],G,E.markerOptions)}}}G.restore()};h.jqplot.LineRenderer.prototype.drawShadow=function(v,x,w){};h.jqplot.LinearAxisRenderer=function(){};h.jqplot.LinearAxisRenderer.prototype.init=function(x){h.extend(true,this,x);var v=this._dataBounds;for(var y=0;y<this._series.length;y++){var z=this._series[y];var A=z._plotData;for(var w=0;w<A.length;w++){if(this.name=="xaxis"||this.name=="x2axis"){if(A[w][0]<v.min||v.min==null){v.min=A[w][0]}if(A[w][0]>v.max||v.max==null){v.max=A[w][0]}}else{if(A[w][1]<v.min||v.min==null){v.min=A[w][1]}if(A[w][1]>v.max||v.max==null){v.max=A[w][1]}}}}};h.jqplot.LinearAxisRenderer.prototype.draw=function(v){if(this.show){this.renderer.createTicks.call(this);var B=0;var w;this._elem=h('<div class="jqplot-axis jqplot-'+this.name+'" style="position:absolute;"></div>');if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var A=this._label.draw(v);A.appendTo(this._elem)}if(this.showTicks){var z=this._ticks;for(var y=0;y<z.length;y++){var x=z[y];if(x.showLabel&&(!x.isMinorTick||this.showMinorTicks)){var A=x.draw(v);A.appendTo(this._elem)}}}}return this._elem};h.jqplot.LinearAxisRenderer.prototype.reset=function(){this.min=this._min;this.max=this._max;this.tickInterval=this._tickInterval;this.numberTicks=this._numberTicks};h.jqplot.LinearAxisRenderer.prototype.set=function(){var D=0;var y;var x=0;var C=0;var v=(this._label==null)?false:this._label.show;if(this.show&&this.showTicks){var B=this._ticks;for(var A=0;A<B.length;A++){var z=B[A];if(z.showLabel&&(!z.isMinorTick||this.showMinorTicks)){if(this.name=="xaxis"||this.name=="x2axis"){y=z._elem.outerHeight(true)}else{y=z._elem.outerWidth(true)}if(y>D){D=y}}}if(v){x=this._label._elem.outerWidth(true);C=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){D=D+C;this._elem.css({height:D+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){D=D+C;this._elem.css({height:D+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){D=D+x;this._elem.css({width:D+"px",left:"0px",top:"0px"});if(v&&this._label.constructor==h.jqplot.AxisLabelRenderer){this._label._elem.css("width",x+"px")}}else{D=D+x;this._elem.css({width:D+"px",right:"0px",top:"0px"});if(v&&this._label.constructor==h.jqplot.AxisLabelRenderer){this._label._elem.css("width",x+"px")}}}}}};h.jqplot.LinearAxisRenderer.prototype.createTicks=function(){var ab=this._ticks;var X=this.ticks;var ac=this.name;var aa=this._dataBounds;var S,Y;var P,T;var y,x;var v,U;if(X.length){for(U=0;U<X.length;U++){var D=X[U];var G=new this.tickRenderer(this.tickOptions);if(D.constructor==Array){G.value=D[0];G.label=D[1];if(!this.showTicks){G.showLabel=false;G.showMark=false}else{if(!this.showTickMarks){G.showMark=false}}G.setTick(D[0],this.name);this._ticks.push(G)}else{G.value=D;if(!this.showTicks){G.showLabel=false;G.showMark=false}else{if(!this.showTickMarks){G.showMark=false}}G.setTick(D,this.name);this._ticks.push(G)}}this.numberTicks=X.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(ac=="xaxis"||ac=="x2axis"){S=this._plotDimensions.width}else{S=this._plotDimensions.height}if(!this.autoscale&&this.min!=null&&this.max!=null&&this.numberTicks!=null){this.tickInterval=null}P=((this.min!=null)?this.min:aa.min);T=((this.max!=null)?this.max:aa.max);if(P==T){var E=0.05;if(P>0){E=Math.max(Math.log(P)/Math.LN10,0.05)}P-=E;T+=E}var K=T-P;var O,R;var W;if(this.autoscale&&this.min==null&&this.max==null){var J,z,L;var F=false;var N=false;var w={min:null,max:null,average:null,stddev:null};for(var U=0;U<this._series.length;U++){var I=this._series[U];var B=(I.fillAxis=="x")?I._xaxis.name:I._yaxis.name;if(this.name==B){var H=I._plotValues[I.fillAxis];var A=H[0];var C=H[0];for(var Q=1;Q<H.length;Q++){if(H[Q]<A){A=H[Q]}else{if(H[Q]>C){C=H[Q]}}}var M=(C-A)/C;if(I.renderer.constructor==h.jqplot.BarRenderer){if(A>=0&&(I.fillToZero||M>0.1)){F=true}else{F=false;if(I.fill&&I.fillToZero&&A<0&&C>0){N=true}else{N=false}}}else{if(I.fill){if(A>=0&&(I.fillToZero||M>0.1)){F=true}else{if(A<0&&C>0&&I.fillToZero){F=false;N=true}else{F=false;N=false}}}else{if(A<0){F=false}}}}}if(F){this.numberTicks=2+Math.ceil((S-(this.tickSpacing-1))/this.tickSpacing);this.min=0;z=T/(this.numberTicks-1);W=Math.pow(10,Math.abs(Math.floor(Math.log(z)/Math.LN10)));if(z/W==parseInt(z/W,10)){z+=W}this.tickInterval=Math.ceil(z/W)*W;this.max=this.tickInterval*(this.numberTicks-1)}else{if(N){this.numberTicks=2+Math.ceil((S-(this.tickSpacing-1))/this.tickSpacing);var V=Math.ceil(Math.abs(P)/K*(this.numberTicks-1));var Z=this.numberTicks-1-V;z=Math.max(Math.abs(P/V),Math.abs(T/Z));W=Math.pow(10,Math.abs(Math.floor(Math.log(z)/Math.LN10)));this.tickInterval=Math.ceil(z/W)*W;this.max=this.tickInterval*Z;this.min=-this.tickInterval*V}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(K/this.tickInterval)}else{this.numberTicks=2+Math.ceil((S-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){z=K/(this.numberTicks-1);if(z<1){W=Math.pow(10,Math.abs(Math.floor(Math.log(z)/Math.LN10)))}else{W=1}this.tickInterval=Math.ceil(z*W*this.pad)/W}else{W=1/this.tickInterval}J=this.tickInterval*(this.numberTicks-1);L=(J-K)/2;if(this.min==null){this.min=Math.floor(W*(P-L))/W}if(this.max==null){this.max=this.min+J}}}}else{O=(this.min!=null)?this.min:P-K*(this.padMin-1);R=(this.max!=null)?this.max:T+K*(this.padMax-1);this.min=O;this.max=R;K=this.max-this.min;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((this.max-this.min)/this.tickInterval)+1;this.max=this.min+this.tickInterval*(this.numberTicks-1)}else{if(S>100){this.numberTicks=parseInt(3+(S-100)/75,10)}else{this.numberTicks=2}}}if(this.tickInterval==null){this.tickInterval=K/(this.numberTicks-1)}}for(var U=0;U<this.numberTicks;U++){v=this.min+U*this.tickInterval;var G=new this.tickRenderer(this.tickOptions);if(!this.showTicks){G.showLabel=false;G.showMark=false}else{if(!this.showTickMarks){G.showMark=false}}G.setTick(v,this.name);this._ticks.push(G)}}};h.jqplot.LinearAxisRenderer.prototype.pack=function(F,A){var I=this._ticks;var G=this.max;var C=this.min;var z=A.max;var M=A.min;var D=(this._label==null)?false:this._label.show;for(var v in F){this._elem.css(v,F[v])}this._offsets=A;var y=z-M;var L=G-C;this.p2u=function(w){return(w-M)*L/y+C};this.u2p=function(w){return(w-C)*y/L+M};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(w){return(w-C)*y/L};this.series_p2u=function(w){return w*L/y+C}}else{this.series_u2p=function(w){return(w-G)*y/L};this.series_p2u=function(w){return w*L/y+G}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(i=0;i<I.length;i++){var K=I[i];if(K.show&&K.showLabel){var B;if(K.constructor==h.jqplot.CanvasAxisTickRenderer&&K.angle){var J=(this.name=="xaxis")?1:-1;switch(K.labelPosition){case"auto":if(J*K.angle<0){B=-K.getWidth()+K._textRenderer.height*Math.sin(-K._textRenderer.angle)/2}else{B=-K._textRenderer.height*Math.sin(K._textRenderer.angle)/2}break;case"end":B=-K.getWidth()+K._textRenderer.height*Math.sin(-K._textRenderer.angle)/2;break;case"start":B=-K._textRenderer.height*Math.sin(K._textRenderer.angle)/2;break;case"middle":B=-K.getWidth()/2+K._textRenderer.height*Math.sin(-K._textRenderer.angle)/2;break;default:B=-K.getWidth()/2+K._textRenderer.height*Math.sin(-K._textRenderer.angle)/2;break}}else{B=-K.getWidth()/2}var x=this.u2p(K.value)+B+"px";K._elem.css("left",x);K.pack()}}if(D){var H=this._label._elem.outerWidth(true);this._label._elem.css("left",M+y/2-H/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px")}else{this._label._elem.css("top","0px")}this._label.pack()}}else{for(i=0;i<I.length;i++){var K=I[i];if(K.show&&K.showLabel){var B;if(K.constructor==h.jqplot.CanvasAxisTickRenderer&&K.angle){var J=(this.name=="yaxis")?1:-1;switch(K.labelPosition){case"auto":case"end":if(J*K.angle<0){B=-K._textRenderer.height*Math.cos(-K._textRenderer.angle)/2}else{B=-K.getHeight()+K._textRenderer.height*Math.cos(K._textRenderer.angle)/2}break;case"start":if(K.angle>0){B=-K._textRenderer.height*Math.cos(-K._textRenderer.angle)/2}else{B=-K.getHeight()+K._textRenderer.height*Math.cos(K._textRenderer.angle)/2}break;case"middle":B=-K.getHeight()/2;break;default:B=-K.getHeight()/2;break}}else{B=-K.getHeight()/2}var x=this.u2p(K.value)+B+"px";K._elem.css("top",x);K.pack()}}if(D){var E=this._label._elem.outerHeight(true);this._label._elem.css("top",z-y/2-E/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}};h.jqplot.MarkerRenderer=function(v){this.show=true;this.style="filledCircle";this.lineWidth=2;this.size=9;this.color="#666666";this.shadow=true;this.shadowAngle=45;this.shadowOffset=1;this.shadowDepth=3;this.shadowAlpha="0.07";this.shadowRenderer=new h.jqplot.ShadowRenderer();this.shapeRenderer=new h.jqplot.ShapeRenderer();h.extend(true,this,v)};h.jqplot.MarkerRenderer.prototype.init=function(v){h.extend(true,this,v);var x={angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,lineWidth:this.lineWidth,depth:this.shadowDepth,closePath:true};if(this.style.indexOf("filled")!=-1){x.fill=true}if(this.style.indexOf("ircle")!=-1){x.isarc=true;x.closePath=false}this.shadowRenderer.init(x);var w={fill:false,isarc:false,strokeStyle:this.color,fillStyle:this.color,lineWidth:this.lineWidth,closePath:true};if(this.style.indexOf("filled")!=-1){w.fill=true}if(this.style.indexOf("ircle")!=-1){w.isarc=true;w.closePath=false}this.shapeRenderer.init(w)};h.jqplot.MarkerRenderer.prototype.drawDiamond=function(z,w,C,B,E){var v=1.2;var F=this.size/2/v;var D=this.size/2*v;var A=[[z-F,w],[z,w+D],[z+F,w],[z,w-D]];if(this.shadow){this.shadowRenderer.draw(C,A)}this.shapeRenderer.draw(C,A,E);C.restore()};h.jqplot.MarkerRenderer.prototype.drawPlus=function(A,z,D,C,G){var w=1;var H=this.size/2*w;var E=this.size/2*w;var F=[[A,z-E],[A,z+E]];var B=[[A+H,z],[A-H,z]];var v=h.extend(true,{},this.options,{closePath:false});if(this.shadow){this.shadowRenderer.draw(D,F,{closePath:false});this.shadowRenderer.draw(D,B,{closePath:false})}this.shapeRenderer.draw(D,F,v);this.shapeRenderer.draw(D,B,v);D.restore()};h.jqplot.MarkerRenderer.prototype.drawX=function(A,z,D,C,G){var w=1;var H=this.size/2*w;var E=this.size/2*w;var v=h.extend(true,{},this.options,{closePath:false});var F=[[A-H,z-E],[A+H,z+E]];var B=[[A-H,z+E],[A+H,z-E]];if(this.shadow){this.shadowRenderer.draw(D,F,{closePath:false});this.shadowRenderer.draw(D,B,{closePath:false})}this.shapeRenderer.draw(D,F,v);this.shapeRenderer.draw(D,B,v);D.restore()};h.jqplot.MarkerRenderer.prototype.drawDash=function(z,w,C,B,E){var v=1;var F=this.size/2*v;var D=this.size/2*v;var A=[[z-F,w],[z+F,w]];if(this.shadow){this.shadowRenderer.draw(C,A)}this.shapeRenderer.draw(C,A,E);C.restore()};h.jqplot.MarkerRenderer.prototype.drawSquare=function(z,w,C,B,E){var v=1;var F=this.size/2/v;var D=this.size/2*v;var A=[[z-F,w-D],[z-F,w+D],[z+F,w+D],[z+F,w-D]];if(this.shadow){this.shadowRenderer.draw(C,A)}this.shapeRenderer.draw(C,A,E);C.restore()};h.jqplot.MarkerRenderer.prototype.drawCircle=function(w,E,A,D,B){var v=this.size/2;var z=2*Math.PI;var C=[w,E,v,0,z,true];if(this.shadow){this.shadowRenderer.draw(A,C)}this.shapeRenderer.draw(A,C,B);A.restore()};h.jqplot.MarkerRenderer.prototype.draw=function(v,A,w,z){z=z||{};switch(this.style){case"diamond":this.drawDiamond(v,A,w,false,z);break;case"filledDiamond":this.drawDiamond(v,A,w,true,z);break;case"circle":this.drawCircle(v,A,w,false,z);break;case"filledCircle":this.drawCircle(v,A,w,true,z);break;case"square":this.drawSquare(v,A,w,false,z);break;case"filledSquare":this.drawSquare(v,A,w,true,z);break;case"x":this.drawX(v,A,w,true,z);break;case"plus":this.drawPlus(v,A,w,true,z);break;case"dash":this.drawDash(v,A,w,true,z);break;default:this.drawDiamond(v,A,w,false,z);break}};h.jqplot.ShadowRenderer=function(v){this.angle=45;this.offset=1;this.alpha=0.07;this.lineWidth=1.5;this.lineJoin="miter";this.lineCap="round";this.closePath=false;this.fill=false;this.depth=3;this.isarc=false;h.extend(true,this,v)};h.jqplot.ShadowRenderer.prototype.init=function(v){h.extend(true,this,v)};h.jqplot.ShadowRenderer.prototype.draw=function(E,C,F){E.save();var v=(F!=null)?F:{};var D=(v.fill!=null)?v.fill:this.fill;var B=(v.closePath!=null)?v.closePath:this.closePath;var y=(v.offset!=null)?v.offset:this.offset;var w=(v.alpha!=null)?v.alpha:this.alpha;var A=(v.depth!=null)?v.depth:this.depth;E.lineWidth=(v.lineWidth!=null)?v.lineWidth:this.lineWidth;E.lineJoin=(v.lineJoin!=null)?v.lineJoin:this.lineJoin;E.lineCap=(v.lineCap!=null)?v.lineCap:this.lineCap;E.strokeStyle="rgba(0,0,0,"+w+")";E.fillStyle="rgba(0,0,0,"+w+")";for(var x=0;x<A;x++){E.translate(Math.cos(this.angle*Math.PI/180)*y,Math.sin(this.angle*Math.PI/180)*y);E.beginPath();if(this.isarc){E.arc(C[0],C[1],C[2],C[3],C[4],true)}else{E.moveTo(C[0][0],C[0][1]);for(var z=1;z<C.length;z++){E.lineTo(C[z][0],C[z][1])}}if(B){E.closePath()}if(D){E.fill()}else{E.stroke()}}E.restore()};h.jqplot.ShapeRenderer=function(v){this.lineWidth=1.5;this.lineJoin="miter";this.lineCap="round";this.closePath=false;this.fill=false;this.isarc=false;this.fillRect=false;this.strokeRect=false;this.clearRect=false;this.strokeStyle="#999999";this.fillStyle="#999999";h.extend(true,this,v)};h.jqplot.ShapeRenderer.prototype.init=function(v){h.extend(true,this,v)};h.jqplot.ShapeRenderer.prototype.draw=function(D,B,F){D.save();var v=(F!=null)?F:{};var C=(v.fill!=null)?v.fill:this.fill;var z=(v.closePath!=null)?v.closePath:this.closePath;var A=(v.fillRect!=null)?v.fillRect:this.fillRect;var x=(v.strokeRect!=null)?v.strokeRect:this.strokeRect;var w=(v.clearRect!=null)?v.clearRect:this.clearRect;var E=(v.isarc!=null)?v.isarc:this.isarc;D.lineWidth=v.lineWidth||this.lineWidth;D.lineJoin=v.lineJoing||this.lineJoin;D.lineCap=v.lineCap||this.lineCap;D.strokeStyle=(v.strokeStyle||v.color)||this.strokeStyle;D.fillStyle=v.fillStyle||this.fillStyle;D.beginPath();if(E){D.arc(B[0],B[1],B[2],B[3],B[4],true);if(z){D.closePath()}if(C){D.fill()}else{D.stroke()}D.restore();return}else{if(w){D.clearRect(B[0],B[1],B[2],B[3]);D.restore();return}else{if(A||x){if(A){D.fillRect(B[0],B[1],B[2],B[3])}if(x){D.strokeRect(B[0],B[1],B[2],B[3]);D.restore();return}}else{D.moveTo(B[0][0],B[0][1]);for(var y=1;y<B.length;y++){D.lineTo(B[y][0],B[y][1])}if(z){D.closePath()}if(C){D.fill()}else{D.stroke()}}}}D.restore()};h.jqplot.TableLegendRenderer=function(){};h.jqplot.TableLegendRenderer.prototype.init=function(v){h.extend(true,this,v)};h.jqplot.TableLegendRenderer.prototype.addrow=function(x,w,A){var v=(A)?this.rowSpacing:"0";var z=h('<tr class="jqplot-table-legend"></tr>').appendTo(this._elem);h('<td class="jqplot-table-legend" style="text-align:center;padding-top:'+v+';"><div><div class="jqplot-table-legend-swatch" style="border-color:'+w+';"></div></div></td>').appendTo(z);var y=h('<td class="jqplot-table-legend" style="padding-top:'+v+';"></td>');y.appendTo(z);if(this.escapeHtml){y.text(x)}else{y.html(x)}};h.jqplot.TableLegendRenderer.prototype.draw=function(){var B=this;if(this.show){var z=this._series;var D="position:absolute;";D+=(this.background)?"background:"+this.background+";":"";D+=(this.border)?"border:"+this.border+";":"";D+=(this.fontSize)?"font-size:"+this.fontSize+";":"";D+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";D+=(this.textColor)?"color:"+this.textColor+";":"";this._elem=h('<table class="jqplot-table-legend" style="'+D+'"></table>');var v=false;for(var A=0;A<z.length;A++){s=z[A];if(s.show&&s.showLabel){var y=s.label.toString();if(y){var w=s.color;if(s._stack&&!s.fill){w=""}this.renderer.addrow.call(this,y,w,v);v=true}for(var x=0;x<h.jqplot.addLegendRowHooks.length;x++){var C=h.jqplot.addLegendRowHooks[x].call(this,s);if(C){this.renderer.addrow.call(this,C.label,C.color,v);v=true}}}}}return this._elem};h.jqplot.TableLegendRenderer.prototype.pack=function(y){if(this.show){var x={_top:y.top,_left:y.left,_right:y.right,_bottom:this._plotDimensions.height-y.bottom};switch(this.location){case"nw":var w=x._left+this.xoffset;var v=x._top+this.yoffset;this._elem.css("left",w);this._elem.css("top",v);break;case"n":var w=(y.left+(this._plotDimensions.width-y.right))/2-this.getWidth()/2;var v=x._top+this.yoffset;this._elem.css("left",w);this._elem.css("top",v);break;case"ne":var w=y.right+this.xoffset;var v=x._top+this.yoffset;this._elem.css({right:w,top:v});break;case"e":var w=y.right+this.xoffset;var v=(y.top+(this._plotDimensions.height-y.bottom))/2-this.getHeight()/2;this._elem.css({right:w,top:v});break;case"se":var w=y.right+this.xoffset;var v=y.bottom+this.yoffset;this._elem.css({right:w,bottom:v});break;case"s":var w=(y.left+(this._plotDimensions.width-y.right))/2-this.getWidth()/2;var v=y.bottom+this.yoffset;this._elem.css({left:w,bottom:v});break;case"sw":var w=x._left+this.xoffset;var v=y.bottom+this.yoffset;this._elem.css({left:w,bottom:v});break;case"w":var w=x._left+this.xoffset;var v=(y.top+(this._plotDimensions.height-y.bottom))/2-this.getHeight()/2;this._elem.css({left:w,top:v});break;default:var w=x._right-this.xoffset;var v=x._bottom+this.yoffset;this._elem.css({right:w,bottom:v});break}}};h.jqplot.sprintf=function(){function A(G,C,D,F){var E=(G.length>=C)?"":Array(1+C-G.length>>>0).join(D);return F?G+E:E+G}function x(H,G,J,E,F,D){var I=E-H.length;if(I>0){var C=" ";if(D){C=" "}if(J||!F){H=A(H,E,C,J)}else{H=H.slice(0,G.length)+A("",I,"0",true)+H.slice(G.length)}}return H}function B(K,D,I,E,C,H,J,G){var F=K>>>0;I=I&&F&&{"2":"0b","8":"0","16":"0x"}[D]||"";K=I+A(F.toString(D),H||0,"0",false);return x(K,I,E,C,J,G)}function v(G,H,E,C,F,D){if(C!=null){G=G.slice(0,C)}return x(G,"",H,E,F,D)}var w=arguments,y=0,z=w[y++];return z.replace(h.jqplot.sprintf.regex,function(V,I,J,M,X,T,G){if(V=="%%"){return"%"}var N=false,K="",L=false,U=false,H=false;for(var S=0;J&&S<J.length;S++){switch(J.charAt(S)){case" ":K=" ";break;case"+":K="+";break;case"-":N=true;break;case"0":L=true;break;case"#":U=true;break;case"&":H=true;break}}if(!M){M=0}else{if(M=="*"){M=+w[y++]}else{if(M.charAt(0)=="*"){M=+w[M.slice(1,-1)]}else{M=+M}}}if(M<0){M=-M;N=true}if(!isFinite(M)){throw new Error("$.jqplot.sprintf: (minimum-)width must be finite")}if(!T){T="fFeE".indexOf(G)>-1?6:(G=="d")?0:void (0)}else{if(T=="*"){T=+w[y++]}else{if(T.charAt(0)=="*"){T=+w[T.slice(1,-1)]}else{T=+T}}}var P=I?w[I.slice(0,-1)]:w[y++];switch(G){case"s":if(P==null){return""}return v(String(P),N,M,T,L,H);case"c":return v(String.fromCharCode(+P),N,M,T,L,H);case"b":return B(P,2,U,N,M,T,L,H);case"o":return B(P,8,U,N,M,T,L,H);case"x":return B(P,16,U,N,M,T,L,H);case"X":return B(P,16,U,N,M,T,L,H).toUpperCase();case"u":return B(P,10,U,N,M,T,L,H);case"i":case"d":var E=parseInt(+P,10);if(isNaN(E)){return""}var R=E<0?"-":K;P=R+A(String(Math.abs(E)),T,"0",false);return x(P,R,N,M,L,H);case"e":case"E":case"f":case"F":case"g":case"G":var E=+P;if(isNaN(E)){return""}var R=E<0?"-":K;var F=["toExponential","toFixed","toPrecision"]["efg".indexOf(G.toLowerCase())];var W=["toString","toUpperCase"]["eEfFgG".indexOf(G)%2];P=R+Math.abs(E)[F](T);return x(P,R,N,M,L,H)[W]();case"p":case"P":var E=+P;if(isNaN(E)){return""}var R=E<0?"-":K;var O=String(Number(Math.abs(E)).toExponential()).split(/e|E/);var D=(O[0].indexOf(".")!=-1)?O[0].length-1:O[0].length;var Q=(O[1]<0)?-O[1]-1:0;if(Math.abs(E)<1){if(D+Q<=T){P=R+Math.abs(E).toPrecision(D)}else{if(D<=T-1){P=R+Math.abs(E).toExponential(D-1)}else{P=R+Math.abs(E).toExponential(T-1)}}}else{var C=(D<=T)?D:T;P=R+Math.abs(E).toPrecision(C)}var W=["toString","toUpperCase"]["pP".indexOf(G)%2];return x(P,R,N,M,L,H)[W]();case"n":return"";default:return V}})};h.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0& ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g})(jQuery); |
\ No newline at end of file |
Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotPie.php |
— | — | @@ -0,0 +1,131 @@ |
| 2 | +<?php
|
| 3 | +/**
|
| 4 | + * A query printer for pie charts using the jqPlot JavaScript library.
|
| 5 | + *
|
| 6 | + * @author Sanyam Goyal
|
| 7 | + */
|
| 8 | +
|
| 9 | +if ( !defined( 'MEDIAWIKI' ) ) {
|
| 10 | + die( 'Not an entry point.' );
|
| 11 | +}
|
| 12 | +
|
| 13 | +class SRFjqPlotPie extends SMWResultPrinter {
|
| 14 | + protected $m_width = 400;
|
| 15 | + protected $m_height = 400;
|
| 16 | + protected $m_charttitle = " ";
|
| 17 | + static protected $m_piechartnum = 1;
|
| 18 | +
|
| 19 | + protected function readParameters( $params, $outputmode ) {
|
| 20 | + SMWResultPrinter::readParameters( $params, $outputmode );
|
| 21 | + if ( array_key_exists( 'width', $this->m_params ) ) {
|
| 22 | + $this->m_width = $this->m_params['width'];
|
| 23 | + }
|
| 24 | + if ( array_key_exists( 'height', $this->m_params ) ) {
|
| 25 | + $this->m_height = $this->m_params['height'];
|
| 26 | + }
|
| 27 | + if ( array_key_exists( 'charttitle', $this->m_params ) ) {
|
| 28 | + $this->m_charttitle = $this->m_params['charttitle'];
|
| 29 | + }
|
| 30 | + }
|
| 31 | +
|
| 32 | + public function getName() {
|
| 33 | + return wfMsg( 'srf_printername_jqplotpie' );
|
| 34 | + }
|
| 35 | +
|
| 36 | + protected function getResultText( $res, $outputmode ) {
|
| 37 | + global $smwgIQRunningNumber, $wgOut, $srfgScriptPath, $smwgScriptPath;
|
| 38 | + global $wgParser;
|
| 39 | + global $srfgJQPlotIncluded;
|
| 40 | +
|
| 41 | + $wgParser->disableCache();
|
| 42 | + // adding scripts - this code may be moved to some other location
|
| 43 | +
|
| 44 | + $wgOut->includeJQuery();
|
| 45 | + if ( !$srfgJQPlotIncluded ) {
|
| 46 | + $srfgJQPlotIncluded = true;
|
| 47 | + $jqplotScriptSrc = '<script type="text/javascript" src="'.$srfgScriptPath.'/jqPlot/jquery.jqplot.min.js"></script>';
|
| 48 | + $wgOut->addScript($jqplotScriptSrc);
|
| 49 | + }
|
| 50 | +
|
| 51 | + $PieScriptSrc = '<script type="text/javascript" src="'.$srfgScriptPath.'/jqPlot/jqplot.pieRenderer.min.js"></script>';
|
| 52 | + $wgOut->addScript($PieScriptSrc);
|
| 53 | +
|
| 54 | + // CSS file
|
| 55 | + $pie_css = array(
|
| 56 | + 'rel' => 'stylesheet',
|
| 57 | + 'type' => 'text/css',
|
| 58 | + 'media' => "screen",
|
| 59 | + 'href' => $srfgScriptPath . '/jqPlot/jquery.jqplot.css'
|
| 60 | + );
|
| 61 | + $wgOut->addLink( $pie_css );
|
| 62 | + $this->isHTML = true;
|
| 63 | +
|
| 64 | + $t = "";
|
| 65 | + $jqplot_data = "";
|
| 66 | + // print all result rows
|
| 67 | + $first = true;
|
| 68 | + $max = 0; // the biggest value. needed for scaling
|
| 69 | + while ( $row = $res->getNext() ) {
|
| 70 | + $name = $row[0]->getNextObject()->getShortWikiText();
|
| 71 | + foreach ( $row as $field ) {
|
| 72 | + while ( ( $object = $field->getNextObject() ) !== false ) {
|
| 73 | + if ( $object->isNumeric() ) { // use numeric sortkey
|
| 74 | + if ( method_exists( $object, 'getValueKey' ) ) {
|
| 75 | + $nr = $object->getValueKey();
|
| 76 | + }
|
| 77 | + else {
|
| 78 | + $nr = $object->getNumericValue();
|
| 79 | + }
|
| 80 | + $max = max( $max, $nr );
|
| 81 | + if ( $first ) {
|
| 82 | + $first = false;
|
| 83 | + $jqplot_data .= "[[['$name', $nr]";
|
| 84 | + } else {
|
| 85 | + $jqplot_data .= ",['$name', $nr]";
|
| 86 | + }
|
| 87 | + }
|
| 88 | + }
|
| 89 | + }
|
| 90 | + }
|
| 91 | + $jqplot_data .= "]]";
|
| 92 | + $pieID = 'pie' . self::$m_piechartnum;
|
| 93 | + self::$m_piechartnum++;
|
| 94 | +
|
| 95 | + $js_pie =<<<END
|
| 96 | +<script type="text/javascript">
|
| 97 | +jQuery.noConflict();
|
| 98 | +jQuery(document).ready(function(){
|
| 99 | + jQuery.jqplot.config.enablePlugins = true;
|
| 100 | + plot1 = jQuery.jqplot('$pieID', $jqplot_data, {
|
| 101 | + title: '$this->m_charttitle',
|
| 102 | + seriesDefaults: {
|
| 103 | + renderer: jQuery.jqplot.PieRenderer,
|
| 104 | + rendererOptions: {
|
| 105 | + sliceMargin:2
|
| 106 | + }
|
| 107 | + },
|
| 108 | + legend: { show:true }
|
| 109 | + });
|
| 110 | +});
|
| 111 | +</script>
|
| 112 | +
|
| 113 | +END;
|
| 114 | + $wgOut->addScript($js_pie);
|
| 115 | +
|
| 116 | + $text =<<<END
|
| 117 | +<div id="$pieID" style="margin-top: 20px; margin-left: 20px; width: {$this->m_width}px; height: {$this->m_height}px;"></div>
|
| 118 | +
|
| 119 | +END;
|
| 120 | + return $text;
|
| 121 | + }
|
| 122 | +
|
| 123 | + public function getParameters() {
|
| 124 | + return array(
|
| 125 | + array( 'name' => 'limit', 'type' => 'int', 'description' => wfMsg( 'smw_paramdesc_limit' ) ),
|
| 126 | + array( 'name' => 'height', 'type' => 'int', 'description' => wfMsg( 'srf_paramdesc_chartheight' ) ),
|
| 127 | + array( 'name' => 'charttitle', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_charttitle' ) ),
|
| 128 | + array( 'name' => 'width', 'type' => 'int', 'description' => wfMsg( 'srf_paramdesc_chartwidth' ) ),
|
| 129 | + );
|
| 130 | + }
|
| 131 | +
|
| 132 | +}
|
Index: trunk/extensions/SemanticResultFormats/jqPlot/jqplot.canvasAxisTickRenderer.min.js |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +/** |
| 3 | + * Copyright (c) 2009 Chris Leonello |
| 4 | + * jqPlot is currently available for use in all personal or commercial projects |
| 5 | + * under both the MIT and GPL version 2.0 licenses. This means that you can |
| 6 | + * choose the license that best suits your project and use it accordingly. |
| 7 | + * |
| 8 | + * Although not required, the author would appreciate an email letting him |
| 9 | + * know of any substantial use of jqPlot. You can reach the author at: |
| 10 | + * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . |
| 11 | + * |
| 12 | + * If you are feeling kind and generous, consider supporting the project by |
| 13 | + * making a donation at: http://www.jqplot.com/donate.php . |
| 14 | + */ |
| 15 | +(function(a){a.jqplot.CanvasAxisTickRenderer=function(b){this.mark="outside";this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.angle=0;this.markSize=4;this.show=true;this.showLabel=true;this.labelPosition="auto";this.label="";this.value=null;this._styles={};this.formatter=a.jqplot.DefaultTickFormatter;this.formatString="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="11px";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=false;this.pt2px=null;this._elem;this._ctx;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null};a.extend(true,this,b);var e={fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily};if(this.pt2px){e.pt2px=this.pt2px}if(this.enableFontSupport){if(a.browser.safari){var d=a.browser.version.split(".");for(var c=0;c<d.length;c++){d[c]=Number(d[c])}if(d[0]>528||(d[0]==528&&d[1]>=16)){this._textRenderer=new a.jqplot.CanvasFontRenderer(e)}}else{if(a.browser.mozilla){var d=a.browser.version.split(".");if(d[0]>1||(d[0]==1&&d[1]>=9&&d[2]>0)){this._textRenderer=new a.jqplot.CanvasFontRenderer(e)}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(e)}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(e)}}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(e)}};a.jqplot.CanvasAxisTickRenderer.prototype.init=function(b){a.extend(true,this,b);this._textRenderer.init({fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily})};a.jqplot.CanvasAxisTickRenderer.prototype.getWidth=function(d){if(this._elem){return this._elem.outerWidth(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.sin(f.angle)*e)+Math.abs(Math.cos(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getHeight=function(d){if(this._elem){return this._elem.outerHeight(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.cos(f.angle)*e)+Math.abs(Math.sin(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getAngleRad=function(){var b=this.angle*Math.PI/180;return b};a.jqplot.CanvasAxisTickRenderer.prototype.setTick=function(b,d,c){this.value=b;if(c){this.isMinorTick=true}return this};a.jqplot.CanvasAxisTickRenderer.prototype.draw=function(c){if(!this.label){this.label=this.formatter(this.formatString,this.value)}var e=document.createElement("canvas");this._textRenderer.setText(this.label,c);var b=this.getWidth(c);var d=this.getHeight(c);e.width=b;e.height=d;e.style.width=b;e.style.height=d;e.style.textAlign="left";e.style.position="absolute";this._domelem=e;this._elem=a(e);this._elem.css(this._styles);this._elem.addClass("jqplot-"+this.axis+"-tick");return this._elem};a.jqplot.CanvasAxisTickRenderer.prototype.pack=function(){if(a.browser.msie){window.G_vmlCanvasManager.init_(document);this._domelem=window.G_vmlCanvasManager.initElement(this._domelem)}var b=this._elem.get(0).getContext("2d");this._textRenderer.draw(b,this.label)}})(jQuery); |
\ No newline at end of file |
Index: trunk/extensions/SemanticResultFormats/jqPlot/jqplot.pieRenderer.min.js |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +/** |
| 3 | + * Copyright (c) 2009 Chris Leonello |
| 4 | + * jqPlot is currently available for use in all personal or commercial projects |
| 5 | + * under both the MIT and GPL version 2.0 licenses. This means that you can |
| 6 | + * choose the license that best suits your project and use it accordingly. |
| 7 | + * |
| 8 | + * Although not required, the author would appreciate an email letting him |
| 9 | + * know of any substantial use of jqPlot. You can reach the author at: |
| 10 | + * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . |
| 11 | + * |
| 12 | + * If you are feeling kind and generous, consider supporting the project by |
| 13 | + * making a donation at: http://www.jqplot.com/donate.php . |
| 14 | + */ |
| 15 | +(function(b){b.jqplot.PieRenderer=function(){b.jqplot.LineRenderer.call(this)};b.jqplot.PieRenderer.prototype=new b.jqplot.LineRenderer();b.jqplot.PieRenderer.prototype.constructor=b.jqplot.PieRenderer;b.jqplot.PieRenderer.prototype.init=function(d){this.diameter=null;this.padding=20;this.sliceMargin=0;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.tickRenderer=b.jqplot.PieTickRenderer;b.extend(true,this,d);if(this.diameter!=null){this.diameter=this.diameter-this.sliceMargin}this._diameter=null};b.jqplot.PieRenderer.prototype.setGridData=function(d){};b.jqplot.PieRenderer.prototype.makeGridData=function(g,h){var d=[];var j=[];for(var f=0;f<g.length;f++){d.push(g[f][1]);j.push([g[f][0]]);if(f>0){d[f]+=d[f-1]}}var e=Math.PI*2/d[d.length-1];for(var f=0;f<d.length;f++){j[f][1]=d[f]*e}return j};b.jqplot.PieRenderer.prototype.drawSlice=function(n,l,k,f,h){var d=this._diameter/2;var m=this.fill;var j=this.lineWidth;n.save();n.translate(this.sliceMargin*Math.cos((l+k)/2),this.sliceMargin*Math.sin((l+k)/2));if(h){for(var g=0;g<this.shadowDepth;g++){n.save();n.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI),this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));e()}}else{e()}function e(){if(k>6.282){k=6.282;if(l>k){l=6.281}}n.beginPath();n.moveTo(0,0);n.fillStyle=f;n.strokeStyle=f;n.lineWidth=j;n.arc(0,0,d,l,k,false);n.closePath();if(m){n.fill()}else{n.stroke()}}if(h){for(var g=0;g<this.shadowDepth;g++){n.restore()}}n.restore()};b.jqplot.PieRenderer.prototype.draw=function(v,B,k){var y;var s=(k!=undefined)?k:{};var g=0;var f=0;var l=1;var e=new this.colorGenerator(this.seriesColors);if(k.legendInfo){var q=k.legendInfo;switch(q.location){case"nw":g=q.width+q.xoffset;break;case"w":g=q.width+q.xoffset;break;case"sw":g=q.width+q.xoffset;break;case"ne":g=q.width+q.xoffset;l=-1;break;case"e":g=q.width+q.xoffset;l=-1;break;case"se":g=q.width+q.xoffset;l=-1;break;case"n":f=q.height+q.yoffset;break;case"s":f=q.height+q.yoffset;l=-1;break;default:break}}var n=(s.shadow!=undefined)?s.shadow:this.shadow;var C=(s.showLine!=undefined)?s.showLine:this.showLine;var x=(s.fill!=undefined)?s.fill:this.fill;var j=v.canvas.width;var p=v.canvas.height;var o=j-g-2*this.padding;var z=p-f-2*this.padding;var A=Math.min(o,z);this._diameter=this.diameter||A-this.sliceMargin;var t=this._diameter/2;v.save();v.translate((j-l*g)/2+l*g,(p-l*f)/2+l*f);if(this.shadow){var u="rgba(0,0,0,"+this.shadowAlpha+")";for(var y=0;y<B.length;y++){var m=(y==0)?0:B[y-1][1];this.renderer.drawSlice.call(this,v,m,B[y][1],u,true)}}for(var y=0;y<B.length;y++){var m=(y==0)?0:B[y-1][1];this.renderer.drawSlice.call(this,v,m,B[y][1],e.next())}v.restore()};b.jqplot.PieAxisRenderer=function(){b.jqplot.LinearAxisRenderer.call(this)};b.jqplot.PieAxisRenderer.prototype=new b.jqplot.LinearAxisRenderer();b.jqplot.PieAxisRenderer.prototype.constructor=b.jqplot.PieAxisRenderer;b.jqplot.PieAxisRenderer.prototype.init=function(d){this.tickRenderer=b.jqplot.PieTickRenderer;b.extend(true,this,d);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};b.jqplot.PieLegendRenderer=function(){b.jqplot.TableLegendRenderer.call(this)};b.jqplot.PieLegendRenderer.prototype=new b.jqplot.TableLegendRenderer();b.jqplot.PieLegendRenderer.prototype.constructor=b.jqplot.PieLegendRenderer;b.jqplot.PieLegendRenderer.prototype.draw=function(){var k=this;if(this.show){var f=this._series;var m="position:absolute;";m+=(this.background)?"background:"+this.background+";":"";m+=(this.border)?"border:"+this.border+";":"";m+=(this.fontSize)?"font-size:"+this.fontSize+";":"";m+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";m+=(this.textColor)?"color:"+this.textColor+";":"";this._elem=b('<table class="jqplot-table-legend" style="'+m+'"></table>');var d=false;var l=f[0];var h=new l.colorGenerator(l.seriesColors);if(l.show){var j=l.data;for(var g=0;g<j.length;g++){var e=j[g][0].toString();if(e){this.renderer.addrow.call(this,e,h.next(),d);d=true}}}}return this._elem};function a(h,g,e){e=e||{};e.axesDefaults=e.axesDefaults||{};e.legend=e.legend||{};e.seriesDefaults=e.seriesDefaults||{};var d=false;if(e.seriesDefaults.renderer==b.jqplot.PieRenderer){d=true}else{if(e.series){for(var f=0;f<e.series.length;f++){if(e.series[f].renderer==b.jqplot.PieRenderer){d=true}}}}if(d){e.axesDefaults.renderer=b.jqplot.PieAxisRenderer;e.legend.renderer=b.jqplot.PieLegendRenderer;e.legend.preDraw=true}}function c(d){for(var e=0;e<this.series.length;e++){this.series[e].seriesColors=this.seriesColors;this.series[e].colorGenerator=this.colorGenerator}}b.jqplot.preInitHooks.push(a);b.jqplot.postParseOptionsHooks.push(c);b.jqplot.PieTickRenderer=function(){b.jqplot.AxisTickRenderer.call(this)};b.jqplot.PieTickRenderer.prototype=new b.jqplot.AxisTickRenderer();b.jqplot.PieTickRenderer.prototype.constructor=b.jqplot.PieTickRenderer})(jQuery); |
\ No newline at end of file |
Index: trunk/extensions/SemanticResultFormats/jqPlot/jqplot.trendline.min.js |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +/** |
| 3 | + * Copyright (c) 2009 Chris Leonello |
| 4 | + * jqPlot is currently available for use in all personal or commercial projects |
| 5 | + * under both the MIT and GPL version 2.0 licenses. This means that you can |
| 6 | + * choose the license that best suits your project and use it accordingly. |
| 7 | + * |
| 8 | + * Although not required, the author would appreciate an email letting him |
| 9 | + * know of any substantial use of jqPlot. You can reach the author at: |
| 10 | + * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . |
| 11 | + * |
| 12 | + * If you are feeling kind and generous, consider supporting the project by |
| 13 | + * making a donation at: http://www.jqplot.com/donate.php . |
| 14 | + */ |
| 15 | +(function(f){f.jqplot.Trendline=function(){this.show=f.jqplot.config.enablePlugins;this.color="#666666";this.renderer=new f.jqplot.LineRenderer();this.rendererOptions={marker:{show:false}};this.label="";this.type="linear";this.shadow=true;this.markerRenderer={show:false};this.lineWidth=1.5;this.shadowAngle=45;this.shadowOffset=1;this.shadowAlpha=0.07;this.shadowDepth=3};f.jqplot.postParseSeriesOptionsHooks.push(e);f.jqplot.postDrawSeriesHooks.push(g);f.jqplot.addLegendRowHooks.push(a);function a(k){var i=k.trendline.label.toString();var j=null;if(this.renderer.constructor!=f.jqplot.PieRenderer&&k.trendline.show&&i){j={label:i,color:k.trendline.color}}return j}function e(j,i){if(this.renderer.constructor!=f.jqplot.PieRenderer){this.trendline=new f.jqplot.Trendline();i=i||{};f.extend(true,this.trendline,{color:this.color},j.trendline,i.trendline);this.trendline.renderer.init.call(this.trendline,null)}}function g(m,i){i=f.extend(true,{},this.trendline,i);if(i.show&&this.renderer.constructor!=f.jqplot.PieRenderer){var k;var l=i.data||this.data;k=c(l,this.trendline.type);var j=i.gridData||this.renderer.makeGridData.call(this,k.data);this.trendline.renderer.draw.call(this.trendline,m,j,{showLine:true,shadow:this.trendline.shadow})}}function b(w,v,n){var u=(n==null)?"linear":n;var s=w.length;var t;var z;var o=0;var m=0;var r=0;var q=0;var l=0;var j=[];var k=[];if(u=="linear"){k=w;j=v}else{if(u=="exp"||u=="exponential"){for(var p=0;p<v.length;p++){if(v[p]<=0){s--}else{k.push(w[p]);j.push(Math.log(v[p]))}}}}for(var p=0;p<s;p++){o=o+k[p];m=m+j[p];q=q+k[p]*j[p];r=r+k[p]*k[p];l=l+j[p]*j[p]}t=(s*q-o*m)/(s*r-o*o);z=(m-t*o)/s;return[t,z]}function h(k,j){var i;i=b(k,j,"linear");return[i[0],i[1]]}function d(o,m){var k;var i=o;var n=m;k=b(i,n,"exp");var l=Math.exp(k[0]);var j=Math.exp(k[1]);return[l,j]}function c(l,j){var p=(j==null)?"linear":j;var n;var o;var r=[];var q=[];var m=[];for(k=0;k<l.length;k++){if(l[k]!=null&&l[k][0]!=null&&l[k][1]!=null){r.push(l[k][0]);q.push(l[k][1])}}if(p=="linear"){n=h(r,q);for(var k=0;k<r.length;k++){o=n[0]*r[k]+n[1];m.push([r[k],o])}}else{if(p=="exp"||p=="exponential"){n=d(r,q);for(var k=0;k<r.length;k++){o=n[1]*Math.pow(n[0],r[k]);m.push([r[k],o])}}}return{data:m,slope:n[0],intercept:n[1]}}})(jQuery); |
\ No newline at end of file |
Index: trunk/extensions/SemanticResultFormats/jqPlot/jqplot.canvasTextRenderer.min.js |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +/** |
| 3 | + * Copyright (c) 2009 Chris Leonello |
| 4 | + * jqPlot is currently available for use in all personal or commercial projects |
| 5 | + * under both the MIT and GPL version 2.0 licenses. This means that you can |
| 6 | + * choose the license that best suits your project and use it accordingly. |
| 7 | + * |
| 8 | + * Although not required, the author would appreciate an email letting him |
| 9 | + * know of any substantial use of jqPlot. You can reach the author at: |
| 10 | + * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . |
| 11 | + * |
| 12 | + * If you are feeling kind and generous, consider supporting the project by |
| 13 | + * making a donation at: http://www.jqplot.com/donate.php . |
| 14 | + */ |
| 15 | +(function(a){a.jqplot.CanvasTextRenderer=function(b){this.fontStyle="normal";this.fontVariant="normal";this.fontWeight="normal";this.fontSize="10px";this.fontFamily="sans-serif";this.fontStretch=1;this.fillStyle="#666666";this.angle=0;this.textAlign="start";this.textBaseline="alphabetic";this.text;this.width;this.height;this.pt2px=1.28;a.extend(true,this,b);this.normalizedFontSize=this.normalizeFontSize(this.fontSize);this.setHeight()};a.jqplot.CanvasTextRenderer.prototype.init=function(b){a.extend(true,this,b);this.normalizedFontSize=this.normalizeFontSize(this.fontSize);this.setHeight()};a.jqplot.CanvasTextRenderer.prototype.normalizeFontSize=function(b){b=String(b);n=parseFloat(b);if(b.indexOf("px")>-1){return n/this.pt2px}else{if(b.indexOf("pt")>-1){return n}else{if(b.indexOf("em")>-1){return n*12}else{if(b.indexOf("%")>-1){return n*12/100}else{return n/this.pt2px}}}}};a.jqplot.CanvasTextRenderer.prototype.fontWeight2Float=function(b){if(Number(b)){return b/400}else{switch(b){case"normal":return 1;break;case"bold":return 1.75;break;case"bolder":return 2.25;break;case"lighter":return 0.75;break;default:return 1;break}}};a.jqplot.CanvasTextRenderer.prototype.getText=function(){return this.text};a.jqplot.CanvasTextRenderer.prototype.setText=function(c,b){this.text=c;this.setWidth(b);return this};a.jqplot.CanvasTextRenderer.prototype.getWidth=function(b){return this.width};a.jqplot.CanvasTextRenderer.prototype.setWidth=function(c,b){if(!b){this.width=this.measure(c,this.text)}else{this.width=b}return this};a.jqplot.CanvasTextRenderer.prototype.getHeight=function(b){return this.height};a.jqplot.CanvasTextRenderer.prototype.setHeight=function(b){if(!b){this.height=this.normalizedFontSize*this.pt2px}else{this.height=b}return this};a.jqplot.CanvasTextRenderer.prototype.letter=function(b){return this.letters[b]};a.jqplot.CanvasTextRenderer.prototype.ascent=function(){return this.normalizedFontSize};a.jqplot.CanvasTextRenderer.prototype.descent=function(){return 7*this.normalizedFontSize/25};a.jqplot.CanvasTextRenderer.prototype.measure=function(d,f){var e=0;var b=f.length;for(i=0;i<b;i++){var g=this.letter(f.charAt(i));if(g){e+=g.width*this.normalizedFontSize/25*this.fontStretch}}return e};a.jqplot.CanvasTextRenderer.prototype.draw=function(t,o){var s=0;var p=this.height*0.72;var q=0;var l=o.length;var k=this.normalizedFontSize/25;t.save();var h,f;if((-Math.PI/2<=this.angle&&this.angle<=0)||(Math.PI*3/2<=this.angle&&this.angle<=Math.PI*2)){h=0;f=-Math.sin(this.angle)*this.width}else{if((0<this.angle&&this.angle<=Math.PI/2)||(-Math.PI*2<=this.angle&&this.angle<=-Math.PI*3/2)){h=Math.sin(this.angle)*this.height;f=0}else{if((-Math.PI<this.angle&&this.angle<-Math.PI/2)||(Math.PI<=this.angle&&this.angle<=Math.PI*3/2)){h=-Math.cos(this.angle)*this.width;f=-Math.sin(this.angle)*this.width-Math.cos(this.angle)*this.height}else{if((-Math.PI*3/2<this.angle&&this.angle<Math.PI)||(Math.PI/2<this.angle&&this.angle<Math.PI)){h=Math.sin(this.angle)*this.height-Math.cos(this.angle)*this.width;f=-Math.cos(this.angle)*this.height}}}}t.strokeStyle=this.fillStyle;t.fillStyle=this.fillStyle;t.translate(h,f);t.rotate(this.angle);t.lineCap="round";var u=(this.normalizedFontSize>30)?2:2+(30-this.normalizedFontSize)/20;t.lineWidth=u*k*this.fontWeight2Float(this.fontWeight);for(var g=0;g<l;g++){var m=this.letter(o.charAt(g));if(!m){continue}t.beginPath();var e=1;var b=0;for(var d=0;d<m.points.length;d++){var r=m.points[d];if(r[0]==-1&&r[1]==-1){e=1;continue}if(e){t.moveTo(s+r[0]*k*this.fontStretch,p-r[1]*k);e=false}else{t.lineTo(s+r[0]*k*this.fontStretch,p-r[1]*k)}}t.stroke();s+=m.width*k*this.fontStretch}t.restore();return q};a.jqplot.CanvasTextRenderer.prototype.letters={" ":{width:16,points:[]},"!":{width:10,points:[[5,21],[5,7],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},'"':{width:16,points:[[4,21],[4,14],[-1,-1],[12,21],[12,14]]},"#":{width:21,points:[[11,25],[4,-7],[-1,-1],[17,25],[10,-7],[-1,-1],[4,12],[18,12],[-1,-1],[3,6],[17,6]]},"$":{width:20,points:[[8,25],[8,-4],[-1,-1],[12,25],[12,-4],[-1,-1],[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},"%":{width:24,points:[[21,21],[3,0],[-1,-1],[8,21],[10,19],[10,17],[9,15],[7,14],[5,14],[3,16],[3,18],[4,20],[6,21],[8,21],[10,20],[13,19],[16,19],[19,20],[21,21],[-1,-1],[17,7],[15,6],[14,4],[14,2],[16,0],[18,0],[20,1],[21,3],[21,5],[19,7],[17,7]]},"&":{width:26,points:[[23,12],[23,13],[22,14],[21,14],[20,13],[19,11],[17,6],[15,3],[13,1],[11,0],[7,0],[5,1],[4,2],[3,4],[3,6],[4,8],[5,9],[12,13],[13,14],[14,16],[14,18],[13,20],[11,21],[9,20],[8,18],[8,16],[9,13],[11,10],[16,3],[18,1],[20,0],[22,0],[23,1],[23,2]]},"'":{width:10,points:[[5,19],[4,20],[5,21],[6,20],[6,18],[5,16],[4,15]]},"(":{width:14,points:[[11,25],[9,23],[7,20],[5,16],[4,11],[4,7],[5,2],[7,-2],[9,-5],[11,-7]]},")":{width:14,points:[[3,25],[5,23],[7,20],[9,16],[10,11],[10,7],[9,2],[7,-2],[5,-5],[3,-7]]},"*":{width:16,points:[[8,21],[8,9],[-1,-1],[3,18],[13,12],[-1,-1],[13,18],[3,12]]},"+":{width:26,points:[[13,18],[13,0],[-1,-1],[4,9],[22,9]]},",":{width:10,points:[[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"-":{width:18,points:[[6,9],[12,9]]},".":{width:10,points:[[5,2],[4,1],[5,0],[6,1],[5,2]]},"/":{width:22,points:[[20,25],[2,-7]]},"0":{width:20,points:[[9,21],[6,20],[4,17],[3,12],[3,9],[4,4],[6,1],[9,0],[11,0],[14,1],[16,4],[17,9],[17,12],[16,17],[14,20],[11,21],[9,21]]},"1":{width:20,points:[[6,17],[8,18],[11,21],[11,0]]},"2":{width:20,points:[[4,16],[4,17],[5,19],[6,20],[8,21],[12,21],[14,20],[15,19],[16,17],[16,15],[15,13],[13,10],[3,0],[17,0]]},"3":{width:20,points:[[5,21],[16,21],[10,13],[13,13],[15,12],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},"4":{width:20,points:[[13,21],[3,7],[18,7],[-1,-1],[13,21],[13,0]]},"5":{width:20,points:[[15,21],[5,21],[4,12],[5,13],[8,14],[11,14],[14,13],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},"6":{width:20,points:[[16,18],[15,20],[12,21],[10,21],[7,20],[5,17],[4,12],[4,7],[5,3],[7,1],[10,0],[11,0],[14,1],[16,3],[17,6],[17,7],[16,10],[14,12],[11,13],[10,13],[7,12],[5,10],[4,7]]},"7":{width:20,points:[[17,21],[7,0],[-1,-1],[3,21],[17,21]]},"8":{width:20,points:[[8,21],[5,20],[4,18],[4,16],[5,14],[7,13],[11,12],[14,11],[16,9],[17,7],[17,4],[16,2],[15,1],[12,0],[8,0],[5,1],[4,2],[3,4],[3,7],[4,9],[6,11],[9,12],[13,13],[15,14],[16,16],[16,18],[15,20],[12,21],[8,21]]},"9":{width:20,points:[[16,14],[15,11],[13,9],[10,8],[9,8],[6,9],[4,11],[3,14],[3,15],[4,18],[6,20],[9,21],[10,21],[13,20],[15,18],[16,14],[16,9],[15,4],[13,1],[10,0],[8,0],[5,1],[4,3]]},":":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},";":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"<":{width:24,points:[[20,18],[4,9],[20,0]]},"=":{width:26,points:[[4,12],[22,12],[-1,-1],[4,6],[22,6]]},">":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};a.jqplot.CanvasFontRenderer=function(b){b=b||{};if(!b.pt2px){b.pt2px=1.5}a.jqplot.CanvasTextRenderer.call(this,b)};a.jqplot.CanvasFontRenderer.prototype=new a.jqplot.CanvasTextRenderer({});a.jqplot.CanvasFontRenderer.prototype.constructor=a.jqplot.CanvasFontRenderer;a.jqplot.CanvasFontRenderer.prototype.measure=function(c,e){var d=this.fontSize+" "+this.fontFamily;c.save();c.font=d;var b=c.measureText(e).width;c.restore();return b};a.jqplot.CanvasFontRenderer.prototype.draw=function(e,g){var c=0;var h=this.height*0.72;e.save();var d,b;if((-Math.PI/2<=this.angle&&this.angle<=0)||(Math.PI*3/2<=this.angle&&this.angle<=Math.PI*2)){d=0;b=-Math.sin(this.angle)*this.width}else{if((0<this.angle&&this.angle<=Math.PI/2)||(-Math.PI*2<=this.angle&&this.angle<=-Math.PI*3/2)){d=Math.sin(this.angle)*this.height;b=0}else{if((-Math.PI<this.angle&&this.angle<-Math.PI/2)||(Math.PI<=this.angle&&this.angle<=Math.PI*3/2)){d=-Math.cos(this.angle)*this.width;b=-Math.sin(this.angle)*this.width-Math.cos(this.angle)*this.height}else{if((-Math.PI*3/2<this.angle&&this.angle<Math.PI)||(Math.PI/2<this.angle&&this.angle<Math.PI)){d=Math.sin(this.angle)*this.height-Math.cos(this.angle)*this.width;b=-Math.cos(this.angle)*this.height}}}}e.strokeStyle=this.fillStyle;e.fillStyle=this.fillStyle;var f=this.fontSize+" "+this.fontFamily;e.font=f;e.translate(d,b);e.rotate(this.angle);e.fillText(g,c,h);e.restore()}})(jQuery); |
\ No newline at end of file |
Index: trunk/extensions/SemanticResultFormats/jqPlot/jquery-1.4.2.min.js |
— | — | @@ -0,0 +1,471 @@ |
| 2 | + |
| 3 | +(function(window,undefined){var jQuery=function(selector,context){return new jQuery.fn.init(selector,context);},_jQuery=window.jQuery,_$=window.$,document=window.document,rootjQuery,quickExpr=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/,rnotwhite=/\S/,rtrim=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,userAgent=navigator.userAgent,browserMatch,readyBound=false,readyList=[],DOMContentLoaded,toString=Object.prototype.toString,hasOwnProperty=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,indexOf=Array.prototype.indexOf;jQuery.fn=jQuery.prototype={init:function(selector,context){var match,elem,ret,doc;if(!selector){return this;} |
| 4 | +if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;} |
| 5 | +if(selector==="body"&&!context){this.context=document;this[0]=document.body;this.selector="body";this.length=1;return this;} |
| 6 | +if(typeof selector==="string"){match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(jQuery.isPlainObject(context)){selector=[document.createElement(ret[1])];jQuery.fn.attr.call(selector,context,true);}else{selector=[doc.createElement(ret[1])];}}else{ret=buildFragment([match[1]],[doc]);selector=(ret.cacheable?ret.fragment.cloneNode(true):ret.fragment).childNodes;} |
| 7 | +return jQuery.merge(this,selector);}else{elem=document.getElementById(match[2]);if(elem){if(elem.id!==match[2]){return rootjQuery.find(selector);} |
| 8 | +this.length=1;this[0]=elem;} |
| 9 | +this.context=document;this.selector=selector;return this;}}else if(!context&&/^\w+$/.test(selector)){this.selector=selector;this.context=document;selector=document.getElementsByTagName(selector);return jQuery.merge(this,selector);}else if(!context||context.jquery){return(context||rootjQuery).find(selector);}else{return jQuery(context).find(selector);}}else if(jQuery.isFunction(selector)){return rootjQuery.ready(selector);} |
| 10 | +if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;} |
| 11 | +return jQuery.makeArray(selector,this);},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length;},toArray:function(){return slice.call(this,0);},get:function(num){return num==null?this.toArray():(num<0?this.slice(num)[0]:this[num]);},pushStack:function(elems,name,selector){var ret=jQuery();if(jQuery.isArray(elems)){push.apply(ret,elems);}else{jQuery.merge(ret,elems);} |
| 12 | +ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else if(name){ret.selector=this.selector+"."+name+"("+selector+")";} |
| 13 | +return ret;},each:function(callback,args){return jQuery.each(this,callback,args);},ready:function(fn){jQuery.bindReady();if(jQuery.isReady){fn.call(document,jQuery);}else if(readyList){readyList.push(fn);} |
| 14 | +return this;},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},end:function(){return this.prevObject||jQuery(null);},push:push,sort:[].sort,splice:[].splice};jQuery.fn.init.prototype=jQuery.fn;jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options,name,src,copy;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;} |
| 15 | +if(typeof target!=="object"&&!jQuery.isFunction(target)){target={};} |
| 16 | +if(length===i){target=this;--i;} |
| 17 | +for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;} |
| 18 | +if(deep&©&&(jQuery.isPlainObject(copy)||jQuery.isArray(copy))){var clone=src&&(jQuery.isPlainObject(src)||jQuery.isArray(src))?src:jQuery.isArray(copy)?[]:{};target[name]=jQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}} |
| 19 | +return target;};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery;} |
| 20 | +return jQuery;},isReady:false,ready:function(){if(!jQuery.isReady){if(!document.body){return setTimeout(jQuery.ready,13);} |
| 21 | +jQuery.isReady=true;if(readyList){var fn,i=0;while((fn=readyList[i++])){fn.call(document,jQuery);} |
| 22 | +readyList=null;} |
| 23 | +if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");}}},bindReady:function(){if(readyBound){return;} |
| 24 | +readyBound=true;if(document.readyState==="complete"){return jQuery.ready();} |
| 25 | +if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",jQuery.ready,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",jQuery.ready);var toplevel=false;try{toplevel=window.frameElement==null;}catch(e){} |
| 26 | +if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}},isFunction:function(obj){return toString.call(obj)==="[object Function]";},isArray:function(obj){return toString.call(obj)==="[object Array]";},isPlainObject:function(obj){if(!obj||toString.call(obj)!=="[object Object]"||obj.nodeType||obj.setInterval){return false;} |
| 27 | +if(obj.constructor&&!hasOwnProperty.call(obj,"constructor")&&!hasOwnProperty.call(obj.constructor.prototype,"isPrototypeOf")){return false;} |
| 28 | +var key;for(key in obj){} |
| 29 | +return key===undefined||hasOwnProperty.call(obj,key);},isEmptyObject:function(obj){for(var name in obj){return false;} |
| 30 | +return true;},error:function(msg){throw msg;},parseJSON:function(data){if(typeof data!=="string"||!data){return null;} |
| 31 | +data=jQuery.trim(data);if(/^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return window.JSON&&window.JSON.parse?window.JSON.parse(data):(new Function("return "+data))();}else{jQuery.error("Invalid JSON: "+data);}},noop:function(){},globalEval:function(data){if(data&&rnotwhite.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data));}else{script.text=data;} |
| 32 | +head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||jQuery.isFunction(object);if(args){if(isObj){for(name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break;}}}}else{if(isObj){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}} |
| 33 | +return object;},trim:function(text){return(text||"").replace(rtrim,"");},makeArray:function(array,results){var ret=results||[];if(array!=null){if(array.length==null||typeof array==="string"||jQuery.isFunction(array)||(typeof array!=="function"&&array.setInterval)){push.call(ret,array);}else{jQuery.merge(ret,array);}} |
| 34 | +return ret;},inArray:function(elem,array){if(array.indexOf){return array.indexOf(elem);} |
| 35 | +for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i;}} |
| 36 | +return-1;},merge:function(first,second){var i=first.length,j=0;if(typeof second.length==="number"){for(var l=second.length;j<l;j++){first[i++]=second[j];}}else{while(second[j]!==undefined){first[i++]=second[j++];}} |
| 37 | +first.length=i;return first;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!==!callback(elems[i],i)){ret.push(elems[i]);}} |
| 38 | +return ret;},map:function(elems,callback,arg){var ret=[],value;for(var i=0,length=elems.length;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret[ret.length]=value;}} |
| 39 | +return ret.concat.apply([],ret);},guid:1,proxy:function(fn,proxy,thisObject){if(arguments.length===2){if(typeof proxy==="string"){thisObject=fn;fn=thisObject[proxy];proxy=undefined;}else if(proxy&&!jQuery.isFunction(proxy)){thisObject=proxy;proxy=undefined;}} |
| 40 | +if(!proxy&&fn){proxy=function(){return fn.apply(thisObject||this,arguments);};} |
| 41 | +if(fn){proxy.guid=fn.guid=fn.guid||proxy.guid||jQuery.guid++;} |
| 42 | +return proxy;},uaMatch:function(ua){ua=ua.toLowerCase();var match=/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||!/compatible/.test(ua)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};},browser:{}});browserMatch=jQuery.uaMatch(userAgent);if(browserMatch.browser){jQuery.browser[browserMatch.browser]=true;jQuery.browser.version=browserMatch.version;} |
| 43 | +if(jQuery.browser.webkit){jQuery.browser.safari=true;} |
| 44 | +if(indexOf){jQuery.inArray=function(elem,array){return indexOf.call(array,elem);};} |
| 45 | +rootjQuery=jQuery(document);if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);jQuery.ready();};}else if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);jQuery.ready();}};} |
| 46 | +function doScrollCheck(){if(jQuery.isReady){return;} |
| 47 | +try{document.documentElement.doScroll("left");}catch(error){setTimeout(doScrollCheck,1);return;} |
| 48 | +jQuery.ready();} |
| 49 | +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||"");} |
| 50 | +if(elem.parentNode){elem.parentNode.removeChild(elem);}} |
| 51 | +function access(elems,key,value,exec,fn,pass){var length=elems.length;if(typeof key==="object"){for(var k in key){access(elems,k,key[k],exec,fn,value);} |
| 52 | +return elems;} |
| 53 | +if(value!==undefined){exec=!pass&&exec&&jQuery.isFunction(value);for(var i=0;i<length;i++){fn(elems[i],key,exec?value.call(elems[i],i,fn(elems[i],key)):value,pass);} |
| 54 | +return elems;} |
| 55 | +return length?fn(elems[0],key):undefined;} |
| 56 | +function now(){return(new Date).getTime();} |
| 57 | +(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+now();div.style.display="none";div.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;} |
| 58 | +jQuery.support={leadingWhitespace:div.firstChild.nodeType===3,tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:/^0.55$/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:div.getElementsByTagName("input")[0].value==="on",optSelected:document.createElement("select").appendChild(document.createElement("option")).selected,parentNode:div.removeChild(div.appendChild(document.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){} |
| 59 | +root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];} |
| 60 | +try{delete script.test;}catch(e){jQuery.support.deleteExpando=false;} |
| 61 | +root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function click(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",click);});div.cloneNode(true).fireEvent("onclick");} |
| 62 | +div=document.createElement("div");div.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var fragment=document.createDocumentFragment();fragment.appendChild(div.firstChild);jQuery.support.checkClone=fragment.cloneNode(true).cloneNode(true).lastChild.checked;jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display='none';div=null;});var eventSupported=function(eventName){var el=document.createElement("div");eventName="on"+eventName;var isSupported=(eventName in el);if(!isSupported){el.setAttribute(eventName,"return;");isSupported=typeof el[eventName]==="function";} |
| 63 | +el=null;return isSupported;};jQuery.support.submitBubbles=eventSupported("submit");jQuery.support.changeBubbles=eventSupported("change");root=script=div=all=a=null;})();jQuery.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},expando:expando,noData:{"embed":true,"object":true,"applet":true},data:function(elem,name,data){if(elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()]){return;} |
| 64 | +elem=elem==window?windowData:elem;var id=elem[expando],cache=jQuery.cache,thisCache;if(!id&&typeof name==="string"&&data===undefined){return null;} |
| 65 | +if(!id){id=++uuid;} |
| 66 | +if(typeof name==="object"){elem[expando]=id;thisCache=cache[id]=jQuery.extend(true,{},name);}else if(!cache[id]){elem[expando]=id;cache[id]={};} |
| 67 | +thisCache=cache[id];if(data!==undefined){thisCache[name]=data;} |
| 68 | +return typeof name==="string"?thisCache[name]:thisCache;},removeData:function(elem,name){if(elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()]){return;} |
| 69 | +elem=elem==window?windowData:elem;var id=elem[expando],cache=jQuery.cache,thisCache=cache[id];if(name){if(thisCache){delete thisCache[name];if(jQuery.isEmptyObject(thisCache)){jQuery.removeData(elem);}}}else{if(jQuery.support.deleteExpando){delete elem[jQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(jQuery.expando);} |
| 70 | +delete cache[id];}}});jQuery.fn.extend({data:function(key,value){if(typeof key==="undefined"&&this.length){return jQuery.data(this[0]);}else if(typeof key==="object"){return this.each(function(){jQuery.data(this,key);});} |
| 71 | +var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key);} |
| 72 | +return data===undefined&&parts[1]?this.data(parts[0]):data;}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});}});jQuery.extend({queue:function(elem,type,data){if(!elem){return;} |
| 73 | +type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!data){return q||[];} |
| 74 | +if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data));}else{q.push(data);} |
| 75 | +return q;},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),fn=queue.shift();if(fn==="inprogress"){fn=queue.shift();} |
| 76 | +if(fn){if(type==="fx"){queue.unshift("inprogress");} |
| 77 | +fn.call(elem,function(){jQuery.dequeue(elem,type);});}}});jQuery.fn.extend({queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";} |
| 78 | +if(data===undefined){return jQuery.queue(this[0],type);} |
| 79 | +return this.each(function(i,elem){var queue=jQuery.queue(this,type,data);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});},delay:function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(){var elem=this;setTimeout(function(){jQuery.dequeue(elem,type);},time);});},clearQueue:function(type){return this.queue(type||"fx",[]);}});var rclass=/[\n\t]/g,rspace=/\s+/,rreturn=/\r/g,rspecialurl=/href|src|style/,rtype=/(button|input)/i,rfocusable=/(button|input|object|select|textarea)/i,rclickable=/^(a|area)$/i,rradiocheck=/radio|checkbox/;jQuery.fn.extend({attr:function(name,value){return access(this,name,value,true,jQuery.attr);},removeAttr:function(name,fn){return this.each(function(){jQuery.attr(this,name,"");if(this.nodeType===1){this.removeAttribute(name);}});},addClass:function(value){if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);self.addClass(value.call(this,i,self.attr("class")));});} |
| 80 | +if(value&&typeof value==="string"){var classNames=(value||"").split(rspace);for(var i=0,l=this.length;i<l;i++){var elem=this[i];if(elem.nodeType===1){if(!elem.className){elem.className=value;}else{var className=" "+elem.className+" ",setClass=elem.className;for(var c=0,cl=classNames.length;c<cl;c++){if(className.indexOf(" "+classNames[c]+" ")<0){setClass+=" "+classNames[c];}} |
| 81 | +elem.className=jQuery.trim(setClass);}}}} |
| 82 | +return this;},removeClass:function(value){if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);self.removeClass(value.call(this,i,self.attr("class")));});} |
| 83 | +if((value&&typeof value==="string")||value===undefined){var classNames=(value||"").split(rspace);for(var i=0,l=this.length;i<l;i++){var elem=this[i];if(elem.nodeType===1&&elem.className){if(value){var className=(" "+elem.className+" ").replace(rclass," ");for(var c=0,cl=classNames.length;c<cl;c++){className=className.replace(" "+classNames[c]+" "," ");} |
| 84 | +elem.className=jQuery.trim(className);}else{elem.className="";}}}} |
| 85 | +return this;},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal==="boolean";if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);self.toggleClass(value.call(this,i,self.attr("class"),stateVal),stateVal);});} |
| 86 | +return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),state=stateVal,classNames=value.split(rspace);while((className=classNames[i++])){state=isBool?state:!self.hasClass(className);self[state?"addClass":"removeClass"](className);}}else if(type==="undefined"||type==="boolean"){if(this.className){jQuery.data(this,"__className__",this.className);} |
| 87 | +this.className=this.className||value===false?"":jQuery.data(this,"__className__")||"";}});},hasClass:function(selector){var className=" "+selector+" ";for(var i=0,l=this.length;i<l;i++){if((" "+this[i].className+" ").replace(rclass," ").indexOf(className)>-1){return true;}} |
| 88 | +return false;},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text;} |
| 89 | +if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one";if(index<0){return null;} |
| 90 | +for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value;} |
| 91 | +values.push(value);}} |
| 92 | +return values;} |
| 93 | +if(rradiocheck.test(elem.type)&&!jQuery.support.checkOn){return elem.getAttribute("value")===null?"on":elem.value;} |
| 94 | +return(elem.value||"").replace(rreturn,"");} |
| 95 | +return undefined;} |
| 96 | +var isFunction=jQuery.isFunction(value);return this.each(function(i){var self=jQuery(this),val=value;if(this.nodeType!==1){return;} |
| 97 | +if(isFunction){val=value.call(this,i,self.val());} |
| 98 | +if(typeof val==="number"){val+="";} |
| 99 | +if(jQuery.isArray(val)&&rradiocheck.test(this.type)){this.checked=jQuery.inArray(self.val(),val)>=0;}else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(val);jQuery("option",this).each(function(){this.selected=jQuery.inArray(jQuery(this).val(),values)>=0;});if(!values.length){this.selectedIndex=-1;}}else{this.value=val;}});}});jQuery.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(elem,name,value,pass){if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;} |
| 100 | +if(pass&&name in jQuery.attrFn){return jQuery(elem)[name](value);} |
| 101 | +var notxml=elem.nodeType!==1||!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.nodeType===1){var special=rspecialurl.test(name);if(name==="selected"&&!jQuery.support.optSelected){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}} |
| 102 | +if(name in elem&¬xml&&!special){if(set){if(name==="type"&&rtype.test(elem.nodeName)&&elem.parentNode){jQuery.error("type property can't be changed");} |
| 103 | +elem[name]=value;} |
| 104 | +if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue;} |
| 105 | +if(name==="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined;} |
| 106 | +return elem[name];} |
| 107 | +if(!jQuery.support.style&¬xml&&name==="style"){if(set){elem.style.cssText=""+value;} |
| 108 | +return elem.style.cssText;} |
| 109 | +if(set){elem.setAttribute(name,""+value);} |
| 110 | +var attr=!jQuery.support.hrefNormalized&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;} |
| 111 | +return jQuery.style(elem,name,value);}});var rnamespaces=/\.(.*)$/,fcleanup=function(nm){return nm.replace(/[^\w\s\.\|`]/g,function(ch){return"\\"+ch;});};jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType===3||elem.nodeType===8){return;} |
| 112 | +if(elem.setInterval&&(elem!==window&&!elem.frameElement)){elem=window;} |
| 113 | +var handleObjIn,handleObj;if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;} |
| 114 | +if(!handler.guid){handler.guid=jQuery.guid++;} |
| 115 | +var elemData=jQuery.data(elem);if(!elemData){return;} |
| 116 | +var events=elemData.events=elemData.events||{},eventHandle=elemData.handle,eventHandle;if(!eventHandle){elemData.handle=eventHandle=function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(eventHandle.elem,arguments):undefined;};} |
| 117 | +eventHandle.elem=elem;types=types.split(" ");var type,i=0,namespaces;while((type=types[i++])){handleObj=handleObjIn?jQuery.extend({},handleObjIn):{handler:handler,data:data};if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();handleObj.namespace=namespaces.slice(0).sort().join(".");}else{namespaces=[];handleObj.namespace="";} |
| 118 | +handleObj.type=type;handleObj.guid=handler.guid;var handlers=events[type],special=jQuery.event.special[type]||{};if(!handlers){handlers=events[type]=[];if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false);}else if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}} |
| 119 | +if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}} |
| 120 | +handlers.push(handleObj);jQuery.event.global[type]=true;} |
| 121 | +elem=null;},global:{},remove:function(elem,types,handler,pos){if(elem.nodeType===3||elem.nodeType===8){return;} |
| 122 | +var ret,type,fn,i=0,all,namespaces,namespace,special,eventType,handleObj,origType,elemData=jQuery.data(elem),events=elemData&&elemData.events;if(!elemData||!events){return;} |
| 123 | +if(types&&types.type){handler=types.handler;types=types.type;} |
| 124 | +if(!types||typeof types==="string"&&types.charAt(0)==="."){types=types||"";for(type in events){jQuery.event.remove(elem,type+types);} |
| 125 | +return;} |
| 126 | +types=types.split(" ");while((type=types[i++])){origType=type;handleObj=null;all=type.indexOf(".")<0;namespaces=[];if(!all){namespaces=type.split(".");type=namespaces.shift();namespace=new RegExp("(^|\\.)"+ |
| 127 | +jQuery.map(namespaces.slice(0).sort(),fcleanup).join("\\.(?:.*\\.)?")+"(\\.|$)")} |
| 128 | +eventType=events[type];if(!eventType){continue;} |
| 129 | +if(!handler){for(var j=0;j<eventType.length;j++){handleObj=eventType[j];if(all||namespace.test(handleObj.namespace)){jQuery.event.remove(elem,origType,handleObj.handler,j);eventType.splice(j--,1);}} |
| 130 | +continue;} |
| 131 | +special=jQuery.event.special[type]||{};for(var j=pos||0;j<eventType.length;j++){handleObj=eventType[j];if(handler.guid===handleObj.guid){if(all||namespace.test(handleObj.namespace)){if(pos==null){eventType.splice(j--,1);} |
| 132 | +if(special.remove){special.remove.call(elem,handleObj);}} |
| 133 | +if(pos!=null){break;}}} |
| 134 | +if(eventType.length===0||pos!=null&&eventType.length===1){if(!special.teardown||special.teardown.call(elem,namespaces)===false){removeEvent(elem,type,elemData.handle);} |
| 135 | +ret=null;delete events[type];}} |
| 136 | +if(jQuery.isEmptyObject(events)){var handle=elemData.handle;if(handle){handle.elem=null;} |
| 137 | +delete elemData.events;delete elemData.handle;if(jQuery.isEmptyObject(elemData)){jQuery.removeData(elem);}}},trigger:function(event,data,elem){var type=event.type||event,bubbling=arguments[3];if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;} |
| 138 | +if(!elem){event.stopPropagation();if(jQuery.event.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem);}});}} |
| 139 | +if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;} |
| 140 | +event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);} |
| 141 | +event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data);} |
| 142 | +var parent=elem.parentNode||elem.ownerDocument;try{if(!(elem&&elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()])){if(elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false;}}}catch(e){} |
| 143 | +if(!event.isPropagationStopped()&&parent){jQuery.event.trigger(event,data,parent,true);}else if(!event.isDefaultPrevented()){var target=event.target,old,isClick=jQuery.nodeName(target,"a")&&type==="click",special=jQuery.event.special[type]||{};if((!special._default||special._default.call(elem,event)===false)&&!isClick&&!(target&&target.nodeName&&jQuery.noData[target.nodeName.toLowerCase()])){try{if(target[type]){old=target["on"+type];if(old){target["on"+type]=null;} |
| 144 | +jQuery.event.triggered=true;target[type]();}}catch(e){} |
| 145 | +if(old){target["on"+type]=old;} |
| 146 | +jQuery.event.triggered=false;}}},handle:function(event){var all,handlers,namespaces,namespace,events;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;all=event.type.indexOf(".")<0&&!event.exclusive;if(!all){namespaces=event.type.split(".");event.type=namespaces.shift();namespace=new RegExp("(^|\\.)"+namespaces.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");} |
| 147 | +var events=jQuery.data(this,"events"),handlers=events[event.type];if(events&&handlers){handlers=handlers.slice(0);for(var j=0,l=handlers.length;j<l;j++){var handleObj=handlers[j];if(all||namespace.test(handleObj.namespace)){event.handler=handleObj.handler;event.data=handleObj.data;event.handleObj=handleObj;var ret=handleObj.handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}} |
| 148 | +if(event.isImmediatePropagationStopped()){break;}}}} |
| 149 | +return event.result;},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event;} |
| 150 | +var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];} |
| 151 | +if(!event.target){event.target=event.srcElement||document;} |
| 152 | +if(event.target.nodeType===3){event.target=event.target.parentNode;} |
| 153 | +if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement===event.target?event.toElement:event.fromElement;} |
| 154 | +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&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);} |
| 155 | +if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode;} |
| 156 | +if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;} |
| 157 | +if(!event.which&&event.button!==undefined){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));} |
| 158 | +return event;},guid:1E8,proxy:jQuery.proxy,special:{ready:{setup:jQuery.bindReady,teardown:jQuery.noop},live:{add:function(handleObj){jQuery.event.add(this,handleObj.origType,jQuery.extend({},handleObj,{handler:liveHandler}));},remove:function(handleObj){var remove=true,type=handleObj.origType.replace(rnamespaces,"");jQuery.each(jQuery.data(this,"events").live||[],function(){if(type===this.origType.replace(rnamespaces,"")){remove=false;return false;}});if(remove){jQuery.event.remove(this,handleObj.origType,liveHandler);}}},beforeunload:{setup:function(data,namespaces,eventHandle){if(this.setInterval){this.onbeforeunload=eventHandle;} |
| 159 | +return false;},teardown:function(namespaces,eventHandle){if(this.onbeforeunload===eventHandle){this.onbeforeunload=null;}}}}};var removeEvent=document.removeEventListener?function(elem,type,handle){elem.removeEventListener(type,handle,false);}:function(elem,type,handle){elem.detachEvent("on"+type,handle);};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src);} |
| 160 | +if(src&&src.type){this.originalEvent=src;this.type=src.type;}else{this.type=src;} |
| 161 | +this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;} |
| 162 | +function returnTrue(){return true;} |
| 163 | +jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;} |
| 164 | +if(e.preventDefault){e.preventDefault();} |
| 165 | +e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return;} |
| 166 | +if(e.stopPropagation){e.stopPropagation();} |
| 167 | +e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;try{while(parent&&parent!==this){parent=parent.parentNode;} |
| 168 | +if(parent!==this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}}catch(e){}},delegate=function(event){event.type=event.data;jQuery.event.handle.apply(this,arguments);};jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){jQuery.event.special[orig]={setup:function(data){jQuery.event.add(this,fix,data&&data.selector?delegate:withinElement,orig);},teardown:function(data){jQuery.event.remove(this,fix,data&&data.selector?delegate:withinElement);}};});if(!jQuery.support.submitBubbles){jQuery.event.special.submit={setup:function(data,namespaces){if(this.nodeName.toLowerCase()!=="form"){jQuery.event.add(this,"click.specialSubmit",function(e){var elem=e.target,type=elem.type;if((type==="submit"||type==="image")&&jQuery(elem).closest("form").length){return trigger("submit",this,arguments);}});jQuery.event.add(this,"keypress.specialSubmit",function(e){var elem=e.target,type=elem.type;if((type==="text"||type==="password")&&jQuery(elem).closest("form").length&&e.keyCode===13){return trigger("submit",this,arguments);}});}else{return false;}},teardown:function(namespaces){jQuery.event.remove(this,".specialSubmit");}};} |
| 169 | +if(!jQuery.support.changeBubbles){var formElems=/textarea|input|select/i,changeFilters,getVal=function(elem){var type=elem.type,val=elem.value;if(type==="radio"||type==="checkbox"){val=elem.checked;}else if(type==="select-multiple"){val=elem.selectedIndex>-1?jQuery.map(elem.options,function(elem){return elem.selected;}).join("-"):"";}else if(elem.nodeName.toLowerCase()==="select"){val=elem.selectedIndex;} |
| 170 | +return val;},testChange=function testChange(e){var elem=e.target,data,val;if(!formElems.test(elem.nodeName)||elem.readOnly){return;} |
| 171 | +data=jQuery.data(elem,"_change_data");val=getVal(elem);if(e.type!=="focusout"||elem.type!=="radio"){jQuery.data(elem,"_change_data",val);} |
| 172 | +if(data===undefined||val===data){return;} |
| 173 | +if(data!=null||val){e.type="change";return jQuery.event.trigger(e,arguments[1],elem);}};jQuery.event.special.change={filters:{focusout:testChange,click:function(e){var elem=e.target,type=elem.type;if(type==="radio"||type==="checkbox"||elem.nodeName.toLowerCase()==="select"){return testChange.call(this,e);}},keydown:function(e){var elem=e.target,type=elem.type;if((e.keyCode===13&&elem.nodeName.toLowerCase()!=="textarea")||(e.keyCode===32&&(type==="checkbox"||type==="radio"))||type==="select-multiple"){return testChange.call(this,e);}},beforeactivate:function(e){var elem=e.target;jQuery.data(elem,"_change_data",getVal(elem));}},setup:function(data,namespaces){if(this.type==="file"){return false;} |
| 174 | +for(var type in changeFilters){jQuery.event.add(this,type+".specialChange",changeFilters[type]);} |
| 175 | +return formElems.test(this.nodeName);},teardown:function(namespaces){jQuery.event.remove(this,".specialChange");return formElems.test(this.nodeName);}};changeFilters=jQuery.event.special.change.filters;} |
| 176 | +function trigger(type,elem,args){args[0].type=type;return jQuery.event.handle.apply(elem,args);} |
| 177 | +if(document.addEventListener){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){jQuery.event.special[fix]={setup:function(){this.addEventListener(orig,handler,true);},teardown:function(){this.removeEventListener(orig,handler,true);}};function handler(e){e=jQuery.event.fix(e);e.type=fix;return jQuery.event.handle.call(this,e);}});} |
| 178 | +jQuery.each(["bind","one"],function(i,name){jQuery.fn[name]=function(type,data,fn){if(typeof type==="object"){for(var key in type){this[name](key,data,type[key],fn);} |
| 179 | +return this;} |
| 180 | +if(jQuery.isFunction(data)){fn=data;data=undefined;} |
| 181 | +var handler=name==="one"?jQuery.proxy(fn,function(event){jQuery(this).unbind(event,handler);return fn.apply(this,arguments);}):fn;if(type==="unload"&&name!=="one"){this.one(type,data,fn);}else{for(var i=0,l=this.length;i<l;i++){jQuery.event.add(this[i],type,handler,data);}} |
| 182 | +return this;};});jQuery.fn.extend({unbind:function(type,fn){if(typeof type==="object"&&!type.preventDefault){for(var key in type){this.unbind(key,type[key]);}}else{for(var i=0,l=this.length;i<l;i++){jQuery.event.remove(this[i],type,fn);}} |
| 183 | +return this;},delegate:function(selector,types,data,fn){return this.live(types,data,fn,selector);},undelegate:function(selector,types,fn){if(arguments.length===0){return this.unbind("live");}else{return this.die(types,null,fn,selector);}},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.proxy(fn,args[i++]);} |
| 184 | +return this.click(jQuery.proxy(fn,function(event){var lastToggle=(jQuery.data(this,"lastToggle"+fn.guid)||0)%i;jQuery.data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});var liveMap={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};jQuery.each(["live","die"],function(i,name){jQuery.fn[name]=function(types,data,fn,origSelector){var type,i=0,match,namespaces,preType,selector=origSelector||this.selector,context=origSelector?this:jQuery(this.context);if(jQuery.isFunction(data)){fn=data;data=undefined;} |
| 185 | +types=(types||"").split(" ");while((type=types[i++])!=null){match=rnamespaces.exec(type);namespaces="";if(match){namespaces=match[0];type=type.replace(rnamespaces,"");} |
| 186 | +if(type==="hover"){types.push("mouseenter"+namespaces,"mouseleave"+namespaces);continue;} |
| 187 | +preType=type;if(type==="focus"||type==="blur"){types.push(liveMap[type]+namespaces);type=type+namespaces;}else{type=(liveMap[type]||type)+namespaces;} |
| 188 | +if(name==="live"){context.each(function(){jQuery.event.add(this,liveConvert(type,selector),{data:data,selector:selector,handler:fn,origType:type,origHandler:fn,preType:preType});});}else{context.unbind(liveConvert(type,selector),fn);}} |
| 189 | +return this;}});function liveHandler(event){var stop,elems=[],selectors=[],args=arguments,related,match,handleObj,elem,j,i,l,data,events=jQuery.data(this,"events");if(event.liveFired===this||!events||!events.live||event.button&&event.type==="click"){return;} |
| 190 | +event.liveFired=this;var live=events.live.slice(0);for(j=0;j<live.length;j++){handleObj=live[j];if(handleObj.origType.replace(rnamespaces,"")===event.type){selectors.push(handleObj.selector);}else{live.splice(j--,1);}} |
| 191 | +match=jQuery(event.target).closest(selectors,event.currentTarget);for(i=0,l=match.length;i<l;i++){for(j=0;j<live.length;j++){handleObj=live[j];if(match[i].selector===handleObj.selector){elem=match[i].elem;related=null;if(handleObj.preType==="mouseenter"||handleObj.preType==="mouseleave"){related=jQuery(event.relatedTarget).closest(handleObj.selector)[0];} |
| 192 | +if(!related||related!==elem){elems.push({elem:elem,handleObj:handleObj});}}}} |
| 193 | +for(i=0,l=elems.length;i<l;i++){match=elems[i];event.currentTarget=match.elem;event.data=match.handleObj.data;event.handleObj=match.handleObj;if(match.handleObj.origHandler.apply(match.elem,args)===false){stop=false;break;}} |
| 194 | +return stop;} |
| 195 | +function liveConvert(type,selector){return"live."+(type&&type!=="*"?type+".":"")+selector.replace(/\./g,"`").replace(/ /g,"&");} |
| 196 | +jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error").split(" "),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};if(jQuery.attrFn){jQuery.attrFn[name]=true;}});if(window.attachEvent&&!window.addEventListener){window.attachEvent("onunload",function(){for(var id in jQuery.cache){if(jQuery.cache[id].handle){try{jQuery.event.remove(jQuery.cache[id].handle.elem);}catch(e){}}}});} |
| 197 | +(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[];} |
| 198 | +if(!selector||typeof selector!=="string"){return results;} |
| 199 | +var parts=[],m,set,checkSet,extra,prune=true,contextXML=isXML(context),soFar=selector;while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}} |
| 200 | +if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift();} |
| 201 | +set=posProcess(selector,set);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];} |
| 202 | +if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;} |
| 203 | +while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();} |
| 204 | +if(pop==null){pop=context;} |
| 205 | +Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}} |
| 206 | +if(!checkSet){checkSet=set;} |
| 207 | +if(!checkSet){Sizzle.error(cur||selector);} |
| 208 | +if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);} |
| 209 | +if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);} |
| 210 | +return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}} |
| 211 | +return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];} |
| 212 | +for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];match.splice(1,1);if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}} |
| 213 | +if(!set){set=context.getElementsByTagName("*");} |
| 214 | +return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.leftMatch[type].exec(expr))!=null&&match[2]){var filter=Expr.filter[type],found,item,left=match[1];anyFound=false;match.splice(1,1);if(left.substr(left.length-1)==="\\"){continue;} |
| 215 | +if(curLoop===result){result=[];} |
| 216 | +if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}} |
| 217 | +if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}} |
| 218 | +if(found!==undefined){if(!inplace){curLoop=result;} |
| 219 | +expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];} |
| 220 | +break;}}} |
| 221 | +if(expr===old){if(anyFound==null){Sizzle.error(expr);}else{break;}} |
| 222 | +old=expr;} |
| 223 | +return curLoop;};Sizzle.error=function(msg){throw"Syntax error, unrecognized expression: "+msg;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag){part=part.toLowerCase();} |
| 224 | +for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){} |
| 225 | +checkSet[i]=isPartStrNotTag||elem&&elem.nodeName.toLowerCase()===part?elem||false:elem===part;}} |
| 226 | +if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=part.toLowerCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName.toLowerCase()===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}} |
| 227 | +if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=part.toLowerCase();checkFn=dirNodeCheck;} |
| 228 | +checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=part.toLowerCase();checkFn=dirNodeCheck;} |
| 229 | +checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}} |
| 230 | +return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;} |
| 231 | +for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").replace(/[\t\n]/g," ").indexOf(match)>=0)){if(!inplace){result.push(elem);}}else if(inplace){curLoop[i]=false;}}} |
| 232 | +return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){return match[1].toLowerCase();},CHILD:function(match){if(match[1]==="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]==="even"&&"2n"||match[2]==="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;} |
| 233 | +match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];} |
| 234 | +if(match[2]==="~="){match[4]=" "+match[4]+" ";} |
| 235 | +return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);} |
| 236 | +return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;} |
| 237 | +return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toLowerCase()==="button";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0===i;},eq:function(elem,i,match){return match[3]-0===i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||getText([elem])||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}} |
| 238 | +return true;}else{Sizzle.error("Syntax error, unrecognized expression: "+name);}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while((node=node.previousSibling)){if(node.nodeType===1){return false;}} |
| 239 | +if(type==="first"){return true;} |
| 240 | +node=elem;case'last':while((node=node.nextSibling)){if(node.nodeType===1){return false;}} |
| 241 | +return true;case'nth':var first=match[2],last=match[3];if(first===1&&last===0){return true;} |
| 242 | +var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}} |
| 243 | +parent.sizcache=doneName;} |
| 244 | +var diff=elem.nodeIndex-last;if(first===0){return diff===0;}else{return(diff%first===0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!==check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,function(all,num){return"\\"+(num-0+1);}));} |
| 245 | +var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results;} |
| 246 | +return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}} |
| 247 | +return ret;};} |
| 248 | +var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true;} |
| 249 | +return a.compareDocumentPosition?-1:1;} |
| 250 | +var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;} |
| 251 | +return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true;} |
| 252 | +return a.sourceIndex?-1:1;} |
| 253 | +var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;} |
| 254 | +return ret;};}else if(document.createRange){sortOrder=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true;} |
| 255 | +return a.ownerDocument?-1:1;} |
| 256 | +var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.setStart(a,0);aRange.setEnd(a,0);bRange.setStart(b,0);bRange.setEnd(b,0);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;} |
| 257 | +return ret;};} |
| 258 | +function getText(elems){var ret="",elem;for(var i=0;elems[i];i++){elem=elems[i];if(elem.nodeType===3||elem.nodeType===4){ret+=elem.nodeValue;}else if(elem.nodeType!==8){ret+=getText(elem.childNodes);}} |
| 259 | +return ret;} |
| 260 | +(function(){var form=document.createElement("div"),id="script"+(new Date).getTime();form.innerHTML="<a name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};} |
| 261 | +root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}} |
| 262 | +results=tmp;} |
| 263 | +return results;};} |
| 264 | +div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};} |
| 265 | +div=null;})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;} |
| 266 | +Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}} |
| 267 | +return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];} |
| 268 | +div=null;})();} |
| 269 | +(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){return;} |
| 270 | +div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return;} |
| 271 | +Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;} |
| 272 | +if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;} |
| 273 | +if(elem.nodeName.toLowerCase()===cur){match=elem;break;} |
| 274 | +elem=elem[dir];} |
| 275 | +checkSet[i]=match;}}} |
| 276 | +function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;} |
| 277 | +if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;} |
| 278 | +if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}} |
| 279 | +elem=elem[dir];} |
| 280 | +checkSet[i]=match;}}} |
| 281 | +var contains=document.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16);}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");} |
| 282 | +selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);} |
| 283 | +return Sizzle.filter(later,tmpSet);};jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;jQuery.unique=Sizzle.uniqueSort;jQuery.text=getText;jQuery.isXMLDoc=isXML;jQuery.contains=contains;return;window.Sizzle=Sizzle;})();var runtil=/Until$/,rparentsprev=/^(?:parents|prevUntil|prevAll)/,rmultiselector=/,/,slice=Array.prototype.slice;var winnow=function(elements,qualifier,keep){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)===keep;});}else if(qualifier.nodeType){return jQuery.grep(elements,function(elem,i){return(elem===qualifier)===keep;});}else if(typeof qualifier==="string"){var filtered=jQuery.grep(elements,function(elem){return elem.nodeType===1;});if(isSimple.test(qualifier)){return jQuery.filter(qualifier,filtered,!keep);}else{qualifier=jQuery.filter(qualifier,filtered);}} |
| 284 | +return jQuery.grep(elements,function(elem,i){return(jQuery.inArray(elem,qualifier)>=0)===keep;});};jQuery.fn.extend({find:function(selector){var ret=this.pushStack("","find",selector),length=0;for(var i=0,l=this.length;i<l;i++){length=ret.length;jQuery.find(selector,this[i],ret);if(i>0){for(var n=length;n<ret.length;n++){for(var r=0;r<length;r++){if(ret[r]===ret[n]){ret.splice(n--,1);break;}}}}} |
| 285 | +return ret;},has:function(target){var targets=jQuery(target);return this.filter(function(){for(var i=0,l=targets.length;i<l;i++){if(jQuery.contains(this,targets[i])){return true;}}});},not:function(selector){return this.pushStack(winnow(this,selector,false),"not",selector);},filter:function(selector){return this.pushStack(winnow(this,selector,true),"filter",selector);},is:function(selector){return!!selector&&jQuery.filter(selector,this).length>0;},closest:function(selectors,context){if(jQuery.isArray(selectors)){var ret=[],cur=this[0],match,matches={},selector;if(cur&&selectors.length){for(var i=0,l=selectors.length;i<l;i++){selector=selectors[i];if(!matches[selector]){matches[selector]=jQuery.expr.match.POS.test(selector)?jQuery(selector,context||this.context):selector;}} |
| 286 | +while(cur&&cur.ownerDocument&&cur!==context){for(selector in matches){match=matches[selector];if(match.jquery?match.index(cur)>-1:jQuery(cur).is(match)){ret.push({selector:selector,elem:cur});delete matches[selector];}} |
| 287 | +cur=cur.parentNode;}} |
| 288 | +return ret;} |
| 289 | +var pos=jQuery.expr.match.POS.test(selectors)?jQuery(selectors,context||this.context):null;return this.map(function(i,cur){while(cur&&cur.ownerDocument&&cur!==context){if(pos?pos.index(cur)>-1:jQuery(cur).is(selectors)){return cur;} |
| 290 | +cur=cur.parentNode;} |
| 291 | +return null;});},index:function(elem){if(!elem||typeof elem==="string"){return jQuery.inArray(this[0],elem?jQuery(elem):this.parent().children());} |
| 292 | +return jQuery.inArray(elem.jquery?elem[0]:elem,this);},add:function(selector,context){var set=typeof selector==="string"?jQuery(selector,context||this.context):jQuery.makeArray(selector),all=jQuery.merge(this.get(),set);return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:jQuery.unique(all));},andSelf:function(){return this.add(this.prevObject);}});function isDisconnected(node){return!node||!node.parentNode||node.parentNode.nodeType===11;} |
| 293 | +jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return jQuery.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until);},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);if(!runtil.test(name)){selector=until;} |
| 294 | +if(selector&&typeof selector==="string"){ret=jQuery.filter(selector,ret);} |
| 295 | +ret=this.length>1?jQuery.unique(ret):ret;if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ret=ret.reverse();} |
| 296 | +return this.pushStack(ret,name,slice.call(arguments).join(","));};});jQuery.extend({filter:function(expr,elems,not){if(not){expr=":not("+expr+")";} |
| 297 | +return jQuery.find.matches(expr,elems);},dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until))){if(cur.nodeType===1){matched.push(cur);} |
| 298 | +cur=cur[dir];} |
| 299 | +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;}} |
| 300 | +return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}} |
| 301 | +return r;}});var rinlinejQuery=/ jQuery\d+="(?:\d+|null)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/(<([\w:]+)[^>]*?)\/>/g,rselfClosing=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnocache=/<script|<object|<embed|<option|<style/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,fcloseTag=function(all,front,tag){return rselfClosing.test(tag)?all:front+"></"+tag+">";},wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!jQuery.support.htmlSerialize){wrapMap._default=[1,"div<div>","</div>"];} |
| 302 | +jQuery.fn.extend({text:function(text){if(jQuery.isFunction(text)){return this.each(function(i){var self=jQuery(this);self.text(text.call(this,i,self.text()));});} |
| 303 | +if(typeof text!=="object"&&text!==undefined){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));} |
| 304 | +return jQuery.text(this);},wrapAll:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i));});} |
| 305 | +if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);} |
| 306 | +wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild;} |
| 307 | +return elem;}).append(this);} |
| 308 | +return this;},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});} |
| 309 | +return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.insertBefore(elem,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});}else if(arguments.length){var set=jQuery(arguments[0]);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});}else if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,jQuery(arguments[0]).toArray());return set;}},remove:function(selector,keepData){for(var i=0,elem;(elem=this[i])!=null;i++){if(!selector||jQuery.filter(selector,[elem]).length){if(!keepData&&elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*"));jQuery.cleanData([elem]);} |
| 310 | +if(elem.parentNode){elem.parentNode.removeChild(elem);}}} |
| 311 | +return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*"));} |
| 312 | +while(elem.firstChild){elem.removeChild(elem.firstChild);}} |
| 313 | +return this;},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML,ownerDocument=this.ownerDocument;if(!html){var div=ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;} |
| 314 | +return jQuery.clean([html.replace(rinlinejQuery,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(rleadingWhitespace,"")],ownerDocument)[0];}else{return this.cloneNode(true);}});if(events===true){cloneCopyEvent(this,ret);cloneCopyEvent(this.find("*"),ret.find("*"));} |
| 315 | +return ret;},html:function(value){if(value===undefined){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(rinlinejQuery,""):null;}else if(typeof value==="string"&&!rnocache.test(value)&&(jQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,fcloseTag);try{for(var i=0,l=this.length;i<l;i++){if(this[i].nodeType===1){jQuery.cleanData(this[i].getElementsByTagName("*"));this[i].innerHTML=value;}}}catch(e){this.empty().append(value);}}else if(jQuery.isFunction(value)){this.each(function(i){var self=jQuery(this),old=self.html();self.empty().append(function(){return value.call(this,i,old);});});}else{this.empty().append(value);} |
| 316 | +return this;},replaceWith:function(value){if(this[0]&&this[0].parentNode){if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this),old=self.html();self.replaceWith(value.call(this,i,old));});} |
| 317 | +if(typeof value!=="string"){value=jQuery(value).detach();} |
| 318 | +return this.each(function(){var next=this.nextSibling,parent=this.parentNode;jQuery(this).remove();if(next){jQuery(next).before(value);}else{jQuery(parent).append(value);}});}else{return this.pushStack(jQuery(jQuery.isFunction(value)?value():value),"replaceWith",value);}},detach:function(selector){return this.remove(selector,true);},domManip:function(args,table,callback){var results,first,value=args[0],scripts=[],fragment,parent;if(!jQuery.support.checkClone&&arguments.length===3&&typeof value==="string"&&rchecked.test(value)){return this.each(function(){jQuery(this).domManip(args,table,callback,true);});} |
| 319 | +if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);args[0]=value.call(this,i,table?self.html():undefined);self.domManip(args,table,callback);});} |
| 320 | +if(this[0]){parent=value&&value.parentNode;if(jQuery.support.parentNode&&parent&&parent.nodeType===11&&parent.childNodes.length===this.length){results={fragment:parent};}else{results=buildFragment(args,this,scripts);} |
| 321 | +fragment=results.fragment;if(fragment.childNodes.length===1){first=fragment=fragment.firstChild;}else{first=fragment.firstChild;} |
| 322 | +if(first){table=table&&jQuery.nodeName(first,"tr");for(var i=0,l=this.length;i<l;i++){callback.call(table?root(this[i],first):this[i],i>0||results.cacheable||this.length>1?fragment.cloneNode(true):fragment);}} |
| 323 | +if(scripts.length){jQuery.each(scripts,evalScript);}} |
| 324 | +return this;function root(elem,cur){return jQuery.nodeName(elem,"table")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}});function cloneCopyEvent(orig,ret){var i=0;ret.each(function(){if(this.nodeName!==(orig[i]&&orig[i].nodeName)){return;} |
| 325 | +var oldData=jQuery.data(orig[i++]),curData=jQuery.data(this,oldData),events=oldData&&oldData.events;if(events){delete curData.handle;curData.events={};for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}}});} |
| 326 | +function buildFragment(args,nodes,scripts){var fragment,cacheable,cacheresults,doc=(nodes&&nodes[0]?nodes[0].ownerDocument||nodes[0]:document);if(args.length===1&&typeof args[0]==="string"&&args[0].length<512&&doc===document&&!rnocache.test(args[0])&&(jQuery.support.checkClone||!rchecked.test(args[0]))){cacheable=true;cacheresults=jQuery.fragments[args[0]];if(cacheresults){if(cacheresults!==1){fragment=cacheresults;}}} |
| 327 | +if(!fragment){fragment=doc.createDocumentFragment();jQuery.clean(args,doc,fragment,scripts);} |
| 328 | +if(cacheable){jQuery.fragments[args[0]]=cacheresults?fragment:1;} |
| 329 | +return{fragment:fragment,cacheable:cacheable};} |
| 330 | +jQuery.fragments={};jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector),parent=this.length===1&&this[0].parentNode;if(parent&&parent.nodeType===11&&parent.childNodes.length===1&&insert.length===1){insert[original](this[0]);return this;}else{for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);} |
| 331 | +return this.pushStack(ret,name,insert.selector);}};});jQuery.extend({clean:function(elems,context,fragment,scripts){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;} |
| 332 | +var ret=[];for(var i=0,elem;(elem=elems[i])!=null;i++){if(typeof elem==="number"){elem+="";} |
| 333 | +if(!elem){continue;} |
| 334 | +if(typeof elem==="string"&&!rhtml.test(elem)){elem=context.createTextNode(elem);}else if(typeof elem==="string"){elem=elem.replace(rxhtmlTag,fcloseTag);var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div=context.createElement("div");div.innerHTML=wrap[1]+elem+wrap[2];while(depth--){div=div.lastChild;} |
| 335 | +if(!jQuery.support.tbody){var hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]==="<table>"&&!hasBody?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]);}}} |
| 336 | +if(!jQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);} |
| 337 | +elem=div.childNodes;} |
| 338 | +if(elem.nodeType){ret.push(elem);}else{ret=jQuery.merge(ret,elem);}} |
| 339 | +if(fragment){for(var i=0;ret[i];i++){if(scripts&&jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));} |
| 340 | +fragment.appendChild(ret[i]);}}} |
| 341 | +return ret;},cleanData:function(elems){var data,id,cache=jQuery.cache,special=jQuery.event.special,deleteExpando=jQuery.support.deleteExpando;for(var i=0,elem;(elem=elems[i])!=null;i++){id=elem[jQuery.expando];if(id){data=cache[id];if(data.events){for(var type in data.events){if(special[type]){jQuery.event.remove(elem,type);}else{removeEvent(elem,type,data.handle);}}} |
| 342 | +if(deleteExpando){delete elem[jQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(jQuery.expando);} |
| 343 | +delete cache[id];}}}});var rexclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,ralpha=/alpha\([^)]*\)/,ropacity=/opacity=([^)]*)/,rfloat=/float/i,rdashAlpha=/-([a-z])/ig,rupper=/([A-Z])/g,rnumpx=/^-?\d+(?:px)?$/i,rnum=/^-?\d/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssWidth=["Left","Right"],cssHeight=["Top","Bottom"],getComputedStyle=document.defaultView&&document.defaultView.getComputedStyle,styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat",fcamelCase=function(all,letter){return letter.toUpperCase();};jQuery.fn.css=function(name,value){return access(this,name,value,true,function(elem,name,value){if(value===undefined){return jQuery.curCSS(elem,name);} |
| 344 | +if(typeof value==="number"&&!rexclude.test(name)){value+="px";} |
| 345 | +jQuery.style(elem,name,value);});};jQuery.extend({style:function(elem,name,value){if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;} |
| 346 | +if((name==="width"||name==="height")&&parseFloat(value)<0){value=undefined;} |
| 347 | +var style=elem.style||elem,set=value!==undefined;if(!jQuery.support.opacity&&name==="opacity"){if(set){style.zoom=1;var opacity=parseInt(value,10)+""==="NaN"?"":"alpha(opacity="+value*100+")";var filter=style.filter||jQuery.curCSS(elem,"filter")||"";style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):opacity;} |
| 348 | +return style.filter&&style.filter.indexOf("opacity=")>=0?(parseFloat(ropacity.exec(style.filter)[1])/100)+"":"";} |
| 349 | +if(rfloat.test(name)){name=styleFloat;} |
| 350 | +name=name.replace(rdashAlpha,fcamelCase);if(set&&value!=='NaNpx'&&value!=='nullpx'){style[name]=value;} |
| 351 | +return style[name];},css:function(elem,name,force,extra){if(name==="width"||name==="height"){var val,props=cssShow,which=name==="width"?cssWidth:cssHeight;function getWH(){val=name==="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return;} |
| 352 | +jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;} |
| 353 | +if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;}});} |
| 354 | +if(elem.offsetWidth!==0){getWH();}else{jQuery.swap(elem,props,getWH);} |
| 355 | +return Math.max(0,Math.round(val));} |
| 356 | +return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style,filter;if(!jQuery.support.opacity&&name==="opacity"&&elem.currentStyle){ret=ropacity.test(elem.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return ret===""?"1":ret;} |
| 357 | +if(rfloat.test(name)){name=styleFloat;} |
| 358 | +if(!force&&style&&style[name]){ret=style[name];}else if(getComputedStyle){if(rfloat.test(name)){name="float";} |
| 359 | +name=name.replace(rupper,"-$1").toLowerCase();var defaultView=elem.ownerDocument.defaultView;if(!defaultView){return null;} |
| 360 | +var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name);} |
| 361 | +if(name==="opacity"&&ret===""){ret="1";}}else if(elem.currentStyle){var camelCase=name.replace(rdashAlpha,fcamelCase);ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!rnumpx.test(ret)&&rnum.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=camelCase==="fontSize"?"1em":(ret||0);ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}} |
| 362 | +return ret;},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];} |
| 363 | +callback.call(elem);for(var name in options){elem.style[name]=old[name];}}});if(jQuery.expr&&jQuery.expr.filters){jQuery.expr.filters.hidden=function(elem){var width=elem.offsetWidth,height=elem.offsetHeight,skip=elem.nodeName.toLowerCase()==="tr";return width===0&&height===0&&!skip?true:width>0&&height>0&&!skip?false:jQuery.curCSS(elem,"display")==="none";};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem);};} |
| 364 | +var jsc=now(),rscript=/<script(.|\s)*?\/script>/gi,rselectTextarea=/select|textarea/i,rinput=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,jsre=/=\?(&|$)/,rquery=/\?/,rts=/(\?|&)_=.*?(&|$)/,rurl=/^(\w+:)?\/\/([^\/?#]+)/,r20=/%20/g,_load=jQuery.fn.load;jQuery.fn.extend({load:function(url,params,callback){if(typeof url!=="string"){return _load.call(this,url);}else if(!this.length){return this;} |
| 365 | +var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);} |
| 366 | +var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){params=jQuery.param(params,jQuery.ajaxSettings.traditional);type="POST";}} |
| 367 | +var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status==="success"||status==="notmodified"){self.html(selector?jQuery("<div />").append(res.responseText.replace(rscript,"")).find(selector):res.responseText);} |
| 368 | +if(callback){self.each(callback,[res.responseText,status,res]);}}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeName)||rinput.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=null;} |
| 369 | +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)){type=type||callback;callback=data;data={};} |
| 370 | +return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:window.XMLHttpRequest&&(window.location.protocol!=="file:"||!window.ActiveXObject)?function(){return new window.XMLHttpRequest();}:function(){try{return new window.ActiveXObject("Microsoft.XMLHTTP");}catch(e){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(origSettings){var s=jQuery.extend(true,{},jQuery.ajaxSettings,origSettings);var jsonp,status,data,callbackContext=origSettings&&origSettings.context||s,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);} |
| 371 | +if(s.dataType==="jsonp"){if(type==="GET"){if(!jsre.test(s.url)){s.url+=(rquery.test(s.url)?"&":"?")+(s.jsonp||"callback")+"=?";}}else if(!s.data||!jsre.test(s.data)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";} |
| 372 | +s.dataType="json";} |
| 373 | +if(s.dataType==="json"&&(s.data&&jsre.test(s.data)||jsre.test(s.url))){jsonp=s.jsonpCallback||("jsonp"+jsc++);if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");} |
| 374 | +s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=window[jsonp]||function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){} |
| 375 | +if(head){head.removeChild(script);}};} |
| 376 | +if(s.dataType==="script"&&s.cache===null){s.cache=false;} |
| 377 | +if(s.cache===false&&type==="GET"){var ts=now();var ret=s.url.replace(rts,"$1_="+ts+"$2");s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");} |
| 378 | +if(s.data&&type==="GET"){s.url+=(rquery.test(s.url)?"&":"?")+s.data;} |
| 379 | +if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart");} |
| 380 | +var parts=rurl.exec(s.url),remote=parts&&(parts[1]&&parts[1]!==location.protocol||parts[2]!==location.host);if(s.dataType==="script"&&type==="GET"&&remote){var head=document.getElementsByTagName("head")[0]||document.documentElement;var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset;} |
| 381 | +if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;if(head&&script.parentNode){head.removeChild(script);}}};} |
| 382 | +head.insertBefore(script,head.firstChild);return undefined;} |
| 383 | +var requestDone=false;var xhr=s.xhr();if(!xhr){return;} |
| 384 | +if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);}else{xhr.open(type,s.url,s.async);} |
| 385 | +try{if(s.data||origSettings&&origSettings.contentType){xhr.setRequestHeader("Content-Type",s.contentType);} |
| 386 | +if(s.ifModified){if(jQuery.lastModified[s.url]){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]);} |
| 387 | +if(jQuery.etag[s.url]){xhr.setRequestHeader("If-None-Match",jQuery.etag[s.url]);}} |
| 388 | +if(!remote){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");} |
| 389 | +xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){} |
| 390 | +if(s.beforeSend&&s.beforeSend.call(callbackContext,xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");} |
| 391 | +xhr.abort();return false;} |
| 392 | +if(s.global){trigger("ajaxSend",[xhr,s]);} |
| 393 | +var onreadystatechange=xhr.onreadystatechange=function(isTimeout){if(!xhr||xhr.readyState===0||isTimeout==="abort"){if(!requestDone){complete();} |
| 394 | +requestDone=true;if(xhr){xhr.onreadystatechange=jQuery.noop;}}else if(!requestDone&&xhr&&(xhr.readyState===4||isTimeout==="timeout")){requestDone=true;xhr.onreadystatechange=jQuery.noop;status=isTimeout==="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";var errMsg;if(status==="success"){try{data=jQuery.httpData(xhr,s.dataType,s);}catch(err){status="parsererror";errMsg=err;}} |
| 395 | +if(status==="success"||status==="notmodified"){if(!jsonp){success();}}else{jQuery.handleError(s,xhr,status,errMsg);} |
| 396 | +complete();if(isTimeout==="timeout"){xhr.abort();} |
| 397 | +if(s.async){xhr=null;}}};try{var oldAbort=xhr.abort;xhr.abort=function(){if(xhr){oldAbort.call(xhr);} |
| 398 | +onreadystatechange("abort");};}catch(e){} |
| 399 | +if(s.async&&s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout");}},s.timeout);} |
| 400 | +try{xhr.send(type==="POST"||type==="PUT"||type==="DELETE"?s.data:null);}catch(e){jQuery.handleError(s,xhr,null,e);complete();} |
| 401 | +if(!s.async){onreadystatechange();} |
| 402 | +function success(){if(s.success){s.success.call(callbackContext,data,status,xhr);} |
| 403 | +if(s.global){trigger("ajaxSuccess",[xhr,s]);}} |
| 404 | +function complete(){if(s.complete){s.complete.call(callbackContext,xhr,status);} |
| 405 | +if(s.global){trigger("ajaxComplete",[xhr,s]);} |
| 406 | +if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}} |
| 407 | +function trigger(type,args){(s.context?jQuery(s.context):jQuery.event).trigger(type,args);} |
| 408 | +return xhr;},handleError:function(s,xhr,status,e){if(s.error){s.error.call(s.context||s,xhr,status,e);} |
| 409 | +if(s.global){(s.context?jQuery(s.context):jQuery.event).trigger("ajaxError",[xhr,s,e]);}},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol==="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status===304||xhr.status===1223||xhr.status===0;}catch(e){} |
| 410 | +return false;},httpNotModified:function(xhr,url){var lastModified=xhr.getResponseHeader("Last-Modified"),etag=xhr.getResponseHeader("Etag");if(lastModified){jQuery.lastModified[url]=lastModified;} |
| 411 | +if(etag){jQuery.etag[url]=etag;} |
| 412 | +return xhr.status===304||xhr.status===0;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type")||"",xml=type==="xml"||!type&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==="parsererror"){jQuery.error("parsererror");} |
| 413 | +if(s&&s.dataFilter){data=s.dataFilter(data,type);} |
| 414 | +if(typeof data==="string"){if(type==="json"||!type&&ct.indexOf("json")>=0){data=jQuery.parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){jQuery.globalEval(data);}} |
| 415 | +return data;},param:function(a,traditional){var s=[];if(traditional===undefined){traditional=jQuery.ajaxSettings.traditional;} |
| 416 | +if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value);});}else{for(var prefix in a){buildParams(prefix,a[prefix]);}} |
| 417 | +return s.join("&").replace(r20,"+");function buildParams(prefix,obj){if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||/\[\]$/.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"||jQuery.isArray(v)?i:"")+"]",v);}});}else if(!traditional&&obj!=null&&typeof obj==="object"){jQuery.each(obj,function(k,v){buildParams(prefix+"["+k+"]",v);});}else{add(prefix,obj);}} |
| 418 | +function add(key,value){value=jQuery.isFunction(value)?value():value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);}}});var elemdisplay={},rfxtypes=/toggle|show|hide/,rfxnum=/^([+-]=)?([\d+-.]+)(.*)$/,timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];jQuery.fn.extend({show:function(speed,callback){if(speed||speed===0){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var nodeName=this[i].nodeName,display;if(elemdisplay[nodeName]){display=elemdisplay[nodeName];}else{var elem=jQuery("<"+nodeName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block";} |
| 419 | +elem.remove();elemdisplay[nodeName]=display;} |
| 420 | +jQuery.data(this[i],"olddisplay",display);}} |
| 421 | +for(var j=0,k=this.length;j<k;j++){this[j].style.display=jQuery.data(this[j],"olddisplay")||"";} |
| 422 | +return this;}},hide:function(speed,callback){if(speed||speed===0){return this.animate(genFx("hide",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"));}} |
| 423 | +for(var j=0,k=this.length;j<k;j++){this[j].style.display="none";} |
| 424 | +return this;}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";if(jQuery.isFunction(fn)&&jQuery.isFunction(fn2)){this._toggle.apply(this,arguments);}else if(fn==null||bool){this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]();});}else{this.animate(genFx("toggle",3),fn,fn2);} |
| 425 | +return this;},fadeTo:function(speed,to,callback){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);if(jQuery.isEmptyObject(prop)){return this.each(optall.complete);} |
| 426 | +return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType===1&&jQuery(this).is(":hidden"),self=this;for(p in prop){var name=p.replace(rdashAlpha,fcamelCase);if(p!==name){prop[name]=prop[p];delete prop[p];p=name;} |
| 427 | +if(prop[p]==="hide"&&hidden||prop[p]==="show"&&!hidden){return opt.complete.call(this);} |
| 428 | +if((p==="height"||p==="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;} |
| 429 | +if(jQuery.isArray(prop[p])){(opt.specialEasing=opt.specialEasing||{})[p]=prop[p][1];prop[p]=prop[p][0];}} |
| 430 | +if(opt.overflow!=null){this.style.overflow="hidden";} |
| 431 | +opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(rfxtypes.test(val)){e[val==="toggle"?hidden?"show":"hide":val](prop);}else{var parts=rfxnum.exec(val),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!=="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;} |
| 432 | +if(parts[1]){end=((parts[1]==="-="?-1:1)*end)+start;} |
| 433 | +e.custom(start,end,unit);}else{e.custom(start,val,"");}}});return true;});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([]);} |
| 434 | +this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem===this){if(gotoEnd){timers[i](true);} |
| 435 | +timers.splice(i,1);}}});if(!gotoEnd){this.dequeue();} |
| 436 | +return this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue();} |
| 437 | +if(jQuery.isFunction(opt.old)){opt.old.call(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:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={};}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);} |
| 438 | +(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} |
| 439 | +var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd);} |
| 440 | +t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(jQuery.fx.tick,13);}},show:function(){this.options.orig[this.prop]=jQuery.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now(),done=true;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;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false;}} |
| 441 | +if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;var old=jQuery.data(this.elem,"olddisplay");this.elem.style.display=old?old:this.options.display;if(jQuery.css(this.elem,"display")==="none"){this.elem.style.display="block";}} |
| 442 | +if(this.options.hide){jQuery(this.elem).hide();} |
| 443 | +if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.style(this.elem,p,this.options.orig[p]);}} |
| 444 | +this.options.complete.call(this.elem);} |
| 445 | +return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;var specialEasing=this.options.specialEasing&&this.options.specialEasing[this.prop];var defaultEasing=this.options.easing||(jQuery.easing.swing?"swing":"linear");this.pos=jQuery.easing[specialEasing||defaultEasing](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();} |
| 446 | +return true;}};jQuery.extend(jQuery.fx,{tick:function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1);}} |
| 447 | +if(!timers.length){jQuery.fx.stop();}},stop:function(){clearInterval(timerId);timerId=null;},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.style(fx.elem,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=(fx.prop==="width"||fx.prop==="height"?Math.max(0,fx.now):fx.now)+fx.unit;}else{fx.elem[fx.prop]=fx.now;}}}});if(jQuery.expr&&jQuery.expr.filters){jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};} |
| 448 | +function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;} |
| 449 | +if("getBoundingClientRect"in document.documentElement){jQuery.fn.offset=function(options){var elem=this[0];if(options){return this.each(function(i){jQuery.offset.setOffset(this,options,i);});} |
| 450 | +if(!elem||!elem.ownerDocument){return null;} |
| 451 | +if(elem===elem.ownerDocument.body){return jQuery.offset.bodyOffset(elem);} |
| 452 | +var box=elem.getBoundingClientRect(),doc=elem.ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.support.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.support.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left};};}else{jQuery.fn.offset=function(options){var elem=this[0];if(options){return this.each(function(i){jQuery.offset.setOffset(this,options,i);});} |
| 453 | +if(!elem||!elem.ownerDocument){return null;} |
| 454 | +if(elem===elem.ownerDocument.body){return jQuery.offset.bodyOffset(elem);} |
| 455 | +jQuery.offset.initialize();var offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){break;} |
| 456 | +computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.nodeName))){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;} |
| 457 | +prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;} |
| 458 | +if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;} |
| 459 | +prevComputedStyle=computedStyle;} |
| 460 | +if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop;left+=body.offsetLeft;} |
| 461 | +if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft);} |
| 462 | +return{top:top,left:left};};} |
| 463 | +jQuery.offset={initialize:function(){var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,bodyMarginTop=parseFloat(jQuery.curCSS(body,"marginTop",true))||0,html="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";jQuery.extend(container.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild;checkDiv=innerDiv.firstChild;td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);checkDiv.style.position="fixed",checkDiv.style.top="20px";this.supportsFixedPosition=(checkDiv.offsetTop===20||checkDiv.offsetTop===15);checkDiv.style.position=checkDiv.style.top="";innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==bodyMarginTop);body.removeChild(container);body=container=innerDiv=checkDiv=table=td=null;jQuery.offset.initialize=jQuery.noop;},bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;jQuery.offset.initialize();if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseFloat(jQuery.curCSS(body,"marginTop",true))||0;left+=parseFloat(jQuery.curCSS(body,"marginLeft",true))||0;} |
| 464 | +return{top:top,left:left};},setOffset:function(elem,options,i){if(/static/.test(jQuery.curCSS(elem,"position"))){elem.style.position="relative";} |
| 465 | +var curElem=jQuery(elem),curOffset=curElem.offset(),curTop=parseInt(jQuery.curCSS(elem,"top",true),10)||0,curLeft=parseInt(jQuery.curCSS(elem,"left",true),10)||0;if(jQuery.isFunction(options)){options=options.call(elem,i,curOffset);} |
| 466 | +var props={top:(options.top-curOffset.top)+curTop,left:(options.left-curOffset.left)+curLeft};if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({position:function(){if(!this[0]){return null;} |
| 467 | +var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset();offset.top-=parseFloat(jQuery.curCSS(elem,"marginTop",true))||0;offset.left-=parseFloat(jQuery.curCSS(elem,"marginLeft",true))||0;parentOffset.top+=parseFloat(jQuery.curCSS(offsetParent[0],"borderTopWidth",true))||0;parentOffset.left+=parseFloat(jQuery.curCSS(offsetParent[0],"borderLeftWidth",true))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.nodeName)&&jQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent;} |
| 468 | +return offsetParent;});}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){var elem=this[0],win;if(!elem){return null;} |
| 469 | +if(val!==undefined){return this.each(function(){win=getWindow(this);if(win){win.scrollTo(!i?val:jQuery(win).scrollLeft(),i?val:jQuery(win).scrollTop());}else{this[method]=val;}});}else{win=getWindow(elem);return win?("pageXOffset"in win)?win[i?"pageYOffset":"pageXOffset"]:jQuery.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method];}};});function getWindow(elem){return("scrollTo"in elem&&elem.document)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;} |
| 470 | +jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],type,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],type,false,margin?"margin":"border"):null;};jQuery.fn[type]=function(size){var elem=this[0];if(!elem){return size==null?null:this;} |
| 471 | +if(jQuery.isFunction(size)){return this.each(function(i){var self=jQuery(this);self[type](size.call(this,i,self[type]()));});} |
| 472 | +return("scrollTo"in elem&&elem.document)?elem.document.compatMode==="CSS1Compat"&&elem.document.documentElement["client"+name]||elem.document.body["client"+name]:(elem.nodeType===9)?Math.max(elem.documentElement["client"+name],elem.body["scroll"+name],elem.documentElement["scroll"+name],elem.body["offset"+name],elem.documentElement["offset"+name]):size===undefined?jQuery.css(elem,type):this.css(type,typeof size==="string"?size:size+"px");};});window.jQuery=window.$=jQuery;})(window);$j=jQuery.noConflict(); |
\ No newline at end of file |
Index: trunk/extensions/SemanticResultFormats/jqPlot/README |
— | — | @@ -0,0 +1,12 @@ |
| 2 | +The result formats contained in this directory are query printers for
|
| 3 | +Semantic MediaWiki that display charts using the jqPlot Javascript library:
|
| 4 | +
|
| 5 | +http://www.jqplot.com/
|
| 6 | +
|
| 7 | +jqPlot itself uses the jQuery Javascript library.
|
| 8 | +
|
| 9 | +Currently the directory holds two query printers, for bar and pie charts.
|
| 10 | +
|
| 11 | +For more information about the jqPlot result formats, see:
|
| 12 | +
|
| 13 | +http://www.mediawiki.org/wiki/Extension:Semantic_Result_Formats/jqplotbar_and_jqplotpie_formats
|
Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotBar.php |
— | — | @@ -0,0 +1,192 @@ |
| 2 | +<?php
|
| 3 | +/**
|
| 4 | +* A query printer for bar charts using the jqPlot JavaScript library.
|
| 5 | + *
|
| 6 | + * @author Sanyam Goyal
|
| 7 | + * @author Yaron Koren
|
| 8 | + */
|
| 9 | +
|
| 10 | +if ( !defined( 'MEDIAWIKI' ) ) {
|
| 11 | + die( 'Not an entry point.' );
|
| 12 | +}
|
| 13 | +
|
| 14 | +class SRFjqPlotBar extends SMWResultPrinter {
|
| 15 | + protected $m_width = '150';
|
| 16 | + protected $m_height = '400';
|
| 17 | + protected $m_charttitle = ' ';
|
| 18 | + protected $m_barcolor = '#85802b' ;
|
| 19 | + protected $m_bardirection = 'vertical';
|
| 20 | + protected $m_numbersaxislabel = ' ';
|
| 21 | + static protected $m_barchartnum = 1;
|
| 22 | +
|
| 23 | + protected function readParameters( $params, $outputmode ) {
|
| 24 | + SMWResultPrinter::readParameters( $params, $outputmode );
|
| 25 | + if ( array_key_exists( 'width', $this->m_params ) ) {
|
| 26 | + $this->m_width = $this->m_params['width'];
|
| 27 | + }
|
| 28 | + if ( array_key_exists( 'height', $this->m_params ) ) {
|
| 29 | + $this->m_height = $this->m_params['height'];
|
| 30 | + }
|
| 31 | + if ( array_key_exists( 'charttitle', $this->m_params ) ) {
|
| 32 | + $this->m_charttitle = $this->m_params['charttitle'];
|
| 33 | + }
|
| 34 | + if ( array_key_exists( 'barcolor', $this->m_params ) ) {
|
| 35 | + $this->m_barcolor = $this->m_params['barcolor'];
|
| 36 | + }
|
| 37 | + if ( array_key_exists( 'bardirection', $this->m_params ) ) {
|
| 38 | + // keep it simple - only 'horizontal' makes sense as
|
| 39 | + // an alternate value
|
| 40 | + if ( $this->m_params['bardirection'] == 'horizontal' ) {
|
| 41 | + $this->m_bardirection = $this->m_params['bardirection'];
|
| 42 | + }
|
| 43 | + }
|
| 44 | + else{
|
| 45 | + $this->m_bardirection = 'vertical';
|
| 46 | + }
|
| 47 | + if ( array_key_exists( 'numbersaxislabel', $this->m_params ) ) {
|
| 48 | + $this->m_numbersaxislabel = $this->m_params['numbersaxislabel'];
|
| 49 | + }
|
| 50 | + }
|
| 51 | +
|
| 52 | + public function getName() {
|
| 53 | + return wfMsg( 'srf_printername_jqplotbar' );
|
| 54 | + }
|
| 55 | +
|
| 56 | + protected function getResultText( $res, $outputmode ) {
|
| 57 | + global $smwgIQRunningNumber, $wgOut, $srfgScriptPath;
|
| 58 | + global $srfgJQPlotIncluded, $smwgJQueryIncluded;
|
| 59 | + global $wgParser;
|
| 60 | + $wgParser->disableCache();
|
| 61 | +
|
| 62 | + //adding scripts - this code may be moved to some other location
|
| 63 | + $scripts = array();
|
| 64 | + if ( !$smwgJQueryIncluded ) {
|
| 65 | + if ( method_exists( 'OutputPage', 'includeJQuery' ) ) {
|
| 66 | + $wgOut->includeJQuery();
|
| 67 | + } else {
|
| 68 | + $scripts[] = "$srfgScriptPath/jqPlot/jquery-1.4.2.min.js";
|
| 69 | + }
|
| 70 | + $smwgJQueryIncluded = true;
|
| 71 | + }
|
| 72 | +
|
| 73 | + if ( !$srfgJQPlotIncluded ) {
|
| 74 | + $scripts[] = "$srfgScriptPath/jqPlot/jquery.jqplot.min.js";
|
| 75 | + $srfgJQPlotIncluded = true;
|
| 76 | + }
|
| 77 | +
|
| 78 | + $scripts[] = "$srfgScriptPath/jqPlot/jqplot.categoryAxisRenderer.min.js";
|
| 79 | + $scripts[] = "$srfgScriptPath/jqPlot/jqplot.barRenderer.min.js";
|
| 80 | + $scripts[] = "$srfgScriptPath/jqPlot/jqplot.canvasAxisTickRenderer.min.js";
|
| 81 | + $scripts[] = "$srfgScriptPath/jqPlot/jqplot.canvasTextRenderer.min.js";
|
| 82 | +
|
| 83 | + foreach ( $scripts as $script ) {
|
| 84 | + $wgOut->addScript( '<script type="text/javascript" src="' . $script . '"></script>' );
|
| 85 | + }
|
| 86 | +
|
| 87 | + // CSS file
|
| 88 | + $bar_css = array(
|
| 89 | + 'rel' => 'stylesheet',
|
| 90 | + 'type' => 'text/css',
|
| 91 | + 'media' => "screen",
|
| 92 | + 'href' => $srfgScriptPath . '/jqPlot/jquery.jqplot.css'
|
| 93 | + );
|
| 94 | + $wgOut->addLink( $bar_css );
|
| 95 | + $this->isHTML = true;
|
| 96 | +
|
| 97 | + $numbers = array();
|
| 98 | + $labels = array();
|
| 99 | + // print all result rows
|
| 100 | + $count = 0;
|
| 101 | + while ( $row = $res->getNext() ) {
|
| 102 | + $name = $row[0]->getNextObject()->getShortWikiText();
|
| 103 | + foreach ( $row as $field ) {
|
| 104 | + while ( ( $object = $field->getNextObject() ) !== false ) {
|
| 105 | + if ( $object->isNumeric() ) { // use numeric sortkey
|
| 106 | + if ( method_exists( $object, 'getValueKey' ) ) {
|
| 107 | + $nr = $object->getValueKey();
|
| 108 | + } else {
|
| 109 | + $nr = $object->getNumericValue();
|
| 110 | + }
|
| 111 | + $count++;
|
| 112 | +
|
| 113 | + if ( $this->m_bardirection == 'horizontal' ) {
|
| 114 | + $numbers[] = "[$nr, $count]";
|
| 115 | + } else {
|
| 116 | + $numbers[] = "$nr";
|
| 117 | + }
|
| 118 | + $labels[] = "'$name'";
|
| 119 | + }
|
| 120 | + }
|
| 121 | + }
|
| 122 | + }
|
| 123 | + $barID = 'bar' . self::$m_barchartnum;
|
| 124 | + self::$m_barchartnum++;
|
| 125 | +
|
| 126 | + $labels_str = implode( ', ', $labels );
|
| 127 | + $numbers_str = implode( ', ', $numbers );
|
| 128 | + $labels_axis ="xaxis";
|
| 129 | + $numbers_axis = "yaxis";
|
| 130 | + $angle_val = -40;
|
| 131 | + $barmargin= 30;
|
| 132 | + if ( $this->m_bardirection == 'horizontal' ) {
|
| 133 | + $labels_axis ="yaxis";
|
| 134 | + $numbers_axis ="xaxis";
|
| 135 | + $angle_val = 0;
|
| 136 | + $barmargin = 8 ;
|
| 137 | + }
|
| 138 | + $barwidth = 20; // width of each bar
|
| 139 | + $bardistance = 4; // distance between two bars
|
| 140 | + $js_bar =<<<END
|
| 141 | +<script type="text/javascript">
|
| 142 | +jQuery.noConflict();
|
| 143 | +jQuery(document).ready(function(){
|
| 144 | + jQuery.jqplot.config.enablePlugins = true;
|
| 145 | + plot1 = jQuery.jqplot('$barID', [[$numbers_str]], {
|
| 146 | + title: '{$this->m_charttitle}',
|
| 147 | + seriesColors: ['$this->m_barcolor'],
|
| 148 | + series: [ {
|
| 149 | + renderer: jQuery.jqplot.BarRenderer, rendererOptions: {
|
| 150 | + barDirection: '{$this->m_bardirection}',
|
| 151 | + barPadding: 6,
|
| 152 | + barMargin: $barmargin
|
| 153 | + }
|
| 154 | + }],
|
| 155 | + axes: {
|
| 156 | + $labels_axis: {
|
| 157 | + renderer: jQuery.jqplot.CategoryAxisRenderer,
|
| 158 | + ticks: [$labels_str],
|
| 159 | + tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
|
| 160 | + tickOptions: {
|
| 161 | + angle: $angle_val
|
| 162 | + }
|
| 163 | + },
|
| 164 | + $numbers_axis: {
|
| 165 | + autoscale: true,
|
| 166 | + label: '{$this->m_numbersaxislabel}'
|
| 167 | + }
|
| 168 | + }
|
| 169 | + });
|
| 170 | +});
|
| 171 | +</script>
|
| 172 | +
|
| 173 | +END;
|
| 174 | + $wgOut->addScript($js_bar);
|
| 175 | + $text =<<<END
|
| 176 | +<div id="$barID" style="margin-top: 20px; margin-left: 20px; width: {$this->m_width}px; height: {$this->m_height}px;"></div>
|
| 177 | +
|
| 178 | +END;
|
| 179 | + return $text;
|
| 180 | + }
|
| 181 | +
|
| 182 | + public function getParameters() {
|
| 183 | + return array(
|
| 184 | + array( 'name' => 'limit', 'type' => 'int', 'description' => wfMsg( 'smw_paramdesc_limit' ) ),
|
| 185 | + array( 'name' => 'height', 'type' => 'int', 'description' => wfMsg( 'srf_paramdesc_chartheight' ) ),
|
| 186 | + array( 'name' => 'charttitle', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_charttitle' ) ),
|
| 187 | + array( 'name' => 'barcolor', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_barcolor' ) ),
|
| 188 | + array( 'name' => 'bardirection', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_bardirection' ),'values' => array('horizontal', 'vertical')),
|
| 189 | + array( 'name' => 'numbersaxislabel', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_barnumbersaxislabel' ) ),
|
| 190 | + array( 'name' => 'width', 'type' => 'int', 'description' => wfMsg( 'srf_paramdesc_chartwidth' ) ),
|
| 191 | + );
|
| 192 | + }
|
| 193 | +}
|
Index: trunk/extensions/SemanticResultFormats/jqPlot/jqplot.categoryAxisRenderer.min.js |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +/** |
| 3 | + * Copyright (c) 2009 Chris Leonello |
| 4 | + * jqPlot is currently available for use in all personal or commercial projects |
| 5 | + * under both the MIT and GPL version 2.0 licenses. This means that you can |
| 6 | + * choose the license that best suits your project and use it accordingly. |
| 7 | + * |
| 8 | + * Although not required, the author would appreciate an email letting him |
| 9 | + * know of any substantial use of jqPlot. You can reach the author at: |
| 10 | + * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . |
| 11 | + * |
| 12 | + * If you are feeling kind and generous, consider supporting the project by |
| 13 | + * making a donation at: http://www.jqplot.com/donate.php . |
| 14 | + */ |
| 15 | +(function(a){a.jqplot.CategoryAxisRenderer=function(){a.jqplot.LinearAxisRenderer.call(this)};a.jqplot.CategoryAxisRenderer.prototype=new a.jqplot.LinearAxisRenderer();a.jqplot.CategoryAxisRenderer.prototype.constructor=a.jqplot.CategoryAxisRenderer;a.jqplot.CategoryAxisRenderer.prototype.init=function(e){a.extend(true,this,{tickOptions:{formatString:"%d"}},e);var b=this._dataBounds;for(var f=0;f<this._series.length;f++){var g=this._series[f];var h=g.data;for(var c=0;c<h.length;c++){if(this.name=="xaxis"||this.name=="x2axis"){if(h[c][0]<b.min||b.min==null){b.min=h[c][0]}if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}}else{if(h[c][1]<b.min||b.min==null){b.min=h[c][1]}if(h[c][1]>b.max||b.max==null){b.max=h[c][1]}}}}};a.jqplot.CategoryAxisRenderer.prototype.createTicks=function(){var y=this._ticks;var v=this.ticks;var B=this.name;var x=this._dataBounds;var p,w;var n,q;var d,c;var b,r;if(v.length){this.min=0.5;this.max=v.length+0.5;var h=this.max-this.min;this.numberTicks=2*v.length+1;for(r=0;r<v.length;r++){b=this.min+2*r*h/(this.numberTicks-1);var f=new this.tickRenderer(this.tickOptions);f.showLabel=false;f.showMark=true;f.setTick(b,this.name);this._ticks.push(f);var f=new this.tickRenderer(this.tickOptions);f.label=v[r];f.showLabel=true;f.showMark=false;f.showGridline=false;f.setTick(b+0.5,this.name);this._ticks.push(f)}var f=new this.tickRenderer(this.tickOptions);f.showLabel=false;f.showMark=true;f.setTick(b+1,this.name);this._ticks.push(f)}else{if(B=="xaxis"||B=="x2axis"){p=this._plotDimensions.width}else{p=this._plotDimensions.height}if(this.min!=null&&this.max!=null&&this.numberTicks!=null){this.tickInterval=null}if(this.min!=null&&this.max!=null&&this.tickInterval!=null){if(parseInt((this.max-this.min)/this.tickInterval,10)!=(this.max-this.min)/this.tickInterval){this.tickInterval=null}}var u=[];var z=0;var n=0.5;var q,A;for(var r=0;r<this._series.length;r++){var g=this._series[r];for(var o=0;o<g.data.length;o++){if(this.name=="xaxis"||this.name=="x2axis"){A=g.data[o][0]}else{A=g.data[o][1]}if(a.inArray(A,u)==-1){z+=1;u.push(A)}}}this.ticks=u;for(var r=0;r<this._series.length;r++){var g=this._series[r];for(var o=0;o<g.data.length;o++){if(this.name=="xaxis"||this.name=="x2axis"){A=g.data[o][0]}else{A=g.data[o][1]}var k=a.inArray(A,u)+1;if(this.name=="xaxis"||this.name=="x2axis"){g.data[o][0]=k}else{g.data[o][1]=k}}}q=z+0.5;if(this.numberTicks==null){this.numberTicks=2*z+1}var h=q-n;this.min=n;this.max=q;var l=0;var e=parseInt(3+p/20,10);var m=parseInt(z/e,10);if(this.tickInterval==null){this.tickInterval=h/(this.numberTicks-1)}for(var r=0;r<this.numberTicks;r++){b=this.min+r*this.tickInterval;var f=new this.tickRenderer(this.tickOptions);if(r/2==parseInt(r/2,10)){f.showLabel=false;f.showMark=true}else{if(m>0&&l<m){f.showLabel=false;l+=1}else{f.showLabel=true;l=0}f.label=f.formatter(f.formatString,u[(r-1)/2]);f.showMark=false;f.showGridline=false}if(!this.showTicks){f.showLabel=false;f.showMark=false}else{if(!this.showTickMarks){f.showMark=false}}f.setTick(b,this.name);this._ticks.push(f)}}}})(jQuery); |
\ No newline at end of file |
Index: trunk/extensions/SemanticResultFormats/jqPlot/jquery.jqplot.css |
— | — | @@ -0,0 +1,165 @@ |
| 2 | +/*rules for the plot target div. These will be cascaded down to all plot elements according to css rules*/ |
| 3 | +.jqplot-target { |
| 4 | + position: relative; |
| 5 | + color: #666666; |
| 6 | + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; |
| 7 | + font-size: 1em; |
| 8 | +} |
| 9 | + |
| 10 | +/*rules applied to all axes*/ |
| 11 | +.jqplot-axis { |
| 12 | + font-size: 0.75em; |
| 13 | +} |
| 14 | + |
| 15 | +.jqplot-xaxis { |
| 16 | + margin-top: 10px; |
| 17 | +} |
| 18 | + |
| 19 | +.jqplot-x2axis { |
| 20 | + margin-bottom: 10px; |
| 21 | +} |
| 22 | + |
| 23 | +.jqplot-yaxis { |
| 24 | + margin-right: 10px; |
| 25 | +} |
| 26 | + |
| 27 | +.jqplot-y2axis, .jqplot-y3axis, .jqplot-y4axis, .jqplot-y5axis, .jqplot-y6axis, .jqplot-y7axis, .jqplot-y8axis, .jqplot-y9axis { |
| 28 | + margin-left: 10px; |
| 29 | + margin-right: 10px; |
| 30 | +} |
| 31 | + |
| 32 | +/*rules applied to all axis tick divs*/ |
| 33 | +.jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick, .jqplot-x2axis-tick, .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick { |
| 34 | + position: absolute; |
| 35 | +} |
| 36 | + |
| 37 | + |
| 38 | +.jqplot-xaxis-tick { |
| 39 | + top: 0px; |
| 40 | + /* initial position until tick is drawn in proper place */ |
| 41 | + left: 15px; |
| 42 | +/* padding-top: 10px;*/ |
| 43 | + vertical-align: top; |
| 44 | +} |
| 45 | + |
| 46 | +.jqplot-x2axis-tick { |
| 47 | + bottom: 0px; |
| 48 | + /* initial position until tick is drawn in proper place */ |
| 49 | + left: 15px; |
| 50 | +/* padding-bottom: 10px;*/ |
| 51 | + vertical-align: bottom; |
| 52 | +} |
| 53 | + |
| 54 | +.jqplot-yaxis-tick { |
| 55 | + right: 0px; |
| 56 | + /* initial position until tick is drawn in proper place */ |
| 57 | + top: 15px; |
| 58 | +/* padding-right: 10px;*/ |
| 59 | + text-align: right; |
| 60 | +} |
| 61 | + |
| 62 | +.jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick { |
| 63 | + left: 0px; |
| 64 | + /* initial position until tick is drawn in proper place */ |
| 65 | + top: 15px; |
| 66 | +/* padding-left: 10px;*/ |
| 67 | +/* padding-right: 15px;*/ |
| 68 | + text-align: left; |
| 69 | +} |
| 70 | + |
| 71 | +.jqplot-xaxis-label { |
| 72 | + margin-top: 10px; |
| 73 | + font-size: 11pt; |
| 74 | + position: absolute; |
| 75 | +} |
| 76 | + |
| 77 | +.jqplot-x2axis-label { |
| 78 | + margin-bottom: 10px; |
| 79 | + font-size: 11pt; |
| 80 | + position: absolute; |
| 81 | +} |
| 82 | + |
| 83 | +.jqplot-yaxis-label { |
| 84 | + margin-right: 10px; |
| 85 | +/* text-align: center;*/ |
| 86 | + font-size: 11pt; |
| 87 | + position: absolute; |
| 88 | +} |
| 89 | + |
| 90 | +.jqplot-y2axis-label, .jqplot-y3axis-label, .jqplot-y4axis-label, .jqplot-y5axis-label, .jqplot-y6axis-label, .jqplot-y7axis-label, .jqplot-y8axis-label, .jqplot-y9axis-label { |
| 91 | +/* text-align: center;*/ |
| 92 | + font-size: 11pt; |
| 93 | + position: absolute; |
| 94 | +} |
| 95 | + |
| 96 | +table.jqplot-table-legend, table.jqplot-cursor-legend { |
| 97 | + background-color: rgba(255,255,255,0.6); |
| 98 | + border: 1px solid #cccccc; |
| 99 | + position: absolute; |
| 100 | + font-size: 0.75em; |
| 101 | +} |
| 102 | + |
| 103 | +td.jqplot-table-legend { |
| 104 | + vertical-align:middle; |
| 105 | +} |
| 106 | + |
| 107 | +td.jqplot-table-legend > div { |
| 108 | + border:1px solid #cccccc; |
| 109 | + padding:0.2em; |
| 110 | +} |
| 111 | + |
| 112 | +div.jqplot-table-legend-swatch { |
| 113 | + width:0px; |
| 114 | + height:0px; |
| 115 | + border-top-width: 0.35em; |
| 116 | + border-bottom-width: 0.35em; |
| 117 | + border-left-width: 0.6em; |
| 118 | + border-right-width: 0.6em; |
| 119 | + border-top-style: solid; |
| 120 | + border-bottom-style: solid; |
| 121 | + border-left-style: solid; |
| 122 | + border-right-style: solid; |
| 123 | +} |
| 124 | + |
| 125 | +.jqplot-title { |
| 126 | + top: 0px; |
| 127 | + left: 0px; |
| 128 | + padding-bottom: 0.5em; |
| 129 | + font-size: 1.2em; |
| 130 | +} |
| 131 | + |
| 132 | +table.jqplot-cursor-tooltip { |
| 133 | + border: 1px solid #cccccc; |
| 134 | + font-size: 0.75em; |
| 135 | +} |
| 136 | + |
| 137 | + |
| 138 | +.jqplot-cursor-tooltip { |
| 139 | + border: 1px solid #cccccc; |
| 140 | + font-size: 0.75em; |
| 141 | + white-space: nowrap; |
| 142 | + background: rgba(208,208,208,0.5); |
| 143 | + padding: 1px; |
| 144 | +} |
| 145 | + |
| 146 | +.jqplot-highlighter-tooltip { |
| 147 | + border: 1px solid #cccccc; |
| 148 | + font-size: 0.75em; |
| 149 | + white-space: nowrap; |
| 150 | + background: rgba(208,208,208,0.5); |
| 151 | + padding: 1px; |
| 152 | +} |
| 153 | + |
| 154 | +.jqplot-point-label { |
| 155 | + font-size: 0.75em; |
| 156 | +} |
| 157 | + |
| 158 | +td.jqplot-cursor-legend-swatch { |
| 159 | + vertical-align:middle; |
| 160 | + text-align:center; |
| 161 | +} |
| 162 | + |
| 163 | +div.jqplot-cursor-legend-swatch { |
| 164 | + width:1.2em; |
| 165 | + height:0.7em; |
| 166 | +} |