diff --git a/phpgwapi/js/jquery/jqplot/MIT-LICENSE.txt b/phpgwapi/js/jquery/jqplot/MIT-LICENSE.txt
new file mode 100644
index 0000000000..da4732ec39
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/MIT-LICENSE.txt
@@ -0,0 +1,21 @@
+Title: MIT License
+
+Copyright (c) 2009-2011 Chris Leonello
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/README.txt b/phpgwapi/js/jquery/jqplot/README.txt
new file mode 100644
index 0000000000..2b2b09ad04
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/README.txt
@@ -0,0 +1,77 @@
+Title: jqPlot Readme
+
+Pure JavaScript plotting plugin for jQuery.
+
+To learn how to use jqPlot, start with the Basic Unsage Instructions below. Then read the
+usage.txt and jqPlotOptions.txt files included with the distribution.
+
+The jqPlot home page is at .
+
+Downloads can be found at .
+
+The mailing list is at .
+
+Examples and unit tests are at .
+
+Documentation is at .
+
+The project page and source code are at .
+
+Bugs, issues, feature requests: .
+
+Basic Usage Instructions:
+
+jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.4.4 is included in
+the distribution. To use jqPlot include jQuery, the jqPlot jQuery plugin, the jqPlot css file and
+optionally the excanvas script to support IE version prior to IE 9 in your web page:
+
+>
+>
+>
+>
+
+For usage instructions, see in usage.txt. For available options, see
+ in jqPlotOptions.txt.
+
+Building from source:
+
+If you've cloned the repository, you can build a distribution from source.
+You need to have ant installed. You can simply
+type "ant" from the jqplot directory to build the default "all" target.
+There are 6 pertinent targets: clean, dist, min, docs, compress and all. Use:
+
+> ant -p
+
+to get a description of the various build targets.
+
+Legal Notices:
+
+Copyright (c) 2009-2010 Chris Leonello
+jqPlot is currently available for use in all personal or commercial projects
+under both the MIT and GPL version 2.0 licenses. This means that you can
+choose the license that best suits your project and use it accordingly.
+
+Although not required, the author would appreciate an email letting him
+know of any substantial use of jqPlot. You can reach the author at:
+chris at jqplot or see http://www.jqplot.com/info.php .
+
+If you are feeling kind and generous, consider supporting the project by
+making a donation at: http://www.jqplot.com/donate.php .
+
+jqPlot includes date instance methods and printf/sprintf functions by other authors:
+
+Date instance methods:
+
+ author Ken Snyder (ken d snyder at gmail dot com)
+ date 2008-09-10
+ version 2.0.2 (http://kendsnyder.com/sandbox/date/)
+ license Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/)
+
+JavaScript printf/sprintf functions.
+
+ version 2007.04.27
+ author Ash Searle
+ http://hexmen.com/blog/2007/03/printf-sprintf/
+ http://hexmen.com/js/sprintf.js
+ The author (Ash Searle) has placed this code in the public domain:
+ "This code is unrestricted: you are free to use it however you like."
diff --git a/phpgwapi/js/jquery/jqplot/changes.txt b/phpgwapi/js/jquery/jqplot/changes.txt
new file mode 100644
index 0000000000..79c1567759
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/changes.txt
@@ -0,0 +1,395 @@
+Title: Change Log
+
+1.0.0b2:
+* Major improvements in memory usage:
+** Merged in changes from Timo Besenruether to reuse canvas elements and improve
+ memory performance.
+** Fixed all identifiable DOM leaks.
+** Mergged in changes from cguillot for memory improvements in IE < 9.
+* Added vertical and dashed vertical line support for canvas overlay.
+* Fixed bug where initially hidden plots would not display.
+* Fixed bug with point labels and null data points.
+* Updated to jQuery 1.6.1.
+* Improved pie slice margin calculation and fixed slice margin and pie positioning
+ with small slices.
+* Improved bar renderer so bars always start at 0 if:
+** The axis is a linear axis (not log/date).
+** There are no other line types besides bars attached to the axis.
+** The data on the axis is all >= 0.
+** The user has not specified a pad, padMin or forceTickAt0 = true option.
+* Modified tick prefix behavious so prefix no added to all ticks, even if format
+ string is specified.
+* Fix to ensure original tick formats are applied when zooming and resetting
+ zoom.
+* Updated auto tick format string so format adjusted when zooming.
+* Modified auto tick computation to put less ticks on small plots and more
+ ticks on large plots.
+* Update bubble render to support gradients in IE 9.
+
+1.0.0b1:
+* Much improved tick generation algorithm to get precise rounded
+ tick values (Thanks Scott Prahl!).
+* Auto compute tick format string if none is provided.
+* Much better "slicing" of pie charts when using "sliceMargin" option to set
+ a gap between the slices.
+* Expanded canvasOverlay plugin to create arbitrary dashed and solid
+ horizontal and vertical lines on top of plot.
+* Added defaultColors and defaultNegativeColors options to $.jqplot.config.
+* Fixed issue #318, highlighter & bar renderer incompatability.
+* Improve highlighter tooltip positioning with negative bars.
+* Fixed #305, mispelling of jqlotDragStart and jqlotDragStop. MUST NOW BIND
+ TO jqplotDragStart and jqplotDragStop.
+* Fixed #290, some variables left in global scope.
+* Fixed #289, OHLC line widths hard coded at 1.5. Now set by lineWidth option.
+* Fixed #296 for determining databounds on log axes.
+* Updated to jQuery 1.5.1
+* Fixed waterfall plot to ensure first and last bars always fill to zero.
+* Added lineJoin and lineCap option to series lines.
+* Bar widths now based on width of grid, not plot target for better scaling.
+* Added looseZoom option to cursor so zooming can produce well rounded ticks.
+* Added forceTickAt0 and forceTickAt100 options to ensure there will always
+ be a tick at 0 or 100 in the plot.
+* Fixed bug where cursor legend didn't honor series showLabel option.
+
+
+1.0.0a:
+
+* Series can now be moved forward or backward in stack to e.g. bring a line
+ forward when mousing over a point.
+* Can now move outside of grid area while zooming. Can have zoom
+ constrained to grid area or allow zooming outside.
+* Fixed issue #142 with tooltip drawn on top of event canvas, hiding
+ mouse events.
+* Fixed #147 where pie slices with 0 value not rendering properly in IE.
+* Fixed #130 where stack data not sorted properly.
+* Fixed bug with null values not handled properly in category axes.
+* Fixed #156 where pie charts not rendering on QTWebKit.
+* Now using feature detection for canvas and canvas text capability
+ rather than browser version.
+* Added enahncedLegendRenderer plugin to allow multi row/column legends
+ and clickable labels to show/hide series.
+* Added fillToValue option to allow filled line plot to fill to an
+ arbitrary value.
+* Added block plot plugin.
+* Added funnel type charts.
+* Added meter gauge type charts.
+* Added plot theming support.
+* $.jqplot.config.enablePlugins now false by default.
+* Implemented highlighting on bar, pie, donut, funnel, etc. charts.
+* Fix to pointlabels plugin to align labels properly on multi series plots.
+* Added custom error handling to display error message in plot area.
+* Fixed issue where would call to draw grid border of 0 width would
+ result in a default border being drawn.
+* Added options to place legend outside of grid and shrink grid so everything
+ stays within plot div.
+* Fixed bug in color generator so now calls to get() continually cycle
+ through colors just like next().
+* Added defaultAxisStart option.
+* Added gradient fills to bubbles.
+* Added bubble charts.
+* Added showLabels option to bubble charts.
+* Pass bubble radius to event callback in bubble charts.
+* Fixed #207, typo in docs.
+* Fixed #206 where "value" pie slice data labels were displaying wrong
+ value.
+* Fixed #147 with 0 value slices in IE6.
+* Fixed issue #241, disabled varyBarColor option in stacked charts.
+* Added dataRenderer option to allow custom processors for JSON, AJAX
+ and anywhere else you might want to get data.
+* Fixed null value handling so plot now properly skip or join over nulls.
+* Fixed showTicks and showTickMarks option conflicts.
+* Fixed issue #185 where pointLabels plugin incompatibility could crash
+ pie, donut and other plots.
+* Fixed #23 and #143 to obey gridPadding option.
+* Fixed #233 with highlighter tooltip separator.
+* Fixed #224 where type checking failing on GWT.
+* Fixed #272 with pie highlighting not working on replot.
+* Memory performance improvements.
+* Changes to build script so everything should build when pulled from repo.
+* Fixed issue #275, IE 6/7 don't support array indexing of strings.
+* Added event listener hooks for mouseUp, mouseDown, etc. to all line plots.
+* Fixed bug with highlighter not working when null in data.
+* Updated to jQuery 1.4.4
+* Fixed bug where donut plots showed value of radians of slice instead
+ of actual data.
+* Reverted to excanvas r3 so IE8 no longer has to emulate IE7.
+* Added tooltipContentEditor option to highlighter, allowing callback
+ to manipulate tooltip content at run time (thanks Tim Bunce!).
+* Fixed bug where axes scale not resetting.
+* Fixed bug with date axes where data bounds not properly set.
+* Fixed issue where tick marks disappear if grid lines turned off.
+* Updated replot method to allow passing in axes options for more control.
+* Added experimental support for "broken" axes.
+* Fixed bug with pies where pies with 0 valued slices did not draw correctly.
+* Added canvasOverlay plugin to allow drawing of arbitrary shapes on a canvas
+ over the plot.
+* Added option to display arbitrary text/html (message, animated gif, etc.) if
+ plot is constructed without data. Allow a "data loading" indicator to be shown.
+* Added resetAxisValues method to manually update axis ticks without
+ redrawing the plot.
+* Fix to labels on negative bars so label postiion of 'n' will be below a negative bar,
+ just as it is above a positive bar (thanks guigod!).
+* Added thousands separator character (') to sprintf formatting (thanks yuichi1004!).
+* Re-factored date parsing/formatting to use new jsDate module which does not
+ extend the Date prototype.
+
+
+0.9.7:
+
+* Added Mekko chart plot type with enhanced legend and axes support.
+* Implemented vertical waterfall charts. Can create waterfall plot as
+ option to bar chart. See examples folder of distribution.
+* Enhanced plot labels for waterfall style.
+* Enhanced bar plots so you can now color each bar of a series
+ independently with the "varyBarColor" option.
+* Re-factored series drawing so that each series and series shadow drawn
+ on it's own canvas. Allows series to be redrawn independently of each other.
+* Added additional default series colors.
+* Added useNegativeColors option to turn off negative color array and use
+ only seriesColors array to define all bar/filled line colors.
+* Fix css for cursor legend.
+* Modified shape renderer so rectangles can be stroked and filled.
+* Re-factored date methods out of dateAxisRenderer so that date formatter
+ and methods can be accesses outside of dateAxisRenderer plugin.
+* Fixed #132, now trigger series change event on plot target instead of drag canvas.
+* Fixes issue #116 where some source files had mix of tabs and spaces
+ for indentation. Should have been all spaces.
+* Fixed issue #126, some links broken in docs section of web site.
+* Fixed issue #90, trendline plugin incompatibility with pie renderer.
+* Updated samples in examples folder of distribution to include navigation
+ links if web server is set up to process .html files with php.
+
+
+0.9.6:
+
+* New, easier to use, replot() method for placing plots in tabs, accordions,
+ resizable containers or for changing plot parameters programmatically.
+* Updated legend renderer for pie charts to draw swatches which will
+ print correctly.
+* Fixed issue #118 with patch from taum so autoscale option will
+ honor tickInterval and numberTicks options
+* Fix to plot diameter calculation for initially hidden plots.
+* Added examples for making plots in jQuery UI tabs and accordions.
+* Fixed issue #120 where pie chart with single slice not displaying
+ correctly in IE and Chrome
+
+
+0.9.5.2:
+
+* Fixed #102 where double clicking on plot that has zoom enabled, but
+ has not been zoomed resulted in error.
+* Fixed bug where candlestick coloring options not working.
+* Added option to turn individual series labels off in the legend.
+
+
+0.9.5.1:
+
+* Fixed bug where tooltip not working with OHLC and candlestick charts.
+* Added additional marker styles: plus, X and dash.
+
+
+0.9.5:
+
+* Implemented "zoomProxy". zoomProxy allows zooming one plot from another
+ such as an overview plot.
+* Zooming can now be constrained to just x or y axis.
+* Enhanced cursor plugin with vertical "dataTracking" line. This is a line
+ at the cursor location with a readout of data points at the line location
+ which are displayed in the chart legend.
+* Changed cursor tooltip format string. Now one format string is used for
+ entire tooltip.
+* Added mechanisms to specify plot size when plot target is hidden or plot
+ height/width otherwise cannot be determined from markup.
+* Added $.jqplot.config object to specify jqplot wide configuration options.
+ These include enablePlugins to globally set the default plugin state on/off
+ and defaultHeight/defaultWidth to specify default plot height/width.
+* Added fillToZero option which forces filled charts to fill to zero as opposed
+ to axis minimum. Thus negative filled bar/line values will fill upwards to
+ zero axis value.
+* Added option to disable stacking on individual lines.
+* Changed targetId property of the plot object so it now includes a "#" before
+ the id string.
+* Improved tick and body sizing of Open Hi Low Close and candlestick charts.
+* Removed lots of web site related files from the repository. This means that,
+ if working from the sources, user's won't be able to build the jqplot web
+ site and the docs/tests that are hosted on that site. The minified and
+ compressed distribution packages will build fine.
+* Lots of examples were added to a separate examples directory to better show
+ functionality of jqPlot for local testing with the distribution.
+* Many various bug fixes and other minor enhancements.
+
+
+0.9.4:
+
+* Implemented axis labels. Labels can be rendered in div tags or as canvas
+ elements supporting rotated text.
+* Improved rotated axis label positioning so labels will start or end at a
+ tick position.
+* Fixed bug where an empty data series would hang plot rendering.
+* completed issue #66 for misc. improvements to documentation.
+* Fixed issue #64 where the same ID's were assigned to cursor and highlighter
+ elements.
+* Added option to legend to encode special HTML characters.
+* Fixed undesirable behavior where point labels for points off the plot
+ were being rendered.
+* Added edgeTolerance option to point label renderer to control rendering of
+ labels near plot edges.
+
+
+0.9.3:
+
+* Preliminary support for axis labels. Currently rendered into DIV tags,
+ so no rotated label support. This feature is currently experimental.
+* Fixed bug #52, needed space in tick div tag between style and class declarations
+ or plot failed in certain application doctypes.
+* Fixed issue #54, miter style line join for chart lines causing spikes at steep
+ changes in slope. Changed miter style to round.
+* Added examples for new autoscaling algorithm.
+* Fixed bug #57, category axis labels disappear on redraw()
+* Improved algorithm which controlled maximum number of labels that would display
+ on a category axis.
+* Fixed bug #45 where null values causing errors in plotData and gridData.
+* Fixed issue #60 where seriesColors option was not working.
+
+
+0.9.2:
+
+* Fixed bug #45 where a plot could crash if series had different numbers of points.
+* Fixed issue #50, added option to turn off sorting of series data.
+* Fixed issue #31, implemented a better axis autoscaling algorithm and added an autoscale option.
+
+0.9.1:
+
+* Fixed bug #40, when axis pad, padMax, padMin set to 0, graph would fail to render.
+* Fixed bug #41 where pie and bar charts not rendered correctly on redraw().
+* Fixed bug #11, filled stacked line plots not rendering correctly in IE.
+* Fixed bug #42 where stacked charts not rendering with string date axis ticks.
+* Fixed bug in redraw() method where axes ticks were not reset.
+* Fixed "jqplotPreRedrawEvent" that should have been named "jqplotPostRedraw" event.
+
+0.9.0:
+
+* Added Open Hi Low Close charts, Candlestick charts and Hi Low Close charts.
+* Added support for arbitrary labels on the data points.
+* Enhanced highlighter plugin to allow custom formatting control of entire tooltip.
+* Enhanced highlighter to support multiple y values in a data point.
+* Fixed bug #38 where series with a single point with a negative value would fail.
+* Improvements to examples to show what plugins to include.
+* Expanded documentation for some of the plugins.
+
+0.8.5:
+
+* Added zooming ability with double click or single click options to reset zoom.
+* Modified default tick spacing algorithm for date axes to give more space to ticks.
+* Fixed bug #2 where tickInterval wasn't working properly.
+* Added neighborThreshold option to control how close mouse must be to
+ point to trigger neighbor detection.
+* Added double click event handler on plot.
+
+0.8.0:
+
+* Support for up to 9 y axes.
+* Added option to control padding at max/min bounds of axes separately.
+* Closed issue #21, added options to control grid line color and width.
+* Closed issue #20, added options to filled line charts to stoke above
+ fill and customize fill color and transparency.
+* Improved structure of on line documentation to make usage and options
+ docs default.
+* Added much documentation on options and css styling.
+
+0.7.1:
+
+* Bug fix release
+* Fixed bug #6, missing semi-colons messing up some javascript compressors.
+* Fixed bug #13 where 2D ticks array of [values, labels] would fail to
+ renderer with DateAxisRenderer.
+* Fixes bug #16 where pie renderer overwriting options for all plot types
+ and crashing non pie plots.
+* Fixes bug #17 constrainTo dragable option mispelled as "contstrainTo".
+ Fixed dragable color issue when used with trend lines.
+
+0.7.0:
+
+* Pie chart support
+* Enabled tooltipLocation option in highlighter.
+* Highlighter Tooltip will account for mark size and highlight size when
+ positioning itself.
+* Added ability to show just x, y or both axes in highlighter tooltip.
+* Added customization of separator between axes values in highlighter tooltip.
+* Modified how shadows are drawn for lines, bars and markers. Now drawn first,
+ so they are always behind the object.
+* Adjustments to shadow parameters on lines to account for new shadow positioning.
+* Added a ColorGenerator class to robustly return next available color
+ for a plot with wrap around to first color at end.
+* Udates to docs about css file.
+* Fixed bug with String x values in series and IE error on sorting (Category Axis).
+* Added cursor changes in dragable plugin when cursor near dragable point.
+
+0.6.6b:
+
+* Added excanvas.js and excanvas.min.js to compressed distributions.
+* Added example/test html pages I had locally into repository and to
+ compressed distributions.
+
+0.6.6a:
+
+* Removed absolute positioning from dom element and put back into css file.
+* Duplicate of 0.6.6 with a suffix to unambiguously differentiate between
+ previously posted 0.6.6 release.
+
+0.6.6:
+
+* Fixed bug #5, trend line plugin failing when no trend line options specified.
+* Added absolute position css spec to axis tick dom element.
+* Enhancement to category axes, more intuitive handling of series with
+ missing data values.
+
+0.6.5:
+
+* Fixed bug #4, series of unequal data length not rendering correctly.
+ This is a bugfix release only.
+
+0.6.4:
+
+* Fixed bug (issue #1 in tracker) where flat line data series (all x and/or y
+ values are euqal) or single value data series would crash.
+
+0.6.3:
+
+* Support for stacked line (a.k.a. area) and stacked bar (horizontal and
+ vertical) charts.
+* Refactored barRenderer to use default shape and shadow renderers.
+* Added info (contacts & support information) page to web site.
+
+0.6.2:
+
+* This is a minor upgrade to docs and build only. No functionality has changed.
+* Ant build script generates entire site, examples, tests and distribution.
+* Improvements to documentation.
+
+0.6.1:
+
+* New sprintf implementation from Ash Searle that implements %g.
+* Fix to sprintf e/f formats.
+* Created new format specifier, %p and %P to preserve significance.
+* Modified p/P format to better display larger numbers.
+* Fixed and simplified significant digits calculation for sprintf.
+* Added option to have cursor tooltip follow the mouse or not.
+* Added options to change size of highlight.
+* Updates to handle dates like '6-May-09'.
+* Mods to improve look of web site.
+* Updates to documentation.
+* Added license and copyright statement to source files.
+
+0.6.0:
+
+* Added rotated text support. Uses native canvas text functionality in
+ browsers that support it or draws text on canvas with Hershey font
+* metrics for non-supporting browsers.
+* Removed lots of lint in js code.
+* Moved tick css from js code into css file.
+* Fix to tick positioning css. y axis ticks were positioned to wrong side of axis div.
+* Re-factored axis tick renderer instantiation into the axes renderers themselves.
+
+
+For changes prior to 0.6.0 release, please see change log at http://bitbucket.org/cleonello/jqplot/changesets/
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/copyright.txt b/phpgwapi/js/jquery/jqplot/copyright.txt
new file mode 100644
index 0000000000..1329729f6f
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/copyright.txt
@@ -0,0 +1,29 @@
+/**
+ * jqPlot
+ * Pure JavaScript plotting plugin using jQuery
+ *
+ * Version: @VERSION
+ *
+ * Copyright (c) 2009-2011 Chris Leonello
+ * jqPlot is currently available for use in all personal or commercial projects
+ * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
+ * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
+ * choose the license that best suits your project and use it accordingly.
+ *
+ * Although not required, the author would appreciate an email letting him
+ * know of any substantial use of jqPlot. You can reach the author at:
+ * chris at jqplot dot com or see http://www.jqplot.com/info.php .
+ *
+ * If you are feeling kind and generous, consider supporting the project by
+ * making a donation at: http://www.jqplot.com/donate.php .
+ *
+ * sprintf functions contained in jqplot.sprintf.js by Ash Searle:
+ *
+ * version 2007.04.27
+ * author Ash Searle
+ * http://hexmen.com/blog/2007/03/printf-sprintf/
+ * http://hexmen.com/js/sprintf.js
+ * The author (Ash Searle) has placed this code in the public domain:
+ * "This code is unrestricted: you are free to use it however you like."
+ *
+ */
diff --git a/phpgwapi/js/jquery/jqplot/docs/files/MIT-LICENSE-txt.html b/phpgwapi/js/jquery/jqplot/docs/files/MIT-LICENSE-txt.html
new file mode 100644
index 0000000000..34d120c3a1
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/docs/files/MIT-LICENSE-txt.html
@@ -0,0 +1,39 @@
+
+
+MIT License
+
+
+
+
+
+
+
+
+
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Major improvements in memory usage: ** Merged in changes from Timo Besenruether to reuse canvas elements and improve memory performance. ** Fixed all identifiable DOM leaks. ** Mergged in changes from cguillot for memory improvements in IE < 9.
Added vertical and dashed vertical line support for canvas overlay.
Fixed bug where initially hidden plots would not display.
Fixed bug with point labels and null data points.
Updated to jQuery 1.6.1.
Improved pie slice margin calculation and fixed slice margin and pie positioning with small slices.
Improved bar renderer so bars always start at 0 if: ** The axis is a linear axis (not log/date). ** There are no other line types besides bars attached to the axis. ** The data on the axis is all >= 0. ** The user has not specified a pad, padMin or forceTickAt0 = true option.
Modified tick prefix behavious so prefix no added to all ticks, even if format string is specified.
Fix to ensure original tick formats are applied when zooming and resetting zoom.
Updated auto tick format string so format adjusted when zooming.
Modified auto tick computation to put less ticks on small plots and more ticks on large plots.
Update bubble render to support gradients in IE 9.
1.0.0b1
Much improved tick generation algorithm to get precise rounded tick values (Thanks Scott Prahl!).
Auto compute tick format string if none is provided.
Much better “slicing” of pie charts when using “sliceMargin” option to set a gap between the slices.
Expanded canvasOverlay plugin to create arbitrary dashed and solid horizontal and vertical lines on top of plot.
Added defaultColors and defaultNegativeColors options to $.jqplot.config.
Fixed issue #318, highlighter & bar renderer incompatability.
Improve highlighter tooltip positioning with negative bars.
Fixed #305, mispelling of jqlotDragStart and jqlotDragStop. MUST NOW BIND TO jqplotDragStart and jqplotDragStop.
Fixed #290, some variables left in global scope.
Fixed #289, OHLC line widths hard coded at 1.5. Now set by lineWidth option.
Fixed #296 for determining databounds on log axes.
Updated to jQuery 1.5.1
Fixed waterfall plot to ensure first and last bars always fill to zero.
Added lineJoin and lineCap option to series lines.
Bar widths now based on width of grid, not plot target for better scaling.
Added looseZoom option to cursor so zooming can produce well rounded ticks.
Added forceTickAt0 and forceTickAt100 options to ensure there will always be a tick at 0 or 100 in the plot.
Fixed bug where cursor legend didn’t honor series showLabel option.
1.0.0a
Series can now be moved forward or backward in stack to e.g. bring a line forward when mousing over a point.
Can now move outside of grid area while zooming. Can have zoom constrained to grid area or allow zooming outside.
Fixed issue #142 with tooltip drawn on top of event canvas, hiding mouse events.
Fixed #147 where pie slices with 0 value not rendering properly in IE.
Fixed #130 where stack data not sorted properly.
Fixed bug with null values not handled properly in category axes.
Fixed #156 where pie charts not rendering on QTWebKit.
Now using feature detection for canvas and canvas text capability rather than browser version.
Added enahncedLegendRenderer plugin to allow multi row/column legends and clickable labels to show/hide series.
Added fillToValue option to allow filled line plot to fill to an arbitrary value.
Added block plot plugin.
Added funnel type charts.
Added meter gauge type charts.
Added plot theming support.
$.jqplot.config.enablePlugins now false by default.
Implemented highlighting on bar, pie, donut, funnel, etc. charts.
Fix to pointlabels plugin to align labels properly on multi series plots.
Added custom error handling to display error message in plot area.
Fixed issue where would call to draw grid border of 0 width would result in a default border being drawn.
Added options to place legend outside of grid and shrink grid so everything stays within plot div.
Fixed bug in color generator so now calls to get() continually cycle through colors just like next().
Added defaultAxisStart option.
Added gradient fills to bubbles.
Added bubble charts.
Added showLabels option to bubble charts.
Pass bubble radius to event callback in bubble charts.
Fixed #207, typo in docs.
Fixed #206 where “value” pie slice data labels were displaying wrong value.
Fixed #147 with 0 value slices in IE6.
Fixed issue #241, disabled varyBarColor option in stacked charts.
Added dataRenderer option to allow custom processors for JSON, AJAX and anywhere else you might want to get data.
Fixed null value handling so plot now properly skip or join over nulls.
Fixed showTicks and showTickMarks option conflicts.
Fixed issue #185 where pointLabels plugin incompatibility could crash pie, donut and other plots.
Fixed #23 and #143 to obey gridPadding option.
Fixed #233 with highlighter tooltip separator.
Fixed #224 where type checking failing on GWT.
Fixed #272 with pie highlighting not working on replot.
Memory performance improvements.
Changes to build script so everything should build when pulled from repo.
Fixed issue #275, IE 6/7 don’t support array indexing of strings.
Added event listener hooks for mouseUp, mouseDown, etc. to all line plots.
Fixed bug with highlighter not working when null in data.
Updated to jQuery 1.4.4
Fixed bug where donut plots showed value of radians of slice instead of actual data.
Reverted to excanvas r3 so IE8 no longer has to emulate IE7.
Added tooltipContentEditor option to highlighter, allowing callback to manipulate tooltip content at run time (thanks Tim Bunce!).
Fixed bug where axes scale not resetting.
Fixed bug with date axes where data bounds not properly set.
Fixed issue where tick marks disappear if grid lines turned off.
Updated replot method to allow passing in axes options for more control.
Added experimental support for “broken” axes.
Fixed bug with pies where pies with 0 valued slices did not draw correctly.
Added canvasOverlay plugin to allow drawing of arbitrary shapes on a canvas over the plot.
Added option to display arbitrary text/html (message, animated gif, etc.) if plot is constructed without data. Allow a “data loading” indicator to be shown.
Added resetAxisValues method to manually update axis ticks without redrawing the plot.
Fix to labels on negative bars so label postiion of ‘n’ will be below a negative bar, just as it is above a positive bar (thanks guigod!).
Added thousands separator character (‘) to sprintf formatting (thanks yuichi1004!).
Re-factored date parsing/formatting to use new jsDate module which does not extend the Date prototype.
0.9.7
Added Mekko chart plot type with enhanced legend and axes support.
Implemented vertical waterfall charts. Can create waterfall plot as option to bar chart. See examples folder of distribution.
Enhanced plot labels for waterfall style.
Enhanced bar plots so you can now color each bar of a series independently with the “varyBarColor” option.
Re-factored series drawing so that each series and series shadow drawn on it’s own canvas. Allows series to be redrawn independently of each other.
Added additional default series colors.
Added useNegativeColors option to turn off negative color array and use only seriesColors array to define all bar/filled line colors.
Fix css for cursor legend.
Modified shape renderer so rectangles can be stroked and filled.
Re-factored date methods out of dateAxisRenderer so that date formatter and methods can be accesses outside of dateAxisRenderer plugin.
Fixed #132, now trigger series change event on plot target instead of drag canvas.
Fixes issue #116 where some source files had mix of tabs and spaces for indentation. Should have been all spaces.
Fixed issue #126, some links broken in docs section of web site.
Fixed issue #90, trendline plugin incompatibility with pie renderer.
Updated samples in examples folder of distribution to include navigation links if web server is set up to process .html files with php.
0.9.6
New, easier to use, replot() method for placing plots in tabs, accordions, resizable containers or for changing plot parameters programmatically.
Updated legend renderer for pie charts to draw swatches which will print correctly.
Fixed issue #118 with patch from taum so autoscale option will honor tickInterval and numberTicks options
Fix to plot diameter calculation for initially hidden plots.
Added examples for making plots in jQuery UI tabs and accordions.
Fixed issue #120 where pie chart with single slice not displaying correctly in IE and Chrome
0.9.5.2
Fixed #102 where double clicking on plot that has zoom enabled, but has not been zoomed resulted in error.
Fixed bug where candlestick coloring options not working.
Added option to turn individual series labels off in the legend.
0.9.5.1
Fixed bug where tooltip not working with OHLC and candlestick charts.
Added additional marker styles: plus, X and dash.
0.9.5
Implemented “zoomProxy”. zoomProxy allows zooming one plot from another such as an overview plot.
Zooming can now be constrained to just x or y axis.
Enhanced cursor plugin with vertical “dataTracking” line. This is a line at the cursor location with a readout of data points at the line location which are displayed in the chart legend.
Changed cursor tooltip format string. Now one format string is used for entire tooltip.
Added mechanisms to specify plot size when plot target is hidden or plot height/width otherwise cannot be determined from markup.
Added $.jqplot.config object to specify jqplot wide configuration options. These include enablePlugins to globally set the default plugin state on/off and defaultHeight/defaultWidth to specify default plot height/width.
Added fillToZero option which forces filled charts to fill to zero as opposed to axis minimum. Thus negative filled bar/line values will fill upwards to zero axis value.
Added option to disable stacking on individual lines.
Changed targetId property of the plot object so it now includes a “#” before the id string.
Improved tick and body sizing of Open Hi Low Close and candlestick charts.
Removed lots of web site related files from the repository. This means that, if working from the sources, user’s won’t be able to build the jqplot web site and the docs/tests that are hosted on that site. The minified and compressed distribution packages will build fine.
Lots of examples were added to a separate examples directory to better show functionality of jqPlot for local testing with the distribution.
Many various bug fixes and other minor enhancements.
0.9.4
Implemented axis labels. Labels can be rendered in div tags or as canvas elements supporting rotated text.
Improved rotated axis label positioning so labels will start or end at a tick position.
Fixed bug where an empty data series would hang plot rendering.
completed issue #66 for misc. improvements to documentation.
Fixed issue #64 where the same ID’s were assigned to cursor and highlighter elements.
Added option to legend to encode special HTML characters.
Fixed undesirable behavior where point labels for points off the plot were being rendered.
Added edgeTolerance option to point label renderer to control rendering of labels near plot edges.
0.9.3
Preliminary support for axis labels. Currently rendered into DIV tags, so no rotated label support. This feature is currently experimental.
Fixed bug #52, needed space in tick div tag between style and class declarations or plot failed in certain application doctypes.
Fixed issue #54, miter style line join for chart lines causing spikes at steep changes in slope. Changed miter style to round.
Added examples for new autoscaling algorithm.
Fixed bug #57, category axis labels disappear on redraw()
Improved algorithm which controlled maximum number of labels that would display on a category axis.
Fixed bug #45 where null values causing errors in plotData and gridData.
Fixed issue #60 where seriesColors option was not working.
0.9.2
Fixed bug #45 where a plot could crash if series had different numbers of points.
Fixed issue #50, added option to turn off sorting of series data.
Fixed issue #31, implemented a better axis autoscaling algorithm and added an autoscale option.
0.9.1
Fixed bug #40, when axis pad, padMax, padMin set to 0, graph would fail to render.
Fixed bug #41 where pie and bar charts not rendered correctly on redraw().
Fixed bug #11, filled stacked line plots not rendering correctly in IE.
Fixed bug #42 where stacked charts not rendering with string date axis ticks.
Fixed bug in redraw() method where axes ticks were not reset.
Fixed “jqplotPreRedrawEvent” that should have been named “jqplotPostRedraw” event.
0.9.0
Added Open Hi Low Close charts, Candlestick charts and Hi Low Close charts.
Added support for arbitrary labels on the data points.
Enhanced highlighter plugin to allow custom formatting control of entire tooltip.
Enhanced highlighter to support multiple y values in a data point.
Fixed bug #38 where series with a single point with a negative value would fail.
Improvements to examples to show what plugins to include.
Expanded documentation for some of the plugins.
0.8.5
Added zooming ability with double click or single click options to reset zoom.
Modified default tick spacing algorithm for date axes to give more space to ticks.
Fixed bug #2 where tickInterval wasn’t working properly.
Added neighborThreshold option to control how close mouse must be to point to trigger neighbor detection.
Added double click event handler on plot.
0.8.0
Support for up to 9 y axes.
Added option to control padding at max/min bounds of axes separately.
Closed issue #21, added options to control grid line color and width.
Closed issue #20, added options to filled line charts to stoke above fill and customize fill color and transparency.
Improved structure of on line documentation to make usage and options docs default.
Added much documentation on options and css styling.
0.7.1
Bug fix release
Fixed bug #6, missing semi-colons messing up some javascript compressors.
Fixed bug #13 where 2D ticks array of [values, labels] would fail to renderer with DateAxisRenderer.
Fixes bug #16 where pie renderer overwriting options for all plot types and crashing non pie plots.
Fixes bug #17 constrainTo dragable option mispelled as “contstrainTo”. Fixed dragable color issue when used with trend lines.
0.7.0
Pie chart support
Enabled tooltipLocation option in highlighter.
Highlighter Tooltip will account for mark size and highlight size when positioning itself.
Added ability to show just x, y or both axes in highlighter tooltip.
Added customization of separator between axes values in highlighter tooltip.
Modified how shadows are drawn for lines, bars and markers. Now drawn first, so they are always behind the object.
Adjustments to shadow parameters on lines to account for new shadow positioning.
Added a ColorGenerator class to robustly return next available color for a plot with wrap around to first color at end.
Udates to docs about css file.
Fixed bug with String x values in series and IE error on sorting (Category Axis).
Added cursor changes in dragable plugin when cursor near dragable point.
0.6.6b
Added excanvas.js and excanvas.min.js to compressed distributions.
Added example/test html pages I had locally into repository and to compressed distributions.
0.6.6a
Removed absolute positioning from dom element and put back into css file.
Duplicate of 0.6.6 with a suffix to unambiguously differentiate between previously posted 0.6.6 release.
0.6.6
Fixed bug #5, trend line plugin failing when no trend line options specified.
Added absolute position css spec to axis tick dom element.
Enhancement to category axes, more intuitive handling of series with missing data values.
0.6.5
Fixed bug #4, series of unequal data length not rendering correctly. This is a bugfix release only.
0.6.4
Fixed bug (issue #1 in tracker) where flat line data series (all x and/or y values are euqal) or single value data series would crash.
0.6.3
Support for stacked line (a.k.a. area) and stacked bar (horizontal and vertical) charts.
Refactored barRenderer to use default shape and shadow renderers.
Added info (contacts & support information) page to web site.
0.6.2
This is a minor upgrade to docs and build only. No functionality has changed.
Ant build script generates entire site, examples, tests and distribution.
Improvements to documentation.
0.6.1
New sprintf implementation from Ash Searle that implements %g.
Fix to sprintf e/f formats.
Created new format specifier, %p and %P to preserve significance.
Modified p/P format to better display larger numbers.
Fixed and simplified significant digits calculation for sprintf.
Added option to have cursor tooltip follow the mouse or not.
Added options to change size of highlight.
Updates to handle dates like ‘6-May-09’.
Mods to improve look of web site.
Updates to documentation.
Added license and copyright statement to source files.
0.6.0
Added rotated text support. Uses native canvas text functionality in browsers that support it or draws text on canvas with Hershey font
metrics for non-supporting browsers.
Removed lots of lint in js code.
Moved tick css from js code into css file.
Fix to tick positioning css. y axis ticks were positioned to wrong side of axis div.
Re-factored axis tick renderer instantiation into the axes renderers themselves.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation’s software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author’s protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors’ reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone’s free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The “Program”, below, refers to any such program or work, and a “work based on the Program” means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term “modification”.) Each licensee is addressed as “you”.
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients’ exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and “any later version”, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Much of the styling of jqPlot is done by css. The jqPlot css file is, unremarkably, jquery.jqplot.css and resides in the same directory as jqPlot itself.
There exist some styling related javascript properties on the plot objects themselves (like fontStyle, fontSize, etc.). These can be set with the options object at plot creation. Generally, setting these options is NOT the preferred way to customize the look of the plot. Use the css file instead. These options are deprecated and may disappear. The exceptions are certain background and color options which control attributes of something renderered on a canvas. This would be line color, grid background, etc. These must be set by the options object. For a list of available options, see jqPlot Options.
Objects in the plot that can be customized by css are given a css class like “.jqplot-*”. For example, the plot title will have a “.jqplot-title” class, the axes “.jqplot-axis”, etc.
Currently assigned classes in jqPlot are as follows:
.jqplot-target
Styles for the plot target div. These will be cascaded down to all plot elements according to css rules.
.jqplot-axis
Styles for all axes
.jqplot-xaxis
Styles applied to the primary x axis only.
.jqplot-yaxis
Styles applied to the primary y axis only.
.jqplot-x2axis, .jqplot-x3axis, ...
Styles applied to the 2nd, 3rd, etc. x axis only.
.jqplot-y2axis, .jqplot-y3axis, ...
Styles applied to the 2nd, 3rd, etc.y axis only.
.jqplot-axis-tick
Styles applied to all axis ticks
.jqplot-xaxis-tick
Styles applied to primary x axis ticks only.
.jqplot-x2axis-tick
Styles applied to secondary x axis ticks only.
.jqplot-yaxis-tick
Styles applied to primary y axis ticks only.
.jqplot-y2axis-tick
Styles applied to secondary y axis ticks only.
table.jqplot-table-legend
Styles applied to the legend box table.
.jqplot-title
Styles applied to the title.
.jqplot-cursor-tooltip
Styles applied to the cursor tooltip
.jqplot-highlighter-tooltip
Styles applied to the highlighter tooltip.
div.jqplot-table-legend-swatch
the div element used for the colored swatch on the legend.
Note that axes will be assigned 2 classes like: class=”.jqplot-axis .jqplot-xaxis”.
This document is out of date. While the options described here should still be relavent and valid, it has not been updated for many new options. Sorry for this inconvenience.
This document describes the options available to jqPlot. These are set with the third argument to the $.jqplot(‘target’, data, options) function. Options are using the following convention:
property: default, // notes
This document is not complete! Not all options are shown! Also, Options marked with * in the notes are post 0.7.1 additions. They will be available in the next release. Further information about the options can be found in the online API documentation. For details on how the options relate to the API documentation, see the Options Tutorial in the optionsTutorial.txt file.
options =
+{
+ seriesColors: [ "#4bb2c5", "#c5b47f", "#EAA228", "#579575", "#839557", "#958c12",
+ "#953579", "#4b5de4", "#d8b83f", "#ff5800", "#0085cc"], // colors that will
+ // be assigned to the series. If there are more series than colors, colors
+ // will wrap around and start at the beginning again.
+
+ stackSeries: false, // if true, will create a stack plot.
+ // Currently supported by line and bar graphs.
+
+ title: '', // Title for the plot. Can also be specified as an object like:
+
+ title: {
+ text: '', // title for the plot,
+ show: true,
+ },
+
+ axesDefaults: {
+ show: false, // wether or not to renderer the axis. Determined automatically.
+ min: null, // minimum numerical value of the axis. Determined automatically.
+ max: null, // maximum numverical value of the axis. Determined automatically.
+ pad: 1.2, // a factor multiplied by the data range on the axis to give the
+ // axis range so that data points don't fall on the edges of the axis.
+ ticks: [], // a 1D [val1, val2, ...], or 2D [[val, label], [val, label], ...]
+ // array of ticks to use. Computed automatically.
+ numberTicks: undefined,
+ renderer: $.jqplot.LinearAxisRenderer, // renderer to use to draw the axis,
+ rendererOptions: {}, // options to pass to the renderer. LinearAxisRenderer
+ // has no options,
+ tickOptions: {
+ mark: 'outside', // Where to put the tick mark on the axis
+ // 'outside', 'inside' or 'cross',
+ showMark: true,
+ showGridline: true, // wether to draw a gridline (across the whole grid) at this tick,
+ markSize: 4, // length the tick will extend beyond the grid in pixels. For
+ // 'cross', length will be added above and below the grid boundary,
+ show: true, // wether to show the tick (mark and label),
+ showLabel: true, // wether to show the text label at the tick,
+ formatString: '', // format string to use with the axis tick formatter
+ }
+ showTicks: true, // wether or not to show the tick labels,
+ showTickMarks: true, // wether or not to show the tick marks
+ },
+
+ axes: {
+ xaxis: {
+ // same options as axesDefaults
+ },
+ yaxis: {
+ // same options as axesDefaults
+ },
+ x2axis: {
+ // same options as axesDefaults
+ },
+ y2axis: {
+ // same options as axesDefaults
+ }
+ },
+
+ seriesDefaults: {
+ show: true, // wether to render the series.
+ xaxis: 'xaxis', // either 'xaxis' or 'x2axis'.
+ yaxis: 'yaxis', // either 'yaxis' or 'y2axis'.
+ label: '', // label to use in the legend for this line.
+ color: '', // CSS color spec to use for the line. Determined automatically.
+ lineWidth: 2.5, // Width of the line in pixels.
+ shadow: true, // show shadow or not.
+ shadowAngle: 45, // angle (degrees) of the shadow, clockwise from x axis.
+ shadowOffset: 1.25, // offset from the line of the shadow.
+ shadowDepth: 3, // Number of strokes to make when drawing shadow. Each
+ // stroke offset by shadowOffset from the last.
+ shadowAlpha: 0.1, // Opacity of the shadow.
+ showLine: true, // whether to render the line segments or not.
+ showMarker: true, // render the data point markers or not.
+ fill: false, // fill under the line,
+ fillAndStroke: false, // *stroke a line at top of fill area.
+ fillColor: undefined, // *custom fill color for filled lines (default is line color).
+ fillAlpha: undefined, // *custom alpha to apply to fillColor.
+ renderer: $.jqplot.LineRenderer], // renderer used to draw the series.
+ rendererOptions: {}, // options passed to the renderer. LineRenderer has no options.
+ markerRenderer: $.jqplot.MarkerRenderer, // renderer to use to draw the data
+ // point markers.
+ markerOptions: {
+ show: true, // wether to show data point markers.
+ style: 'filledCircle', // circle, diamond, square, filledCircle.
+ // filledDiamond or filledSquare.
+ lineWidth: 2, // width of the stroke drawing the marker.
+ size: 9, // size (diameter, edge length, etc.) of the marker.
+ color: '#666666' // color of marker, set to color of line by default.
+ shadow: true, // wether to draw shadow on marker or not.
+ shadowAngle: 45, // angle of the shadow. Clockwise from x axis.
+ shadowOffset: 1, // offset from the line of the shadow,
+ shadowDepth: 3, // Number of strokes to make when drawing shadow. Each stroke
+ // offset by shadowOffset from the last.
+ shadowAlpha: 0.07 // Opacity of the shadow
+ }
+ },
+
+ series:[
+ {Each series has same options as seriesDefaults},
+ {You can override each series individually here}
+ ],
+
+ legend: {
+ show: false,
+ location: 'ne', // compass direction, nw, n, ne, e, se, s, sw, w.
+ xoffset: 12, // pixel offset of the legend box from the x (or x2) axis.
+ yoffset: 12, // pixel offset of the legend box from the y (or y2) axis.
+ },
+
+ grid: {
+ drawGridLines: true, // wether to draw lines across the grid or not.
+ gridLineColor: '#cccccc' // *Color of the grid lines.
+ background: '#fffdf6', // CSS color spec for background color of grid.
+ borderColor: '#999999', // CSS color spec for border around grid.
+ borderWidth: 2.0, // pixel width of border around grid.
+ shadow: true, // draw a shadow for grid.
+ shadowAngle: 45, // angle of the shadow. Clockwise from x axis.
+ shadowOffset: 1.5, // offset from the line of the shadow.
+ shadowWidth: 3, // width of the stroke for the shadow.
+ shadowDepth: 3, // Number of strokes to make when drawing shadow.
+ // Each stroke offset by shadowOffset from the last.
+ shadowAlpha: 0.07 // Opacity of the shadow
+ renderer: $.jqplot.CanvasGridRenderer, // renderer to use to draw the grid.
+ rendererOptions: {} // options to pass to the renderer. Note, the default
+ // CanvasGridRenderer takes no additional options.
+ },
+
+ // Plugin and renderer options.
+
+ // BarRenderer.
+ // With BarRenderer, you can specify additional options in the rendererOptions object
+ // on the series or on the seriesDefaults object. Note, some options are respecified
+ // (like shadowDepth) to override lineRenderer defaults from which BarRenderer inherits.
+
+ seriesDefaults: {
+ rendererOptions: {
+ barPadding: 8, // number of pixels between adjacent bars in the same
+ // group (same category or bin).
+ barMargin: 10, // number of pixels between adjacent groups of bars.
+ barDirection: 'vertical', // vertical or horizontal.
+ barWidth: null, // width of the bars. null to calculate automatically.
+ shadowOffset: 2, // offset from the bar edge to stroke the shadow.
+ shadowDepth: 5, // nuber of strokes to make for the shadow.
+ shadowAlpha: 0.8, // transparency of the shadow.
+ }
+ },
+
+ // Cursor
+ // Options are passed to the cursor plugin through the "cursor" object at the top
+ // level of the options object.
+
+ cursor: {
+ style: 'crosshair', // A CSS spec for the cursor type to change the
+ // cursor to when over plot.
+ show: true,
+ showTooltip: true, // show a tooltip showing cursor position.
+ followMouse: false, // wether tooltip should follow the mouse or be stationary.
+ tooltipLocation: 'se', // location of the tooltip either relative to the mouse
+ // (followMouse=true) or relative to the plot. One of
+ // the compass directions, n, ne, e, se, etc.
+ tooltipOffset: 6, // pixel offset of the tooltip from the mouse or the axes.
+ showTooltipGridPosition: false, // show the grid pixel coordinates of the mouse
+ // in the tooltip.
+ showTooltipUnitPosition: true, // show the coordinates in data units of the mouse
+ // in the tooltip.
+ tooltipFormatString: '%.4P', // sprintf style format string for tooltip values.
+ useAxesFormatters: true, // wether to use the same formatter and formatStrings
+ // as used by the axes, or to use the formatString
+ // specified on the cursor with sprintf.
+ tooltipAxesGroups: [], // show only specified axes groups in tooltip. Would specify like:
+ // [['xaxis', 'yaxis'], ['xaxis', 'y2axis']]. By default, all axes
+ // combinations with for the series in the plot are shown.
+
+ },
+
+ // Dragable
+ // Dragable options are specified with the "dragable" object at the top level
+ // of the options object.
+
+ dragable: {
+ color: undefined, // custom color to use for the dragged point and dragged line
+ // section. default will use a transparent variant of the line color.
+ constrainTo: 'none', // Constrain dragging motion to an axis: 'x', 'y', or 'none'.
+ },
+
+ // Highlighter
+ // Highlighter options are specified with the "highlighter" object at the top level
+ // of the options object.
+
+ highlighter: {
+ lineWidthAdjust: 2.5, // pixels to add to the size line stroking the data point marker
+ // when showing highlight. Only affects non filled data point markers.
+ sizeAdjust: 5, // pixels to add to the size of filled markers when drawing highlight.
+ showTooltip: true, // show a tooltip with data point values.
+ tooltipLocation: 'nw', // location of tooltip: n, ne, e, se, s, sw, w, nw.
+ fadeTooltip: true, // use fade effect to show/hide tooltip.
+ tooltipFadeSpeed: "fast"// slow, def, fast, or a number of milliseconds.
+ tooltipOffset: 2, // pixel offset of tooltip from the highlight.
+ tooltipAxes: 'both', // which axis values to display in the tooltip, x, y or both.
+ tooltipSeparator: ', ' // separator between values in the tooltip.
+ useAxesFormatters: true // use the same format string and formatters as used in the axes to
+ // display values in the tooltip.
+ tooltipFormatString: '%.5P' // sprintf format string for the tooltip. only used if
+ // useAxesFormatters is false. Will use sprintf formatter with
+ // this string, not the axes formatters.
+ },
+
+ // LogAxisRenderer
+ // LogAxisRenderer add 2 options to the axes object. These options are specified directly on
+ // the axes or axesDefaults object.
+
+ axesDefaults: {
+ base: 10, // the logarithmic base.
+ tickDistribution: 'even', // 'even' or 'power'. 'even' will produce with even visiual (pixel)
+ // spacing on the axis. 'power' will produce ticks spaced by
+ // increasing powers of the log base.
+ },
+
+ // PieRenderer
+ // PieRenderer accepts options from the rendererOptions object of the series or seriesDefaults object.
+
+ seriesDefaults: {
+ rendererOptions: {
+ diameter: undefined, // diameter of pie, auto computed by default.
+ padding: 20, // padding between pie and neighboring legend or plot margin.
+ sliceMargin: 0, // gap between slices.
+ fill: true, // render solid (filled) slices.
+ shadowOffset: 2, // offset of the shadow from the chart.
+ shadowDepth: 5, // Number of strokes to make when drawing shadow. Each stroke
+ // offset by shadowOffset from the last.
+ shadowAlpha: 0.07 // Opacity of the shadow
+ }
+ },
+
+ // Trendline
+ // Trendline takes options on the trendline object of the series or seriesDefaults object.
+
+ seriesDefaults: {
+ trendline: {
+ show: true, // show the trend line
+ color: '#666666', // CSS color spec for the trend line.
+ label: '', // label for the trend line.
+ type: 'linear', // 'linear', 'exponential' or 'exp'
+ shadow: true, // show the trend line shadow.
+ lineWidth: 1.5, // width of the trend line.
+ shadowAngle: 45, // angle of the shadow. Clockwise from x axis.
+ shadowOffset: 1.5, // offset from the line of the shadow.
+ shadowDepth: 3, // Number of strokes to make when drawing shadow.
+ // Each stroke offset by shadowOffset from the last.
+ shadowAlpha: 0.07 // Opacity of the shadow
+ }
+ }
+}
tick mark on the axis. One of ‘inside’, ‘outside’, ‘cross’, ‘’ or null.
+
+
showMark
this.showMark = true
wether or not to show the mark on the axis.
+
+
showGridline
this.showGridline = true
wether or not to draw the gridline on the grid at this tick.
+
+
isMinorTick
this.isMinorTick = false
if this is a minor tick.
+
+
size
this.size = 4
Length of the tick beyond the grid in pixels. DEPRECATED: This has been superceeded by markSize
+
+
markSize
this.markSize = 6
Length of the tick marks in pixels. For ‘cross’ style, length will be stoked above and below axis, so total length will be twice this.
+
+
show
this.show = true
wether or not to show the tick (mark and label). Setting this to false requires more testing. It is recommended to set showLabel and showMark to false instead.
+
+
showLabel
this.showLabel = true
wether or not to show the label.
+
+
formatter
this.formatter = $.jqplot.DefaultTickFormatter
A class of a formatter for the tick text. sprintf by default.
+
+
prefix
this.prefix = ''
String to prepend to the tick label. Prefix is prepended to the formatted tick label.
Reset the specified axes min, max, numberTicks and tickInterval properties to null or reset these properties on all axes if no list of axes is provided.
The author would appreciate an email letting him know of any substantial use of jqPlot. You can reach the author at: chris at jqplot dot com or see http://www.jqplot.com/info.php. This is, of course, not required.
If you are feeling kind and generous, consider supporting the project by making a donation at: http://www.jqplot.com/donate.php.
sprintf functions contained in jqplot.sprintf.js by Ash Searle
jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.4.2 is included in the distribution. To use jqPlot include jQuery, the jqPlot jQuery plugin, the jqPlot css file and optionally the excanvas script for IE support in your web page:
jQuery function called by the user to create a plot.
Parameters
target
ID of target element to render the plot into.
data
an array of data series.
options
user defined options object. See the individual classes for available options.
Properties
config
object to hold configuration information for jqPlot plot object.
attributes
enablePlugins
False to disable plugins by default. Plugins must then be explicitly enabled in the individual plot options. Default: false. This property sets the “show” property of certain plugins to true or false. Only plugins that can be immediately active upon loading are affected. This includes non-renderer plugins like cursor, dragable, highlighter, and trendline.
defaultHeight
Default height for plots where no css height specification exists. This is a jqplot wide default.
defaultWidth
Default height for plots where no css height specification exists. This is a jqplot wide default.
called at the end of legend draw, so plugins can add rows to the legend table.
$.jqplot.preSeriesInitHooks
called before series is initialized.
$.jqplot.postSeriesInitHooks
called after series is initialized.
$.jqplot.preParseSeriesOptionsHooks
called before series related options are parsed.
$.jqplot.postParseSeriesOptionsHooks
called after series related options are parsed.
$.jqplot.eventListenerHooks
called at the end of plot drawing, binds listeners to the event canvas which lays on top of the grid area.
$.jqplot.preDrawSeriesShadowHooks
called before series shadows are drawn.
$.jqplot.postDrawSeriesShadowHooks
called after series shadows are drawn.
+
+
Axis
An individual axis object. Cannot be instantiated directly, but created by the Plot oject. Axis properties can be set or overriden by the options passed in from the user.
A class of a rendering engine for creating an axis label.
+
+
labelOptions
this.labelOptions = {}
Options passed to the label renderer.
+
+
label
this.label = null
Label for the axis
+
+
showLabel
this.showLabel = true
true to show the axis label.
+
+
min
this.min=null
minimum value of the axis (in data units, not pixels).
+
+
max
this.max=null
maximum value of the axis (in data units, not pixels).
+
+
autoscale
this.autoscale = false
Autoscale the axis min and max values to provide sensible tick spacing. If axis min or max are set, autoscale will be turned off. The numberTicks, tickInterval and pad options do work with autoscale, although tickInterval has not been tested yet. padMin and padMax do nothing when autoscale is on.
+
+
pad
this.pad = 1.2
Padding to extend the range above and below the data bounds. The data range is multiplied by this factor to determine minimum and maximum axis bounds. A value of 0 will be interpreted to mean no padding, and pad will be set to 1.0.
+
+
padMax
this.padMax = null
Padding to extend the range above data bounds. The top of the data range is multiplied by this factor to determine maximum axis bounds. A value of 0 will be interpreted to mean no padding, and padMax will be set to 1.0.
+
+
padMin
this.padMin = null
Padding to extend the range below data bounds. The bottom of the data range is multiplied by this factor to determine minimum axis bounds. A value of 0 will be interpreted to mean no padding, and padMin will be set to 1.0.
+
+
ticks
this.ticks = []
1D [val, val, ...] or 2D [[val, label], [val, label], ...] array of ticks for the axis. If no label is specified, the value is formatted into an appropriate label.
+
+
numberTicks
this.numberTicks
Desired number of ticks. Default is to compute automatically.
+
+
tickInterval
this.tickInterval
number of units between ticks. Mutually exclusive with numberTicks.
+
+
renderer
this.renderer = $.jqplot.LinearAxisRenderer
A class of a rendering engine that handles tick generation, scaling input data to pixel grid units and drawing the axis element.
Wether to show the ticks (both marks and labels) or not. Will not override showMark and showLabel options if specified on the ticks themselves.
+
+
showTickMarks
this.showTickMarks = true
Wether to show the tick marks (line crossing grid) or not. Overridden by showTicks and showMark option of tick itself.
+
+
showMinorTicks
this.showMinorTicks = true
Wether or not to show minor ticks. This is renderer dependent. The default $.jqplot.LinearAxisRenderer does not have minor ticks.
+
+
useSeriesColor
this.useSeriesColor = false
Use the color of the first series associated with this axis for the tick marks and line bordering this axis.
+
+
borderWidth
this.borderWidth = null
width of line stroked at the border of the axis. Defaults to the width of the grid boarder.
+
+
borderColor
this.borderColor = null
color of the border adjacent to the axis. Defaults to grid border color.
+
+
syncTicks
this.syncTicks = null
true to try and synchronize tick spacing across multiple axes so that ticks and grid lines line up. This has an impact on autoscaling algorithm, however. In general, autoscaling an individual axis will work better if it does not have to sync ticks.
+
+
tickSpacing
this.tickSpacing = 75
Approximate pixel spacing between ticks on graph. Used during autoscaling. This number will be an upper bound, actual spacing will be less.
+
+
Legend
Legend object. Cannot be instantiated directly, but created by the Plot oject. Legend properties can be set or overriden by the options passed in from the user.
Placement of the legend. one of the compass directions: nw, n, ne, e, se, s, sw, w
+
+
labels
this.labels = []
Array of labels to use. By default the renderer will look for labels on the series. Labels specified in this array will override labels specified on the series.
+
+
showLabels
this.showLabels = true
true to show the label text on the legend.
+
+
showSwatch
this.showSwatches = true
true to show the color swatches on the legend.
+
+
placement
this.placement = "insideGrid"
”insideGrid” places legend inside the grid area of the plot. “outsideGrid” places the legend outside the grid but inside the plot container, shrinking the grid to accomodate the legend. “inside” synonym for “insideGrid”, “outside” places the legend ouside the grid area, but does not shrink the grid which can cause the legend to overflow the plot container.
+
+
xoffset
this.xoffset = 0
DEPRECATED. Set the margins on the legend using the marginTop, marginLeft, etc. properties or via CSS margin styling of the .jqplot-table-legend class.
+
+
yoffset
this.yoffset = 0
DEPRECATED. Set the margins on the legend using the marginTop, marginLeft, etc. properties or via CSS margin styling of the .jqplot-table-legend class.
+
+
border
this.border
css spec for the border around the legend box.
+
+
background
this.background
css spec for the background of the legend box.
+
+
textColor
this.textColor
css color spec for the legend text.
+
+
fontFamily
this.fontFamily
css font-family spec for the legend text.
+
+
fontSize
this.fontSize
css font-size spec for the legend text.
+
+
rowSpacing
this.rowSpacing = '0.5em'
css padding-top spec for the rows in the legend.
+
+
rendererOptions
this.rendererOptions = {}
renderer specific options passed to the renderer.
+
+
predraw
Wether to draw the legend before the series or not. Used with series specific legend renderers for pie, donut, mekko charts, etc.
+
+
marginTop
this.marginTop = null
CSS margin for the legend DOM element. This will set an element CSS style for the margin which will override any style sheet setting. The default will be taken from the stylesheet.
+
+
marginRight
this.marginRight = null
CSS margin for the legend DOM element. This will set an element CSS style for the margin which will override any style sheet setting. The default will be taken from the stylesheet.
+
+
marginBottom
this.marginBottom = null
CSS margin for the legend DOM element. This will set an element CSS style for the margin which will override any style sheet setting. The default will be taken from the stylesheet.
+
+
marginLeft
this.marginLeft = null
CSS margin for the legend DOM element. This will set an element CSS style for the margin which will override any style sheet setting. The default will be taken from the stylesheet.
+
+
Title
Plot Title object. Cannot be instantiated directly, but created by the Plot oject. Title properties can be set or overriden by the options passed in from the user.
An individual data series object. Cannot be instantiated directly, but created by the Plot oject. Series properties can be set or overriden by the options passed in from the user.
true to color negative values differently in filled and bar charts.
+
+
Properties
Properties will be assigned from a series array at the top level of the options. If you had two series and wanted to change the color and line width of the first and set the second to use the secondary y axis with no shadow and supply custom labels for each:
wether to actually draw the line or not. Series will still be renderered, even if no line is drawn.
+
+
showMarker
this.showMarker = true
wether or not to show the markers at the data points.
+
+
index
this.index
0 based index of this series in the plot series array.
+
+
fill
this.fill = false
true or false, wether to fill under lines or in bars. May not be implemented in all renderers.
+
+
fillColor
this.fillColor
CSS color spec to use for fill under line. Defaults to line color.
+
+
fillAlpha
this.fillAlpha
Alpha transparency to apply to the fill under the line. Use this to adjust alpha separate from fill color.
+
+
fillAndStroke
this.fillAndStroke = false
If true will stroke the line (with color this.color) as well as fill under it. Applies only when fill is true.
+
+
disableStack
this.disableStack = false
true to not stack this series with other series in the plot. To render properly, non-stacked series must come after any stacked series in the plot’s data series array. So, the plot’s data series array would look like:
disableStack will put a gap in the stacking order of series, and subsequent stacked series will not fill down through the non-stacked series and will most likely not stack properly on top of the non-stacked series.
+
+
neighborThreshold
this.neighborThreshold = 4
how close or far (in pixels) the cursor must be from a point marker to detect the point.
+
+
fillToZero
this.fillToZero = false
true will force bar and filled series to fill toward zero on the fill Axis.
+
+
fillToValue
this.fillToValue = 0
fill a filled series to this value on the fill axis. Works in conjunction with fillToZero, so that must be true.
+
+
fillAxis
this.fillAxis = 'y'
Either ‘x’ or ‘y’. Which axis to fill the line toward if fillToZero is true. ‘y’ means fill up/down to 0 on the y axis for this series.
+
+
useNegativeColors
this.useNegativeColors = true
true to color negative values differently in filled and bar charts.
+
+
Grid
Object representing the grid on which the plot is drawn. The grid in this context is the area bounded by the axes, the area which will contain the series. Note, the series are drawn on their own canvas. The Grid object cannot be instantiated directly, but is created by the Plot oject. Grid properties can be set or overriden by the options passed in from the user.
Reset the specified axes min, max, numberTicks and tickInterval properties to null or reset these properties on all axes if no list of axes is provided.
This method requires jQuery 1.4+ Restore the series canvas order to its original order when the plot was created.
+
+
Properties
These properties are specified at the top of the options object like so:
{
+ axesDefaults:{min:0},
+ series:[{color:'#6633dd'}],
+ title: 'A Plot'
+}
+
+
data
this.data = []
user’s data. Data should NOT be specified in the options object, but be passed in as the second argument to the $.jqplot() function. The data property is described here soley for reference. The data should be in the form of an array of 2D or 1D arrays like
[ [[x1, y1], [x2, y2],...], [y1, y2, ...] ].
+
+
axesDefaults
default options that will be applied to all axes. see Axis for axes options.
+
+
seriesDefaults
seriesDefaults: {}, series:[] }
default options that will be applied to all series. see Series for series options.
+
+
series
this.series = []
Array of series object options. see Series for series specific options.
+
+
axes
this.axes = {xaxis: new Axis('xaxis'), yaxis: new Axis('yaxis'), x2axis: new Axis('x2axis'), y2axis: new Axis('y2axis'), y3axis: new Axis('y3axis'), y4axis: new Axis('y4axis'), y5axis: new Axis('y5axis'), y6axis: new Axis('y6axis'), y7axis: new Axis('y7axis'), y8axis: new Axis('y8axis'), y9axis: new Axis('y9axis')}
up to 4 axes are supported, each with it’s own options, See Axis for axis specific options.
Ann array of CSS color specifications that will be applied, in order, to the series in the plot. Colors will wrap around so, if their are more series than colors, colors will be reused starting at the beginning. For pie charts, this specifies the colors of the slices.
+
+
sortData
this.sortData = true
false to not sort the data passed in by the user. Many bar, stakced and other graphs as well as many plugins depend on having sorted data.
+
+
fontSize
this.fontSize
css spec for the font-size attribute. Default for the entire plot.
+
+
title
this.title = new Title()
Title object. See Title for specific options. As a shortcut, you can specify the title option as just a string like: title: ‘My Plot’ and this will create a new title object with the specified text.
+
+
stackSeries
this.stackSeries = false
true or false, creates a stack or “mountain” plot. Not all series renderers may implement this option.
+
+
defaultAxisStart
this.defaultAxisStart = 1
1-D data series are internally converted into 2-D [x,y] data point arrays by jqPlot. This is the default starting value for the missing x or y value. The added data will be a monotonically increasing series (e.g. [1, 2, 3, ...]) starting at this value.
+
+
methods
+
+
init
this.init = function(
target,
data,
options
)
sets the plot target, checks data and applies user options to plot.
+
+
resetAxesScale
this.resetAxesScale = function(
axes,
options
)
Reset the specified axes min, max, numberTicks and tickInterval properties to null or reset these properties on all axes if no list of axes is provided.
Parameters
axes
Boolean to reset or not reset all axes or an array or object of axis names to reset.
+
+
reInitialize
this.reInitialize = function ()
reinitialize plot for replotting. not called directly.
+
+
destroy
this.destroy = function()
Releases all resources occupied by the plot
+
+
replot
this.replot = function(
options
)
Does a reinitialization of the plot followed by a redraw. Method could be used to interactively change plot characteristics and then replot.
Parameters
options
Options used for replotting.
Properties
clear
false to not clear (empty) the plot container before replotting (default: true).
resetAxes
true to reset all axes min, max, numberTicks and tickInterval setting so axes will rescale themselves. optionally pass in list of axes to reset (e.g. [‘xaxis’, ‘y2axis’]) (default: false).
+
+
redraw
this.redraw = function(
clear
)
Empties the plot target div and redraws the plot. This enables plot data and properties to be changed and then to comletely clear the plot and redraw. redraw will not reinitialize any plot elements. That is, axes will not be autoscaled and defaults will not be reapplied to any plot elements. redraw is used primarily with zooming.
Parameters
clear
false to not clear (empty) the plot container before redrawing (default: true).
+
+
draw
this.draw = function()
Draws all elements of the plot into the container. Does not clear the container before drawing.
+
+
drawSeries
this.drawSeries = function(
options,
idx
)
Redraws all or just one series on the plot. No axis scaling is performed and no other elements on the plot are redrawn. options is an options object to pass on to the series renderers. It can be an empty object {}. idx is the series index to redraw if only one series is to be redrawn.
+
+
moveSeriesToFront
this.moveSeriesToFront = function (
idx
)
This method requires jQuery 1.4+ Moves the specified series canvas in front of all other series canvases. This effectively “draws” the specified series on top of all other series, although it is performed through DOM manipulation, no redrawing is performed.
Parameters
idx
0 based index of the series to move. This will be the index of the series as it was first passed into the jqplot function.
+
+
moveSeriesToBack
this.moveSeriesToBack = function (
idx
)
This method requires jQuery 1.4+ Moves the specified series canvas behind all other series canvases.
Parameters
idx
0 based index of the series to move. This will be the index of the series as it was first passed into the jqplot function.
+
+
restorePreviousSeriesOrder
this.restorePreviousSeriesOrder = function ()
This method requires jQuery 1.4+ Restore the series canvas order to its previous state. Useful to put a series back where it belongs after moving it to the front.
+
+
restoreOriginalSeriesOrder
this.restoreOriginalSeriesOrder = function ()
This method requires jQuery 1.4+ Restore the series canvas order to its original order when the plot was created.
This document will help you understand how jqPlot’s options relate to the API documentation and the jqPlot object itself.
this.show = false
Wether to display the axis on the graph.
this.tickRenderer = $.jqplot.AxisTickRenderer
A class of a rendering engine for creating the ticks labels displayed on the plot, See $.jqplot.AxisTickRenderer.
A “tick” object showing the value of a tick/gridline on the plot.
this.tickOptions = {}
Options that will be passed to the tickRenderer, see $.jqplot.AxisTickRenderer options.
this.labelRenderer = $.jqplot.AxisLabelRenderer
A class of a rendering engine for creating an axis label.
this.labelOptions = {}
Options passed to the label renderer.
this.label = null
Label for the axis
this.showLabel = true
true to show the axis label.
this.min=null
minimum value of the axis (in data units, not pixels).
this.max=null
maximum value of the axis (in data units, not pixels).
this.autoscale = false
Autoscale the axis min and max values to provide sensible tick spacing.
this.pad = 1.2
Padding to extend the range above and below the data bounds.
this.padMax = null
Padding to extend the range above data bounds.
this.padMin = null
Padding to extend the range below data bounds.
this.ticks = []
1D [val, val, ...] or 2D [[val, label], [val, label], ...] array of ticks for the axis.
this.numberTicks
Desired number of ticks.
this.tickInterval
number of units between ticks.
this.renderer = $.jqplot.LinearAxisRenderer
A class of a rendering engine that handles tick generation, scaling input data to pixel grid units and drawing the axis element.
this.rendererOptions = {}
renderer specific options.
this.showTicks = true
Wether to show the ticks (both marks and labels) or not.
this.showTickMarks = true
Wether to show the tick marks (line crossing grid) or not.
this.showMinorTicks = true
Wether or not to show minor ticks.
this.useSeriesColor = false
Use the color of the first series associated with this axis for the tick marks and line bordering this axis.
this.borderWidth = null
width of line stroked at the border of the axis.
this.borderColor = null
color of the border adjacent to the axis.
this.syncTicks = null
true to try and synchronize tick spacing across multiple axes so that ticks and grid lines line up.
this.tickSpacing = 75
Approximate pixel spacing between ticks on graph.
this.show = false
Wether to display the legend on the graph.
this.location = 'ne'
Placement of the legend.
this.labels = []
Array of labels to use.
this.showLabels = true
true to show the label text on the legend.
this.showSwatches = true
true to show the color swatches on the legend.
this.placement = "insideGrid"
“insideGrid” places legend inside the grid area of the plot.
this.xoffset = 0
DEPRECATED.
this.yoffset = 0
DEPRECATED.
this.border
css spec for the border around the legend box.
this.background
css spec for the background of the legend box.
this.textColor
css color spec for the legend text.
this.fontFamily
css font-family spec for the legend text.
this.fontSize
css font-size spec for the legend text.
this.rowSpacing = '0.5em'
css padding-top spec for the rows in the legend.
this.rendererOptions = {}
renderer specific options passed to the renderer.
this.marginTop = null
CSS margin for the legend DOM element.
this.marginRight = null
CSS margin for the legend DOM element.
this.marginBottom = null
CSS margin for the legend DOM element.
this.marginLeft = null
CSS margin for the legend DOM element.
this.text = text
text of the title;
this.show = true
wether or not to show the title
this.fontFamily
css font-family spec for the text.
this.fontSize
css font-size spec for the text.
this.textAlign
css text-align spec for the text.
this.textColor
css color spec for the text.
this.renderer = $.jqplot.DivTitleRenderer
A class for creating a DOM element for the title, see $.jqplot.DivTitleRenderer.
The default title renderer for jqPlot.
this.rendererOptions = {}
renderer specific options passed to the renderer.
this.show = true
wether or not to draw the series.
this.xaxis = 'xaxis'
which x axis to use with this series, either ‘xaxis’ or ‘x2axis’.
this.yaxis = 'yaxis'
which y axis to use with this series, either ‘yaxis’ or ‘y2axis’.
this.renderer = $.jqplot.LineRenderer
A class of a renderer which will draw the series, see $.jqplot.LineRenderer.
The default line renderer for jqPlot, this class has no options beyond the Series class.
this.rendererOptions = {}
Options to pass on to the renderer.
this.label = ''
Line label to use in the legend.
this.showLabel = true
true to show label for this series in the legend.
this.color
css color spec for the series
this.lineWidth = 2.5
width of the line in pixels.
this.lineJoin = 'round'
Canvas lineJoin style between segments of series.
this.lineCap = 'round'
Canvas lineCap style at ends of line.
this.shadow = true
wether or not to draw a shadow on the line
this.shadowAngle = 45
Shadow angle in degrees
this.shadowOffset = 1.25
Shadow offset from line in pixels
this.shadowDepth = 3
Number of times shadow is stroked, each stroke offset shadowOffset from the last.
this.shadowAlpha = '0.1'
Alpha channel transparency of shadow.
this.breakOnNull = false
Wether line segments should be be broken at null value.
this.markerRenderer = $.jqplot.MarkerRenderer
A class of a renderer which will draw marker (e.g.
this.markerOptions = {}
renderer specific options to pass to the markerRenderer, see $.jqplot.MarkerRenderer.
The default jqPlot marker renderer, rendering the points on the line.
this.showLine = true
wether to actually draw the line or not.
this.showMarker = true
wether or not to show the markers at the data points.
this.index
0 based index of this series in the plot series array.
this.fill = false
true or false, wether to fill under lines or in bars.
this.fillColor
CSS color spec to use for fill under line.
this.fillAlpha
Alpha transparency to apply to the fill under the line.
this.fillAndStroke = false
If true will stroke the line (with color this.color) as well as fill under it.
this.disableStack = false
true to not stack this series with other series in the plot.
this.neighborThreshold = 4
how close or far (in pixels) the cursor must be from a point marker to detect the point.
this.fillToZero = false
true will force bar and filled series to fill toward zero on the fill Axis.
this.fillToValue = 0
fill a filled series to this value on the fill axis.
this.fillAxis = 'y'
Either ‘x’ or ‘y’.
this.useNegativeColors = true
true to color negative values differently in filled and bar charts.
this.drawGridlines = true
wether to draw the gridlines on the plot.
this.gridLineColor = '#cccccc'
color of the grid lines.
this.gridLineWidth = 1.0
width of the grid lines.
this.background = '#fffdf6'
css spec for the background color.
this.borderColor = '#999999'
css spec for the color of the grid border.
this.borderWidth = 2.0
width of the border in pixels.
this.drawBorder = true
True to draw border around grid.
this.shadow = true
wether to show a shadow behind the grid.
this.shadowAngle = 45
shadow angle in degrees
this.shadowOffset = 1.5
Offset of each shadow stroke from the border in pixels
this.shadowWidth = 3
width of the stoke for the shadow
this.shadowDepth = 3
Number of times shadow is stroked, each stroke offset shadowOffset from the last.
this.shadowColor = null
an optional css color spec for the shadow in ‘rgba(n, n, n, n)’ form
this.shadowAlpha = '0.07'
Alpha channel transparency of shadow.
this.renderer = $.jqplot.CanvasGridRenderer
Instance of a renderer which will actually render the grid, see $.jqplot.CanvasGridRenderer.
The default jqPlot grid renderer, creating a grid on a canvas element.
this.rendererOptions = {}
Options to pass on to the renderer, see $.jqplot.CanvasGridRenderer.
this.data = []
user’s data.
seriesDefaults: {}, series:[] }
default options that will be applied to all series.
this.series = []
Array of series object options.
this.axes = {xaxis: new Axis('xaxis'), yaxis: new Axis('yaxis'), x2axis: new Axis('x2axis'), y2axis: new Axis('y2axis'), y3axis: new Axis('y3axis'), y4axis: new Axis('y4axis'), y5axis: new Axis('y5axis'), y6axis: new Axis('y6axis'), y7axis: new Axis('y7axis'), y8axis: new Axis('y8axis'), y9axis: new Axis('y9axis')}
up to 4 axes are supported, each with it’s own options, See Axis for axis specific options.
An individual axis object.
this.grid = new Grid()
See Grid for grid specific options.
Object representing the grid on which the plot is drawn.
this.legend = new Legend()
see $.jqplot.TableLegendRenderer
this.seriesColors = $.jqplot.config.defaultColors
Ann array of CSS color specifications that will be applied, in order, to the series in the plot.
this.sortData = true
false to not sort the data passed in by the user.
this.fontSize
css spec for the font-size attribute.
this.title = new Title()
Title object.
this.stackSeries = false
true or false, creates a stack or “mountain” plot.
this.defaultAxisStart = 1
1-D data series are internally converted into 2-D [x,y] data point arrays by jqPlot.
this.init = function(
target,
data,
options
)
sets the plot target, checks data and applies user options to plot.
this.resetAxesScale = function(
axes,
options
)
Reset the specified axes min, max, numberTicks and tickInterval properties to null or reset these properties on all axes if no list of axes is provided.
this.reInitialize = function ()
reinitialize plot for replotting.
this.destroy = function()
Releases all resources occupied by the plot
this.replot = function(
options
)
Does a reinitialization of the plot followed by a redraw.
this.redraw = function(
clear
)
Empties the plot target div and redraws the plot.
this.draw = function()
Draws all elements of the plot into the container.
this.drawSeries = function(
options,
idx
)
Redraws all or just one series on the plot.
this.moveSeriesToFront = function (
idx
)
This method requires jQuery 1.4+ Moves the specified series canvas in front of all other series canvases.
this.moveSeriesToBack = function (
idx
)
This method requires jQuery 1.4+ Moves the specified series canvas behind all other series canvases.
this.restorePreviousSeriesOrder = function ()
This method requires jQuery 1.4+ Restore the series canvas order to its previous state.
this.restoreOriginalSeriesOrder = function ()
This method requires jQuery 1.4+ Restore the series canvas order to its original order when the plot was created.
converts any arbitrary data values to grid coordinates and returns them.
+
+
Properties
+
+
highlightMouseOver
this.highlightMouseOver = true
True to highlight area on a filled plot when moused over. This must be false to enable highlightMouseDown to highlight when clicking on an area on a filled plot.
+
+
highlightMouseDown
this.highlightMouseDown = false
True to highlight when a mouse button is pressed over an area on a filled plot. This will be disabled if highlightMouseOver is true.
+
+
highlightColor
this.highlightColor = null
color to use when highlighting an area on a filled plot.
converts any arbitrary data values to grid coordinates and returns them. This method exists so that plugins can use a series’ linerenderer to generate grid data points without overwriting the grid data associated with that series. Called with scope of a series.
This will ensure that there is always a tick mark at 100.
+
+
Properties
+
+
breakPoints
this.breakPoints = null
EXPERIMENTAL!! Use at your own risk! Works only with linear axes and the default tick renderer. Array of [start, stop] points to create a broken axis. Broken axes have a “jump” in them, which is an immediate transition from a smaller value to a larger value. Currently, axis ticks MUST be manually assigned if using breakPoints by using the axis ticks array option.
+
+
breakTickLabel
this.breakTickLabel = "&asymp
Label to use at the axis break if breakPoints are specified.
+
+
forceTickAt0
this.forceTickAt0 = false
This will ensure that there is always a tick mark at 0. If data range is strictly positive or negative, this will force 0 to be inside the axis bounds unless the appropriate axis pad (pad, padMin or padMax) is set to 0, then this will force an axis min or max value at 0. This has know effect when any of the following options are set: autoscale, min, max, numberTicks or tickInterval.
+
+
forceTickAt100
this.forceTickAt100 = false
This will ensure that there is always a tick mark at 100. If data range is strictly above or below 100, this will force 100 to be inside the axis bounds unless the appropriate axis pad (pad, padMin or padMax) is set to 0, then this will force an axis min or max value at 100. This has know effect when any of the following options are set: autoscale, min, max, numberTicks or tickInterval.
The default jqPlot shape renderer. Given a set of points will plot them and either stroke a line (fill = false) or fill them (fill = true). If a filled shape is desired, closePath = true must also be set to close the shape.
Theme Engine provides a programatic way to change some of the more common jqplot styling options such as fonts, colors and grid options. A theme engine instance is created with each plot. The theme engine manages a collection of themes which can be modified, added to, or applied to the plot.
The themeEngine class is not instantiated directly. When a plot is initialized, the current plot options are scanned an a default theme named “Default” is created. This theme is used as the basis for other themes added to the theme engine and is always available.
A theme is a simple javascript object with styling parameters for various entities of the plot. A theme has the form:
”seriesStyles” is a style object that will be applied to all series in the plot. It will forcibly override any styles applied on the individual series. “axesStyles” is a style object that will be applied to all axes in the plot. It will also forcibly override any styles on the individual axes.
The example shown above has series options for a line series. Options for other series types are shown below:
This document will help you understand how jqPlot’s options relate to the API documentation and the jqPlot object itself. For a listing of options available to jqPlot, see jqPlot Options in the jqPlotOptions.txt file.
The key to effectively using jqPlot is understanding jqPlot’s options. The online documentation is API documentation. While it explains what attributes and methods various objects posses, it doesn’t explain how to use or set those attributes through options. This tutorial will help explain that.
First, note that you shouldn’t try to directly set attributes on the “chart” object (like chart.grid.shadow) after your call to $.jqplot(). At best this won’t do anything **(see below). You should pass options in via the “optionsObj”.
the optionsObj really represents the plot object (jqPlot object, not to be confused with the $.jqplot function which will create a jqPlot object). Attributes you specify on that object will be merged with attributes in the jqPlot object. The axes, legend, series, etc. are attributes on the jqPlot object. The jqPlot/optionsObj object looks something like (only some attributes shown):
The optionsObj should follow the same construction as if it were a jqPlot object (with some exceptions/shortcuts I’ll mention in a moment). So generally, when you see something like “this.drawGridLines” in the grid properties in the docs, just replace “this” with “grid” in your options object. So it becomes optionsObj.grid.drawGridLines. Do likewise with the other objects in the plot, replacing “this”, with the respective attribute on the plot like “legend” or “title”. Series and Axes are handled a little different, because series is an array and axes has 4 distinct children “xaxis”, “yaxis”, “x2axis” and “y2axis”.
So, to remove the shadow from the grid and change the grid border size you would do:
Here is a more deeply nested example. Say you want to specify a min and max on your y axis and use a specific color for your second series. That would look like:
Note that series options are an array in order of the series data you sent in to your plot. To get to the second series, you have to put an object (even if empty) in place of the first series.
There is a handy shortcut to assign options to all axes or all series at one go. Use axesDefaults and seriesDefaults. So, if you wanted both x and y axes to start at 0 and you wanted all series to not show markers, you could do:
Another shortcut is for the plot title. Normally, you would assign options to the title as an object. If you specify a title option as a string, it will assign that to the title.text property automatically. So these two are equivalent:
optionsObj = {title:{text:"My Plot"}}
and
optionsObj = {title:"My Plot"}
Where things need more explaination is with renderers, plugins and their options. Briefly, what’s renderer, what’s a plugin.
A renderer is an object that is used to draw something and gets attached to an existing object in the plot in order to draw it. A plugin does more than just provide drawing functionality to an object. It will do more like calculate a trend line, change the cursor, provide event driven functionality, etc. I consider renderers plugins, but plugins don’t have to be renderers.
So, how do you use renderers, plugins, and specify their options? Some common renderes are for bar charts and category axes. If you want to render your series as a bar chart with each set of bars showing up in a category on the x axis, you do:
This replaces the default renderer used for all series in the plot with a bar renderer and the x axis default renderer (but not any other axis) with a category renderer.
Now, how would I assign options to those renderers? The renderer’s attributes may not be present in the pre-existing jqPlot object, they may be specific to the renderer. This is done through the “rendererOptions” option on the appropriate object. So, if I wanted my bars to be 25 pixels wide, I would do:
Again, this is using the “seriesDefaults” option, which will apply options to all series in the plot. You could do the same on any particular series in the plot through the “series” options array.
Plugins are free to add their own options. For example, the highlighter plugin has it’s own set of options that are unique to it. As a result, it responds to options placed in the “highlighter” attribute of your options object. So, if I wanted to change the highlighter tooltip to fade in and out slowly and be positioned directly above the point I’m highlighting:
Other plugins, like dragable and trendlines, add their options in with the series. This is because both of those plugins can have different options for different series in the plot. So, if you wanted to specify the color of the dragable and constrain it to drag only on the x axis as well as specify the color of the trend line you could do:
This would apply those options to the first series only. If you had 2 series and wanted to turn off dragging and trend lines on the second series, you could do:
Note, series dragability is turned off with the “isDragable” option directly on the series itself, not with a suboption of “dragable”. This may be improved in the future.
I hope this is helpful. A few key points to remember:
When you see “this” in the api docs, you generally replace it with the name of the object (in lowercase) you are looking at in your options object.
seriesDefaults and axesDefaults are convenient shortcuts.
to assign options to a renderer, generally use the “rendererOptions”
plugins may add their own options attribute, like “highlighter” or “cursor”.
** Note: you can set attributes after the plot is created (like plot.grid.shadow = false), but you’ll have to issue the appropriate calls to possibly reinitialize and redraw the plot. jqPlot can definitely handle this to change the plot after creation (this is how the dragable plugin updates the plot data and the trend line plugin recomputes itself when data changes). This hasn’t been documented yet, however.
Renderer which draws lines as stacked bezier curves. Data for the line will not be specified as an array of [x, y] data point values, but as a an array of [start piont, bezier curve] So, the line is specified as: [[xstart, ystart], [cp1x, cp1y, cp2x, cp2y, xend, yend]].
converts any arbitrary data values to grid coordinates and returns them. This method exists so that plugins can use a series’ linerenderer to generate grid data points without overwriting the grid data associated with that series. Called with scope of a series.
an array of colors to use when highlighting a bar.
+
+
Properties
+
+
barPadding
this.barPadding = 8
Number of pixels between adjacent bars at the same axis value.
+
+
barMargin
this.barMargin = 10
Number of pixels between groups of bars at adjacent axis values.
+
+
barDirection
this.barDirection = 'vertical'
’vertical’ = up and down bars, ‘horizontal’ = side to side bars
+
+
barWidth
this.barWidth = null
Width of the bar in pixels (auto by devaul). null = calculated automatically.
+
+
shadowOffset
this.shadowOffset = 2
offset of the shadow from the slice and offset of each succesive stroke of the shadow from the last.
+
+
shadowDepth
this.shadowDepth = 5
number of strokes to apply to the shadow, each stroke offset shadowOffset from the last.
+
+
shadowAlpha
this.shadowAlpha = 0.08
transparency of the shadow (0 = transparent, 1 = opaque)
+
+
waterfall
this.waterfall = false
true to enable waterfall plot.
+
+
groups
this.groups = 1
group bars into this many groups
+
+
varyBarColor
this.varyBarColor = false
true to color each bar of a series separately rather than have every bar of a given series the same color. If used for non-stacked multiple series bar plots, user should specify a separate ‘seriesColors’ array for each series. Otherwise, each series will set their bars to the same color array. This option has no Effect for stacked bar charts and is disabled.
+
+
highlightMouseOver
this.highlightMouseOver = true
True to highlight slice when moused over. This must be false to enable highlightMouseDown to highlight when clicking on a slice.
+
+
highlightMouseDown
this.highlightMouseDown = false
True to highlight when a mouse button is pressed over a slice. This will be disabled if highlightMouseOver is true.
+
+
highlightColors
this.highlightColors = []
an array of colors to use when highlighting a bar.
Plugin renderer to draw a x-y block chart. A Block chart has data points displayed as colored squares with a text label inside. Data must be supplied in the form:
default css styles that will be applied to all data blocks. these values will be overridden by css styles supplied with the individulal data points.
+
+
escapeHtml
this.escapeHtml = false
true to escape html in the box label.
+
+
insertBreaks
this.insertBreaks = true
true to turn spaces in data block label into html breaks <br />.
+
+
varyBlockColors
this.varyBlockColors = false
true to vary the color of each block in this series according to the seriesColors array. False to set each block to the color specified on this series. This has no effect if a css background color option is specified in the renderer css options.
+
+
Methods
+
+
moveBlock
this.moveBlock = function (
idx,
x,
y,
duration
)
Moves an individual block. More efficient than redrawing the whole series by calling plot.drawSeries(). Properties: idx - the 0 based index of the block or point in this series. x - the x coordinate in data units (value on x axis) to move the block to. y - the y coordinate in data units (value on the y axis) to move the block to. duration - optional parameter to create an animated movement. Can be a number (higher is slower animation) or ‘fast’, ‘normal’ or ‘slow’. If not provided, the element is moved without any animation.
Plugin renderer to draw a bubble chart. A Bubble chart has data points displayed as colored circles with an optional text label inside. To use the bubble renderer, you must include the bubble renderer like:
[[x1, y1, r1, <label or {label:'text', color:color}>], ...]
where the label or options object is optional.
Note that all bubble colors will be the same unless the “varyBubbleColors” option is set to true. Colors can be specified in the data array or in the seriesColors array option on the series. If no colors are defined, the default jqPlot series of 16 colors are used. Colors are automatically cycled around again if there are more bubbles than colors.
Bubbles are autoscaled by default to fit within the chart area while maintaining relative sizes. If the “autoscaleBubbles” option is set to false, the r(adius) values in the data array a treated as literal pixel values for the radii of the bubbles.
Properties are passed into the bubble renderer in the rendererOptions object of the series options like:
True to show labels on bubbles (if any), false to not show.
+
+
Properties
+
+
varyBubbleColors
this.varyBubbleColors = true
True to vary the color of each bubble in this series according to the seriesColors array. False to set each bubble to the color specified on this series. This has no effect if a css background color option is specified in the renderer css options.
+
+
autoscaleBubbles
this.autoscaleBubbles = true
True to scale the bubble radius based on plot size. False will use the radius value as provided as a raw pixel value for bubble radius.
+
+
autoscaleMultiplier
this.autoscaleMultiplier = 1.0
Multiplier the bubble size if autoscaleBubbles is true.
+
+
autoscalePointsFactor
this.autoscalePointsFactor = -0.07
Factor which decreases bubble size based on how many bubbles on on the chart. 0 means no adjustment for number of bubbles. Negative values will decrease size of bubbles as more bubbles are added. Values between 0 and -0.2 should work well.
+
+
escapeHtml
this.escapeHtml = true
True to escape html in bubble label text.
+
+
highlightMouseOver
this.highlightMouseOver = true
True to highlight bubbles when moused over. This must be false to enable highlightMouseDown to highlight when clicking on a slice.
+
+
highlightMouseDown
this.highlightMouseDown = false
True to highlight when a mouse button is pressed over a bubble. This will be disabled if highlightMouseOver is true.
+
+
highlightColors
this.highlightColors = []
An array of colors to use when highlighting a slice. Calculated automatically if not supplied.
+
+
bubbleAlpha
this.bubbleAlpha = 1.0
Alpha transparency to apply to all bubbles in this series.
+
+
highlightAlpha
this.highlightAlpha = null
Alpha transparency to apply when highlighting bubble. Set to value of bubbleAlpha by default.
+
+
bubbleGradients
this.bubbleGradients = false
True to color the bubbles with gradient fills instead of flat colors. NOT AVAILABLE IN IE due to lack of excanvas support for radial gradient fills. will be ignored in IE.
+
+
showLabels
this.showLabels = true
True to show labels on bubbles (if any), false to not show.
Renderer to draw axis labels with a canvas element to support advanced featrues such as rotated text. This renderer uses a separate rendering engine to draw the text on the canvas. Two modes of rendering the text are available. If the browser has native font support for canvas fonts (currently Mozila 3.5 and Safari 4), you can enable text rendering with the canvas fillText method. You do so by setting the “enableFontSupport” option to true.
Browsers lacking native font support will have the text drawn on the canvas using the Hershey font metrics. Even if the “enableFontSupport” option is true non-supporting browsers will still render with the Hershey font.
CSS spec for the font-family css attribute. Applies only to browsers supporting native font rendering in the canvas tag. Currently Mozilla 3.5 and Safari 4.
+
+
fontSize
this.fontSize = '11pt'
CSS spec for font size.
+
+
fontWeight
this.fontWeight = 'normal'
CSS spec for fontWeight: normal, bold, bolder, lighter or a number 100
900
+
+
fontStretch
this.fontStretch = 1.0
Multiplier to condense or expand font width. Applies only to browsers which don’t support canvas native font rendering.
+
+
textColor
this.textColor = '#666666'
css spec for the color attribute.
+
+
enableFontSupport
this.enableFontSupport = true
true to turn on native canvas font support in Mozilla 3.5+ and Safari 4+. If true, label will be drawn with canvas tag native support for fonts. If false, label will be drawn with Hershey font metrics.
+
+
pt2px
this.pt2px = null
Point to pixel scaling factor, used for computing height of bounding box around a label. The labels text renderer has a default setting of 1.4, which should be suitable for most fonts. Leave as null to use default. If tops of letters appear clipped, increase this. If bounding box seems too big, decrease. This is an issue only with the native font renderering capabilities of Mozilla 3.5 and Safari 4 since they do not provide a method to determine the font height.
Renderer to draw axis ticks with a canvas element to support advanced featrues such as rotated text. This renderer uses a separate rendering engine to draw the text on the canvas. Two modes of rendering the text are available. If the browser has native font support for canvas fonts (currently Mozila 3.5 and Safari 4), you can enable text rendering with the canvas fillText method. You do so by setting the “enableFontSupport” option to true.
Browsers lacking native font support will have the text drawn on the canvas using the Hershey font metrics. Even if the “enableFontSupport” option is true non-supporting browsers will still render with the Hershey font.
Multiplier to condense or expand font width. Applies only to browsers which don’t support canvas native font rendering.
+
+
textColor
this.textColor = '#666666'
css spec for the color attribute.
+
+
enableFontSupport
this.enableFontSupport = true
true to turn on native canvas font support in Mozilla 3.5+ and Safari 4+. If true, tick label will be drawn with canvas tag native support for fonts. If false, tick label will be drawn with Hershey font metrics.
+
+
pt2px
this.pt2px = null
Point to pixel scaling factor, used for computing height of bounding box around a label. The labels text renderer has a default setting of 1.4, which should be suitable for most fonts. Leave as null to use default. If tops of letters appear clipped, increase this. If bounding box seems too big, decrease. This is an issue only with the native font renderering capabilities of Mozilla 3.5 and Safari 4 since they do not provide a method to determine the font height.
Optional name for this overlay object. Can be later used to retrieve the object by name.
+
+
show
true to show (draw), false to not draw.
+
+
lineWidth
Width of the line.
+
+
lineCap
Type of ending placed on the line [‘round’, ‘butt’, ‘square’]
+
+
color
color of the line
+
+
shadow
wether or not to draw a shadow on the line
+
+
shadowAngle
Shadow angle in degrees
+
+
shadowOffset
Shadow offset from line in pixels
+
+
shadowDepth
Number of times shadow is stroked, each stroke offset shadowOffset from the last.
+
+
shadowAlpha
Alpha channel transparency of shadow. 0 = transparent.
+
+
xaxis
X axis to use for positioning/scaling the line.
+
+
yaxis
Y axis to use for positioning/scaling the line.
+
+
dashPattern
dashPattern: [8,8] }
Array of line, space settings in pixels. Default is 8 pixel of line, 8 pixel of space. Note, limit to a 2 element array b/c of bug with higher order arrays.
Optional name for this overlay object. Can be later used to retrieve the object by name.
+
+
show
true to show (draw), false to not draw.
+
+
lineWidth
Width of the line.
+
+
lineCap
Type of ending placed on the line [‘round’, ‘butt’, ‘square’]
+
+
color
color of the line
+
+
shadow
wether or not to draw a shadow on the line
+
+
shadowAngle
Shadow angle in degrees
+
+
shadowOffset
Shadow offset from line in pixels
+
+
shadowDepth
Number of times shadow is stroked, each stroke offset shadowOffset from the last.
+
+
shadowAlpha
Alpha channel transparency of shadow. 0 = transparent.
+
+
xaxis
X axis to use for positioning/scaling the line.
+
+
yaxis
Y axis to use for positioning/scaling the line.
+
+
dashPattern
dashPattern: [8,8] }
Array of line, space settings in pixels. Default is 8 pixel of line, 8 pixel of space. Note, limit to a 2 element array b/c of bug with higher order arrays.
A class of a rendering engine for creating the ticks labels displayed on the plot, See $.jqplot.AxisTickRenderer. this.tickRenderer = $.jqplot.AxisTickRenderer; this.labelRenderer = $.jqplot.AxisLabelRenderer;
Data Renderer function which converts a custom JSON data object into jqPlot data format. Set this as a callable on the jqplot dataRenderer plot option:
Where data is an object in JSON format or a JSON encoded string conforming to the City Index API spec.
Note that calling the renderer function is handled internally by jqPlot. The user does not have to call the function. The parameters described below will automatically be passed to the ciParser function.
links targetPlot to controllerPlot so that plot zooming of targetPlot will be controlled by zooming on the controllerPlot.
+
+
Properties
+
+
style
this.style = 'crosshair'
CSS spec for cursor style
+
+
show
this.show = $.jqplot.config.enablePlugins
wether to show the cursor or not.
+
+
showTooltip
this.showTooltip = true
show a cursor position tooltip. Location of the tooltip will be controlled by followMouse and tooltipLocation.
+
+
followMouse
this.followMouse = false
Tooltip follows the mouse, it is not at a fixed location. Tooltip will show on the grid at the location given by tooltipLocation, offset from the grid edge by tooltipOffset.
+
+
tooltipLocation
this.tooltipLocation = 'se'
Where to position tooltip. If followMouse is true, this is relative to the cursor, otherwise, it is relative to the grid. One of ‘n’, ‘ne’, ‘e’, ‘se’, ‘s’, ‘sw’, ‘w’, ‘nw’
+
+
tooltipOffset
this.tooltipOffset = 6
Pixel offset of tooltip from the grid boudaries or cursor center.
+
+
showTooltipGridPosition
this.showTooltipGridPosition = false
show the grid pixel coordinates of the mouse.
+
+
showTooltipUnitPosition
this.showTooltipUnitPosition = true
show the unit (data) coordinates of the mouse.
+
+
showTooltipDataPosition
this.showTooltipDataPosition = false
Used with showVerticalLine to show intersecting data points in the tooltip.
Use the x and y axes formatters to format the text in the tooltip.
+
+
tooltipAxisGroups
this.tooltipAxisGroups = []
Show position for the specified axes. This is an array like [[‘xaxis’, ‘yaxis’], [‘xaxis’, ‘y2axis’]] Default is to compute automatically for all visible axes.
+
+
zoom
this.zoom = false
Enable plot zooming.
+
+
looseZoom
this.looseZoom = false
Will expand zoom range to provide more rounded tick values. Works only with linear axes and date axes.
+
+
clickReset
this.clickReset = false
Will reset plot zoom if single click on plot without drag.
+
+
dblClickReset
this.dblClickReset = true
Will reset plot zoom if double click on plot without drag.
+
+
showVerticalLine
this.showVerticalLine = false
draw a vertical line across the plot which follows the cursor. When the line is near a data point, a special legend and/or tooltip can be updated with the data values.
+
+
showHorizontalLine
this.showHorizontalLine = false
draw a horizontal line across the plot which follows the cursor.
+
+
constrainZoomTo
this.constrainZoomTo = 'none'
’none’, ‘x’ or ‘y’
+
+
intersectionThreshold
this.intersectionThreshold = 2
pixel distance from data point or marker to consider cursor lines intersecting with point. If data point markers are not shown, this should be >= 1 or will often miss point intersections.
+
+
showCursorLegend
this.showCursorLegend = false
Replace the plot legend with an enhanced legend displaying intersection information.
Format string used in the cursor legend. If showTooltipDataPosition is true, this will also be the default format string used by tooltipFormatString.
+
+
constrainOutsideZoom
this.constrainOutsideZoom = true
True to limit actual zoom area to edges of grid, even when zooming outside of plot area. That is, can’t zoom out by mousing outside plot.
+
+
showTooltipOutsideZoom
this.showTooltipOutsideZoom = false
True will keep updating the tooltip when zooming of the grid.
+
+
methods
+
+
$.jqplot.Cursor.zoomProxy
$.jqplot.Cursor.zoomProxy = function(
targetPlot,
controllerPlot
)
links targetPlot to controllerPlot so that plot zooming of targetPlot will be controlled by zooming on the controllerPlot. controllerPlot will not actually zoom, but acts as an overview plot. Note, the zoom options must be set to true for zoomProxy to work.
A plugin for a jqPlot to render an axis as a series of date values. This renderer has no options beyond those supplied by the Axis class. It supplies it’s own tick formatter, so the tickOptions.formatter option should not be overridden.
Dates can be passed into the axis in almost any recognizable value and will be parsed. They will be rendered on the axis in the format specified by tickOptions.formatString. e.g. tickOptions.formatString = ‘%Y-%m-%d’.
Accecptable format codes are:
Code Result Description
+ == Years ==
+%Y 2008 Four-digit year
+%y 08 Two-digit year
+ == Months ==
+%m 09 Two-digit month
+%#m 9 One or two-digit month
+%B September Full month name
+%b Sep Abbreviated month name
+ == Days ==
+%d 05 Two-digit day of month
+%#d 5 One or two-digit day of month
+%e 5 One or two-digit day of month
+%A Sunday Full name of the day of the week
+%a Sun Abbreviated name of the day of the week
+%w 0 Number of the day of the week (0 = Sunday, 6 = Saturday)
+%o th The ordinal suffix string following the day of the month
+ == Hours ==
+%H 23 Hours in 24-hour format (two digits)
+%#H 3 Hours in 24-hour integer format (one or two digits)
+%I 11 Hours in 12-hour format (two digits)
+%#I 3 Hours in 12-hour integer format (one or two digits)
+%p PM AM or PM
+ == Minutes ==
+%M 09 Minutes (two digits)
+%#M 9 Minutes (one or two digits)
+ == Seconds ==
+%S 02 Seconds (two digits)
+%#S 2 Seconds (one or two digits)
+%s 1206567625723 Unix timestamp (Seconds past 1970-01-01 00:00:00)
+ == Milliseconds ==
+%N 008 Milliseconds (three digits)
+%#N 8 Milliseconds (one to three digits)
+ == Timezone ==
+%O 360 difference in minutes between local time and GMT
+%Z Mountain Standard Time Name of timezone as reported by browser
+%G -06:00 Hours and minutes between GMT
+ == Shortcuts ==
+%F 2008-03-26 %Y-%m-%d
+%T 05:06:30 %H:%M:%S
+%X 05:06:30 %H:%M:%S
+%x 03/26/08 %m/%d/%y
+%D 03/26/08 %m/%d/%y
+%#c Wed Mar 26 15:31:00 2008 %a %b %e %H:%M:%S %Y
+%v 3-Sep-2008 %e-%b-%Y
+%R 15:31 %H:%M
+%r 3:31:00 PM %I:%M:%S %p
+ == Characters ==
+%n \n Newline
+%t \t Tab
+%% % Percent Symbol
A class of a rendering engine for creating the ticks labels displayed on the plot, See $.jqplot.AxisTickRenderer.
+
+
Properties
+
+
tickRenderer
A class of a rendering engine for creating the ticks labels displayed on the plot, See $.jqplot.AxisTickRenderer. this.tickRenderer = $.jqplot.AxisTickRenderer; this.labelRenderer = $.jqplot.AxisLabelRenderer;
A donut plot will trigger events on the plot target according to user interaction. All events return the event object, the series index, the point (slice) index, and the point data for the appropriate slice.
’jqplotDataMouseOver’
triggered when user mouseing over a slice.
’jqplotDataHighlight’
triggered the first time user mouses over a slice, if highlighting is enabled.
’jqplotDataUnhighlight’
triggered when a user moves the mouse out of a highlighted slice.
’jqplotDataClick’
triggered when the user clicks on a slice.
’jqplotDataRightClick’
tiggered when the user right clicks on a slice if the “captureRightClick” option is set to true on the plot.
Outer diameter of the donut, auto computed by default
+
+
innerDiameter
this.innerDiameter = null
Inner diameter of the donut, auto calculated by default. If specified will override thickness value.
+
+
thickness
this.thickness = null
thickness of the donut, auto computed by default Overridden by if innerDiameter is specified.
+
+
padding
this.padding = 20
padding between the donut and plot edges, legend, etc.
+
+
sliceMargin
this.sliceMargin = 0
angular spacing between donut slices in degrees.
+
+
ringMargin
this.ringMargin = null
pixel distance between rings, or multiple series in a donut plot. null will compute ringMargin based on sliceMargin.
+
+
fill
this.fill = true
true or false, wether to fil the slices.
+
+
shadowOffset
this.shadowOffset = 2
offset of the shadow from the slice and offset of each succesive stroke of the shadow from the last.
+
+
shadowAlpha
this.shadowAlpha = 0.07
transparency of the shadow (0 = transparent, 1 = opaque)
+
+
shadowDepth
this.shadowDepth = 5
number of strokes to apply to the shadow, each stroke offset shadowOffset from the last.
+
+
highlightMouseOver
this.highlightMouseOver = true
True to highlight slice when moused over. This must be false to enable highlightMouseDown to highlight when clicking on a slice.
+
+
highlightMouseDown
this.highlightMouseDown = false
True to highlight when a mouse button is pressed over a slice. This will be disabled if highlightMouseOver is true.
+
+
highlightColors
this.highlightColors = []
an array of colors to use when highlighting a slice.
+
+
dataLabels
this.dataLabels = 'percent'
Either ‘label’, ‘value’, ‘percent’ or an array of labels to place on the pie slices. Defaults to percentage of each pie slice.
+
+
showDataLabels
this.showDataLabels = false
true to show data labels on slices.
+
+
dataLabelFormatString
this.dataLabelFormatString = null
Format string for data labels. If none, ‘%s’ is used for “label” and for arrays, ‘%d’ for value and ‘%d%%’ for percentage.
+
+
dataLabelThreshold
this.dataLabelThreshold = 3
Threshhold in percentage (0
100) of pie area, below which no label will be displayed. This applies to all label types, not just to percentage labels.
+
+
dataLabelPositionFactor
this.dataLabelPositionFactor = 0.4
A Multiplier (0-1) of the pie radius which controls position of label on slice. Increasing will slide label toward edge of pie, decreasing will slide label toward center of pie.
+
+
dataLabelNudge
this.dataLabelNudge = 0
Number of pixels to slide the label away from (+) or toward (-) the center of the pie.
+
+
startAngle
this.startAngle = 0
Angle to start drawing donut in degrees. According to orientation of canvas coordinate system: 0 = on the positive x axis -90 = on the positive y axis. 90 = on the negaive y axis. 180 or - 180 = on the negative x axis.
+
+
$.jqplot.DonutLegendRenderer
Legend Renderer specific to donut plots. Set by default when user creates a donut plot.
true to toggle series with a show/hide method only and not allow fading in/out.
+
+
Properties
+
+
numberRows
this.numberRows = null
Maximum number of rows in the legend. 0 or null for unlimited.
+
+
numberColumns
this.numberColumns = null
Maximum number of columns in the legend. 0 or null for unlimited.
+
+
seriesToggle
this.seriesToggle = 'normal'
false to not enable series on/off toggling on the legend. true or a fadein/fadeout speed (number of milliseconds or ‘fast’, ‘normal’, ‘slow’) to enable show/hide of series on click of legend item.
+
+
disableIEFading
this.disableIEFading = true
true to toggle series with a show/hide method only and not allow fading in/out. This is to overcome poor performance of fade in some versions of IE.
The funnel renderer will reorder data in descending order so the largest value in the data set is first and displayed on top of the funnel. Data will then be displayed in descending order down the funnel. The area of each funnel section will correspond to the value of each data point relative to the sum of all values. That is section area is proportional to section value divided by sum of all section values.
If your data is not in descending order when passed into the plot, it will be reordered when stored in the series.data property. A copy of the unordered data is kept in the series._unorderedData property.
A funnel plot will trigger events on the plot target according to user interaction. All events return the event object, the series index, the point (section) index, and the point data for the appropriate section. Note the point index will referr to the ordered data, not the original unordered data.
’jqplotDataMouseOver’
triggered when mousing over a section.
’jqplotDataHighlight’
triggered the first time user mouses over a section, if highlighting is enabled.
’jqplotDataUnhighlight’
triggered when a user moves the mouse out of a highlighted section.
’jqplotDataClick’
triggered when the user clicks on a section.
’jqplotDataRightClick’
tiggered when the user right clicks on a section if the “captureRightClick” option is set to true on the plot.
A tooltip providing information about the data point is enabled by default. To disable the tooltip, set “showTooltip” to false.
You can control what data is displayed in the tooltip with various options. The “tooltipAxes” option controls wether the x, y or both data values are displayed.
Some chart types (e.g. hi-low-close) have more than one y value per data point. To display the additional values in the tooltip, set the “yvalues” option to the desired number of y values present (3 for a hlc chart).
By default, data values will be formatted with the same formatting specifiers as used to format the axis ticks. A custom format code can be supplied with the tooltipFormatString option. This will apply to all values in the tooltip.
For more complete control, the “formatString” option can be set. This Allows conplete control over tooltip formatting. Values are passed to the format string in an order determined by the “tooltipAxes” and “yvalues” options. So, if you have a hi-low-close chart and you just want to display the hi-low-close values in the tooltip, you could set a formatString like:
This option requires jQuery 1.4+ True to bring the series of the highlighted point to the front of other series.
+
+
Properties
+
+
show
this.show = $.jqplot.config.enablePlugins
true to show the highlight.
+
+
markerRenderer
this.markerRenderer = new $.jqplot.MarkerRenderer(
{shadow:false}
)
Renderer used to draw the marker of the highlighted point. Renderer will assimilate attributes from the data point being highlighted, so no attributes need set on the renderer directly. Default is to turn off shadow drawing on the highlighted point.
+
+
showMarker
this.showMarker = true
true to show the marker
+
+
lineWidthAdjust
this.lineWidthAdjust = 2.5
Pixels to add to the lineWidth of the highlight.
+
+
sizeAdjust
this.sizeAdjust = 5
Pixels to add to the overall size of the highlight.
+
+
showTooltip
this.showTooltip = true
Show a tooltip with data point values.
+
+
tooltipLocation
this.tooltipLocation = 'nw'
Where to position tooltip, ‘n’, ‘ne’, ‘e’, ‘se’, ‘s’, ‘sw’, ‘w’, ‘nw’
alternative to tooltipFormatString will format the whole tooltip text, populating with x, y values as indicated by tooltipAxes option. So, you could have a tooltip like: ‘Date: %s, number of cats: %d’ to format the whole tooltip at one go. If useAxesFormatters is true, values will be formatted according to Axes formatters and you can populate your tooltip string with %s placeholders.
+
+
yvalues
this.yvalues = 1
Number of y values to expect in the data point array. Typically this is 1. Certain plots, like OHLC, will have more y values in each data point array.
+
+
bringSeriesToFront
this.bringSeriesToFront = false
This option requires jQuery 1.4+ True to bring the series of the highlighted point to the front of other series.
A class of a rendering engine for creating the ticks labels displayed on the plot, See $.jqplot.AxisTickRenderer.
+
+
axisDefaults
Default properties which will be applied directly to the series.
+
+
Properties
Properties
/ base
the logarithmic base, commonly 2, 10 or Math.E
tickDistribution
’even’ or ‘power’. ‘even’ gives equal pixel spacing of the ticks on the plot. ‘power’ gives ticks in powers of 10.
+
+
tickRenderer
A class of a rendering engine for creating the ticks labels displayed on the plot, See $.jqplot.AxisTickRenderer. this.tickRenderer = $.jqplot.AxisTickRenderer; this.labelRenderer = $.jqplot.AxisLabelRenderer;
An axis renderer for a Mekko chart. Should be used with a Mekko chart where the mekkoRenderer is used on the series. Displays the Y axis as a range from 0 to 1 (0 to 100%) and the x axis with a tick for each series scaled to the sum of all the y values.
How to space the ticks on the axis. ‘bar’ will place a tick at the width of each bar. This is the default for the x axis. ‘even’ will place ticks at even intervals. This is the default for x2 axis and y axis. y axis cannot be changed.
Draws a Mekko style chart which shows 3 dimensional data on a 2 dimensional graph. the $.jqplot.MekkoAxisRenderer should be used with mekko charts. The mekko renderer overrides the default legend renderer with it’s own $.jqplot.MekkoLegendRenderer which allows more flexibility to specify number of rows and columns in the legend.
Data is specified per bar in the chart. You can specify data as an array of y values, or as an array of [label, value] pairs. Note that labels are used only on the first series. Labels on subsequent series are ignored:
If you want to place labels for each bar under the axis, you use the barLabels option on the axes. The bar labels can be styled with the “.jqplot-mekko-barLabel” css class.
converts the user data values to grid coordinates and stores them in the gridData array. Will convert user data into appropriate rectangles. Called with scope of a series.
converts any arbitrary data values to grid coordinates and returns them. This method exists so that plugins can use a series’ linerenderer to generate grid data points without overwriting the grid data associated with that series. Called with scope of a series.
+
+
$.jqplot.MekkoLegendRenderer
Legend renderer used by mekko charts with options for controlling number or rows and columns as well as placement outside of plot area.
Then you set the renderer in the series options on your plot
series: [{renderer:$.jqplot.OHLCRenderer}]
For OHLC and candlestick charts, data should be specified like so:
dat = [['07/06/2009',138.7,139.68,135.18,135.4], ['06/29/2009',143.46,144.66,139.79,140.02], ...]
If the data array has only 4 values per point instead of 5, the renderer will create a Hi Low Close chart instead. In that case, data should be supplied like:
dat = [['07/06/2009',139.68,135.18,135.4], ['06/29/2009',144.66,139.79,140.02], ...]
To generate a candlestick chart instead of an OHLC chart, set the “candlestick” option to true:
A pie plot will trigger events on the plot target according to user interaction. All events return the event object, the series index, the point (slice) index, and the point data for the appropriate slice.
’jqplotDataMouseOver’
triggered when user mouseing over a slice.
’jqplotDataHighlight’
triggered the first time user mouses over a slice, if highlighting is enabled.
’jqplotDataUnhighlight’
triggered when a user moves the mouse out of a highlighted slice.
’jqplotDataClick’
triggered when the user clicks on a slice.
’jqplotDataRightClick’
tiggered when the user right clicks on a slice if the “captureRightClick” option is set to true on the plot.
Outer diameter of the pie, auto computed by default
+
+
padding
this.padding = 20
padding between the pie and plot edges, legend, etc.
+
+
sliceMargin
this.sliceMargin = 0
angular spacing between pie slices in degrees.
+
+
fill
this.fill = true
true or false, wether to fil the slices.
+
+
shadowOffset
this.shadowOffset = 2
offset of the shadow from the slice and offset of each succesive stroke of the shadow from the last.
+
+
shadowAlpha
this.shadowAlpha = 0.07
transparency of the shadow (0 = transparent, 1 = opaque)
+
+
shadowDepth
this.shadowDepth = 5
number of strokes to apply to the shadow, each stroke offset shadowOffset from the last.
+
+
highlightMouseOver
this.highlightMouseOver = true
True to highlight slice when moused over. This must be false to enable highlightMouseDown to highlight when clicking on a slice.
+
+
highlightMouseDown
this.highlightMouseDown = false
True to highlight when a mouse button is pressed over a slice. This will be disabled if highlightMouseOver is true.
+
+
highlightColors
this.highlightColors = []
an array of colors to use when highlighting a slice.
+
+
dataLabels
this.dataLabels = 'percent'
Either ‘label’, ‘value’, ‘percent’ or an array of labels to place on the pie slices. Defaults to percentage of each pie slice.
+
+
showDataLabels
this.showDataLabels = false
true to show data labels on slices.
+
+
dataLabelFormatString
this.dataLabelFormatString = null
Format string for data labels. If none, ‘%s’ is used for “label” and for arrays, ‘%d’ for value and ‘%d%%’ for percentage.
+
+
dataLabelThreshold
this.dataLabelThreshold = 3
Threshhold in percentage (0-100) of pie area, below which no label will be displayed. This applies to all label types, not just to percentage labels.
+
+
dataLabelPositionFactor
this.dataLabelPositionFactor = 0.52
A Multiplier (0-1) of the pie radius which controls position of label on slice. Increasing will slide label toward edge of pie, decreasing will slide label toward center of pie.
+
+
dataLabelNudge
this.dataLabelNudge = 2
Number of pixels to slide the label away from (+) or toward (-) the center of the pie.
+
+
dataLabelCenterOn
this.dataLabelCenterOn = true
True to center the data label at its position. False to set the inside facing edge of the label at its position.
+
+
startAngle
this.startAngle = 0
Angle to start drawing pie in degrees. According to orientation of canvas coordinate system: 0 = on the positive x axis -90 = on the positive y axis. 90 = on the negaive y axis. 180 or - 180 = on the negative x axis.
+
+
$.jqplot.PieLegendRenderer
Legend Renderer specific to pie plots. Set by default when user creates a pie plot.
By default, the last value in the data ponit array in the data series is used for the label. For most series renderers, extra data can be added to the data point arrays and the last value will be used as the label.
For instance, this series:
[[1,4], [3,5], [7,2]]
Would, by default, use the y values in the labels. Extra data can be added to the series like so:
[[1,4,'mid'], [3 5,'hi'], [7,2,'low']]
And now the point labels would be ‘mid’, ‘low’, and ‘hi’.
Options to the point labels and a custom labels array can be passed into the “pointLabels” option on the series option like so:
A custom labels array in the options takes precendence over any labels in the series data. If you have a custom labels array in the options, but still want to use values from the series array as labels, set the “labelsFromSeries” option to true.
By default, html entities (<, >, etc.) are escaped in point labels. If you want to include actual html markup in the labels, set the “escapeHTML” option to false.
CSS color spec for the trend line. By default this wil be the same color as the primary line.
+
+
renderer
this.renderer = new $.jqplot.LineRenderer()
Renderer to use to draw the trend line. The data series that is plotted may not be rendered as a line. Therefore, we use our own line renderer here to draw a trend line.
+
+
rendererOptions
this.rendererOptions = {marker:{show:false}}
Options to pass to the line renderer. By default, markers are not shown on trend lines.
+
+
label
this.label = ''
Label for the trend line to use in the legend.
+
+
type
this.type = 'linear'
Either ‘exponential’, ‘exp’, or ‘linear’.
+
+
shadow
this.shadow = true
true or false, wether or not to show the shadow.
+
+
markerRenderer
this.markerRenderer = {show:false}
Renderer to use to draw markers on the line. I think this is wrong.
Below are a few examples to demonstrate jqPlot usage. These plots are shown as static images. Many more examples of dynamically rendered plots can be seen on the test and examples pages here: ../../tests/.
Include the Files
jqPlot requires jQuery (1.4+ required for certain features). jQuery 1.4.4 is included in the distribution. To use jqPlot include jquery, the jqPlot jQuery plugin, jqPlot css file and optionally the excanvas script for IE support in your web page. Note, excanvas is required only for IE versions below 9. IE 9 includes native support for the canvas element and does not require excanvas:
You can customize the plot by passing options to the $.jqplot function. Options are described in jqPlot Options in the jqPlotOptions.txt file. An example of options usage:
You can use jqPlot plugins (that is, plugins to the jqPlot plugin) by including them in your html after you include the jqPlot plugin. Here is how to include the log axis plugin:
Important note: For jqplot builds r529 and above (0.9.7r529 and higher), you must explicitly enable plugins via either the { show: true } plugin option to the plot or by using the $.jqplot.config.enablePlugins = true; config options set on the page before plot creation. Only plugins that can be immediately active upon loading are affected. This includes non-renderer plugins like cursor, dragable, highlighter, and trendline.
Here is a the same $.jqplot call but with a log y axis:
For a full list of options, see jqPlot Options in the jqPlotOptions.txt file.
You can add as many plugins as you wish. Order is generally not important. Some plugins, like the highlighter plugin which highlights data points near the mouse, don’t need any extra options or setup to function. Highlighter does have additional options which the user can set.
Other plugins, the barRenderer for example, provide functionality the must be specified in the chart options object. To render a series as a bar graph with the bar renderer, you would first include the plugin after jqPlot:
Create a new theme based on the default theme, adding it the themeEngine.
+
+
+
+
this.redraw = function(
clear
)
Empties the plot target div and redraws the plot.
this.reInitialize = function ()
reinitialize plot for replotting.
$.jqplot.ThemeEngine.prototype.remove = function(
name
)
Remove the given theme from the themeEngine.
$.jqplot.ThemeEngine.prototype.rename = function (
oldName,
newName
)
Rename a theme.
this.replot = function(
options
)
Does a reinitialization of the plot followed by a redraw.
this.resetAxesScale = function(
axes,
options
)
Reset the specified axes min, max, numberTicks and tickInterval properties to null or reset these properties on all axes if no list of axes is provided.
this.restoreOriginalSeriesOrder = function ()
This method requires jQuery 1.4+ Restore the series canvas order to its original order when the plot was created.
this.restorePreviousSeriesOrder = function ()
This method requires jQuery 1.4+ Restore the series canvas order to its previous state.
jQuery function called by the user to create a plot.
Renderer to place labels on the axes.
A “tick” object showing the value of a tick/gridline on the plot.
A plugin renderer for jqPlot to draw a bar plot.
Renderer which draws lines as stacked bezier curves.
Plugin renderer to draw a x-y block chart.
Plugin renderer to draw a bubble chart.
Renderer to draw axis labels with a canvas element to support advanced featrues such as rotated text.
Renderer to draw axis ticks with a canvas element to support advanced featrues such as rotated text.
The default jqPlot grid renderer, creating a grid on a canvas element.
A plugin for jqPlot to render a category style axis, with equal pixel spacing between y data values of a series.
Data Renderer function which converts a custom JSON data object into jqPlot data format.
Plugin class representing the cursor as displayed on the plot.
A plugin for a jqPlot to render an axis as a series of date values.
The default title renderer for jqPlot.
Legend Renderer specific to donut plots.
Plugin renderer to draw a donut chart.
Plugin to make plotted points dragable by the user.
Legend Renderer specific to funnel plots.
Plugin renderer to draw a funnel chart.
Plugin which will highlight data points when they are moused over.
The default jqPlot axis renderer, creating a numeric axis.
The default line renderer for jqPlot, this class has no options beyond the Series class.
A plugin for a jqPlot to render a logarithmic axis.
The default jqPlot marker renderer, rendering the points on the line.
An axis renderer for a Mekko chart.
Legend renderer used by mekko charts with options for controlling number or rows and columns as well as placement outside of plot area.
Draws a Mekko style chart which shows 3 dimensional data on a 2 dimensional graph.
Plugin renderer to draw a meter gauge chart.
jqPlot Plugin to draw Open Hi Low Close, Candlestick and Hi Low Close charts.
Legend Renderer specific to pie plots.
Plugin renderer to draw a pie chart.
Plugin for putting labels at the data points.
The default jqPlot shadow renderer, rendering shadows behind shapes.
The default jqPlot shape renderer.
Theme Engine provides a programatic way to change some of the more common jqplot styling options such as fonts, colors and grid options.
Plugin which will automatically compute and draw trendlines for plotted data.
+
+
+
+
this.activeTheme=null
Pointer to currently active theme
called at the end of legend draw, so plugins can add rows to the legend table.
this.alpha = 0.07
alpha transparency of shadow stroke.
this.angle = 0
angle of text, measured clockwise from x axis.
this.angle = 0
angle of text, measured clockwise from x axis.
this.angle = 45
Angle of the shadow in degrees.
this.autoscale = false
Autoscale the axis min and max values to provide sensible tick spacing.
this.autoscaleBubbles = true
True to scale the bubble radius based on plot size.
this.autoscaleMultiplier = 1.0
Multiplier the bubble size if autoscaleBubbles is true.
this.autoscalePointsFactor = -0.07
Factor which decreases bubble size based on how many bubbles on on the chart.
See jqPlot Options for a list of options available thorugh the options object (not complete yet!)
this.axes = {xaxis: new Axis('xaxis'), yaxis: new Axis('yaxis'), x2axis: new Axis('x2axis'), y2axis: new Axis('y2axis'), y3axis: new Axis('y3axis'), y4axis: new Axis('y4axis'), y5axis: new Axis('y5axis'), y6axis: new Axis('y6axis'), y7axis: new Axis('y7axis'), y8axis: new Axis('y8axis'), y9axis: new Axis('y9axis')}
up to 4 axes are supported, each with it’s own options, See Axis for axis specific options.
default options that will be applied to all axes.
An individual axis object.
Default properties which will be applied directly to the series.
+
+
+
+
this.background = "#efefef"
background color of the inside of the gauge.
this.background = '#fffdf6'
css spec for the background color.
this.background
css spec for the background of the legend box.
this.barDirection = 'vertical'
‘vertical’ = up and down bars, ‘horizontal’ = side to side bars
padding between the funnel and plot edges, legend, etc.
this.padding = null
padding between the meterGauge and plot edges, auto calculated by default.
this.padding = 20
padding between the pie and plot edges, legend, etc.
this.padMax = null
Padding to extend the range above data bounds.
this.padMin = null
Padding to extend the range below data bounds.
this.pegNeedle = true
True will stop needle just below/above the min/max values if data is below/above min/max, as if the meter is “pegged”.
this.placement = "insideGrid"
“insideGrid” places legend inside the grid area of the plot.
called after plot draw.
called after each series is drawn.
called after series shadows are drawn.
called after initialization.
called after user options are parsed.
called after series related options are parsed.
called after series is initialized.
Wether to draw the legend before the series or not.
called before plot draw.
called before the legend is drawn.
called before each series is drawn.
called before series shadows are drawn.
this.prefix = ''
String to prepend to the tick label.
this.prefix = ''
String to prepend to the tick label.
called before initialization.
called before user options are parsed.
called before series related options are parsed.
called before series is initialized.
Properties
Axes options are specified within an axes object at the top level of the plot options like so:
These properties are specified at the top of the options object like so:
Properties will be assigned from a series array at the top level of the options.
this.pt2px = null
Point to pixel scaling factor, used for computing height of bounding box around a label.
this.pt2px = null
Point to pixel scaling factor, used for computing height of bounding box around a label.
+
+
+
+
this.redraw = function(
clear
)
Empties the plot target div and redraws the plot.
this.reInitialize = function ()
reinitialize plot for replotting.
$.jqplot.ThemeEngine.prototype.remove = function(
name
)
Remove the given theme from the themeEngine.
$.jqplot.ThemeEngine.prototype.rename = function (
oldName,
newName
)
Rename a theme.
this.renderer = new $.jqplot.LineRenderer()
Renderer to use to draw the trend line.
this.renderer = $.jqplot.LinearAxisRenderer
A class of a rendering engine that handles tick generation, scaling input data to pixel grid units and drawing the axis element.
this.renderer = $.jqplot.CanvasGridRenderer
Instance of a renderer which will actually render the grid, see $.jqplot.CanvasGridRenderer.
this.renderer = $.jqplot.LineRenderer
A class of a renderer which will draw the series, see $.jqplot.LineRenderer.
this.renderer = $.jqplot.DivTitleRenderer
A class for creating a DOM element for the title, see $.jqplot.DivTitleRenderer.
this.rendererOptions = {marker:{show:false}}
Options to pass to the line renderer.
this.rendererOptions = {}
renderer specific options.
this.rendererOptions = {}
Options to pass on to the renderer, see $.jqplot.CanvasGridRenderer.
this.rendererOptions = {}
renderer specific options passed to the renderer.
this.rendererOptions = {}
Options to pass on to the renderer.
this.rendererOptions = {}
renderer specific options passed to the renderer.
this.replot = function(
options
)
Does a reinitialization of the plot followed by a redraw.
this.resetAxesScale = function(
axes,
options
)
Reset the specified axes min, max, numberTicks and tickInterval properties to null or reset these properties on all axes if no list of axes is provided.
this.restoreOriginalSeriesOrder = function ()
This method requires jQuery 1.4+ Restore the series canvas order to its original order when the plot was created.
this.restorePreviousSeriesOrder = function ()
This method requires jQuery 1.4+ Restore the series canvas order to its previous state.
this.ringColor = "#BBC6D0"
color of the outer ring, hub, and needle of the gauge.
this.ringMargin = null
pixel distance between rings, or multiple series in a donut plot.
Autoscale the axis min and max values to provide sensible tick spacing.
this.autoscaleBubbles = true
True to scale the bubble radius based on plot size.
this.autoscaleMultiplier = 1.0
Multiplier the bubble size if autoscaleBubbles is true.
this.autoscalePointsFactor = -0.07
Factor which decreases bubble size based on how many bubbles on on the chart.
this.axes = {xaxis: new Axis('xaxis'), yaxis: new Axis('yaxis'), x2axis: new Axis('x2axis'), y2axis: new Axis('y2axis'), y3axis: new Axis('y3axis'), y4axis: new Axis('y4axis'), y5axis: new Axis('y5axis'), y6axis: new Axis('y6axis'), y7axis: new Axis('y7axis'), y8axis: new Axis('y8axis'), y9axis: new Axis('y9axis')}
up to 4 axes are supported, each with it’s own options, See Axis for axis specific options.
default options that will be applied to all axes.
Default properties which will be applied directly to the series.
+
+
+
+
this.background = "#efefef"
background color of the inside of the gauge.
this.background = '#fffdf6'
css spec for the background color.
this.background
css spec for the background of the legend box.
this.barDirection = 'vertical'
‘vertical’ = up and down bars, ‘horizontal’ = side to side bars
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/OHLC2.html b/phpgwapi/js/jquery/jqplot/examples/OHLC2.html
new file mode 100644
index 0000000000..372a9bcfda
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/OHLC2.html
@@ -0,0 +1,194 @@
+
+
+
+
+
+ Open Hi Low Close and Canclestick Charts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/ajax-loader.gif b/phpgwapi/js/jquery/jqplot/examples/ajax-loader.gif
new file mode 100644
index 0000000000..3288d1035d
Binary files /dev/null and b/phpgwapi/js/jquery/jqplot/examples/ajax-loader.gif differ
diff --git a/phpgwapi/js/jquery/jqplot/examples/area.html b/phpgwapi/js/jquery/jqplot/examples/area.html
new file mode 100644
index 0000000000..40b1235b1a
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/area.html
@@ -0,0 +1,108 @@
+
+
+
+
+
+ Filled (Area) Charts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Area charts support highlighting and mouse events by default. The options and handlers and callbacks are essentially the same as with bar, pie, donut and funnel charts. One notable exception for area charts is that no data point index will be provided to the callback and the entire data set for the highlighted area will be returned. This is because the area is not associated with one particular data point, but with the entire data set of the series.
+
+
Moused Over: Nothing
+
+
+
+
For the chart below, mouseover has been disabled and click handling is enabled by setting "highlightMouseDown: true". For "fillToZero" area charts that have both negative and positive values as shown below, clicking in either the positive of negative regions will generate the same result.
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/barLinePieStack.html b/phpgwapi/js/jquery/jqplot/examples/barLinePieStack.html
new file mode 100644
index 0000000000..6287ca7833
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/barLinePieStack.html
@@ -0,0 +1,230 @@
+
+
+
+
+
+ Multiple Chart types on same page
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/barMissingValues.html b/phpgwapi/js/jquery/jqplot/examples/barMissingValues.html
new file mode 100644
index 0000000000..54b05a4372
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/barMissingValues.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/barTest.html b/phpgwapi/js/jquery/jqplot/examples/barTest.html
new file mode 100644
index 0000000000..889038689e
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/barTest.html
@@ -0,0 +1,307 @@
+
+
+
+
+
+ Bar Charts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To create bar plots, you have to include the "jqplot.barRenderer.js" file in your source.
+
+
Below is a default bar plot. Bars will highlight on mouseover. Events are triggered when you mouseover a bar and also when you click on a bar. Here We capture the 'jqplotDataClick' event and display the clicked series index, point index and data values. When series data is assigned as a 1-dimensional array as in this example, jqPlot automatically converts it into a 2-dimensional array for plotting. So a series defined as [2, 6, 7, 10] will become [[1,2], [2,6], [3,7], [4,10]].
+
+
You Clicked: Nothing yet
+
+
+
+
+
The plot target also fires a 'jqplotDataMouseOver' when the cursor is moused over a bar even if highlighting is turned off. This event will fire continuously as the user mouses over the bar. 'jqplotDataHighlight' fires only once when the user first passes over the bar. Additionally, a 'jqplotDataUnhighlight' event is fired when the user moves out of a bar (if highlighting is enabled).
+
+
Moused Over: Nothing
+
+
+
+
+
Moused Over: Nothing
+
Clicked: Nothing
+
+
+
+
+
The next example has the plot's 'captureRightClick' option set to true. This causes the plot to fire a 'jqplotRightClick' event the the user clicks the right mouse button over a bar. Here, the 'highlightMouseDown' option is also set to true. This will highlight a slice on mouse down instead of on move over. Highlighting will occur for either left or right click.
+
+
You Right Clicked: Nothing yet
+
+
+
+
+
+
+
+
+
+
+
A pie chart is added to test for incompatibilities.
+
+
+
+
The nex example shows the placement of point labels on negative bars. They shou be placed on the opposite position. That is, if it is placed 'north' to the positive bars, then it should be placed 'south' to the negative bars.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/barTest2.html b/phpgwapi/js/jquery/jqplot/examples/barTest2.html
new file mode 100644
index 0000000000..b71cda394f
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/barTest2.html
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+ Bar Charts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/bezierCurve.html b/phpgwapi/js/jquery/jqplot/examples/bezierCurve.html
new file mode 100644
index 0000000000..0e89295ff4
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/bezierCurve.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The Bezier curve renderer can distinguish between two different input data formats. This first example has the data passed in as 2 data points, the second one defining the Bezier curve to the end point. With this format, non-default axes renderers will require specifying the minimum and maximum on the axes.
This second example has the data broken out into 4 points, which will be assembled to define the Bezier Curve. With this format, any axes renderer can be used without explicitly specifying the minimum and maximum.
Note that jqPlot converts the datetime strings into timestamps internally, so further explicit modification of the x value (date value) of series data points will have to be with integer time stamp data. So, you would do something like:
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/blockPlot.html b/phpgwapi/js/jquery/jqplot/examples/blockPlot.html
new file mode 100644
index 0000000000..daea4e85df
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/blockPlot.html
@@ -0,0 +1,149 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Below is an example block plot. This plot also uses the Enhanced Legend Renderer plugin. Clicking on an item in the legend will toggle display of the appropriate series.
+
+
Blocks can be moved by selecting the series, the point, and an optional duration parameter. If specified, duration will animate the movement. Duration is either a number in milliseconds, or the keywords 'fast' or 'slow'. Higher numbers will cause a slower animation.
+ Series:
+ Point:
+ Duration:
+ X:
+ Y:
+
+
+
This second chart is like the first except the "varyBlockColors" renderer option is set to true. This will vary the color of each block in a series separately. This allows displaying a third dimension to the data such as grouping beverage products by producer and by category such as "cola", "tea", "energy drink", etc.
+
+
Also, the legend has it's "showSwathces" option set to false, since the blocks of each series will be of varying color and won't correspond to one swatch color. This still enables the user to show and hide the series by clicking on a label in the legend.
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/breakOnNull.html b/phpgwapi/js/jquery/jqplot/examples/breakOnNull.html
new file mode 100644
index 0000000000..d77bce28d1
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/breakOnNull.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+ Break On Null Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/bubbleChart2.html b/phpgwapi/js/jquery/jqplot/examples/bubbleChart2.html
new file mode 100644
index 0000000000..38f021411b
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/bubbleChart2.html
@@ -0,0 +1,253 @@
+
+
+
+
+
+ Bubble Chart Examples
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Bubble charts represent 3 dimensional data. Data is passed in to a bubble chart as a series of [x, y, radius, <label or object>]. The optional fourth element of the data point can either be either a label string or an object having 'label' and/or 'color' properties to assign to the bubble.
+
+
By default, all bubbles are scaled according to the size of the plot area. The radius value in the data point will be adjusted to fit the bubbles in the chart. If the "autoscaleBubbles" option is set to false, the radius value in the data will be taken as a literal pixel value for the radius of the points.
+
+
The below chart show basic customization of bubble appearance with the "bubbleAlpha" and "highlightAlpha" options.
+
+
+
+
+
+
+
+
+
Company
R Value
+
+
+
+
Below is a basic bubble chart showing usage of the optional label and color properties passed in with the data.
+
+
+
+
+
The next chart uses the "bubbleGradients: true" option to specify gradient fills on the bubbles. Radial gradients are not supported in IE* and will be automatically disabled.
+
+
+
+
*Radial gradients are not supported in IE because they are not supported in the excanvas emulation layer used by jqPlot to render charts in IE. jqPlot renders charts using the HTML canvas element which is supported by nearly every browser except IE. Excanvas translates the canvas rendering to VML rendering for IE, but unfortunately does not properly handle radial gradients.
+
+
+
+
The following bubble chart shows the "autoscalePointsFactor" and "autoscaleMultiplier" options which can be used to control bubble scaling. The "autoscalePointsFactor" options controls bubble scaling with the number of points on the plot. A negative value will decrease bubble size and number of bubbles increases. The "autoscaleMultiplier" will makes all bubbles larger or smaller for values greater or less than 1.0.
+
+
This chart also demonstrates some of the highlighting options. Bubble highlighting is controlled with the "highlightMouseOver" and "highlightMouseDown" boolean options. Here the "highlightMouseDown: true" option is set which causes the plot to highlight on mousedown (click). This automatically sets the "highlightMouseOver" option to false.
+
+
Events are also trigger with plot interaction. Specifically, "jqplotDataHighlight", "jqplotDataUnhighlight", "jqplotDataClick" and "jqplotDataRightClick" events are triggered. Handlers are passed an event object, the series index, the point index, and the bubble data.
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/bubblechart.html b/phpgwapi/js/jquery/jqplot/examples/bubblechart.html
new file mode 100644
index 0000000000..abb8f68aa9
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/bubblechart.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+ Bubble Chart Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/candlestickCanvasOverlay.html b/phpgwapi/js/jquery/jqplot/examples/candlestickCanvasOverlay.html
new file mode 100644
index 0000000000..20dec4cb30
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/candlestickCanvasOverlay.html
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/canvasOverlay.html b/phpgwapi/js/jquery/jqplot/examples/canvasOverlay.html
new file mode 100644
index 0000000000..57689b9811
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/canvasOverlay.html
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+ Bar Charts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/catchError.html b/phpgwapi/js/jquery/jqplot/examples/catchError.html
new file mode 100644
index 0000000000..16303785ed
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/catchError.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/categoryHorizontalBar.html b/phpgwapi/js/jquery/jqplot/examples/categoryHorizontalBar.html
new file mode 100644
index 0000000000..353c924c7a
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/categoryHorizontalBar.html
@@ -0,0 +1,81 @@
+
+
+
+
+ Test 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/categoryVsLinearAxes.html b/phpgwapi/js/jquery/jqplot/examples/categoryVsLinearAxes.html
new file mode 100644
index 0000000000..054ad54011
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/categoryVsLinearAxes.html
@@ -0,0 +1,73 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/chartInTable.html b/phpgwapi/js/jquery/jqplot/examples/chartInTable.html
new file mode 100644
index 0000000000..6e2021eb72
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/chartInTable.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
JSON data formatted according the the City Index API spec can be read in directly by jqPlot thorugh the use of the dataRenderer option and a custom ciParser data renderer. The ciParser data renderer will translate either a JSON encoded string or JSON object.
+
+
To use the the ciParser, include the jqplot.json2.js and jqplot.ciParser.js files. Specify the $.jqplot.ciParser as the renderer in the plot's "dataRenderer" option. The City Index JSON data can then be passed into the jqplot function as shown in the examples below:
+
+
Here, a stringified JSON data objects is passed into the jqplot function.
+
+
+
This example uses the same City Index data format, but passes in a JSON object instead of a string.
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/customHighlighterCursorTrendline.html b/phpgwapi/js/jquery/jqplot/examples/customHighlighterCursorTrendline.html
new file mode 100644
index 0000000000..07a4f630e1
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/customHighlighterCursorTrendline.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/customPieTests.html b/phpgwapi/js/jquery/jqplot/examples/customPieTests.html
new file mode 100644
index 0000000000..6ea6974c42
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/customPieTests.html
@@ -0,0 +1,72 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/dataLabels.html b/phpgwapi/js/jquery/jqplot/examples/dataLabels.html
new file mode 100644
index 0000000000..9effc0edd4
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/dataLabels.html
@@ -0,0 +1,190 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Data labels can be automatically added to pie chart and donut chart slices as well as funnel chart areas. what labels are displayed is controlled by the series "dataLabel" option. There are 4 types of data labels to display:
+
+
"label" - label of the point.
+
"value" - value of the point.
+
"percent" - percent of the whole (pie/donut/funnel) of the point.
+
Array - custom array of data point labels, one for each point.
+
+
+
Formatting of labels is controlled through the series "dataLabelsFormatString" option. By default, the format string will be set based on the label type:
+
+
"label" - '%s', raw string.
+
"value" - '%d', integer format.
+
"percent" - '%d%%', integer with % sign appended.
+
Array - '%s', raw string.
+
+
+
The following examples will clarify usage as well as other options. By default, data labels are turned off. They are enabled by setting the "showDataLabels: true" option. Below is the default configuration for a pie chart:
+
+
+
+
+
+
Notice that no data label was shown for "Insignia". This is because the area of its slice is less than the "dataLabelThreshold" (3% by default). The threshold is applicable no matter what type of label we used. We can change the threshold and the format string for the label in the following example:
+
+
+
+
+
+
Data labels function similarly for funnel and donut plots. Here is a funnel plot with the "dataLabels" option set to display the point label. Note that the label for "Insignia" is not displayed because Insignia represents less than 3% of the overall chart area, which is below the dataLabelThreshold:
+
+
+
+
+
+
The last example shows usage of a custom dataLabels array. Again, labels for small sections will not be displayed unless the "dataLabelThreshold" is reduced (it is set to 3 percent by default).
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/dataRenderer.html b/phpgwapi/js/jquery/jqplot/examples/dataRenderer.html
new file mode 100644
index 0000000000..d3719d8c62
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/dataRenderer.html
@@ -0,0 +1,178 @@
+
+
+
+
+
+ Data Renderers, AJAX and JSON Data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The "dataRenderer" plot options allows you to specify a data preprocessor for your plot. This enables jqPlot to accept data in any arbitrary format (e.g. AJAX data soruces, JSON strings, etc.). Below are some examples illustrating how to use dataRenderers.
+
+
In this simple example, we create a dataRenderer which takes an array of x values and returns an array of [x, sin(x)] value pairs. Data renderers are passes the plot data and a reference to the plot as arguments.
+
+
+
An example of how to use a dataRenderer to fetch data from a server via an AJAX callback. Here the "data" passed into the plot is actually the url of the data source.
+
+
+
This example uses a more complicated dataRenderer that has been encapsulated as a jqplot plugin and loaded separately. This plugin accepts JSON data objects or strings formatted according to the City Index data format and returns jqPlot formatted data. This example uses a JSON encoded string.
+
+
+
This example uses the same City Index data format, but passes in a JSON object instead of a string.
+
+
+
+
There is a third argument passed to the data renderer, dataRendererOptions. It was not used in these examples, but can be set as a separate option on the plot to pass additional arguments into the renderer if needed.
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/dataTracking.html b/phpgwapi/js/jquery/jqplot/examples/dataTracking.html
new file mode 100644
index 0000000000..09fe32d4ef
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/dataTracking.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/donutTest.html b/phpgwapi/js/jquery/jqplot/examples/donutTest.html
new file mode 100644
index 0000000000..8cd0b7be38
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/donutTest.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+ Donut Chart Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To create donut plots, you have to include the "jqplot.donutRenderer.js" file in your source. You can view the javascript that generated these plots by clicking the "View Code" button below.
+
+
+
Below is a default donut plot. Slices will highlight on mouseover. Events are triggered when you mouseover a slice and also when you click on a slice. Here We capture the 'jqplotDataClick' event and display the clicked series index, point index and data values.
+
+
You Clicked: Nothing yet
+
+
+
+
Below is a customized donut plot with 2 series. Renderer options for sliceMargin, innerDiameter, and startAngle have been specified. Here We capture the 'jqplotDataHighlight' event and display the currently highlighted series index, point index and data values.
+
+
The plot target also fires a 'jqplotDataMouseOver' when the cursor is moused over a slice even if highlighting is turned off. This event will fire continuously as the user mouses over the slice. 'jqplotDataHighlight' fires only once when the user first passes over the slice. Additionally, a 'jqplotDataUnhighlight' event is fired when the user moves out of a slice (if highlighting is enabled).
+
+
Moused Over: Nothing
+
+
+
+
The next example has the plot's 'captureRightClick' option set to true. This causes the plot to fire a 'jqplotRightClick' event the the user clicks the right mouse button over a slice. Note, click highlighting is the same for both right and left clicks, although separate events are triggered.
+
+
You Right Clicked: Nothing yet
+
+
+
+
The fourth example shows a plot with no sliceMargin and with the shadow turned on.
+
+
+
+
The last example shows a donut with all of the default colors. Mouse over to see the default highlight colors. Series colors can be specified with the "seriesColors" option on the plot or on the series. The highlight colors are specified with the 'highlightColors' option on the series renderer.
+
+
+
+
A simple line chart is added to test for imcompatabilities.
To create donut plots, you have to include the "jqplot.funnelRenderer.js" file in your source. You can view the javascript that generated these plots by clicking the "View Code" button below.
+
+
+
Below is a default funnel plot. Sections will highlight on mouseover. Events are triggered when you mouseover a section and also when you click on a section. Here We capture the 'jqplotDataClick' event and display the clicked series index, point index and data values.
+
+
You Clicked: Nothing yet
+
+
+
+
Below is a customized funnel plot. Renderer options for sectionMargin and widthRatio have been set. Here We capture the 'jqplotDataHighlight' event and display the currently highlighted series index, point index and data values.
+
+
The plot target also fires a 'jqplotDataMouseOver' when the cursor is moused over a slice even if highlighting is turned off. This event will fire continuously as the user mouses over the slice. 'jqplotDataHighlight' fires only once when the user first passes over the slice. Additionally, a 'jqplotDataUnhighlight' event is fired when the user moves out of a slice (if highlighting is enabled).
+
+
Moused Over: Nothing
+
+
+
+
The next example has the plot's 'captureRightClick' option set to true. This causes the plot to fire a 'jqplotRightClick' event the the user clicks the right mouse button over a slice. Note, click highlighting is the same for both right and left clicks, although separate events are triggered. Here the series 'highlightMouseDown' option is set to true to highlight sections when a mouse down event occurs on them. This automatically disables highlighting on mouseover.
Setting custom gridPadding on charts. The red border indicates the plot target container. By default, the grid will size itself to fit axes, titles, etc. within the plot target. This values will be overridden if a "gridPadding" option is specified.
+
The default computed gridPadding:
+
+
+
Setting all gridPadding to 0 hides the title under the plot:
+
+
+
If a gridPadding member is null or undefined, the default will be used:
+
+
+
Just specify padding on the sides we need, defaults used for others:
Tab 2 and tab 3 contain plots which are initially hidden. Using a combination of alternate sizing specification and the plots "replot" method the plots are properly displayed when their containers are shown.
+
The alternate sizing specifications for setting plot height and width are needed because a hidden element (or child of a hidden element) has no size. The first example in tab 2 uses custom "data-height" and "data-width" attributes on the plot target element to specify height. The second example uses "width" and "height" properties specified on the options object passed into the $.jqplot() function.
+
+
The default size is 300px wide by 400px high. The default setting can be overriden by specifying different values to the $.jqplot.config.defaultHeight and $.jqplot.config.defaultWidth properties. Height and width values are taken in this order of prececence:
+
+
+
The css properties if available and plot is not hidden with display:none.
+
Options object passed into the $.jqplot() function.
+
Custom data-height and data-width attributes on the plot target.
+
The config defaults.
+
+
+
Here is how the replot method can be used to bind to the "tabsshow" event of the UI tabs:
The ui.index property is the index of the tab that was shown.
+
+
+
+
This plot was in an initially hidden container. It's hieght and width are set by the "data-height" and "data-width" properties of the plot container.
+
+
+
+
+
This plot is in an initially hidden container. It's height and width are set by the 'height' and 'width' properties of the options object passed into the plot constructor.
Secion 2 contains a plot. Sizing plots in hidden accordion sections is very similar to sizing in a tab widget. Because of the default animation on accordions, however, the plot will not draw itself until the entire accordion panel is shown.
+
+
Binidng to the accordion "accordionchange" event is also similar as with tabs:
+
+
+ $('#accordion').bind('accordionchange', function(event, ui) {
+ var index = $(this).find("h3").index ( ui.newHeader[0] );
+ if (index == 1) {
+ plot3.replot();
+ }
+ });
+
+ This plot also has it's height and width set with the data-height and data-width attributes. Note, if you want the accordian widget to properly size itself before the plot is shown, you must also specify a css height and width on the plot target.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/highlighter.html b/phpgwapi/js/jquery/jqplot/examples/highlighter.html
new file mode 100644
index 0000000000..2258ca7f08
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/highlighter.html
@@ -0,0 +1,94 @@
+
+
+
+
+
+ Highlighter Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/highlighter2.html b/phpgwapi/js/jquery/jqplot/examples/highlighter2.html
new file mode 100644
index 0000000000..174b00c81d
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/highlighter2.html
@@ -0,0 +1,62 @@
+
+
+
+
+
+ Highlighter Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This page demonstrates creating your own custom highlighter by attaching a callback to the 'jqplotMouseMove' event.
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/highlighter3.html b/phpgwapi/js/jquery/jqplot/examples/highlighter3.html
new file mode 100644
index 0000000000..806b5dc517
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/highlighter3.html
@@ -0,0 +1,94 @@
+
+
+
+
+
+ Highlighter Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/horizontalLine.html b/phpgwapi/js/jquery/jqplot/examples/horizontalLine.html
new file mode 100644
index 0000000000..c828b206f2
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/horizontalLine.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+ Horizontal Line (const. y values)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/intticks.html b/phpgwapi/js/jquery/jqplot/examples/intticks.html
new file mode 100644
index 0000000000..ae5a6cfb6f
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/intticks.html
@@ -0,0 +1,178 @@
+
+
+
+
+
+ Enhanced Tick Algorithm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Tests of enhancements to axis tick generation algorithm. Axis now checks to see if the tick interval (delta between ticks) is less than the precision of the tick format string. If it is, it will try to increase the tick interval, number of ticks or change the axis minimum or maximum so that it is at least as great as the tick label precision.
+
+
Note, if the user has specified the axis tickInterval, numberTicks, min or max options, the algorithm may not be able to produce the desired ticks.
+
+
This helps in situations where the user wants to display ticks formatted as integer values on a plot with a very small range. For example, a plot with a y axis range from 0 to 2 and 6 ticks will have a tickInterval of 0.4 and ticks like [0, 0.4, 0.8, 1.2, 1.6, 2]. When formatted as integers, the plot displays ticks like [0, 0, 1, 1, 2, 2]. The new algorithm will try to adjust the number of ticks or the axis minimum or maximum to generate ticks like [0, 1, 2].
The following charts demonstrate some options of the EnhancedLegendRendrer. Some of the enhancements are:
+
+
Control of number of rows and/or columns.
+
Clickable swatches and labels to toggle series on/off.
+
Placement of legend inside or outside of the plot (this has since been added to the default legend functionality).
+
Ability to hide legend swatches and or labels.
+
+
+
The first plot has legend labels in 3 columns. They are clickable.
+
+
+
+
+
+
The second chart has legend labels in 2 columns placed outside of the plot. The showLabels option is false, but the labels are still clickable.
+
The legend renderer's "seriesToggle" option has been set to 900 to produce a slow, 900 ms fade. You can set this to a number or to 'fast', 'normal' or 'slow'.
+
Also, the disableIEFading option is set to false to allow fading on IE (as opposed to simple show/hide). In IE, series will be toggled with a show()/hide() method by default as opposed to fadeIn()/fadeOut() because of poor performance on some machines.
+
+
+
+
+
The third plot has legend labels in 1 row outside and below the chart area. The showSwatches option is false, but the labels are still clickable.
+
+
+
+
+
The fourth chart is a pie plot. Pie plots use their own legend renderer, since a pie plot is only 1 series. The pie legend renderer has also been updated to handle custom rows/columns, although it is not clickable.
This example demonstrates how to use the legend "location: 'outsideGrid'" option. This option will place the legend outside of the grid but inside of the plot target. It will shrink the grid to accommodate the plot target. Borders have been added to the plot target container elements to clarify how the legend is drawn in each case.
Data is specified per bar in the chart. You can specify data as an array of y values, or as an array of [label, value] pairs. Note that labels are used only on the first series. Labels on subsequent series are ignored:
If you want to place labels for each bar under the axis, you use the barLabels option on the axes. The bar labels can be styled with the ".jqplot-mekko-barLabel" css class.
You can add a secondary x axes, and the tick spacing of the axes can be separately controlled with the "tickMode" option. "bar" will produce tics at bar boundaries, "even" will produce evenly spaced ticks. If you set the axes max greater than the sum of the data range (the maximum x value), the plot will be padded. Note that you should set the max on both axes to the same value.
Additionally, the legend can be placed "outside" (the default for a mekko chart) or "inside" of the grid area with the "placement" option on the legend renderer.
Legend labels can be specified independently of the series with the "labels" option on the legend. These will override any labels specified with the series. There are also options to control the number of rows and number of columns in the legend as well as placement.
+
+
Here the legend is positioned to the "north" and set to render 1 row tall (number of columns determined automatically). Note that an extra css specification was added to pad the bottom of the title of this chart to give room for the legend above the plot.
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/meterGauge.html b/phpgwapi/js/jquery/jqplot/examples/meterGauge.html
new file mode 100644
index 0000000000..74d4242b57
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/meterGauge.html
@@ -0,0 +1,132 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A meter gauge plot shows a data value in a speedometer style gauge. The "series" in consists of a single data value that positions the needle on the gauge. The span of the gauge will be automatically determined, or can be set with the "min" and "max" values in the "rendererOptions" of the series. The plot below also specifies a chart title and a "label" for the gauge.
+
+
+
+
For small gauges, it can be desirable to turn off the tick labels by setting the "showTickLabels" option in the rendererOptions to false. Also, colored interval bands can be specified. The interval ranges are specified as an array of values the "intervals" option and custom colors for each interval can be specified with the "intervalColors" option.
+
+
+
+
The inner and outer radii of the interval band will automatically adjust when tick Labels are turned on. Also, the gauge minimum and maximum can be specified with the "min" and "max" options in the rendererOptions.
+
+
+
+
The inner and outer radii of the interval band can also be specified with the "intervalInnerRadius" and "intervalOuterRadius" options. In the plot below, the "labelPosition" option was set to "bottom" to put the gauge label below the plot. The "labelHeightAdjust" option was set to -5 to raise the label slightly (5 pixels) to place it closer to the gauge.
+
The gauge automatically resizes to best fit the container. The font size of the tick labels and gauge labels do not size to the container, however. The font size of the tick labels can be controlled by styling the css ".jqplot-meterGauge-ticks" class and the gauge label by the "jqplot-meterGauge-label" class.
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/meterGauge2.html b/phpgwapi/js/jquery/jqplot/examples/meterGauge2.html
new file mode 100644
index 0000000000..db0e9f70bb
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/meterGauge2.html
@@ -0,0 +1,159 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/minMaxLines.html b/phpgwapi/js/jquery/jqplot/examples/minMaxLines.html
new file mode 100644
index 0000000000..c16de06d31
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/minMaxLines.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+ Horizontal Bar with Vertical lines Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/missingValues.html b/phpgwapi/js/jquery/jqplot/examples/missingValues.html
new file mode 100644
index 0000000000..e8eb76c7e3
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/missingValues.html
@@ -0,0 +1,119 @@
+
+
+
+
+
+ Null Value Handling
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/multiAxesRotatedText.html b/phpgwapi/js/jquery/jqplot/examples/multiAxesRotatedText.html
new file mode 100644
index 0000000000..8c83f8749b
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/multiAxesRotatedText.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+ untitled
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/phpgwapi/js/jquery/jqplot/examples/multipleBarColors.html b/phpgwapi/js/jquery/jqplot/examples/multipleBarColors.html
new file mode 100644
index 0000000000..6965d9206b
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/multipleBarColors.html
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Individual bars can now have different colors. This is achieved by setting the "varyBarColor" option to true in the series rendererOptions. The default is to assign each bar a different color from the default "seriesColors" array. You can customize the seriesColors array to assign whatever colors you like to the bars.
+
+
+
+
Bars and filled series are colored differently for positive and negative values by default. Negative values will be a slightly darker and less saturated than their positive counterparts for visual effect. This applies to only bar and filled line charts by default.
+
+
+
+
If you want to use only the colors defined in the "seriesColors" array and not colors from the "negativeSeriesColors" array, set the "useNegativeColors" option to false. This way negative values and positive values will pull their colors from the same color array.
+
+
Note that there are only 16 colors defined in the default color arrays. Color arrays will cylcle through colors continuously when the last color is used.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/multipleLines.html b/phpgwapi/js/jquery/jqplot/examples/multipleLines.html
new file mode 100644
index 0000000000..f5d8950f89
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/multipleLines.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+ Multiple lines Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/multipleYAxes.html b/phpgwapi/js/jquery/jqplot/examples/multipleYAxes.html
new file mode 100644
index 0000000000..639c23d0fa
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/multipleYAxes.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/nav.inc b/phpgwapi/js/jquery/jqplot/examples/nav.inc
new file mode 100644
index 0000000000..b41d92c662
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/nav.inc
@@ -0,0 +1,35 @@
+
This page tests for 3 conditions. Plotting pies with a slice that begins at 0 and ends at and near 2*pi (360 degrees), disabling the trendline plugin on pies, and plotting a pie that has a 0 value (or a very small value relative to other values) in the data set.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/pieTest2.html b/phpgwapi/js/jquery/jqplot/examples/pieTest2.html
new file mode 100644
index 0000000000..7cd0f10e24
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/pieTest2.html
@@ -0,0 +1,166 @@
+
+
+
+
+
+ Pie Chart Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To create pie plots, you have to include the "jqplot.pieRenderer.js" file in your source.
+
+
Below is a default pie plot. Slices will highlight on mouseover. Events are triggered when you mouseover a slice and also when you click on a slice. Here We capture the 'jqplotDataClick' event and display the clicked series index, point index and data values.
+
+
You Clicked: Nothing yet
+
+
+
+
Below is a customized customized pie plot where options for sliceMargin and startAngle have been specified. Here We capture the 'jqplotDataHighlight' event and display the currently highlighted series index, point index and data values.
+
+
The plot target also fires a 'jqplotDataMouseOver' when the cursor is moused over a slice even if highlighting is turned off. This event will fire continuously as the user mouses over the slice. 'jqplotDataHighlight' fires only once when the user first passes over the slice. Additionally, a 'jqplotDataUnhighlight' event is fired when the user moves out of a slice (if highlighting is enabled).
+
+
Moused Over: Nothing
+
+
+
+
The next example has the plot's 'captureRightClick' option set to true. This causes the plot to fire a 'jqplotRightClick' event the the user clicks the right mouse button over a slice.
+
+
The 'highlightMouseDown' option is also set to true. This will highlight a slice on mouse down instead of on move over. Highlighting will occur for either left or right click.
+
+
You Right Clicked: Nothing yet
+
+
+
+
The last example shows a pie with all of the default colors. Mouse over to see the default highlight colors. Series colors can be specified with the "seriesColors" option on the plot. The highlight colors are specified with the 'highlightColors' option on the series renderer.
+
+
+
+
A simple line chart is added to test for imcompatabilities.
Click and drag to zoom. Double click on plot or click "Reset Zoom" button to reset zoom.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/pointLabels2.html b/phpgwapi/js/jquery/jqplot/examples/pointLabels2.html
new file mode 100644
index 0000000000..9f96712f24
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/pointLabels2.html
@@ -0,0 +1,47 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/prefix.html b/phpgwapi/js/jquery/jqplot/examples/prefix.html
new file mode 100644
index 0000000000..1944983259
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/prefix.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+ Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Example of the "prefix" axis tick option. This option adds a prefix to the tick label if and only if no formatString option is specified.
+
+
+
+
A new configuration option, $.jqplot.config.defaultTickFormatString, has been added as well. When no user formatString is specified, linear axes previously used a hard coded '%.1f' default format string. The config option controls this default format string. This allows an alternative way to format tick labels, with or without a prefix, if no formatString option is specified.
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/resetAxisTicks.html b/phpgwapi/js/jquery/jqplot/examples/resetAxisTicks.html
new file mode 100644
index 0000000000..a185268680
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/resetAxisTicks.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+ Single Negative Point
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/resizablePlot.html b/phpgwapi/js/jquery/jqplot/examples/resizablePlot.html
new file mode 100644
index 0000000000..71358bbb96
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/resizablePlot.html
@@ -0,0 +1,148 @@
+
+
+
+
+
+ Plots in Hidden Containers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Plot targets can be placed inside of resizable containers for dynamic plot sizing. The examples here use the jQuery UI package for resizing functionality.
+
+
+
+
+
+
+
+
+
+
The first plot has good resize performance in Firefox, Safari and other canvas enabled browsers. The plot will resize dynamically with the container. IE performance will be slow since IE doesn't natively support the canvas element.
+
+
Resizing is handled by binding a handler to the 'resize' event. The handler function replots the plot during resize. Here, the plot targets's height and width must be specified as a percentage of the container and the container must be visible.
The second plot uses an alternative sizing method that is more responsive in all browsers, especially IE. The differnece? First, the plot target is given a static height and width that will fit inside the resizable container. Then, instead of resizing dynamically with the container, the plots replot() method is called at the end of the resize. When resizing is done, the plot targets hieght and width are set to a percentage of the container's and then the replot method is called.
+
+
Also, an options object is passed into the replot method. It contains a single option, resetAxes, which, if true, resets all axes so the min, max, numberTicks and tickInterval are recalculated.
Plot targets can be placed inside of resizable containers for dynamic plot sizing. The examples here use the jQuery UI package for resizing functionality.
+
+
+
+
+
+
+
+
+
+
The first plot has good resize performance in Firefox, Safari and other canvas enabled browsers. The plot will resize dynamically with the container. IE performance will be slow since IE doesn't natively support the canvas element.
+
+
Resizing is handled by binding a handler to the 'resize' event. The handler function replots the plot during resize. Here, the plot targets's height and width must be specified as a percentage of the container and the container must be visible.
The second plot uses an alternative sizing method that is more responsive in all browsers, especially IE. The differnece? First, the plot target is given a static height and width that will fit inside the resizable container. Then, instead of resizing dynamically with the container, the plots replot() method is called at the end of the resize. When resizing is done, the plot targets hieght and width are set to a percentage of the container's and then the replot method is called.
+
+
Also, an options object is passed into the replot method. It contains a single option, resetAxes, which, if true, resets all axes so the min, max, numberTicks and tickInterval are recalculated.
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/rotatedTickLabels.html b/phpgwapi/js/jquery/jqplot/examples/rotatedTickLabels.html
new file mode 100644
index 0000000000..abdb55dcc3
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/rotatedTickLabels.html
@@ -0,0 +1,61 @@
+
+
+
+
+ jqPlot Test 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/rotatedTickLabelsZoom.html b/phpgwapi/js/jquery/jqplot/examples/rotatedTickLabelsZoom.html
new file mode 100644
index 0000000000..68c3c723ef
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/rotatedTickLabelsZoom.html
@@ -0,0 +1,68 @@
+
+
+
+
+ jqPlot Test 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/seriesCanvasReorder.html b/phpgwapi/js/jquery/jqplot/examples/seriesCanvasReorder.html
new file mode 100644
index 0000000000..1e19eab15b
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/seriesCanvasReorder.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
When lines overlap each other it can be difficult to tell what is going on with the series below the top. The highlighter plugin, the enhancedLegendRenderer plugin and special methods of plot help with this situation.
+
+
The highlighter plugin has been enhanced with a "bringSeriesToFront" option which will bring the series of the highlighted point to the front when a data point is highlighted. Note, however, when highlighting a point which coincides with multiple series, highlighter will detect this as the top most series and no highlighting effect will be noticed.
+
+
The enhancedLegendRenderer plugin enabled clickable legend labels which will show/hide series. This functionality can be disabled by setting the "seriesToggle" option on the legend renderer to false. You can also change the fade duration of the series by setting the seriesToggle option to a millisecond value like 450, or the 'slow' or 'fast' keywords.
+
+
On IE, series are simple toggled without the fading. This avoids some erratic behaviour with fading elements on IE. IE fading can be re-enabled be setting the disableIEFading option to false.
+
+
The plot object has 4 methods which can bring a series forward or push it backward on the stack. Click the buttons below to bring individual series to the front. The "Last Order" button will toggle the current series order with the last displayed series order. The "Original" button will reset the series to display in the order when the plot was created.
moveSeriesToBack is not demonstrated here, but is available.
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/seriesUpdate.html b/phpgwapi/js/jquery/jqplot/examples/seriesUpdate.html
new file mode 100644
index 0000000000..6258505a14
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/seriesUpdate.html
@@ -0,0 +1,122 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This example demonstrates how to update a point in a series and then redraw just that series. You can select a series, a point and change it's x and y value with the form below the chart.
+
+
+
+
+
+
The mechanism to update data in a series and then redraw the series is simple. update the data in the "plot.series[seriesIndex].data[dataIndex]" and then redraw just that series with "plot.drawSeries(options, seriesIndex);" Here is the relavent code which updates the series on this chart:
+
+
+ var f = document.forms[0];
+ var seriesIndex = f.seriesId.selectedIndex;
+ var series = plot1.series[seriesIndex];
+ var data = series.data[f.pointId.selectedIndex];
+ var xval = parseFloat(f.xvalue.value);
+ var yval = parseFloat(f.yvalue.value);
+ data[0] = xval;
+ data[1] = yval;
+ plot1.drawSeries({}, seriesIndex);
+
+
+
You can also update an entire series dataset at once and redraw the series like so:
You can test this by clicking the button below. You should see the entire "bears" line drop lower on the chart.
+
+
+
+
Note that the redrawSeries method does not do any axes scaling or redraw any other elements on the chart. It is intended to be a lightweight method to redraw just one series. Also note, if no series Index is passed in as the second parameter to drawSeries, it will redraw all series without rescaling or redrawing other plot elements.
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/shadowTests.html b/phpgwapi/js/jquery/jqplot/examples/shadowTests.html
new file mode 100644
index 0000000000..f3dda7cd2a
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/shadowTests.html
@@ -0,0 +1,132 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/singlePoint.html b/phpgwapi/js/jquery/jqplot/examples/singlePoint.html
new file mode 100644
index 0000000000..9eef5010b0
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/singlePoint.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+ Single Negative Point
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/sparkLine.html b/phpgwapi/js/jquery/jqplot/examples/sparkLine.html
new file mode 100644
index 0000000000..5b900c2fa3
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/sparkLine.html
@@ -0,0 +1,47 @@
+
+
+
+
+
+ Sparkline Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/stackedBar2.html b/phpgwapi/js/jquery/jqplot/examples/stackedBar2.html
new file mode 100644
index 0000000000..ef211d69a8
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/stackedBar2.html
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/stackedBar3.html b/phpgwapi/js/jquery/jqplot/examples/stackedBar3.html
new file mode 100644
index 0000000000..00c3b0603b
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/stackedBar3.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/stackedBarCategoryVsLinearAxes.html b/phpgwapi/js/jquery/jqplot/examples/stackedBarCategoryVsLinearAxes.html
new file mode 100644
index 0000000000..3a6aae2d64
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/stackedBarCategoryVsLinearAxes.html
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/stackedCategoryAxis.html b/phpgwapi/js/jquery/jqplot/examples/stackedCategoryAxis.html
new file mode 100644
index 0000000000..2c1e7b86c1
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/stackedCategoryAxis.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/stackedFilledLine.html b/phpgwapi/js/jquery/jqplot/examples/stackedFilledLine.html
new file mode 100644
index 0000000000..a38124af91
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/stackedFilledLine.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/stackedLine.html b/phpgwapi/js/jquery/jqplot/examples/stackedLine.html
new file mode 100644
index 0000000000..e6d94f5e5c
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/stackedLine.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/test2.html b/phpgwapi/js/jquery/jqplot/examples/test2.html
new file mode 100644
index 0000000000..7ca904df4d
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/test2.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/theming.html b/phpgwapi/js/jquery/jqplot/examples/theming.html
new file mode 100644
index 0000000000..368fa02f4c
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/theming.html
@@ -0,0 +1,481 @@
+
+
+
+
+
+ Theming Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
jqPlot has basic theming support for commonly styled atributes of plot elements. Upon creation, each plot will have a "themeEngine" that controls modificaition, adding, removing and activating of plot themes. In addition, each plot will have a "Default" theme which corresponds to the styling of the plot at plot creation.
+
+
Creation of new themes is easy. A "style" object is created with properties for the various plot elements to be styles. Attached to each of those is an ojbect with the actual styling properties. A simple style object might look like:
Themes can be reused between plots. Here a style object is created and assigned to two different plots. For convenience, the theme is given the same name when added to each plot's themeEngine. Since each plot keeps it's own copy of the theme, the names do not need to be the same. Also note that themes are added as deep copies by value and not by reference. This avoids strange behavior due to the cascading nature of css related styles.
Select Theme for funnel and pie charts at same time:
+
+
+
+
+
+
Select Theme for funnel plot:
+
+
+
+
+
+
Select Theme for pie chart:
+
+
+
+
There are various was to create and edit themes for a plot. Below are two different methods for creating additional themes for a line plot and adding them to the plots themeEngine. Here the axesStyles property is used to supply styling to all axes at one time. A similar property, seriesStyles, exists for styling all series of a plot at one time. Note, neither of these methods is as straightforward as using the newTheme() method of the plots themeEngine, but are included for illustrative purposes.
The example below shows more extensive use of the various styling options to give the chart a rather ugly and dated appearence. Note that, for bar (and funnel, pie and donut charts), highlightColors can be specified as an array of colors which will be applied to each bar individually, as a single string giving a color to apply to all bars, or as an empty array which will force jqPlot to auto calculate highlight colors based on the current bar color.
This page demonstrates placing plots within jQuery UI widgets. Tab 2 and tab 3 contain plots. Using a combination of alternate sizing specification and the jqplot "replot" method the plots are properly displayed when their containers are shown.
+
+
The alternate sizing specifications for setting plot height and width are needed because a hidden element (or child of a hidden element) has no size. The first example in tab 2 uses custom "data-height" and "data-width" attributes on the plot target element. The second example uses "width" and "height" properties specified on the options object passed into the $.jqplot() function.
+
+
The default plot size is 300px wide by 400px high. The default setting can be overridden by specifying different values to the $.jqplot.config.defaultHeight and $.jqplot.config.defaultWidth properties. Height and width values are taken in this order of precedence:
+
+
+
+
The css properties of the plot target if available (not available with display:none;).
+
Options object passed into the $.jqplot() function.
+
Custom data-height and data-width attributes on the plot target.
+ Tabs 2 and 3 have plots. Since tabs 2 and 3 are initially inactive, their contents (and the plots) are initially hidden.
+
+
+
+
This plot was in an initially hidden container. It's hieght and width are set by the "data-height" and "data-width" properties of the plot container.
+
+
+
+
+
This plot is in an initially hidden container. It's height and width are set by the 'height' and 'width' properties of the options object passed into the plot constructor.
+
+
+
+
+
+
In the accordion below, section 2 contains a plot. Sizing plots in hidden accordion sections is very similar to sizing in a tab widget. Because of the default animation on accordions, however, the plot will not draw itself until the entire accordion panel is shown.
+ This plot also has it's height and width set with the data-height and data-width attributes. Note, if you want the accordion widget to properly size itself before the plot is shown, you must also specify a css height and width on the plot target.
+
+
+
+
+
+
+
Code for generating the plots follows. It is critical to bind the callback to the UI widgets "show" or "change" method which calls the plots "replot" method. Without this, the plot won't properly redraw itself when it's container becomes visible.
+
+
+ Note in the ui.index and plot._drawCount properties in the tabsshow callback. ui.index gives the index of the activated tab. plot._drawCount keeps track of how many times the plot was visibly drawn (or redrawn/replotted). Generally, replot only needs to be called the first time the plot is visibly drawn, hence the check for plot._drawCount == 0.
+
Waterfall chart using custom colors and "useNegativeColors" set to "false".
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/waterfall2.html b/phpgwapi/js/jquery/jqplot/examples/waterfall2.html
new file mode 100644
index 0000000000..ea494dcef4
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/waterfall2.html
@@ -0,0 +1,204 @@
+
+
+
+
+
+ Waterfall Chart
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/zoom1.html b/phpgwapi/js/jquery/jqplot/examples/zoom1.html
new file mode 100644
index 0000000000..dcbc586b35
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/zoom1.html
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/zoom2.html b/phpgwapi/js/jquery/jqplot/examples/zoom2.html
new file mode 100644
index 0000000000..45e92f3598
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/zoom2.html
@@ -0,0 +1,71 @@
+
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/zoom3.html b/phpgwapi/js/jquery/jqplot/examples/zoom3.html
new file mode 100644
index 0000000000..17bf46674b
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/zoom3.html
@@ -0,0 +1,67 @@
+
+
+
+
+ Zoom plugin with multiple Y Axes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Click and drag to zoom. Double click on plot or click "Reset Zoom" button to reset zoom.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/zoom4.html b/phpgwapi/js/jquery/jqplot/examples/zoom4.html
new file mode 100644
index 0000000000..8880300c44
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/zoom4.html
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/zoomOptions.html b/phpgwapi/js/jquery/jqplot/examples/zoomOptions.html
new file mode 100644
index 0000000000..42177d6b00
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/zoomOptions.html
@@ -0,0 +1,99 @@
+
+
+
+
+ Simple Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Zooming has been enhanced to maintain plot zoom while the mouse moves over the entire document, not just the plot. Two new options have been added to the cursor plugin to further enhance zooming:
+
+
+
constrainOutsideZoom
+
True to limit the resulting zoom area to the edges of grid, even if the cursor is outside of the grid. That is, you can't expand the axis ranges by moving the cursor outside of the plot area when this is true. If set to false, you can effectively zoom out by mousing outside of the plot region. Default false.
+
showTooltipOutsideZoom
+
True to keep showing and updating the tooltip even when the cursor is outside of the plot area. Not applicable if zoomOutsidePlot is false. Default false
+
+
+
The fist plot demonstrates the default functionality where you can move the mouse off of the plot while zooming but the actual area zoomed will not extend beyond the axes.
+
+
+
+
The second plot sets constrainOutsideZoom to false, so zooming will not only function when the mouse is outside of the plot, but the zoom range will be extended to the mouse position outside of the grid.
+
+
+
+
The third plot is like the third, but showTooltipOutsideZoom is true and the tooltip is set to follow the mouse, so you have an idea of what your range is while zooming.
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/examples/zoomProxy.html b/phpgwapi/js/jquery/jqplot/examples/zoomProxy.html
new file mode 100644
index 0000000000..e0faa551e4
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/examples/zoomProxy.html
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/excanvas.js b/phpgwapi/js/jquery/jqplot/excanvas.js
new file mode 100644
index 0000000000..f3b70f470d
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/excanvas.js
@@ -0,0 +1,1434 @@
+// Memory Leaks patch from http://explorercanvas.googlecode.com/svn/trunk/
+// svn : r73
+// ------------------------------------------------------------------
+// Copyright 2006 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+// Known Issues:
+//
+// * Patterns only support repeat.
+// * Radial gradient are not implemented. The VML version of these look very
+// different from the canvas one.
+// * Clipping paths are not implemented.
+// * Coordsize. The width and height attribute have higher priority than the
+// width and height style values which isn't correct.
+// * Painting mode isn't implemented.
+// * Canvas width/height should is using content-box by default. IE in
+// Quirks mode will draw the canvas using border-box. Either change your
+// doctype to HTML5
+// (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype)
+// or use Box Sizing Behavior from WebFX
+// (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html)
+// * Non uniform scaling does not correctly scale strokes.
+// * Optimize. There is always room for speed improvements.
+
+// Only add this code if we do not already have a canvas implementation
+if (!document.createElement('canvas').getContext) {
+
+(function() {
+
+ // alias some functions to make (compiled) code shorter
+ var m = Math;
+ var mr = m.round;
+ var ms = m.sin;
+ var mc = m.cos;
+ var abs = m.abs;
+ var sqrt = m.sqrt;
+
+ // this is used for sub pixel precision
+ var Z = 10;
+ var Z2 = Z / 2;
+
+ var IE_VERSION = +navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];
+
+ /**
+ * This funtion is assigned to the
+ *
+ *
jsDate takes a different approach by not extending the built-in
+ * Date Object, improving date parsing, allowing for multiple formatting
+ * syntaxes and multiple and more easily expandable localization.
+ *
+ * @author Chris Leonello
+ * @date #date#
+ * @version #VERSION#
+ * @copyright (c) 2010 Chris Leonello
+ * jsDate is currently available for use in all personal or commercial projects
+ * under both the MIT and GPL version 2.0 licenses. This means that you can
+ * choose the license that best suits your project and use it accordingly.
+ *
+ *
Ken's origianl Date Instance Methods and copyright notice:
+ *
+ * Ken Snyder (ken d snyder at gmail dot com)
+ * 2008-09-10
+ * version 2.0.2 (http://kendsnyder.com/sandbox/date/)
+ * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/)
+ *
+ *
+ * @class
+ * @name jsDate
+ * @param {String | Number | Array | Date Object | Options Object} arguments Optional arguments, either a parsable date/time string,
+ * a JavaScript timestamp, an array of numbers of form [year, month, day, hours, minutes, seconds, milliseconds],
+ * a Date object, or an options object of form {syntax: "perl", date:some Date} where all options are optional.
+ */
+
+ var jsDate = function () {
+
+ this.syntax = jsDate.config.syntax;
+ this._type = "jsDate";
+ this.utcOffset = new Date().getTimezoneOffset * 60000;
+ this.proxy = new Date();
+ this.options = {};
+ this.locale = jsDate.regional.getLocale();
+ this.formatString = '';
+ this.defaultCentury = jsDate.config.defaultCentury;
+
+ switch ( arguments.length ) {
+ case 0:
+ break;
+ case 1:
+ // other objects either won't have a _type property or,
+ // if they do, it shouldn't be set to "jsDate", so
+ // assume it is an options argument.
+ if (get_type(arguments[0]) == "[object Object]" && arguments[0]._type != "jsDate") {
+ var opts = this.options = arguments[0];
+ this.syntax = opts.syntax || this.syntax;
+ this.defaultCentury = opts.defaultCentury || this.defaultCentury;
+ this.proxy = jsDate.createDate(opts.date);
+ }
+ else {
+ this.proxy = jsDate.createDate(arguments[0]);
+ }
+ break;
+ default:
+ var a = [];
+ for ( var i=0; i 0 ? 'floor' : 'ceil'](unitDiff));
+ };
+
+ /**
+ * Get the abbreviated name of the current week day
+ *
+ * @returns {String}
+ */
+
+ jsDate.prototype.getAbbrDayName = function() {
+ return jsDate.regional[this.locale]["dayNamesShort"][this.proxy.getDay()];
+ };
+
+ /**
+ * Get the abbreviated name of the current month
+ *
+ * @returns {String}
+ */
+
+ jsDate.prototype.getAbbrMonthName = function() {
+ return jsDate.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()];
+ };
+
+ /**
+ * Get UPPER CASE AM or PM for the current time
+ *
+ * @returns {String}
+ */
+
+ jsDate.prototype.getAMPM = function() {
+ return this.proxy.getHours() >= 12 ? 'PM' : 'AM';
+ };
+
+ /**
+ * Get lower case am or pm for the current time
+ *
+ * @returns {String}
+ */
+
+ jsDate.prototype.getAmPm = function() {
+ return this.proxy.getHours() >= 12 ? 'pm' : 'am';
+ };
+
+ /**
+ * Get the century (19 for 20th Century)
+ *
+ * @returns {Integer} Century (19 for 20th century).
+ */
+ jsDate.prototype.getCentury = function() {
+ return parseInt(this.proxy.getFullYear()/100, 10);
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getDate = function() {
+ return this.proxy.getDate();
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getDay = function() {
+ return this.proxy.getDay();
+ };
+
+ /**
+ * Get the Day of week 1 (Monday) thru 7 (Sunday)
+ *
+ * @returns {Integer} Day of week 1 (Monday) thru 7 (Sunday)
+ */
+ jsDate.prototype.getDayOfWeek = function() {
+ var dow = this.proxy.getDay();
+ return dow===0?7:dow;
+ };
+
+ /**
+ * Get the day of the year
+ *
+ * @returns {Integer} 1 - 366, day of the year
+ */
+ jsDate.prototype.getDayOfYear = function() {
+ var d = this.proxy;
+ var ms = d - new Date('' + d.getFullYear() + '/1/1 GMT');
+ ms += d.getTimezoneOffset()*60000;
+ d = null;
+ return parseInt(ms/60000/60/24, 10)+1;
+ };
+
+ /**
+ * Get the name of the current week day
+ *
+ * @returns {String}
+ */
+
+ jsDate.prototype.getDayName = function() {
+ return jsDate.regional[this.locale]["dayNames"][this.proxy.getDay()];
+ };
+
+ /**
+ * Get the week number of the given year, starting with the first Sunday as the first week
+ * @returns {Integer} Week number (13 for the 13th full week of the year).
+ */
+ jsDate.prototype.getFullWeekOfYear = function() {
+ var d = this.proxy;
+ var doy = this.getDayOfYear();
+ var rdow = 6-d.getDay();
+ var woy = parseInt((doy+rdow)/7, 10);
+ return woy;
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getFullYear = function() {
+ return this.proxy.getFullYear();
+ };
+
+ /**
+ * Get the GMT offset in hours and minutes (e.g. +06:30)
+ *
+ * @returns {String}
+ */
+
+ jsDate.prototype.getGmtOffset = function() {
+ // divide the minutes offset by 60
+ var hours = this.proxy.getTimezoneOffset() / 60;
+ // decide if we are ahead of or behind GMT
+ var prefix = hours < 0 ? '+' : '-';
+ // remove the negative sign if any
+ hours = Math.abs(hours);
+ // add the +/- to the padded number of hours to : to the padded minutes
+ return prefix + addZeros(Math.floor(hours), 2) + ':' + addZeros((hours % 1) * 60, 2);
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getHours = function() {
+ return this.proxy.getHours();
+ };
+
+ /**
+ * Get the current hour on a 12-hour scheme
+ *
+ * @returns {Integer}
+ */
+
+ jsDate.prototype.getHours12 = function() {
+ var hours = this.proxy.getHours();
+ return hours > 12 ? hours - 12 : (hours == 0 ? 12 : hours);
+ };
+
+
+ jsDate.prototype.getIsoWeek = function() {
+ var d = this.proxy;
+ var woy = d.getWeekOfYear();
+ var dow1_1 = (new Date('' + d.getFullYear() + '/1/1')).getDay();
+ // First week is 01 and not 00 as in the case of %U and %W,
+ // so we add 1 to the final result except if day 1 of the year
+ // is a Monday (then %W returns 01).
+ // We also need to subtract 1 if the day 1 of the year is
+ // Friday-Sunday, so the resulting equation becomes:
+ var idow = woy + (dow1_1 > 4 || dow1_1 <= 1 ? 0 : 1);
+ if(idow == 53 && (new Date('' + d.getFullYear() + '/12/31')).getDay() < 4)
+ {
+ idow = 1;
+ }
+ else if(idow === 0)
+ {
+ d = new jsDate(new Date('' + (d.getFullYear()-1) + '/12/31'));
+ idow = d.getIsoWeek();
+ }
+ d = null;
+ return idow;
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getMilliseconds = function() {
+ return this.proxy.getMilliseconds();
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getMinutes = function() {
+ return this.proxy.getMinutes();
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getMonth = function() {
+ return this.proxy.getMonth();
+ };
+
+ /**
+ * Get the name of the current month
+ *
+ * @returns {String}
+ */
+
+ jsDate.prototype.getMonthName = function() {
+ return jsDate.regional[this.locale]["monthNames"][this.proxy.getMonth()];
+ };
+
+ /**
+ * Get the number of the current month, 1-12
+ *
+ * @returns {Integer}
+ */
+
+ jsDate.prototype.getMonthNumber = function() {
+ return this.proxy.getMonth() + 1;
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getSeconds = function() {
+ return this.proxy.getSeconds();
+ };
+
+ /**
+ * Return a proper two-digit year integer
+ *
+ * @returns {Integer}
+ */
+
+ jsDate.prototype.getShortYear = function() {
+ return this.proxy.getYear() % 100;
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getTime = function() {
+ return this.proxy.getTime();
+ };
+
+ /**
+ * Get the timezone abbreviation
+ *
+ * @returns {String} Abbreviation for the timezone
+ */
+ jsDate.prototype.getTimezoneAbbr = function() {
+ return this.proxy.toString().replace(/^.*\(([^)]+)\)$/, '$1');
+ };
+
+ /**
+ * Get the browser-reported name for the current timezone (e.g. MDT, Mountain Daylight Time)
+ *
+ * @returns {String}
+ */
+ jsDate.prototype.getTimezoneName = function() {
+ var match = /(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());
+ return match[1] || match[2] || 'GMT' + this.getGmtOffset();
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getTimezoneOffset = function() {
+ return this.proxy.getTimezoneOffset();
+ };
+
+
+ /**
+ * Get the week number of the given year, starting with the first Monday as the first week
+ * @returns {Integer} Week number (13 for the 13th week of the year).
+ */
+ jsDate.prototype.getWeekOfYear = function() {
+ var doy = this.getDayOfYear();
+ var rdow = 7 - this.getDayOfWeek();
+ var woy = parseInt((doy+rdow)/7, 10);
+ return woy;
+ };
+
+ /**
+ * Get the current date as a Unix timestamp
+ *
+ * @returns {Integer}
+ */
+
+ jsDate.prototype.getUnix = function() {
+ return Math.round(this.proxy.getTime() / 1000, 0);
+ };
+
+ /**
+ * Implements Date functionality
+ */
+ jsDate.prototype.getYear = function() {
+ return this.proxy.getYear();
+ };
+
+ /**
+ * Return a date one day ahead (or any other unit)
+ *
+ * @param {String} unit Optional, year | month | day | week | hour | minute | second | millisecond
+ * @returns {jsDate}
+ */
+
+ jsDate.prototype.next = function(unit) {
+ unit = unit || 'day';
+ return this.clone().add(1, unit);
+ };
+
+ /**
+ * Set the jsDate instance to a new date.
+ *
+ * @param {String | Number | Array | Date Object | jsDate Object | Options Object} arguments Optional arguments,
+ * either a parsable date/time string,
+ * a JavaScript timestamp, an array of numbers of form [year, month, day, hours, minutes, seconds, milliseconds],
+ * a Date object, jsDate Object or an options object of form {syntax: "perl", date:some Date} where all options are optional.
+ */
+ jsDate.prototype.set = function() {
+ switch ( arguments.length ) {
+ case 0:
+ this.proxy = new Date();
+ break;
+ case 1:
+ // other objects either won't have a _type property or,
+ // if they do, it shouldn't be set to "jsDate", so
+ // assume it is an options argument.
+ if (get_type(arguments[0]) == "[object Object]" && arguments[0]._type != "jsDate") {
+ var opts = this.options = arguments[0];
+ this.syntax = opts.syntax || this.syntax;
+ this.defaultCentury = opts.defaultCentury || this.defaultCentury;
+ this.proxy = jsDate.createDate(opts.date);
+ }
+ else {
+ this.proxy = jsDate.createDate(arguments[0]);
+ }
+ break;
+ default:
+ var a = [];
+ for ( var i=0; ijsDate attempts to detect locale when loaded and defaults to 'en'.
+ * If a localization is detected which is not available, jsDate defaults to 'en'.
+ * Additional localizations can be added after jsDate loads. After adding a localization,
+ * call the jsDate.regional.getLocale() method. Currently, en, fr and de are defined.
+ *
+ *
Localizations must be an object and have the following properties defined: monthNames, monthNamesShort, dayNames, dayNamesShort and Localizations are added like:
+ *
+ * jsDate.regional['en'] = {
+ * monthNames : 'January February March April May June July August September October November December'.split(' '),
+ * monthNamesShort : 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' '),
+ * dayNames : 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday'.split(' '),
+ * dayNamesShort : 'Sun Mon Tue Wed Thu Fri Sat'.split(' ')
+ * };
+ *
+ *
After adding localizations, call jsDate.regional.getLocale(); to update the locale setting with the
+ * new localizations.
+ */
+
+ jsDate.regional = {
+ 'en': {
+ monthNames: ['January','February','March','April','May','June','July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun','Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'fr': {
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun','Jul','Aoû','Sep','Oct','Nov','Déc'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'de': {
+ monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
+ monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'],
+ dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
+ dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'es': {
+ monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
+ monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', 'Jul','Ago','Sep','Oct','Nov','Dic'],
+ dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'ru': {
+ monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн','Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+ dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'ar': {
+ monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران','تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
+ monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
+ dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'],
+ dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'pt': {
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'pt-BR': {
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ }
+
+
+ };
+
+ // Set english variants to 'en'
+ jsDate.regional['en-US'] = jsDate.regional['en-GB'] = jsDate.regional['en'];
+
+ /**
+ * Try to determine the users locale based on the lang attribute of the html page. Defaults to 'en'
+ * if it cannot figure out a locale of if the locale does not have a localization defined.
+ * @returns {String} locale
+ */
+
+ jsDate.regional.getLocale = function () {
+ var l = jsDate.config.defaultLocale;
+
+ if ( document && document.getElementsByTagName('html') && document.getElementsByTagName('html')[0].lang ) {
+ l = document.getElementsByTagName('html')[0].lang;
+ if (!jsDate.regional.hasOwnProperty(l)) {
+ l = jsDate.config.defaultLocale;
+ }
+ }
+
+ return l;
+ };
+
+ // ms in day
+ var day = 24 * 60 * 60 * 1000;
+
+ // padd a number with zeros
+ var addZeros = function(num, digits) {
+ num = String(num);
+ var i = digits - num.length;
+ var s = String(Math.pow(10, i)).slice(1);
+ return s.concat(num);
+ };
+
+ // representations used for calculating differences between dates.
+ // This borrows heavily from Ken Snyder's work.
+ var multipliers = {
+ millisecond: 1,
+ second: 1000,
+ minute: 60 * 1000,
+ hour: 60 * 60 * 1000,
+ day: day,
+ week: 7 * day,
+ month: {
+ // add a number of months
+ add: function(d, number) {
+ // add any years needed (increments of 12)
+ multipliers.year.add(d, Math[number > 0 ? 'floor' : 'ceil'](number / 12));
+ // ensure that we properly wrap betwen December and January
+ var prevMonth = d.getMonth() + (number % 12);
+ if (prevMonth == 12) {
+ prevMonth = 0;
+ d.setYear(d.getFullYear() + 1);
+ } else if (prevMonth == -1) {
+ prevMonth = 11;
+ d.setYear(d.getFullYear() - 1);
+ }
+ d.setMonth(prevMonth);
+ },
+ // get the number of months between two Date objects (decimal to the nearest day)
+ diff: function(d1, d2) {
+ // get the number of years
+ var diffYears = d1.getFullYear() - d2.getFullYear();
+ // get the number of remaining months
+ var diffMonths = d1.getMonth() - d2.getMonth() + (diffYears * 12);
+ // get the number of remaining days
+ var diffDays = d1.getDate() - d2.getDate();
+ // return the month difference with the days difference as a decimal
+ return diffMonths + (diffDays / 30);
+ }
+ },
+ year: {
+ // add a number of years
+ add: function(d, number) {
+ d.setYear(d.getFullYear() + Math[number > 0 ? 'floor' : 'ceil'](number));
+ },
+ // get the number of years between two Date objects (decimal to the nearest day)
+ diff: function(d1, d2) {
+ return multipliers.month.diff(d1, d2) / 12;
+ }
+ }
+ };
+ //
+ // Alias each multiplier with an 's' to allow 'year' and 'years' for example.
+ // This comes from Ken Snyders work.
+ //
+ for (var unit in multipliers) {
+ if (unit.substring(unit.length - 1) != 's') { // IE will iterate newly added properties :|
+ multipliers[unit + 's'] = multipliers[unit];
+ }
+ }
+
+ //
+ // take a jsDate instance and a format code and return the formatted value.
+ // This is a somewhat modified version of Ken Snyder's method.
+ //
+ var format = function(d, code, syntax) {
+ // if shorcut codes are used, recursively expand those.
+ if (jsDate.formats[syntax]["shortcuts"][code]) {
+ return jsDate.strftime(d, jsDate.formats[syntax]["shortcuts"][code], syntax);
+ } else {
+ // get the format code function and addZeros() argument
+ var getter = (jsDate.formats[syntax]["codes"][code] || '').split('.');
+ var nbr = d['get' + getter[0]] ? d['get' + getter[0]]() : '';
+ if (getter[1]) {
+ nbr = addZeros(nbr, getter[1]);
+ }
+ return nbr;
+ }
+ };
+
+ /**
+ * @static
+ * Static function for convert a date to a string according to a given format. Also acts as namespace for strftime format codes.
+ *
strftime formatting can be accomplished without creating a jsDate object by calling jsDate.strftime():
+ * @param {String | Number | Array | jsDate Object | Date Object} date A parsable date string, JavaScript time stamp, Array of form [year, month, day, hours, minutes, seconds, milliseconds], jsDate Object or Date object.
+ * @param {String} formatString String with embedded date formatting codes.
+ * See: {@link jsDate.formats}.
+ * @param {String} syntax Optional syntax to use [default perl].
+ * @param {String} locale Optional locale to use.
+ * @returns {String} Formatted representation of the date.
+ */
+ //
+ // Logic as implemented here is very similar to Ken Snyder's Date Instance Methods.
+ //
+ jsDate.strftime = function(d, formatString, syntax, locale) {
+ var syn = 'perl';
+ var loc = jsDate.regional.getLocale();
+
+ // check if syntax and locale are available or reversed
+ if (syntax && jsDate.formats.hasOwnProperty(syntax)) {
+ syn = syntax;
+ }
+ else if (syntax && jsDate.regional.hasOwnProperty(syntax)) {
+ loc = syntax;
+ }
+
+ if (locale && jsDate.formats.hasOwnProperty(locale)) {
+ syn = locale;
+ }
+ else if (locale && jsDate.regional.hasOwnProperty(locale)) {
+ loc = locale;
+ }
+
+ if (get_type(d) != "[object Object]" || d._type != "jsDate") {
+ d = new jsDate(d);
+ d.locale = loc;
+ }
+ if (!formatString) {
+ formatString = d.formatString || jsDate.regional[loc]['formatString'];
+ }
+ // default the format string to year-month-day
+ var source = formatString || '%Y-%m-%d',
+ result = '',
+ match;
+ // replace each format code
+ while (source.length > 0) {
+ if (match = source.match(jsDate.formats[syn].codes.matcher)) {
+ result += source.slice(0, match.index);
+ result += (match[1] || '') + format(d, match[2], syn);
+ source = source.slice(match.index + match[0].length);
+ } else {
+ result += source;
+ source = '';
+ }
+ }
+ return result;
+ };
+
+ /**
+ * @namespace
+ * Namespace to hold format codes and format shortcuts. "perl" and "php" format codes
+ * and shortcuts are defined by default. Additional codes and shortcuts can be
+ * added like:
+ *
+ *
+ * jsDate.formats["perl"] = {
+ * "codes": {
+ * matcher: /someregex/,
+ * Y: "fullYear", // name of "get" method without the "get",
+ * ..., // more codes
+ * },
+ * "shortcuts": {
+ * F: '%Y-%m-%d',
+ * ..., // more shortcuts
+ * }
+ * };
+ *
+ *
+ *
Additionally, ISO and SQL shortcuts are defined and can be accesses via:
+ * jsDate.formats.ISO and jsDate.formats.SQL
+ */
+
+ jsDate.formats = {
+ ISO:'%Y-%m-%dT%H:%M:%S.%N%G',
+ SQL:'%Y-%m-%d %H:%M:%S'
+ };
+
+ /**
+ * Perl format codes and shortcuts for strftime.
+ *
+ * A hash (object) of codes where each code must be an array where the first member is
+ * the name of a Date.prototype or jsDate.prototype function to call
+ * and optionally a second member indicating the number to pass to addZeros()
+ *
+ *
The following format codes are defined:
+ *
+ *
+ * Code Result Description
+ * == Years ==
+ * %Y 2008 Four-digit year
+ * %y 08 Two-digit year
+ *
+ * == Months ==
+ * %m 09 Two-digit month
+ * %#m 9 One or two-digit month
+ * %B September Full month name
+ * %b Sep Abbreviated month name
+ *
+ * == Days ==
+ * %d 05 Two-digit day of month
+ * %#d 5 One or two-digit day of month
+ * %e 5 One or two-digit day of month
+ * %A Sunday Full name of the day of the week
+ * %a Sun Abbreviated name of the day of the week
+ * %w 0 Number of the day of the week (0 = Sunday, 6 = Saturday)
+ *
+ * == Hours ==
+ * %H 23 Hours in 24-hour format (two digits)
+ * %#H 3 Hours in 24-hour integer format (one or two digits)
+ * %I 11 Hours in 12-hour format (two digits)
+ * %#I 3 Hours in 12-hour integer format (one or two digits)
+ * %p PM AM or PM
+ *
+ * == Minutes ==
+ * %M 09 Minutes (two digits)
+ * %#M 9 Minutes (one or two digits)
+ *
+ * == Seconds ==
+ * %S 02 Seconds (two digits)
+ * %#S 2 Seconds (one or two digits)
+ * %s 1206567625723 Unix timestamp (Seconds past 1970-01-01 00:00:00)
+ *
+ * == Milliseconds ==
+ * %N 008 Milliseconds (three digits)
+ * %#N 8 Milliseconds (one to three digits)
+ *
+ * == Timezone ==
+ * %O 360 difference in minutes between local time and GMT
+ * %Z Mountain Standard Time Name of timezone as reported by browser
+ * %G 06:00 Hours and minutes between GMT
+ *
+ * == Shortcuts ==
+ * %F 2008-03-26 %Y-%m-%d
+ * %T 05:06:30 %H:%M:%S
+ * %X 05:06:30 %H:%M:%S
+ * %x 03/26/08 %m/%d/%y
+ * %D 03/26/08 %m/%d/%y
+ * %#c Wed Mar 26 15:31:00 2008 %a %b %e %H:%M:%S %Y
+ * %v 3-Sep-2008 %e-%b-%Y
+ * %R 15:31 %H:%M
+ * %r 03:31:00 PM %I:%M:%S %p
+ *
+ * == Characters ==
+ * %n \n Newline
+ * %t \t Tab
+ * %% % Percent Symbol
+ *
+ *
+ *
Formatting shortcuts that will be translated into their longer version.
+ * Be sure that format shortcuts do not refer to themselves: this will cause an infinite loop.
+ *
+ *
Format codes and format shortcuts can be redefined after the jsDate
+ * module is imported.
+ *
+ *
Note that if you redefine the whole hash (object), you must supply a "matcher"
+ * regex for the parser. The default matcher is:
+ *
+ * /()%(#?(%|[a-z]))/i
+ *
+ *
which corresponds to the Perl syntax used by default.
+ *
+ *
By customizing the matcher and format codes, nearly any strftime functionality is possible.
+ */
+
+ jsDate.formats.perl = {
+ codes: {
+ //
+ // 2-part regex matcher for format codes
+ //
+ // first match must be the character before the code (to account for escaping)
+ // second match must be the format code character(s)
+ //
+ matcher: /()%(#?(%|[a-z]))/i,
+ // year
+ Y: 'FullYear',
+ y: 'ShortYear.2',
+ // month
+ m: 'MonthNumber.2',
+ '#m': 'MonthNumber',
+ B: 'MonthName',
+ b: 'AbbrMonthName',
+ // day
+ d: 'Date.2',
+ '#d': 'Date',
+ e: 'Date',
+ A: 'DayName',
+ a: 'AbbrDayName',
+ w: 'Day',
+ // hours
+ H: 'Hours.2',
+ '#H': 'Hours',
+ I: 'Hours12.2',
+ '#I': 'Hours12',
+ p: 'AMPM',
+ // minutes
+ M: 'Minutes.2',
+ '#M': 'Minutes',
+ // seconds
+ S: 'Seconds.2',
+ '#S': 'Seconds',
+ s: 'Unix',
+ // milliseconds
+ N: 'Milliseconds.3',
+ '#N': 'Milliseconds',
+ // timezone
+ O: 'TimezoneOffset',
+ Z: 'TimezoneName',
+ G: 'GmtOffset'
+ },
+
+ shortcuts: {
+ // date
+ F: '%Y-%m-%d',
+ // time
+ T: '%H:%M:%S',
+ X: '%H:%M:%S',
+ // local format date
+ x: '%m/%d/%y',
+ D: '%m/%d/%y',
+ // local format extended
+ '#c': '%a %b %e %H:%M:%S %Y',
+ // local format short
+ v: '%e-%b-%Y',
+ R: '%H:%M',
+ r: '%I:%M:%S %p',
+ // tab and newline
+ t: '\t',
+ n: '\n',
+ '%': '%'
+ }
+ };
+
+ /**
+ * PHP format codes and shortcuts for strftime.
+ *
+ * A hash (object) of codes where each code must be an array where the first member is
+ * the name of a Date.prototype or jsDate.prototype function to call
+ * and optionally a second member indicating the number to pass to addZeros()
+ *
+ *
The following format codes are defined:
+ *
+ *
+ * Code Result Description
+ * === Days ===
+ * %a Sun through Sat An abbreviated textual representation of the day
+ * %A Sunday - Saturday A full textual representation of the day
+ * %d 01 to 31 Two-digit day of the month (with leading zeros)
+ * %e 1 to 31 Day of the month, with a space preceding single digits.
+ * %j 001 to 366 Day of the year, 3 digits with leading zeros
+ * %u 1 - 7 (Mon - Sun) ISO-8601 numeric representation of the day of the week
+ * %w 0 - 6 (Sun - Sat) Numeric representation of the day of the week
+ *
+ * === Week ===
+ * %U 13 Full Week number, starting with the first Sunday as the first week
+ * %V 01 through 53 ISO-8601:1988 week number, starting with the first week of the year
+ * with at least 4 weekdays, with Monday being the start of the week
+ * %W 46 A numeric representation of the week of the year,
+ * starting with the first Monday as the first week
+ * === Month ===
+ * %b Jan through Dec Abbreviated month name, based on the locale
+ * %B January - December Full month name, based on the locale
+ * %h Jan through Dec Abbreviated month name, based on the locale (an alias of %b)
+ * %m 01 - 12 (Jan - Dec) Two digit representation of the month
+ *
+ * === Year ===
+ * %C 19 Two digit century (year/100, truncated to an integer)
+ * %y 09 for 2009 Two digit year
+ * %Y 2038 Four digit year
+ *
+ * === Time ===
+ * %H 00 through 23 Two digit representation of the hour in 24-hour format
+ * %I 01 through 12 Two digit representation of the hour in 12-hour format
+ * %l 1 through 12 Hour in 12-hour format, with a space preceeding single digits
+ * %M 00 through 59 Two digit representation of the minute
+ * %p AM/PM UPPER-CASE 'AM' or 'PM' based on the given time
+ * %P am/pm lower-case 'am' or 'pm' based on the given time
+ * %r 09:34:17 PM Same as %I:%M:%S %p
+ * %R 00:35 Same as %H:%M
+ * %S 00 through 59 Two digit representation of the second
+ * %T 21:34:17 Same as %H:%M:%S
+ * %X 03:59:16 Preferred time representation based on locale, without the date
+ * %z -0500 or EST Either the time zone offset from UTC or the abbreviation
+ * %Z -0500 or EST The time zone offset/abbreviation option NOT given by %z
+ *
+ * === Time and Date ===
+ * %D 02/05/09 Same as %m/%d/%y
+ * %F 2009-02-05 Same as %Y-%m-%d (commonly used in database datestamps)
+ * %s 305815200 Unix Epoch Time timestamp (same as the time() function)
+ * %x 02/05/09 Preferred date representation, without the time
+ *
+ * === Miscellaneous ===
+ * %n --- A newline character (\n)
+ * %t --- A Tab character (\t)
+ * %% --- A literal percentage character (%)
+ *
+ */
+
+ jsDate.formats.php = {
+ codes: {
+ //
+ // 2-part regex matcher for format codes
+ //
+ // first match must be the character before the code (to account for escaping)
+ // second match must be the format code character(s)
+ //
+ matcher: /()%((%|[a-z]))/i,
+ // day
+ a: 'AbbrDayName',
+ A: 'DayName',
+ d: 'Date.2',
+ e: 'Date',
+ j: 'DayOfYear.3',
+ u: 'DayOfWeek',
+ w: 'Day',
+ // week
+ U: 'FullWeekOfYear.2',
+ V: 'IsoWeek.2',
+ W: 'WeekOfYear.2',
+ // month
+ b: 'AbbrMonthName',
+ B: 'MonthName',
+ m: 'MonthNumber.2',
+ h: 'AbbrMonthName',
+ // year
+ C: 'Century.2',
+ y: 'ShortYear.2',
+ Y: 'FullYear',
+ // time
+ H: 'Hours.2',
+ I: 'Hours12.2',
+ l: 'Hours12',
+ p: 'AMPM',
+ P: 'AmPm',
+ M: 'Minutes.2',
+ S: 'Seconds.2',
+ s: 'Unix',
+ O: 'TimezoneOffset',
+ z: 'GmtOffset',
+ Z: 'TimezoneAbbr'
+ },
+
+ shortcuts: {
+ D: '%m/%d/%y',
+ F: '%Y-%m-%d',
+ T: '%H:%M:%S',
+ X: '%H:%M:%S',
+ x: '%m/%d/%y',
+ R: '%H:%M',
+ r: '%I:%M:%S %p',
+ t: '\t',
+ n: '\n',
+ '%': '%'
+ }
+ };
+ //
+ // Conceptually, the logic implemented here is similar to Ken Snyder's Date Instance Methods.
+ // I use his idea of a set of parsers which can be regular expressions or functions,
+ // iterating through those, and then seeing if Date.parse() will create a date.
+ // The parser expressions and functions are a little different and some bugs have been
+ // worked out. Also, a lot of "pre-parsing" is done to fix implementation
+ // variations of Date.parse() between browsers.
+ //
+ jsDate.createDate = function(date) {
+ // if passing in multiple arguments, try Date constructor
+ if (date == null) {
+ return new Date();
+ }
+ // If the passed value is already a date object, return it
+ if (date instanceof Date) {
+ return date;
+ }
+ // if (typeof date == 'number') return new Date(date * 1000);
+ // If the passed value is an integer, interpret it as a javascript timestamp
+ if (typeof date == 'number') {
+ return new Date(date);
+ }
+
+ // Before passing strings into Date.parse(), have to normalize them for certain conditions.
+ // If strings are not formatted staccording to the EcmaScript spec, results from Date parse will be implementation dependent.
+ //
+ // For example:
+ // * FF and Opera assume 2 digit dates are pre y2k, Chome assumes <50 is pre y2k, 50+ is 21st century.
+ // * Chrome will correctly parse '1984-1-25' into localtime, FF and Opera will not parse.
+ // * Both FF, Chrome and Opera will parse '1984/1/25' into localtime.
+
+ // remove leading and trailing spaces
+ var parsable = String(date).replace(/^\s*(.+)\s*$/g, '$1');
+
+ // replace dahses (-) with slashes (/) in dates like n[nnn]/n[n]/n[nnn]
+ parsable = parsable.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/, "$1/$2/$3");
+
+ /////////
+ // Need to check for '15-Dec-09' also.
+ // FF will not parse, but Chrome will.
+ // Chrome will set date to 2009 as well.
+ /////////
+
+ // first check for 'dd-mmm-yyyy' or 'dd/mmm/yyyy' like '15-Dec-2010'
+ parsable = parsable.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i, "$1 $2 $3");
+
+ // Now check for 'dd-mmm-yy' or 'dd/mmm/yy' and normalize years to default century.
+ var match = parsable.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i);
+ if (match && match.length > 3) {
+ var m3 = parseFloat(match[3]);
+ var ny = jsDate.config.defaultCentury + m3;
+ ny = String(ny);
+
+ // now replace 2 digit year with 4 digit year
+ parsable = parsable.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i, match[1] +' '+ match[2] +' '+ ny);
+
+ }
+
+ // Check for '1/19/70 8:14PM'
+ // where starts with mm/dd/yy or yy/mm/dd and have something after
+ // Check if 1st postiion is greater than 31, assume it is year.
+ // Assme all 2 digit years are 1900's.
+ // Finally, change them into US style mm/dd/yyyy representations.
+ match = parsable.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/);
+
+ function h1(parsable, match) {
+ var m1 = parseFloat(match[1]);
+ var m2 = parseFloat(match[2]);
+ var m3 = parseFloat(match[3]);
+ var cent = jsDate.config.defaultCentury;
+ var ny, nd, nm, str;
+
+ if (m1 > 31) { // first number is a year
+ nd = m3;
+ nm = m2;
+ ny = cent + m1;
+ }
+
+ else { // last number is the year
+ nd = m2;
+ nm = m1;
+ ny = cent + m3;
+ }
+
+ str = nm+'/'+nd+'/'+ny;
+
+ // now replace 2 digit year with 4 digit year
+ return parsable.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/, str);
+
+ }
+
+ if (match && match.length > 3) {
+ parsable = h1(parsable, match);
+ }
+
+ // Now check for '1/19/70' with nothing after and do as above
+ var match = parsable.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/);
+
+ if (match && match.length > 3) {
+ parsable = h1(parsable, match);
+ }
+
+
+ var i = 0;
+ var length = jsDate.matchers.length;
+ var pattern,
+ ms,
+ current = parsable;
+ while (i < length) {
+ ms = Date.parse(current);
+ if (!isNaN(ms)) {
+ return new Date(ms);
+ }
+ pattern = jsDate.matchers[i];
+ if (typeof pattern == 'function') {
+ var obj = pattern.call(jsDate, current);
+ if (obj instanceof Date) {
+ return obj;
+ }
+ } else {
+ current = parsable.replace(pattern[0], pattern[1]);
+ }
+ i++;
+ }
+ return NaN;
+ };
+
+
+ /**
+ * @static
+ * Handy static utility function to return the number of days in a given month.
+ * @param {Integer} year Year
+ * @param {Integer} month Month (1-12)
+ * @returns {Integer} Number of days in the month.
+ */
+ //
+ // handy utility method Borrowed right from Ken Snyder's Date Instance Mehtods.
+ //
+ jsDate.daysInMonth = function(year, month) {
+ if (month == 2) {
+ return new Date(year, 1, 29).getDate() == 29 ? 29 : 28;
+ }
+ return [undefined,31,undefined,31,30,31,30,31,31,30,31,30,31][month];
+ };
+
+
+ //
+ // An Array of regular expressions or functions that will attempt to match the date string.
+ // Functions are called with scope of a jsDate instance.
+ //
+ jsDate.matchers = [
+ // convert dd.mmm.yyyy to mm/dd/yyyy (world date to US date).
+ [/(3[01]|[0-2]\d)\s*\.\s*(1[0-2]|0\d)\s*\.\s*([1-9]\d{3})/, '$2/$1/$3'],
+ // convert yyyy-mm-dd to mm/dd/yyyy (ISO date to US date).
+ [/([1-9]\d{3})\s*-\s*(1[0-2]|0\d)\s*-\s*(3[01]|[0-2]\d)/, '$2/$3/$1'],
+ // Handle 12 hour or 24 hour time with milliseconds am/pm and optional date part.
+ function(str) {
+ var match = str.match(/^(?:(.+)\s+)?([012]?\d)(?:\s*\:\s*(\d\d))?(?:\s*\:\s*(\d\d(\.\d*)?))?\s*(am|pm)?\s*$/i);
+ // opt. date hour opt. minute opt. second opt. msec opt. am or pm
+ if (match) {
+ if (match[1]) {
+ var d = this.createDate(match[1]);
+ if (isNaN(d)) {
+ return;
+ }
+ } else {
+ var d = new Date();
+ d.setMilliseconds(0);
+ }
+ var hour = parseFloat(match[2]);
+ if (match[6]) {
+ hour = match[6].toLowerCase() == 'am' ? (hour == 12 ? 0 : hour) : (hour == 12 ? 12 : hour + 12);
+ }
+ d.setHours(hour, parseInt(match[3] || 0, 10), parseInt(match[4] || 0, 10), ((parseFloat(match[5] || 0)) || 0)*1000);
+ return d;
+ }
+ else {
+ return str;
+ }
+ },
+ // Handle ISO timestamp with time zone.
+ function(str) {
+ var match = str.match(/^(?:(.+))[T|\s+]([012]\d)(?:\:(\d\d))(?:\:(\d\d))(?:\.\d+)([\+\-]\d\d\:\d\d)$/i);
+ if (match) {
+ if (match[1]) {
+ var d = this.createDate(match[1]);
+ if (isNaN(d)) {
+ return;
+ }
+ } else {
+ var d = new Date();
+ d.setMilliseconds(0);
+ }
+ var hour = parseFloat(match[2]);
+ d.setHours(hour, parseInt(match[3], 10), parseInt(match[4], 10), parseFloat(match[5])*1000);
+ return d;
+ }
+ else {
+ return str;
+ }
+ },
+ // Try to match ambiguous strings like 12/8/22.
+ // Use FF date assumption that 2 digit years are 20th century (i.e. 1900's).
+ // This may be redundant with pre processing of date already performed.
+ function(str) {
+ var match = str.match(/^([0-3]?\d)\s*[-\/.\s]{1}\s*([a-zA-Z]{3,9})\s*[-\/.\s]{1}\s*([0-3]?\d)$/);
+ if (match) {
+ var d = new Date();
+ var cent = jsDate.config.defaultCentury;
+ var m1 = parseFloat(match[1]);
+ var m3 = parseFloat(match[3]);
+ var ny, nd, nm;
+ if (m1 > 31) { // first number is a year
+ nd = m3;
+ ny = cent + m1;
+ }
+
+ else { // last number is the year
+ nd = m1;
+ ny = cent + m3;
+ }
+
+ var nm = inArray(match[2], jsDate.regional[this.locale]["monthNamesShort"]);
+
+ if (nm == -1) {
+ nm = inArray(match[2], jsDate.regional[this.locale]["monthNames"]);
+ }
+
+ d.setFullYear(ny, nm, nd);
+ d.setHours(0,0,0,0);
+ return d;
+ }
+
+ else {
+ return str;
+ }
+ }
+ ];
+
+ //
+ // I think John Reisig published this method on his blog, ejohn.
+ //
+ function inArray( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ //
+ // Thanks to Kangax, Christian Sciberras and Stack Overflow for this method.
+ //
+ function get_type(thing){
+ if(thing===null) return "[object Null]"; // special case
+ return Object.prototype.toString.call(thing);
+ }
+
+ $.jsDate = jsDate;
+
+
+ /**
+ * JavaScript printf/sprintf functions.
+ *
+ * This code has been adapted from the publicly available sprintf methods
+ * by Ash Searle. His original header follows:
+ *
+ * This code is unrestricted: you are free to use it however you like.
+ *
+ * The functions should work as expected, performing left or right alignment,
+ * truncating strings, outputting numbers with a required precision etc.
+ *
+ * For complex cases, these functions follow the Perl implementations of
+ * (s)printf, allowing arguments to be passed out-of-order, and to set the
+ * precision or length of the output based on arguments instead of fixed
+ * numbers.
+ *
+ * See http://perldoc.perl.org/functions/sprintf.html for more information.
+ *
+ * Implemented:
+ * - zero and space-padding
+ * - right and left-alignment,
+ * - base X prefix (binary, octal and hex)
+ * - positive number prefix
+ * - (minimum) width
+ * - precision / truncation / maximum width
+ * - out of order arguments
+ *
+ * Not implemented (yet):
+ * - vector flag
+ * - size (bytes, words, long-words etc.)
+ *
+ * Will not implement:
+ * - %n or %p (no pass-by-reference in JavaScript)
+ *
+ * @version 2007.04.27
+ * @author Ash Searle
+ *
+ * You can see the original work and comments on his blog:
+ * http://hexmen.com/blog/2007/03/printf-sprintf/
+ * http://hexmen.com/js/sprintf.js
+ */
+
+ /**
+ * @Modifications 2009.05.26
+ * @author Chris Leonello
+ *
+ * Added %p %P specifier
+ * Acts like %g or %G but will not add more significant digits to the output than present in the input.
+ * Example:
+ * Format: '%.3p', Input: 0.012, Output: 0.012
+ * Format: '%.3g', Input: 0.012, Output: 0.0120
+ * Format: '%.4p', Input: 12.0, Output: 12.0
+ * Format: '%.4g', Input: 12.0, Output: 12.00
+ * Format: '%.4p', Input: 4.321e-5, Output: 4.321e-5
+ * Format: '%.4g', Input: 4.321e-5, Output: 4.3210e-5
+ */
+ $.jqplot.sprintf = function() {
+ function pad(str, len, chr, leftJustify) {
+ var padding = (str.length >= len) ? '' : Array(1 + len - str.length >>> 0).join(chr);
+ return leftJustify ? str + padding : padding + str;
+
+ }
+
+ function thousand_separate(value) {
+ var value_str = new String(value);
+ for (var i=10; i>0; i--) {
+ if (value_str == (value_str = value_str.replace(/^(\d+)(\d{3})/, "$1"+$.jqplot.sprintf.thousandsSeparator+"$2"))) break;
+ }
+ return value_str;
+ }
+
+ function justify(value, prefix, leftJustify, minWidth, zeroPad, htmlSpace) {
+ var diff = minWidth - value.length;
+ if (diff > 0) {
+ var spchar = ' ';
+ if (htmlSpace) { spchar = ' '; }
+ if (leftJustify || !zeroPad) {
+ value = pad(value, minWidth, spchar, leftJustify);
+ } else {
+ value = value.slice(0, prefix.length) + pad('', diff, '0', true) + value.slice(prefix.length);
+ }
+ }
+ return value;
+ }
+
+ function formatBaseX(value, base, prefix, leftJustify, minWidth, precision, zeroPad, htmlSpace) {
+ // Note: casts negative numbers to positive ones
+ var number = value >>> 0;
+ prefix = prefix && number && {'2': '0b', '8': '0', '16': '0x'}[base] || '';
+ value = prefix + pad(number.toString(base), precision || 0, '0', false);
+ return justify(value, prefix, leftJustify, minWidth, zeroPad, htmlSpace);
+ }
+
+ function formatString(value, leftJustify, minWidth, precision, zeroPad, htmlSpace) {
+ if (precision != null) {
+ value = value.slice(0, precision);
+ }
+ return justify(value, '', leftJustify, minWidth, zeroPad, htmlSpace);
+ }
+
+ var a = arguments, i = 0, format = a[i++];
+
+ return format.replace($.jqplot.sprintf.regex, function(substring, valueIndex, flags, minWidth, _, precision, type) {
+ if (substring == '%%') { return '%'; }
+
+ // parse flags
+ var leftJustify = false, positivePrefix = '', zeroPad = false, prefixBaseX = false, htmlSpace = false, thousandSeparation = false;
+ for (var j = 0; flags && j < flags.length; j++) switch (flags.charAt(j)) {
+ case ' ': positivePrefix = ' '; break;
+ case '+': positivePrefix = '+'; break;
+ case '-': leftJustify = true; break;
+ case '0': zeroPad = true; break;
+ case '#': prefixBaseX = true; break;
+ case '&': htmlSpace = true; break;
+ case '\'': thousandSeparation = true; break;
+ }
+
+ // parameters may be null, undefined, empty-string or real valued
+ // we want to ignore null, undefined and empty-string values
+
+ if (!minWidth) {
+ minWidth = 0;
+ }
+ else if (minWidth == '*') {
+ minWidth = +a[i++];
+ }
+ else if (minWidth.charAt(0) == '*') {
+ minWidth = +a[minWidth.slice(1, -1)];
+ }
+ else {
+ minWidth = +minWidth;
+ }
+
+ // Note: undocumented perl feature:
+ if (minWidth < 0) {
+ minWidth = -minWidth;
+ leftJustify = true;
+ }
+
+ if (!isFinite(minWidth)) {
+ throw new Error('$.jqplot.sprintf: (minimum-)width must be finite');
+ }
+
+ if (!precision) {
+ precision = 'fFeE'.indexOf(type) > -1 ? 6 : (type == 'd') ? 0 : void(0);
+ }
+ else if (precision == '*') {
+ precision = +a[i++];
+ }
+ else if (precision.charAt(0) == '*') {
+ precision = +a[precision.slice(1, -1)];
+ }
+ else {
+ precision = +precision;
+ }
+
+ // grab value using valueIndex if required?
+ var value = valueIndex ? a[valueIndex.slice(0, -1)] : a[i++];
+
+ switch (type) {
+ case 's': {
+ if (value == null) {
+ return '';
+ }
+ return formatString(String(value), leftJustify, minWidth, precision, zeroPad, htmlSpace);
+ }
+ case 'c': return formatString(String.fromCharCode(+value), leftJustify, minWidth, precision, zeroPad, htmlSpace);
+ case 'b': return formatBaseX(value, 2, prefixBaseX, leftJustify, minWidth, precision, zeroPad,htmlSpace);
+ case 'o': return formatBaseX(value, 8, prefixBaseX, leftJustify, minWidth, precision, zeroPad, htmlSpace);
+ case 'x': return formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad, htmlSpace);
+ case 'X': return formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad, htmlSpace).toUpperCase();
+ case 'u': return formatBaseX(value, 10, prefixBaseX, leftJustify, minWidth, precision, zeroPad, htmlSpace);
+ case 'i': {
+ var number = parseInt(+value, 10);
+ if (isNaN(number)) {
+ return '';
+ }
+ var prefix = number < 0 ? '-' : positivePrefix;
+ var number_str = thousandSeparation ? thousand_separate(String(Math.abs(number))): String(Math.abs(number));
+ value = prefix + pad(number_str, precision, '0', false);
+ //value = prefix + pad(String(Math.abs(number)), precision, '0', false);
+ return justify(value, prefix, leftJustify, minWidth, zeroPad, htmlSpace);
+ }
+ case 'd': {
+ var number = Math.round(+value);
+ if (isNaN(number)) {
+ return '';
+ }
+ var prefix = number < 0 ? '-' : positivePrefix;
+ var number_str = thousandSeparation ? thousand_separate(String(Math.abs(number))): String(Math.abs(number));
+ value = prefix + pad(number_str, precision, '0', false);
+ return justify(value, prefix, leftJustify, minWidth, zeroPad, htmlSpace);
+ }
+ case 'e':
+ case 'E':
+ case 'f':
+ case 'F':
+ case 'g':
+ case 'G':
+ {
+ var number = +value;
+ if (isNaN(number)) {
+ return '';
+ }
+ var prefix = number < 0 ? '-' : positivePrefix;
+ var method = ['toExponential', 'toFixed', 'toPrecision']['efg'.indexOf(type.toLowerCase())];
+ var textTransform = ['toString', 'toUpperCase']['eEfFgG'.indexOf(type) % 2];
+ var number_str = Math.abs(number)[method](precision);
+ number_str = thousandSeparation ? thousand_separate(number_str): number_str;
+ value = prefix + number_str;
+ return justify(value, prefix, leftJustify, minWidth, zeroPad, htmlSpace)[textTransform]();
+ }
+ case 'p':
+ case 'P':
+ {
+ // make sure number is a number
+ var number = +value;
+ if (isNaN(number)) {
+ return '';
+ }
+ var prefix = number < 0 ? '-' : positivePrefix;
+
+ var parts = String(Number(Math.abs(number)).toExponential()).split(/e|E/);
+ var sd = (parts[0].indexOf('.') != -1) ? parts[0].length - 1 : parts[0].length;
+ var zeros = (parts[1] < 0) ? -parts[1] - 1 : 0;
+
+ if (Math.abs(number) < 1) {
+ if (sd + zeros <= precision) {
+ value = prefix + Math.abs(number).toPrecision(sd);
+ }
+ else {
+ if (sd <= precision - 1) {
+ value = prefix + Math.abs(number).toExponential(sd-1);
+ }
+ else {
+ value = prefix + Math.abs(number).toExponential(precision-1);
+ }
+ }
+ }
+ else {
+ var prec = (sd <= precision) ? sd : precision;
+ value = prefix + Math.abs(number).toPrecision(prec);
+ }
+ var textTransform = ['toString', 'toUpperCase']['pP'.indexOf(type) % 2];
+ return justify(value, prefix, leftJustify, minWidth, zeroPad, htmlSpace)[textTransform]();
+ }
+ case 'n': return '';
+ default: return substring;
+ }
+ });
+ };
+
+ $.jqplot.sprintf.thousandsSeparator = ',';
+
+ $.jqplot.sprintf.regex = /%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;
+
+})(jQuery);
diff --git a/phpgwapi/js/jquery/jqplot/jquery.jqplot.min.css b/phpgwapi/js/jquery/jqplot/jquery.jqplot.min.css
new file mode 100644
index 0000000000..d1b2fef03d
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/jquery.jqplot.min.css
@@ -0,0 +1 @@
+.jqplot-target{position:relative;color:#666;font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;font-size:1em;}.jqplot-axis{font-size:.75em;}.jqplot-xaxis{margin-top:10px;}.jqplot-x2axis{margin-bottom:10px;}.jqplot-yaxis{margin-right:10px;}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis{margin-left:10px;margin-right:10px;}.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{position:absolute;}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top;}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom;}.jqplot-yaxis-tick{right:0;top:15px;text-align:right;}.jqplot-yaxis-tick.jqplot-breakTick{right:-20px;margin-right:0;padding:1px 5px 1px 5px;z-index:2;font-size:1.5em;}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left;}.jqplot-meterGauge-tick{font-size:.75em;color:#999;}.jqplot-meterGauge-label{font-size:1em;color:#999;}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute;}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute;}.jqplot-yaxis-label{margin-right:10px;font-size:11pt;position:absolute;}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;position:absolute;}table.jqplot-table-legend{margin-top:12px;margin-bottom:12px;margin-left:12px;margin-right:12px;}table.jqplot-table-legend,table.jqplot-cursor-legend{background-color:rgba(255,255,255,0.6);border:1px solid #ccc;position:absolute;font-size:.75em;}td.jqplot-table-legend{vertical-align:middle;}td.jqplot-seriesToggle:hover,td.jqplot-seriesToggle:active{cursor:pointer;}td.jqplot-table-legend>div{border:1px solid #ccc;padding:1px;}div.jqplot-table-legend-swatch{width:0;height:0;border-top-width:5px;border-bottom-width:5px;border-left-width:6px;border-right-width:6px;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid;}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em;}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;}.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px;}.jqplot-highlighter-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px;}.jqplot-point-label{font-size:.75em;z-index:2;}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center;}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em;}.jqplot-error{text-align:center;}.jqplot-error-message{position:relative;top:46%;display:inline-block;}div.jqplot-bubble-label{font-size:.8em;padding-left:2px;padding-right:2px;color:rgb(20%,20%,20%);}div.jqplot-bubble-label.jqplot-bubble-label-highlight{background:rgba(90%,90%,90%,0.7);}div.jqplot-noData-container{text-align:center;background-color:rgba(96%,96%,96%,0.3);}
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/jquery.jqplot.min.js b/phpgwapi/js/jquery/jqplot/jquery.jqplot.min.js
new file mode 100644
index 0000000000..56dc881cec
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/jquery.jqplot.min.js
@@ -0,0 +1,30 @@
+/**
+ * jqPlot
+ * Pure JavaScript plotting plugin using jQuery
+ *
+ * Version: 1.0.0b2_r792
+ *
+ * Copyright (c) 2009-2011 Chris Leonello
+ * jqPlot is currently available for use in all personal or commercial projects
+ * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
+ * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
+ * choose the license that best suits your project and use it accordingly.
+ *
+ * Although not required, the author would appreciate an email letting him
+ * know of any substantial use of jqPlot. You can reach the author at:
+ * chris at jqplot dot com or see http://www.jqplot.com/info.php .
+ *
+ * If you are feeling kind and generous, consider supporting the project by
+ * making a donation at: http://www.jqplot.com/donate.php .
+ *
+ * sprintf functions contained in jqplot.sprintf.js by Ash Searle:
+ *
+ * version 2007.04.27
+ * author Ash Searle
+ * http://hexmen.com/blog/2007/03/printf-sprintf/
+ * http://hexmen.com/js/sprintf.js
+ * The author (Ash Searle) has placed this code in the public domain:
+ * "This code is unrestricted: you are free to use it however you like."
+ *
+ */
+(function(w){var l;w.fn.emptyForce=function(){for(var O=0,P;(P=w(this)[O])!=null;O++){if(P.nodeType===1){jQuery.cleanData(P.getElementsByTagName("*"))}if(w.jqplot_use_excanvas){P.outerHTML=""}else{while(P.firstChild){P.removeChild(P.firstChild)}}P=null}return w(this)};w.fn.removeChildForce=function(O){while(O.firstChild){this.removeChildForce(O.firstChild);O.removeChild(O.firstChild)}};w.jqplot=function(U,R,P){var Q,O;if(P==null){if(jQuery.isArray(R)){Q=R;O=null}else{if(typeof(R)==="object"){Q=null;O=R}}}else{Q=R;O=P}var T=new C();w("#"+U).removeClass("jqplot-error");if(w.jqplot.config.catchErrors){try{T.init(U,Q,O);T.draw();T.themeEngine.init.call(T);return T}catch(S){var V=w.jqplot.config.errorMessage||S.message;w("#"+U).append('
=W)?"":Array(1+W-aa.length>>>0).join(X);return Z?aa+Y:Y+aa}function R(Y){var X=new String(Y);for(var W=10;W>0;W--){if(X==(X=X.replace(/^(\d+)(\d{3})/,"$1"+w.jqplot.sprintf.thousandsSeparator+"$2"))){break}}return X}function Q(ab,aa,ad,Y,Z,X){var ac=Y-ab.length;if(ac>0){var W=" ";if(X){W=" "}if(ad||!Z){ab=U(ab,Y,W,ad)}else{ab=ab.slice(0,aa.length)+U("",ac,"0",true)+ab.slice(aa.length)}}return ab}function V(ae,X,ac,Y,W,ab,ad,aa){var Z=ae>>>0;ac=ac&&Z&&{"2":"0b","8":"0","16":"0x"}[X]||"";ae=ac+U(Z.toString(X),ab||0,"0",false);return Q(ae,ac,Y,W,ad,aa)}function O(aa,ab,Y,W,Z,X){if(W!=null){aa=aa.slice(0,W)}return Q(aa,"",ab,Y,Z,X)}var P=arguments,S=0,T=P[S++];return T.replace(w.jqplot.sprintf.regex,function(ar,ad,ae,ah,au,ao,ab){if(ar=="%%"){return"%"}var ai=false,af="",ag=false,aq=false,ac=false,aa=false;for(var an=0;ae&&an-1?6:(ab=="d")?0:void (0)}else{if(ao=="*"){ao=+P[S++]}else{if(ao.charAt(0)=="*"){ao=+P[ao.slice(1,-1)]}else{ao=+ao}}}var ak=ad?P[ad.slice(0,-1)]:P[S++];switch(ab){case"s":if(ak==null){return""}return O(String(ak),ai,ah,ao,ag,ac);case"c":return O(String.fromCharCode(+ak),ai,ah,ao,ag,ac);case"b":return V(ak,2,aq,ai,ah,ao,ag,ac);case"o":return V(ak,8,aq,ai,ah,ao,ag,ac);case"x":return V(ak,16,aq,ai,ah,ao,ag,ac);case"X":return V(ak,16,aq,ai,ah,ao,ag,ac).toUpperCase();case"u":return V(ak,10,aq,ai,ah,ao,ag,ac);case"i":var Y=parseInt(+ak,10);if(isNaN(Y)){return""}var am=Y<0?"-":af;var ap=aa?R(String(Math.abs(Y))):String(Math.abs(Y));ak=am+U(ap,ao,"0",false);return Q(ak,am,ai,ah,ag,ac);case"d":var Y=Math.round(+ak);if(isNaN(Y)){return""}var am=Y<0?"-":af;var ap=aa?R(String(Math.abs(Y))):String(Math.abs(Y));ak=am+U(ap,ao,"0",false);return Q(ak,am,ai,ah,ag,ac);case"e":case"E":case"f":case"F":case"g":case"G":var Y=+ak;if(isNaN(Y)){return""}var am=Y<0?"-":af;var Z=["toExponential","toFixed","toPrecision"]["efg".indexOf(ab.toLowerCase())];var at=["toString","toUpperCase"]["eEfFgG".indexOf(ab)%2];var ap=Math.abs(Y)[Z](ao);ap=aa?R(ap):ap;ak=am+ap;return Q(ak,am,ai,ah,ag,ac)[at]();case"p":case"P":var Y=+ak;if(isNaN(Y)){return""}var am=Y<0?"-":af;var aj=String(Number(Math.abs(Y)).toExponential()).split(/e|E/);var X=(aj[0].indexOf(".")!=-1)?aj[0].length-1:aj[0].length;var al=(aj[1]<0)?-aj[1]-1:0;if(Math.abs(Y)<1){if(X+al<=ao){ak=am+Math.abs(Y).toPrecision(X)}else{if(X<=ao-1){ak=am+Math.abs(Y).toExponential(X-1)}else{ak=am+Math.abs(Y).toExponential(ao-1)}}}else{var W=(X<=ao)?X:ao;ak=am+Math.abs(Y).toPrecision(W)}var at=["toString","toUpperCase"]["pP".indexOf(ab)%2];return Q(ak,am,ai,ah,ag,ac)[at]();case"n":return"";default:return ar}})};w.jqplot.sprintf.thousandsSeparator=",";w.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g})(jQuery);
\ No newline at end of file
diff --git a/phpgwapi/js/jquery/jqplot/jquery.js b/phpgwapi/js/jquery/jqplot/jquery.js
new file mode 100644
index 0000000000..5d5a1d58ee
--- /dev/null
+++ b/phpgwapi/js/jquery/jqplot/jquery.js
@@ -0,0 +1,8936 @@
+/*!
+ * jQuery JavaScript Library v1.6.1
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu May 12 15:04:36 2011 -0400
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+ navigator = window.navigator,
+ location = window.location;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // (both of which we optimize for)
+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
+
+ // Used for trimming whitespace
+ trimLeft = /^\s+/,
+ trimRight = /\s+$/,
+
+ // Check for digits
+ rdigit = /\d/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+ // Useragent RegExp
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+ rmsie = /(msie) ([\w.]+)/,
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // The deferred used on DOM ready
+ readyList,
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ trim = String.prototype.trim,
+ indexOf = Array.prototype.indexOf,
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // The body element only exists once, optimize finding it
+ if ( selector === "body" && !context && document.body ) {
+ this.context = document;
+ this[0] = document.body;
+ this.selector = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = quickExpr.exec( selector );
+ }
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+ doc = (context ? context.ownerDocument || context : document);
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ 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 = jQuery.buildFragment( [ match[1] ], [ doc ] );
+ selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $("#id")
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return (context || rootjQuery).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if (selector.selector !== undefined) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.6.1",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return slice.call( this, 0 );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = this.constructor();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
+
+ // Add the old object onto the stack (as a reference)
+ 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 + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Attach the listeners
+ jQuery.bindReady();
+
+ // Add the callback
+ readyList.done( fn );
+
+ 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 || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+ // Either a released hold or an DOMready/load event and not yet ready
+ if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
+ }
+ }
+ },
+
+ bindReady: function() {
+ if ( readyList ) {
+ return;
+ }
+
+ readyList = jQuery._Deferred();
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ // A crude way of determining if an object is a window
+ isWindow: function( obj ) {
+ return obj && typeof obj === "object" && "setInterval" in obj;
+ },
+
+ isNaN: function( obj ) {
+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ toString.call(obj) ] || "object";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw msg;
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ return window.JSON.parse( data );
+ }
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+ .replace( rvalidtokens, "]" )
+ .replace( rvalidbraces, "")) ) {
+
+ return (new Function( "return " + data ))();
+
+ }
+ jQuery.error( "Invalid JSON: " + data );
+ },
+
+ // Cross-browser xml parsing
+ // (xml & tmp used internally)
+ parseXML: function( data , xml , tmp ) {
+
+ if ( window.DOMParser ) { // Standard
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data , "text/xml" );
+ } else { // IE
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
+ xml.async = "false";
+ xml.loadXML( data );
+ }
+
+ tmp = xml.documentElement;
+
+ if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+
+ return xml;
+ },
+
+ noop: function() {},
+
+ // Evaluates a script in a global context
+ // Workarounds based on findings by Jim Driscoll
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+ globalEval: function( data ) {
+ if ( data && rnotwhite.test( data ) ) {
+ // We use execScript on Internet Explorer
+ // We use an anonymous function so that context is window
+ // rather than jQuery in Firefox
+ ( window.execScript || function( data ) {
+ window[ "eval" ].call( window, data );
+ } )( data );
+ }
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ 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;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return object;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: trim ?
+ function( text ) {
+ return text == null ?
+ "" :
+ trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // The extra typeof function check is to prevent crashes
+ // in Safari 2 (See: #3039)
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ var type = jQuery.type( array );
+
+ if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, array ) {
+
+ if ( indexOf ) {
+ return indexOf.call( array, elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ 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++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var ret = [], retVal;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value, key, ret = [],
+ i = 0,
+ length = elems.length,
+ // jquery objects are treated as arrays
+ isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+ // Go through the array, translating each of the items to their
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( key in elems ) {
+ value = callback( elems[ key ], key, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ if ( typeof context === "string" ) {
+ var tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ var args = slice.call( arguments, 2 ),
+ proxy = function() {
+ return fn.apply( context, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Mutifunctional method to get and set values to a collection
+ // The value/s can be optionally by executed if its a function
+ access: function( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ jQuery.access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ 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 );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : undefined;
+ },
+
+ now: function() {
+ return (new Date()).getTime();
+ },
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = rwebkit.exec( ua ) ||
+ ropera.exec( ua ) ||
+ rmsie.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+ [];
+
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
+
+ sub: function() {
+ function jQuerySub( selector, context ) {
+ return new jQuerySub.fn.init( selector, context );
+ }
+ jQuery.extend( true, jQuerySub, this );
+ jQuerySub.superclass = this;
+ jQuerySub.fn = jQuerySub.prototype = this();
+ jQuerySub.fn.constructor = jQuerySub;
+ jQuerySub.sub = this.sub;
+ jQuerySub.fn.init = function init( selector, context ) {
+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+ context = jQuerySub( context );
+ }
+
+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+ };
+ jQuerySub.fn.init.prototype = jQuerySub.fn;
+ var rootjQuerySub = jQuerySub(document);
+ return jQuerySub;
+ },
+
+ browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+ trimLeft = /^[\s\xA0]+/;
+ trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ };
+
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
+ }
+
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch(e) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
+
+// Expose jQuery to the global object
+return jQuery;
+
+})();
+
+
+var // Promise methods
+ promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ),
+ // Static reference to slice
+ sliceDeferred = [].slice;
+
+jQuery.extend({
+ // Create a simple deferred (one callbacks list)
+ _Deferred: function() {
+ var // callbacks list
+ callbacks = [],
+ // stored [ context , args ]
+ fired,
+ // to avoid firing when already doing so
+ firing,
+ // flag to know if the deferred has been cancelled
+ cancelled,
+ // the deferred itself
+ deferred = {
+
+ // done( f1, f2, ...)
+ done: function() {
+ if ( !cancelled ) {
+ var args = arguments,
+ i,
+ length,
+ elem,
+ type,
+ _fired;
+ if ( fired ) {
+ _fired = fired;
+ fired = 0;
+ }
+ for ( i = 0, length = args.length; i < length; i++ ) {
+ elem = args[ i ];
+ type = jQuery.type( elem );
+ if ( type === "array" ) {
+ deferred.done.apply( deferred, elem );
+ } else if ( type === "function" ) {
+ callbacks.push( elem );
+ }
+ }
+ if ( _fired ) {
+ deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
+ }
+ }
+ return this;
+ },
+
+ // resolve with given context and args
+ resolveWith: function( context, args ) {
+ if ( !cancelled && !fired && !firing ) {
+ // make sure args are available (#8421)
+ args = args || [];
+ firing = 1;
+ try {
+ while( callbacks[ 0 ] ) {
+ callbacks.shift().apply( context, args );
+ }
+ }
+ finally {
+ fired = [ context, args ];
+ firing = 0;
+ }
+ }
+ return this;
+ },
+
+ // resolve with this as context and given arguments
+ resolve: function() {
+ deferred.resolveWith( this, arguments );
+ return this;
+ },
+
+ // Has this deferred been resolved?
+ isResolved: function() {
+ return !!( firing || fired );
+ },
+
+ // Cancel
+ cancel: function() {
+ cancelled = 1;
+ callbacks = [];
+ return this;
+ }
+ };
+
+ return deferred;
+ },
+
+ // Full fledged deferred (two callbacks list)
+ Deferred: function( func ) {
+ var deferred = jQuery._Deferred(),
+ failDeferred = jQuery._Deferred(),
+ promise;
+ // Add errorDeferred methods, then and promise
+ jQuery.extend( deferred, {
+ then: function( doneCallbacks, failCallbacks ) {
+ deferred.done( doneCallbacks ).fail( failCallbacks );
+ return this;
+ },
+ always: function() {
+ return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
+ },
+ fail: failDeferred.done,
+ rejectWith: failDeferred.resolveWith,
+ reject: failDeferred.resolve,
+ isRejected: failDeferred.isResolved,
+ pipe: function( fnDone, fnFail ) {
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( {
+ done: [ fnDone, "resolve" ],
+ fail: [ fnFail, "reject" ]
+ }, function( handler, data ) {
+ var fn = data[ 0 ],
+ action = data[ 1 ],
+ returned;
+ if ( jQuery.isFunction( fn ) ) {
+ deferred[ handler ](function() {
+ returned = fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise().then( newDefer.resolve, newDefer.reject );
+ } else {
+ newDefer[ action ]( returned );
+ }
+ });
+ } else {
+ deferred[ handler ]( newDefer[ action ] );
+ }
+ });
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ if ( obj == null ) {
+ if ( promise ) {
+ return promise;
+ }
+ promise = obj = {};
+ }
+ var i = promiseMethods.length;
+ while( i-- ) {
+ obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
+ }
+ return obj;
+ }
+ });
+ // Make sure only one callback list will be used
+ deferred.done( failDeferred.cancel ).fail( deferred.cancel );
+ // Unexpose cancel
+ delete deferred.cancel;
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( firstParam ) {
+ var args = arguments,
+ i = 0,
+ length = args.length,
+ count = length,
+ deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+ firstParam :
+ jQuery.Deferred();
+ function resolveFunc( i ) {
+ return function( value ) {
+ args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+ if ( !( --count ) ) {
+ // Strange bug in FF4:
+ // Values changed onto the arguments object sometimes end up as undefined values
+ // outside the $.when method. Cloning the object into a fresh array solves the issue
+ deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
+ }
+ };
+ }
+ if ( length > 1 ) {
+ for( ; i < length; i++ ) {
+ if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) {
+ args[ i ].promise().then( resolveFunc(i), deferred.reject );
+ } else {
+ --count;
+ }
+ }
+ if ( !count ) {
+ deferred.resolveWith( deferred, args );
+ }
+ } else if ( deferred !== firstParam ) {
+ deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+ }
+ return deferred.promise();
+ }
+});
+
+
+
+jQuery.support = (function() {
+
+ var div = document.createElement( "div" ),
+ documentElement = document.documentElement,
+ all,
+ a,
+ select,
+ opt,
+ input,
+ marginDiv,
+ support,
+ fragment,
+ body,
+ bodyStyle,
+ tds,
+ events,
+ eventName,
+ i,
+ isSupported;
+
+ // Preliminary tests
+ div.setAttribute("className", "t");
+ div.innerHTML = "
a";
+
+ all = div.getElementsByTagName( "*" );
+ a = div.getElementsByTagName( "a" )[ 0 ];
+
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return {};
+ }
+
+ // First batch of supports tests
+ select = document.createElement( "select" );
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName( "input" )[ 0 ];
+
+ support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName( "tbody" ).length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName( "link" ).length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ style: /top/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: ( a.getAttribute( "href" ) === "/a" ),
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.55$/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: ( input.value === "on" ),
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: opt.selected,
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ getSetAttribute: div.className !== "t",
+
+ // Will be defined later
+ submitBubbles: true,
+ changeBubbles: true,
+ focusinBubbles: false,
+ deleteExpando: true,
+ noCloneEvent: true,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableMarginRight: true
+ };
+
+ // Make sure checked status is properly cloned
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+
+ if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+ div.attachEvent( "onclick", function click() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ support.noCloneEvent = false;
+ div.detachEvent( "onclick", click );
+ });
+ div.cloneNode( true ).fireEvent( "onclick" );
+ }
+
+ // Check if a radio maintains it's value
+ // after being appended to the DOM
+ input = document.createElement("input");
+ input.value = "t";
+ input.setAttribute("type", "radio");
+ support.radioValue = input.value === "t";
+
+ input.setAttribute("checked", "checked");
+ div.appendChild( input );
+ fragment = document.createDocumentFragment();
+ fragment.appendChild( div.firstChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ div.innerHTML = "";
+
+ // Figure out if the W3C box model works as expected
+ div.style.width = div.style.paddingLeft = "1px";
+
+ // We use our own, invisible, body
+ body = document.createElement( "body" );
+ bodyStyle = {
+ visibility: "hidden",
+ width: 0,
+ height: 0,
+ border: 0,
+ margin: 0,
+ // Set background to avoid IE crashes when removing (#9028)
+ background: "none"
+ };
+ for ( i in bodyStyle ) {
+ body.style[ i ] = bodyStyle[ i ];
+ }
+ body.appendChild( div );
+ documentElement.insertBefore( body, documentElement.firstChild );
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ support.appendChecked = input.checked;
+
+ support.boxModel = div.offsetWidth === 2;
+
+ if ( "zoom" in div.style ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.style.display = "inline";
+ div.style.zoom = 1;
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "";
+ div.innerHTML = "";
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
+ }
+
+ div.innerHTML = "
t
";
+ tds = div.getElementsByTagName( "td" );
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+ tds[ 0 ].style.display = "";
+ tds[ 1 ].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE < 8 fail this test)
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+ div.innerHTML = "";
+
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. For more
+ // info see bug #3333
+ // Fails in WebKit before Feb 2011 nightlies
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ if ( document.defaultView && document.defaultView.getComputedStyle ) {
+ marginDiv = document.createElement( "div" );
+ marginDiv.style.width = "0";
+ marginDiv.style.marginRight = "0";
+ div.appendChild( marginDiv );
+ support.reliableMarginRight =
+ ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
+ }
+
+ // Remove the body element we added
+ body.innerHTML = "";
+ documentElement.removeChild( body );
+
+ // Technique from Juriy Zaytsev
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+ // We only care about the case where non-standard event systems
+ // are used, namely in IE. Short-circuiting here helps us to
+ // avoid an eval call (in setAttribute) which can cause CSP
+ // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+ if ( div.attachEvent ) {
+ for( i in {
+ submit: 1,
+ change: 1,
+ focusin: 1
+ } ) {
+ eventName = "on" + i;
+ isSupported = ( eventName in div );
+ if ( !isSupported ) {
+ div.setAttribute( eventName, "return;" );
+ isSupported = ( typeof div[ eventName ] === "function" );
+ }
+ support[ i + "Bubbles" ] = isSupported;
+ }
+ }
+
+ return support;
+})();
+
+// Keep track of boxModel
+jQuery.boxModel = jQuery.support.boxModel;
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+ rmultiDash = /([a-z])([A-Z])/g;
+
+jQuery.extend({
+ cache: {},
+
+ // Please use with caution
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ // Non-digits removed to match rinlinejQuery
+ expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+ "applet": true
+ },
+
+ hasData: function( elem ) {
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+
+ return !!elem && !isEmptyDataObject( elem );
+ },
+
+ data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache,
+
+ // We have to handle DOM nodes and JS objects differently because IE6-7
+ // can't GC object references properly across the DOM-JS boundary
+ isNode = elem.nodeType,
+
+ // Only DOM nodes need the global jQuery cache; JS object data is
+ // attached directly to the object so GC can occur automatically
+ cache = isNode ? jQuery.cache : elem,
+
+ // Only defining an ID for JS objects if its cache already exists allows
+ // the code to shortcut on the same path as a DOM node with no cache
+ id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;
+
+ // Avoid doing any more work than we need to when trying to get data on an
+ // object that has no data at all
+ if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) {
+ return;
+ }
+
+ if ( !id ) {
+ // Only DOM nodes need a new unique ID for each element since their data
+ // ends up in the global cache
+ if ( isNode ) {
+ elem[ jQuery.expando ] = id = ++jQuery.uuid;
+ } else {
+ id = jQuery.expando;
+ }
+ }
+
+ if ( !cache[ id ] ) {
+ cache[ id ] = {};
+
+ // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
+ // metadata on plain JS objects when the object is serialized using
+ // JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
+ }
+
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
+ // shallow copied over onto the existing cache
+ if ( typeof name === "object" || typeof name === "function" ) {
+ if ( pvt ) {
+ cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
+ } else {
+ cache[ id ] = jQuery.extend(cache[ id ], name);
+ }
+ }
+
+ thisCache = cache[ id ];
+
+ // Internal jQuery data is stored in a separate object inside the object's data
+ // cache in order to avoid key collisions between internal data and user-defined
+ // data
+ if ( pvt ) {
+ if ( !thisCache[ internalKey ] ) {
+ thisCache[ internalKey ] = {};
+ }
+
+ thisCache = thisCache[ internalKey ];
+ }
+
+ if ( data !== undefined ) {
+ thisCache[ jQuery.camelCase( name ) ] = data;
+ }
+
+ // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
+ // not attempt to inspect the internal events object using jQuery.data, as this
+ // internal data object is undocumented and subject to change.
+ if ( name === "events" && !thisCache[name] ) {
+ return thisCache[ internalKey ] && thisCache[ internalKey ].events;
+ }
+
+ return getByName ? thisCache[ jQuery.camelCase( name ) ] : thisCache;
+ },
+
+ removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var internalKey = jQuery.expando, isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+
+ // See jQuery.data for more information
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+ // If there is already no cache entry for this object, there is no
+ // purpose in continuing
+ if ( !cache[ id ] ) {
+ return;
+ }
+
+ if ( name ) {
+ var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
+
+ if ( thisCache ) {
+ delete thisCache[ name ];
+
+ // If there is no data left in the cache, we want to continue
+ // and let the cache object itself get destroyed
+ if ( !isEmptyDataObject(thisCache) ) {
+ return;
+ }
+ }
+ }
+
+ // See jQuery.data for more information
+ if ( pvt ) {
+ delete cache[ id ][ internalKey ];
+
+ // Don't destroy the parent cache unless the internal data object
+ // had been the only thing left in it
+ if ( !isEmptyDataObject(cache[ id ]) ) {
+ return;
+ }
+ }
+
+ var internalCache = cache[ id ][ internalKey ];
+
+ // Browsers that fail expando deletion also refuse to delete expandos on
+ // the window, but it will allow it on all other JS objects; other browsers
+ // don't care
+ if ( jQuery.support.deleteExpando || cache != window ) {
+ delete cache[ id ];
+ } else {
+ cache[ id ] = null;
+ }
+
+ // We destroyed the entire user cache at once because it's faster than
+ // iterating through each key, but we need to continue to persist internal
+ // data if it existed
+ if ( internalCache ) {
+ cache[ id ] = {};
+ // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
+ // metadata on plain JS objects when the object is serialized using
+ // JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
+
+ cache[ id ][ internalKey ] = internalCache;
+
+ // Otherwise, we need to eliminate the expando on the node to avoid
+ // false lookups in the cache for entries that no longer exist
+ } else if ( isNode ) {
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( jQuery.support.deleteExpando ) {
+ delete elem[ jQuery.expando ];
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( jQuery.expando );
+ } else {
+ elem[ jQuery.expando ] = null;
+ }
+ }
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return jQuery.data( elem, name, data, true );
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ if ( elem.nodeName ) {
+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ if ( match ) {
+ return !(match === true || elem.getAttribute("classid") !== match);
+ }
+ }
+
+ return true;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var data = null;
+
+ if ( typeof key === "undefined" ) {
+ if ( this.length ) {
+ data = jQuery.data( this[0] );
+
+ if ( this[0].nodeType === 1 ) {
+ var attr = this[0].attributes, name;
+ for ( var i = 0, l = attr.length; i < l; i++ ) {
+ name = attr[i].name;
+
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.substring(5) );
+
+ dataAttr( this[0], name, data[ name ] );
+ }
+ }
+ }
+ }
+
+ return data;
+
+ } else if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ var parts = key.split(".");
+ parts[1] = parts[1] ? "." + parts[1] : "";
+
+ if ( value === undefined ) {
+ data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+ // Try to fetch any internally stored data first
+ if ( data === undefined && this.length ) {
+ data = jQuery.data( this[0], key );
+ data = dataAttr( this[0], key, data );
+ }
+
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+
+ } else {
+ return this.each(function() {
+ var $this = jQuery( this ),
+ args = [ parts[0], value ];
+
+ $this.triggerHandler( "setData" + parts[1] + "!", args );
+ jQuery.data( this, key, value );
+ $this.triggerHandler( "changeData" + parts[1] + "!", args );
+ });
+ }
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
+
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ !jQuery.isNaN( data ) ? parseFloat( data ) :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
+// property to be considered empty objects; this property always exists in
+// order to make sure JSON.stringify does not expose internal metadata
+function isEmptyDataObject( obj ) {
+ for ( var name in obj ) {
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+ var deferDataKey = type + "defer",
+ queueDataKey = type + "queue",
+ markDataKey = type + "mark",
+ defer = jQuery.data( elem, deferDataKey, undefined, true );
+ if ( defer &&
+ ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) &&
+ ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) {
+ // Give room for hard-coded callbacks to fire first
+ // and eventually mark/queue something else on the element
+ setTimeout( function() {
+ if ( !jQuery.data( elem, queueDataKey, undefined, true ) &&
+ !jQuery.data( elem, markDataKey, undefined, true ) ) {
+ jQuery.removeData( elem, deferDataKey, true );
+ defer.resolve();
+ }
+ }, 0 );
+ }
+}
+
+jQuery.extend({
+
+ _mark: function( elem, type ) {
+ if ( elem ) {
+ type = (type || "fx") + "mark";
+ jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
+ }
+ },
+
+ _unmark: function( force, elem, type ) {
+ if ( force !== true ) {
+ type = elem;
+ elem = force;
+ force = false;
+ }
+ if ( elem ) {
+ type = type || "fx";
+ var key = type + "mark",
+ count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
+ if ( count ) {
+ jQuery.data( elem, key, count, true );
+ } else {
+ jQuery.removeData( elem, key, true );
+ handleQueueMarkDefer( elem, type, "mark" );
+ }
+ }
+ },
+
+ queue: function( elem, type, data ) {
+ if ( elem ) {
+ type = (type || "fx") + "queue";
+ var q = jQuery.data( elem, type, undefined, true );
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !q || jQuery.isArray(data) ) {
+ q = jQuery.data( elem, type, jQuery.makeArray(data), true );
+ } else {
+ q.push( data );
+ }
+ }
+ return q || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ fn = queue.shift(),
+ defer;
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ }
+
+ if ( fn ) {
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift("inprogress");
+ }
+
+ fn.call(elem, function() {
+ jQuery.dequeue(elem, type);
+ });
+ }
+
+ if ( !queue.length ) {
+ jQuery.removeData( elem, type + "queue", true );
+ handleQueueMarkDefer( elem, type, "queue" );
+ }
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ }
+
+ if ( data === undefined ) {
+ return jQuery.queue( this[0], type );
+ }
+ return this.each(function() {
+ 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 );
+ });
+ },
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ 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", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, object ) {
+ if ( typeof type !== "string" ) {
+ object = type;
+ type = undefined;
+ }
+ type = type || "fx";
+ var defer = jQuery.Deferred(),
+ elements = this,
+ i = elements.length,
+ count = 1,
+ deferDataKey = type + "defer",
+ queueDataKey = type + "queue",
+ markDataKey = type + "mark",
+ tmp;
+ function resolve() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ }
+ while( i-- ) {
+ if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+ ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+ jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+ jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
+ count++;
+ tmp.done( resolve );
+ }
+ }
+ resolve();
+ return defer.promise();
+ }
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+ rspace = /\s+/,
+ rreturn = /\r/g,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea)?$/i,
+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+ rinvalidChar = /\:/,
+ formHook, boolHook;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, name, value, true, jQuery.attr );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, name, value, true, jQuery.prop );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ },
+
+ 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") || "") );
+ });
+ }
+
+ 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];
+ }
+ }
+ elem.className = jQuery.trim( setClass );
+ }
+ }
+ }
+ }
+
+ 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")) );
+ });
+ }
+
+ 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] + " ", " ");
+ }
+ elem.className = jQuery.trim( className );
+
+ } else {
+ elem.className = "";
+ }
+ }
+ }
+ }
+
+ 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 );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ state = stateVal,
+ classNames = value.split( rspace );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space seperated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // toggle whole className
+ 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;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var hooks, ret,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ return (elem.value || "").replace(rreturn, "");
+ }
+
+ return undefined;
+ }
+
+ var isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var self = jQuery(this), val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, self.val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map(val, function ( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value,
+ index = elem.selectedIndex,
+ values = [],
+ options = elem.options,
+ one = elem.type === "select-one";
+
+ // Nothing was selected
+ if ( index < 0 ) {
+ return null;
+ }
+
+ // Loop through all the selected options
+ for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
+ var option = options[ i ];
+
+ // Don't return options that are disabled or in a disabled optgroup
+ if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+ (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+ if ( one && !values.length && options.length ) {
+ return jQuery( options[ index ] ).val();
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var values = jQuery.makeArray( value );
+
+ jQuery(elem).find("option").each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ },
+
+ attrFn: {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true
+ },
+
+ attrFix: {
+ // Always normalize to ensure hook usage
+ tabindex: "tabIndex"
+ },
+
+ attr: function( elem, name, value, pass ) {
+ var nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return undefined;
+ }
+
+ if ( pass && name in jQuery.attrFn ) {
+ return jQuery( elem )[ name ]( value );
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( !("getAttribute" in elem) ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ var ret, hooks,
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // Normalize the name if needed
+ name = notxml && jQuery.attrFix[ name ] || name;
+
+ hooks = jQuery.attrHooks[ name ];
+
+ if ( !hooks ) {
+ // Use boolHook for boolean attributes
+ if ( rboolean.test( name ) &&
+ (typeof value === "boolean" || value === undefined || value.toLowerCase() === name.toLowerCase()) ) {
+
+ hooks = boolHook;
+
+ // Use formHook for forms and if the name contains certain characters
+ } else if ( formHook && (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) {
+ hooks = formHook;
+ }
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+ return undefined;
+
+ } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, "" + value );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && notxml ) {
+ return hooks.get( elem, name );
+
+ } else {
+
+ ret = elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret === null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, name ) {
+ var propName;
+ if ( elem.nodeType === 1 ) {
+ name = jQuery.attrFix[ name ] || name;
+
+ if ( jQuery.support.getSetAttribute ) {
+ // Use removeAttribute in browsers that support it
+ elem.removeAttribute( name );
+ } else {
+ jQuery.attr( elem, name, "" );
+ elem.removeAttributeNode( elem.getAttributeNode( name ) );
+ }
+
+ // Set corresponding property to false for boolean attributes
+ if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) {
+ elem[ propName ] = false;
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to it's default in case type is set after value
+ // This is for element creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ },
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ var attributeNode = elem.getAttributeNode("tabIndex");
+
+ return attributeNode && attributeNode.specified ?
+ parseInt( attributeNode.value, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+ }
+ },
+
+ propFix: {
+ tabindex: "tabIndex",
+ readonly: "readOnly",
+ "for": "htmlFor",
+ "class": "className",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ cellpadding: "cellPadding",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ usemap: "useMap",
+ frameborder: "frameBorder",
+ contenteditable: "contentEditable"
+ },
+
+ prop: function( elem, name, value ) {
+ var nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return undefined;
+ }
+
+ var ret, hooks,
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // Try to normalize/fix the name
+ name = notxml && jQuery.propFix[ name ] || name;
+
+ hooks = jQuery.propHooks[ name ];
+
+ if ( value !== undefined ) {
+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ return (elem[ name ] = value);
+ }
+
+ } else {
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ return elem[ name ];
+ }
+ }
+ },
+
+ propHooks: {}
+});
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ // Align boolean attributes with corresponding properties
+ return elem[ jQuery.propFix[ name ] || name ] ?
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ var propName;
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ // value is true since we know at this point it's type boolean and not false
+ // Set boolean attributes to the same name and set the DOM property
+ propName = jQuery.propFix[ name ] || name;
+ if ( propName in elem ) {
+ // Only set the IDL specifically if it already exists on the element
+ elem[ propName ] = value;
+ }
+
+ elem.setAttribute( name, name.toLowerCase() );
+ }
+ return name;
+ }
+};
+
+// Use the value property for back compat
+// Use the formHook for button elements in IE6/7 (#1954)
+jQuery.attrHooks.value = {
+ get: function( elem, name ) {
+ if ( formHook && jQuery.nodeName( elem, "button" ) ) {
+ return formHook.get( elem, name );
+ }
+ return elem.value;
+ },
+ set: function( elem, value, name ) {
+ if ( formHook && jQuery.nodeName( elem, "button" ) ) {
+ return formHook.set( elem, value, name );
+ }
+ // Does not return so that setAttribute is also used
+ elem.value = value;
+ }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !jQuery.support.getSetAttribute ) {
+
+ // propFix is more comprehensive and contains all fixes
+ jQuery.attrFix = jQuery.propFix;
+
+ // Use this for any attribute on a form in IE6/7
+ formHook = jQuery.attrHooks.name = jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret;
+ ret = elem.getAttributeNode( name );
+ // Return undefined if nodeValue is empty string
+ return ret && ret.nodeValue !== "" ?
+ ret.nodeValue :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ // Check form objects in IE (multiple bugs related)
+ // Only use nodeValue if the attribute node exists on the form
+ var ret = elem.getAttributeNode( name );
+ if ( ret ) {
+ ret.nodeValue = value;
+ return value;
+ }
+ }
+ };
+
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+ // This is for removals
+ jQuery.each([ "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ set: function( elem, value ) {
+ if ( value === "" ) {
+ elem.setAttribute( name, "auto" );
+ return value;
+ }
+ }
+ });
+ });
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+ jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ get: function( elem ) {
+ var ret = elem.getAttribute( name, 2 );
+ return ret === null ? undefined : ret;
+ }
+ });
+ });
+}
+
+if ( !jQuery.support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Normalize to lowercase since IE uppercases css property names
+ return elem.style.cssText.toLowerCase() || undefined;
+ },
+ set: function( elem, value ) {
+ return (elem.style.cssText = "" + value);
+ }
+ };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ }
+ });
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+ jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ get: function( elem ) {
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+ };
+ });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
+ }
+ }
+ });
+});
+
+
+
+
+var hasOwn = Object.prototype.hasOwnProperty,
+ rnamespaces = /\.(.*)$/,
+ rformElems = /^(?:textarea|input|select)$/i,
+ rperiod = /\./g,
+ rspaces = / /g,
+ rescape = /[^\w\s.|`]/g,
+ fcleanup = function( nm ) {
+ return nm.replace(rescape, "\\$&");
+ };
+
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code originated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+ // Bind an event to an element
+ // Original by Dean Edwards
+ add: function( elem, types, handler, data ) {
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ if ( handler === false ) {
+ handler = returnFalse;
+ } else if ( !handler ) {
+ // Fixes bug #7229. Fix recommended by jdalton
+ return;
+ }
+
+ var handleObjIn, handleObj;
+
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ }
+
+ // Make sure that the function being executed has a unique ID
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure
+ var elemData = jQuery._data( elem );
+
+ // If no elemData is found then we must be trying to bind to one of the
+ // banned noData elements
+ if ( !elemData ) {
+ return;
+ }
+
+ var events = elemData.events,
+ eventHandle = elemData.handle;
+
+ if ( !events ) {
+ elemData.events = events = {};
+ }
+
+ if ( !eventHandle ) {
+ elemData.handle = eventHandle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.handle.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ }
+
+ // Add elem as a property of the handle function
+ // This is to prevent a memory leak with non-native events in IE.
+ eventHandle.elem = elem;
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = types.split(" ");
+
+ var type, i = 0, namespaces;
+
+ while ( (type = types[ i++ ]) ) {
+ handleObj = handleObjIn ?
+ jQuery.extend({}, handleObjIn) :
+ { handler: handler, data: data };
+
+ // Namespaced event handlers
+ if ( type.indexOf(".") > -1 ) {
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ handleObj.namespace = namespaces.slice(0).sort().join(".");
+
+ } else {
+ namespaces = [];
+ handleObj.namespace = "";
+ }
+
+ handleObj.type = type;
+ if ( !handleObj.guid ) {
+ handleObj.guid = handler.guid;
+ }
+
+ // Get the current list of functions bound to this event
+ var handlers = events[ type ],
+ special = jQuery.event.special[ type ] || {};
+
+ // Init the event handler queue
+ if ( !handlers ) {
+ handlers = events[ type ] = [];
+
+ // Check for a special event handler
+ // Only use addEventListener/attachEvent if the special
+ // events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add the function to the element's handler list
+ handlers.push( handleObj );
+
+ // Keep track of which events have been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, pos ) {
+ // don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ if ( handler === false ) {
+ handler = returnFalse;
+ }
+
+ var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+ elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+ events = elemData && elemData.events;
+
+ if ( !elemData || !events ) {
+ return;
+ }
+
+ // types is actually an event object here
+ if ( types && types.type ) {
+ handler = types.handler;
+ types = types.type;
+ }
+
+ // Unbind all events for the element
+ if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
+ types = types || "";
+
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types );
+ }
+
+ return;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).unbind("mouseover mouseout", fn);
+ types = types.split(" ");
+
+ while ( (type = types[ i++ ]) ) {
+ origType = type;
+ handleObj = null;
+ all = type.indexOf(".") < 0;
+ namespaces = [];
+
+ if ( !all ) {
+ // Namespaced event handlers
+ namespaces = type.split(".");
+ type = namespaces.shift();
+
+ namespace = new RegExp("(^|\\.)" +
+ jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ eventType = events[ type ];
+
+ if ( !eventType ) {
+ continue;
+ }
+
+ if ( !handler ) {
+ for ( 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 );
+ }
+ }
+
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+
+ for ( j = pos || 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( handler.guid === handleObj.guid ) {
+ // remove the given handler for the given type
+ if ( all || namespace.test( handleObj.namespace ) ) {
+ if ( pos == null ) {
+ eventType.splice( j--, 1 );
+ }
+
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+
+ if ( pos != null ) {
+ break;
+ }
+ }
+ }
+
+ // remove generic event handler if no more handlers exist
+ if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ ret = null;
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ var handle = elemData.handle;
+ if ( handle ) {
+ handle.elem = null;
+ }
+
+ delete elemData.events;
+ delete elemData.handle;
+
+ if ( jQuery.isEmptyObject( elemData ) ) {
+ jQuery.removeData( elem, undefined, true );
+ }
+ }
+ },
+
+ // Events that are safe to short-circuit if no handlers are attached.
+ // Native DOM events should not be added, they may have inline handlers.
+ customEvent: {
+ "getData": true,
+ "setData": true,
+ "changeData": true
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ // Event object or event type
+ var type = event.type || event,
+ namespaces = [],
+ exclusive;
+
+ if ( type.indexOf("!") >= 0 ) {
+ // Exclusive events trigger only for the exact event (no namespaces)
+ type = type.slice(0, -1);
+ exclusive = true;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+
+ if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+ // No jQuery handlers for this event type, and it can't have inline handlers
+ return;
+ }
+
+ // Caller can pass in an Event, Object, or just an event type string
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[ jQuery.expando ] ? event :
+ // Object literal
+ new jQuery.Event( type, event ) :
+ // Just the event type (string)
+ new jQuery.Event( type );
+
+ event.type = type;
+ event.exclusive = exclusive;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
+
+ // triggerHandler() and global events don't bubble or run the default action
+ if ( onlyHandlers || !elem ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+
+ // Handle a global trigger
+ if ( !elem ) {
+ // TODO: Stop taunting the data cache; remove global events and always attach to document
+ jQuery.each( jQuery.cache, function() {
+ // internalKey variable is just used to make it easier to find
+ // and potentially change this stuff later; currently it just
+ // points to jQuery.expando
+ var internalKey = jQuery.expando,
+ internalCache = this[ internalKey ];
+ if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
+ jQuery.event.trigger( event, data, internalCache.handle.elem );
+ }
+ });
+ return;
+ }
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ event.target = elem;
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data ? jQuery.makeArray( data ) : [];
+ data.unshift( event );
+
+ var cur = elem,
+ // IE doesn't like method names with a colon (#3533, #8272)
+ ontype = type.indexOf(":") < 0 ? "on" + type : "";
+
+ // Fire event on the current element, then bubble up the DOM tree
+ do {
+ var handle = jQuery._data( cur, "handle" );
+
+ event.currentTarget = cur;
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Trigger an inline bound script
+ if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
+ event.result = false;
+ event.preventDefault();
+ }
+
+ // Bubble up to document, then to window
+ cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window;
+ } while ( cur && !event.isPropagationStopped() );
+
+ // If nobody prevented the default action, do it now
+ if ( !event.isDefaultPrevented() ) {
+ var old,
+ special = jQuery.event.special[ type ] || {};
+
+ if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) &&
+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Can't use an .isFunction)() check here because IE6/7 fails that test.
+ // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch.
+ try {
+ if ( ontype && elem[ type ] ) {
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ old = elem[ ontype ];
+
+ if ( old ) {
+ elem[ ontype ] = null;
+ }
+
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ }
+ } catch ( ieError ) {}
+
+ if ( old ) {
+ elem[ ontype ] = old;
+ }
+
+ jQuery.event.triggered = undefined;
+ }
+ }
+
+ return event.result;
+ },
+
+ handle: function( event ) {
+ event = jQuery.event.fix( event || window.event );
+ // Snapshot the handlers list since a called handler may add/remove events.
+ var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
+ run_all = !event.exclusive && !event.namespace,
+ args = Array.prototype.slice.call( arguments, 0 );
+
+ // Use the fix-ed Event rather than the (read-only) native event
+ args[0] = event;
+ event.currentTarget = this;
+
+ for ( var j = 0, l = handlers.length; j < l; j++ ) {
+ var handleObj = handlers[ j ];
+
+ // Triggered event must 1) be non-exclusive and have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event.
+ if ( run_all || event.namespace_re.test( handleObj.namespace ) ) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ event.handler = handleObj.handler;
+ event.data = handleObj.data;
+ event.handleObj = handleObj;
+
+ var ret = handleObj.handler.apply( this, args );
+
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
+ }
+ }
+ 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 pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // store a copy of the original event object
+ // and "clone" to set read-only properties
+ var originalEvent = event;
+ event = jQuery.Event( originalEvent );
+
+ for ( var i = this.props.length, prop; i; ) {
+ prop = this.props[ --i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Fix target property, if necessary
+ if ( !event.target ) {
+ // Fixes #1925 where srcElement might not be defined either
+ event.target = event.srcElement || document;
+ }
+
+ // check if target is a textnode (safari)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && event.fromElement ) {
+ event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
+ }
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && event.clientX != null ) {
+ var eventDocument = event.target.ownerDocument || document,
+ doc = eventDocument.documentElement,
+ body = eventDocument.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);
+ }
+
+ // Add which for key events
+ if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
+ event.which = event.charCode != null ? event.charCode : event.keyCode;
+ }
+
+ // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
+ if ( !event.metaKey && event.ctrlKey ) {
+ event.metaKey = event.ctrlKey;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && event.button !== undefined ) {
+ event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+ }
+
+ return event;
+ },
+
+ // Deprecated, use jQuery.guid instead
+ guid: 1E8,
+
+ // Deprecated, use jQuery.proxy instead
+ proxy: jQuery.proxy,
+
+ special: {
+ ready: {
+ // Make sure the ready event is setup
+ setup: jQuery.bindReady,
+ teardown: jQuery.noop
+ },
+
+ live: {
+ add: function( handleObj ) {
+ jQuery.event.add( this,
+ liveConvert( handleObj.origType, handleObj.selector ),
+ jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
+ },
+
+ remove: function( handleObj ) {
+ jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
+ }
+ },
+
+ beforeunload: {
+ setup: function( data, namespaces, eventHandle ) {
+ // We only want to do this special case on windows
+ if ( jQuery.isWindow( this ) ) {
+ this.onbeforeunload = eventHandle;
+ }
+ },
+
+ teardown: function( namespaces, eventHandle ) {
+ if ( this.onbeforeunload === eventHandle ) {
+ this.onbeforeunload = null;
+ }
+ }
+ }
+ }
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ if ( elem.detachEvent ) {
+ elem.detachEvent( "on" + type, handle );
+ }
+ };
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !this.preventDefault ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
+ src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // timeStamp is buggy for some events on Firefox(#3843)
+ // So we won't rely on the native value
+ this.timeStamp = jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+ return false;
+}
+function returnTrue() {
+ return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ preventDefault: function() {
+ this.isDefaultPrevented = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+
+ // if preventDefault exists run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // otherwise set the returnValue property of the original event to false (IE)
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ this.isPropagationStopped = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+ // if stopPropagation exists run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ // otherwise set the cancelBubble property of the original event to true (IE)
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ },
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse
+};
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function( event ) {
+ // Check if mouse(over|out) are still within the same parent element
+ var parent = event.relatedTarget;
+
+ // set the correct event type
+ event.type = event.data;
+
+ // Firefox sometimes assigns relatedTarget a XUL element
+ // which we cannot access the parentNode property of
+ try {
+
+ // Chrome does something similar, the parentNode property
+ // can be accessed but is null.
+ if ( parent && parent !== document && !parent.parentNode ) {
+ return;
+ }
+
+ // Traverse up the tree
+ while ( parent && parent !== this ) {
+ parent = parent.parentNode;
+ }
+
+ if ( parent !== this ) {
+ // handle event if we actually just moused on to a non sub-element
+ jQuery.event.handle.apply( this, arguments );
+ }
+
+ // assuming we've left the element since we most likely mousedover a xul element
+ } catch(e) { }
+},
+
+// In case of event delegation, we only need to rename the event.type,
+// liveHandler will take care of the rest.
+delegate = function( event ) {
+ event.type = event.data;
+ jQuery.event.handle.apply( this, arguments );
+};
+
+// Create mouseenter and mouseleave events
+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 );
+ }
+ };
+});
+
+// submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function( data, namespaces ) {
+ if ( !jQuery.nodeName( this, "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 ) {
+ 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 ) {
+ trigger( "submit", this, arguments );
+ }
+ });
+
+ } else {
+ return false;
+ }
+ },
+
+ teardown: function( namespaces ) {
+ jQuery.event.remove( this, ".specialSubmit" );
+ }
+ };
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+ var 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 ( jQuery.nodeName( elem, "select" ) ) {
+ val = elem.selectedIndex;
+ }
+
+ return val;
+ },
+
+ testChange = function testChange( e ) {
+ var elem = e.target, data, val;
+
+ if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
+ return;
+ }
+
+ data = jQuery._data( elem, "_change_data" );
+ val = getVal(elem);
+
+ // the current data will be also retrieved by beforeactivate
+ if ( e.type !== "focusout" || elem.type !== "radio" ) {
+ jQuery._data( elem, "_change_data", val );
+ }
+
+ if ( data === undefined || val === data ) {
+ return;
+ }
+
+ if ( data != null || val ) {
+ e.type = "change";
+ e.liveFired = undefined;
+ jQuery.event.trigger( e, arguments[1], elem );
+ }
+ };
+
+ jQuery.event.special.change = {
+ filters: {
+ focusout: testChange,
+
+ beforedeactivate: testChange,
+
+ click: function( e ) {
+ var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
+
+ if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
+ testChange.call( this, e );
+ }
+ },
+
+ // Change has to be called before submit
+ // Keydown will be called before keypress, which is used in submit-event delegation
+ keydown: function( e ) {
+ var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
+
+ if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
+ (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+ type === "select-multiple" ) {
+ testChange.call( this, e );
+ }
+ },
+
+ // Beforeactivate happens also before the previous element is blurred
+ // with this event you can't trigger a change event, but you can store
+ // information
+ beforeactivate: function( e ) {
+ var elem = e.target;
+ jQuery._data( elem, "_change_data", getVal(elem) );
+ }
+ },
+
+ setup: function( data, namespaces ) {
+ if ( this.type === "file" ) {
+ return false;
+ }
+
+ for ( var type in changeFilters ) {
+ jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
+ }
+
+ return rformElems.test( this.nodeName );
+ },
+
+ teardown: function( namespaces ) {
+ jQuery.event.remove( this, ".specialChange" );
+
+ return rformElems.test( this.nodeName );
+ }
+ };
+
+ changeFilters = jQuery.event.special.change.filters;
+
+ // Handle when the input is .focus()'d
+ changeFilters.focus = changeFilters.beforeactivate;
+}
+
+function trigger( type, elem, args ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ // Don't pass args or remember liveFired; they apply to the donor event.
+ var event = jQuery.extend( {}, args[ 0 ] );
+ event.type = type;
+ event.originalEvent = {};
+ event.liveFired = undefined;
+ jQuery.event.handle.call( elem, event );
+ if ( event.isDefaultPrevented() ) {
+ args[ 0 ].preventDefault();
+ }
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler while someone wants focusin/focusout
+ var attaches = 0;
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( attaches++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --attaches === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+
+ function handler( donor ) {
+ // Donor event is always a native one; fix it and switch its type.
+ // Let focusin/out handler cancel the donor focus/blur event.
+ var e = jQuery.event.fix( donor );
+ e.type = fix;
+ e.originalEvent = {};
+ jQuery.event.trigger( e, null, e.target );
+ if ( e.isDefaultPrevented() ) {
+ donor.preventDefault();
+ }
+ }
+ });
+}
+
+jQuery.each(["bind", "one"], function( i, name ) {
+ jQuery.fn[ name ] = function( type, data, fn ) {
+ var handler;
+
+ // Handle object literals
+ if ( typeof type === "object" ) {
+ for ( var key in type ) {
+ this[ name ](key, data, type[key], fn);
+ }
+ return this;
+ }
+
+ if ( arguments.length === 2 || data === false ) {
+ fn = data;
+ data = undefined;
+ }
+
+ if ( name === "one" ) {
+ handler = function( event ) {
+ jQuery( this ).unbind( event, handler );
+ return fn.apply( this, arguments );
+ };
+ handler.guid = fn.guid || jQuery.guid++;
+ } else {
+ handler = 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 );
+ }
+ }
+
+ return this;
+ };
+});
+
+jQuery.fn.extend({
+ unbind: function( type, fn ) {
+ // Handle object literals
+ 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 );
+ }
+ }
+
+ 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] ) {
+ return jQuery.event.trigger( type, data, this[0], true );
+ }
+ },
+
+ toggle: function( fn ) {
+ // Save reference to arguments for access in closure
+ var args = arguments,
+ guid = fn.guid || jQuery.guid++,
+ i = 0,
+ toggler = function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ };
+
+ // link all the functions, so any of them can unbind this click handler
+ toggler.guid = guid;
+ while ( i < args.length ) {
+ args[ i++ ].guid = guid;
+ }
+
+ return this.click( toggler );
+ },
+
+ 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 /* Internal Use Only */ ) {
+ var type, i = 0, match, namespaces, preType,
+ selector = origSelector || this.selector,
+ context = origSelector ? this : jQuery( this.context );
+
+ if ( typeof types === "object" && !types.preventDefault ) {
+ for ( var key in types ) {
+ context[ name ]( key, data, types[key], selector );
+ }
+
+ return this;
+ }
+
+ if ( name === "die" && !types &&
+ origSelector && origSelector.charAt(0) === "." ) {
+
+ context.unbind( origSelector );
+
+ return this;
+ }
+
+ if ( data === false || jQuery.isFunction( data ) ) {
+ fn = data || returnFalse;
+ data = undefined;
+ }
+
+ types = (types || "").split(" ");
+
+ while ( (type = types[ i++ ]) != null ) {
+ match = rnamespaces.exec( type );
+ namespaces = "";
+
+ if ( match ) {
+ namespaces = match[0];
+ type = type.replace( rnamespaces, "" );
+ }
+
+ if ( type === "hover" ) {
+ types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+ continue;
+ }
+
+ preType = type;
+
+ if ( liveMap[ type ] ) {
+ types.push( liveMap[ type ] + namespaces );
+ type = type + namespaces;
+
+ } else {
+ type = (liveMap[ type ] || type) + namespaces;
+ }
+
+ if ( name === "live" ) {
+ // bind live handler
+ for ( var j = 0, l = context.length; j < l; j++ ) {
+ jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
+ { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
+ }
+
+ } else {
+ // unbind live handler
+ context.unbind( "live." + liveConvert( type, selector ), fn );
+ }
+ }
+
+ return this;
+ };
+});
+
+function liveHandler( event ) {
+ var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+ elems = [],
+ selectors = [],
+ events = jQuery._data( this, "events" );
+
+ // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
+ if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
+ return;
+ }
+
+ if ( event.namespace ) {
+ namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ 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 );
+ }
+ }
+
+ match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+ for ( i = 0, l = match.length; i < l; i++ ) {
+ close = match[i];
+
+ for ( j = 0; j < live.length; j++ ) {
+ handleObj = live[j];
+
+ if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
+ elem = close.elem;
+ related = null;
+
+ // Those two events require additional checking
+ if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+ event.type = handleObj.preType;
+ related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
+
+ // Make sure not to accidentally match a child element with the same selector
+ if ( related && jQuery.contains( elem, related ) ) {
+ related = elem;
+ }
+ }
+
+ if ( !related || related !== elem ) {
+ elems.push({ elem: elem, handleObj: handleObj, level: close.level });
+ }
+ }
+ }
+ }
+
+ for ( i = 0, l = elems.length; i < l; i++ ) {
+ match = elems[i];
+
+ if ( maxLevel && match.level > maxLevel ) {
+ break;
+ }
+
+ event.currentTarget = match.elem;
+ event.data = match.handleObj.data;
+ event.handleObj = match.handleObj;
+
+ ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+ if ( ret === false || event.isPropagationStopped() ) {
+ maxLevel = match.level;
+
+ if ( ret === false ) {
+ stop = false;
+ }
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
+ }
+ }
+
+ return stop;
+}
+
+function liveConvert( type, selector ) {
+ return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
+}
+
+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 ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ if ( fn == null ) {
+ fn = data;
+ data = null;
+ }
+
+ return arguments.length > 0 ?
+ this.bind( name, data, fn ) :
+ this.trigger( name );
+ };
+
+ if ( jQuery.attrFn ) {
+ jQuery.attrFn[ name ] = true;
+ }
+});
+
+
+
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+ done = 0,
+ toString = Object.prototype.toString,
+ hasDuplicate = false,
+ baseHasDuplicate = true,
+ rBackslash = /\\/g,
+ rNonWord = /\W/;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+// Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+ baseHasDuplicate = false;
+ return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+ results = results || [];
+ context = context || document;
+
+ var origContext = context;
+
+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ var m, set, checkSet, extra, ret, cur, pop, i,
+ prune = true,
+ contextXML = Sizzle.isXML( context ),
+ parts = [],
+ soFar = selector;
+
+ // Reset the position of the chunker regexp (start from head)
+ do {
+ chunker.exec( "" );
+ m = chunker.exec( soFar );
+
+ if ( m ) {
+ soFar = m[3];
+
+ parts.push( m[1] );
+
+ if ( m[2] ) {
+ extra = m[3];
+ break;
+ }
+ }
+ } while ( m );
+
+ 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();
+ }
+
+ set = posProcess( selector, set );
+ }
+ }
+
+ } else {
+ // Take a shortcut and set the context if the root selector is an ID
+ // (but not if it'll be faster if the inner selector is an ID)
+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+ ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set )[0] :
+ ret.set[0];
+ }
+
+ if ( context ) {
+ 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;
+ }
+
+ while ( parts.length ) {
+ cur = parts.pop();
+ pop = cur;
+
+ if ( !Expr.relative[ cur ] ) {
+ cur = "";
+ } else {
+ pop = parts.pop();
+ }
+
+ if ( pop == null ) {
+ pop = context;
+ }
+
+ Expr.relative[ cur ]( checkSet, pop, contextXML );
+ }
+
+ } else {
+ checkSet = parts = [];
+ }
+ }
+
+ if ( !checkSet ) {
+ checkSet = set;
+ }
+
+ if ( !checkSet ) {
+ Sizzle.error( cur || selector );
+ }
+
+ if ( toString.call(checkSet) === "[object Array]" ) {
+ if ( !prune ) {
+ results.push.apply( results, checkSet );
+
+ } else if ( context && context.nodeType === 1 ) {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+ results.push( set[i] );
+ }
+ }
+
+ } else {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+ results.push( set[i] );
+ }
+ }
+ }
+
+ } else {
+ makeArray( checkSet, results );
+ }
+
+ if ( extra ) {
+ Sizzle( extra, origContext, results, seed );
+ Sizzle.uniqueSort( results );
+ }
+
+ 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 );
+ }
+ }
+ }
+ }
+
+ return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+ return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+ return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+ var set;
+
+ if ( !expr ) {
+ return [];
+ }
+
+ for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+ var match,
+ type = Expr.order[i];
+
+ 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( rBackslash, "" );
+ set = Expr.find[ type ]( match, context, isXML );
+
+ if ( set != null ) {
+ expr = expr.replace( Expr.match[ type ], "" );
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !set ) {
+ set = typeof context.getElementsByTagName !== "undefined" ?
+ context.getElementsByTagName( "*" ) :
+ [];
+ }
+
+ return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+ var match, anyFound,
+ old = expr,
+ result = [],
+ curLoop = set,
+ isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+ while ( expr && set.length ) {
+ for ( var type in Expr.filter ) {
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+ var found, item,
+ filter = Expr.filter[ type ],
+ left = match[1];
+
+ anyFound = false;
+
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) === "\\" ) {
+ continue;
+ }
+
+ if ( curLoop === result ) {
+ result = [];
+ }
+
+ if ( Expr.preFilter[ type ] ) {
+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+ if ( !match ) {
+ anyFound = found = true;
+
+ } else if ( match === true ) {
+ continue;
+ }
+ }
+
+ 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;
+ }
+ }
+ }
+ }
+
+ if ( found !== undefined ) {
+ if ( !inplace ) {
+ curLoop = result;
+ }
+
+ expr = expr.replace( Expr.match[ type ], "" );
+
+ if ( !anyFound ) {
+ return [];
+ }
+
+ break;
+ }
+ }
+ }
+
+ // Improper expression
+ if ( expr === old ) {
+ if ( anyFound == null ) {
+ Sizzle.error( expr );
+
+ } else {
+ break;
+ }
+ }
+
+ old = expr;
+ }
+
+ 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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+ TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+ CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+ 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" );
+ },
+ type: function( elem ) {
+ return elem.getAttribute( "type" );
+ }
+ },
+
+ relative: {
+ "+": function(checkSet, part){
+ var isPartStr = typeof part === "string",
+ isTag = isPartStr && !rNonWord.test( part ),
+ isPartStrNotTag = isPartStr && !isTag;
+
+ if ( isTag ) {
+ part = part.toLowerCase();
+ }
+
+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+ if ( (elem = checkSet[i]) ) {
+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+ elem || false :
+ elem === part;
+ }
+ }
+
+ if ( isPartStrNotTag ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ },
+
+ ">": function( checkSet, part ) {
+ var elem,
+ isPartStr = typeof part === "string",
+ i = 0,
+ l = checkSet.length;
+
+ if ( isPartStr && !rNonWord.test( part ) ) {
+ part = part.toLowerCase();
+
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
+ if ( elem ) {
+ var parent = elem.parentNode;
+ checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+ }
+ }
+
+ } else {
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
+ if ( elem ) {
+ checkSet[i] = isPartStr ?
+ elem.parentNode :
+ elem.parentNode === part;
+ }
+ }
+
+ if ( isPartStr ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ }
+ },
+
+ "": function(checkSet, part, isXML){
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+ },
+
+ "~": function( checkSet, part, isXML ) {
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ 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]);
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [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] );
+ }
+ }
+
+ return ret.length === 0 ? null : ret;
+ }
+ },
+
+ TAG: function( match, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( match[1] );
+ }
+ }
+ },
+ preFilter: {
+ CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+ match = " " + match[1].replace( rBackslash, "" ) + " ";
+
+ if ( isXML ) {
+ return match;
+ }
+
+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+ if ( elem ) {
+ if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
+ if ( !inplace ) {
+ result.push( elem );
+ }
+
+ } else if ( inplace ) {
+ curLoop[i] = false;
+ }
+ }
+ }
+
+ return false;
+ },
+
+ ID: function( match ) {
+ return match[1].replace( rBackslash, "" );
+ },
+
+ TAG: function( match, curLoop ) {
+ return match[1].replace( rBackslash, "" ).toLowerCase();
+ },
+
+ CHILD: function( match ) {
+ if ( match[1] === "nth" ) {
+ if ( !match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ match[2] = match[2].replace(/^\+|\s*/g, '');
+
+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+ var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
+ match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+ // calculate the numbers (first)n+(last) including if they are negative
+ match[2] = (test[1] + (test[2] || 1)) - 0;
+ match[3] = test[3] - 0;
+ }
+ else if ( match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // TODO: Move to normal caching system
+ match[0] = done++;
+
+ return match;
+ },
+
+ ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+ var name = match[1] = match[1].replace( rBackslash, "" );
+
+ if ( !isXML && Expr.attrMap[name] ) {
+ match[1] = Expr.attrMap[name];
+ }
+
+ // Handle if an un-quoted value was used
+ match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
+
+ if ( match[2] === "~=" ) {
+ match[4] = " " + match[4] + " ";
+ }
+
+ return match;
+ },
+
+ PSEUDO: function( match, curLoop, inplace, result, not ) {
+ if ( match[1] === "not" ) {
+ // If we're dealing with a complex expression, or a simple one
+ 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 );
+ }
+
+ return false;
+ }
+
+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+ return true;
+ }
+
+ 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 ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ 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 ) {
+ var attr = elem.getAttribute( "type" ), type = elem.type;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
+ },
+
+ radio: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
+ },
+
+ checkbox: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
+ },
+
+ file: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
+ },
+
+ password: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
+ },
+
+ submit: function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && "submit" === elem.type;
+ },
+
+ image: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
+ },
+
+ reset: function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && "reset" === elem.type;
+ },
+
+ button: function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && "button" === elem.type || name === "button";
+ },
+
+ input: function( elem ) {
+ return (/input|select|textarea|button/i).test( elem.nodeName );
+ },
+
+ focus: function( elem ) {
+ return elem === elem.ownerDocument.activeElement;
+ }
+ },
+ 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 || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+ } else if ( name === "not" ) {
+ var not = match[3];
+
+ for ( var j = 0, l = not.length; j < l; j++ ) {
+ if ( not[j] === elem ) {
+ return false;
+ }
+ }
+
+ return true;
+
+ } else {
+ Sizzle.error( 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;
+ }
+ }
+
+ if ( type === "first" ) {
+ return true;
+ }
+
+ node = elem;
+
+ case "last":
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ return true;
+
+ case "nth":
+ var first = match[2],
+ last = match[3];
+
+ if ( first === 1 && last === 0 ) {
+ return true;
+ }
+
+ 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;
+ }
+ }
+
+ parent.sizcache = doneName;
+ }
+
+ 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,
+ fescape = function(all, num){
+ return "\\" + (num - 0 + 1);
+ };
+
+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, fescape) );
+}
+
+var makeArray = function( array, results ) {
+ array = Array.prototype.slice.call( array, 0 );
+
+ if ( results ) {
+ results.push.apply( results, array );
+ return results;
+ }
+
+ return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+ makeArray = function( array, results ) {
+ var i = 0,
+ ret = results || [];
+
+ if ( toString.call(array) === "[object Array]" ) {
+ Array.prototype.push.apply( ret, array );
+
+ } else {
+ if ( typeof array.length === "number" ) {
+ for ( var l = array.length; i < l; i++ ) {
+ ret.push( array[i] );
+ }
+
+ } else {
+ for ( ; array[i]; i++ ) {
+ ret.push( array[i] );
+ }
+ }
+ }
+
+ return ret;
+ };
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+ return a.compareDocumentPosition ? -1 : 1;
+ }
+
+ return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+ };
+
+} else {
+ sortOrder = function( a, b ) {
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
+ } else if ( a.sourceIndex && b.sourceIndex ) {
+ return a.sourceIndex - b.sourceIndex;
+ }
+
+ var al, bl,
+ ap = [],
+ bp = [],
+ aup = a.parentNode,
+ bup = b.parentNode,
+ cur = aup;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
+ }
+
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
+ }
+ }
+
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+ siblingCheck = function( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
+ }
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
+ };
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+Sizzle.getText = function( elems ) {
+ var ret = "", elem;
+
+ for ( var i = 0; elems[i]; i++ ) {
+ elem = elems[i];
+
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
+
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += Sizzle.getText( elem.childNodes );
+ }
+ }
+
+ return ret;
+};
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+ // We're going to inject a fake input element with a specified name
+ var form = document.createElement("div"),
+ id = "script" + (new Date()).getTime(),
+ root = document.documentElement;
+
+ form.innerHTML = "";
+
+ // Inject it into the root element, check its status, and remove it quickly
+ root.insertBefore( form, root.firstChild );
+
+ // The workaround has to do additional checks after a getElementById
+ // Which slows things down for other browsers (hence the branching)
+ 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;
+ };
+ }
+
+ root.removeChild( form );
+
+ // release memory in IE
+ root = form = null;
+})();
+
+(function(){
+ // Check to see if the browser returns only elements
+ // when doing getElementsByTagName("*")
+
+ // Create a fake element
+ var div = document.createElement("div");
+ div.appendChild( document.createComment("") );
+
+ // Make sure no comments are found
+ if ( div.getElementsByTagName("*").length > 0 ) {
+ Expr.find.TAG = function( match, context ) {
+ var results = context.getElementsByTagName( match[1] );
+
+ // Filter out possible comments
+ if ( match[1] === "*" ) {
+ var tmp = [];
+
+ for ( var i = 0; results[i]; i++ ) {
+ if ( results[i].nodeType === 1 ) {
+ tmp.push( results[i] );
+ }
+ }
+
+ results = tmp;
+ }
+
+ return results;
+ };
+ }
+
+ // Check to see if an attribute returns normalized href attributes
+ div.innerHTML = "";
+
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+ div.firstChild.getAttribute("href") !== "#" ) {
+
+ Expr.attrHandle.href = function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ };
+ }
+
+ // release memory in IE
+ div = null;
+})();
+
+if ( document.querySelectorAll ) {
+ (function(){
+ var oldSizzle = Sizzle,
+ div = document.createElement("div"),
+ id = "__sizzle__";
+
+ div.innerHTML = "";
+
+ // Safari can't handle uppercase or unicode characters when
+ // in quirks mode.
+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+ return;
+ }
+
+ Sizzle = function( query, context, extra, seed ) {
+ context = context || document;
+
+ // Only use querySelectorAll on non-XML documents
+ // (ID selectors don't work in non-HTML documents)
+ if ( !seed && !Sizzle.isXML(context) ) {
+ // See if we find a selector to speed up
+ var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+
+ if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+ // Speed-up: Sizzle("TAG")
+ if ( match[1] ) {
+ return makeArray( context.getElementsByTagName( query ), extra );
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+ return makeArray( context.getElementsByClassName( match[2] ), extra );
+ }
+ }
+
+ if ( context.nodeType === 9 ) {
+ // Speed-up: Sizzle("body")
+ // The body element only exists once, optimize finding it
+ if ( query === "body" && context.body ) {
+ return makeArray( [ context.body ], extra );
+
+ // Speed-up: Sizzle("#ID")
+ } else if ( match && match[3] ) {
+ var elem = context.getElementById( match[3] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id === match[3] ) {
+ return makeArray( [ elem ], extra );
+ }
+
+ } else {
+ return makeArray( [], extra );
+ }
+ }
+
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(qsaError) {}
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ var oldContext = context,
+ old = context.getAttribute( "id" ),
+ nid = old || id,
+ hasParent = context.parentNode,
+ relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+ if ( !old ) {
+ context.setAttribute( "id", nid );
+ } else {
+ nid = nid.replace( /'/g, "\\$&" );
+ }
+ if ( relativeHierarchySelector && hasParent ) {
+ context = context.parentNode;
+ }
+
+ try {
+ if ( !relativeHierarchySelector || hasParent ) {
+ return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+ }
+
+ } catch(pseudoError) {
+ } finally {
+ if ( !old ) {
+ oldContext.removeAttribute( "id" );
+ }
+ }
+ }
+ }
+
+ return oldSizzle(query, context, extra, seed);
+ };
+
+ for ( var prop in oldSizzle ) {
+ Sizzle[ prop ] = oldSizzle[ prop ];
+ }
+
+ // release memory in IE
+ div = null;
+ })();
+}
+
+(function(){
+ var html = document.documentElement,
+ matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
+
+ if ( matches ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9 fails this)
+ var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
+ pseudoWorks = false;
+
+ try {
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( document.documentElement, "[test!='']:sizzle" );
+
+ } catch( pseudoError ) {
+ pseudoWorks = true;
+ }
+
+ Sizzle.matchesSelector = function( node, expr ) {
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+ if ( !Sizzle.isXML( node ) ) {
+ try {
+ if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+ var ret = matches.call( node, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || !disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9, so check for that
+ node.document && node.document.nodeType !== 11 ) {
+ return ret;
+ }
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle(expr, null, null, [node]).length > 0;
+ };
+ }
+})();
+
+(function(){
+ var div = document.createElement("div");
+
+ div.innerHTML = "";
+
+ // Opera can't find a second classname (in 9.6)
+ // Also, make sure that getElementsByClassName actually exists
+ if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+ return;
+ }
+
+ // Safari caches class attributes, doesn't catch changes (in 3.2)
+ div.lastChild.className = "e";
+
+ if ( div.getElementsByClassName("e").length === 1 ) {
+ return;
+ }
+
+ Expr.order.splice(1, 0, "CLASS");
+ Expr.find.CLASS = function( match, context, isXML ) {
+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+ return context.getElementsByClassName(match[1]);
+ }
+ };
+
+ // release memory in IE
+ 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 ) {
+ var match = false;
+
+ elem = elem[dir];
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 && !isXML ){
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+
+ if ( elem.nodeName.toLowerCase() === cur ) {
+ match = elem;
+ break;
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+
+ if ( elem ) {
+ var match = false;
+
+ elem = elem[dir];
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 ) {
+ if ( !isXML ) {
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+
+ if ( typeof cur !== "string" ) {
+ if ( elem === cur ) {
+ match = true;
+ break;
+ }
+
+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+ match = elem;
+ break;
+ }
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+if ( document.documentElement.contains ) {
+ Sizzle.contains = function( a, b ) {
+ return a !== b && (a.contains ? a.contains(b) : true);
+ };
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+ Sizzle.contains = function( a, b ) {
+ return !!(a.compareDocumentPosition(b) & 16);
+ };
+
+} else {
+ Sizzle.contains = function() {
+ return false;
+ };
+}
+
+Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context ) {
+ var match,
+ tmpSet = [],
+ later = "",
+ root = context.nodeType ? [context] : context;
+
+ // Position selectors must be done after the filter
+ // And so must :not(positional) so we move all PSEUDOs to the end
+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+ later += match[0];
+ selector = selector.replace( Expr.match.PSEUDO, "" );
+ }
+
+ selector = Expr.relative[selector] ? selector + "*" : selector;
+
+ for ( var i = 0, l = root.length; i < l; i++ ) {
+ Sizzle( selector, root[i], tmpSet );
+ }
+
+ return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+ // Note: This RegExp should be improved, or likely pulled from Sizzle
+ rmultiselector = /,/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ slice = Array.prototype.slice,
+ POS = jQuery.expr.match.POS,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var self = this,
+ i, l;
+
+ if ( typeof selector !== "string" ) {
+ return jQuery( selector ).filter(function() {
+ for ( i = 0, l = self.length; i < l; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ });
+ }
+
+ var ret = this.pushStack( "", "find", selector ),
+ length, n, r;
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ length = ret.length;
+ jQuery.find( selector, this[i], ret );
+
+ if ( i > 0 ) {
+ // Make sure that the results are unique
+ for ( n = length; n < ret.length; n++ ) {
+ for ( r = 0; r < length; r++ ) {
+ if ( ret[r] === ret[n] ) {
+ ret.splice(n--, 1);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ 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 && ( typeof selector === "string" ?
+ jQuery.filter( selector, this ).length > 0 :
+ this.filter( selector ).length > 0 );
+ },
+
+ closest: function( selectors, context ) {
+ var ret = [], i, l, cur = this[0];
+
+ // Array
+ if ( jQuery.isArray( selectors ) ) {
+ var match, selector,
+ matches = {},
+ level = 1;
+
+ if ( cur && selectors.length ) {
+ for ( i = 0, l = selectors.length; i < l; i++ ) {
+ selector = selectors[i];
+
+ if ( !matches[ selector ] ) {
+ matches[ selector ] = POS.test( selector ) ?
+ jQuery( selector, context || this.context ) :
+ selector;
+ }
+ }
+
+ 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, level: level });
+ }
+ }
+
+ cur = cur.parentNode;
+ level++;
+ }
+ }
+
+ return ret;
+ }
+
+ // String
+ var pos = POS.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+
+ } else {
+ cur = cur.parentNode;
+ if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
+ break;
+ }
+ }
+ }
+ }
+
+ ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+ return this.pushStack( ret, "closest", selectors );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+ if ( !elem || typeof elem === "string" ) {
+ return jQuery.inArray( this[0],
+ // If it receives a string, the selector is used
+ // If it receives nothing, the siblings are used
+ elem ? jQuery( elem ) : this.parent().children() );
+ }
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context ) :
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : 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 );
+ }
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+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 ),
+ // The variable 'args' was introduced in
+ // https://github.com/jquery/jquery/commit/52a0238
+ // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
+ // http://code.google.com/p/v8/issues/detail?id=1050
+ args = slice.call(arguments);
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+ if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret, name, args.join(",") );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ 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 );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ nth: function( cur, result, dir, elem ) {
+ result = result || 1;
+ var num = 0;
+
+ for ( ; cur; cur = cur[dir] ) {
+ if ( cur.nodeType === 1 && ++num === result ) {
+ break;
+ }
+ }
+
+ return cur;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+ // Can't pass null or undefined to indexOf in Firefox 4
+ // Set to 0 to skip string check
+ qualifier = qualifier || 0;
+
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === 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 );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+ });
+}
+
+
+
+
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+ rtagName = /<([\w:]+)/,
+ rtbody = /", "" ],
+ legend: [ 1, "" ],
+ thead: [ 1, "
", "
" ],
+ tr: [ 2, "
", "
" ],
+ td: [ 3, "
", "
" ],
+ col: [ 2, "
", "
" ],
+ area: [ 1, "" ],
+ _default: [ 0, "", "" ]
+ };
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize and
+ *
+ * Data must be supplied in
+ * the form:
+ *
+ * > [[x1, y1, r1,