removing a lot of uneeded JS
This commit is contained in:
parent
da6bcb1c48
commit
1534b53686
18
public/site_assets/javascript/jquery-min.js
vendored
18
public/site_assets/javascript/jquery-min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,97 +0,0 @@
|
||||
/*
|
||||
--------------------------------------------------------------------------
|
||||
Code for link-hover text boxes
|
||||
By Nicolas Hoening (Web Site: http://nicolashoening.de)
|
||||
--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// create the popup box - remember to give it some width in your styling
|
||||
document.write('<div id="popup" style="position:abolute; z-index:200;"></div>');
|
||||
var minMarginToBorder = 15; // set how much minimal space there should be to
|
||||
// the next border (horizontally)
|
||||
var ready = false; // we are ready when the mouse is being caught
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#popup').hide();
|
||||
|
||||
// set dynamic coords when the mouse moves
|
||||
$(document).mousemove(function(e){
|
||||
var x,y;
|
||||
|
||||
x = $(document).scrollLeft() + e.clientX;
|
||||
y = $(document).scrollTop() + e.clientY;
|
||||
|
||||
x += 10; // important: if the popup is where the mouse is, the hoverOver/hoverOut events flicker
|
||||
|
||||
var x_y = nudge(x,y); // avoids edge overflow
|
||||
|
||||
// remember: the popup is still hidden
|
||||
$('#popup').css('top', x_y[1] + 'px');
|
||||
$('#popup').css('left', x_y[0] + 'px');
|
||||
|
||||
ready = true;
|
||||
});
|
||||
});
|
||||
|
||||
// avoid edge overflow
|
||||
function nudge(x,y)
|
||||
{
|
||||
var win = $(window);
|
||||
// When the mouse is too far on the right, put window to the left
|
||||
var xtreme =$(document).scrollLeft() + win.width() - $('#popup').width() - minMarginToBorder;
|
||||
if(x > xtreme) {
|
||||
x -= $('#popup').width() + minMarginToBorder + 20;
|
||||
}
|
||||
x = max(x, 0)
|
||||
|
||||
// When the mouse is too close to the bottom, move it up.
|
||||
// I estimate the lines that fit in the width, assuming (a little pessimisticly)
|
||||
// a char width of 15 pixels and a line height of 20 (That should work for most cases)
|
||||
// Unfortunately, I cannot read margin and padding to get even better values,
|
||||
// since JS can only read what is set before itself, apparently. This works quite well
|
||||
// with a padding of 5px.
|
||||
est_lines = parseInt($('#popup').html().length / (parseInt($('#popup').width())/15) );
|
||||
est_lines_to_decide = max(est_lines, 2);
|
||||
if((y + parseInt(est_lines_to_decide * 20)) > (win.height() + $(document).scrollTop())) {
|
||||
y -= parseInt(est_lines * 20) + 20;
|
||||
}
|
||||
|
||||
return [ x, y ];
|
||||
}
|
||||
|
||||
// write content and display
|
||||
function popup(planet_name)
|
||||
{
|
||||
if (ready) {
|
||||
$.ajax({
|
||||
url: 'index.php?page=api&action=starmap&planetname='+planet_name,
|
||||
cache: true,
|
||||
success: function(data) {
|
||||
$('#popup').html(data).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// make content box invisible
|
||||
function kill()
|
||||
{
|
||||
$('#popup').hide();
|
||||
}
|
||||
|
||||
|
||||
function max(a,b){
|
||||
if (a>b) return a;
|
||||
else return b;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$("div#panel").hide();
|
||||
$("#toggle").click(function(){
|
||||
$("#panel").slideToggle("slow");
|
||||
$(this).toggleClass("active");
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
@ -1,12 +0,0 @@
|
||||
/*
|
||||
Highcharts JS v2.1.6 (2011-07-08)
|
||||
MooTools adapter
|
||||
|
||||
(c) 2010-2011 Torstein H?nsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(){var g=window,j=!!g.$merge,h=g.$extend||function(){return Object.append.apply(Object,arguments)};g.HighchartsAdapter={init:function(){var a=Fx.prototype,b=a.start,c=Fx.Morph.prototype,d=c.compute;a.start=function(f){var e=this.element;if(f.d)this.paths=Highcharts.pathAnim.init(e,e.d,this.toD);b.apply(this,arguments);return this};c.compute=function(f,e,k){var i=this.paths;if(i)this.element.attr("d",Highcharts.pathAnim.step(i[0],i[1],k,this.toD));else return d.apply(this,arguments)}},animate:function(a,
|
||||
b,c){var d=a.attr,f=c&&c.complete;if(d&&!a.setStyle){a.getStyle=a.attr;a.setStyle=function(){var e=arguments;a.attr.call(a,e[0],e[1][0])};a.$family=a.uid=true}HighchartsAdapter.stop(a);c=new Fx.Morph(d?a:$(a),h({transition:Fx.Transitions.Quad.easeInOut},c));if(b.d)c.toD=b.d;f&&c.addEvent("complete",f);c.start(b);a.fx=c},each:function(a,b){return j?$each(a,b):a.each(b)},map:function(a,b){return a.map(b)},grep:function(a,b){return a.filter(b)},merge:function(){var a=arguments,b=[{}],c=a.length;if(j)a=
|
||||
$merge.apply(null,a);else{for(;c--;)b[c+1]=a[c];a=Object.merge.apply(Object,b)}return a},addEvent:function(a,b,c){if(typeof b=="string"){if(b=="unload")b="beforeunload";if(!a.addEvent)if(a.nodeName)a=$(a);else h(a,new Events);a.addEvent(b,c)}},removeEvent:function(a,b,c){if(b){if(b=="unload")b="beforeunload";defined(c)?a.removeEvent(b,c):a.removeEvents(b)}else a.removeEvents()},fireEvent:function(a,b,c,d){b=new Event({type:b,target:a});b=h(b,c);b.preventDefault=function(){d=null};a.fireEvent&&a.fireEvent(b.type,
|
||||
b);d&&d(b)},stop:function(a){a.fx&&a.fx.cancel()}}})();
|
||||
@ -1,243 +0,0 @@
|
||||
/**
|
||||
* @license Highcharts JS v2.1.6 (2011-07-08)
|
||||
* MooTools adapter
|
||||
*
|
||||
* (c) 2010-2011 Torstein Hønsi
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
|
||||
// JSLint options:
|
||||
/*global Highcharts, Fx, $, $extend, $each, $merge, Events, Event */
|
||||
|
||||
(function() {
|
||||
|
||||
var win = window,
|
||||
legacy = !!win.$merge,
|
||||
$extend = win.$extend || function() {
|
||||
return Object.append.apply(Object, arguments)
|
||||
};
|
||||
|
||||
win.HighchartsAdapter = {
|
||||
/**
|
||||
* Initialize the adapter. This is run once as Highcharts is first run.
|
||||
*/
|
||||
init: function() {
|
||||
var fxProto = Fx.prototype,
|
||||
fxStart = fxProto.start,
|
||||
morphProto = Fx.Morph.prototype,
|
||||
morphCompute = morphProto.compute;
|
||||
|
||||
// override Fx.start to allow animation of SVG element wrappers
|
||||
fxProto.start = function(from, to) {
|
||||
var fx = this,
|
||||
elem = fx.element;
|
||||
|
||||
// special for animating paths
|
||||
if (from.d) {
|
||||
//this.fromD = this.element.d.split(' ');
|
||||
fx.paths = Highcharts.pathAnim.init(
|
||||
elem,
|
||||
elem.d,
|
||||
fx.toD
|
||||
);
|
||||
}
|
||||
fxStart.apply(fx, arguments);
|
||||
|
||||
return this; // chainable
|
||||
};
|
||||
|
||||
// override Fx.step to allow animation of SVG element wrappers
|
||||
morphProto.compute = function(from, to, delta) {
|
||||
var fx = this,
|
||||
paths = fx.paths;
|
||||
|
||||
if (paths) {
|
||||
fx.element.attr(
|
||||
'd',
|
||||
Highcharts.pathAnim.step(paths[0], paths[1], delta, fx.toD)
|
||||
);
|
||||
} else {
|
||||
return morphCompute.apply(fx, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Animate a HTML element or SVG element wrapper
|
||||
* @param {Object} el
|
||||
* @param {Object} params
|
||||
* @param {Object} options jQuery-like animation options: duration, easing, callback
|
||||
*/
|
||||
animate: function (el, params, options) {
|
||||
var isSVGElement = el.attr,
|
||||
effect,
|
||||
complete = options && options.complete;
|
||||
|
||||
if (isSVGElement && !el.setStyle) {
|
||||
// add setStyle and getStyle methods for internal use in Moo
|
||||
el.getStyle = el.attr;
|
||||
el.setStyle = function() { // property value is given as array in Moo - break it down
|
||||
var args = arguments;
|
||||
el.attr.call(el, args[0], args[1][0]);
|
||||
}
|
||||
// dirty hack to trick Moo into handling el as an element wrapper
|
||||
el.$family = el.uid = true;
|
||||
}
|
||||
|
||||
// stop running animations
|
||||
HighchartsAdapter.stop(el);
|
||||
|
||||
// define and run the effect
|
||||
effect = new Fx.Morph(
|
||||
isSVGElement ? el : $(el),
|
||||
$extend({
|
||||
transition: Fx.Transitions.Quad.easeInOut
|
||||
}, options)
|
||||
);
|
||||
|
||||
// special treatment for paths
|
||||
if (params.d) {
|
||||
effect.toD = params.d;
|
||||
}
|
||||
|
||||
// jQuery-like events
|
||||
if (complete) {
|
||||
effect.addEvent('complete', complete);
|
||||
}
|
||||
|
||||
// run
|
||||
effect.start(params);
|
||||
|
||||
// record for use in stop method
|
||||
el.fx = effect;
|
||||
},
|
||||
|
||||
/**
|
||||
* MooTool's each function
|
||||
*
|
||||
*/
|
||||
each: function(arr, fn) {
|
||||
return legacy ?
|
||||
$each(arr, fn) :
|
||||
arr.each(fn);
|
||||
},
|
||||
|
||||
/**
|
||||
* Map an array
|
||||
* @param {Array} arr
|
||||
* @param {Function} fn
|
||||
*/
|
||||
map: function (arr, fn){
|
||||
return arr.map(fn);
|
||||
},
|
||||
|
||||
/**
|
||||
* Grep or filter an array
|
||||
* @param {Array} arr
|
||||
* @param {Function} fn
|
||||
*/
|
||||
grep: function(arr, fn) {
|
||||
return arr.filter(fn);
|
||||
},
|
||||
|
||||
/**
|
||||
* Deep merge two objects and return a third
|
||||
*/
|
||||
merge: function() {
|
||||
var args = arguments,
|
||||
args13 = [{}], // MooTools 1.3+
|
||||
i = args.length,
|
||||
ret;
|
||||
|
||||
if (legacy) {
|
||||
ret = $merge.apply(null, args);
|
||||
} else {
|
||||
while (i--) {
|
||||
args13[i + 1] = args[i];
|
||||
}
|
||||
ret = Object.merge.apply(Object, args13);
|
||||
}
|
||||
|
||||
return ret;
|
||||
},
|
||||
|
||||
/**
|
||||
* Add an event listener
|
||||
* @param {Object} el HTML element or custom object
|
||||
* @param {String} type Event type
|
||||
* @param {Function} fn Event handler
|
||||
*/
|
||||
addEvent: function (el, type, fn) {
|
||||
if (typeof type == 'string') { // chart broke due to el being string, type function
|
||||
|
||||
if (type == 'unload') { // Moo self destructs before custom unload events
|
||||
type = 'beforeunload';
|
||||
}
|
||||
|
||||
// if the addEvent method is not defined, el is a custom Highcharts object
|
||||
// like series or point
|
||||
if (!el.addEvent) {
|
||||
if (el.nodeName) {
|
||||
el = $(el); // a dynamically generated node
|
||||
} else {
|
||||
$extend(el, new Events()); // a custom object
|
||||
}
|
||||
}
|
||||
|
||||
el.addEvent(type, fn);
|
||||
}
|
||||
},
|
||||
|
||||
removeEvent: function(el, type, fn) {
|
||||
if (type) {
|
||||
if (type == 'unload') { // Moo self destructs before custom unload events
|
||||
type = 'beforeunload';
|
||||
}
|
||||
|
||||
if (defined(fn)) {
|
||||
el.removeEvent(type, fn);
|
||||
} else {
|
||||
el.removeEvents(type);
|
||||
}
|
||||
} else {
|
||||
el.removeEvents();
|
||||
}
|
||||
},
|
||||
|
||||
fireEvent: function(el, event, eventArguments, defaultFunction) {
|
||||
// create an event object that keeps all functions
|
||||
event = new Event({
|
||||
type: event,
|
||||
target: el
|
||||
});
|
||||
event = $extend(event, eventArguments);
|
||||
// override the preventDefault function to be able to use
|
||||
// this for custom events
|
||||
event.preventDefault = function() {
|
||||
defaultFunction = null;
|
||||
};
|
||||
// if fireEvent is not available on the object, there hasn't been added
|
||||
// any events to it above
|
||||
if (el.fireEvent) {
|
||||
el.fireEvent(event.type, event);
|
||||
}
|
||||
|
||||
// fire the default if it is passed and it is not prevented above
|
||||
if (defaultFunction) {
|
||||
defaultFunction(event);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop running animations on the object
|
||||
*/
|
||||
stop: function (el) {
|
||||
if (el.fx) {
|
||||
el.fx.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
@ -1,14 +0,0 @@
|
||||
/*
|
||||
Highcharts JS v2.1.6 (2011-07-08)
|
||||
Prototype adapter
|
||||
|
||||
@author Michael Nelson, Torstein H?nsi.
|
||||
|
||||
Feel free to use and modify this script.
|
||||
Highcharts license: www.highcharts.com/license.
|
||||
*/
|
||||
var HighchartsAdapter=function(){var f=typeof Effect!="undefined";return{init:function(){if(f)Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(b,a,c,d){var e;this.element=b;e=b.attr(a);if(a=="d"){this.paths=Highcharts.pathAnim.init(b,b.d,c);this.toD=c;e=0;c=1}this.start(Object.extend(d||{},{from:e,to:c,attribute:a}))},setup:function(){HighchartsAdapter._extend(this.element);this.element._highchart_animation=this},update:function(b){var a=this.paths;if(a)b=Highcharts.pathAnim.step(a[0],
|
||||
a[1],b,this.toD);this.element.attr(this.options.attribute,b)},finish:function(){this.element._highchart_animation=null}})},addEvent:function(b,a,c){if(b.addEventListener||b.attachEvent)Event.observe($(b),a,c);else{HighchartsAdapter._extend(b);b._highcharts_observe(a,c)}},animate:function(b,a,c){var d;c=c||{};c.delay=0;c.duration=(c.duration||500)/1E3;if(f)for(d in a)new Effect.HighchartsTransition($(b),d,a[d],c);else for(d in a)b.attr(d,a[d]);if(!b.attr)throw"Todo: implement animate DOM objects";
|
||||
},stop:function(b){b._highcharts_extended&&b._highchart_animation&&b._highchart_animation.cancel()},each:function(b,a){$A(b).each(a)},fireEvent:function(b,a,c,d){if(a.preventDefault)d=null;if(b.fire)b.fire(a,c);else b._highcharts_extended&&b._highcharts_fire(a,c);d&&d(c)},removeEvent:function(b,a,c){if($(b).stopObserving)$(b).stopObserving(a,c);else{HighchartsAdapter._extend(b);b._highcharts_stop_observing(a,c)}},grep:function(b,a){return b.findAll(a)},map:function(b,a){return b.map(a)},merge:function(){function b(a,
|
||||
c){var d,e;for(e in c){d=c[e];a[e]=d&&typeof d=="object"&&d.constructor!=Array&&typeof d.nodeType!=="number"?b(a[e]||{},d):c[e]}return a}return function(){for(var a=arguments,c={},d=0;d<a.length;d++)c=b(c,a[d]);return c}.apply(this,arguments)},_extend:function(b){b._highcharts_extended||Object.extend(b,{_highchart_events:{},_highchart_animation:null,_highcharts_extended:true,_highcharts_observe:function(a,c){this._highchart_events[a]=[this._highchart_events[a],c].compact().flatten()},_highcharts_stop_observing:function(a,
|
||||
c){if(a)if(c)this._highchart_events[a]=[this._highchart_events[a]].compact().flatten().without(c);else delete this._highchart_events[a];else this._highchart_events={}},_highcharts_fire:function(a,c){(this._highchart_events[a]||[]).each(function(d){c&&c.stopped||d.bind(this)(c)}.bind(this))}})}}}();
|
||||
@ -1,284 +0,0 @@
|
||||
/**
|
||||
* @license Highcharts JS v2.1.6 (2011-07-08)
|
||||
* Prototype adapter
|
||||
*
|
||||
* @author Michael Nelson, Torstein Hønsi.
|
||||
*
|
||||
* Feel free to use and modify this script.
|
||||
* Highcharts license: www.highcharts.com/license.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Known issues:
|
||||
* - Some grid lines land in wrong position - http://jsfiddle.net/highcharts/jaRhY/28
|
||||
*/
|
||||
|
||||
// JSLint options:
|
||||
/*jslint forin: true */
|
||||
/*global Effect, Class, Highcharts, Event, $, $A */
|
||||
|
||||
// Adapter interface between prototype and the Highcarts charting library
|
||||
var HighchartsAdapter = (function() {
|
||||
|
||||
var hasEffect = typeof Effect != 'undefined';
|
||||
|
||||
return {
|
||||
|
||||
init: function() {
|
||||
|
||||
if (hasEffect) {
|
||||
/**
|
||||
* Animation for Highcharts SVG element wrappers only
|
||||
* @param {Object} element
|
||||
* @param {Object} attribute
|
||||
* @param {Object} to
|
||||
* @param {Object} options
|
||||
*/
|
||||
Effect.HighchartsTransition = Class.create(Effect.Base, {
|
||||
initialize: function(element, attr, to, options){
|
||||
var from,
|
||||
opts;
|
||||
|
||||
this.element = element;
|
||||
|
||||
from = element.attr(attr);
|
||||
|
||||
// special treatment for paths
|
||||
if (attr == 'd') {
|
||||
this.paths = Highcharts.pathAnim.init(
|
||||
element,
|
||||
element.d,
|
||||
to
|
||||
);
|
||||
this.toD = to;
|
||||
|
||||
|
||||
// fake values in order to read relative position as a float in update
|
||||
from = 0;
|
||||
to = 1;
|
||||
}
|
||||
|
||||
opts = Object.extend((options || {}), {
|
||||
from: from,
|
||||
to: to,
|
||||
attribute: attr
|
||||
});
|
||||
this.start(opts);
|
||||
},
|
||||
setup: function(){
|
||||
HighchartsAdapter._extend(this.element);
|
||||
this.element._highchart_animation = this;
|
||||
},
|
||||
update: function(position) {
|
||||
var paths = this.paths;
|
||||
|
||||
if (paths) {
|
||||
position = Highcharts.pathAnim.step(paths[0], paths[1], position, this.toD);
|
||||
}
|
||||
|
||||
this.element.attr(this.options.attribute, position);
|
||||
},
|
||||
finish: function(){
|
||||
this.element._highchart_animation = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// el needs an event to be attached. el is not necessarily a dom element
|
||||
addEvent: function(el, event, fn) {
|
||||
if (el.addEventListener || el.attachEvent) {
|
||||
Event.observe($(el), event, fn);
|
||||
|
||||
} else {
|
||||
HighchartsAdapter._extend(el);
|
||||
el._highcharts_observe(event, fn);
|
||||
}
|
||||
},
|
||||
|
||||
// motion makes things pretty. use it if effects is loaded, if not... still get to the end result.
|
||||
animate: function(el, params, options) {
|
||||
var key,
|
||||
fx;
|
||||
|
||||
// default options
|
||||
options = options || {};
|
||||
options.delay = 0;
|
||||
options.duration = (options.duration || 500) / 1000;
|
||||
|
||||
// animate wrappers and DOM elements
|
||||
if (hasEffect) {
|
||||
for (key in params) {
|
||||
fx = new Effect.HighchartsTransition($(el), key, params[key], options);
|
||||
}
|
||||
} else {
|
||||
for (key in params) {
|
||||
el.attr(key, params[key]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!el.attr) {
|
||||
throw 'Todo: implement animate DOM objects';
|
||||
}
|
||||
},
|
||||
|
||||
// this only occurs in higcharts 2.0+
|
||||
stop: function(el){
|
||||
if (el._highcharts_extended && el._highchart_animation) {
|
||||
el._highchart_animation.cancel();
|
||||
}
|
||||
},
|
||||
|
||||
// um.. each
|
||||
each: function(arr, fn){
|
||||
$A(arr).each(fn);
|
||||
},
|
||||
|
||||
// fire an event based on an event name (event) and an object (el).
|
||||
// again, el may not be a dom element
|
||||
fireEvent: function(el, event, eventArguments, defaultFunction){
|
||||
if (event.preventDefault) {
|
||||
defaultFunction = null;
|
||||
}
|
||||
|
||||
if (el.fire) {
|
||||
el.fire(event, eventArguments);
|
||||
} else if (el._highcharts_extended) {
|
||||
el._highcharts_fire(event, eventArguments);
|
||||
}
|
||||
|
||||
if (defaultFunction) {
|
||||
defaultFunction(eventArguments);
|
||||
}
|
||||
},
|
||||
|
||||
removeEvent: function(el, event, handler){
|
||||
if ($(el).stopObserving) {
|
||||
$(el).stopObserving(event, handler);
|
||||
} else {
|
||||
HighchartsAdapter._extend(el);
|
||||
el._highcharts_stop_observing(event, handler);
|
||||
}
|
||||
},
|
||||
|
||||
// um, grep
|
||||
grep: function(arr, fn){
|
||||
return arr.findAll(fn);
|
||||
},
|
||||
|
||||
// um, map
|
||||
map: function(arr, fn){
|
||||
return arr.map(fn);
|
||||
},
|
||||
|
||||
// deep merge. merge({a : 'a', b : {b1 : 'b1', b2 : 'b2'}}, {b : {b2 : 'b2_prime'}, c : 'c'}) => {a : 'a', b : {b1 : 'b1', b2 : 'b2_prime'}, c : 'c'}
|
||||
/*merge: function(){
|
||||
function doCopy(copy, original) {
|
||||
var value,
|
||||
key,
|
||||
undef,
|
||||
nil,
|
||||
same,
|
||||
obj,
|
||||
arr,
|
||||
node;
|
||||
|
||||
for (key in original) {
|
||||
value = original[key];
|
||||
undef = typeof(value) === 'undefined';
|
||||
nil = value === null;
|
||||
same = original === copy[key];
|
||||
|
||||
if (undef || nil || same) {
|
||||
continue;
|
||||
}
|
||||
|
||||
obj = typeof(value) === 'object';
|
||||
arr = value && obj && value.constructor == Array;
|
||||
node = !!value.nodeType;
|
||||
|
||||
if (obj && !arr && !node) {
|
||||
copy[key] = doCopy(typeof copy[key] == 'object' ? copy[key] : {}, value);
|
||||
}
|
||||
else {
|
||||
copy[key] = original[key];
|
||||
}
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
var args = arguments, retVal = {};
|
||||
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
retVal = doCopy(retVal, args[i]);
|
||||
}
|
||||
|
||||
return retVal;
|
||||
},*/
|
||||
merge: function() { // the built-in prototype merge function doesn't do deep copy
|
||||
function doCopy(copy, original) {
|
||||
var value;
|
||||
|
||||
for (var key in original) {
|
||||
value = original[key];
|
||||
if (value && typeof value == 'object' && value.constructor != Array &&
|
||||
typeof value.nodeType !== 'number') {
|
||||
copy[key] = doCopy(copy[key] || {}, value); // copy
|
||||
|
||||
} else {
|
||||
copy[key] = original[key];
|
||||
}
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
function merge() {
|
||||
var args = arguments,
|
||||
retVal = {};
|
||||
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
retVal = doCopy(retVal, args[i])
|
||||
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
return merge.apply(this, arguments);
|
||||
},
|
||||
|
||||
// extend an object to handle highchart events (highchart objects, not svg elements).
|
||||
// this is a very simple way of handling events but whatever, it works (i think)
|
||||
_extend: function(object){
|
||||
if (!object._highcharts_extended) {
|
||||
Object.extend(object, {
|
||||
_highchart_events: {},
|
||||
_highchart_animation: null,
|
||||
_highcharts_extended: true,
|
||||
_highcharts_observe: function(name, fn){
|
||||
this._highchart_events[name] = [this._highchart_events[name], fn].compact().flatten();
|
||||
},
|
||||
_highcharts_stop_observing: function(name, fn){
|
||||
if (name) {
|
||||
if (fn) {
|
||||
this._highchart_events[name] = [this._highchart_events[name]].compact().flatten().without(fn);
|
||||
} else {
|
||||
delete this._highchart_events[name];
|
||||
}
|
||||
} else {
|
||||
this._highchart_events = {};
|
||||
}
|
||||
},
|
||||
_highcharts_fire: function(name, args){
|
||||
(this._highchart_events[name] || []).each(function(fn){
|
||||
if (args && args.stopped) {
|
||||
return; // "throw $break" wasn't working. i think because of the scope of 'this'.
|
||||
}
|
||||
fn.bind(this)(args);
|
||||
}
|
||||
.bind(this));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
@ -1,370 +0,0 @@
|
||||
(function () {
|
||||
function log() {
|
||||
if (typeof (console) != 'undefined' && typeof (console.log) == 'function') {
|
||||
Array.prototype.unshift.call(arguments, '[Ajax Upload]');
|
||||
console.log(Array.prototype.join.call(arguments, ' '))
|
||||
}
|
||||
}
|
||||
function addEvent(el, type, fn) {
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener(type, fn, false)
|
||||
} else if (el.attachEvent) {
|
||||
el.attachEvent('on' + type, function () {
|
||||
fn.call(el)
|
||||
})
|
||||
} else {
|
||||
throw new Error('not supported or DOM not loaded')
|
||||
}
|
||||
}
|
||||
function addResizeEvent(fn) {
|
||||
var timeout;
|
||||
addEvent(window, 'resize', function () {
|
||||
if (timeout) {
|
||||
clearTimeout(timeout)
|
||||
}
|
||||
timeout = setTimeout(fn, 100)
|
||||
})
|
||||
}
|
||||
if (document.documentElement.getBoundingClientRect) {
|
||||
var getOffset = function (el) {
|
||||
var box = el.getBoundingClientRect();
|
||||
var doc = el.ownerDocument;
|
||||
var body = doc.body;
|
||||
var docElem = doc.documentElement;
|
||||
var clientTop = docElem.clientTop || body.clientTop || 0;
|
||||
var clientLeft = docElem.clientLeft || body.clientLeft || 0;
|
||||
var zoom = 1;
|
||||
if (body.getBoundingClientRect) {
|
||||
var bound = body.getBoundingClientRect();
|
||||
zoom = (bound.right - bound.left) / body.clientWidth
|
||||
}
|
||||
if (zoom > 1) {
|
||||
clientTop = 0;
|
||||
clientLeft = 0
|
||||
}
|
||||
var top = box.top / zoom + (window.pageYOffset || docElem && docElem.scrollTop / zoom || body.scrollTop / zoom) - clientTop,
|
||||
left = box.left / zoom + (window.pageXOffset || docElem && docElem.scrollLeft / zoom || body.scrollLeft / zoom) - clientLeft;
|
||||
return {
|
||||
top: top,
|
||||
left: left
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var getOffset = function (el) {
|
||||
var top = 0,
|
||||
left = 0;
|
||||
do {
|
||||
top += el.offsetTop || 0;
|
||||
left += el.offsetLeft || 0;
|
||||
el = el.offsetParent
|
||||
} while (el);
|
||||
return {
|
||||
left: left,
|
||||
top: top
|
||||
}
|
||||
}
|
||||
}
|
||||
function getBox(el) {
|
||||
var left, right, top, bottom;
|
||||
var offset = getOffset(el);
|
||||
left = offset.left;
|
||||
top = offset.top;
|
||||
right = left + el.offsetWidth;
|
||||
bottom = top + el.offsetHeight;
|
||||
return {
|
||||
left: left,
|
||||
right: right,
|
||||
top: top,
|
||||
bottom: bottom
|
||||
}
|
||||
}
|
||||
function addStyles(el, styles) {
|
||||
for (var name in styles) {
|
||||
if (styles.hasOwnProperty(name)) {
|
||||
el.style[name] = styles[name]
|
||||
}
|
||||
}
|
||||
}
|
||||
function copyLayout(from, to) {
|
||||
var box = getBox(from);
|
||||
addStyles(to, {
|
||||
position: 'absolute',
|
||||
left: box.left + 'px',
|
||||
top: box.top + 'px',
|
||||
width: from.offsetWidth + 'px',
|
||||
height: from.offsetHeight + 'px'
|
||||
})
|
||||
}
|
||||
var toElement = (function () {
|
||||
var div = document.createElement('div');
|
||||
return function (html) {
|
||||
div.innerHTML = html;
|
||||
var el = div.firstChild;
|
||||
return div.removeChild(el)
|
||||
}
|
||||
})();
|
||||
var getUID = (function () {
|
||||
var id = 0;
|
||||
return function () {
|
||||
return 'ValumsAjaxUpload' + id++
|
||||
}
|
||||
})();
|
||||
|
||||
function fileFromPath(file) {
|
||||
return file.replace(/.*(\/|\\)/, "")
|
||||
}
|
||||
function getExt(file) {
|
||||
return (-1 !== file.indexOf('.')) ? file.replace(/.*[.]/, '') : ''
|
||||
}
|
||||
function hasClass(el, name) {
|
||||
var re = new RegExp('\\b' + name + '\\b');
|
||||
return re.test(el.className)
|
||||
}
|
||||
function addClass(el, name) {
|
||||
if (!hasClass(el, name)) {
|
||||
el.className += ' ' + name
|
||||
}
|
||||
}
|
||||
function removeClass(el, name) {
|
||||
var re = new RegExp('\\b' + name + '\\b');
|
||||
el.className = el.className.replace(re, '')
|
||||
}
|
||||
function removeNode(el) {
|
||||
el.parentNode.removeChild(el)
|
||||
}
|
||||
window.AjaxUpload = function (button, options) {
|
||||
this._settings = {
|
||||
action: 'upload.php',
|
||||
name: 'userfile',
|
||||
data: {},
|
||||
autoSubmit: true,
|
||||
responseType: false,
|
||||
hoverClass: 'hover',
|
||||
disabledClass: 'disabled',
|
||||
onChange: function (file, extension) {},
|
||||
onSubmit: function (file, extension) {},
|
||||
onComplete: function (file, response) {}
|
||||
};
|
||||
for (var i in options) {
|
||||
if (options.hasOwnProperty(i)) {
|
||||
this._settings[i] = options[i]
|
||||
}
|
||||
}
|
||||
if (button.jquery) {
|
||||
button = button[0]
|
||||
} else if (typeof button == "string") {
|
||||
if (/^#.*/.test(button)) {
|
||||
button = button.slice(1)
|
||||
}
|
||||
button = document.getElementById(button)
|
||||
}
|
||||
if (!button || button.nodeType !== 1) {
|
||||
throw new Error("Please make sure that you're passing a valid element")
|
||||
}
|
||||
if (button.nodeName.toUpperCase() == 'A') {
|
||||
addEvent(button, 'click', function (e) {
|
||||
if (e && e.preventDefault) {
|
||||
e.preventDefault()
|
||||
} else if (window.event) {
|
||||
window.event.returnValue = false
|
||||
}
|
||||
})
|
||||
}
|
||||
this._button = button;
|
||||
this._input = null;
|
||||
this._disabled = false;
|
||||
this.enable();
|
||||
this._rerouteClicks()
|
||||
};
|
||||
AjaxUpload.prototype = {
|
||||
setData: function (data) {
|
||||
this._settings.data = data
|
||||
},
|
||||
disable: function () {
|
||||
addClass(this._button, this._settings.disabledClass);
|
||||
this._disabled = true;
|
||||
var nodeName = this._button.nodeName.toUpperCase();
|
||||
if (nodeName == 'INPUT' || nodeName == 'BUTTON') {
|
||||
this._button.setAttribute('disabled', 'disabled')
|
||||
}
|
||||
if (this._input) {
|
||||
this._input.parentNode.style.visibility = 'hidden'
|
||||
}
|
||||
},
|
||||
enable: function () {
|
||||
removeClass(this._button, this._settings.disabledClass);
|
||||
this._button.removeAttribute('disabled');
|
||||
this._disabled = false
|
||||
},
|
||||
_createInput: function () {
|
||||
var self = this;
|
||||
var input = document.createElement("input");
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('name', this._settings.name);
|
||||
addStyles(input, {
|
||||
'position': 'absolute',
|
||||
'right': 0,
|
||||
'margin': 0,
|
||||
'padding': 0,
|
||||
'fontSize': '480px',
|
||||
'cursor': 'pointer'
|
||||
});
|
||||
var div = document.createElement("div");
|
||||
addStyles(div, {
|
||||
'display': 'block',
|
||||
'position': 'absolute',
|
||||
'overflow': 'hidden',
|
||||
'margin': 0,
|
||||
'padding': 0,
|
||||
'opacity': 0,
|
||||
'direction': 'ltr',
|
||||
'zIndex': 2147483583
|
||||
});
|
||||
if (div.style.opacity !== "0") {
|
||||
if (typeof (div.filters) == 'undefined') {
|
||||
throw new Error('Opacity not supported by the browser')
|
||||
}
|
||||
div.style.filter = "alpha(opacity=0)"
|
||||
}
|
||||
addEvent(input, 'change', function () {
|
||||
if (!input || input.value === '') {
|
||||
return
|
||||
}
|
||||
var file = fileFromPath(input.value);
|
||||
if (false === self._settings.onChange.call(self, file, getExt(file))) {
|
||||
self._clearInput();
|
||||
return
|
||||
}
|
||||
if (self._settings.autoSubmit) {
|
||||
self.submit()
|
||||
}
|
||||
});
|
||||
addEvent(input, 'mouseover', function () {
|
||||
addClass(self._button, self._settings.hoverClass)
|
||||
});
|
||||
addEvent(input, 'mouseout', function () {
|
||||
removeClass(self._button, self._settings.hoverClass);
|
||||
input.parentNode.style.visibility = 'hidden'
|
||||
});
|
||||
div.appendChild(input);
|
||||
document.body.appendChild(div);
|
||||
this._input = input
|
||||
},
|
||||
_clearInput: function () {
|
||||
if (!this._input) {
|
||||
return
|
||||
}
|
||||
removeNode(this._input.parentNode);
|
||||
this._input = null;
|
||||
this._createInput();
|
||||
removeClass(this._button, this._settings.hoverClass)
|
||||
},
|
||||
_rerouteClicks: function () {
|
||||
var self = this;
|
||||
addEvent(self._button, 'mouseover', function () {
|
||||
if (self._disabled) {
|
||||
return
|
||||
}
|
||||
if (!self._input) {
|
||||
self._createInput()
|
||||
}
|
||||
var div = self._input.parentNode;
|
||||
copyLayout(self._button, div);
|
||||
div.style.visibility = 'visible'
|
||||
})
|
||||
},
|
||||
_createIframe: function () {
|
||||
var id = getUID();
|
||||
var iframe = toElement('<iframe src="javascript:false;" name="' + id + '" />');
|
||||
iframe.setAttribute('id', id);
|
||||
iframe.style.display = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
return iframe
|
||||
},
|
||||
_createForm: function (iframe) {
|
||||
var settings = this._settings;
|
||||
var form = toElement('<form method="post" enctype="multipart/form-data"></form>');
|
||||
form.setAttribute('action', settings.action);
|
||||
form.setAttribute('target', iframe.name);
|
||||
form.style.display = 'none';
|
||||
document.body.appendChild(form);
|
||||
for (var prop in settings.data) {
|
||||
if (settings.data.hasOwnProperty(prop)) {
|
||||
var el = document.createElement("input");
|
||||
el.setAttribute('type', 'hidden');
|
||||
el.setAttribute('name', prop);
|
||||
el.setAttribute('value', settings.data[prop]);
|
||||
form.appendChild(el)
|
||||
}
|
||||
}
|
||||
return form
|
||||
},
|
||||
_getResponse: function (iframe, file) {
|
||||
var toDeleteFlag = false,
|
||||
self = this,
|
||||
settings = this._settings;
|
||||
addEvent(iframe, 'load', function () {
|
||||
if (iframe.src == "javascript:'%3Chtml%3E%3C/html%3E';" || iframe.src == "javascript:'<html></html>';") {
|
||||
if (toDeleteFlag) {
|
||||
setTimeout(function () {
|
||||
removeNode(iframe)
|
||||
}, 0)
|
||||
}
|
||||
return
|
||||
}
|
||||
var doc = iframe.contentDocument ? iframe.contentDocument : window.frames[iframe.id].document;
|
||||
if (doc.readyState && doc.readyState != 'complete') {
|
||||
return
|
||||
}
|
||||
if (doc.body && doc.body.innerHTML == "false") {
|
||||
return
|
||||
}
|
||||
var response;
|
||||
if (doc.XMLDocument) {
|
||||
response = doc.XMLDocument
|
||||
} else if (doc.body) {
|
||||
response = doc.body.innerHTML;
|
||||
if (settings.responseType && settings.responseType.toLowerCase() == 'json') {
|
||||
if (doc.body.firstChild && doc.body.firstChild.nodeName.toUpperCase() == 'PRE') {
|
||||
response = doc.body.firstChild.firstChild.nodeValue
|
||||
}
|
||||
if (response) {
|
||||
response = eval("(" + response + ")")
|
||||
} else {
|
||||
response = {}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
response = doc
|
||||
}
|
||||
settings.onComplete.call(self, file, response);
|
||||
toDeleteFlag = true;
|
||||
iframe.src = "javascript:'<html></html>';"
|
||||
})
|
||||
},
|
||||
submit: function () {
|
||||
var self = this,
|
||||
settings = this._settings;
|
||||
if (!this._input || this._input.value === '') {
|
||||
return
|
||||
}
|
||||
var file = fileFromPath(this._input.value);
|
||||
if (false === settings.onSubmit.call(this, file, getExt(file))) {
|
||||
this._clearInput();
|
||||
return
|
||||
}
|
||||
var iframe = this._createIframe();
|
||||
var form = this._createForm(iframe);
|
||||
removeNode(this._input.parentNode);
|
||||
removeClass(self._button, self._settings.hoverClass);
|
||||
form.appendChild(this._input);
|
||||
form.submit();
|
||||
removeNode(form);
|
||||
form = null;
|
||||
removeNode(this._input);
|
||||
this._input = null;
|
||||
this._getResponse(iframe, file);
|
||||
this._createInput()
|
||||
}
|
||||
}
|
||||
})();
|
||||
@ -1,10 +1,5 @@
|
||||
$(function () {
|
||||
|
||||
// Preload images
|
||||
//$.preloadCssImages();
|
||||
|
||||
|
||||
|
||||
// CSS tweaks
|
||||
$('#header #nav li:last').addClass('nobg');
|
||||
$('.block_head ul').each(function () {
|
||||
@ -12,8 +7,6 @@ $(function () {
|
||||
});
|
||||
$('.block form input[type=file]').addClass('file');
|
||||
|
||||
|
||||
|
||||
// Web stats
|
||||
$('table.stats').each(function () {
|
||||
|
||||
@ -23,9 +16,9 @@ $(function () {
|
||||
var statsType = 'area';
|
||||
}
|
||||
|
||||
// calculate width of graph so it doesnt overflow its parent div
|
||||
// calculate width of graph so it doesnt overflow its parent div
|
||||
//var chart_width = ($(this).parent('div').width()) - 60;
|
||||
// hack to statically set width as something is broken with div width calculation - anni
|
||||
// hack to statically set width as something is broken with div width calculation - anni
|
||||
var chart_width = $(document).width() - 340;
|
||||
|
||||
if (statsType == 'line' || statsType == 'pie') {
|
||||
@ -59,8 +52,6 @@ $(function () {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Sort table
|
||||
$("table.sortable").tablesorter({
|
||||
headers: {
|
||||
@ -77,28 +68,11 @@ $(function () {
|
||||
|
||||
$('.block table tr th.header').css('cursor', 'pointer');
|
||||
|
||||
|
||||
|
||||
// Check / uncheck all checkboxes
|
||||
$('.check_all').click(function () {
|
||||
$(this).parents('form').find('input:checkbox').attr('checked', $(this).is(':checked'));
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Set WYSIWYG editor
|
||||
$('.wysiwyg').wysiwyg({
|
||||
css: "css/jquery.wysiwyg.css",
|
||||
brIE: false
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Modal boxes - to all links with rel="facebox"
|
||||
$('a[rel*=facebox]').facebox()
|
||||
|
||||
|
||||
|
||||
// Messages
|
||||
$('.block .message').hide().append('<span class="close" title="Dismiss"></span>').fadeIn('slow');
|
||||
$('.block .message .close').hover(
|
||||
@ -115,13 +89,6 @@ $(function () {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Form select styling
|
||||
$("form select.styled").select_skin();
|
||||
|
||||
|
||||
|
||||
// Tabs
|
||||
$(".tab_content").hide();
|
||||
$("ul.tabs li:first-child").addClass("active").show();
|
||||
@ -141,8 +108,6 @@ $(function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Sidebar Tabs
|
||||
$(".sidebar_content").hide();
|
||||
|
||||
@ -168,72 +133,11 @@ $(function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Block search
|
||||
$('.block .block_head form .text').bind('click', function () {
|
||||
$(this).attr('value', '');
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Image actions menu
|
||||
$('ul.imglist li').hover(
|
||||
|
||||
function () {
|
||||
$(this).find('ul').css('display', 'none').fadeIn('fast').css('display', 'block');
|
||||
}, function () {
|
||||
$(this).find('ul').fadeOut(100);
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Image delete confirmation
|
||||
$('ul.imglist .delete a').click(function () {
|
||||
if (confirm("Are you sure you want to delete this image?")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Style file input
|
||||
$("input[type=file]").filestyle({
|
||||
image: "images/upload.gif",
|
||||
imageheight: 30,
|
||||
imagewidth: 80,
|
||||
width: 250
|
||||
});
|
||||
|
||||
|
||||
|
||||
// File upload
|
||||
if ($('#fileupload').length) {
|
||||
new AjaxUpload('fileupload', {
|
||||
action: 'upload-handler.php',
|
||||
autoSubmit: true,
|
||||
name: 'userfile',
|
||||
responseType: 'text/html',
|
||||
onSubmit: function (file, ext) {
|
||||
$('.fileupload #uploadmsg').addClass('loading').text('Uploading...');
|
||||
this.disable();
|
||||
},
|
||||
onComplete: function (file, response) {
|
||||
$('.fileupload #uploadmsg').removeClass('loading').text(response);
|
||||
this.enable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Date picker
|
||||
$('input.date_picker').date_input();
|
||||
|
||||
|
||||
|
||||
// Navigation dropdown fix for IE6
|
||||
if (jQuery.browser.version.substr(0, 1) < 7) {
|
||||
$('#header #nav li').hover(
|
||||
@ -245,8 +149,4 @@ $(function () {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// IE6 PNG fix
|
||||
$(document).pngFix();
|
||||
|
||||
});
|
||||
|
||||
@ -1,329 +0,0 @@
|
||||
/*
|
||||
* Facebox (for jQuery)
|
||||
* version: 1.2 (05/05/2008)
|
||||
* @requires jQuery v1.2 or later
|
||||
*
|
||||
* Examples at http://famspam.com/facebox/
|
||||
*
|
||||
* Licensed under the MIT:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Copyright 2007, 2008 Chris Wanstrath [ chris@ozmm.org ]
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* jQuery(document).ready(function() {
|
||||
* jQuery('a[rel*=facebox]').facebox()
|
||||
* })
|
||||
*
|
||||
* <a href="#terms" rel="facebox">Terms</a>
|
||||
* Loads the #terms div in the box
|
||||
*
|
||||
* <a href="terms.html" rel="facebox">Terms</a>
|
||||
* Loads the terms.html page in the box
|
||||
*
|
||||
* <a href="terms.png" rel="facebox">Terms</a>
|
||||
* Loads the terms.png image in the box
|
||||
*
|
||||
*
|
||||
* You can also use it programmatically:
|
||||
*
|
||||
* jQuery.facebox('some html')
|
||||
*
|
||||
* The above will open a facebox with "some html" as the content.
|
||||
*
|
||||
* jQuery.facebox(function($) {
|
||||
* $.get('blah.html', function(data) { $.facebox(data) })
|
||||
* })
|
||||
*
|
||||
* The above will show a loading screen before the passed function is called,
|
||||
* allowing for a better ajaxy experience.
|
||||
*
|
||||
* The facebox function can also display an ajax page or image:
|
||||
*
|
||||
* jQuery.facebox({ ajax: 'remote.html' })
|
||||
* jQuery.facebox({ image: 'dude.jpg' })
|
||||
*
|
||||
* Want to close the facebox? Trigger the 'close.facebox' document event:
|
||||
*
|
||||
* jQuery(document).trigger('close.facebox')
|
||||
*
|
||||
* Facebox also has a bunch of other hooks:
|
||||
*
|
||||
* loading.facebox
|
||||
* beforeReveal.facebox
|
||||
* reveal.facebox (aliased as 'afterReveal.facebox')
|
||||
* init.facebox
|
||||
*
|
||||
* Simply bind a function to any of these hooks:
|
||||
*
|
||||
* $(document).bind('reveal.facebox', function() { ...stuff to do after the facebox and contents are revealed... })
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
$.facebox = function (data, klass) {
|
||||
$.facebox.loading()
|
||||
|
||||
if (data.ajax) fillFaceboxFromAjax(data.ajax)
|
||||
else if (data.image) fillFaceboxFromImage(data.image)
|
||||
else if (data.div) fillFaceboxFromHref(data.div)
|
||||
else if ($.isFunction(data)) data.call($)
|
||||
else $.facebox.reveal(data, klass)
|
||||
}
|
||||
|
||||
/*
|
||||
* Public, $.facebox methods
|
||||
*/
|
||||
|
||||
$.extend($.facebox, {
|
||||
settings: {
|
||||
opacity: 0,
|
||||
overlay: true,
|
||||
loadingImage: 'site_assets/mmcFE/images/loading.gif',
|
||||
closeImage: 'site_assets/mmcFE/images/closelabel.gif',
|
||||
imageTypes: ['png', 'jpg', 'jpeg', 'gif'],
|
||||
faceboxHtml: '\
|
||||
<div id="facebox" style="display:none;"> \
|
||||
<div class="popup"> \
|
||||
<table> \
|
||||
<tbody> \
|
||||
<tr> \
|
||||
<td class="tl"/><td class="b"/><td class="tr"/> \
|
||||
</tr> \
|
||||
<tr> \
|
||||
<td class="b"/> \
|
||||
<td class="body"> \
|
||||
<div class="content"> \
|
||||
</div> \
|
||||
<div class="footer"> \
|
||||
<a href="#" class="close"> \
|
||||
<img src="site_assets/mmcFE/images/closelabel.gif" title="close" class="close_image" /> \
|
||||
</a> \
|
||||
</div> \
|
||||
</td> \
|
||||
<td class="b"/> \
|
||||
</tr> \
|
||||
<tr> \
|
||||
<td class="bl"/><td class="b"/><td class="br"/> \
|
||||
</tr> \
|
||||
</tbody> \
|
||||
</table> \
|
||||
</div> \
|
||||
</div>'
|
||||
},
|
||||
|
||||
loading: function () {
|
||||
init()
|
||||
if ($('#facebox .loading').length == 1) return true
|
||||
showOverlay()
|
||||
|
||||
$('#facebox .content').empty()
|
||||
$('#facebox .body').children().hide().end().
|
||||
append('<div class="loading"><img src="' + $.facebox.settings.loadingImage + '"/></div>')
|
||||
|
||||
$('#facebox').css({
|
||||
top: getPageScroll()[1] + (getPageHeight() / 10),
|
||||
left: 385.5
|
||||
}).show()
|
||||
|
||||
$(document).bind('keydown.facebox', function (e) {
|
||||
if (e.keyCode == 27) $.facebox.close()
|
||||
return true
|
||||
})
|
||||
$(document).trigger('loading.facebox')
|
||||
},
|
||||
|
||||
reveal: function (data, klass) {
|
||||
$(document).trigger('beforeReveal.facebox')
|
||||
if (klass) $('#facebox .content').addClass(klass)
|
||||
$('#facebox .content').append(data)
|
||||
$('#facebox .loading').remove()
|
||||
$('#facebox .body').children().fadeIn('normal')
|
||||
$('#facebox').css('left', $(window).width() / 2 - ($('#facebox table').width() / 2))
|
||||
$(document).trigger('reveal.facebox').trigger('afterReveal.facebox')
|
||||
},
|
||||
|
||||
close: function () {
|
||||
$(document).trigger('close.facebox')
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
* Public, $.fn methods
|
||||
*/
|
||||
|
||||
$.fn.facebox = function (settings) {
|
||||
init(settings)
|
||||
|
||||
function clickHandler() {
|
||||
$.facebox.loading(true)
|
||||
|
||||
// support for rel="facebox.inline_popup" syntax, to add a class
|
||||
// also supports deprecated "facebox[.inline_popup]" syntax
|
||||
var klass = this.rel.match(/facebox\[?\.(\w+)\]?/)
|
||||
if (klass) klass = klass[1]
|
||||
|
||||
fillFaceboxFromHref(this.href, klass)
|
||||
return false
|
||||
}
|
||||
|
||||
return this.click(clickHandler)
|
||||
}
|
||||
|
||||
/*
|
||||
* Private methods
|
||||
*/
|
||||
|
||||
// called one time to setup facebox on this page
|
||||
|
||||
|
||||
function init(settings) {
|
||||
if ($.facebox.settings.inited) return true
|
||||
else $.facebox.settings.inited = true
|
||||
|
||||
$(document).trigger('init.facebox')
|
||||
makeCompatible()
|
||||
|
||||
var imageTypes = $.facebox.settings.imageTypes.join('|')
|
||||
$.facebox.settings.imageTypesRegexp = new RegExp('\.' + imageTypes + '$', 'i')
|
||||
|
||||
if (settings) $.extend($.facebox.settings, settings)
|
||||
$('body').append($.facebox.settings.faceboxHtml)
|
||||
|
||||
var preload = [new Image(), new Image()]
|
||||
preload[0].src = $.facebox.settings.closeImage
|
||||
preload[1].src = $.facebox.settings.loadingImage
|
||||
|
||||
$('#facebox').find('.b:first, .bl, .br, .tl, .tr').each(function () {
|
||||
preload.push(new Image())
|
||||
preload.slice(-1).src = $(this).css('background-image').replace(/url\((.+)\)/, '$1')
|
||||
})
|
||||
|
||||
$('#facebox .close').click($.facebox.close)
|
||||
$('#facebox .close_image').attr('src', $.facebox.settings.closeImage)
|
||||
}
|
||||
|
||||
// getPageScroll() by quirksmode.com
|
||||
|
||||
|
||||
function getPageScroll() {
|
||||
var xScroll, yScroll;
|
||||
if (self.pageYOffset) {
|
||||
yScroll = self.pageYOffset;
|
||||
xScroll = self.pageXOffset;
|
||||
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
|
||||
yScroll = document.documentElement.scrollTop;
|
||||
xScroll = document.documentElement.scrollLeft;
|
||||
} else if (document.body) { // all other Explorers
|
||||
yScroll = document.body.scrollTop;
|
||||
xScroll = document.body.scrollLeft;
|
||||
}
|
||||
return new Array(xScroll, yScroll)
|
||||
}
|
||||
|
||||
// Adapted from getPageSize() by quirksmode.com
|
||||
|
||||
|
||||
function getPageHeight() {
|
||||
var windowHeight
|
||||
if (self.innerHeight) { // all except Explorer
|
||||
windowHeight = self.innerHeight;
|
||||
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
|
||||
windowHeight = document.documentElement.clientHeight;
|
||||
} else if (document.body) { // other Explorers
|
||||
windowHeight = document.body.clientHeight;
|
||||
}
|
||||
return windowHeight
|
||||
}
|
||||
|
||||
// Backwards compatibility
|
||||
|
||||
|
||||
function makeCompatible() {
|
||||
var $s = $.facebox.settings
|
||||
|
||||
$s.loadingImage = $s.loading_image || $s.loadingImage
|
||||
$s.closeImage = $s.close_image || $s.closeImage
|
||||
$s.imageTypes = $s.image_types || $s.imageTypes
|
||||
$s.faceboxHtml = $s.facebox_html || $s.faceboxHtml
|
||||
}
|
||||
|
||||
// Figures out what you want to display and displays it
|
||||
// formats are:
|
||||
// div: #id
|
||||
// image: blah.extension
|
||||
// ajax: anything else
|
||||
|
||||
|
||||
function fillFaceboxFromHref(href, klass) {
|
||||
// div
|
||||
if (href.match(/#/)) {
|
||||
var url = window.location.href.split('#')[0]
|
||||
var target = href.replace(url, '')
|
||||
$.facebox.reveal($(target).clone().show(), klass)
|
||||
|
||||
// image
|
||||
} else if (href.match($.facebox.settings.imageTypesRegexp)) {
|
||||
fillFaceboxFromImage(href, klass)
|
||||
// ajax
|
||||
} else {
|
||||
fillFaceboxFromAjax(href, klass)
|
||||
}
|
||||
}
|
||||
|
||||
function fillFaceboxFromImage(href, klass) {
|
||||
var image = new Image()
|
||||
image.onload = function () {
|
||||
$.facebox.reveal('<div class="image"><img src="' + image.src + '" /></div>', klass)
|
||||
}
|
||||
image.src = href
|
||||
}
|
||||
|
||||
function fillFaceboxFromAjax(href, klass) {
|
||||
$.get(href, function (data) {
|
||||
$.facebox.reveal(data, klass)
|
||||
})
|
||||
}
|
||||
|
||||
function skipOverlay() {
|
||||
return $.facebox.settings.overlay == false || $.facebox.settings.opacity === null
|
||||
}
|
||||
|
||||
function showOverlay() {
|
||||
if (skipOverlay()) return
|
||||
|
||||
if ($('facebox_overlay').length == 0) $("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')
|
||||
|
||||
$('#facebox_overlay').hide().addClass("facebox_overlayBG").css('opacity', $.facebox.settings.opacity).click(function () {
|
||||
$(document).trigger('close.facebox')
|
||||
}).fadeIn(200)
|
||||
return false
|
||||
}
|
||||
|
||||
function hideOverlay() {
|
||||
if (skipOverlay()) return
|
||||
|
||||
$('#facebox_overlay').fadeOut(200, function () {
|
||||
$("#facebox_overlay").removeClass("facebox_overlayBG")
|
||||
$("#facebox_overlay").addClass("facebox_hide")
|
||||
$("#facebox_overlay").remove()
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
/*
|
||||
* Bindings
|
||||
*/
|
||||
|
||||
$(document).bind('close.facebox', function () {
|
||||
$(document).unbind('keydown.facebox')
|
||||
$('#facebox').fadeOut(function () {
|
||||
$('#facebox .content').removeClass().addClass('content')
|
||||
hideOverlay()
|
||||
$('#facebox .loading').remove()
|
||||
})
|
||||
})
|
||||
|
||||
})(jQuery);
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,217 +0,0 @@
|
||||
/*
|
||||
Highcharts Stock v1.0 Beta (2011-07-05)
|
||||
|
||||
(c) 2009-2011 Torstein H?nsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(){function ca(a,b){var d;a||(a={});for(d in b)a[d]=b[d];return a}function Yb(){for(var a=0,b=arguments,d=b.length,c={};a<d;a++)c[b[a++]]=b[a];return c}function la(a,b){return parseInt(a,b||10)}function nc(a){return typeof a==="string"}function bc(a){return typeof a==="object"}function Xc(a){return typeof a==="number"}function Yc(a,b){for(var d=a.length;d--;)if(a[d]===b){a.splice(d,1);break}}function M(a){return a!==ha&&a!==null}function Aa(a,b,d){var c,e;if(nc(b))if(M(d))a.setAttribute(b,
|
||||
d);else{if(a&&a.getAttribute)e=a.getAttribute(b)}else if(M(b)&&bc(b))for(c in b)a.setAttribute(c,b[c]);return e}function oc(a){if(!a||a.constructor!==Array)a=[a];return a}function C(){var a=arguments,b,d,c=a.length;for(b=0;b<c;b++){d=a[b];if(typeof d!=="undefined"&&d!==null)return d}}function Ja(a,b){if(Zc)if(b&&b.opacity!==ha)b.filter="alpha(opacity="+b.opacity*100+")";ca(a.style,b)}function mb(a,b,d,c,e){a=Da.createElement(a);b&&ca(a,b);e&&Ja(a,{padding:0,border:Jb,margin:0});d&&Ja(a,d);c&&c.appendChild(a);
|
||||
return a}function yb(a,b){var d=function(){};d.prototype=new a;ca(d.prototype,b);return d}function Qd(a,b,d,c){var e=Ra.lang;a=a;var f=isNaN(b=nb(b))?2:b;b=d===undefined?e.decimalPoint:d;c=c===undefined?e.thousandsSep:c;e=a<0?"-":"";d=String(la(a=nb(+a||0).toFixed(f)));var g=d.length>3?d.length%3:0;return e+(g?d.substr(0,g)+c:"")+d.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+c)+(f?b+nb(a-d).toFixed(f).slice(2):"")}function Rd(a,b,d,c){var e;d=C(d,1);e=a/d;if(!b){b=[1,2,2.5,5,10];if(c&&c.allowDecimals===
|
||||
false)if(d===1)b=[1,2,5,10];else if(d<=0.1)b=[1/d]}for(c=0;c<b.length;c++){a=b[c];if(e<=(b[c]+(b[c+1]||b[c]))/2)break}a*=d;return a}function Sd(a,b,d,c,e){var f=[],g=Ra.global.useUTC,h=1E3/Ob,i=6E4/Ob,j=36E5/Ob,k=864E5/Ob,m=6048E5/Ob,t=2592E6/Ob,B=31556952E3/Ob,v=Yb(Td,1,Ud,h,Vd,i,Wd,j,Xd,k,Yd,m,Zd,t,$d,B),J=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",
|
||||
null]],x=J[J.length-1],o=v[x[0]],s=x[1];for(e=0;e<J.length;e++){x=J[e];o=v[x[0]];s=x[1];if(J[e+1])if(a<=(o*s[s.length-1]+v[J[e+1][0]])/2)break}if(o===B&&a<5*o)s=[1,2,5];a=Rd(a/o,s);var q;b=new Date(b*Ob);b.setMilliseconds(0);if(o>=h)b.setSeconds(o>=i?0:a*Kb(b.getSeconds()/a));if(o>=i)b[ae](o>=j?0:a*Kb(b[wd]()/a));if(o>=j)b[be](o>=k?0:a*Kb(b[xd]()/a));if(o>=k)b[yd](o>=t?1:a*Kb(b[Oc]()/a));if(o>=t){b[ce](o>=B?0:a*Kb(b[$c]()/a));q=b[ad]()}if(o>=B){q-=q%a;b[de](q)}o===m&&b[yd](b[Oc]()-b[zd]()+C(c,1));
|
||||
e=1;q=b[ad]();c=b.getTime()/Ob;h=b[$c]();for(i=b[Oc]();c<d;){f.push(c);if(o===B)c=bd(q+e*a,0)/Ob;else if(o===t)c=bd(q,h+e*a)/Ob;else if(!g&&(o===k||o===m))c=bd(q,h,i+e*a*(o===k?1:7));else c+=o*a;e++}f.push(c);f.unit=x;return f}function ee(){this.symbol=this.color=0}function xc(a,b){cd=C(a,b.animation)}function fe(){var a=Ra.global.useUTC;bd=a?Date.UTC:function(b,d,c,e,f,g){return(new Date(b,d,C(c,1),C(e,0),C(f,0),C(g,0))).getTime()};wd=a?"getUTCMinutes":"getMinutes";xd=a?"getUTCHours":"getHours";
|
||||
zd=a?"getUTCDay":"getDay";Oc=a?"getUTCDate":"getDate";$c=a?"getUTCMonth":"getMonth";ad=a?"getUTCFullYear":"getFullYear";ae=a?"setUTCMinutes":"setMinutes";be=a?"setUTCHours":"setHours";yd=a?"setUTCDate":"setDate";ce=a?"setUTCMonth":"setMonth";de=a?"setUTCFullYear":"setFullYear"}function dd(a){ed||(ed=mb(cc));a&&ed.appendChild(a);ed.innerHTML=""}function fd(){}function gd(a,b){function d(l){function u(p,w){this.pos=p;this.minor=w;this.isNew=true;w||this.addLabel()}function G(p){if(p){this.options=p;
|
||||
this.id=p.id}return this}function I(p,w,H){this.isNegative=w;this.options=p;this.x=H;this.alignOptions={align:p.align||(ya?w?"left":"right":"center"),verticalAlign:p.verticalAlign||(ya?"middle":w?"bottom":"top"),y:C(p.y,ya?4:w?14:-6),x:C(p.x,ya?w?-6:6:0)};this.textAlign=p.textAlign||(ya?w?"right":"left":"center")}function da(){var p=[],w=[],H,K;za=ub=null;Zb=[];A(Ka,function(E){var ia=E.options;K=false;A(["xAxis","yAxis"],function(Pc){if(E.isCartesian&&(Pc==="xAxis"&&Ba||Pc==="yAxis"&&!Ba)&&(ia[Pc]===
|
||||
l.index||ia[Pc]===ha&&l.index===0)){E[Pc]=O;Zb.push(E);if(E.options.padXAxis)ge=true;K=true}});if(!E.visible&&o.ignoreHiddenSeries)K=false;if(K){var W,fa,jb,Ya,Q;if(!Ba){W=ia.stacking;hd=W==="percent";if(W){Ya=E.type+C(ia.stack,"");Q="-"+Ya;E.stackKey=Ya;fa=p[Ya]||[];p[Ya]=fa;jb=w[Q]||[];w[Q]=jb}if(hd){za=0;ub=99}}if(E.isCartesian){var wa,zb,vb,ob,hb=ia.threshold,Pb,yc=[],he=0;if(Ba){wa=E.xData;za=Ea(C(za,wa[0]),Ea.apply(na,wa));ub=ja(C(ub,wa[0]),ja.apply(na,wa))}else{var Ad,id,zc;E.processData();
|
||||
wa=E.processedXData;zb=E.processedYData;Pb=zb.length;for(H=0;H<Pb;H++){ob=zb[H];if(ob!==null&&ob!==ha){if(W){vb=wa[H];id=(Ad=ob<0)?jb:fa;zc=Ad?Q:Ya;ob=id[vb]=M(id[vb])?id[vb]+ob:ob;R[zc]||(R[zc]={});R[zc][vb]||(R[zc][vb]=new I(l.stackLabels,Ad,vb));R[zc][vb].setTotal(ob)}if(vb=ob.length)for(;vb--;)yc[he++]=ob[vb];else yc[he++]=ob}}if(!hd){za=Ea(C(za,yc[0]),Ea.apply(na,yc));ub=ja(C(ub,yc[0]),ja.apply(na,yc))}if(E.useThreshold&&hb!==null)if(za>=hb){za=hb;ie=true}else if(ub<hb){ub=hb;je=true}}}}})}function qa(p){var w;
|
||||
w=p;Ac=C(Ac,na.pow(10,Kb(na.log(kb)/na.LN10)));if(Ac<1){w=N(1/Ac)*10;w=N(p*w)/w}return w}function T(p){var w,H,K,E=l.tickInterval,ia=l.tickPixelInterval;w=l.maxZoom||(Ba&&!M(l.min)&&!M(l.max)?Ea(n.smallestInterval*5,ub-za):null);Z=aa?Qb:Rb;if(dc){H=n[Ba?"xAxis":"yAxis"][l.linkedTo];K=H.getExtremes();ka=C(K.min,K.dataMin);oa=C(K.max,K.dataMax)}else{ka=C(Bc,l.min,za);oa=C(Cc,l.max,ub)}if(z){ka=na.log(ka)/na.LN10;oa=na.log(oa)/na.LN10}if(ec){Bc=ka=oa-ec;Cc=oa;if(p)ec=null}if(oa-ka<w){p=(w-oa+ka)/2;ka=
|
||||
ja(ka-p,C(l.min,ka-p),za);oa=Ea(ka+w,C(l.max,ka+w),ub)}if(!lb&&!hd&&!dc&&M(ka)&&M(oa)){w=oa-ka||1;if(!M(l.min)&&!M(Bc)&&ke&&(za<0||!ie))ka-=w*ke;if(!M(l.max)&&!M(Cc)&&le&&(ub>0||!je))oa+=w*le}kb=ka===oa||ka===undefined||oa===undefined?1:dc&&!E&&ia===H.options.tickPixelInterval?H.tickInterval:C(E,lb?1:(oa-ka)*ia/(Z||1));if(!D){Ac=na.pow(10,Kb(na.log(kb)/na.LN10));M(l.tickInterval)||(kb=Rd(kb,null,Ac,l))}O.tickInterval=kb;jd=l.minorTickInterval==="auto"&&kb?kb/5:l.minorTickInterval;if(D){xa=Sd(kb,ka,
|
||||
oa,l.startOfWeek);kd=l.dateTimeLabelFormats[xa.unit[0]]}else{E=qa(Kb(ka/kb)*kb);H=qa(ld(oa/kb)*kb);xa=[];for(E=qa(E);E<=H;){xa.push(E);E=qa(E+kb)}}if(!dc){if(lb||ge){H=(lb?1:kb)*0.5;if(lb||!M(C(l.min,Bc)))ka-=H;if(lb||!M(C(l.max,Cc)))oa+=H}H=xa[0];E=xa[xa.length-1];if(l.startOnTick)ka=H;else ka>H&&xa.shift();if(l.endOnTick)oa=E;else oa<E&&xa.pop();$b||($b={x:0,y:0});if(!D&&xa.length>$b[ma]&&l.alignTicks!==false)$b[ma]=xa.length}}function ta(){var p,w;Qc=ka;me=oa;da();T();Ab=ba;ba=Z/(oa-ka||1);if(!Ba)for(p in R)for(w in R[p])R[p][w].cum=
|
||||
R[p][w].total;if(!O.isDirty)O.isDirty=ka!==Qc||oa!==me}function Za(p){p=(new G(p)).render();fc.push(p);return p}function La(){var p=l.title,w=l.stackLabels,H=l.alternateGridColor,K=l.lineWidth,E,ia,W=n.hasRendered,fa=W&&M(Qc)&&!isNaN(Qc);if(Zb.length&&M(ka)&&M(oa)||dc){if(jd&&!lb)for(E=ka+(xa[0]-ka)%jd;E<=oa;E+=jd){pc[E]||(pc[E]=new u(E,true));fa&&pc[E].isNew&&pc[E].render(null,true);pc[E].isActive=true;pc[E].render()}A(xa,function(Q,wa){if(!dc||Q>=ka&&Q<=oa){fa&&Bb[Q].isNew&&Bb[Q].render(wa,true);
|
||||
Bb[Q].isActive=true;Bb[Q].render(wa)}});H&&A(xa,function(Q,wa){if(wa%2===0&&Q<oa){Dc[Q]||(Dc[Q]=new G);Dc[Q].options={from:Q,to:xa[wa+1]!==ha?xa[wa+1]:oa,color:H};Dc[Q].render();Dc[Q].isActive=true}});W||A((l.plotLines||[]).concat(l.plotBands||[]),function(Q){fc.push((new G(Q)).render())})}A([Bb,pc,Dc],function(Q){for(var wa in Q)if(Q[wa].isActive)Q[wa].isActive=false;else{Q[wa].destroy();delete Q[wa]}});if(K){E=Sa+(Fa?Qb:0)+L;ia=Ma-gc-(Fa?Rb:0)+L;E=pa.crispLine([$a,aa?Sa:E,aa?ia:Gb,Ga,aa?Va-P:E,
|
||||
aa?ia:Ma-gc],K);if(ab)ab.animate({d:E});else ab=pa.path(E).attr({stroke:l.lineColor,"stroke-width":K,zIndex:7}).add()}if(O.axisTitle){E=aa?Sa:Gb;K=la(p.style.fontSize||12);E={low:E+(aa?0:Z),middle:E+Z/2,high:E+(aa?Z:0)}[p.align];K=(aa?Gb+Rb:Sa)+(aa?1:-1)*(Fa?-1:1)*Bd+(Wa===2?K:0);O.axisTitle[W?"animate":"attr"]({x:aa?E:K+(Fa?Qb:0)+L+(p.x||0),y:aa?K-(Fa?Rb:0)+L:E+(p.y||0)})}if(w&&w.enabled){var jb,Ya;w=O.stackTotalGroup;if(!w)O.stackTotalGroup=w=pa.g("stack-labels").attr({visibility:Lb,zIndex:6}).translate(ga,
|
||||
ea).add();for(jb in R){p=R[jb];for(Ya in p)p[Ya].render(w)}}O.isDirty=false}function pb(p){for(var w=fc.length;w--;)fc[w].id===p&&fc[w].destroy()}var Ba=l.isX,Fa=l.opposite,aa=ya?!Ba:Ba,Wa=aa?Fa?0:2:Fa?1:3,R={};l=Y(Ba?md:Cd,[ze,Ae,ne,Be][Wa],l);var O=this,F=l.type,D=F==="datetime",z=F==="logarithmic",L=l.offset||0,ma=Ba?"x":"y",Z,ba,Na,Ab,Sa,Gb,Qb,Rb,gc,P,ua,va,Ca,cb,ab,za,ub,Zb,ec=l.range,Bc,Cc,oa=null,ka=null,Qc,me,ke=l.minPadding,le=l.maxPadding,dc=M(l.linkedTo),ie,je,hd;F=l.events;var Dd,ge,fc=
|
||||
[],kb,jd,Ac,xa,Bb={},pc={},Dc={},Ec,Fc,Bd,kd,lb=l.categories,Ce=l.labels.formatter||function(){var p=this.value;return kd?Gc(kd,p):kb%1E6===0?p/1E6+"M":kb%1E3===0?p/1E3+"k":!lb&&p>=1E3?Qd(p,0):p},nd=aa&&l.labels.staggerLines,qc=l.reversed,rc=lb&&l.tickmarkPlacement==="between"?0.5:0;u.prototype={attachLabel:function(){var p=this.label;if(p&&!this.added){p.deferUpdateTransform=true;p.add(Ca)}},updateTransformLabel:function(){var p=this.label;if(p){p.deferUpdateTransform=false;p.updateTransform()}},
|
||||
computeBBox:function(){var p=this.label,w;if(p){w=p.getBBox();p.elemWidth=w.width;p.elemHeight=w.height}},addLabel:function(){var p=this.pos,w=l.labels,H=!(p===ka&&!C(l.showFirstLabel,1)||p===oa&&!C(l.showLastLabel,0)),K=lb&&aa&&lb.length&&!w.step&&!w.staggerLines&&!w.rotation&&db/lb.length||!aa&&db/2,E=this.label;p=Ce.call({isFirst:p===xa[0],isLast:p===xa[xa.length-1],dateTimeLabelFormat:kd,value:lb&&lb[p]?lb[p]:p});K=K&&{width:ja(1,N(K-2*(w.padding||10)))+qb};K=ca(K,w.style);if(M(E))E&&E.attr({text:p}).css(K);
|
||||
else this.label=M(p)&&H&&w.enabled?pa.text(p,0,0).attr({align:w.align,rotation:w.rotation}).css(K):null},getLabelSize:function(){var p=this.label;return p?(this.labelBBox=p.getBBox())[aa?"height":"width"]:0},render:function(p,w){var H=!this.minor,K=this.label,E=this.pos,ia=l.labels,W=this.gridLine,fa=H?l.gridLineWidth:l.minorGridLineWidth,jb=H?l.gridLineColor:l.minorGridLineColor,Ya=H?l.gridLineDashStyle:l.minorGridLineDashStyle,Q=this.mark,wa=H?l.tickLength:l.minorTickLength,zb=H?l.tickWidth:l.minorTickWidth||
|
||||
0,vb=H?l.tickColor:l.minorTickColor,ob=H?l.tickPosition:l.minorTickPosition;H=ia.step;var hb=w&&sc||Ma,Pb;Pb=aa?ua(E+rc,null,null,w)+Na:Sa+L+(Fa?(w&&Wb||Va)-P-Sa:0);hb=aa?hb-gc+L-(Fa?Rb:0):hb-ua(E+rc,null,null,w)-Na;if(fa){E=va(E+rc,fa,w);if(W===ha){W={stroke:jb,"stroke-width":fa};if(Ya)W.dashstyle=Ya;this.gridLine=W=fa?pa.path(E).attr(W).add(cb):null}W&&E&&W.animate({d:E})}if(zb){if(ob==="inside")wa=-wa;if(Fa)wa=-wa;fa=pa.crispLine([$a,Pb,hb,Ga,Pb+(aa?0:-wa),hb+(aa?wa:0)],zb);if(Q)Q.animate({d:fa});
|
||||
else this.mark=pa.path(fa).attr({stroke:vb,"stroke-width":zb}).add(Ca)}if(K&&!isNaN(Pb)){Pb=Pb+ia.x-(rc&&aa?rc*ba*(qc?-1:1):0);hb=hb+ia.y-(rc&&!aa?rc*ba*(qc?1:-1):0);M(ia.y)||(hb+=la(K.styles.lineHeight)*0.9-K.getBBox().height/2);if(nd)hb+=p/(H||1)%nd*16;if(H)K[p%H?"hide":"show"]();K[this.isNew?"attr":"animate"]({x:Pb,y:hb})}this.isNew=false},destroy:function(){for(var p in this)this[p]&&this[p].destroy&&this[p].destroy()}};G.prototype={render:function(){var p=this,w=p.options,H=w.label,K=p.label,
|
||||
E=w.width,ia=w.to,W,fa=w.from,jb=w.dashStyle,Ya=p.svgElem,Q=[],wa,zb,vb=w.color;zb=w.zIndex;var ob=w.events;if(E){Q=va(w.value,E);w={stroke:vb,"stroke-width":E};if(jb)w.dashstyle=jb}else if(M(fa)&&M(ia)){fa=ja(fa,ka);ia=Ea(ia,oa);W=va(ia);if((Q=va(fa))&&W)Q.push(W[4],W[5],W[1],W[2]);else Q=null;w={fill:vb}}else return;if(M(zb))w.zIndex=zb;if(Ya)if(Q)Ya.animate({d:Q},null,Ya.onGetPath);else{Ya.hide();Ya.onGetPath=function(){Ya.show()}}else if(Q&&Q.length){p.svgElem=Ya=pa.path(Q).attr(w).add();if(ob){jb=
|
||||
function(hb){Ya.on(hb,function(Pb){ob[hb].apply(p,[Pb])})};for(wa in ob)jb(wa)}}if(H&&M(H.text)&&Q&&Q.length&&Qb>0&&Rb>0){H=Y({align:aa&&W&&"center",x:aa?!W&&4:10,verticalAlign:!aa&&W&&"middle",y:aa?W?16:10:W?6:-4,rotation:aa&&!W&&90},H);if(!K)p.label=K=pa.text(H.text,0,0).attr({align:H.textAlign||H.align,rotation:H.rotation,zIndex:zb}).css(H.style).add();W=[Q[1],Q[4],C(Q[6],Q[1])];Q=[Q[2],Q[5],C(Q[7],Q[2])];wa=Ea.apply(na,W);zb=Ea.apply(na,Q);K.align(H,false,{x:wa,y:zb,width:ja.apply(na,W)-wa,height:ja.apply(na,
|
||||
Q)-zb});K.show()}else K&&K.hide();return p},destroy:function(){for(var p in this){this[p]&&this[p].destroy&&this[p].destroy();delete this[p]}Yc(fc,this)}};I.prototype={setTotal:function(p){this.cum=this.total=p},render:function(p){var w=this.options.formatter.call(this);if(this.label)this.label.attr({text:w,visibility:Cb});else this.label=n.renderer.text(w,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,visibility:Cb}).add(p)},setOffset:function(p,w){var H=this.isNegative,
|
||||
K=O.translate(this.total),E=O.translate(0);E=nb(K-E);var ia=n.xAxis[0].translate(this.x)+p,W=n.plotHeight;H={x:ya?H?K:K-E:ia,y:ya?W-ia-w:H?W-K-E:W-K,width:ya?E:w,height:ya?w:E};this.label&&this.label.align(this.alignOptions,null,H).attr({visibility:Lb})}};ua=function(p,w,H,K,E){var ia=1,W=0,fa=K?Ab:ba;K=K?Qc:ka;fa||(fa=ba);if(H){ia*=-1;W=Z}if(qc){ia*=-1;W-=ia*Z}if(w){if(qc)p=Z-p;p=p/fa+K;if(z&&E)p=na.pow(10,p)}else{if(z&&E)p=na.log(p)/na.LN10;p=ia*(p-K)*fa+W}return p};va=function(p,w,H){var K,E,ia;
|
||||
p=ua(p,null,null,H);var W=H&&sc||Ma,fa=H&&Wb||Va,jb;H=E=N(p+Na);K=ia=N(W-p-Na);if(isNaN(p))jb=true;else if(aa){K=Gb;ia=W-gc;if(H<Sa||H>Sa+Qb)jb=true}else{H=Sa;E=fa-P;if(K<Gb||K>Gb+Rb)jb=true}return jb?null:pa.crispLine([$a,H,K,Ga,E,ia],w||0)};wb.push(O);n[Ba?"xAxis":"yAxis"].push(O);if(ya&&Ba&&qc===ha)qc=true;ca(O,{addPlotBand:Za,addPlotLine:Za,adjustTickAmount:function(){if($b&&!D&&!lb&&!dc&&l.alignTicks!==false){var p=Ec,w=xa.length;Ec=$b[ma];if(w<Ec){for(;xa.length<Ec;)xa.push(qa(xa[xa.length-
|
||||
1]+kb));ba*=(w-1)/(Ec-1);oa=xa[xa.length-1]}if(M(p)&&Ec!==p)O.isDirty=true}},categories:lb,getExtremes:function(){return{min:ka,max:oa,dataMin:za,dataMax:ub,userMin:Bc,userMax:Cc}},getPlotLinePath:va,getThreshold:function(p){if(ka>p||p===null)p=ka;else if(oa<p)p=oa;return ua(p,0,1)},isXAxis:Ba,options:l,plotLinesAndBands:fc,getOffset:function(){var p=Zb.length&&M(ka)&&M(oa),w=0,H=0,K=l.title,E=l.labels,ia=[-1,1,1,-1][Wa],W;if(!Ca){Ca=pa.g("axis").attr({zIndex:7}).add();cb=pa.g("grid").attr({zIndex:1}).add()}Fc=
|
||||
0;if(p||dc){A(xa,function(fa){if(Bb[fa])Bb[fa].addLabel();else Bb[fa]=new u(fa)});A(xa,function(fa){Bb[fa].attachLabel()});A(xa,function(fa){Bb[fa].computeBBox()});A(xa,function(fa){Bb[fa].updateTransformLabel()});A(xa,function(fa){if(Wa===0||Wa===2||{1:"left",3:"right"}[Wa]===E.align)Fc=ja(Bb[fa].getLabelSize(),Fc)});if(nd)Fc+=(nd-1)*16}else for(W in Bb){Bb[W].destroy();delete Bb[W]}if(K&&K.text){if(!O.axisTitle)O.axisTitle=pa.text(K.text,0,0).attr({zIndex:7,rotation:K.rotation||0,align:K.textAlign||
|
||||
{low:"left",middle:"center",high:"right"}[K.align]}).css(K.style).add();w=O.axisTitle.getBBox()[aa?"height":"width"];H=C(K.margin,aa?5:10)}L=ia*C(l.offset,rb[Wa]);Bd=Fc+(Wa!==2&&Fc&&ia*l.labels[aa?"y":"x"])+H;rb[Wa]=ja(rb[Wa],Bd+w+ia*L)},render:La,setAxisSize:function(){var p=l.offsetLeft||0,w=l.offsetRight||0;Sa=C(l.left,ga+p);Gb=C(l.top,ea);Qb=C(l.width,db-p+w);Rb=C(l.height,eb);gc=Ma-Rb-Gb;P=Va-Qb-Sa;O.left=Sa;O.top=Gb;Z=aa?Qb:Rb;ba=Z/(oa-ka||1);Na=aa?Sa:gc},setCategories:function(p,w){O.categories=
|
||||
lb=p;A(Zb,function(H){H.translate();H.setTooltipPoints(true)});O.isDirty=true;C(w,true)&&n.redraw()},setExtremes:function(p,w,H,K){H=C(H,true);Ha(O,"setExtremes",{min:p,max:w},function(){Bc=p;Cc=w;H&&n.redraw(K)})},setScale:ta,setTickPositions:T,translate:ua,redraw:function(){Hc.resetTracker&&Hc.resetTracker();La();A(fc,function(p){p.render()});A(Zb,function(p){p.isDirty=true})},removePlotBand:pb,removePlotLine:pb,reversed:qc,stacks:R});for(Dd in F)ra(O,Dd,F[Dd]);ta()}function c(){var l={};return{add:function(u,
|
||||
G,I,da){if(!l[u]){G=pa.text(G,0,0).css(a.toolbar.itemStyle).align({align:"right",x:-Xb-20,y:ea+30}).on("click",da).attr({align:"right",zIndex:20}).add();l[u]=G}},remove:function(u){dd(l[u].element);l[u]=null}}}function e(l){function u(){var D=this.points||oc(this),z=D[0].series.xAxis,L=this.x;z=z&&z.options.type==="datetime";var ma=nc(L)||z,Z=D[0].series,ba;ba=ma?['<span style="font-size: 10px">'+(z?Gc("%A, %b %e, %Y",L):L)+"</span>"]:[];A(D,function(Na){Z=Na.series;ba.push(Z.tooltipFormatter&&Z.tooltipFormatter(Na)||
|
||||
Na.point.tooltipFormatter(ma))});return ba.join("<br/>")}function G(D,z){R=Fa?D:(2*R+D)/3;O=Fa?z:(O+z)/2;F.attr({x:R,y:O});Ed=nb(D-R)>1||nb(z-O)>1?function(){G(D,z)}:null}function I(){if(!Fa){var D=n.hoverPoints;F.hide();A(ta,function(z){z&&z.hide()});D&&A(D,function(z){z.setState()});n.hoverPoints=null;Fa=true}}var da,qa=l.borderWidth,T=l.crosshairs,ta=[],Za=l.style,La=l.shared,pb=la(Za.padding),Ba=qa+pb,Fa=true,aa,Wa,R=0,O=0;Za.padding=0;var F=pa.label("",0,0).attr({padding:pb,fill:l.backgroundColor,
|
||||
"stroke-width":qa,r:l.borderRadius,zIndex:8}).css(Za).hide().add().shadow(1);return{shared:La,refresh:function(D){var z,L,ma,Z,ba={},Na=[];ma=D.tooltipPos;z=l.formatter||u;ba=n.hoverPoints;if(La&&!(D.series&&D.series.noSharedTooltip)){Z=0;ba&&A(ba,function(Ab){Ab.setState()});n.hoverPoints=D;A(D,function(Ab){Ab.setState(Tb);Z+=Ab.plotY;Na.push(Ab.getLabelConfig())});L=D[0].plotX;Z=N(Z)/D.length;ba={x:D[0].category};ba.points=Na;D=D[0]}else ba=D.getLabelConfig();ba=z.call(ba);da=D.series;L=C(L,D.plotX);
|
||||
Z=C(Z,D.plotY);z=N(ma?ma[0]:ya?db-Z:L);L=N(ma?ma[1]:ya?eb-L:Z);ma=La||!D.series.isCartesian||ib(z,L);if(ba===false||!ma)I();else{if(Fa){F.show();Fa=false}F.attr({text:ba});ma=F.getBBox();aa=ma.width;Wa=ma.height;F.attr({stroke:l.borderColor||D.color||da.color||"#606060"});z=z-aa+ga-25;L=L-Wa+ea+10;if(z<7){z=7;L-=30}if(L<ea+5)L=ea+5;else if(L+Wa>Ma)L=Ma-Wa-5;G(N(z-Ba),N(L-Ba))}if(T){T=oc(T);for(z=T.length;z--;){L=D.series[z?"yAxis":"xAxis"];if(T[z]&&L){L=L.getPlotLinePath(D[z?"y":"x"],1);if(ta[z])ta[z].attr({d:L,
|
||||
visibility:Lb});else{ma={"stroke-width":T[z].width||1,stroke:T[z].color||"#C0C0C0",zIndex:2};if(T[z].dashStyle)ma.dashstyle=T[z].dashStyle;ta[z]=pa.path(L).attr(ma).add()}}}}},hide:I}}function f(l,u){function G(R){var O,F=oe&&Da.width/Da.documentElement.clientWidth-1,D,z,L;R=R||sb.event;if(!R.target)R.target=R.srcElement;if(R.originalEvent)R=R.originalEvent;O=R.touches?R.touches.item(0):R;if(R.type!=="mousemove"||sb.opera||F){D=sa;z={left:D.offsetLeft,top:D.offsetTop};for(D=D.offsetParent;D;){z.left+=
|
||||
D.offsetLeft;z.top+=D.offsetTop;if(D!==Da.body&&D!==Da.documentElement){z.left-=D.scrollLeft;z.top-=D.scrollTop}D=D.offsetParent}Rc=z;D=Rc.left;z=Rc.top}if(Zc){L=R.x;O=R.y}else if(O.layerX===ha){L=O.pageX-D;O=O.pageY-z}else{L=R.layerX;O=R.layerY}if(F){L+=N((F+1)*D-D);O+=N((F+1)*z-z)}return ca(R,{chartX:L,chartY:O})}function I(R){var O={xAxis:[],yAxis:[]};A(wb,function(F){var D=F.translate,z=F.isXAxis;O[z?"xAxis":"yAxis"].push({axis:F,value:D((ya?!z:z)?R.chartX-ga:eb-R.chartY+ea,true)})});return O}
|
||||
function da(){var R=l.hoverSeries,O=l.hoverPoint;O&&O.onMouseOut();R&&R.onMouseOut();Oa&&Oa.hide();Fd=null}function qa(){if(La){var R={xAxis:[],yAxis:[]},O=La.getBBox(),F=O.x-ga,D=O.y-ea;if(Za){A(wb,function(z){if(z.options.zoomEnabled!==false){var L=z.translate,ma=z.isXAxis,Z=ya?!ma:ma,ba=L(Z?F:eb-D-O.height,true,0,0,1);L=L(Z?F+O.width:eb-D,true,0,0,1);R[ma?"xAxis":"yAxis"].push({axis:z,min:Ea(ba,L),max:ja(ba,L)})}});Ha(l,"selection",R,Gd)}La=La.destroy()}Ja(sa,{cursor:"auto"});l.mouseIsDown=ac=
|
||||
Za=false;Ub(Da,Hb?"touchend":"mouseup",qa)}var T,ta,Za,La,pb=o.zoomType,Ba=/x/.test(pb),Fa=/y/.test(pb),aa=Ba&&!ya||Fa&&ya,Wa=Fa&&!ya||Ba&&ya;od=function(){if(pd){pd.translate(ga,ea);ya&&pd.attr({width:l.plotWidth,height:l.plotHeight}).invert()}else l.trackerGroup=pd=pa.g("tracker").attr({zIndex:9}).add()};od();if(u.enabled)l.tooltip=Oa=e(u);(function(){var R=true;sa.onmousedown=function(F){F=G(F);l.mouseIsDown=ac=true;T=F.chartX;ta=F.chartY;ra(Da,Hb?"touchend":"mouseup",qa)};var O=function(F){if(!(F&&
|
||||
F.touches&&F.touches.length>1)){F=G(F);if(!Hb)F.returnValue=false;var D=F.chartX,z=F.chartY,L=!ib(D-ga,z-ea);if(Hb&&F.type==="touchstart")if(Aa(F.target,"isTracker"))l.runTrackerClick||F.preventDefault();else!Ta&&!L&&F.preventDefault();if(L){R||da();if(D<ga)D=ga;else if(D>ga+db)D=ga+db;if(z<ea)z=ea;else if(z>ea+eb)z=ea+eb}if(ac&&F.type!=="touchstart"){Za=Math.sqrt(Math.pow(T-D,2)+Math.pow(ta-z,2));if(Za>10){var ma=ib(T-ga,ta-ea);if(Ic&&(Ba||Fa)&&ma)La||(La=pa.rect(ga,ea,aa?1:db,Wa?1:eb,0).attr({fill:"rgba(69,114,167,0.25)",
|
||||
zIndex:7}).add());if(La&&aa){F=D-T;La.attr({width:nb(F),x:(F>0?0:F)+T})}if(La&&Wa){z=z-ta;La.attr({height:nb(z),y:(z>0?0:z)+ta})}if(ma&&!La&&o.panning){z=l.xAxis[0];F=z.getExtremes();ma=F.dataMin;F=F.dataMax;var Z=z.translate(T-D,true),ba=z.translate(T+db-D,true);Z>ma&&ba<F&&z.setExtremes(Z,ba,true,false);T=D;Ja(sa,{cursor:"move"})}}}else if(!L){D=l.hoverPoint;z=l.hoverSeries;var Na;ma=Va;var Ab=ya?F.chartY:F.chartX-ga;if(Oa&&u.shared&&!(z&&z.noSharedTooltip)){Z=[];ba=Ka.length;for(Na=0;Na<ba;Na++)if(Ka[Na].visible&&
|
||||
Ka[Na].tooltipPoints.length&&Ka[Na].options.enableMouseTracking!==false&&!Ka[Na].noSharedTooltip){F=Ka[Na].tooltipPoints[Ab];F._dist=nb(Ab-F.plotX);ma=Ea(ma,F._dist);Z.push(F)}for(ba=Z.length;ba--;)Z[ba]._dist>ma&&Z.splice(ba,1);if(Z.length&&Z[0].plotX!==Fd){Oa.refresh(Z);Fd=Z[0].plotX}}if(z&&z.tracker)(F=z.tooltipPoints[Ab])&&F!==D&&F.onMouseOver()}return(R=L)||!Ic}};sa.onmousemove=O;ra(sa,"mouseleave",da);sa.ontouchstart=function(F){if(Ba||Fa)sa.onmousedown(F);O(F)};sa.ontouchmove=O;sa.ontouchend=
|
||||
function(){Za&&da()};sa.onclick=function(F){var D=l.hoverPoint;F=G(F);F.cancelBubble=true;if(!Za)if(D&&Aa(F.target,"isTracker")){var z=D.plotX,L=D.plotY;ca(D,{pageX:Rc.left+ga+(ya?db-L:z),pageY:Rc.top+ea+(ya?eb-z:L)});Ha(D.series,"click",ca(F,{point:D}));D.firePointEvent("click",F)}else{ca(F,I(F));ib(F.chartX-ga,F.chartY-ea)&&Ha(l,"click",F)}Za=false}})();pe=setInterval(function(){Ed&&Ed()},32);ca(this,{zoomX:Ba,zoomY:Fa,resetTracker:da,normalizeMouseEvent:G})}function g(l){var u=l.type||o.type||
|
||||
o.defaultSeriesType,G=fb[u],I=n.hasRendered;if(I)if(ya&&u==="column")G=fb.bar;else if(!ya&&u==="bar")G=fb.column;u=new G;u.init(n,l);if(!I&&u.inverted)ya=true;if(u.isCartesian)Ic=u.isCartesian;Ka.push(u);return u}function h(){o.alignTicks!==false&&A(wb,function(l){l.adjustTickAmount()});$b=null}function i(l){var u=n.isDirtyLegend,G,I=n.isDirtyBox,da=Ka.length,qa=da,T=n.clipRect;for(xc(l,n);qa--;){l=Ka[qa];if(l.isDirty&&l.options.stacking){G=true;break}}if(G)for(qa=da;qa--;){l=Ka[qa];if(l.options.stacking)l.isDirty=
|
||||
true}A(Ka,function(ta){if(ta.isDirty)if(ta.options.legendType==="point")u=true});if(u&&Hd.renderLegend){Hd.renderLegend();n.isDirtyLegend=false}if(Ic){if(!qd){$b=null;A(wb,function(ta){ta.leastDistance=ha;ta.setScale()})}h();Sc();A(wb,function(ta){if(ta.isDirty||I){ta.redraw();I=true}})}if(I){Id();od();if(T){rd(T);T.animate({width:n.plotSizeX,height:n.plotSizeY})}}A(Ka,function(ta){if(ta.isDirty&&ta.visible&&(!ta.isCartesian||ta.xAxis))ta.redraw()});Hc&&Hc.resetTracker&&Hc.resetTracker();Ha(n,"redraw")}
|
||||
function j(){var l=a.xAxis||{},u=a.yAxis||{};l=oc(l);A(l,function(G,I){G.index=I;G.isX=true});u=oc(u);A(u,function(G,I){G.index=I});l=l.concat(u);A(l,function(G){new d(G)});h()}function k(l,u){gb=Y(a.title,l);$=Y(a.subtitle,u);A([["title",l,gb],["subtitle",u,$]],function(G){var I=G[0],da=n[I],qa=G[1];G=G[2];if(da&&qa){da.destroy();da=null}if(G&&G.text&&!da)n[I]=pa.text(G.text,0,0).attr({align:G.align,"class":"highcharts-"+I,zIndex:1}).css(G.style).add().align(G,false,Ia)})}function m(){Pa=o.renderTo;
|
||||
Sb=Jc+Jd++;if(nc(Pa))Pa=Da.getElementById(Pa);Pa.innerHTML="";if(!Pa.offsetWidth){Xa=Pa.cloneNode(0);Ja(Xa,{position:Kc,top:"-9999px",display:""});Da.body.appendChild(Xa)}tc=(Xa||Pa).offsetWidth;hc=(Xa||Pa).offsetHeight;n.chartWidth=Va=o.width||tc||600;n.chartHeight=Ma=o.height||(hc>19?hc:400);n.container=sa=mb(cc,{className:"highcharts-container"+(o.className?" "+o.className:""),id:Sb},ca({position:qe,overflow:Cb,width:Va+qb,height:Ma+qb,textAlign:"left"},o.style),Xa||Pa);n.renderer=pa=o.forExport?
|
||||
new sd(sa,Va,Ma,true):new Tc(sa,Va,Ma);var l,u;if(re&&sa.getBoundingClientRect){l=function(){Ja(sa,{left:0,top:0});u=sa.getBoundingClientRect();Ja(sa,{left:-(u.left-la(u.left))+qb,top:-(u.top-la(u.top))+qb})};l();ra(sb,"resize",l);ra(n,"destroy",function(){Ub(sb,"resize",l)})}}function t(){function l(){var G=o.width||Pa.offsetWidth,I=o.height||Pa.offsetHeight;if(G&&I){if(G!==tc||I!==hc){clearTimeout(u);u=setTimeout(function(){Kd(G,I,false)},100)}tc=G;hc=I}}var u;ra(sb,"resize",l);ra(n,"destroy",function(){Ub(sb,
|
||||
"resize",l)})}function B(){var l=a.labels,u=a.credits,G;k();Hd=n.legend=new De(n);Sc();A(wb,function(I){I.setTickPositions(true)});h();Sc();Id();Ic&&A(wb,function(I){I.render()});if(!n.seriesGroup)n.seriesGroup=pa.g("series-group").attr({zIndex:3}).add();A(Ka,function(I){I.translate();I.setTooltipPoints();I.render()});l.items&&A(l.items,function(){var I=ca(l.style,this.style),da=la(I.left)+ga,qa=la(I.top)+ea+12;delete I.left;delete I.top;pa.text(this.html,da,qa).attr({zIndex:2}).css(I).add()});if(!n.toolbar)n.toolbar=
|
||||
c(n);if(u.enabled&&!n.credits){G=u.href;pa.text(u.text,0,0).on("click",function(){if(G)location.href=G}).attr({align:u.position.align,zIndex:8}).css(u.style).add().align(u.position)}od();n.hasRendered=true;if(Xa){Pa.appendChild(sa);dd(Xa)}}function v(){var l=Ka.length,u=sa&&sa.parentNode;Ha(n,"destroy");Ub(sb,"unload",v);Ub(n);for(A(wb,function(G){Ub(G)});l--;)Ka[l].destroy();if(sa){sa.innerHTML="";Ub(sa);u&&u.removeChild(sa);sa=null}if(pa)pa.alignedObjects=null;clearInterval(pe);for(l in n)delete n[l]}
|
||||
function J(){if(!Uc&&sb==sb.top&&Da.readyState!=="complete")Da.attachEvent("onreadystatechange",function(){Da.detachEvent("onreadystatechange",J);Da.readyState==="complete"&&J()});else{m();Ha(n,"init");if(se&&a.rangeSelector.enabled)n.rangeSelector=new se(n);Ld();Md();A(a.series||[],function(l){g(l)});n.inverted=ya=C(ya,a.chart.inverted);j();if(te&&a.navigator.enabled||a.scrollbar.enabled)n.scroller=new te(n);n.render=B;n.tracker=Hc=new f(n,a.tooltip);B();b&&b.apply(n,[n]);A(n.callbacks,function(l){l.apply(n,
|
||||
[n])});Ha(n,"load")}}md=Y(md,Ra.xAxis);Cd=Y(Cd,Ra.yAxis);Ra.xAxis=Ra.yAxis=null;var x=a.series;a.series=null;a=Y(Ra,a);a.series=x;var o=a.chart;x=o.margin;x=bc(x)?x:[x,x,x,x];var s=C(o.marginTop,x[0]),q=C(o.marginRight,x[1]),r=C(o.marginBottom,x[2]),y=C(o.marginLeft,x[3]),U=o.spacingTop,X=o.spacingRight,Ua=o.spacingBottom,bb=o.spacingLeft,Ia,gb,$,ea,Xb,tb,ga,rb,Pa,Xa,sa,Sb,tc,hc,Va,Ma,Wb,sc,uc,Lc,ic,V,n=this,Ta=(x=o.events)&&!!x.click,Db,ib,Oa,ac,Eb,vc,wc,eb,db,Hc,pd,od,Hd,jc,kc,Rc,Ic=o.showAxes,
|
||||
qd=0,wb=[],$b,Ka=[],ya,pa,Ed,pe,Fd,Id,Sc,Ld,Md,Kd,Gd,ue,De=function(l){function u(P,ua){var va=P.legendItem,Ca=P.legendLine,cb=P.legendSymbol,ab=Wa.color,za=ua?T.itemStyle.color:ab;ab=ua?P.color:ab;va&&va.css({fill:za});Ca&&Ca.attr({stroke:ab});cb&&cb.attr({stroke:ab,fill:ab})}function G(P,ua,va){var Ca=P.legendItem,cb=P.legendLine,ab=P.legendSymbol;P=P.checkbox;Ca&&Ca.attr({x:ua,y:va});cb&&cb.translate(ua,va-4);ab&&ab.attr({x:ua+ab.xOff,y:va+ab.yOff});if(P){P.x=ua;P.y=va}}function I(){A(pb,function(P){var ua=
|
||||
P.checkbox,va=Sa.alignAttr;ua&&Ja(ua,{left:va.translateX+P.legendItemWidth+ua.x-40+qb,top:va.translateY+ua.y-11+qb})})}function da(P){var ua,va,Ca,cb,ab=P.legendItem;cb=P.series||P;var za=cb.options,ub=za&&za.borderWidth||0;if(!ab){cb=/^(bar|pie|area|column)$/.test(cb.type);P.legendItem=ab=pa.text(T.labelFormatter.call(P),0,0).css(P.visible?Fa:Wa).on("mouseover",function(){P.setState(Tb);ab.css(aa)}).on("mouseout",function(){ab.css(P.visible?Fa:Wa);P.setState()}).on("click",function(){var ec=function(){P.setVisible()};
|
||||
P.firePointEvent?P.firePointEvent("legendItemClick",null,ec):Ha(P,"legendItemClick",null,ec)}).attr({zIndex:2}).add(Sa);if(!cb&&za&&za.lineWidth){var Zb={"stroke-width":za.lineWidth,zIndex:2};if(za.dashStyle)Zb.dashstyle=za.dashStyle;P.legendLine=pa.path([$a,-Za-La,0,Ga,-La,0]).attr(Zb).add(Sa)}if(cb)Ca=pa.rect(ua=-Za-La,va=-11,Za,12,2).attr({zIndex:3}).add(Sa);else if(za&&za.marker&&za.marker.enabled){Ca=za.marker.radius;Ca=pa.symbol(P.symbol,ua=-Za/2-La-Ca,va=-4-Ca,2*Ca,2*Ca).attr(P.pointAttr[Ib]).attr({zIndex:3}).add(Sa)}if(Ca){Ca.xOff=
|
||||
ua+ub%2/2;Ca.yOff=va+ub%2/2}P.legendSymbol=Ca;u(P,P.visible);if(za&&za.showCheckbox){P.checkbox=mb("input",{type:"checkbox",checked:P.selected,defaultChecked:P.selected},T.itemCheckboxStyle,sa);ra(P.checkbox,"click",function(ec){Ha(P,"checkboxClick",{checked:ec.target.checked},function(){P.select()})})}}ua=ab.getBBox();va=P.legendItemWidth=T.itemWidth||Za+La+ua.width+O;Z=ua.height;if(ta&&z-D+va>(Qb||Va-2*R-D)){z=D;L+=Z}ma=L;G(P,z,L);if(ta)z+=va;else L+=Z;Gb=Qb||ja(ta?z-D:va,Gb)}function qa(){z=D;
|
||||
L=F;ma=Gb=0;Sa||(Sa=pa.g("legend").attr({zIndex:7}).add());pb=[];A(Rb,function(Ca){var cb=Ca.options;if(cb.showInLegend)pb=pb.concat(cb.legendType==="point"?Ca.data:Ca)});pb.sort(function(Ca,cb){return(Ca.options.legendIndex||0)-(cb.options.legendIndex||0)});gc&&pb.reverse();A(pb,da);jc=Qb||Gb;kc=ma-F+Z;if(Na||Ab){jc+=2*R;kc+=2*R;if(ba)jc>0&&kc>0&&ba.animate(ba.crisp(null,null,null,jc,kc));else ba=pa.rect(0,0,jc,kc,T.borderRadius,Na||0).attr({stroke:T.borderColor,"stroke-width":Na||0,fill:Ab||Jb}).add(Sa).shadow(T.shadow);
|
||||
ba[pb.length?"show":"hide"]()}for(var P=["left","right","top","bottom"],ua,va=4;va--;){ua=P[va];if(Ba[ua]&&Ba[ua]!=="auto"){T[va<2?"align":"verticalAlign"]=ua;T[va<2?"x":"y"]=la(Ba[ua])*(va%2?-1:1)}}Sa.align(ca(T,{width:jc,height:kc}),true,Ia);qd||I()}var T=l.options.legend;if(T.enabled){var ta=T.layout==="horizontal",Za=T.symbolWidth,La=T.symbolPadding,pb,Ba=T.style,Fa=T.itemStyle,aa=T.itemHoverStyle,Wa=T.itemHiddenStyle,R=la(Ba.padding),O=20,F=18,D=4+R+Za+La,z,L,ma,Z=0,ba,Na=T.borderWidth,Ab=T.backgroundColor,
|
||||
Sa,Gb,Qb=T.width,Rb=l.series,gc=T.reversed;qa();ra(l,"endResize",I);return{colorizeItem:u,destroyItem:function(P){var ua=P.checkbox;A(["legendItem","legendLine","legendSymbol"],function(va){P[va]&&P[va].destroy()});ua&&dd(P.checkbox)},renderLegend:qa}}};ib=function(l,u){return l>=0&&l<=db&&u>=0&&u<=eb};ue=function(){Ha(n,"selection",{resetSelection:true},Gd);n.toolbar.remove("zoom")};Gd=function(l){var u=Ra.lang,G=n.pointCount<100;n.resetZoomEnabled!==false&&n.toolbar.add("zoom",u.resetZoom,u.resetZoomTitle,
|
||||
ue);!l||l.resetSelection?A(wb,function(I){I.options.zoomEnabled!==false&&I.setExtremes(null,null,false,G)}):A(l.xAxis.concat(l.yAxis),function(I){var da=I.axis;if(n.tracker[da.isXAxis?"zoomX":"zoomY"])da.setExtremes(I.min,I.max,false,G)});i()};Sc=function(){var l=a.legend,u=C(l.margin,10),G=l.x,I=l.y,da=l.align,qa=l.verticalAlign,T;Ld();if((n.title||n.subtitle)&&!M(s))if(T=ja(n.title&&!gb.floating&&!gb.verticalAlign&&gb.y||0,n.subtitle&&!$.floating&&!$.verticalAlign&&$.y||0))ea=ja(ea,T+C(gb.margin,
|
||||
15)+U);if(l.enabled&&!l.floating)if(da==="right")M(q)||(Xb=ja(Xb,jc-G+u+X));else if(da==="left")M(y)||(ga=ja(ga,jc+G+u+bb));else if(qa==="top")M(s)||(ea=ja(ea,kc+I+u+U));else if(qa==="bottom")M(r)||(tb=ja(tb,kc-I+u+Ua));if(n.extraBottomMargin)tb+=n.extraBottomMargin;if(n.extraTopMargin)ea+=n.extraTopMargin;Ic&&A(wb,function(ta){ta.getOffset()});M(y)||(ga+=rb[3]);M(s)||(ea+=rb[0]);M(r)||(tb+=rb[2]);M(q)||(Xb+=rb[1]);Md()};Kd=function(l,u,G){var I=n.title,da=n.subtitle;qd+=1;xc(G,n);sc=Ma;Wb=Va;if(M(l))n.chartWidth=
|
||||
Va=N(l);if(M(u))n.chartHeight=Ma=N(u);Ja(sa,{width:Va+qb,height:Ma+qb});pa.setSize(Va,Ma,G);db=Va-ga-Xb;eb=Ma-ea-tb;$b=null;A(wb,function(qa){qa.isDirty=true;qa.setScale()});A(Ka,function(qa){qa.isDirty=true});n.isDirtyLegend=true;n.isDirtyBox=true;Sc();I&&I.align(null,null,Ia);da&&da.align(null,null,Ia);i(G);sc=null;Ha(n,"resize");setTimeout(function(){Ha(n,"endResize",null,function(){qd-=1})},cd&&cd.duration||500)};Md=function(){n.plotLeft=ga=N(ga);n.plotTop=ea=N(ea);n.plotWidth=db=N(Va-ga-Xb);
|
||||
n.plotHeight=eb=N(Ma-ea-tb);n.plotSizeX=ya?eb:db;n.plotSizeY=ya?db:eb;Ia={x:bb,y:U,width:Va-bb-X,height:Ma-U-Ua};A(wb,function(l){l.setAxisSize()})};Ld=function(){ea=C(s,U);Xb=C(q,X);tb=C(r,Ua);ga=C(y,bb);rb=[0,0,0,0]};Id=function(){var l=o.borderWidth||0,u=o.backgroundColor,G=o.plotBackgroundColor,I=o.plotBackgroundImage,da,qa={x:ga,y:ea,width:db,height:eb};da=l+(o.shadow?8:0);if(l||u)if(uc)uc.animate(uc.crisp(null,null,null,Va-da,Ma-da));else uc=pa.rect(da/2,da/2,Va-da,Ma-da,o.borderRadius,l).attr({stroke:o.borderColor,
|
||||
"stroke-width":l,fill:u||Jb}).add().shadow(o.shadow);if(G)if(Lc)Lc.animate(qa);else Lc=pa.rect(ga,ea,db,eb,0).attr({fill:G}).add().shadow(o.plotShadow);if(I)if(ic)ic.animate(qa);else ic=pa.image(I,ga,ea,db,eb).add();if(o.plotBorderWidth)if(V)V.animate(V.crisp(null,ga,ea,db,eb));else V=pa.rect(ga,ea,db,eb,0,o.plotBorderWidth).attr({stroke:o.plotBorderColor,"stroke-width":o.plotBorderWidth,zIndex:4}).add();n.isDirtyBox=false};ra(sb,"unload",v);o.reflow!==false&&ra(n,"load",t);if(x)for(Db in x)ra(n,
|
||||
Db,x[Db]);n.options=a;n.series=Ka;n.xAxis=[];n.yAxis=[];n.addSeries=function(l,u,G){var I;if(l){xc(G,n);u=C(u,true);Ha(n,"addSeries",{options:l},function(){I=g(l);I.isDirty=true;n.isDirtyLegend=true;u&&n.redraw()})}return I};n.animation=C(o.animation,true);n.Axis=d;n.destroy=v;n.get=function(l){var u,G,I;for(u=0;u<wb.length;u++)if(wb[u].options.id===l)return wb[u];for(u=0;u<Ka.length;u++)if(Ka[u].options.id===l)return Ka[u];for(u=0;u<Ka.length;u++){I=Ka[u].points;for(G=0;G<I.length;G++)if(I[G].id===
|
||||
l)return I[G]}return null};n.getSelectedPoints=function(){var l=[];A(Ka,function(u){l=l.concat(Nd(u.points,function(G){return G.selected}))});return l};n.getSelectedSeries=function(){return Nd(Ka,function(l){return l.selected})};n.hideLoading=function(){td(Eb,{opacity:0},{duration:a.loading.hideDuration,complete:function(){Ja(Eb,{display:Jb})}});wc=false};n.initSeries=g;n.isInsidePlot=ib;n.redraw=i;n.setSize=Kd;n.setTitle=k;n.showLoading=function(l){var u=a.loading;if(!Eb){Eb=mb(cc,{className:"highcharts-loading"},
|
||||
ca(u.style,{left:ga+qb,top:ea+qb,width:db+qb,height:eb+qb,zIndex:10,display:Jb}),sa);vc=mb("span",null,u.labelStyle,Eb)}vc.innerHTML=l||a.lang.loading;if(!wc){Ja(Eb,{opacity:0,display:""});td(Eb,{opacity:u.style.opacity},{duration:u.showDuration});wc=true}};n.pointCount=0;n.counters=new ee;J()}function te(a){function b(V,n){var Ta={fill:bb.backgroundColor,stroke:bb.borderColor,"stroke-width":1};if(!sa){Ma[n]=f.g().css({cursor:"e-resize"}).attr({zIndex:3}).add();f.rect(-4.5,0,9,16,3,1).attr(Ta).add(Ma[n]);
|
||||
f.path(["M",-1.5,4,"L",-1.5,12,"M",0.5,4,"L",0.5,12]).attr(Ta).add(Ma[n])}Ma[n].translate(Pa+$+parseInt(V,10),tb+Ia/2-8)}function d(V){if(!sa){ic[V]=f.g().add(Wb);f.rect(-0.5,-0.5,$+1,$+1,m.buttonBorderRadius,m.buttonBorderWidth).attr({stroke:m.buttonBorderColor,"stroke-width":m.buttonBorderWidth,fill:m.buttonBackgroundColor}).add(ic[V]);f.path(["M",$/2+(V?-1:1),$/2-3,"L",$/2+(V?-1:1),$/2+3,$/2+(V?2:-2),$/2]).attr({fill:m.buttonArrowColor}).add(ic[V])}V&&ic[V].attr({translateX:Xa-$})}function c(V,
|
||||
n,Ta,Db){var ib=m.barBorderWidth;rb=tb+ga;Pa=a.plotLeft;Xa=a.plotWidth;j=Pa+$;Ta=C(Ta,q.translate(V));Db=C(Db,q.translate(n));if(sa&&q.getExtremes){V=a.xAxis[0].getExtremes();n=q.getExtremes();if(V.dataMin!==n.min||V.dataMax!==n.max)q.setExtremes(V.dataMin,V.dataMax)}r=parseInt(Ea(Ta,Db),10);y=parseInt(ja(Ta,Db),10);U=y-r;if(!sa){if(i){tc=f.rect().attr({fill:h.maskFill,zIndex:3}).add();hc=f.rect().attr({fill:h.maskFill,zIndex:3}).add();Va=f.path().attr({"stroke-width":gb,stroke:h.outlineColor,zIndex:3}).add()}if(t){Wb=
|
||||
f.g().add();Ta=m.trackBorderWidth;sc=f.rect().attr({y:-Ta%2/2,fill:m.trackBackgroundColor,stroke:m.trackBorderColor,"stroke-width":Ta,r:m.trackBorderRadius||0,height:$}).add(Wb);uc=f.rect().attr({y:-ib%2/2,height:$,fill:m.barBackgroundColor,stroke:m.barBorderColor,"stroke-width":ib,rx:Xb,ry:Xb}).add(Wb);Lc=f.path().attr({stroke:m.rifleColor,"stroke-width":1}).add(Wb)}}if(i){tc.attr({x:j,y:tb,width:r,height:Ia});hc.attr({x:j+y,y:tb,width:Xa-y-2*$,height:Ia});Va.attr({d:["M",Pa,rb,"L",j+r-ga,rb,j+r-
|
||||
ga,rb+ea,j+y+ga,rb+ea,j+y+ga,rb,Pa+Xa,rb]});b(r-ga,0);b(y+ga,1)}if(t){d(0);d(1);Wb.translate(Pa,N(rb+Ia));sc.attr({width:Xa});uc.attr({x:N($+r)+ib%2/2,width:U});ib=$+r+U/2-0.5;Lc.attr({d:[$a,ib-3,$/4,Ga,ib-3,2*$/3,$a,ib,$/4,Ga,ib,2*$/3,$a,ib+3,$/4,Ga,ib+3,2*$/3],visibility:U>12?Lb:Cb})}sa=true}function e(){ra(a.container,ve,function(V){V=a.tracker.normalizeMouseEvent(V);var n=V.chartX,Ta=V.chartY,Db=Hb?10:7;if(Ta>tb&&Ta<tb+Ia+$)if((Ta=!t||Ta<tb+Ia)&&na.abs(n-r-j)<Db){B=true;x=y}else if(Ta&&na.abs(n-
|
||||
y-j)<Db){v=true;x=r}else if(n>j+r&&n<j+y){J=n;Ua=X.cursor;X.cursor="ew-resize";o=n-r}else if(n>Pa&&n<Pa+Xa){n=Ta?n-j-U/2:n<j?r-Ea(10,U):n>Pa+Xa-$?r+Ea(10,U):n<j+r?r-U:y;if(n<0)n=0;else if(n+U>Xa-2*$)n=Xa-U-2*$;a.xAxis[0].setExtremes(q.translate(n,true),q.translate(n+U,true),true,false)}V.preventDefault&&V.preventDefault()});ra(a.container,Ee,function(V){V=a.tracker.normalizeMouseEvent(V);V=V.chartX;if(V<j)V=j;else if(V>Pa+Xa-$)V=Pa+Xa-$;if(B){s=true;c(0,0,V-j,x)}else if(v){s=true;c(0,0,x,V-j)}else if(J){s=
|
||||
true;if(V<o)V=o;else if(V>Xa+o-U-2*$)V=Xa+o-U-2*$;c(0,0,V-o,V-o+U)}});ra(document,Fe,function(){s&&a.xAxis[0].setExtremes(q.translate(r,true),q.translate(y,true),true,false);B=v=J=s=o=null;X.cursor=Ua})}var f=a.renderer,g=a.options,h=g.navigator,i=h.enabled,j,k,m=g.scrollbar,t=m.enabled,B,v,J,x,o,s,q,r,y,U,X=document.body.style,Ua,bb=h.handles,Ia=i?h.height:0,gb=h.outlineWidth,$=t?m.height:0,ea=Ia+$,Xb=m.barBorderRadius,tb=h.top||a.chartHeight-Ia-$-g.chart.spacingBottom,ga=gb/2,rb,Pa,Xa,sa;g=h.baseSeries;
|
||||
var Sb=a.series[g]||typeof g==="string"&&a.get(g)||a.series[0],tc,hc,Va,Ma=[],Wb,sc,uc,Lc,ic=[];a.resetZoomEnabled=false;(function(){var V=a.xAxis.length,n=a.yAxis.length;a.extraBottomMargin=ea+h.margin;if(i){var Ta=Sb.options,Db,ib=Ta.data;Ta.data=null;Db=Y(Sb.options,h.series,{threshold:null,clip:false,enableMouseTracking:false,group:"nav",padXAxis:false,xAxis:V,yAxis:n,name:"Navigator",showInLegend:false});Ta.data=Db.data=ib;k=a.initSeries(Db);ra(Sb,"updatedData",function(){var Oa=Sb.xAxis.getExtremes(),
|
||||
ac=Oa.max-Oa.min,Eb=Oa.max>=k.xData[k.xData.length-1],vc=Oa.min-ac<=k.xData[0];k.options.pointStart=Sb.xData[0];k.setData(Sb.options.data);if(Eb){Oa=Oa.dataMax;Sb.xAxis.setExtremes(Oa-ac,Oa)}else if(vc){Oa=Oa.dataMin;Sb.xAxis.setExtremes(Oa,Oa+ac)}else c(ja(Oa.min,Oa.dataMin),Ea(Oa.max,Oa.dataMax))});q=new a.Axis(Y(h.xAxis,{isX:true,type:"datetime",index:V,height:Ia,top:tb,offset:0,offsetLeft:$,offsetRight:-$,startOnTick:false,endOnTick:false,minPadding:0,maxPadding:0,zoomEnabled:false}));new a.Axis(Y(h.yAxis,
|
||||
{alignTicks:false,height:Ia,top:tb,offset:0,index:n,zoomEnabled:false}))}else q={translate:function(Oa,ac){var Eb=Sb.xAxis.getExtremes(),vc=a.plotWidth-2*$,wc=Eb.dataMin;Eb=Eb.dataMax-wc;return ac?Oa*Eb/vc+wc:vc*(Oa-wc)/Eb}};e()})();return{render:c}}function se(a){function b(x,o,s){var q=a.xAxis[0],r=q&&q.getExtremes(),y,U=r&&r.dataMin,X=r&&r.dataMax,Ua,bb=q&&Ea(r.max,X);r=new Date(bb);y=o.type;o=o.count;var Ia,gb,$={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(!(U===null||
|
||||
X===null)){if($[y]){Ia=$[y]*o;Ua=ja(bb-Ia,U)}else if(y==="month"){r.setMonth(r.getMonth()-o);Ua=ja(r.getTime(),U);Ia=2592E6*o}else if(y==="ytd"){r=new Date(0);y=new Date;gb=y.getFullYear();r.setFullYear(gb);String(gb)!==Gc("%Y",r)&&r.setFullYear(gb-1);Ua=gb=ja(U||0,r.getTime());y=y.getTime();bb=Ea(X||y,y)}else if(y==="year"){r.setFullYear(r.getFullYear()-o);Ua=ja(U,r.getTime());Ia=31536E6*o}else if(y==="all"&&q){Ua=U;bb=X}t[x]&&t[x].setState(2);if(q)setTimeout(function(){q.setExtremes(Ua,bb,C(s,1),
|
||||
0);m=x},1);else{a.options.xAxis=Y(a.options.xAxis,{range:Ia,min:gb});m=x}}}function d(x,o){var s=x.hasFocus?"%Y-%m-%d":"%b %e, %Y";if(o)x.HCTime=o;x.value=Gc(s,x.HCTime)}function c(x){var o=x==="min",s;mb("span",{innerHTML:h[o?"rangeSelectorFrom":"rangeSelectorTo"]},v.labelStyle,i);s=mb("input",{name:x,className:"highcharts-range-selector",type:"text"},ca({width:"80px",height:"16px",border:"1px solid silver",marginLeft:"5px",marginRight:o?"5px":"0",textAlign:"center"},v.inputStyle),i);s.onfocus=s.onblur=
|
||||
function(q){q=q||window.event;s.hasFocus=q.type==="focus";d(s)};s.onchange=function(){var q=s.value,r=Date.parse(q),y=a.xAxis[0].getExtremes();if(isNaN(r)){r=q.split("-");r=Date.UTC(la(r[0]),la(r[1])-1,la(r[2]))}if(!isNaN(r)&&(o&&r>y.dataMin&&r<k.HCTime||!o&&r<y.dataMax&&r>j.HCTime))a.xAxis[0].setExtremes(o?r:y.min,o?y.max:r)};return s}var e=a.renderer,f,g=a.container,h=Ra.lang,i,j,k,m,t=[],B,v,J=[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",
|
||||
text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}];a.resetZoomEnabled=false;(function(){a.extraTopMargin=25;v=a.options.rangeSelector;B=v.buttons||J;m=v.selected;ra(g,ve,function(){j&&j.blur();k&&k.blur()});m!==ha&&B[m]&&b(m,B[m],false);ra(a,"load",function(){ra(a.xAxis[0],"setExtremes",function(){t[m]&&t[m].setState(0)})})})();return{render:function(x,o){var s=a.options.chart.style,q=v.buttonTheme,r=v.inputEnabled!==false,y=q&&q.states;if(!f){e.text(h.rangeSelectorZoom,a.plotLeft,
|
||||
a.plotTop-10).css(v.labelStyle).add();A(B,function(U,X){t[X]=e.button(U.text,a.plotLeft+50+X*30,a.plotTop-25,function(){b(X,U);this.isActive=true},ca(q,{padding:1,r:0}),y&&y.hover,y&&y.select).attr({width:28,height:16}).css({textAlign:"center"}).add();m===X&&t[X].setState(2)});if(r){i=mb("div",null,{position:"relative",height:0,fontFamily:s.fontFamily,fontSize:s.fontSize},g.parentNode);i=mb("div",null,ca({position:"absolute",top:-a.chartHeight+a.plotTop-25+"px",right:a.chartWidth-a.plotLeft-a.plotWidth+
|
||||
"px"},v.inputBoxStyle),i);j=c("min");k=c("max")}}if(r){d(j,x);d(k,o)}f=true}}}var Da=document,sb=window,na=Math,N=na.round,Kb=na.floor,ld=na.ceil,ja=na.max,Ea=na.min,nb=na.abs,Mb=na.cos,Vb=na.sin,lc=na.PI,we=lc*2/360,Mc=navigator.userAgent,Zc=/msie/i.test(Mc)&&!sb.opera,Vc=Da.documentMode===8,oe=/AppleWebKit/.test(Mc),re=/Firefox/.test(Mc),Uc=!!Da.createElementNS&&!!Da.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,Tc,Hb=Da.documentElement.ontouchstart!==undefined,xe={},Jd=0,Ob=
|
||||
1,ed,Ra,Gc,cd,ud,ha,cc="div",Kc="absolute",qe="relative",Cb="hidden",Jc="highcharts-",Lb="visible",qb="px",Jb="none",$a="M",Ga="L",ye="rgba(192,192,192,"+(Uc?1.0E-6:0.0020)+")",Ib="",Tb="hover",Td="millisecond",Ud="second",Vd="minute",Wd="hour",Xd="day",Yd="week",Zd="month",$d="year",bd,wd,xd,zd,Oc,$c,ad,ae,be,yd,ce,de,S=sb.HighchartsAdapter,Fb=S||{},A=Fb.each,Nd=Fb.grep,Wc=Fb.map,Y=Fb.merge,ra=Fb.addEvent,Ub=Fb.removeEvent,Ha=Fb.fireEvent,td=Fb.animate,rd=Fb.stop,fb={};sb.Highcharts={};Gc=function(a,
|
||||
b,d){function c(B,v){B=B.toString().replace(/^([0-9])$/,"0$1");if(v===3)B=B.toString().replace(/^([0-9]{2})$/,"0$1");return B}if(!M(b)||isNaN(b))return"Invalid date";a=C(a,"%Y-%m-%d %H:%M:%S");var e=new Date(b*Ob),f,g=e[xd](),h=e[zd](),i=e[Oc](),j=e[$c](),k=e[ad](),m=Ra.lang,t=m.weekdays;m=m.months;b={a:t[h].substr(0,3),A:t[h],d:c(i),e:i,b:m[j].substr(0,3),B:m[j],m:c(j+1),y:k.toString().substr(2,2),Y:k,H:c(g),I:c(g%12||12),l:g%12||12,M:c(e[wd]()),p:g<12?"AM":"PM",P:g<12?"am":"pm",S:c(e.getSeconds()),
|
||||
L:c(b%1E3,3)};for(f in b)a=a.replace("%"+f,b[f]);return d?a.substr(0,1).toUpperCase()+a.substr(1):a};ee.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};S&&S.init&&S.init();if(!S&&sb.jQuery){var Nb=jQuery;A=function(a,b){for(var d=0,c=a.length;d<c;d++)if(b.call(a[d],a[d],d,a)===false)return d};Nd=Nb.grep;Wc=function(a,b){for(var d=[],c=0,e=a.length;c<e;c++)d[c]=b.call(a[c],a[c],c,a);return d};Y=function(){var a=arguments;return Nb.extend(true,
|
||||
null,a[0],a[1],a[2],a[3])};ra=function(a,b,d){Nb(a).bind(b,d)};Ub=function(a,b,d){var c=Da.removeEventListener?"removeEventListener":"detachEvent";if(Da[c]&&!a[c])a[c]=function(){};Nb(a).unbind(b,d)};Ha=function(a,b,d,c){var e=Nb.Event(b),f="detached"+b;ca(e,d);if(a[b]){a[f]=a[b];a[b]=null}Nb(a).trigger(e);if(a[f]){a[b]=a[f];a[f]=null}c&&!e.isDefaultPrevented()&&c(e)};td=function(a,b,d){var c=Nb(a);if(b.d){a.toD=b.d;b.d=1}c.stop();c.animate(b,d)};rd=function(a){Nb(a).stop()};Nb.extend(Nb.easing,{easeOutQuad:function(a,
|
||||
b,d,c,e){return-c*(b/=e)*(b-2)+d}});var Ge=jQuery.fx.step._default,He=jQuery.fx.prototype.cur;Nb.fx.step._default=function(a){var b=a.elem;b.attr?b.attr(a.prop,a.now):Ge.apply(this,arguments)};Nb.fx.step.d=function(a){var b=a.elem;if(!a.started){var d=ud.init(b,b.d,b.toD);a.start=d[0];a.end=d[1];a.started=true}b.attr("d",ud.step(a.start,a.end,a.pos,b.toD))};Nb.fx.prototype.cur=function(){var a=this.elem;return a.attr?a.attr(this.prop):He.apply(this,arguments)}}ud={init:function(a,b,d){b=b||"";var c=
|
||||
a.shift,e=b.indexOf("C")>-1,f=e?7:3,g;b=b.split(" ");d=[].concat(d);var h,i,j=function(k){for(g=k.length;g--;)k[g]===$a&&k.splice(g+1,0,k[g+1],k[g+2],k[g+1],k[g+2])};if(e){j(b);j(d)}if(a.isArea){h=b.splice(b.length-6,6);i=d.splice(d.length-6,6)}if(c===1)d=[].concat(d).splice(0,f).concat(d);a.shift=0;if(b.length)for(a=d.length;b.length<a;){c=[].concat(b).splice(b.length-f,f);if(e){c[f-6]=c[f-2];c[f-5]=c[f-1]}b=b.concat(c)}if(h){b=b.concat(h);d=d.concat(i)}return[b,d]},step:function(a,b,d,c){var e=
|
||||
[],f=a.length;if(d===1)e=c;else if(f===b.length&&d<1)for(;f--;){c=parseFloat(a[f]);e[f]=isNaN(c)?a[f]:d*parseFloat(b[f]-c)+c}else e=b;return e}};S={enabled:true,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};Ra={colors:["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July",
|
||||
"August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:true},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',
|
||||
fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0"},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,animation:{duration:1E3},events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:Y(S,
|
||||
{enabled:false,y:-6,formatter:function(){return this.y}}),cropThreshold:300,showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:Kc,color:"#3E576F"}},legend:{enabled:true,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:false,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{cursor:"pointer",color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},
|
||||
itemCheckboxStyle:{position:Kc,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:"bold",position:qe,top:"1em"},showDuration:100,style:{position:Kc,backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:true,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,shadow:true,snap:Hb?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},toolbar:{itemStyle:{color:"#4572A7",
|
||||
cursor:"pointer"}},credits:{enabled:false,text:"Highstock Beta",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var md={dateTimeLabelFormats:Yb(Td,"%H:%M:%S.%L",Ud,"%H:%M:%S",Vd,"%H:%M",Wd,"%H:%M",Xd,"%e. %b",Yd,"%e. %b",Zd,"%b '%y",$d,"%Y"),endOnTick:false,gridLineColor:"#C0C0C0",labels:S,lineColor:"#C0D0E0",lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",
|
||||
minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:false,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},Cd=Y(md,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,
|
||||
title:{rotation:270,text:"Y-values"},stackLabels:{enabled:false,formatter:function(){return this.total},style:S.style}}),Be={labels:{align:"right",x:-8,y:null},title:{rotation:270}},Ae={labels:{align:"left",x:8,y:null},title:{rotation:90}},ne={labels:{align:"center",x:0,y:14},title:{rotation:0}},ze=Y(ne,{labels:{y:-5}}),Qa=Ra.plotOptions;S=Qa.line;Qa.spline=Y(S);Qa.scatter=Y(S,{lineWidth:0,states:{hover:{lineWidth:0}}});Qa.area=Y(S,{threshold:0});Qa.areaspline=Y(Qa.area);Qa.column=Y(S,{borderColor:"#FFFFFF",
|
||||
borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,cropThreshold:50,padXAxis:true,states:{hover:{brightness:0.1,shadow:false},select:{color:"#C0C0C0",borderColor:"#000000",shadow:false}},dataLabels:{y:null,verticalAlign:null},threshold:0});Qa.bar=Y(Qa.column,{dataLabels:{align:"left",x:5,y:0}});Qa.pie=Y(S,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:true,dataLabels:{distance:30,enabled:true,formatter:function(){return this.point.name},
|
||||
y:5},legendType:"point",marker:null,size:"75%",showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});fe();var mc=function(a){var b=[],d;(function(c){if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(c))b=[la(d[1]),la(d[2]),la(d[3]),parseFloat(d[4],10)];else if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))b=[la(d[1],16),la(d[2],16),la(d[3],16),1]})(a);return{get:function(c){return b&&!isNaN(b[0])?c===
|
||||
"rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":c==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(c){if(Xc(c)&&c!==0){var e;for(e=0;e<3;e++){b[e]+=la(c*255);if(b[e]<0)b[e]=0;if(b[e]>255)b[e]=255}}return this},setOpacity:function(c){b[3]=c;return this}}};fd.prototype={init:function(a,b){this.element=Da.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a},animate:function(a,b,d){if(b=C(b,cd,true)){b=Y(b);if(d)b.complete=d;td(this,a,b)}else{this.attr(a);d&&d()}},attr:function(a,b){var d=
|
||||
this,c,e,f,g,h,i=d.element,j=i.nodeName,k=d.renderer,m,t=d.shadows,B,v=d;if(nc(a)&&M(b)){c=a;a={};a[c]=b}if(nc(a)){c=a;if(j==="circle")c={x:"cx",y:"cy"}[c]||c;else if(c==="strokeWidth")c="stroke-width";v=Aa(i,c)||d[c]||0;if(c!=="d"&&c!=="visibility")v=parseFloat(v)}else for(c in a){m=false;e=a[c];Ha(d,"setAttr",{key:c,value:e},function(J){f=J.result;if(M(f)&&f!==false)e=f;if(c==="d"){if(e&&e.join)e=e.join(" ");if(/(NaN| {2}|^$)/.test(e))e="M 0 0";d.d=e}else if(c==="x"&&j==="text"){for(g=0;g<i.childNodes.length;g++){h=
|
||||
i.childNodes[g];Aa(h,"x")===Aa(i,"x")&&Aa(h,"x",e)}if(d.rotation)Aa(i,"transform","rotate("+d.rotation+" "+e+" "+la(a.y||Aa(i,"y"))+")")}else if(c==="fill")e=k.color(e,i,c);else if(j==="circle"&&(c==="x"||c==="y"))c={x:"cx",y:"cy"}[c]||c;else if(j==="rect"&&c==="r"){Aa(i,{rx:e,ry:e});m=true}else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="verticalAlign"){d[c]=e;d.updateTransform();m=true}else if(c==="stroke")e=k.color(e,i,c);else if(c==="dashstyle"){c="stroke-dasharray";e=e&&e.toLowerCase();
|
||||
if(e==="solid")e=Jb;else if(e){e=e.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(g=e.length;g--;)e[g]=la(e[g])*a["stroke-width"];e=e.join(",")}}else if(c==="isTracker")d[c]=e;else if(c==="width")e=la(e);else if(c==="align"){c="text-anchor";e={left:"start",center:"middle",right:"end"}[e]}if(c==="strokeWidth")c=
|
||||
"stroke-width";if(oe&&c==="stroke-width"&&e===0)e=1.0E-6;if(d.symbolName&&/^(x|y|r|start|end|innerR)/.test(c)){if(!B){d.symbolAttr(a);B=true}m=true}if(t&&/^(width|height|visibility|x|y|d|transform)$/.test(c))for(g=t.length;g--;)Aa(t[g],c,e);if((c==="width"||c==="height")&&j==="rect"&&e<0)e=0;if(c==="text"){d.textStr=e;d.added&&k.buildText(d)}else m||Aa(i,c,e);J.callback&&J.callback()})}return v},symbolAttr:function(a){var b=this;A(["x","y","r","start","end","width","height","innerR","anchorX","anchorY"],
|
||||
function(d){b[d]=C(a[d],b[d])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},crisp:function(a,b,d,c,e){var f,g={},h={},i;a=a||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;i=a%2/2;h.x=Kb(b||this.x||0)+i;h.y=Kb(d||this.y||0)+i;h.width=Kb((c||this.width||0)-2*i);h.height=Kb((e||this.height||0)-2*i);h.strokeWidth=a;for(f in h)if(this[f]!==h[f])this[f]=g[f]=h[f];return g},css:function(a){var b=
|
||||
this.element;b=a&&a.width&&b.nodeName==="text";var d,c,e=function(f,g){return"-"+g.toLowerCase()};if(a&&a.color)a.fill=a.color;this.styles=a=ca(this.styles,a);if(Zc&&!Uc){b&&delete a.width;Ja(this.element,a)}else{for(d in a)c+=d.replace(/([A-Z])/g,e)+":"+a[d]+";";this.attr({style:c})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var d=b;if(Hb&&a==="click"){a="touchstart";d=function(c){c.preventDefault();b()}}this.element["on"+a]=d;return this},translate:function(a,b){return this.attr({translateX:a,
|
||||
translateY:b})},invert:function(){this.inverted=true;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,d=this.inverted,c=this.rotation,e=this.shadows,f=[];if(d){a+=this.attr("width");b+=this.attr("height")}if(a||b)f.push("translate("+a+","+b+")");if(d)f.push("rotate(90) scale(-1,1)");else c&&f.push("rotate("+c+" "+this.x+" "+this.y+")");if(f.length){Aa(this.element,"transform",f.join(" "));e&&A(e,function(g){Aa(g,"transform","translate("+
|
||||
(a+1)+","+(b+1)+")")})}},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,d){if(a){this.alignOptions=a;this.alignByTranslate=b;d||this.renderer.alignedObjects.push(this)}else{a=this.alignOptions;b=this.alignByTranslate}d=C(d,this.renderer);var c=a.align,e=a.verticalAlign,f=(d.x||0)+(a.x||0),g=(d.y||0)+(a.y||0),h={};if(/^(right|center)$/.test(c))f+=(d.width-(a.width||0))/{right:1,center:2}[c];h[b?"translateX":"x"]=N(f);if(/^(bottom|middle)$/.test(e))g+=
|
||||
(d.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=N(g);this[this.placed?"animate":"attr"](h);this.placed=true;this.alignAttr=h;return this},getBBox:function(){var a,b,d,c=this.rotation,e=c*we;try{a=ca({},this.element.getBBox())}catch(f){a={width:0,height:0}}b=a.width;d=a.height;if(c){a.width=nb(d*Vb(e))+nb(b*Mb(e));a.height=nb(d*Mb(e))+nb(b*Vb(e))}return a},show:function(){return this.attr({visibility:Lb})},hide:function(){return this.attr({visibility:Cb})},add:function(a){var b=
|
||||
this.renderer,d=a||b,c=d.element||b.box,e=c.childNodes,f=this.element,g=Aa(f,"zIndex"),h;this.parentInverted=a&&a.inverted;this.textStr!==undefined&&b.buildText(this);if(g){d.handleZ=true;g=la(g)}if(d.handleZ)for(d=0;d<e.length;d++){a=e[d];b=Aa(a,"zIndex");if(a!==f&&(la(b)>g||!M(g)&&M(b))){c.insertBefore(f,a);h=true;break}}h||c.appendChild(f);this.added=true;Ha(this,"add");return this},destroy:function(){var a=this.element||{},b=this.shadows,d=this.box,c=a.parentNode,e;a.onclick=a.onmouseout=a.onmouseover=
|
||||
a.onmousemove=null;rd(this);c&&c.removeChild(a);b&&A(b,function(f){(c=f.parentNode)&&c.removeChild(f)});d&&d.destroy();Yc(this.renderer.alignedObjects,this);for(e in this)delete this[e];return null},empty:function(){for(var a=this.element,b=a.childNodes,d=b.length;d--;)a.removeChild(b[d])},shadow:function(a,b){var d=[],c,e,f=this.element,g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(c=1;c<=3;c++){e=f.cloneNode(0);Aa(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*c,"stroke-width":7-
|
||||
2*c,transform:"translate"+g,fill:Jb});b?b.element.appendChild(e):f.parentNode.insertBefore(e,f);d.push(e)}this.shadows=d}return this}};var sd=function(){this.init.apply(this,arguments)};sd.prototype={Element:fd,init:function(a,b,d,c){var e=location,f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element);this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Zc?"":e.href.replace(/#.*?$/,"");this.defs=this.createElement("defs").add();
|
||||
this.forExport=c;this.setSize(b,d,false)},createElement:function(a){var b=new this.Element;b.init(this,a);return b},buildText:function(a){for(var b=a.element,d=C(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),c=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=Aa(b,"x"),h=a.styles,i=re&&h&&h.HcDirection==="rtl"&&!this.forExport&&
|
||||
la(Mc.split("Firefox/")[1])<4,j,k=h&&la(h.width),m=h&&h.lineHeight,t,B=c.length;B--;)b.removeChild(c[B]);k&&!a.added&&this.box.appendChild(b);A(d,function(v,J){var x,o=0,s;v=v.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");x=v.split("|||");A(x,function(q){if(q!==""||x.length===1){var r={},y=Da.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(q)&&Aa(y,"style",q.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(f.test(q)){Aa(y,"onclick",'location.href="'+q.match(f)[1]+
|
||||
'"');Ja(y,{cursor:"pointer"})}q=(q.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">");if(i){j=[];for(B=q.length;B--;)j.push(q.charAt(B));q=j.join("")}y.appendChild(Da.createTextNode(q));if(o)r.dx=3;else r.x=g;if(!o){if(J){!Uc&&a.renderer.forExport&&Ja(y,{display:"block"});s=sb.getComputedStyle&&sb.getComputedStyle(t,null).getPropertyValue("line-height");if(!s||isNaN(s))s=m||t.offsetHeight||18;Aa(y,"dy",s)}t=y}Aa(y,r);b.appendChild(y);o++;if(k){q=q.replace(/-/g,"- ").split(" ");
|
||||
for(var U,X=[];q.length||X.length;){U=b.getBBox().width;r=U>k;if(!r||q.length===1){q=X;X=[];if(q.length){y=Da.createElementNS("http://www.w3.org/2000/svg","tspan");Aa(y,{dy:m||16,x:g});b.appendChild(y);if(U>k)k=U}}else{y.removeChild(y.firstChild);X.unshift(q.pop())}q.length&&y.appendChild(Da.createTextNode(q.join(" ").replace(/- /g,"-")))}}}})})},button:function(a,b,d,c,e,f,g){var h=this.label(a,b,d),i=0,j,k,m,t,B;e=Y(Yb("stroke-width",1,"stroke","#999","fill",Yb("linearGradient",[0,0,0,14],"stops",
|
||||
[[0,"#FFF"],[1,"#DDD"]]),"r",3,"padding",3,"style",Yb("color","black")),e);m=e.style;delete e.style;f=Y(e,Yb("stroke","#68A","fill",Yb("linearGradient",[0,0,0,14],"stops",[[0,"#FFF"],[1,"#ACF"]])),f);t=f.style;delete f.style;g=Y(e,Yb("stroke","#68A","fill",Yb("linearGradient",[0,0,0,14],"stops",[[0,"#9BD"],[1,"#CDF"]])),g);B=g.style;delete g.style;ra(h.element,"mouseenter",function(){h.attr(f).css(t)});ra(h.element,"mouseleave",function(){j=[e,f,g][i];k=[m,t,B][i];h.attr(j).css(k)});h.setState=function(v){if(i=
|
||||
v)v===2&&h.attr(g).css(B);else h.attr(e).css(m)};return h.on("click",function(){c.call(h)}).attr(e).css(ca({cursor:"default"},m))},crispLine:function(a,b){if(a[1]===a[4])a[1]=a[4]=N(a[1])+b%2/2;if(a[2]===a[5])a[2]=a[5]=N(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:Jb})},circle:function(a,b,d){a=bc(a)?a:{x:a,y:b,r:d};return this.createElement("circle").attr(a)},arc:function(a,b,d,c,e,f){if(bc(a)){b=a.y;d=a.r;c=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc",
|
||||
a||0,b||0,d||0,d||0,{innerR:c||0,start:e||0,end:f||0})},rect:function(a,b,d,c,e,f){if(bc(a)){b=a.y;d=a.width;c=a.height;e=a.r;f=a.strokeWidth;a=a.x}e=this.createElement("rect").attr({rx:e,ry:e,fill:Jb});return e.attr(e.crisp(f,a,b,ja(d,0),ja(c,0)))},setSize:function(a,b,d){var c=this.alignedObjects,e=c.length;this.width=a;this.height=b;for(this.boxWrapper[C(d,true)?"animate":"attr"]({width:a,height:b});e--;)c[e].align()},g:function(a){return this.createElement("g").attr(M(a)&&{"class":Jc+a})},image:function(a,
|
||||
b,d,c,e){var f={preserveAspectRatio:Jb};arguments.length>1&&ca(f,{x:b,y:d,width:c,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,d,c,e,f){var g,h=this.symbols[a];h=h&&h(N(b),N(d),c,e,f);var i=/^url\((.*?)\)$/,j;if(h){g=this.path(h);ca(g,{symbolName:a,x:b,y:d,width:c,height:e});f&&ca(g,f)}else if(i.test(a)){var k=function(m,t){m.attr({width:t[0],
|
||||
height:t[1]}).translate(-N(t[0]/2),-N(t[1]/2))};j=a.match(i)[1];a=xe[j];g=this.image(j).attr({x:b,y:d});if(a)k(g,a);else{g.attr({width:0,height:0});mb("img",{onload:function(){k(g,xe[j]=[this.width,this.height])},src:j})}}return g},symbols:{circle:function(a,b,d,c){var e=0.166*d;return[$a,a+d/2,b,"C",a+d+e,b,a+d+e,b+c,a+d/2,b+c,"C",a-e,b+c,a-e,b,a+d/2,b,"Z"]},square:function(a,b,d,c){return[$a,a,b,Ga,a+d,b,a+d,b+c,a,b+c,"Z"]},triangle:function(a,b,d,c){return[$a,a+d/2,b,Ga,a+d,b+c,a,b+c,"Z"]},"triangle-down":function(a,
|
||||
b,d,c){return[$a,a,b,Ga,a+d,b,a+d/2,b+c,"Z"]},diamond:function(a,b,d,c){return[$a,a+d/2,b,Ga,a+d,b+c/2,a+d/2,b+c,a,b+c/2,"Z"]},arc:function(a,b,d,c,e){var f=e.start,g=e.end-1.0E-6;c=e.innerR;var h=Mb(f),i=Vb(f),j=Mb(g);g=Vb(g);e=e.end-f<lc?0:1;return[$a,a+d*h,b+d*i,"A",d,d,0,e,1,a+d*j,b+d*g,Ga,a+c*j,b+c*g,"A",c,c,0,e,0,a+c*h,b+c*i,"Z"]}},clipRect:function(a,b,d,c){var e=Jc+Jd++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,d,c,0).add(f);a.id=e;return a},color:function(a,
|
||||
b,d){var c,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient;d=Jc+Jd++;var g,h,i;g=f.createElement("linearGradient").attr({id:d,gradientUnits:"userSpaceOnUse",x1:b[0],y1:b[1],x2:b[2],y2:b[3]}).add(f.defs);A(a.stops,function(j){if(e.test(j[1])){c=mc(j[1]);h=c.get("rgb");i=c.get("a")}else{h=j[1];i=1}f.createElement("stop").attr({offset:j[0],"stop-color":h,"stop-opacity":i}).add(g)});return"url("+this.url+"#"+d+")"}else if(e.test(a)){c=mc(a);Aa(b,d+"-opacity",c.get("a"));return c.get("rgb")}else return a},
|
||||
text:function(a,b,d){var c=Ra.chart.style;b=N(C(b,0));d=N(C(d,0));a=this.createElement("text").attr({x:b,y:d,text:a}).css({fontFamily:c.fontFamily,fontSize:c.fontSize});a.x=b;a.y=d;return a},label:function(a,b,d,c,e,f){function g(){m=(v===undefined||J===undefined||j.styles.textAlign)&&j.getBBox(true);var s=(v||m.width)+2*B,q=(J||m.height)+2*B,r;x=N(s*{left:0,center:0.5,right:1}[t]);r=e!==undefined&&{anchorX:e-b+x,anchorY:f-d};if(!k){j.box=k=c?i.symbol(c,0,0,s,q,r):i.rect(0,0,s,q,0,o["stroke-width"]);
|
||||
k.add()}k.attr(Y({width:s,height:q},r,o));o=null}function h(s,q){if(k)k.attr(s,q);else o[s]=q}var i=this,j=i.text(a),k,m,t="left",B=2,v,J,x,o={};ra(j,"add",function(){g();var s=k.element,q=j.element,r=Aa(q,"zIndex");M(r)&&Aa(s,"zIndex",r);q.parentNode.insertBefore(s,q);j.attr({x:b,y:d})});ra(j,"setAttr",function(s){var q=s.key,r=s.value,y;if(q==="width"){v=r;y=false}else if(q==="height"){J=r;y=false}else if(q==="padding"){B=r;y=false}else if(q==="align")t=r;else if(q==="visibility"||q==="zIndex")h(q,
|
||||
r);else if(q==="stroke"||q==="stroke-width"||q==="fill"||q==="r"){h(q,r);y=false}else if(q==="x"){s=j.styles.textAlign;h("translateX",r-x);if(t==="left"&&M(v)&&(s==="center"||s==="right"))r+={center:0.5,right:1}[s]*(v-m.width);y=N(r+{left:1,center:0,right:-1}[t]*B)}else if(q==="y"){h("translateY",r);y=N(r+la(j.styles.fontSize||12)*1.2)}else if(q==="text")s.callback=g;if(y!==ha)return y});j.txtToFront=j.toFront;return ca(j,{shadow:function(s){k.shadow(s);return j},toFront:function(){k.toFront();j.txtToFront()}})}};
|
||||
Tc=sd;if(!Uc){Fb=yb(fd,{init:function(a,b){var d=["<",b,' filled="f" stroked="f"'],c=["position: ",Kc,";"];if(b==="shape"||b===cc)c.push("left:0;top:0;width:10px;height:10px;");if(Vc)c.push("visibility: ",b===cc?Cb:Lb);d.push(' style="',c.join(""),'"/>');if(b){d=b===cc||b==="span"||b==="img"?d.join(""):a.prepVML(d);this.element=mb(d)}this.renderer=a},add:function(a){var b=this.renderer,d=this.element,c=b.box;c=a?a.element||a:c;a&&a.inverted&&b.invertChild(d,c);Vc&&c.gVis===Cb&&Ja(d,{visibility:Cb});
|
||||
c.appendChild(d);this.added=true;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();Ha(this,"add");return this},attr:function(a,b){var d=this,c,e,f,g,h=d.element||{},i=h.style,j=h.nodeName,k=d.renderer,m=d.symbolName,t,B,v=d.shadows,J,x=d;if(nc(a)&&M(b)){c=a;a={};a[c]=b}if(nc(a)){c=a;x=c==="strokeWidth"||c==="stroke-width"?d.strokeweight:d[c]}else for(c in a){e=a[c];J=false;Ha(d,"setAttr",{key:c,value:e},function(o){g=o.result;if(M(g)&&g!==false)e=g;if(m&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!B){d.symbolAttr(a);
|
||||
B=true}J=true}else if(c==="d"){e=e||[];d.d=e.join(" ");f=e.length;for(var s=[];f--;)s[f]=Xc(e[f])?N(e[f]*10)-5:e[f]==="Z"?"x":e[f];e=s.join(" ")||"x";h.path=e;if(v)for(f=v.length;f--;)v[f].path=e;J=true}else if(c==="zIndex"||c==="visibility"){if(Vc&&c==="visibility"&&j==="DIV"){h.gVis=e;t=h.childNodes;for(f=t.length;f--;)Ja(t[f],{visibility:e});if(e===Lb)e=null}if(e)i[c]=e;J=true}else if(c==="width"||c==="height"){if(d.updateClipping){d[c]=e;d.updateClipping()}else i[c]=e;J=true}else if(/^(x|y)$/.test(c)){d[c]=
|
||||
e;if(h.tagName==="SPAN")d.updateTransform();else i[{x:"left",y:"top"}[c]]=e}else if(c==="class")h.className=e;else if(c==="stroke"){e=k.color(e,h,c);c="strokecolor"}else if(c==="stroke-width"||c==="strokeWidth"){h.stroked=e?true:false;c="strokeweight";d[c]=e;if(Xc(e))e+=qb}else if(c==="dashstyle"){(h.getElementsByTagName("stroke")[0]||mb(k.prepVML(["<stroke/>"]),null,null,h))[c]=e||"solid";d.dashstyle=e;J=true}else if(c==="fill")if(j==="SPAN")i.color=e;else{h.filled=e!==Jb?true:false;e=k.color(e,
|
||||
h,c);c="fillcolor"}else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="align"){if(c==="align")c="textAlign";d[c]=e;d.updateTransform();J=true}else if(c==="text"){this.bBox=null;h.innerHTML=e;J=true}if(v&&c==="visibility")for(f=v.length;f--;)v[f].style[c]=e;if(!J)if(Vc)try{h[c]=e}catch(q){console.log([h.tagName,c,e].join(", "))}else Aa(h,c,e);o.callback&&o.callback()})}return x},clip:function(a){var b=this,d=a.members;d.push(b);b.destroyClip=function(){Yc(d,b)};return b.css(a.getCSS(b.inverted))},
|
||||
css:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=ca(this.styles,a);Ja(this.element,a);return this},destroy:function(){this.destroyClip&&this.destroyClip();fd.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,d;b--;){d=a[b];d.parentNode.removeChild(d)}},getBBox:function(a){var b=this.element,d=this.bBox;if(!d||a){if(b.nodeName==="text")b.style.position=Kc;d=this.bBox=
|
||||
{x:b.offsetLeft,y:b.offsetTop,width:b.offsetWidth,height:b.offsetHeight}}return d},on:function(a,b){this.element["on"+a]=function(){var d=sb.event;d.target=d.srcElement;b(d)};return this},updateTransform:function(){if(this.added){var a=this,b=a.element,d=a.translateX||0,c=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||"left",h={left:0,center:0.5,right:1}[g],i=g&&g!=="left",j=a.shadows;if(d||c){Ja(b,{marginLeft:d,marginTop:c});j&&A(j,function(q){Ja(q,{marginLeft:d+1,marginTop:c+1})})}a.inverted&&
|
||||
A(b.childNodes,function(q){a.renderer.invertChild(q,b)});if(b.tagName==="SPAN"){var k,m;j=a.rotation;var t;k=0;var B=1,v=0,J;t=la(a.textWidth);var x=a.xCorr||0,o=a.yCorr||0,s=[j,g,b.innerHTML,a.textWidth].join(",");if(s!==a.cTT){if(M(j)){k=j*we;B=Mb(k);v=Vb(k);Ja(b,{filter:j?["progid:DXImageTransform.Microsoft.Matrix(M11=",B,", M12=",-v,", M21=",v,", M22=",B,", sizingMethod='auto expand')"].join(""):Jb})}k=C(a.elemWidth,b.offsetWidth);m=C(a.elemHeight,b.offsetHeight);if(k>t){Ja(b,{width:t+qb,display:"block",
|
||||
whiteSpace:"normal"});k=t}t=N((la(b.style.fontSize)||12)*1.2);x=B<0&&-k;o=v<0&&-m;J=B*v<0;x+=v*t*(J?1-h:h);o-=B*t*(j?J?h:1-h:1);if(i){x-=k*h*(B<0?-1:1);if(j)o-=m*h*(v<0?-1:1);Ja(b,{textAlign:g})}a.xCorr=x;a.yCorr=o}Ja(b,{left:e+x,top:f+o});a.cTT=s}}else this.alignOnAdd=true},shadow:function(a,b){var d=[],c,e=this.element,f=this.renderer,g,h=e.style,i,j=e.path;if(j&&typeof j.value!=="string")j="x";if(a){for(c=1;c<=3;c++){i=['<shape isShadow="true" strokeweight="',7-2*c,'" filled="false" path="',j,
|
||||
'" coordsize="100,100" style="',e.style.cssText,'" />'];g=mb(f.prepVML(i),null,{left:la(h.left)+1,top:la(h.top)+1});i=['<stroke color="black" opacity="',0.05*c,'"/>'];mb(f.prepVML(i),null,null,g);b?b.element.appendChild(g):e.parentNode.insertBefore(g,e);d.push(g)}this.shadows=d}return this}});S=function(){this.init.apply(this,arguments)};S.prototype=Y(sd.prototype,{Element:Fb,isIE8:Mc.indexOf("MSIE 8.0")>-1,init:function(a,b,d){var c;this.alignedObjects=[];c=this.createElement(cc);a.appendChild(c.element);
|
||||
this.box=c.element;this.boxWrapper=c;this.setSize(b,d,false);if(!Da.namespaces.hcv){Da.namespaces.add("hcv","urn:schemas-microsoft-com:vml");Da.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}},clipRect:function(a,b,d,c){var e=this.createElement();return ca(e,{members:[],left:a,top:b,width:d,height:c,getCSS:function(f){var g=this.top,h=this.left,i=h+this.width,j=g+this.height;g={clip:"rect("+N(f?h:g)+"px,"+N(f?j:
|
||||
i)+"px,"+N(f?i:j)+"px,"+N(f?g:h)+"px)"};!f&&Vc&&ca(g,{width:i+qb,height:j+qb});return g},updateClipping:function(){A(e.members,function(f){f.css(e.getCSS(f.inverted))})}})},color:function(a,b,d){var c,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,i,j,k,m;A(a.stops,function(t,B){if(e.test(t[1])){c=mc(t[1]);f=c.get("rgb");g=c.get("a")}else{f=t[1];g=1}if(B){k=f;m=g}else{i=f;j=g}});a=90-na.atan((h[3]-h[1])/(h[2]-h[0]))*180/lc;d=["<",d,' colors="0% ',i,",100% ",k,'" angle="',a,'" opacity="',
|
||||
m,'" o:opacity2="',j,'" type="gradient" focus="100%" />'];mb(this.prepVML(d),null,null,b)}else if(e.test(a)&&b.tagName!=="IMG"){c=mc(a);d=["<",d,' opacity="',c.get("a"),'"/>'];mb(this.prepVML(d),null,null,b);return c.get("rgb")}else return a},prepVML:function(a){var b=this.isIE8;a=a.join("");if(b){a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')}else a=
|
||||
a.replace("<","<hcv:");return a},text:function(a,b,d){var c=Ra.chart.style;return this.createElement("span").attr({text:a,x:N(b),y:N(d)}).css({whiteSpace:"nowrap",fontFamily:c.fontFamily,fontSize:c.fontSize})},path:function(a){return this.createElement("shape").attr({coordsize:"100 100",d:a})},circle:function(a,b,d){return this.symbol("circle").attr({x:a,y:b,r:d})},g:function(a){var b;if(a)b={className:Jc+a,"class":Jc+a};return this.createElement(cc).attr(b)},image:function(a,b,d,c,e){var f=this.createElement("img").attr({src:a});
|
||||
arguments.length>1&&f.css({left:b,top:d,width:c,height:e});return f},rect:function(a,b,d,c,e,f){if(bc(a)){b=a.y;d=a.width;c=a.height;f=a.strokeWidth;a=a.x}var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,ja(d,0),ja(c,0)))},invertChild:function(a,b){var d=b.style;Ja(a,{flip:"x",left:la(d.width)-10,top:la(d.height)-10,rotation:-90})},symbols:{arc:function(a,b,d,c,e){c=e.start;var f=e.end,g=Mb(c),h=Vb(c),i=Mb(f),j=Vb(f);e=e.innerR;var k=0.07/d,m=e&&0.1/e||0;if(f-c===0)return["x"];else if(2*
|
||||
lc-f+c<k)i=-k;else if(f-c<m)i=Mb(c+m);return["wa",a-d,b-d,a+d,b+d,a+d*g,b+d*h,a+d*i,b+d*j,"at",a-e,b-e,a+e,b+e,a+e*i,b+e*j,a+e*g,b+e*h,"x","e"]},circle:function(a,b,d,c){return["wa",a,b,a+d,b+c,a+d,b+c/2,a+d,b+c/2,"e"]},rect:function(a,b,d,c,e){if(!M(e))return[];var f=a+d,g=b+c;d=Ea(e.r||0,d,c);return[$a,a+d,b,Ga,f-d,b,"wa",f-2*d,b,f,b+2*d,f-d,b,f,b+d,Ga,f,g-d,"wa",f-2*d,g-2*d,f,g,f,g-d,f-d,g,Ga,a+d,g,"wa",a,g-2*d,a+2*d,g,a+d,g,a,g-d,Ga,a,b+d,"wa",a,b,a+2*d,b+2*d,a,b+d,a+d,b,"x","e"]}}});Tc=S}gd.prototype.callbacks=
|
||||
[];var Nc=function(){};Nc.prototype={init:function(a,b,d){var c=a.chart.counters;this.series=a;this.applyOptions(b,d);this.pointAttr={};if(a.options.colorByPoint){b=a.chart.options.colors;if(!this.options)this.options={};this.color=this.options.color=this.color||b[c.color++];c.wrapColor(b.length)}a.chart.pointCount++;return this},applyOptions:function(a,b){var d=this.series,c=typeof a;this.config=a;if(c==="number"||a===null)this.y=a;else if(typeof a[0]==="number"){this.x=a[0];this.y=a[1]}else if(c===
|
||||
"object"&&typeof a.length!=="number"){ca(this,a);this.options=a}else if(typeof a[0]==="string"){this.name=a[0];this.y=a[1]}if(this.x===ha)this.x=b===ha?d.autoIncrement():b},destroy:function(){var a=this.series,b;a.chart.pointCount--;this===a.chart.hoverPoint&&this.onMouseOut();a.chart.hoverPoints=null;if(this.graphic){Ub(this);this.destroyElements()}this.legendItem&&this.series.chart.legend.destroyItem(this);for(b in this)this[b]=null},destroyElements:function(){for(var a=["graphic","tracker","dataLabel",
|
||||
"group","connector"],b,d=5;d--;){b=a[d];if(this[b])this[b]=this[b].destroy()}},getLabelConfig:function(){return{x:this.category,y:this.y,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var d=this,c=d.series.chart;d.selected=a=C(a,!d.selected);d.firePointEvent(a?"select":"unselect");d.setState(a&&"select");b||A(c.getSelectedPoints(),function(e){if(e.selected&&e!==d){e.selected=false;e.setState(Ib);e.firePointEvent("unselect")}})},onMouseOver:function(){var a=
|
||||
this.series,b=a.chart,d=b.tooltip,c=b.hoverPoint;c&&c!==this&&c.onMouseOut();this.firePointEvent("mouseOver");if(d&&(!d.shared||a.noSharedTooltip))d.refresh(this);this.setState(Tb);b.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut");this.setState();this.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series;return['<span style="color:'+b.color+'">',this.name||b.name,"</span>: ",!a?"<b>x = "+(this.name||this.x)+",</b> ":"","<b>",!a?"y = ":"",this.y,"</b>"].join("")},
|
||||
update:function(a,b,d){var c=this,e=c.series,f=c.graphic,g,h=e.data,i=h.length,j=e.chart;b=C(b,true);c.firePointEvent("update",{options:a},function(){c.applyOptions(a);if(bc(a)){e.getAttribs();f&&f.attr(c.pointAttr[e.state])}for(g=0;g<i;g++)if(h[g]===c){e.xData[g]=c.x;e.yData[g]=c.y;e.options.data[g]=a;break}e.isDirty=true;e.isDirtyData=true;b&&j.redraw(d)})},remove:function(a,b){var d=this,c=d.series,e=c.chart,f,g=c.data,h=g.length;xc(b,e);a=C(a,true);d.firePointEvent("remove",null,function(){for(f=
|
||||
0;f<h;f++)if(g[f]===d){g.splice(f,1);c.options.data.splice(f,1);c.xData.splice(f,1);c.yData.splice(f,1);break}d.destroy();c.isDirty=true;c.isDirtyData=true;a&&e.redraw()})},firePointEvent:function(a,b,d){var c=this,e=this.series.options;if(e.point.events[a]||c.options&&c.options.events&&c.options.events[a])this.importEvents();if(a==="click"&&e.allowPointSelect)d=function(f){c.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};Ha(this,a,b,d)},importEvents:function(){if(!this.hasImportedEvents){var a=Y(this.series.options.point,
|
||||
this.options).events,b;this.events=a;for(b in a)ra(this,b,a[b]);this.hasImportedEvents=true}},setState:function(a){var b=this.series,d=b.options.states,c=Qa[b.type].marker&&b.options.marker,e=c&&!c.enabled,f=c&&c.states[a],g=f&&f.enabled===false,h=b.stateMarkerGraphic,i=b.chart,j=this.pointAttr;a=a||Ib;if(!(a===this.state||this.selected&&a!=="select"||d[a]&&d[a].enabled===false||a&&(g||e&&!f.enabled))){if(this.graphic)this.graphic.attr(j[a]);else{if(a){if(!h){d=c.radius;b.stateMarkerGraphic=h=i.renderer.symbol(b.symbol,
|
||||
-d,-d,2*d,2*d).attr(j[a]).add(b.group)}h.translate(this.plotX,this.plotY)}if(h)h[a?"show":"hide"]()}this.state=a}}};var xb=function(){};xb.prototype={isCartesian:true,type:"line",pointClass:Nc,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var d,c;c=a.series.length;this.chart=a;b=this.setOptions(b);ca(this,{index:c,options:b,name:b.name||"Series "+(c+1),state:Ib,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});c=
|
||||
b.events;for(d in c)ra(this,d,c[d]);if(c&&c.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=true;this.getColor();this.getSymbol();this.setData(b.data,false)},autoIncrement:function(){var a=this.options,b=this.xIncrement;b=C(b,a.pointStart,0);this.pointInterval=C(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},getSegments:function(){var a=-1,b=[],d=this.points;A(d,function(c,e){if(c.y===null){e>a+1&&b.push(d.slice(a+1,
|
||||
e));a=e}else e===d.length-1&&b.push(d.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions,d=a.data;a.data=null;a=Y(b[this.type],b.series,a);a.data=d;return a},getColor:function(){var a=this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++];b.wrapSymbol(a.length)},
|
||||
addPoint:function(a,b,d,c){var e=this.data,f=this.graph,g=this.area,h=this.chart,i=this.xData,j=this.yData,k=f.shift||0,m=this.options.data;xc(c,h);if(f&&d)f.shift=k+1;if(g){g.shift=k+1;g.isArea=true}b=C(b,true);c={series:this};this.pointClass.prototype.applyOptions.apply(c,[a]);i.push(c.x);j.push(c.y);m.push(a);if(d)if(e[0])e[0].remove(false);else{e.shift();i.shift();j.shift();m.shift()}this.getAttribs();this.isDirtyData=this.isDirty=true;b&&h.redraw()},setData:function(a,b){var d=this.points,c=
|
||||
this.options,e=this.initialColor,f=this.chart;this.xIncrement=null;if(M(e))f.counters.color=e;e=[];var g=[],h=a.length,i;if(h>(c.turboThreshold||1E3))if(Xc(a[0])){i=C(c.pointStart,0);var j=C(c.pointInterval,1);for(c=0;c<h;c++){e[c]=i;g[c]=a[c];i+=j}this.xIncrement=i}else{if(a[0].constructor===Array)if(this.valueCount===4)for(c=0;c<h;c++){i=a[c];e[c]=i[0];g[c]=i.slice(1,5)}else for(c=0;c<h;c++){i=a[c];e[c]=i[0];g[c]=i[1]}}else for(c=0;c<h;c++){i={series:this};this.pointClass.prototype.applyOptions.apply(i,
|
||||
[a[c]]);e[c]=i.x;g[c]=i.y}this.data=null;this.options.data=a;this.xData=e;this.yData=g;for(c=d&&d.length||0;c--;)d[c].destroy();this.isDirty=this.isDirtyData=f.isDirtyBox=true;C(b,true)&&f.redraw(false)},remove:function(a,b){var d=this,c=d.chart;a=C(a,true);if(!d.isRemoving){d.isRemoving=true;Ha(d,"remove",null,function(){d.destroy();c.isDirtyLegend=c.isDirtyBox=true;a&&c.redraw(b)})}d.isRemoving=false},processData:function(){var a=this.xData,b=this.yData,d=a.length,c=0,e,f=this.options.cropThreshold;
|
||||
if(!f||d>f){e=this.xAxis.getExtremes();f=e.min;var g=e.max,h=d-1;if(a[0]<f||a[h]>g){for(e=0;e<d;e++)if(a[e]>=f){c=ja(0,e-1);break}for(;e<d;e++)if(a[e]>g){h=e+1;break}a=a.slice(c,h);b=b.slice(c,h)}}this.cropStart=c;this.processedXData=a;this.processedYData=b},generatePoints:function(){var a=this.options.data,b=this.data,d,c=this.processedXData,e=this.processedYData,f=this.pointClass,g=c.length,h=this.cropStart||0,i,j=this.hasGroupedData,k=[],m;if(!b&&!j){b=[];b.length=a.length;b=this.data=b}for(m=
|
||||
0;m<g;m++){i=h+m;if(j)k[m]=(new f).init(this,[c[m]].concat(oc(e[m])));else{if(b[i])i=b[i];else b[i]=i=(new f).init(this,a[i],c[m]);k[m]=i}}if(b&&g!==(d=b.length))for(m=0;m<d;m++){if(m===h&&!j)m+=g;b[m]&&b[m].destroyElements()}this.data=b;this.points=k},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.chart,b=this.options.stacking,d=this.xAxis,c=d.categories,e=this.yAxis,f=this.points,g=f.length,h=d.leastDistance,i;for(i=0;i<g;i++){var j=f[i],k=j.x,m=j.y,
|
||||
t=j.low,B=e.stacks[(m<0?"-":"")+this.stackKey];j.plotX=this.xAxis.translate(k);if(b&&this.visible&&B&&B[k]){t=B[k];k=t.total;t.cum=t=t.cum-m;m=t+m;if(b==="percent"){t=k?t*100/k:0;m=k?m*100/k:0}j.percentage=k?j.y*100/k:0;j.stackTotal=k}if(M(t))j.yBottom=e.translate(t,0,1,0,1);if(m!==null)j.plotY=e.translate(m,0,1,0,1);j.clientX=a.inverted?a.plotHeight-j.plotX:j.plotX;j.category=c&&c[j.x]!==ha?c[j.x]:j.x;if(this.getDistance&&i){j=nb(j.plotX-f[i-1].plotX);h=h===ha?j:Ea(j,h)}}d.leastDistance=h;this.getSegments()},
|
||||
setTooltipPoints:function(a){var b=this.chart,d=b.inverted,c=[];b=N((d?b.plotTop:b.plotLeft)+b.plotSizeX);var e,f;e=this.xAxis;var g,h,i=[];if(a)this.tooltipPoints=null;A(this.segments||this.points,function(j){c=c.concat(j)});if(e&&e.reversed)c=c.reverse();a=c.length;for(h=0;h<a;h++){g=c[h];e=c[h-1]?c[h-1]._high+1:0;for(f=g._high=c[h+1]?Kb((g.plotX+(c[h+1]?c[h+1].plotX:b))/2):b;e<=f;)i[d?b-e++:e++]=g}this.tooltipPoints=i},onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(!(!Hb&&a.mouseIsDown)){b&&
|
||||
b!==this&&b.onMouseOut();this.options.events.mouseOver&&Ha(this,"mouseOver");this.setState(Tb);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,d=b.tooltip,c=b.hoverPoint;c&&c.onMouseOut();this&&a.events.mouseOut&&Ha(this,"mouseOut");d&&!a.stickyTracking&&d.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,d=this.clipRect,c=this.options.animation;if(c&&!bc(c))c={};if(a){if(!d.isAnimating){d.attr("width",0);d.isAnimating=true}}else{d.animate({width:b.plotSizeX},
|
||||
c);this.animate=null}},drawPoints:function(){var a,b=this.points,d=this.chart,c,e,f,g,h,i;if(this.options.marker.enabled)for(f=b.length;f--;){g=b[f];c=g.plotX;e=g.plotY;i=g.graphic;if(e!==ha&&!isNaN(e)){a=g.pointAttr[g.selected?"select":Ib];h=a.r;if(i)i.animate({x:c-h,y:e-h,width:2*h,height:2*h});else g.graphic=d.renderer.symbol(C(g.marker&&g.marker.symbol,this.symbol),c-h,e-h,2*h,2*h).attr(a).add(this.group)}}},convertAttribs:function(a,b,d,c){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||
|
||||
{};d=d||{};c=c||{};for(f in e){g=e[f];h[f]=C(a[g],b[f],d[f],c[f])}return h},getAttribs:function(){var a=this,b=Qa[a.type].marker?a.options.marker:a.options,d=b.states,c=d[Tb],e,f=a.color,g={stroke:f,fill:f},h=a.points,i=[],j,k=a.pointAttrToOptions,m;if(a.options.marker){c.radius=c.radius||b.radius+2;c.lineWidth=c.lineWidth||b.lineWidth+1}else c.color=c.color||mc(c.color||f).brighten(c.brightness).get();i[Ib]=a.convertAttribs(b,g);A([Tb,"select"],function(t){i[t]=a.convertAttribs(d[t],i[Ib])});a.pointAttr=
|
||||
i;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===false)b.radius=0;e=false;if(g.options)for(m in k)if(M(b[k[m]]))e=true;if(e){j=[];d=b.states||{};e=d[Tb]=d[Tb]||{};if(!a.options.marker)e.color=mc(e.color||g.options.color).brighten(e.brightness||c.brightness).get();j[Ib]=a.convertAttribs(b,i[Ib]);j[Tb]=a.convertAttribs(d[Tb],i[Tb],j[Ib]);j.select=a.convertAttribs(d.select,i.select,j[Ib])}else j=i;g.pointAttr=j}},destroy:function(){var a=this,b=a.chart,d=/\/5[0-9\.]+ (Safari|Mobile)\//.test(Mc),
|
||||
c,e,f=a.data||[],g,h;Ub(a);a.legendItem&&a.chart.legend.destroyItem(a);for(e=f.length;e--;)(g=f[e])&&g.destroy&&g.destroy();a.points=null;A(["area","graph","dataLabelsGroup","group","tracker"],function(i){if(a[i]){c=d&&i==="group"?"hide":"destroy";a[i][c]()}});if(b.hoverSeries===a)b.hoverSeries=null;Yc(b.series,a);for(h in a)delete a[h]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a=this,b,d,c=a.points,e=a.options.dataLabels,f,g=a.dataLabelsGroup,h=a.chart,i=h.inverted,j=a.type,
|
||||
k;k=a.options.stacking;var m=j==="column"||j==="bar",t=e.verticalAlign===null,B=e.y===null;if(m)if(k){if(t)e=Y(e,{verticalAlign:"middle"});if(B)e=Y(e,{y:{top:14,middle:4,bottom:-6}[e.verticalAlign]})}else{if(t)e=Y(e,{verticalAlign:"top"});if(B)e=Y(e,{y:-6})}if(!g)g=a.dataLabelsGroup=h.renderer.g("data-labels").attr({visibility:a.visible?Lb:Cb,zIndex:6}).translate(h.plotLeft,h.plotTop).add();k=e.color;if(k==="auto")k=null;e.style.color=C(k,a.color);A(c,function(v){var J=v.barX,x=J&&J+v.barW/2||v.plotX||
|
||||
-999,o=C(v.plotY,-999),s=v.dataLabel,q=e.align,r=B?v.y>0?-6:12:e.y;f=e.formatter.call(v.getLabelConfig());b=(i?h.plotWidth-o:x)+e.x;d=(i?h.plotHeight-x:o)+r;if(j==="column")b+={left:-1,right:1}[q]*v.barW/2||0;if(s){if(i&&!e.y)d=d+la(s.styles.lineHeight)*0.9-s.getBBox().height/2;s.attr({text:f}).animate({x:b,y:d})}else if(M(f)){s=v.dataLabel=h.renderer.text(f,b,d).attr({align:q,rotation:e.rotation,zIndex:1}).css(e.style).add(g);i&&!e.y&&s.attr({y:d+la(s.styles.lineHeight)*0.9-s.getBBox().height/2})}if(m&&
|
||||
a.options.stacking){x=v.barY;o=v.barW;v=v.barH;s.align(e,null,{x:i?h.plotWidth-x-v:J,y:i?h.plotHeight-J-o:x,width:i?v:o,height:i?o:v})}})}},drawGraph:function(){var a=this,b=a.options,d=a.graph,c=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,i=b.lineWidth,j=b.dashStyle,k,m=a.chart.renderer,t=a.yAxis.getThreshold(b.threshold),B=/^area/.test(a.type),v=[],J=[];A(a.segments,function(x){k=[];A(x,function(r,y){if(a.getPointSpline)k.push.apply(k,a.getPointSpline(x,r,y));else{k.push(y?Ga:$a);y&&b.step&&
|
||||
k.push(r.plotX,x[y-1].plotY);k.push(r.plotX,r.plotY)}});if(x.length>1)c=c.concat(k);else v.push(x[0]);if(B){var o=[],s,q=k.length;for(s=0;s<q;s++)o.push(k[s]);q===3&&o.push(Ga,k[1],k[2]);if(b.stacking&&a.type!=="areaspline")for(s=x.length-1;s>=0;s--)o.push(x[s].plotX,x[s].yBottom);else o.push(Ga,x[x.length-1].plotX,t,Ga,x[0].plotX,t);J=J.concat(o)}});a.graphPath=c;a.singlePoints=v;if(B){e=C(b.fillColor,mc(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:J});else a.area=a.chart.renderer.path(J).attr({fill:e}).add(g)}if(d)d.animate({d:c});
|
||||
else if(i){d={stroke:h,"stroke-width":i};if(j)d.dashstyle=j;a.graph=m.path(c).attr(d).add(g).shadow(b.shadow)}},render:function(){var a=this,b=a.chart,d,c,e=a.options,f=e.clip!==false,g=e.animation,h=g&&a.animate;g=h?g&&g.duration||500:0;var i=a.clipRect;c=b.renderer;if(!i){i=a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:c.clipRect(0,0,b.plotSizeX,b.plotSizeY);if(!b.clipRect)b.clipRect=i}if(!a.group){d=a.group=c.g("series");if(b.inverted){c=function(){d.attr({width:b.plotWidth,height:b.plotHeight}).invert()};
|
||||
c();ra(b,"resize",c)}f&&d.clip(a.clipRect);d.attr({visibility:a.visible?Lb:Cb,zIndex:e.zIndex}).translate(a.xAxis.left,a.yAxis.top).add(b.seriesGroup)}a.drawDataLabels();h&&a.animate(true);a.getAttribs();a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==false&&a.drawTracker();h&&a.animate();setTimeout(function(){i.isAnimating=false;if((d=a.group)&&i!==b.clipRect&&i.renderer){if(f)d.clip(a.clipRect=b.clipRect);i.destroy()}},g);a.isDirty=a.isDirtyData=false},redraw:function(){var a=
|
||||
this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:this.xAxis.left,translateY:this.yAxis.top})}this.translate();this.setTooltipPoints(true);this.isDirtyData&&Ha(this,"updatedData");this.render()},setState:function(a){var b=this.options,d=this.graph,c=b.states;b=b.lineWidth;a=a||Ib;if(this.state!==a){this.state=a;if(!(c[a]&&c[a].enabled===false)){if(a)b=c[a].lineWidth||b+1;if(d&&!d.dashstyle)d.attr({"stroke-width":b},a?0:500)}}},setVisible:function(a,
|
||||
b){var d=this.chart,c=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,i=this.points,j=d.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===ha?!h:a)?"show":"hide";e&&e[h]();if(f)f[h]();else for(e=i.length;e--;){f=i[e];f.tracker&&f.tracker[h]()}g&&g[h]();c&&d.legend.colorizeItem(this,a);this.isDirty=true;this.options.stacking&&A(d.series,function(k){if(k.options.stacking&&k.visible)k.isDirty=true});if(j)d.isDirtyBox=true;b!==false&&d.redraw();Ha(this,h)},show:function(){this.setVisible(true)},
|
||||
hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===ha?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;Ha(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,d=[].concat(a.graphPath),c=d.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;h=h&&{cursor:h};var i=a.singlePoints,j;if(c)for(j=c+1;j--;){d[j]===$a&&d.splice(j+1,0,d[j+1]-f,d[j+2],Ga);if(j&&d[j]===$a||j===c)d.splice(j,0,Ga,d[j-2]+f,d[j-1])}for(j=0;j<i.length;j++){c=i[j];
|
||||
d.push($a,c.plotX-f,c.plotY,Ga,c.plotX+f,c.plotY)}if(g)g.attr({d:d});else a.tracker=e.renderer.path(d).attr({isTracker:true,stroke:ye,fill:Jb,"stroke-width":b.lineWidth+2*f,visibility:a.visible?Lb:Cb,zIndex:1}).on(Hb?"touchstart":"mouseover",function(){e.hoverSeries!==a&&a.onMouseOver()}).on("mouseout",function(){b.stickyTracking||a.onMouseOut()}).css(h).add(e.trackerGroup)}};S=yb(xb);fb.line=S;S=yb(xb,{type:"area",useThreshold:true});fb.area=S;S=yb(xb,{type:"spline",getPointSpline:function(a,b,d){var c=
|
||||
b.plotX,e=b.plotY,f=a[d-1],g=a[d+1],h,i,j,k;if(d&&d<a.length-1){a=f.plotY;j=g.plotX;g=g.plotY;var m;h=(1.5*c+f.plotX)/2.5;i=(1.5*e+a)/2.5;j=(1.5*c+j)/2.5;k=(1.5*e+g)/2.5;m=(k-i)*(j-c)/(j-h)+e-k;i+=m;k+=m;if(i>a&&i>e){i=ja(a,e);k=2*e-i}else if(i<a&&i<e){i=Ea(a,e);k=2*e-i}if(k>g&&k>e){k=ja(g,e);i=2*e-k}else if(k<g&&k<e){k=Ea(g,e);i=2*e-k}b.rightContX=j;b.rightContY=k}if(d){b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||c,i||e,c,e];f.rightContX=f.rightContY=null}else b=[$a,c,e];return b}});fb.spline=
|
||||
S;S=yb(S,{type:"areaspline",useThreshold:true});fb.areaspline=S;var vd=yb(xb,{type:"column",useThreshold:true,getDistance:true,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){xb.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&A(b.series,function(d){if(d.type===a.type)d.isDirty=true})},translate:function(){var a=this,b=a.chart,d=a.options,c=d.stacking,e=d.borderWidth,f=0,g=a.xAxis,h=g.reversed,i=g.categories,
|
||||
j={},k,m;xb.prototype.translate.apply(a);A(b.series,function(r){if(r.type===a.type&&r.visible&&a.options.group===r.options.group){if(r.options.stacking){k=r.stackKey;if(j[k]===ha)j[k]=f++;m=j[k]}else m=f++;r.columnIndex=m}});var t=a.points;g=nb(C(g.leastDistance,b.plotSizeX/(i&&i.length||1)));i=g*d.groupPadding;var B=(g-2*i)/f,v=d.pointWidth,J=M(v)?(B-v)/2:B*d.pointPadding,x=ld(ja(C(v,B-2*J),1)),o=J+(i+((h?f-a.columnIndex:a.columnIndex)||0)*B-g/2)*(h?-1:1),s=a.yAxis.getThreshold(d.threshold),q=C(d.minPointLength,
|
||||
5);A(t,function(r){var y=r.plotY,U=r.yBottom||s,X=r.plotX+o,Ua=ld(Ea(y,U)),bb=ld(ja(y,U)-Ua),Ia=a.yAxis.stacks[(r.y<0?"-":"")+a.stackKey],gb;c&&a.visible&&Ia&&Ia[r.x]&&Ia[r.x].setOffset(o,x);if(nb(bb)<q){if(q){bb=q;Ua=nb(Ua-s)>q?U-q:s-(y<=s?q:0)}gb=Ua-3}ca(r,{barX:X,barY:Ua,barW:x,barH:bb});r.shapeType="rect";y=ca(b.renderer.Element.prototype.crisp.apply({},[e,X,Ua,x,bb]),{r:d.borderRadius});if(e%2){y.y-=1;y.height+=1}r.shapeArgs=y;r.trackerArgs=M(gb)&&Y(r.shapeArgs,{height:ja(6,bb+3),y:gb})})},getSymbol:function(){},
|
||||
drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,d=a.chart.renderer,c,e;A(a.points,function(f){var g=f.plotY;if(g!==ha&&!isNaN(g)&&f.y!==null){c=f.graphic;e=f.shapeArgs;if(c){rd(c);c.animate(e)}else f.graphic=c=d[f.shapeType](e).attr(f.pointAttr[f.selected?"select":Ib]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=this,b=a.chart,d=b.renderer,c,e,f=+new Date,g=a.options.cursor,h=g&&{cursor:g},i;A(a.points,function(j){e=j.tracker;c=j.trackerArgs||j.shapeArgs;delete c.strokeWidth;
|
||||
if(j.y!==null)if(e)e.attr(c);else j.tracker=d[j.shapeType](c).attr({isTracker:f,fill:ye,visibility:a.visible?Lb:Cb,zIndex:1}).on(Hb?"touchstart":"mouseover",function(k){i=k.relatedTarget||k.fromElement;b.hoverSeries!==a&&Aa(i,"isTracker")!==f&&a.onMouseOver();j.onMouseOver()}).on("mouseout",function(k){if(!a.options.stickyTracking){i=k.relatedTarget||k.toElement;Aa(i,"isTracker")!==f&&a.onMouseOut()}}).css(h).add(j.group||b.trackerGroup)})},animate:function(a){var b=this,d=b.points;if(!a){A(d,function(c){var e=
|
||||
c.graphic;c=c.shapeArgs;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:c.height,y:c.y},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&A(b.series,function(d){if(d.type===a.type)d.isDirty=true});xb.prototype.remove.apply(a,arguments)}});fb.column=vd;S=yb(vd,{type:"bar",init:function(a){a.inverted=this.inverted=true;vd.prototype.init.apply(this,arguments)}});fb.bar=S;S=yb(xb,{type:"scatter",translate:function(){var a=this;xb.prototype.translate.apply(a);
|
||||
A(a.points,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,d=b&&{cursor:b},c;A(a.points,function(e){(c=e.graphic)&&c.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();e.onMouseOver()}).on("mouseout",function(){a.options.stickyTracking||a.onMouseOut()}).css(d)})}});fb.scatter=S;S=yb(Nc,{init:function(){Nc.prototype.init.apply(this,arguments);var a=this,b;ca(a,{visible:a.visible!==
|
||||
false,name:C(a.name,"Slice")});b=function(){a.slice()};ra(a,"select",b);ra(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,d=this.tracker,c=this.dataLabel,e=this.connector,f;f=(this.visible=a=a===ha?!this.visible:a)?"show":"hide";this.group[f]();d&&d[f]();c&&c[f]();e&&e[f]();this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,d){var c=this.series.chart,e=this.slicedTranslation;xc(d,c);C(b,true);a=this.sliced=M(a)?a:!this.sliced;a={translateX:a?e[0]:c.plotLeft,
|
||||
translateY:a?e[1]:c.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});S=yb(xb,{type:"pie",isCartesian:false,pointClass:S,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},animate:function(){var a=this;A(a.points,function(b){var d=b.graphic;b=b.shapeArgs;var c=-lc/2;if(d){d.attr({r:0,start:c,end:c});d.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate=
|
||||
null},setData:function(){xb.prototype.setData.apply(this,arguments);this.processData();this.generatePoints()},translate:function(){var a=0,b=-0.25,d=this.options,c=d.slicedOffset,e=c+d.borderWidth,f=d.center.concat([d.size,d.innerSize||0]),g=this.chart,h=g.plotWidth,i=g.plotHeight,j,k,m,t=this.points,B=2*lc,v,J=Ea(h,i),x,o,s,q=d.dataLabels.distance;f=Wc(f,function(r,y){return(x=/%$/.test(r))?[h,i,J,J][y]*la(r)/100:r});this.getX=function(r,y){m=na.asin((r-f[1])/(f[2]/2+q));return f[0]+(y?-1:1)*Mb(m)*
|
||||
(f[2]/2+q)};this.center=f;A(t,function(r){a+=r.y});A(t,function(r){v=a?r.y/a:0;j=N(b*B*1E3)/1E3;b+=v;k=N(b*B*1E3)/1E3;r.shapeType="arc";r.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:j,end:k};m=(k+j)/2;r.slicedTranslation=Wc([Mb(m)*c+g.plotLeft,Vb(m)*c+g.plotTop],N);o=Mb(m)*f[2]/2;s=Vb(m)*f[2]/2;r.tooltipPos=[f[0]+o*0.7,f[1]+s*0.7];r.labelPos=[f[0]+o+Mb(m)*q,f[1]+s+Vb(m)*q,f[0]+o+Mb(m)*e,f[1]+s+Vb(m)*e,f[0]+o,f[1]+s,q<0?"center":m<B/4?"left":"right",m];r.percentage=v*100;r.total=a});this.setTooltipPoints()},
|
||||
render:function(){this.getAttribs();this.drawPoints();this.options.enableMouseTracking!==false&&this.drawTracker();this.drawDataLabels();this.options.animation&&this.animate&&this.animate();this.isDirty=this.isDirtyData=false},drawPoints:function(){var a=this.chart,b=a.renderer,d,c,e,f=this.options.shadow,g,h;A(this.points,function(i){c=i.graphic;h=i.shapeArgs;e=i.group;g=i.shadowGroup;if(f&&!g)g=i.shadowGroup=b.g("shadow").attr({zIndex:4}).add();if(!e)e=i.group=b.g("point").attr({zIndex:5}).add();
|
||||
d=i.sliced?i.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(d[0],d[1]);g&&g.translate(d[0],d[1]);if(c)c.animate(h);else i.graphic=b.arc(h).attr(ca(i.pointAttr[Ib],{"stroke-linejoin":"round"})).add(i.group).shadow(f,g);i.visible===false&&i.setVisible(false)})},drawDataLabels:function(){var a=this.points,b,d=this.chart,c=this.options.dataLabels,e=C(c.connectorPadding,10),f=C(c.connectorWidth,1),g,h,i=c.distance>0,j,k,m=this.center[1],t=[[],[],[],[]],B,v,J,x,o,s,q,r=4,y;xb.prototype.drawDataLabels.apply(this);
|
||||
A(a,function(U){var X=U.labelPos[7];t[X<0?0:X<lc/2?1:X<lc?2:3].push(U)});t[1].reverse();t[3].reverse();for(q=function(U,X){return U.y>X.y};r--;){a=0;b=[].concat(t[r]);b.sort(q);for(y=b.length;y--;)b[y].rank=y;for(x=0;x<2;x++){k=(s=r%3)?9999:-9999;o=s?-1:1;for(y=0;y<t[r].length;y++){b=t[r][y];if(g=b.dataLabel){h=b.labelPos;J=Lb;B=h[0];v=h[1];j||(j=g&&g.getBBox().height);if(i)if(x&&b.rank<a)J=Cb;else if(!s&&v<k+j||s&&v>k-j){v=k+o*j;B=this.getX(v,r>1);if(!s&&v+j>m||s&&v-j<m)if(x)J=Cb;else a++}if(b.visible===
|
||||
false)J=Cb;if(J===Lb)k=v;if(x){g.attr({visibility:J,align:h[6]})[g.moved?"animate":"attr"]({x:B+c.x+({left:e,right:-e}[h[6]]||0),y:v+c.y});g.moved=true;if(i&&f){g=b.connector;h=[$a,B+(h[6]==="left"?5:-5),v,Ga,B,v,Ga,h[2],h[3],Ga,h[4],h[5]];if(g){g.animate({d:h});g.attr("visibility",J)}else b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f,stroke:c.connectorColor||"#606060",visibility:J,zIndex:3}).translate(d.plotLeft,d.plotTop).add()}}}}}}},drawTracker:vd.prototype.drawTracker,getSymbol:function(){}});
|
||||
fb.pie=S;S=xb.prototype;var Ie=S.processData,Je=S.generatePoints,Ke=S.destroy;S.processData=function(){var a=this.options,b=a.dataGrouping;Ie.apply(this);if(!(!b||b.enabled===false)){var d,c=this.processedXData,e=this.processedYData,f=this.data;a=a.data;d=this.chart.plotSizeX;var g=b.groupPixelWidth,h=d/g,i=b.approximation,j=i==="average"||i==="sum",k=c.length,m=this.valueCount===4,t=this.groupedData,B=[],v=[];A(t||[],function(Ua,bb){if(Ua)t[bb]=Ua.destroy()});this.hasGroupedData=false;if(k>h){this.hasGroupedData=
|
||||
true;this.points=null;h=c[0];var J=c[k-1];g=g*(J-h)/d;var x=Sd(g,h,J,null,b.units),o,s,q=ha,r=null,y=null,U=null,X=null;for(d=o=0;d<k;d++){for(;x[1]!==ha&&c[d]>=x[1];){if(i==="average"&&q!==ha&&q!==null)q/=o;o=x.shift();if(q!==ha||m){B.push(o);if(m){v.push([r,y,U,X]);r=y=U=X=null}else v.push(q)}q=ha;o=0}s=e[d];if(j&&!m)q=q===ha||q===null?s:q+s;else if(m){X=this.cropStart+d;X=f&&f[X]||this.pointClass.prototype.applyOptions.apply({},[a[X]]);if(r===null)r=X.open;y=y===null?X.high:ja(y,X.high);U=U===
|
||||
null?X.low:Ea(U,X.low);X=X.close}else if(i==="open"&&q===ha)q=s;else if(i==="high")q=q===ha?s:ja(q,s);else if(i==="low")q=q===ha?s:Ea(q,s);else if(i==="close")q=s;o++}if(b.smoothed){d=B.length-1;for(B[d]=J;d--&&d;)B[d]+=g/2;B[0]=h}this.tooltipHeaderFormat=b.dateTimeLabelFormats[x.unit[0]];this.unit=x.unit}else{B=c;v=e;this.unit=this.tooltipHeaderFormat=null}this.processedXData=B;this.processedYData=v}};S.generatePoints=function(){Je.apply(this);this.groupedData=this.hasGroupedData?this.points:null};
|
||||
S.destroy=function(){for(var a=this.groupedData||[],b=a.length;b--;)a[b]&&a[b].destroy();Ke.apply(this)};S={second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"};Qa.line.dataGrouping=Qa.spline.dataGrouping=Qa.area.dataGrouping=Qa.areaspline.dataGrouping={approximation:"average",groupPixelWidth:2,dateTimeLabelFormats:S,units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],
|
||||
["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]]};Qa.column.dataGrouping={approximation:"sum",groupPixelWidth:10,dateTimeLabelFormats:S};Qa.ohlc=Y(Qa.column,{lineWidth:1,dataGrouping:{groupPixelWidth:5},states:{hover:{lineWidth:3}}});S=yb(Nc,{applyOptions:function(a){var b=this.series,d=0;if(typeof a==="object"&&typeof a.length!=="number"){ca(this,a);this.options=a}else if(a.length){if(a.length===5){if(typeof a[0]==="string")this.name=
|
||||
a[0];else if(typeof a[0]==="number")this.x=a[0];d++}this.open=a[d++];this.high=a[d++];this.low=a[d++];this.close=a[d++]}this.y=this.high;if(this.x===ha&&b)this.x=b.autoIncrement();return this},tooltipFormatter:function(){var a=this.series;return['<span style="color:'+a.color+';font-weight:bold">',this.name||a.name,"</span><br/> Open: ",this.open,"<br/>High: ",this.high,"<br/>Low: ",this.low,"<br/>Close: ",this.close,"<br/>"].join("")}});var Od=yb(fb.column,{type:"ohlc",valueCount:4,pointClass:S,useThreshold:false,
|
||||
pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},translate:function(){var a=this.yAxis;fb.column.prototype.translate.apply(this);A(this.points,function(b){if(b.open!==null)b.plotOpen=a.translate(b.open,0,1);if(b.close!==null)b.plotClose=a.translate(b.close,0,1)})},drawPoints:function(){var a=this,b=a.chart,d,c,e,f,g,h,i,j;A(a.points,function(k){if(k.plotY!==ha){i=k.graphic;d=k.pointAttr[k.selected?"selected":""];f=d["stroke-width"]%2/2;j=N(k.plotX)+f;g=N(k.barW/2);h=["M",j,N(k.yBottom),
|
||||
"L",j,N(k.plotY)];if(k.open!==null){c=N(k.plotOpen)+f;h.push("M",j,c,"L",j-g,c)}if(k.close!==null){e=N(k.plotClose)+f;h.push("M",j,e,"L",j+g,e)}if(i)i.animate({d:h});else k.graphic=b.renderer.path(h).attr(d).add(a.group)}})},animate:null});fb.ohlc=Od;Qa.candlestick=Y(Qa.column,{lineColor:"black",lineWidth:1,upColor:"white",states:{hover:{lineWidth:2}}});S=yb(Od,{type:"candlestick",pointAttrToOptions:{fill:"color",stroke:"lineColor","stroke-width":"lineWidth"},getAttribs:function(){Od.prototype.getAttribs.apply(this,
|
||||
arguments);var a=this.options,b=a.states;a=a.upColor;var d=Y(this.pointAttr);d[""].fill=a;d.hover.fill=b.hover.upColor||a;d.select.fill=b.select.upColor||a;A(this.points,function(c){if(c.open<c.close)c.pointAttr=d})},drawPoints:function(){var a=this,b=a.chart,d,c,e,f,g,h,i,j,k,m;A(a.points,function(t){j=t.graphic;if(t.plotY!==ha){d=t.pointAttr[t.selected?"selected":""];h=d["stroke-width"]%2/2;i=N(t.plotX)+h;c=N(t.plotOpen)+h;e=N(t.plotClose)+h;f=na.min(c,e);g=na.max(c,e);m=N(t.barW/2);k=["M",i-m,
|
||||
g,"L",i-m,f,"L",i+m,f,"L",i+m,g,"L",i-m,g,"M",i,g,"L",i,N(t.yBottom),"M",i,f,"L",i,N(t.plotY),"Z"];if(j)j.animate({d:k});else t.graphic=b.renderer.path(k).attr(d).add(a.group)}})}});fb.candlestick=S;var Pd=Tc.prototype.symbols;Qa.flags=Y(Qa.column,{fillColor:"white",lineWidth:1,shape:"flag",stackDistance:7,states:{hover:{lineColor:"black",fillColor:"#FCFFC5"}},style:{fontSize:"11px",fontWeight:"bold",textAlign:"center"},y:-30});fb.flags=yb(fb.column,{type:"flags",noSharedTooltip:true,useThreshold:false,
|
||||
init:xb.prototype.init,pointAttrToOptions:{fill:"fillColor",stroke:"color","stroke-width":"lineWidth",r:"radius"},translate:function(){fb.column.prototype.translate.apply(this);var a=this.chart,b=this.points,d=b.length-1,c,e,f,g=(c=this.options.onSeries)&&a.get(c),h,i;if(g){h=g.points;c=h.length;for(b.sort(function(j,k){return j.x-k.x});c--&&b[d];){e=b[d];i=h[c];if(i.x<=e.x){e.plotY=i.plotY;d--;c++;if(d<0)break}}}A(b,function(j,k){if(!g)j.plotY=a.plotHeight;if((f=b[k-1])&&f.plotX===j.plotX){if(f.stackIndex===
|
||||
ha)f.stackIndex=0;j.stackIndex=f.stackIndex+1}})},drawPoints:function(){var a,b=this.points,d=this.chart.renderer,c,e,f=this.options,g=f.y,h=f.shape,i,j,k,m,t=f.lineWidth%2/2,B;for(j=b.length;j--;){k=b[j];c=k.plotX+t;a=k.stackIndex;e=k.plotY+g+t-(a!==ha&&a*f.stackDistance);if(isNaN(e))e=0;i=a?ha:k.plotX+t;B=a?ha:k.plotY;m=k.graphic;if(e!==ha){a=k.pointAttr[k.selected?"select":""];if(m)m.attr({x:c,y:e,r:a.r});else m=k.graphic=d.label(k.options.title||f.title||"A",c,e,h,i,B).css(Y(f.style,k.style)).attr(a).attr({align:h===
|
||||
"flag"?"left":"center",width:f.width,height:f.height}).add(this.group);i=m.box;a=i.getBBox();k.shapeArgs=ca(a,{x:c-(h==="flag"?0:i.attr("width")/2),y:e})}}},drawTracker:function(){fb.column.prototype.drawTracker.apply(this);A(this.points,function(a){ra(a.tracker.element,"mouseover",function(){a.graphic.toFront()})})},tooltipFormatter:function(a){return a.point.text},animate:function(){}});Pd.flag=function(a,b,d,c,e){var f=e&&e.anchorX||a;e=e&&e.anchorY||b;return["M",f,e,"L",a,b+c,a,b,a+d,b,a+d,b+
|
||||
c,a,b+c,"M",f,e,"Z"]};A(["circle","square"],function(a){Pd[a+"pin"]=function(b,d,c,e,f){var g=f&&f.anchorX;f=f&&f.anchorY;var h=Pd[a](b,d,c,e);g&&f&&h.push("M",b+c/2,d+e,"L",g,f);return h}});var ve=Hb?"touchstart":"mousedown",Ee=Hb?"touchmove":"mousemove",Fe=Hb?"touchend":"mouseup";S={linearGradient:[0,0,0,14],stops:[[0,"#FFF"],[1,"#CCC"]]};Fb=[].concat(Qa.line.dataGrouping.units);Fb[4][1]=[1,2,3,4];Fb[5][1]=[1,2,3];ca(Ra,{navigator:{handles:{backgroundColor:"#FFF",borderColor:"#666"},height:40,margin:10,
|
||||
maskFill:"rgba(255, 255, 255, 0.75)",outlineColor:"#444",outlineWidth:1,series:{type:"areaspline",color:"#4572A7",fillOpacity:0.4,dataGrouping:{smoothed:true,units:Fb},lineWidth:1,marker:{enabled:false},shadow:false},xAxis:{tickWidth:0,lineWidth:0,gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",x:3,y:-4}},yAxis:{gridLineWidth:0,startOnTick:false,endOnTick:false,minPadding:0.1,maxPadding:0.1,labels:{enabled:false},title:{text:null},tickWidth:0}},scrollbar:{height:Hb?20:14,barBackgroundColor:S,
|
||||
barBorderRadius:2,barBorderWidth:1,barBorderColor:"#666",buttonArrowColor:"#666",buttonBackgroundColor:S,buttonBorderColor:"#666",buttonBorderRadius:2,buttonBorderWidth:1,rifleColor:"#666",trackBackgroundColor:{linearGradient:[0,0,0,10],stops:[[0,"#EEE"],[1,"#FFF"]]},trackBorderColor:"#CCC",trackBorderWidth:1}});ca(Ra,{rangeSelector:{}});Ra.lang=Y(Ra.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From:",rangeSelectorTo:"To:"});gd.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();
|
||||
e.render(ja(c.min,c.dataMin),Ea(c.max,c.dataMax))}function d(){c=a.xAxis[0].getExtremes();f.render(c.min,c.max)}var c,e=a.scroller,f=a.rangeSelector;if(e){ra(a.xAxis[0],"setExtremes",function(g){e.render(g.min,g.max)});ra(a,"resize",b);b()}if(f){ra(a.xAxis[0],"setExtremes",function(g){f.render(g.min,g.max)});ra(a,"resize",d);d()}});Highcharts.StockChart=function(a,b){var d=a.series,c={marker:{enabled:false,states:{hover:{enabled:true,radius:5}}},shadow:false,states:{hover:{lineWidth:2}}};a.yAxis=
|
||||
Wc(oc(a.yAxis||{}),function(e){return Y({labels:{align:"left",x:2,y:-2},showLastLabel:false,title:{text:null}},e)});a.series=null;a=Y({chart:{panning:true},navigator:{enabled:true},scrollbar:{enabled:true},rangeSelector:{enabled:true},title:{text:null},tooltip:{shared:true,crosshairs:true},legend:{enabled:false},xAxis:{title:{text:null},showLastLabel:true},plotOptions:{line:c,spline:c,area:c,areaspline:c,column:{shadow:false,borderWidth:0}}},a,{chart:{inverted:false},xAxis:{type:"datetime",categories:null}});
|
||||
a.series=d;return new gd(a,b)};ca(Highcharts,{Chart:gd,dateFormat:Gc,pathAnim:ud,getOptions:function(){return Ra},numberFormat:Qd,Point:Nc,Color:mc,Renderer:Tc,seriesTypes:fb,setOptions:function(a){Ra=Y(Ra,a);fe();return Ra},Series:xb,addEvent:ra,removeEvent:Ub,createElement:mb,discardElement:dd,css:Ja,each:A,extend:ca,map:Wc,merge:Y,pick:C,splat:oc,extendClass:yb,version:"Highstock 1.0 Beta"})})();
|
||||
|
||||
|
||||
18
public/site_assets/mmcFE/js/jquery-1.6.2.min.js
vendored
18
public/site_assets/mmcFE/js/jquery-1.6.2.min.js
vendored
File diff suppressed because one or more lines are too long
49
public/site_assets/mmcFE/js/jquery.browser.js
Normal file
49
public/site_assets/mmcFE/js/jquery.browser.js
Normal file
@ -0,0 +1,49 @@
|
||||
(function( jQuery, window, undefined ) {
|
||||
"use strict";
|
||||
|
||||
var matched, browser;
|
||||
|
||||
jQuery.uaMatch = function( ua ) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
|
||||
/(msie) ([\w.]+)/.exec( ua ) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
|
||||
[];
|
||||
|
||||
var platform_match = /(ipad)/.exec( ua ) ||
|
||||
/(iphone)/.exec( ua ) ||
|
||||
/(android)/.exec( ua ) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0",
|
||||
platform: platform_match[0] || ""
|
||||
};
|
||||
};
|
||||
|
||||
matched = jQuery.uaMatch( window.navigator.userAgent );
|
||||
browser = {};
|
||||
|
||||
if ( matched.browser ) {
|
||||
browser[ matched.browser ] = true;
|
||||
browser.version = matched.version;
|
||||
}
|
||||
|
||||
if ( matched.platform) {
|
||||
browser[ matched.platform ] = true
|
||||
}
|
||||
|
||||
// Chrome is Webkit, but Webkit is also Safari.
|
||||
if ( browser.chrome ) {
|
||||
browser.webkit = true;
|
||||
} else if ( browser.webkit ) {
|
||||
browser.safari = true;
|
||||
}
|
||||
|
||||
jQuery.browser = browser;
|
||||
|
||||
})( jQuery, window );
|
||||
@ -1,270 +0,0 @@
|
||||
DateInput = (function ($) {
|
||||
function DateInput(el, opts) {
|
||||
if (typeof (opts) != "object") opts = {};
|
||||
$.extend(this, DateInput.DEFAULT_OPTS, opts);
|
||||
this.input = $(el);
|
||||
this.bindMethodsToObj("show", "hide", "hideIfClickOutside", "keydownHandler", "selectDate");
|
||||
this.build();
|
||||
this.selectDate();
|
||||
this.hide()
|
||||
};
|
||||
DateInput.DEFAULT_OPTS = {
|
||||
month_names: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
||||
short_month_names: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
||||
short_day_names: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
||||
start_of_week: 1
|
||||
};
|
||||
DateInput.prototype = {
|
||||
build: function () {
|
||||
var monthNav = $('<p class="month_nav">' + '<span class="button prev" title="[Page-Up]">«</span>' + ' <span class="month_name"></span> ' + '<span class="button next" title="[Page-Down]">»</span>' + '</p>');
|
||||
this.monthNameSpan = $(".month_name", monthNav);
|
||||
$(".prev", monthNav).click(this.bindToObj(function () {
|
||||
this.moveMonthBy(-1)
|
||||
}));
|
||||
$(".next", monthNav).click(this.bindToObj(function () {
|
||||
this.moveMonthBy(1)
|
||||
}));
|
||||
var yearNav = $('<p class="year_nav">' + '<span class="button prev" title="[Ctrl+Page-Up]">«</span>' + ' <span class="year_name"></span> ' + '<span class="button next" title="[Ctrl+Page-Down]">»</span>' + '</p>');
|
||||
this.yearNameSpan = $(".year_name", yearNav);
|
||||
$(".prev", yearNav).click(this.bindToObj(function () {
|
||||
this.moveMonthBy(-12)
|
||||
}));
|
||||
$(".next", yearNav).click(this.bindToObj(function () {
|
||||
this.moveMonthBy(12)
|
||||
}));
|
||||
var nav = $('<div class="nav"></div>').append(monthNav, yearNav);
|
||||
var tableShell = "<table><thead><tr>";
|
||||
$(this.adjustDays(this.short_day_names)).each(function () {
|
||||
tableShell += "<th>" + this + "</th>"
|
||||
});
|
||||
tableShell += "</tr></thead><tbody></tbody></table>";
|
||||
this.dateSelector = this.rootLayers = $('<div class="date_selector"></div>').append(nav, tableShell).insertAfter(this.input);
|
||||
if ($.browser.msie && $.browser.version < 7) {
|
||||
this.ieframe = $('<iframe class="date_selector_ieframe" frameborder="0" src="#"></iframe>').insertBefore(this.dateSelector);
|
||||
this.rootLayers = this.rootLayers.add(this.ieframe);
|
||||
$(".button", nav).mouseover(function () {
|
||||
$(this).addClass("hover")
|
||||
});
|
||||
$(".button", nav).mouseout(function () {
|
||||
$(this).removeClass("hover")
|
||||
})
|
||||
};
|
||||
this.tbody = $("tbody", this.dateSelector);
|
||||
this.input.change(this.bindToObj(function () {
|
||||
this.selectDate()
|
||||
}));
|
||||
this.selectDate()
|
||||
},
|
||||
selectMonth: function (date) {
|
||||
var newMonth = new Date(date.getFullYear(), date.getMonth(), 1);
|
||||
if (!this.currentMonth || !(this.currentMonth.getFullYear() == newMonth.getFullYear() && this.currentMonth.getMonth() == newMonth.getMonth())) {
|
||||
this.currentMonth = newMonth;
|
||||
var rangeStart = this.rangeStart(date),
|
||||
rangeEnd = this.rangeEnd(date);
|
||||
var numDays = this.daysBetween(rangeStart, rangeEnd);
|
||||
var dayCells = "";
|
||||
for (var i = 0; i <= numDays; i++) {
|
||||
var currentDay = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate() + i, 12, 00);
|
||||
if (this.isFirstDayOfWeek(currentDay)) dayCells += "<tr>";
|
||||
if (currentDay.getMonth() == date.getMonth()) {
|
||||
dayCells += '<td class="selectable_day" date="' + this.dateToString(currentDay) + '">' + currentDay.getDate() + '</td>'
|
||||
} else {
|
||||
dayCells += '<td class="unselected_month" date="' + this.dateToString(currentDay) + '">' + currentDay.getDate() + '</td>'
|
||||
};
|
||||
if (this.isLastDayOfWeek(currentDay)) dayCells += "</tr>"
|
||||
};
|
||||
this.tbody.empty().append(dayCells);
|
||||
this.monthNameSpan.empty().append(this.monthName(date));
|
||||
this.yearNameSpan.empty().append(this.currentMonth.getFullYear());
|
||||
$(".selectable_day", this.tbody).click(this.bindToObj(function (event) {
|
||||
this.changeInput($(event.target).attr("date"))
|
||||
}));
|
||||
$("td[date=" + this.dateToString(new Date()) + "]", this.tbody).addClass("today");
|
||||
$("td.selectable_day", this.tbody).mouseover(function () {
|
||||
$(this).addClass("hover")
|
||||
});
|
||||
$("td.selectable_day", this.tbody).mouseout(function () {
|
||||
$(this).removeClass("hover")
|
||||
})
|
||||
};
|
||||
$('.selected', this.tbody).removeClass("selected");
|
||||
$('td[date=' + this.selectedDateString + ']', this.tbody).addClass("selected")
|
||||
},
|
||||
selectDate: function (date) {
|
||||
if (typeof (date) == "undefined") {
|
||||
date = this.stringToDate(this.input.val())
|
||||
};
|
||||
if (!date) date = new Date();
|
||||
this.selectedDate = date;
|
||||
this.selectedDateString = this.dateToString(this.selectedDate);
|
||||
this.selectMonth(this.selectedDate)
|
||||
},
|
||||
changeInput: function (dateString) {
|
||||
this.input.val(dateString).change();
|
||||
this.hide()
|
||||
},
|
||||
show: function () {
|
||||
this.rootLayers.css("display", "block");
|
||||
$([window, document.body]).click(this.hideIfClickOutside);
|
||||
this.input.unbind("focus", this.show);
|
||||
$(document.body).keydown(this.keydownHandler);
|
||||
this.setPosition()
|
||||
},
|
||||
hide: function () {
|
||||
this.rootLayers.css("display", "none");
|
||||
$([window, document.body]).unbind("click", this.hideIfClickOutside);
|
||||
this.input.focus(this.show);
|
||||
$(document.body).unbind("keydown", this.keydownHandler)
|
||||
},
|
||||
hideIfClickOutside: function (event) {
|
||||
if (event.target != this.input[0] && !this.insideSelector(event)) {
|
||||
this.hide()
|
||||
}
|
||||
},
|
||||
insideSelector: function (event) {
|
||||
var offset = this.dateSelector.position();
|
||||
offset.right = offset.left + this.dateSelector.outerWidth();
|
||||
offset.bottom = offset.top + this.dateSelector.outerHeight();
|
||||
return event.pageY < offset.bottom && event.pageY > offset.top && event.pageX < offset.right && event.pageX > offset.left
|
||||
},
|
||||
keydownHandler: function (event) {
|
||||
switch (event.keyCode) {
|
||||
case 9:
|
||||
case 27:
|
||||
this.hide();
|
||||
return;
|
||||
break;
|
||||
case 13:
|
||||
this.changeInput(this.selectedDateString);
|
||||
break;
|
||||
case 33:
|
||||
this.moveDateMonthBy(event.ctrlKey ? -12 : -1);
|
||||
break;
|
||||
case 34:
|
||||
this.moveDateMonthBy(event.ctrlKey ? 12 : 1);
|
||||
break;
|
||||
case 38:
|
||||
this.moveDateBy(-7);
|
||||
break;
|
||||
case 40:
|
||||
this.moveDateBy(7);
|
||||
break;
|
||||
case 37:
|
||||
this.moveDateBy(-1);
|
||||
break;
|
||||
case 39:
|
||||
this.moveDateBy(1);
|
||||
break;
|
||||
default:
|
||||
return
|
||||
}
|
||||
event.preventDefault()
|
||||
},
|
||||
stringToDate: function (string) {
|
||||
var matches;
|
||||
if (matches = string.match(/^(\d{1,2}) ([^\s]+) (\d{4,4})$/)) {
|
||||
return new Date(matches[3], this.shortMonthNum(matches[2]), matches[1], 12, 00)
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
},
|
||||
dateToString: function (date) {
|
||||
return date.getDate() + " " + this.short_month_names[date.getMonth()] + " " + date.getFullYear()
|
||||
},
|
||||
setPosition: function () {
|
||||
var offset = this.input.offset();
|
||||
this.rootLayers.css({
|
||||
top: offset.top + this.input.outerHeight(),
|
||||
left: offset.left
|
||||
});
|
||||
if (this.ieframe) {
|
||||
this.ieframe.css({
|
||||
width: this.dateSelector.outerWidth(),
|
||||
height: this.dateSelector.outerHeight()
|
||||
})
|
||||
}
|
||||
},
|
||||
moveDateBy: function (amount) {
|
||||
var newDate = new Date(this.selectedDate.getFullYear(), this.selectedDate.getMonth(), this.selectedDate.getDate() + amount);
|
||||
this.selectDate(newDate)
|
||||
},
|
||||
moveDateMonthBy: function (amount) {
|
||||
var newDate = new Date(this.selectedDate.getFullYear(), this.selectedDate.getMonth() + amount, this.selectedDate.getDate());
|
||||
if (newDate.getMonth() == this.selectedDate.getMonth() + amount + 1) {
|
||||
newDate.setDate(0)
|
||||
};
|
||||
this.selectDate(newDate)
|
||||
},
|
||||
moveMonthBy: function (amount) {
|
||||
var newMonth = new Date(this.currentMonth.getFullYear(), this.currentMonth.getMonth() + amount, this.currentMonth.getDate());
|
||||
this.selectMonth(newMonth)
|
||||
},
|
||||
monthName: function (date) {
|
||||
return this.month_names[date.getMonth()]
|
||||
},
|
||||
bindToObj: function (fn) {
|
||||
var self = this;
|
||||
return function () {
|
||||
return fn.apply(self, arguments)
|
||||
}
|
||||
},
|
||||
bindMethodsToObj: function () {
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
this[arguments[i]] = this.bindToObj(this[arguments[i]])
|
||||
}
|
||||
},
|
||||
indexFor: function (array, value) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (value == array[i]) return i
|
||||
}
|
||||
},
|
||||
monthNum: function (month_name) {
|
||||
return this.indexFor(this.month_names, month_name)
|
||||
},
|
||||
shortMonthNum: function (month_name) {
|
||||
return this.indexFor(this.short_month_names, month_name)
|
||||
},
|
||||
shortDayNum: function (day_name) {
|
||||
return this.indexFor(this.short_day_names, day_name)
|
||||
},
|
||||
daysBetween: function (start, end) {
|
||||
start = Date.UTC(start.getFullYear(), start.getMonth(), start.getDate());
|
||||
end = Date.UTC(end.getFullYear(), end.getMonth(), end.getDate());
|
||||
return (end - start) / 86400000
|
||||
},
|
||||
changeDayTo: function (dayOfWeek, date, direction) {
|
||||
var difference = direction * (Math.abs(date.getDay() - dayOfWeek - (direction * 7)) % 7);
|
||||
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + difference)
|
||||
},
|
||||
rangeStart: function (date) {
|
||||
return this.changeDayTo(this.start_of_week, new Date(date.getFullYear(), date.getMonth()), -1)
|
||||
},
|
||||
rangeEnd: function (date) {
|
||||
return this.changeDayTo((this.start_of_week - 1) % 7, new Date(date.getFullYear(), date.getMonth() + 1, 0), 1)
|
||||
},
|
||||
isFirstDayOfWeek: function (date) {
|
||||
return date.getDay() == this.start_of_week
|
||||
},
|
||||
isLastDayOfWeek: function (date) {
|
||||
return date.getDay() == (this.start_of_week - 1) % 7
|
||||
},
|
||||
adjustDays: function (days) {
|
||||
var newDays = [];
|
||||
for (var i = 0; i < days.length; i++) {
|
||||
newDays[i] = days[(i + this.start_of_week) % 7]
|
||||
};
|
||||
return newDays
|
||||
}
|
||||
};
|
||||
$.fn.date_input = function (opts) {
|
||||
return this.each(function () {
|
||||
new DateInput(this, opts)
|
||||
})
|
||||
};
|
||||
$.date_input = {
|
||||
initialize: function (opts) {
|
||||
$("input.date_input").date_input(opts)
|
||||
}
|
||||
};
|
||||
return DateInput
|
||||
})(jQuery);
|
||||
@ -1,48 +0,0 @@
|
||||
(function ($) {
|
||||
$.fn.filestyle = function (options) {
|
||||
var settings = {
|
||||
width: 250
|
||||
};
|
||||
if (options) {
|
||||
$.extend(settings, options);
|
||||
};
|
||||
return this.each(function () {
|
||||
var self = this;
|
||||
var wrapper = $("<div>").css({
|
||||
"width": settings.imagewidth + "px",
|
||||
"height": settings.imageheight + "px",
|
||||
"background": "url(" + settings.image + ") 0 0 no-repeat",
|
||||
"background-position": "right",
|
||||
"display": "inline",
|
||||
"position": "absolute",
|
||||
"overflow": "hidden"
|
||||
});
|
||||
var filename = $('<input class="file">').addClass($(self).attr("class")).css({
|
||||
"display": "inline",
|
||||
"width": settings.width + "px"
|
||||
});
|
||||
$(self).before(filename);
|
||||
$(self).wrap(wrapper);
|
||||
$(self).css({
|
||||
"position": "relative",
|
||||
"height": settings.imageheight + "px",
|
||||
"width": settings.width + "px",
|
||||
"display": "inline",
|
||||
"cursor": "pointer",
|
||||
"opacity": "0.0"
|
||||
});
|
||||
if ($.browser.mozilla) {
|
||||
if (/Win/.test(navigator.platform)) {
|
||||
$(self).css("margin-left", "-142px");
|
||||
} else {
|
||||
$(self).css("margin-left", "-168px");
|
||||
};
|
||||
} else {
|
||||
$(self).css("margin-left", settings.imagewidth - settings.width + "px");
|
||||
};
|
||||
$(self).bind("change", function () {
|
||||
filename.val($(self).val());
|
||||
});
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
@ -1,146 +0,0 @@
|
||||
/**
|
||||
* jQuery-Plugin "preloadCssImages"
|
||||
* by Scott Jehl, scott@filamentgroup.com
|
||||
* http://www.filamentgroup.com
|
||||
* reference article: http://www.filamentgroup.com/lab/update_automatically_preload_images_from_css_with_jquery/
|
||||
* demo page: http://www.filamentgroup.com/examples/preloadImages/index_v2.php
|
||||
*
|
||||
* Copyright (c) 2008 Filament Group, Inc
|
||||
* Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
|
||||
*
|
||||
* Version: 5.0, 10.31.2008
|
||||
* Changelog:
|
||||
* 02.20.2008 initial Version 1.0
|
||||
* 06.04.2008 Version 2.0 : removed need for any passed arguments. Images load from any and all directories.
|
||||
* 06.21.2008 Version 3.0 : Added options for loading status. Fixed IE abs image path bug (thanks Sam Pohlenz).
|
||||
* 07.24.2008 Version 4.0 : Added support for @imported CSS (credit: http://marcarea.com/). Fixed support in Opera as well.
|
||||
* 10.31.2008 Version: 5.0 : Many feature and performance enhancements from trixta
|
||||
* --------------------------------------------------------------------
|
||||
*/
|
||||
;
|
||||
jQuery.preloadCssImages = function (settings) {
|
||||
settings = jQuery.extend({
|
||||
statusTextEl: null,
|
||||
statusBarEl: null,
|
||||
errorDelay: 999,
|
||||
// handles 404-Errors in IE
|
||||
simultaneousCacheLoading: 2
|
||||
}, settings);
|
||||
var allImgs = [],
|
||||
loaded = 0,
|
||||
imgUrls = [],
|
||||
thisSheetRules, errorTimer;
|
||||
|
||||
function onImgComplete() {
|
||||
clearTimeout(errorTimer);
|
||||
if (imgUrls && imgUrls.length && imgUrls[loaded]) {
|
||||
loaded++;
|
||||
if (settings.statusTextEl) {
|
||||
var nowloading = (imgUrls[loaded]) ? 'Now Loading: <span>' + imgUrls[loaded].split('/')[imgUrls[loaded].split('/').length - 1] : 'Loading complete'; // wrong status-text bug fixed
|
||||
jQuery(settings.statusTextEl).html('<span class="numLoaded">' + loaded + '</span> of <span class="numTotal">' + imgUrls.length + '</span> loaded (<span class="percentLoaded">' + (loaded / imgUrls.length * 100).toFixed(0) + '%</span>) <span class="currentImg">' + nowloading + '</span></span>');
|
||||
}
|
||||
if (settings.statusBarEl) {
|
||||
var barWidth = jQuery(settings.statusBarEl).width();
|
||||
jQuery(settings.statusBarEl).css('background-position', -(barWidth - (barWidth * loaded / imgUrls.length).toFixed(0)) + 'px 50%');
|
||||
}
|
||||
loadImgs();
|
||||
}
|
||||
}
|
||||
|
||||
function loadImgs() {
|
||||
//only load 1 image at the same time / most browsers can only handle 2 http requests, 1 should remain for user-interaction (Ajax, other images, normal page requests...)
|
||||
// otherwise set simultaneousCacheLoading to a higher number for simultaneous downloads
|
||||
if (imgUrls && imgUrls.length && imgUrls[loaded]) {
|
||||
var img = new Image(); //new img obj
|
||||
img.src = imgUrls[loaded]; //set src either absolute or rel to css dir
|
||||
if (!img.complete) {
|
||||
jQuery(img).bind('error load onreadystatechange', onImgComplete);
|
||||
} else {
|
||||
onImgComplete();
|
||||
}
|
||||
errorTimer = setTimeout(onImgComplete, settings.errorDelay); // handles 404-Errors in IE
|
||||
}
|
||||
}
|
||||
|
||||
function parseCSS(sheets, urls) {
|
||||
var w3cImport = false,
|
||||
imported = [],
|
||||
importedSrc = [],
|
||||
baseURL;
|
||||
var sheetIndex = sheets.length;
|
||||
while (sheetIndex--) { //loop through each stylesheet
|
||||
var cssPile = ''; //create large string of all css rules in sheet
|
||||
if (urls && urls[sheetIndex]) {
|
||||
baseURL = urls[sheetIndex];
|
||||
} else {
|
||||
var csshref = (sheets[sheetIndex].href) ? sheets[sheetIndex].href : 'window.location.href';
|
||||
var baseURLarr = csshref.split('/'); //split href at / to make array
|
||||
baseURLarr.pop(); //remove file path from baseURL array
|
||||
baseURL = baseURLarr.join('/'); //create base url for the images in this sheet (css file's dir)
|
||||
if (baseURL) {
|
||||
baseURL += '/'; //tack on a / if needed
|
||||
}
|
||||
}
|
||||
if (sheets[sheetIndex].cssRules || sheets[sheetIndex].rules) {
|
||||
thisSheetRules = (sheets[sheetIndex].cssRules) ? //->>> http://www.quirksmode.org/dom/w3c_css.html
|
||||
sheets[sheetIndex].cssRules : //w3
|
||||
sheets[sheetIndex].rules; //ie
|
||||
var ruleIndex = thisSheetRules.length;
|
||||
while (ruleIndex--) {
|
||||
if (thisSheetRules[ruleIndex].style && thisSheetRules[ruleIndex].style.cssText) {
|
||||
var text = thisSheetRules[ruleIndex].style.cssText;
|
||||
if (text.toLowerCase().indexOf('url') != -1) { // only add rules to the string if you can assume, to find an image, speed improvement
|
||||
cssPile += text; // thisSheetRules[ruleIndex].style.cssText instead of thisSheetRules[ruleIndex].cssText is a huge speed improvement
|
||||
}
|
||||
} else if (thisSheetRules[ruleIndex].styleSheet) {
|
||||
imported.push(thisSheetRules[ruleIndex].styleSheet);
|
||||
w3cImport = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//parse cssPile for image urls
|
||||
var tmpImage = cssPile.match(/[^\("]+\.(gif|jpg|jpeg|png)/g); //reg ex to get a string of between a "(" and a ".filename" / '"' for opera-bugfix
|
||||
if (tmpImage) {
|
||||
var i = tmpImage.length;
|
||||
while (i--) { // handle baseUrl here for multiple stylesheets in different folders bug
|
||||
var imgSrc = (tmpImage[i].charAt(0) == '/' || tmpImage[i].match('://')) ? // protocol-bug fixed
|
||||
tmpImage[i] : baseURL + tmpImage[i];
|
||||
|
||||
if (jQuery.inArray(imgSrc, imgUrls) == -1) {
|
||||
imgUrls.push(imgSrc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!w3cImport && sheets[sheetIndex].imports && sheets[sheetIndex].imports.length) {
|
||||
for (var iImport = 0, importLen = sheets[sheetIndex].imports.length; iImport < importLen; iImport++) {
|
||||
var iHref = sheets[sheetIndex].imports[iImport].href;
|
||||
iHref = iHref.split('/');
|
||||
iHref.pop();
|
||||
iHref = iHref.join('/');
|
||||
if (iHref) {
|
||||
iHref += '/'; //tack on a / if needed
|
||||
}
|
||||
var iSrc = (iHref.charAt(0) == '/' || iHref.match('://')) ? // protocol-bug fixed
|
||||
iHref : baseURL + iHref;
|
||||
|
||||
importedSrc.push(iSrc);
|
||||
imported.push(sheets[sheetIndex].imports[iImport]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} //loop
|
||||
if (imported.length) {
|
||||
parseCSS(imported, importedSrc);
|
||||
return false;
|
||||
}
|
||||
var downloads = settings.simultaneousCacheLoading;
|
||||
while (downloads--) {
|
||||
setTimeout(loadImgs, downloads);
|
||||
}
|
||||
}
|
||||
parseCSS(document.styleSheets);
|
||||
return imgUrls;
|
||||
};
|
||||
3624
public/site_assets/mmcFE/js/jquery.js
vendored
3624
public/site_assets/mmcFE/js/jquery.js
vendored
File diff suppressed because it is too large
Load Diff
@ -1,112 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------
|
||||
* jQuery-Plugin "pngFix"
|
||||
* Version: 1.2, 09.03.2009
|
||||
* by Andreas Eberhard, andreas.eberhard@gmail.com
|
||||
* http://jquery.andreaseberhard.de/
|
||||
*
|
||||
* Copyright (c) 2007 Andreas Eberhard
|
||||
* Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
|
||||
*
|
||||
* Changelog:
|
||||
* 09.03.2009 Version 1.2
|
||||
* - Update for jQuery 1.3.x, removed @ from selectors
|
||||
* 11.09.2007 Version 1.1
|
||||
* - removed noConflict
|
||||
* - added png-support for input type=image
|
||||
* - 01.08.2007 CSS background-image support extension added by Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
|
||||
* 31.05.2007 initial Version 1.0
|
||||
* --------------------------------------------------------------------
|
||||
* @example $(function(){$(document).pngFix();});
|
||||
* @desc Fixes all PNG's in the document on document.ready
|
||||
*
|
||||
* jQuery(function(){jQuery(document).pngFix();});
|
||||
* @desc Fixes all PNG's in the document on document.ready when using noConflict
|
||||
*
|
||||
* @example $(function(){$('div.examples').pngFix();});
|
||||
* @desc Fixes all PNG's within div with class examples
|
||||
*
|
||||
* @example $(function(){$('div.examples').pngFix( { blankgif:'ext.gif' } );});
|
||||
* @desc Fixes all PNG's within div with class examples, provides blank gif for input with png
|
||||
* --------------------------------------------------------------------
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
jQuery.fn.pngFix = function (settings) {
|
||||
|
||||
// Settings
|
||||
settings = jQuery.extend({
|
||||
blankgif: 'blank.gif'
|
||||
}, settings);
|
||||
|
||||
var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
|
||||
var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);
|
||||
|
||||
if (jQuery.browser.msie && (ie55 || ie6)) {
|
||||
|
||||
//fix images with png-source
|
||||
jQuery(this).find("img[src$=.png]").each(function () {
|
||||
|
||||
jQuery(this).attr('width', jQuery(this).width());
|
||||
jQuery(this).attr('height', jQuery(this).height());
|
||||
|
||||
var prevStyle = '';
|
||||
var strNewHTML = '';
|
||||
var imgId = (jQuery(this).attr('id')) ? 'id="' + jQuery(this).attr('id') + '" ' : '';
|
||||
var imgClass = (jQuery(this).attr('class')) ? 'class="' + jQuery(this).attr('class') + '" ' : '';
|
||||
var imgTitle = (jQuery(this).attr('title')) ? 'title="' + jQuery(this).attr('title') + '" ' : '';
|
||||
var imgAlt = (jQuery(this).attr('alt')) ? 'alt="' + jQuery(this).attr('alt') + '" ' : '';
|
||||
var imgAlign = (jQuery(this).attr('align')) ? 'float:' + jQuery(this).attr('align') + ';' : '';
|
||||
var imgHand = (jQuery(this).parent().attr('href')) ? 'cursor:hand;' : '';
|
||||
if (this.style.border) {
|
||||
prevStyle += 'border:' + this.style.border + ';';
|
||||
this.style.border = '';
|
||||
}
|
||||
if (this.style.padding) {
|
||||
prevStyle += 'padding:' + this.style.padding + ';';
|
||||
this.style.padding = '';
|
||||
}
|
||||
if (this.style.margin) {
|
||||
prevStyle += 'margin:' + this.style.margin + ';';
|
||||
this.style.margin = '';
|
||||
}
|
||||
var imgStyle = (this.style.cssText);
|
||||
|
||||
strNewHTML += '<span ' + imgId + imgClass + imgTitle + imgAlt;
|
||||
strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;' + imgAlign + imgHand;
|
||||
strNewHTML += 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;';
|
||||
strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + jQuery(this).attr('src') + '\', sizingMethod=\'scale\');';
|
||||
strNewHTML += imgStyle + '"></span>';
|
||||
if (prevStyle != '') {
|
||||
strNewHTML = '<span style="position:relative;display:inline-block;' + prevStyle + imgHand + 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;' + '">' + strNewHTML + '</span>';
|
||||
}
|
||||
|
||||
jQuery(this).hide();
|
||||
jQuery(this).after(strNewHTML);
|
||||
|
||||
});
|
||||
|
||||
// fix css background pngs
|
||||
jQuery(this).find("*").each(function () {
|
||||
var bgIMG = jQuery(this).css('background-image');
|
||||
if (bgIMG.indexOf(".png") != -1) {
|
||||
var iebg = bgIMG.split('url("')[1].split('")')[0];
|
||||
jQuery(this).css('background-image', 'none');
|
||||
jQuery(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')";
|
||||
}
|
||||
});
|
||||
|
||||
//fix input with png-source
|
||||
jQuery(this).find("input[src$=.png]").each(function () {
|
||||
var bgIMG = jQuery(this).attr('src');
|
||||
jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\', sizingMethod=\'scale\');';
|
||||
jQuery(this).attr('src', settings.blankgif)
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return jQuery;
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
@ -1,68 +0,0 @@
|
||||
/*jquery.select_skin.js */
|
||||
/*
|
||||
* jQuery select element skinning
|
||||
* version: 1.0.4 (03/03/2009)
|
||||
* @requires: jQuery v1.2 or later
|
||||
* adapted from Derek Harvey code
|
||||
* http://www.lotsofcode.com/javascript-and-ajax/jquery-select-box-skin.htm
|
||||
* Licensed under the GPL license:
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* Copyright 2009 Colin Verot
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
$.fn.select_skin = function (w) {
|
||||
return $(this).each(function (i) {
|
||||
s = $(this);
|
||||
|
||||
if (!s.attr('multiple')) {
|
||||
// create the container
|
||||
s.wrap('<div class="cmf-skinned-select"></div>');
|
||||
c = s.parent();
|
||||
c.children().before('<div class="cmf-skinned-text"> </div>').each(function () {
|
||||
if (this.selectedIndex >= 0) $(this).prev().text(this.options[this.selectedIndex].innerHTML)
|
||||
});
|
||||
c.width(s.outerWidth() - 2);
|
||||
c.height(s.outerHeight() - 2);
|
||||
|
||||
// skin the container
|
||||
c.css('background-color', s.css('background-color'));
|
||||
c.css('color', s.css('color'));
|
||||
c.css('font-size', s.css('font-size'));
|
||||
c.css('font-family', s.css('font-family'));
|
||||
c.css('font-style', s.css('font-style'));
|
||||
c.css('position', 'relative');
|
||||
|
||||
// hide the original select
|
||||
s.css({
|
||||
'opacity': 0,
|
||||
'position': 'relative',
|
||||
'z-index': 100
|
||||
});
|
||||
|
||||
// get and skin the text label
|
||||
var t = c.children().prev();
|
||||
t.height(c.outerHeight() - s.css('padding-top').replace(/px,*\)*/g, "") - s.css('padding-bottom').replace(/px,*\)*/g, "") - t.css('padding-top').replace(/px,*\)*/g, "") - t.css('padding-bottom').replace(/px,*\)*/g, "") - 2);
|
||||
t.width(c.innerWidth() - s.css('padding-right').replace(/px,*\)*/g, "") - s.css('padding-left').replace(/px,*\)*/g, "") - t.css('padding-right').replace(/px,*\)*/g, "") - t.css('padding-left').replace(/px,*\)*/g, "") - c.innerHeight());
|
||||
t.css({
|
||||
'opacity': 100,
|
||||
'overflow': 'hidden',
|
||||
'position': 'absolute',
|
||||
'text-indent': '0px',
|
||||
'z-index': 1,
|
||||
'top': 0,
|
||||
'left': 0
|
||||
});
|
||||
|
||||
// add events
|
||||
c.children().click(function () {
|
||||
t.text((this.options.length > 0 && this.selectedIndex >= 0 ? this.options[this.selectedIndex].innerHTML : ''));
|
||||
});
|
||||
c.children().change(function () {
|
||||
t.text((this.options.length > 0 && this.selectedIndex >= 0 ? this.options[this.selectedIndex].innerHTML : ''));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}(jQuery));
|
||||
File diff suppressed because one or more lines are too long
270
public/site_assets/mmcFE/js/jquery.tools.min.js
vendored
270
public/site_assets/mmcFE/js/jquery.tools.min.js
vendored
@ -1,270 +0,0 @@
|
||||
/*
|
||||
* jQuery Tools 1.2.5 - The missing UI library for the Web
|
||||
*
|
||||
* [jquery, toolbox.flashembed, toolbox.history, toolbox.expose, toolbox.mousewheel, tabs, tabs.slideshow, tooltip, tooltip.slide, tooltip.dynamic, scrollable, scrollable.autoscroll, scrollable.navigator, overlay, overlay.apple, dateinput, rangeinput, validator]
|
||||
*
|
||||
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
|
||||
*
|
||||
* http://flowplayer.org/tools/
|
||||
*
|
||||
* jQuery JavaScript Library v1.4.2
|
||||
* http://jquery.com/
|
||||
*
|
||||
* Copyright 2010, John Resig
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://docs.jquery.com/License
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* http://sizzlejs.com/
|
||||
* Copyright 2010, The Dojo Foundation
|
||||
* Released under the MIT, BSD, and GPL Licenses.
|
||||
*
|
||||
* -----
|
||||
*
|
||||
|
||||
|
||||
* jquery.event.wheel.js - rev 1
|
||||
* Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
|
||||
* Liscensed under the MIT License (MIT-LICENSE.txt)
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* Created: 2008-07-01 | Updated: 2008-07-14
|
||||
*
|
||||
* -----
|
||||
*
|
||||
* File generated: Wed Sep 22 06:12:53 GMT 2010
|
||||
*/
|
||||
(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
|
||||
e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
|
||||
j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
|
||||
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
|
||||
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
|
||||
Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
|
||||
(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
|
||||
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
|
||||
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
|
||||
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
|
||||
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
|
||||
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
|
||||
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
|
||||
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
|
||||
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
|
||||
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
|
||||
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
|
||||
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
|
||||
var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
|
||||
parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
|
||||
false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
|
||||
s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
|
||||
applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
|
||||
else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
|
||||
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
|
||||
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
|
||||
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
|
||||
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
|
||||
" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
|
||||
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
|
||||
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
|
||||
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
|
||||
a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
|
||||
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
|
||||
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
|
||||
C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
|
||||
null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
|
||||
e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
|
||||
f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
|
||||
if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
|
||||
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
|
||||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
|
||||
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
|
||||
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
|
||||
isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
|
||||
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
|
||||
if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
|
||||
e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
|
||||
"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
|
||||
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
|
||||
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
|
||||
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
|
||||
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.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(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
|
||||
if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
|
||||
e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
|
||||
t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
|
||||
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
|
||||
for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
|
||||
1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
|
||||
CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
|
||||
relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
|
||||
l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
|
||||
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
|
||||
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
|
||||
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
|
||||
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
|
||||
setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
|
||||
h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
|
||||
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
|
||||
"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
|
||||
h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
|
||||
!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
|
||||
h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
|
||||
q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
|
||||
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
|
||||
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
|
||||
function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
|
||||
gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
|
||||
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
|
||||
{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
|
||||
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
|
||||
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
|
||||
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
|
||||
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
|
||||
a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
|
||||
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
|
||||
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
|
||||
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
|
||||
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
|
||||
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
|
||||
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
|
||||
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
|
||||
u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
|
||||
1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
|
||||
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
|
||||
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
|
||||
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
|
||||
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
|
||||
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
|
||||
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
|
||||
"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
|
||||
a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
|
||||
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
|
||||
"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
|
||||
serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
|
||||
function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
|
||||
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
|
||||
e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
|
||||
"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
|
||||
false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
|
||||
false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
|
||||
c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
|
||||
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
|
||||
g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
|
||||
1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
|
||||
"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
|
||||
if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
|
||||
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
|
||||
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
|
||||
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
|
||||
j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
|
||||
this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
|
||||
"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
|
||||
c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
|
||||
this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
|
||||
this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
|
||||
e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
|
||||
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
|
||||
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
|
||||
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
|
||||
k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
|
||||
f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
|
||||
a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
|
||||
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
|
||||
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
|
||||
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
|
||||
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
|
||||
e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
|
||||
(function(){function f(a,b){if(b)for(var c in b)if(b.hasOwnProperty(c))a[c]=b[c];return a}function l(a,b){var c=[];for(var d in a)if(a.hasOwnProperty(d))c[d]=b(a[d]);return c}function m(a,b,c){if(e.isSupported(b.version))a.innerHTML=e.getHTML(b,c);else if(b.expressInstall&&e.isSupported([6,65]))a.innerHTML=e.getHTML(f(b,{src:b.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title});else{if(!a.innerHTML.replace(/\s/g,"")){a.innerHTML="<h2>Flash version "+b.version+
|
||||
" or greater is required</h2><h3>"+(g[0]>0?"Your version is "+g:"You have no flash plugin installed")+"</h3>"+(a.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+k+"'>here</a></p>");if(a.tagName=="A")a.onclick=function(){location.href=k}}if(b.onFail){var d=b.onFail.call(this);if(typeof d=="string")a.innerHTML=d}}if(i)window[b.id]=document.getElementById(b.id);f(this,{getRoot:function(){return a},getOptions:function(){return b},getConf:function(){return c},
|
||||
getApi:function(){return a.firstChild}})}var i=document.all,k="http://www.adobe.com/go/getflashplayer",n=typeof jQuery=="function",o=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,j={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});
|
||||
window.flashembed=function(a,b,c){if(typeof a=="string")a=document.getElementById(a.replace("#",""));if(a){if(typeof b=="string")b={src:b};return new m(a,f(f({},j),b),c)}};var e=f(window.flashembed,{conf:j,getVersion:function(){var a,b;try{b=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(c){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"))&&a.GetVariable("$version")}catch(d){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"))&&a.GetVariable("$version")}catch(h){}}}return(b=
|
||||
o.exec(b))?[b[1],b[3]]:[0,0]},asString:function(a){if(a===null||a===undefined)return null;var b=typeof a;if(b=="object"&&a.push)b="array";switch(b){case "string":a=a.replace(new RegExp('(["\\\\])',"g"),"\\$1");a=a.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+a+'"';case "array":return"["+l(a,function(d){return e.asString(d)}).join(",")+"]";case "function":return'"function()"';case "object":b=[];for(var c in a)a.hasOwnProperty(c)&&b.push('"'+c+'":'+e.asString(a[c]));return"{"+b.join(",")+"}"}return String(a).replace(/\s/g,
|
||||
" ").replace(/\'/g,'"')},getHTML:function(a,b){a=f({},a);var c='<object width="'+a.width+'" height="'+a.height+'" id="'+a.id+'" name="'+a.id+'"';if(a.cachebusting)a.src+=(a.src.indexOf("?")!=-1?"&":"?")+Math.random();c+=a.w3c||!i?' data="'+a.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';c+=">";if(a.w3c||i)c+='<param name="movie" value="'+a.src+'" />';a.width=a.height=a.id=a.w3c=a.src=null;a.onFail=a.version=a.expressInstall=null;for(var d in a)if(a[d])c+=
|
||||
'<param name="'+d+'" value="'+a[d]+'" />';a="";if(b){for(var h in b)if(b[h]){d=b[h];a+=h+"="+(/function|object/.test(typeof d)?e.asString(d):d)+"&"}a=a.slice(0,-1);c+='<param name="flashvars" value=\''+a+"' />"}c+="</object>";return c},isSupported:function(a){return g[0]>a[0]||g[0]==a[0]&&g[1]>=a[1]}}),g=e.getVersion();if(n){jQuery.tools=jQuery.tools||{version:"1.2.5"};jQuery.tools.flashembed={conf:j};jQuery.fn.flashembed=function(a,b){return this.each(function(){$(this).data("flashembed",flashembed(this,
|
||||
a,b))})}}})();
|
||||
(function(b){function h(c){if(c){var a=d.contentWindow.document;a.open().close();a.location.hash=c}}var g,d,f,i;b.tools=b.tools||{version:"1.2.5"};b.tools.history={init:function(c){if(!i){if(b.browser.msie&&b.browser.version<"8"){if(!d){d=b("<iframe/>").attr("src","javascript:false;").hide().get(0);b("body").append(d);setInterval(function(){var a=d.contentWindow.document;a=a.location.hash;g!==a&&b.event.trigger("hash",a)},100);h(location.hash||"#")}}else setInterval(function(){var a=location.hash;
|
||||
a!==g&&b.event.trigger("hash",a)},100);f=!f?c:f.add(c);c.click(function(a){var e=b(this).attr("href");d&&h(e);if(e.slice(0,1)!="#"){location.href="#"+e;return a.preventDefault()}});i=true}}};b(window).bind("hash",function(c,a){a?f.filter(function(){var e=b(this).attr("href");return e==a||e==a.replace("#","")}).trigger("history",[a]):f.eq(0).trigger("history",[a]);g=a});b.fn.history=function(c){b.tools.history.init(this);return this.bind("history",c)}})(jQuery);
|
||||
(function(b){function k(){if(b.browser.msie){var a=b(document).height(),d=b(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-d<20?d:a]}return[b(document).width(),b(document).height()]}function h(a){if(a)return a.call(b.mask)}b.tools=b.tools||{version:"1.2.5"};var l;l=b.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,
|
||||
onClose:null}};var c,i,e,g,j;b.mask={load:function(a,d){if(e)return this;if(typeof a=="string")a={color:a};a=a||g;g=a=b.extend(b.extend({},l.conf),a);c=b("#"+a.maskId);if(!c.length){c=b("<div/>").attr("id",a.maskId);b("body").append(c)}var m=k();c.css({position:"absolute",top:0,left:0,width:m[0],height:m[1],display:"none",opacity:a.startOpacity,zIndex:a.zIndex});a.color&&c.css("backgroundColor",a.color);if(h(a.onBeforeLoad)===false)return this;a.closeOnEsc&&b(document).bind("keydown.mask",function(f){f.keyCode==
|
||||
27&&b.mask.close(f)});a.closeOnClick&&c.bind("click.mask",function(f){b.mask.close(f)});b(window).bind("resize.mask",function(){b.mask.fit()});if(d&&d.length){j=d.eq(0).css("zIndex");b.each(d,function(){var f=b(this);/relative|absolute|fixed/i.test(f.css("position"))||f.css("position","relative")});i=d.css({zIndex:Math.max(a.zIndex+1,j=="auto"?0:j)})}c.css({display:"block"}).fadeTo(a.loadSpeed,a.opacity,function(){b.mask.fit();h(a.onLoad);e="full"});e=true;return this},close:function(){if(e){if(h(g.onBeforeClose)===
|
||||
false)return this;c.fadeOut(g.closeSpeed,function(){h(g.onClose);i&&i.css({zIndex:j});e=false});b(document).unbind("keydown.mask");c.unbind("click.mask");b(window).unbind("resize.mask")}return this},fit:function(){if(e){var a=k();c.css({width:a[0],height:a[1]})}},getMask:function(){return c},isLoaded:function(a){return a?e=="full":e},getConf:function(){return g},getExposed:function(){return i}};b.fn.mask=function(a){b.mask.load(a);return this};b.fn.expose=function(a){b.mask.load(a,this);return this}})(jQuery);
|
||||
(function(b){function c(a){switch(a.type){case "mousemove":return b.extend(a.data,{clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY});case "DOMMouseScroll":b.extend(a,a.data);a.delta=-a.detail/3;break;case "mousewheel":a.delta=a.wheelDelta/120;break}a.type="wheel";return b.event.handle.call(this,a,a.delta)}b.fn.mousewheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};b.event.special.wheel={setup:function(){b.event.add(this,d,c,{})},teardown:function(){b.event.remove(this,
|
||||
d,c)}};var d=!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser.version<"1.9"?" mousemove":"")})(jQuery);
|
||||
(function(c){function p(d,b,a){var e=this,l=d.add(this),h=d.find(a.tabs),i=b.jquery?b:d.children(b),j;h.length||(h=d.children());i.length||(i=d.parent().find(b));i.length||(i=c(b));c.extend(this,{click:function(f,g){var k=h.eq(f);if(typeof f=="string"&&f.replace("#","")){k=h.filter("[href*="+f.replace("#","")+"]");f=Math.max(h.index(k),0)}if(a.rotate){var n=h.length-1;if(f<0)return e.click(n,g);if(f>n)return e.click(0,g)}if(!k.length){if(j>=0)return e;f=a.initialIndex;k=h.eq(f)}if(f===j)return e;
|
||||
g=g||c.Event();g.type="onBeforeClick";l.trigger(g,[f]);if(!g.isDefaultPrevented()){o[a.effect].call(e,f,function(){g.type="onClick";l.trigger(g,[f])});j=f;h.removeClass(a.current);k.addClass(a.current);return e}},getConf:function(){return a},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return e.click(j+1)},prev:function(){return e.click(j-1)},destroy:function(){h.unbind(a.event).removeClass(a.current);
|
||||
i.find("a[href^=#]").unbind("click.T");return e}});c.each("onBeforeClick,onClick".split(","),function(f,g){c.isFunction(a[g])&&c(e).bind(g,a[g]);e[g]=function(k){k&&c(e).bind(g,k);return e}});if(a.history&&c.fn.history){c.tools.history.init(h);a.event="history"}h.each(function(f){c(this).bind(a.event,function(g){e.click(f,g);return g.preventDefault()})});i.find("a[href^=#]").bind("click.T",function(f){e.click(c(this).attr("href"),f)});if(location.hash&&a.tabs=="a"&&d.find("[href="+location.hash+"]").length)e.click(location.hash);
|
||||
else if(a.initialIndex===0||a.initialIndex>0)e.click(a.initialIndex)}c.tools=c.tools||{version:"1.2.5"};c.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:false,history:false},addEffect:function(d,b){o[d]=b}};var o={"default":function(d,b){this.getPanes().hide().eq(d).show();b.call()},fade:function(d,b){var a=this.getConf(),e=a.fadeOutSpeed,l=this.getPanes();e?l.fadeOut(e):l.hide();l.eq(d).fadeIn(a.fadeInSpeed,b)},slide:function(d,
|
||||
b){this.getPanes().slideUp(200);this.getPanes().eq(d).slideDown(400,b)},ajax:function(d,b){this.getPanes().eq(0).load(this.getTabs().eq(d).attr("href"),b)}},m;c.tools.tabs.addEffect("horizontal",function(d,b){m||(m=this.getPanes().eq(0).width());this.getCurrentPane().animate({width:0},function(){c(this).hide()});this.getPanes().eq(d).animate({width:m},function(){c(this).show();b.call()})});c.fn.tabs=function(d,b){var a=this.data("tabs");if(a){a.destroy();this.removeData("tabs")}if(c.isFunction(b))b=
|
||||
{onBeforeClick:b};b=c.extend({},c.tools.tabs.conf,b);this.each(function(){a=new p(c(this),d,b);c(this).data("tabs",a)});return b.api?a:this}})(jQuery);
|
||||
(function(c){function p(g,a){function m(f){var e=c(f);return e.length<2?e:g.parent().find(f)}var b=this,i=g.add(this),d=g.data("tabs"),h,j=true,n=m(a.next).click(function(){d.next()}),k=m(a.prev).click(function(){d.prev()});c.extend(b,{getTabs:function(){return d},getConf:function(){return a},play:function(){if(h)return b;var f=c.Event("onBeforePlay");i.trigger(f);if(f.isDefaultPrevented())return b;h=setInterval(d.next,a.interval);j=false;i.trigger("onPlay");return b},pause:function(){if(!h)return b;
|
||||
var f=c.Event("onBeforePause");i.trigger(f);if(f.isDefaultPrevented())return b;h=clearInterval(h);i.trigger("onPause");return b},stop:function(){b.pause();j=true}});c.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(f,e){c.isFunction(a[e])&&c(b).bind(e,a[e]);b[e]=function(q){return c(b).bind(e,q)}});a.autopause&&d.getTabs().add(n).add(k).add(d.getPanes()).hover(b.pause,function(){j||b.play()});a.autoplay&&b.play();a.clickable&&d.getPanes().click(function(){d.next()});if(!d.getConf().rotate){var l=
|
||||
a.disabledClass;d.getIndex()||k.addClass(l);d.onBeforeClick(function(f,e){k.toggleClass(l,!e);n.toggleClass(l,e==d.getTabs().length-1)})}}var o;o=c.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:false,autopause:true,interval:3E3,clickable:true,api:false}};c.fn.slideshow=function(g){var a=this.data("slideshow");if(a)return a;g=c.extend({},o.conf,g);this.each(function(){a=new p(c(this),g);c(this).data("slideshow",a)});return g.api?a:this}})(jQuery);
|
||||
(function(f){function p(a,b,c){var h=c.relative?a.position().top:a.offset().top,d=c.relative?a.position().left:a.offset().left,i=c.position[0];h-=b.outerHeight()-c.offset[0];d+=a.outerWidth()+c.offset[1];if(/iPad/i.test(navigator.userAgent))h-=f(window).scrollTop();var j=b.outerHeight()+a.outerHeight();if(i=="center")h+=j/2;if(i=="bottom")h+=j;i=c.position[1];a=b.outerWidth()+a.outerWidth();if(i=="center")d-=a/2;if(i=="left")d-=a;return{top:h,left:d}}function u(a,b){var c=this,h=a.add(c),d,i=0,j=
|
||||
0,m=a.attr("title"),q=a.attr("data-tooltip"),r=o[b.effect],l,s=a.is(":input"),v=s&&a.is(":checkbox, :radio, select, :button, :submit"),t=a.attr("type"),k=b.events[t]||b.events[s?v?"widget":"input":"def"];if(!r)throw'Nonexistent effect "'+b.effect+'"';k=k.split(/,\s*/);if(k.length!=2)throw"Tooltip: bad events configuration for "+t;a.bind(k[0],function(e){clearTimeout(i);if(b.predelay)j=setTimeout(function(){c.show(e)},b.predelay);else c.show(e)}).bind(k[1],function(e){clearTimeout(j);if(b.delay)i=
|
||||
setTimeout(function(){c.hide(e)},b.delay);else c.hide(e)});if(m&&b.cancelDefault){a.removeAttr("title");a.data("title",m)}f.extend(c,{show:function(e){if(!d){if(q)d=f(q);else if(b.tip)d=f(b.tip).eq(0);else if(m)d=f(b.layout).addClass(b.tipClass).appendTo(document.body).hide().append(m);else{d=a.next();d.length||(d=a.parent().next())}if(!d.length)throw"Cannot find tooltip for "+a;}if(c.isShown())return c;d.stop(true,true);var g=p(a,d,b);b.tip&&d.html(a.data("title"));e=e||f.Event();e.type="onBeforeShow";
|
||||
h.trigger(e,[g]);if(e.isDefaultPrevented())return c;g=p(a,d,b);d.css({position:"absolute",top:g.top,left:g.left});l=true;r[0].call(c,function(){e.type="onShow";l="full";h.trigger(e)});g=b.events.tooltip.split(/,\s*/);if(!d.data("__set")){d.bind(g[0],function(){clearTimeout(i);clearTimeout(j)});g[1]&&!a.is("input:not(:checkbox, :radio), textarea")&&d.bind(g[1],function(n){n.relatedTarget!=a[0]&&a.trigger(k[1].split(" ")[0])});d.data("__set",true)}return c},hide:function(e){if(!d||!c.isShown())return c;
|
||||
e=e||f.Event();e.type="onBeforeHide";h.trigger(e);if(!e.isDefaultPrevented()){l=false;o[b.effect][1].call(c,function(){e.type="onHide";h.trigger(e)});return c}},isShown:function(e){return e?l=="full":l},getConf:function(){return b},getTip:function(){return d},getTrigger:function(){return a}});f.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(e,g){f.isFunction(b[g])&&f(c).bind(g,b[g]);c[g]=function(n){n&&f(c).bind(g,n);return c}})}f.tools=f.tools||{version:"1.2.5"};f.tools.tooltip=
|
||||
{conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:false,cancelDefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,b,c){o[a]=[b,c]}};var o={toggle:[function(a){var b=this.getConf(),c=this.getTip();b=b.opacity;b<1&&c.css({opacity:b});c.show();a.call()},function(a){this.getTip().hide();
|
||||
a.call()}],fade:[function(a){var b=this.getConf();this.getTip().fadeTo(b.fadeInSpeed,b.opacity,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};f.fn.tooltip=function(a){var b=this.data("tooltip");if(b)return b;a=f.extend(true,{},f.tools.tooltip.conf,a);if(typeof a.position=="string")a.position=a.position.split(/,?\s/);this.each(function(){b=new u(f(this),a);f(this).data("tooltip",b)});return a.api?b:this}})(jQuery);
|
||||
(function(d){var i=d.tools.tooltip;d.extend(i.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!d.browser.msie});var e={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};i.addEffect("slide",function(g){var a=this.getConf(),f=this.getTip(),b=a.slideFade?{opacity:a.opacity}:{},c=e[a.direction]||e.up;b[c[1]]=c[0]+"="+a.slideOffset;a.slideFade&&f.css({opacity:0});f.show().animate(b,a.slideInSpeed,g)},function(g){var a=this.getConf(),f=a.slideOffset,
|
||||
b=a.slideFade?{opacity:0}:{},c=e[a.direction]||e.up,h=""+c[0];if(a.bounce)h=h=="+"?"-":"+";b[c[1]]=h+"="+f;this.getTip().animate(b,a.slideOutSpeed,function(){d(this).hide();g.call()})})})(jQuery);
|
||||
(function(g){function j(a){var c=g(window),d=c.width()+c.scrollLeft(),h=c.height()+c.scrollTop();return[a.offset().top<=c.scrollTop(),d<=a.offset().left+a.width(),h<=a.offset().top+a.height(),c.scrollLeft()>=a.offset().left]}function k(a){for(var c=a.length;c--;)if(a[c])return false;return true}var i=g.tools.tooltip;i.dynamic={conf:{classNames:"top right bottom left"}};g.fn.dynamic=function(a){if(typeof a=="number")a={speed:a};a=g.extend({},i.dynamic.conf,a);var c=a.classNames.split(/\s/),d;this.each(function(){var h=
|
||||
g(this).tooltip().onBeforeShow(function(e,f){e=this.getTip();var b=this.getConf();d||(d=[b.position[0],b.position[1],b.offset[0],b.offset[1],g.extend({},b)]);g.extend(b,d[4]);b.position=[d[0],d[1]];b.offset=[d[2],d[3]];e.css({visibility:"hidden",position:"absolute",top:f.top,left:f.left}).show();f=j(e);if(!k(f)){if(f[2]){g.extend(b,a.top);b.position[0]="top";e.addClass(c[0])}if(f[3]){g.extend(b,a.right);b.position[1]="right";e.addClass(c[1])}if(f[0]){g.extend(b,a.bottom);b.position[0]="bottom";e.addClass(c[2])}if(f[1]){g.extend(b,
|
||||
a.left);b.position[1]="left";e.addClass(c[3])}if(f[0]||f[2])b.offset[0]*=-1;if(f[1]||f[3])b.offset[1]*=-1}e.css({visibility:"visible"}).hide()});h.onBeforeShow(function(){var e=this.getConf();this.getTip();setTimeout(function(){e.position=[d[0],d[1]];e.offset=[d[2],d[3]]},0)});h.onHide(function(){var e=this.getTip();e.removeClass(a.classNames)});ret=h});return a.api?ret:this}})(jQuery);
|
||||
(function(e){function p(f,c){var b=e(c);return b.length<2?b:f.parent().find(c)}function u(f,c){var b=this,n=f.add(b),g=f.children(),l=0,j=c.vertical;k||(k=b);if(g.length>1)g=e(c.items,f);e.extend(b,{getConf:function(){return c},getIndex:function(){return l},getSize:function(){return b.getItems().size()},getNaviButtons:function(){return o.add(q)},getRoot:function(){return f},getItemWrap:function(){return g},getItems:function(){return g.children(c.item).not("."+c.clonedClass)},move:function(a,d){return b.seekTo(l+
|
||||
a,d)},next:function(a){return b.move(1,a)},prev:function(a){return b.move(-1,a)},begin:function(a){return b.seekTo(0,a)},end:function(a){return b.seekTo(b.getSize()-1,a)},focus:function(){return k=b},addItem:function(a){a=e(a);if(c.circular){g.children("."+c.clonedClass+":last").before(a);g.children("."+c.clonedClass+":first").replaceWith(a.clone().addClass(c.clonedClass))}else g.append(a);n.trigger("onAddItem",[a]);return b},seekTo:function(a,d,h){a.jquery||(a*=1);if(c.circular&&a===0&&l==-1&&d!==
|
||||
0)return b;if(!c.circular&&a<0||a>b.getSize()||a<-1)return b;var i=a;if(a.jquery)a=b.getItems().index(a);else i=b.getItems().eq(a);var r=e.Event("onBeforeSeek");if(!h){n.trigger(r,[a,d]);if(r.isDefaultPrevented()||!i.length)return b}i=j?{top:-i.position().top}:{left:-i.position().left};l=a;k=b;if(d===undefined)d=c.speed;g.animate(i,d,c.easing,h||function(){n.trigger("onSeek",[a])});return b}});e.each(["onBeforeSeek","onSeek","onAddItem"],function(a,d){e.isFunction(c[d])&&e(b).bind(d,c[d]);b[d]=function(h){h&&
|
||||
e(b).bind(d,h);return b}});if(c.circular){var s=b.getItems().slice(-1).clone().prependTo(g),t=b.getItems().eq(1).clone().appendTo(g);s.add(t).addClass(c.clonedClass);b.onBeforeSeek(function(a,d,h){if(!a.isDefaultPrevented())if(d==-1){b.seekTo(s,h,function(){b.end(0)});return a.preventDefault()}else d==b.getSize()&&b.seekTo(t,h,function(){b.begin(0)})});b.seekTo(0,0,function(){})}var o=p(f,c.prev).click(function(){b.prev()}),q=p(f,c.next).click(function(){b.next()});if(!c.circular&&b.getSize()>1){b.onBeforeSeek(function(a,
|
||||
d){setTimeout(function(){if(!a.isDefaultPrevented()){o.toggleClass(c.disabledClass,d<=0);q.toggleClass(c.disabledClass,d>=b.getSize()-1)}},1)});c.initialIndex||o.addClass(c.disabledClass)}c.mousewheel&&e.fn.mousewheel&&f.mousewheel(function(a,d){if(c.mousewheel){b.move(d<0?1:-1,c.wheelSpeed||50);return false}});if(c.touch){var m={};g[0].ontouchstart=function(a){a=a.touches[0];m.x=a.clientX;m.y=a.clientY};g[0].ontouchmove=function(a){if(a.touches.length==1&&!g.is(":animated")){var d=a.touches[0],h=
|
||||
m.x-d.clientX;d=m.y-d.clientY;b[j&&d>0||!j&&h>0?"next":"prev"]();a.preventDefault()}}}c.keyboard&&e(document).bind("keydown.scrollable",function(a){if(!(!c.keyboard||a.altKey||a.ctrlKey||e(a.target).is(":input")))if(!(c.keyboard!="static"&&k!=b)){var d=a.keyCode;if(j&&(d==38||d==40)){b.move(d==38?-1:1);return a.preventDefault()}if(!j&&(d==37||d==39)){b.move(d==37?-1:1);return a.preventDefault()}}});c.initialIndex&&b.seekTo(c.initialIndex,0,function(){})}e.tools=e.tools||{version:"1.2.5"};e.tools.scrollable=
|
||||
{conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,touch:true,wheelSpeed:0}};var k;e.fn.scrollable=function(f){var c=this.data("scrollable");if(c)return c;f=e.extend({},e.tools.scrollable.conf,f);this.each(function(){c=new u(e(this),f);e(this).data("scrollable",c)});return f.api?c:this}})(jQuery);
|
||||
(function(b){var f=b.tools.scrollable;f.autoscroll={conf:{autoplay:true,interval:3E3,autopause:true}};b.fn.autoscroll=function(c){if(typeof c=="number")c={interval:c};var d=b.extend({},f.autoscroll.conf,c),g;this.each(function(){var a=b(this).data("scrollable");if(a)g=a;var e,h=true;a.play=function(){if(!e){h=false;e=setInterval(function(){a.next()},d.interval)}};a.pause=function(){e=clearInterval(e)};a.stop=function(){a.pause();h=true};d.autopause&&a.getRoot().add(a.getNaviButtons()).hover(a.pause,
|
||||
a.play);d.autoplay&&a.play()});return d.api?g:this}})(jQuery);
|
||||
(function(d){function p(b,g){var h=d(g);return h.length<2?h:b.parent().find(g)}var m=d.tools.scrollable;m.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,idPrefix:null,history:false}};d.fn.navigator=function(b){if(typeof b=="string")b={navi:b};b=d.extend({},m.navigator.conf,b);var g;this.each(function(){function h(a,c,i){e.seekTo(c);if(j){if(location.hash)location.hash=a.attr("href").replace("#","")}else return i.preventDefault()}function f(){return k.find(b.naviItem||
|
||||
"> *")}function n(a){var c=d("<"+(b.naviItem||"a")+"/>").click(function(i){h(d(this),a,i)}).attr("href","#"+a);a===0&&c.addClass(l);b.indexed&&c.text(a+1);b.idPrefix&&c.attr("id",b.idPrefix+a);return c.appendTo(k)}function o(a,c){a=f().eq(c.replace("#",""));a.length||(a=f().filter("[href="+c+"]"));a.click()}var e=d(this).data("scrollable"),k=b.navi.jquery?b.navi:p(e.getRoot(),b.navi),q=e.getNaviButtons(),l=b.activeClass,j=b.history&&d.fn.history;if(e)g=e;e.getNaviButtons=function(){return q.add(k)};
|
||||
f().length?f().each(function(a){d(this).click(function(c){h(d(this),a,c)})}):d.each(e.getItems(),function(a){n(a)});e.onBeforeSeek(function(a,c){setTimeout(function(){if(!a.isDefaultPrevented()){var i=f().eq(c);!a.isDefaultPrevented()&&i.length&&f().removeClass(l).eq(c).addClass(l)}},1)});e.onAddItem(function(a,c){c=n(e.getItems().index(c));j&&c.history(o)});j&&f().history(o)});return b.api?g:this}})(jQuery);
|
||||
(function(a){function t(d,b){var c=this,j=d.add(c),o=a(window),k,f,m,g=a.tools.expose&&(b.mask||b.expose),n=Math.random().toString().slice(10);if(g){if(typeof g=="string")g={color:g};g.closeOnClick=g.closeOnEsc=false}var p=b.target||d.attr("rel");f=p?a(p):d;if(!f.length)throw"Could not find Overlay: "+p;d&&d.index(f)==-1&&d.click(function(e){c.load(e);return e.preventDefault()});a.extend(c,{load:function(e){if(c.isOpened())return c;var h=q[b.effect];if(!h)throw'Overlay: cannot find effect : "'+b.effect+
|
||||
'"';b.oneInstance&&a.each(s,function(){this.close(e)});e=e||a.Event();e.type="onBeforeLoad";j.trigger(e);if(e.isDefaultPrevented())return c;m=true;g&&a(f).expose(g);var i=b.top,r=b.left,u=f.outerWidth({margin:true}),v=f.outerHeight({margin:true});if(typeof i=="string")i=i=="center"?Math.max((o.height()-v)/2,0):parseInt(i,10)/100*o.height();if(r=="center")r=Math.max((o.width()-u)/2,0);h[0].call(c,{top:i,left:r},function(){if(m){e.type="onLoad";j.trigger(e)}});g&&b.closeOnClick&&a.mask.getMask().one("click",
|
||||
c.close);b.closeOnClick&&a(document).bind("click."+n,function(l){a(l.target).parents(f).length||c.close(l)});b.closeOnEsc&&a(document).bind("keydown."+n,function(l){l.keyCode==27&&c.close(l)});return c},close:function(e){if(!c.isOpened())return c;e=e||a.Event();e.type="onBeforeClose";j.trigger(e);if(!e.isDefaultPrevented()){m=false;q[b.effect][1].call(c,function(){e.type="onClose";j.trigger(e)});a(document).unbind("click."+n).unbind("keydown."+n);g&&a.mask.close();return c}},getOverlay:function(){return f},
|
||||
getTrigger:function(){return d},getClosers:function(){return k},isOpened:function(){return m},getConf:function(){return b}});a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(e,h){a.isFunction(b[h])&&a(c).bind(h,b[h]);c[h]=function(i){i&&a(c).bind(h,i);return c}});k=f.find(b.close||".close");if(!k.length&&!b.close){k=a('<a class="close"></a>');f.prepend(k)}k.click(function(e){c.close(e)});b.load&&c.load()}a.tools=a.tools||{version:"1.2.5"};a.tools.overlay={addEffect:function(d,
|
||||
b,c){q[d]=[b,c]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var s=[],q={};a.tools.overlay.addEffect("default",function(d,b){var c=this.getConf(),j=a(window);if(!c.fixed){d.top+=j.scrollTop();d.left+=j.scrollLeft()}d.position=c.fixed?"fixed":"absolute";this.getOverlay().css(d).fadeIn(c.speed,b)},function(d){this.getOverlay().fadeOut(this.getConf().closeSpeed,
|
||||
d)});a.fn.overlay=function(d){var b=this.data("overlay");if(b)return b;if(a.isFunction(d))d={onBeforeLoad:d};d=a.extend(true,{},a.tools.overlay.conf,d);this.each(function(){b=new t(a(this),d);s.push(b);a(this).data("overlay",b)});return d.api?b:this}})(jQuery);
|
||||
(function(h){function k(d){var e=d.offset();return{top:e.top+d.height()/2,left:e.left+d.width()/2}}var l=h.tools.overlay,f=h(window);h.extend(l.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});function o(d,e){var a=this.getOverlay(),c=this.getConf(),g=this.getTrigger(),p=this,m=a.outerWidth({margin:true}),b=a.data("img"),n=c.fixed?"fixed":"absolute";if(!b){b=a.css("backgroundImage");if(!b)throw"background-image CSS property not set for overlay";b=b.slice(b.indexOf("(")+1,b.indexOf(")")).replace(/\"/g,
|
||||
"");a.css("backgroundImage","none");b=h('<img src="'+b+'"/>');b.css({border:0,display:"none"}).width(m);h("body").append(b);a.data("img",b)}var i=c.start.top||Math.round(f.height()/2),j=c.start.left||Math.round(f.width()/2);if(g){g=k(g);i=g.top;j=g.left}if(c.fixed){i-=f.scrollTop();j-=f.scrollLeft()}else{d.top+=f.scrollTop();d.left+=f.scrollLeft()}b.css({position:"absolute",top:i,left:j,width:0,zIndex:c.zIndex}).show();d.position=n;a.css(d);b.animate({top:a.css("top"),left:a.css("left"),width:m},
|
||||
c.speed,function(){a.css("zIndex",c.zIndex+1).fadeIn(c.fadeInSpeed,function(){p.isOpened()&&!h(this).index(a)?e.call():a.hide()})}).css("position",n)}function q(d){var e=this.getOverlay().hide(),a=this.getConf(),c=this.getTrigger();e=e.data("img");var g={top:a.start.top,left:a.start.left,width:0};c&&h.extend(g,k(c));a.fixed&&e.css({position:"absolute"}).animate({top:"+="+f.scrollTop(),left:"+="+f.scrollLeft()},0);e.animate(g,a.closeSpeed,d)}l.addEffect("apple",o,q)})(jQuery);
|
||||
(function(d){function R(a,c){return 32-(new Date(a,c,32)).getDate()}function S(a,c){a=""+a;for(c=c||2;a.length<c;)a="0"+a;return a}function T(a,c,j){var q=a.getDate(),h=a.getDay(),r=a.getMonth();a=a.getFullYear();var f={d:q,dd:S(q),ddd:B[j].shortDays[h],dddd:B[j].days[h],m:r+1,mm:S(r+1),mmm:B[j].shortMonths[r],mmmm:B[j].months[r],yy:String(a).slice(2),yyyy:a};c=c.replace(X,function(s){return s in f?f[s]:s.slice(1,s.length-1)});return Y.html(c).html()}function v(a){return parseInt(a,10)}function U(a,
|
||||
c){return a.getFullYear()===c.getFullYear()&&a.getMonth()==c.getMonth()&&a.getDate()==c.getDate()}function C(a){if(a){if(a.constructor==Date)return a;if(typeof a=="string"){var c=a.split("-");if(c.length==3)return new Date(v(c[0]),v(c[1])-1,v(c[2]));if(!/^-?\d+$/.test(a))return;a=v(a)}c=new Date;c.setDate(c.getDate()+a);return c}}function Z(a,c){function j(b,e,g){n=b;D=b.getFullYear();E=b.getMonth();G=b.getDate();g=g||d.Event("api");g.type="change";H.trigger(g,[b]);if(!g.isDefaultPrevented()){a.val(T(b,
|
||||
e.format,e.lang));a.data("date",b);h.hide(g)}}function q(b){b.type="onShow";H.trigger(b);d(document).bind("keydown.d",function(e){if(e.ctrlKey)return true;var g=e.keyCode;if(g==8){a.val("");return h.hide(e)}if(g==27)return h.hide(e);if(d(V).index(g)>=0){if(!w){h.show(e);return e.preventDefault()}var i=d("#"+f.weeks+" a"),t=d("."+f.focus),o=i.index(t);t.removeClass(f.focus);if(g==74||g==40)o+=7;else if(g==75||g==38)o-=7;else if(g==76||g==39)o+=1;else if(g==72||g==37)o-=1;if(o>41){h.addMonth();t=d("#"+
|
||||
f.weeks+" a:eq("+(o-42)+")")}else if(o<0){h.addMonth(-1);t=d("#"+f.weeks+" a:eq("+(o+42)+")")}else t=i.eq(o);t.addClass(f.focus);return e.preventDefault()}if(g==34)return h.addMonth();if(g==33)return h.addMonth(-1);if(g==36)return h.today();if(g==13)d(e.target).is("select")||d("."+f.focus).click();return d([16,17,18,9]).index(g)>=0});d(document).bind("click.d",function(e){var g=e.target;if(!d(g).parents("#"+f.root).length&&g!=a[0]&&(!L||g!=L[0]))h.hide(e)})}var h=this,r=new Date,f=c.css,s=B[c.lang],
|
||||
k=d("#"+f.root),M=k.find("#"+f.title),L,I,J,D,E,G,n=a.attr("data-value")||c.value||a.val(),m=a.attr("min")||c.min,p=a.attr("max")||c.max,w;if(m===0)m="0";n=C(n)||r;m=C(m||c.yearRange[0]*365);p=C(p||c.yearRange[1]*365);if(!s)throw"Dateinput: invalid language: "+c.lang;if(a.attr("type")=="date"){var N=d("<input/>");d.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),function(b,e){N.attr(e,a.attr(e))});a.replaceWith(N);a=N}a.addClass(f.input);var H=
|
||||
a.add(h);if(!k.length){k=d("<div><div><a/><div/><a/></div><div><div/><div/></div></div>").hide().css({position:"absolute"}).attr("id",f.root);k.children().eq(0).attr("id",f.head).end().eq(1).attr("id",f.body).children().eq(0).attr("id",f.days).end().eq(1).attr("id",f.weeks).end().end().end().find("a").eq(0).attr("id",f.prev).end().eq(1).attr("id",f.next);M=k.find("#"+f.head).find("div").attr("id",f.title);if(c.selectors){var z=d("<select/>").attr("id",f.month),A=d("<select/>").attr("id",f.year);M.html(z.add(A))}for(var $=
|
||||
k.find("#"+f.days),O=0;O<7;O++)$.append(d("<span/>").text(s.shortDays[(O+c.firstDay)%7]));d("body").append(k)}if(c.trigger)L=d("<a/>").attr("href","#").addClass(f.trigger).click(function(b){h.show();return b.preventDefault()}).insertAfter(a);var K=k.find("#"+f.weeks);A=k.find("#"+f.year);z=k.find("#"+f.month);d.extend(h,{show:function(b){if(!(a.attr("readonly")||a.attr("disabled")||w)){b=b||d.Event();b.type="onBeforeShow";H.trigger(b);if(!b.isDefaultPrevented()){d.each(W,function(){this.hide()});
|
||||
w=true;z.unbind("change").change(function(){h.setValue(A.val(),d(this).val())});A.unbind("change").change(function(){h.setValue(d(this).val(),z.val())});I=k.find("#"+f.prev).unbind("click").click(function(){I.hasClass(f.disabled)||h.addMonth(-1);return false});J=k.find("#"+f.next).unbind("click").click(function(){J.hasClass(f.disabled)||h.addMonth();return false});h.setValue(n);var e=a.offset();if(/iPad/i.test(navigator.userAgent))e.top-=d(window).scrollTop();k.css({top:e.top+a.outerHeight({margins:true})+
|
||||
c.offset[0],left:e.left+c.offset[1]});if(c.speed)k.show(c.speed,function(){q(b)});else{k.show();q(b)}return h}}},setValue:function(b,e,g){var i=v(e)>=-1?new Date(v(b),v(e),v(g||1)):b||n;if(i<m)i=m;else if(i>p)i=p;b=i.getFullYear();e=i.getMonth();g=i.getDate();if(e==-1){e=11;b--}else if(e==12){e=0;b++}if(!w){j(i,c);return h}E=e;D=b;g=new Date(b,e,1-c.firstDay);g=g.getDay();var t=R(b,e),o=R(b,e-1),P;if(c.selectors){z.empty();d.each(s.months,function(x,F){m<new Date(b,x+1,-1)&&p>new Date(b,x,0)&&z.append(d("<option/>").html(F).attr("value",
|
||||
x))});A.empty();i=r.getFullYear();for(var l=i+c.yearRange[0];l<i+c.yearRange[1];l++)m<=new Date(l+1,-1,1)&&p>new Date(l,0,0)&&A.append(d("<option/>").text(l));z.val(e);A.val(b)}else M.html(s.months[e]+" "+b);K.empty();I.add(J).removeClass(f.disabled);l=!g?-7:0;for(var u,y;l<(!g?35:42);l++){u=d("<a/>");if(l%7===0){P=d("<div/>").addClass(f.week);K.append(P)}if(l<g){u.addClass(f.off);y=o-g+l+1;i=new Date(b,e-1,y)}else if(l>=g+t){u.addClass(f.off);y=l-t-g+1;i=new Date(b,e+1,y)}else{y=l-g+1;i=new Date(b,
|
||||
e,y);if(U(n,i))u.attr("id",f.current).addClass(f.focus);else U(r,i)&&u.attr("id",f.today)}m&&i<m&&u.add(I).addClass(f.disabled);p&&i>p&&u.add(J).addClass(f.disabled);u.attr("href","#"+y).text(y).data("date",i);P.append(u)}K.find("a").click(function(x){var F=d(this);if(!F.hasClass(f.disabled)){d("#"+f.current).removeAttr("id");F.attr("id",f.current);j(F.data("date"),c,x)}return false});f.sunday&&K.find(f.week).each(function(){var x=c.firstDay?7-c.firstDay:0;d(this).children().slice(x,x+1).addClass(f.sunday)});
|
||||
return h},setMin:function(b,e){m=C(b);e&&n<m&&h.setValue(m);return h},setMax:function(b,e){p=C(b);e&&n>p&&h.setValue(p);return h},today:function(){return h.setValue(r)},addDay:function(b){return this.setValue(D,E,G+(b||1))},addMonth:function(b){return this.setValue(D,E+(b||1),G)},addYear:function(b){return this.setValue(D+(b||1),E,G)},hide:function(b){if(w){b=d.Event();b.type="onHide";H.trigger(b);d(document).unbind("click.d").unbind("keydown.d");if(b.isDefaultPrevented())return;k.hide();w=false}return h},
|
||||
getConf:function(){return c},getInput:function(){return a},getCalendar:function(){return k},getValue:function(b){return b?T(n,b,c.lang):n},isOpen:function(){return w}});d.each(["onBeforeShow","onShow","change","onHide"],function(b,e){d.isFunction(c[e])&&d(h).bind(e,c[e]);h[e]=function(g){g&&d(h).bind(e,g);return h}});a.bind("focus click",h.show).keydown(function(b){var e=b.keyCode;if(!w&&d(V).index(e)>=0){h.show(b);return b.preventDefault()}return b.shiftKey||b.ctrlKey||b.altKey||e==9?true:b.preventDefault()});
|
||||
C(a.val())&&j(n,c)}d.tools=d.tools||{version:"1.2.5"};var W=[],Q,V=[75,76,38,39,74,72,40,37],B={};Q=d.tools.dateinput={conf:{format:"mm/dd/yy",selectors:false,yearRange:[-5,5],lang:"en",offset:[0,0],speed:0,firstDay:0,min:undefined,max:undefined,trigger:false,css:{prefix:"cal",input:"date",root:0,head:0,title:0,prev:0,next:0,month:0,year:0,days:0,body:0,weeks:0,today:0,current:0,week:0,off:0,sunday:0,focus:0,disabled:0,trigger:0}},localize:function(a,c){d.each(c,function(j,q){c[j]=q.split(",")});
|
||||
B[a]=c}};Q.localize("en",{months:"January,February,March,April,May,June,July,August,September,October,November,December",shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",shortDays:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"});var X=/d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g,Y=d("<a/>");d.expr[":"].date=function(a){var c=a.getAttribute("type");return c&&c=="date"||!!d(a).data("dateinput")};d.fn.dateinput=function(a){if(this.data("dateinput"))return this;
|
||||
a=d.extend(true,{},Q.conf,a);d.each(a.css,function(j,q){if(!q&&j!="prefix")a.css[j]=(a.css.prefix||"")+(q||j)});var c;this.each(function(){var j=new Z(d(this),a);W.push(j);j=j.getInput().data("dateinput",j);c=c?c.add(j):j});return c?c:this}})(jQuery);
|
||||
(function(e){function F(d,a){a=Math.pow(10,a);return Math.round(d*a)/a}function q(d,a){if(a=parseInt(d.css(a),10))return a;return(d=d[0].currentStyle)&&d.width&&parseInt(d.width,10)}function C(d){return(d=d.data("events"))&&d.onSlide}function G(d,a){function h(c,b,f,j){if(f===undefined)f=b/k*z;else if(j)f-=a.min;if(s)f=Math.round(f/s)*s;if(b===undefined||s)b=f*k/z;if(isNaN(f))return g;b=Math.max(0,Math.min(b,k));f=b/k*z;if(j||!n)f+=a.min;if(n)if(j)b=k-b;else f=a.max-f;f=F(f,t);var r=c.type=="click";
|
||||
if(D&&l!==undefined&&!r){c.type="onSlide";A.trigger(c,[f,b]);if(c.isDefaultPrevented())return g}j=r?a.speed:0;r=r?function(){c.type="change";A.trigger(c,[f])}:null;if(n){m.animate({top:b},j,r);a.progress&&B.animate({height:k-b+m.width()/2},j)}else{m.animate({left:b},j,r);a.progress&&B.animate({width:b+m.width()/2},j)}l=f;H=b;d.val(f);return g}function o(){if(n=a.vertical||q(i,"height")>q(i,"width")){k=q(i,"height")-q(m,"height");u=i.offset().top+k}else{k=q(i,"width")-q(m,"width");u=i.offset().left}}
|
||||
function v(){o();g.setValue(a.value!==undefined?a.value:a.min)}var g=this,p=a.css,i=e("<div><div/><a href='#'/></div>").data("rangeinput",g),n,l,u,k,H;d.before(i);var m=i.addClass(p.slider).find("a").addClass(p.handle),B=i.find("div").addClass(p.progress);e.each("min,max,step,value".split(","),function(c,b){c=d.attr(b);if(parseFloat(c))a[b]=parseFloat(c,10)});var z=a.max-a.min,s=a.step=="any"?0:a.step,t=a.precision;if(t===undefined)try{t=s.toString().split(".")[1].length}catch(I){t=0}if(d.attr("type")==
|
||||
"range"){var w=e("<input/>");e.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","),function(c,b){w.attr(b,d.attr(b))});w.val(a.value);d.replaceWith(w);d=w}d.addClass(p.input);var A=e(g).add(d),D=true;e.extend(g,{getValue:function(){return l},setValue:function(c,b){o();return h(b||e.Event("api"),undefined,c,true)},getConf:function(){return a},getProgress:function(){return B},getHandle:function(){return m},getInput:function(){return d},step:function(c,
|
||||
b){b=b||e.Event();var f=a.step=="any"?1:a.step;g.setValue(l+f*(c||1),b)},stepUp:function(c){return g.step(c||1)},stepDown:function(c){return g.step(-c||-1)}});e.each("onSlide,change".split(","),function(c,b){e.isFunction(a[b])&&e(g).bind(b,a[b]);g[b]=function(f){f&&e(g).bind(b,f);return g}});m.drag({drag:false}).bind("dragStart",function(){o();D=C(e(g))||C(d)}).bind("drag",function(c,b,f){if(d.is(":disabled"))return false;h(c,n?b:f)}).bind("dragEnd",function(c){if(!c.isDefaultPrevented()){c.type=
|
||||
"change";A.trigger(c,[l])}}).click(function(c){return c.preventDefault()});i.click(function(c){if(d.is(":disabled")||c.target==m[0])return c.preventDefault();o();var b=m.width()/2;h(c,n?k-u-b+c.pageY:c.pageX-u-b)});a.keyboard&&d.keydown(function(c){if(!d.attr("readonly")){var b=c.keyCode,f=e([75,76,38,33,39]).index(b)!=-1,j=e([74,72,40,34,37]).index(b)!=-1;if((f||j)&&!(c.shiftKey||c.altKey||c.ctrlKey)){if(f)g.step(b==33?10:1,c);else if(j)g.step(b==34?-10:-1,c);return c.preventDefault()}}});d.blur(function(c){var b=
|
||||
e(this).val();b!==l&&g.setValue(b,c)});e.extend(d[0],{stepUp:g.stepUp,stepDown:g.stepDown});v();k||e(window).load(v)}e.tools=e.tools||{version:"1.2.5"};var E;E=e.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:true,progress:false,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var x,y;e.fn.drag=function(d){document.ondragstart=function(){return false};d=e.extend({x:true,y:true,drag:true},d);x=x||e(document).bind("mousedown mouseup",
|
||||
function(a){var h=e(a.target);if(a.type=="mousedown"&&h.data("drag")){var o=h.position(),v=a.pageX-o.left,g=a.pageY-o.top,p=true;x.bind("mousemove.drag",function(i){var n=i.pageX-v;i=i.pageY-g;var l={};if(d.x)l.left=n;if(d.y)l.top=i;if(p){h.trigger("dragStart");p=false}d.drag&&h.css(l);h.trigger("drag",[i,n]);y=h});a.preventDefault()}else try{y&&y.trigger("dragEnd")}finally{x.unbind("mousemove.drag");y=null}});return this.data("drag",true)};e.expr[":"].range=function(d){var a=d.getAttribute("type");
|
||||
return a&&a=="range"||!!e(d).filter("input").data("rangeinput")};e.fn.rangeinput=function(d){if(this.data("rangeinput"))return this;d=e.extend(true,{},E.conf,d);var a;this.each(function(){var h=new G(e(this),e.extend(true,{},d));h=h.getInput().data("rangeinput",h);a=a?a.add(h):h});return a?a:this}})(jQuery);
|
||||
(function(e){function t(a,b,c){var k=a.offset().top,f=a.offset().left,l=c.position.split(/,?\s+/),p=l[0];l=l[1];k-=b.outerHeight()-c.offset[0];f+=a.outerWidth()+c.offset[1];if(/iPad/i.test(navigator.userAgent))k-=e(window).scrollTop();c=b.outerHeight()+a.outerHeight();if(p=="center")k+=c/2;if(p=="bottom")k+=c;a=a.outerWidth();if(l=="center")f-=(a+b.outerWidth())/2;if(l=="left")f-=a;return{top:k,left:f}}function y(a){function b(){return this.getAttribute("type")==a}b.key="[type="+a+"]";return b}function u(a,
|
||||
b,c){function k(g,d,i){if(!(!c.grouped&&g.length)){var j;if(i===false||e.isArray(i)){j=h.messages[d.key||d]||h.messages["*"];j=j[c.lang]||h.messages["*"].en;(d=j.match(/\$\d/g))&&e.isArray(i)&&e.each(d,function(m){j=j.replace(this,i[m])})}else j=i[c.lang]||i;g.push(j)}}var f=this,l=b.add(f);a=a.not(":button, :image, :reset, :submit");e.extend(f,{getConf:function(){return c},getForm:function(){return b},getInputs:function(){return a},reflow:function(){a.each(function(){var g=e(this),d=g.data("msg.el");
|
||||
if(d){g=t(g,d,c);d.css({top:g.top,left:g.left})}});return f},invalidate:function(g,d){if(!d){var i=[];e.each(g,function(j,m){j=a.filter("[name='"+j+"']");if(j.length){j.trigger("OI",[m]);i.push({input:j,messages:[m]})}});g=i;d=e.Event()}d.type="onFail";l.trigger(d,[g]);d.isDefaultPrevented()||q[c.effect][0].call(f,g,d);return f},reset:function(g){g=g||a;g.removeClass(c.errorClass).each(function(){var d=e(this).data("msg.el");if(d){d.remove();e(this).data("msg.el",null)}}).unbind(c.errorInputEvent||
|
||||
"");return f},destroy:function(){b.unbind(c.formEvent+".V").unbind("reset.V");a.unbind(c.inputEvent+".V").unbind("change.V");return f.reset()},checkValidity:function(g,d){g=g||a;g=g.not(":disabled");if(!g.length)return true;d=d||e.Event();d.type="onBeforeValidate";l.trigger(d,[g]);if(d.isDefaultPrevented())return d.result;var i=[];g.not(":radio:not(:checked)").each(function(){var m=[],n=e(this).data("messages",m),v=r&&n.is(":date")?"onHide.v":c.errorInputEvent+".v";n.unbind(v);e.each(w,function(){var o=
|
||||
this,s=o[0];if(n.filter(s).length){o=o[1].call(f,n,n.val());if(o!==true){d.type="onBeforeFail";l.trigger(d,[n,s]);if(d.isDefaultPrevented())return false;var x=n.attr(c.messageAttr);if(x){m=[x];return false}else k(m,s,o)}}});if(m.length){i.push({input:n,messages:m});n.trigger("OI",[m]);c.errorInputEvent&&n.bind(v,function(o){f.checkValidity(n,o)})}if(c.singleError&&i.length)return false});var j=q[c.effect];if(!j)throw'Validator: cannot find effect "'+c.effect+'"';if(i.length){f.invalidate(i,d);return false}else{j[1].call(f,
|
||||
g,d);d.type="onSuccess";l.trigger(d,[g]);g.unbind(c.errorInputEvent+".v")}return true}});e.each("onBeforeValidate,onBeforeFail,onFail,onSuccess".split(","),function(g,d){e.isFunction(c[d])&&e(f).bind(d,c[d]);f[d]=function(i){i&&e(f).bind(d,i);return f}});c.formEvent&&b.bind(c.formEvent+".V",function(g){if(!f.checkValidity(null,g))return g.preventDefault()});b.bind("reset.V",function(){f.reset()});a[0]&&a[0].validity&&a.each(function(){this.oninvalid=function(){return false}});if(b[0])b[0].checkValidity=
|
||||
f.checkValidity;c.inputEvent&&a.bind(c.inputEvent+".V",function(g){f.checkValidity(e(this),g)});a.filter(":checkbox, select").filter("[required]").bind("change.V",function(g){var d=e(this);if(this.checked||d.is("select")&&e(this).val())q[c.effect][1].call(f,d,g)});var p=a.filter(":radio").change(function(g){f.checkValidity(p,g)});e(window).resize(function(){f.reflow()})}e.tools=e.tools||{version:"1.2.5"};var z=/\[type=([a-z]+)\]/,A=/^-?[0-9]*(\.[0-9]+)?$/,r=e.tools.dateinput,B=/^([a-z0-9_\.\-\+]+)@([\da-z\.\-]+)\.([a-z\.]{2,6})$/i,
|
||||
C=/^(https?:\/\/)?[\da-z\.\-]+\.[a-z\.]{2,6}[#&+_\?\/\w \.\-=]*$/i,h;h=e.tools.validator={conf:{grouped:false,effect:"default",errorClass:"invalid",inputEvent:null,errorInputEvent:"keyup",formEvent:"submit",lang:"en",message:"<div/>",messageAttr:"data-message",messageClass:"error",offset:[0,0],position:"center right",singleError:false,speed:"normal"},messages:{"*":{en:"Please correct this value"}},localize:function(a,b){e.each(b,function(c,k){h.messages[c]=h.messages[c]||{};h.messages[c][a]=k})},
|
||||
localizeFn:function(a,b){h.messages[a]=h.messages[a]||{};e.extend(h.messages[a],b)},fn:function(a,b,c){if(e.isFunction(b))c=b;else{if(typeof b=="string")b={en:b};this.messages[a.key||a]=b}if(b=z.exec(a))a=y(b[1]);w.push([a,c])},addEffect:function(a,b,c){q[a]=[b,c]}};var w=[],q={"default":[function(a){var b=this.getConf();e.each(a,function(c,k){c=k.input;c.addClass(b.errorClass);var f=c.data("msg.el");if(!f){f=e(b.message).addClass(b.messageClass).appendTo(document.body);c.data("msg.el",f)}f.css({visibility:"hidden"}).find("p").remove();
|
||||
e.each(k.messages,function(l,p){e("<p/>").html(p).appendTo(f)});f.outerWidth()==f.parent().width()&&f.add(f.find("p")).css({display:"inline"});k=t(c,f,b);f.css({visibility:"visible",position:"absolute",top:k.top,left:k.left}).fadeIn(b.speed)})},function(a){var b=this.getConf();a.removeClass(b.errorClass).each(function(){var c=e(this).data("msg.el");c&&c.css({visibility:"hidden"})})}]};e.each("email,url,number".split(","),function(a,b){e.expr[":"][b]=function(c){return c.getAttribute("type")===b}});
|
||||
e.fn.oninvalid=function(a){return this[a?"bind":"trigger"]("OI",a)};h.fn(":email","Please enter a valid email address",function(a,b){return!b||B.test(b)});h.fn(":url","Please enter a valid URL",function(a,b){return!b||C.test(b)});h.fn(":number","Please enter a numeric value.",function(a,b){return A.test(b)});h.fn("[max]","Please enter a value smaller than $1",function(a,b){if(b===""||r&&a.is(":date"))return true;a=a.attr("max");return parseFloat(b)<=parseFloat(a)?true:[a]});h.fn("[min]","Please enter a value larger than $1",
|
||||
function(a,b){if(b===""||r&&a.is(":date"))return true;a=a.attr("min");return parseFloat(b)>=parseFloat(a)?true:[a]});h.fn("[required]","Please complete this mandatory field.",function(a,b){if(a.is(":checkbox"))return a.is(":checked");return!!b});h.fn("[pattern]",function(a){var b=new RegExp("^"+a.attr("pattern")+"$");return b.test(a.val())});e.fn.validator=function(a){var b=this.data("validator");if(b){b.destroy();this.removeData("validator")}a=e.extend(true,{},h.conf,a);if(this.is("form"))return this.each(function(){var c=
|
||||
e(this);b=new u(c.find(":input"),c,a);c.data("validator",b)});else{b=new u(this,this.eq(0).closest("form"),a);return this.data("validator",b)}}})(jQuery);
|
||||
@ -1,463 +0,0 @@
|
||||
/*
|
||||
* --------------------------------------------------------------------
|
||||
* jQuery inputToButton plugin
|
||||
* Author: Scott Jehl, scott@filamentgroup.com
|
||||
* Copyright (c) 2009 Filament Group
|
||||
* licensed under MIT (filamentgroup.com/examples/mit-license.txt)
|
||||
* --------------------------------------------------------------------
|
||||
*/
|
||||
(function($) {
|
||||
$.fn.visualize = function(options, container){
|
||||
return $(this).each(function(){
|
||||
//configuration
|
||||
var o = $.extend({
|
||||
type: 'bar', //also available: area, pie, line
|
||||
width: $(this).width(), //height of canvas - defaults to table height
|
||||
height: $(this).height(), //height of canvas - defaults to table height
|
||||
appendTitle: true, //table caption text is added to chart
|
||||
title: null, //grabs from table caption if null
|
||||
appendKey: true, //color key is added to chart
|
||||
rowFilter: ' ',
|
||||
colFilter: ' ',
|
||||
colors: ['#be1e2d','#666699','#92d5ea','#ee8310','#8d10ee','#5a3b16','#26a4ed','#f45a90','#e9e744'],
|
||||
textColors: [], //corresponds with colors array. null/undefined items will fall back to CSS
|
||||
parseDirection: 'x', //which direction to parse the table data
|
||||
pieMargin: 20, //pie charts only - spacing around pie
|
||||
pieLabelsAsPercent: true,
|
||||
pieLabelPos: 'inside',
|
||||
lineWeight: 4, //for line and area - stroke weight
|
||||
barGroupMargin: 10,
|
||||
barMargin: 1, //space around bars in bar chart (added to both sides of bar)
|
||||
yLabelInterval: 30 //distance between y labels
|
||||
},options);
|
||||
|
||||
//reset width, height to numbers
|
||||
o.width = parseFloat(o.width);
|
||||
o.height = parseFloat(o.height);
|
||||
|
||||
|
||||
var self = $(this);
|
||||
|
||||
//function to scrape data from html table
|
||||
function scrapeTable(){
|
||||
var colors = o.colors;
|
||||
var textColors = o.textColors;
|
||||
var tableData = {
|
||||
dataGroups: function(){
|
||||
var dataGroups = [];
|
||||
if(o.parseDirection == 'x'){
|
||||
self.find('tr:gt(0)').filter(o.rowFilter).each(function(i){
|
||||
dataGroups[i] = {};
|
||||
dataGroups[i].points = [];
|
||||
dataGroups[i].color = colors[i];
|
||||
if(textColors[i]){ dataGroups[i].textColor = textColors[i]; }
|
||||
$(this).find('td').filter(o.colFilter).each(function(){
|
||||
dataGroups[i].points.push( parseFloat($(this).text()) );
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
var cols = self.find('tr:eq(1) td').filter(o.colFilter).size();
|
||||
for(var i=0; i<cols; i++){
|
||||
dataGroups[i] = {};
|
||||
dataGroups[i].points = [];
|
||||
dataGroups[i].color = colors[i];
|
||||
if(textColors[i]){ dataGroups[i].textColor = textColors[i]; }
|
||||
self.find('tr:gt(0)').filter(o.rowFilter).each(function(){
|
||||
dataGroups[i].points.push( $(this).find('td').filter(o.colFilter).eq(i).text()*1 );
|
||||
});
|
||||
};
|
||||
}
|
||||
return dataGroups;
|
||||
},
|
||||
allData: function(){
|
||||
var allData = [];
|
||||
$(this.dataGroups()).each(function(){
|
||||
allData.push(this.points);
|
||||
});
|
||||
return allData;
|
||||
},
|
||||
dataSum: function(){
|
||||
var dataSum = 0;
|
||||
var allData = this.allData().join(',').split(',');
|
||||
$(allData).each(function(){
|
||||
dataSum += parseFloat(this);
|
||||
});
|
||||
return dataSum
|
||||
},
|
||||
topValue: function(){
|
||||
var topValue = 0;
|
||||
var allData = this.allData().join(',').split(',');
|
||||
$(allData).each(function(){
|
||||
if(parseFloat(this,10)>topValue) topValue = parseFloat(this);
|
||||
});
|
||||
return topValue;
|
||||
},
|
||||
bottomValue: function(){
|
||||
var bottomValue = 0;
|
||||
var allData = this.allData().join(',').split(',');
|
||||
$(allData).each(function(){
|
||||
if(this<bottomValue) bottomValue = parseFloat(this);
|
||||
});
|
||||
return bottomValue;
|
||||
},
|
||||
memberTotals: function(){
|
||||
var memberTotals = [];
|
||||
var dataGroups = this.dataGroups();
|
||||
$(dataGroups).each(function(l){
|
||||
var count = 0;
|
||||
$(dataGroups[l].points).each(function(m){
|
||||
count +=dataGroups[l].points[m];
|
||||
});
|
||||
memberTotals.push(count);
|
||||
});
|
||||
return memberTotals;
|
||||
},
|
||||
yTotals: function(){
|
||||
var yTotals = [];
|
||||
var dataGroups = this.dataGroups();
|
||||
var loopLength = this.xLabels().length;
|
||||
for(var i = 0; i<loopLength; i++){
|
||||
yTotals[i] =[];
|
||||
var thisTotal = 0;
|
||||
$(dataGroups).each(function(l){
|
||||
yTotals[i].push(this.points[i]);
|
||||
});
|
||||
yTotals[i].join(',').split(',');
|
||||
$(yTotals[i]).each(function(){
|
||||
thisTotal += parseFloat(this);
|
||||
});
|
||||
yTotals[i] = thisTotal;
|
||||
|
||||
}
|
||||
return yTotals;
|
||||
},
|
||||
topYtotal: function(){
|
||||
var topYtotal = 0;
|
||||
var yTotals = this.yTotals().join(',').split(',');
|
||||
$(yTotals).each(function(){
|
||||
if(parseFloat(this,10)>topYtotal) topYtotal = parseFloat(this);
|
||||
});
|
||||
return topYtotal;
|
||||
},
|
||||
totalYRange: function(){
|
||||
return this.topValue() - this.bottomValue();
|
||||
},
|
||||
xLabels: function(){
|
||||
var xLabels = [];
|
||||
if(o.parseDirection == 'x'){
|
||||
self.find('tr:eq(0) th').filter(o.colFilter).each(function(){
|
||||
xLabels.push($(this).html());
|
||||
});
|
||||
}
|
||||
else {
|
||||
self.find('tr:gt(0) th').filter(o.rowFilter).each(function(){
|
||||
xLabels.push($(this).html());
|
||||
});
|
||||
}
|
||||
return xLabels;
|
||||
},
|
||||
yLabels: function(){
|
||||
var yLabels = [];
|
||||
yLabels.push(bottomValue);
|
||||
var numLabels = Math.round(o.height / o.yLabelInterval);
|
||||
var loopInterval = Math.ceil(totalYRange / numLabels) || 1;
|
||||
while( yLabels[yLabels.length-1] < topValue - loopInterval){
|
||||
yLabels.push(yLabels[yLabels.length-1] + loopInterval);
|
||||
}
|
||||
yLabels.push(topValue);
|
||||
return yLabels;
|
||||
}
|
||||
};
|
||||
|
||||
return tableData;
|
||||
};
|
||||
|
||||
|
||||
//function to create a chart
|
||||
var createChart = {
|
||||
pie: function(){
|
||||
|
||||
canvasContain.addClass('visualize-pie');
|
||||
|
||||
if(o.pieLabelPos == 'outside'){ canvasContain.addClass('visualize-pie-outside'); }
|
||||
|
||||
var centerx = Math.round(canvas.width()/2);
|
||||
var centery = Math.round(canvas.height()/2);
|
||||
var radius = centery - o.pieMargin;
|
||||
var counter = 0.0;
|
||||
var toRad = function(integer){ return (Math.PI/180)*integer; };
|
||||
var labels = $('<ul class="visualize-labels"></ul>')
|
||||
.insertAfter(canvas);
|
||||
|
||||
//draw the pie pieces
|
||||
$.each(memberTotals, function(i){
|
||||
var fraction = (this <= 0 || isNaN(this))? 0 : this / dataSum;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(centerx, centery);
|
||||
ctx.arc(centerx, centery, radius,
|
||||
counter * Math.PI * 2 - Math.PI * 0.5,
|
||||
(counter + fraction) * Math.PI * 2 - Math.PI * 0.5,
|
||||
false);
|
||||
ctx.lineTo(centerx, centery);
|
||||
ctx.closePath();
|
||||
ctx.fillStyle = dataGroups[i].color;
|
||||
ctx.fill();
|
||||
// draw labels
|
||||
var sliceMiddle = (counter + fraction/2);
|
||||
var distance = o.pieLabelPos == 'inside' ? radius/1.5 : radius + radius / 5;
|
||||
var labelx = Math.round(centerx + Math.sin(sliceMiddle * Math.PI * 2) * (distance));
|
||||
var labely = Math.round(centery - Math.cos(sliceMiddle * Math.PI * 2) * (distance));
|
||||
var leftRight = (labelx > centerx) ? 'right' : 'left';
|
||||
var topBottom = (labely > centery) ? 'bottom' : 'top';
|
||||
var percentage = parseFloat((fraction*100).toFixed(2));
|
||||
|
||||
if(percentage){
|
||||
var labelval = (o.pieLabelsAsPercent) ? percentage + '%' : this;
|
||||
var labeltext = $('<span class="visualize-label">' + labelval +'</span>')
|
||||
.css(leftRight, 0)
|
||||
.css(topBottom, 0);
|
||||
if(labeltext)
|
||||
var label = $('<li class="visualize-label-pos"></li>')
|
||||
.appendTo(labels)
|
||||
.css({left: labelx, top: labely})
|
||||
.append(labeltext);
|
||||
labeltext
|
||||
.css('font-size', radius / 8)
|
||||
.css('margin-'+leftRight, -labeltext.width()/2)
|
||||
.css('margin-'+topBottom, -labeltext.outerHeight()/2);
|
||||
|
||||
if(dataGroups[i].textColor){ labeltext.css('color', dataGroups[i].textColor); }
|
||||
}
|
||||
counter+=fraction;
|
||||
});
|
||||
},
|
||||
|
||||
line: function(area){
|
||||
|
||||
if(area){ canvasContain.addClass('visualize-area'); }
|
||||
else{ canvasContain.addClass('visualize-line'); }
|
||||
|
||||
//write X labels
|
||||
var xInterval = canvas.width() / (xLabels.length -1);
|
||||
var xlabelsUL = $('<ul class="visualize-labels-x"></ul>')
|
||||
.width(canvas.width())
|
||||
.height(canvas.height())
|
||||
.insertBefore(canvas);
|
||||
$.each(xLabels, function(i){
|
||||
var thisLi = $('<li><span>'+this+'</span></li>')
|
||||
.prepend('<span class="line" />')
|
||||
.css('left', xInterval * i)
|
||||
.appendTo(xlabelsUL);
|
||||
var label = thisLi.find('span:not(.line)');
|
||||
var leftOffset = label.width()/-2;
|
||||
if(i == 0){ leftOffset = 0; }
|
||||
else if(i== xLabels.length-1){ leftOffset = -label.width(); }
|
||||
label
|
||||
.css('margin-left', leftOffset)
|
||||
.addClass('label');
|
||||
});
|
||||
|
||||
//write Y labels
|
||||
var yScale = canvas.height() / totalYRange;
|
||||
var liBottom = canvas.height() / (yLabels.length-1);
|
||||
var ylabelsUL = $('<ul class="visualize-labels-y"></ul>')
|
||||
.width(canvas.width())
|
||||
.height(canvas.height())
|
||||
.insertBefore(canvas);
|
||||
|
||||
$.each(yLabels, function(i){
|
||||
var thisLi = $('<li><span>'+this+'</span></li>')
|
||||
.prepend('<span class="line" />')
|
||||
.css('bottom',liBottom*i)
|
||||
.prependTo(ylabelsUL);
|
||||
var label = thisLi.find('span:not(.line)');
|
||||
var topOffset = label.height()/-2;
|
||||
if(i == 0){ topOffset = -label.height(); }
|
||||
else if(i== yLabels.length-1){ topOffset = 0; }
|
||||
label
|
||||
.css('margin-top', topOffset)
|
||||
.addClass('label');
|
||||
});
|
||||
|
||||
//start from the bottom left
|
||||
ctx.translate(0,zeroLoc);
|
||||
//iterate and draw
|
||||
$.each(dataGroups,function(h){
|
||||
ctx.beginPath();
|
||||
ctx.lineWidth = o.lineWeight;
|
||||
ctx.lineJoin = 'round';
|
||||
var points = this.points;
|
||||
var integer = 0;
|
||||
ctx.moveTo(0,-(points[0]*yScale));
|
||||
$.each(points, function(){
|
||||
ctx.lineTo(integer,-(this*yScale));
|
||||
integer+=xInterval;
|
||||
});
|
||||
ctx.strokeStyle = this.color;
|
||||
ctx.stroke();
|
||||
if(area){
|
||||
ctx.lineTo(integer,0);
|
||||
ctx.lineTo(0,0);
|
||||
ctx.closePath();
|
||||
ctx.fillStyle = this.color;
|
||||
ctx.globalAlpha = .3;
|
||||
ctx.fill();
|
||||
ctx.globalAlpha = 1.0;
|
||||
}
|
||||
else {ctx.closePath();}
|
||||
});
|
||||
},
|
||||
|
||||
area: function(){
|
||||
createChart.line(true);
|
||||
},
|
||||
|
||||
bar: function(){
|
||||
|
||||
canvasContain.addClass('visualize-bar');
|
||||
|
||||
//write X labels
|
||||
var xInterval = canvas.width() / (xLabels.length);
|
||||
var xlabelsUL = $('<ul class="visualize-labels-x"></ul>')
|
||||
.width(canvas.width())
|
||||
.height(canvas.height())
|
||||
.insertBefore(canvas);
|
||||
$.each(xLabels, function(i){
|
||||
var thisLi = $('<li><span class="label">'+this+'</span></li>')
|
||||
.prepend('<span class="line" />')
|
||||
.css('left', xInterval * i)
|
||||
.width(xInterval)
|
||||
.appendTo(xlabelsUL);
|
||||
var label = thisLi.find('span.label');
|
||||
label.addClass('label');
|
||||
});
|
||||
|
||||
//write Y labels
|
||||
var yScale = canvas.height() / totalYRange;
|
||||
var liBottom = canvas.height() / (yLabels.length-1);
|
||||
var ylabelsUL = $('<ul class="visualize-labels-y"></ul>')
|
||||
.width(canvas.width())
|
||||
.height(canvas.height())
|
||||
.insertBefore(canvas);
|
||||
$.each(yLabels, function(i){
|
||||
var thisLi = $('<li><span>'+this+'</span></li>')
|
||||
.prepend('<span class="line" />')
|
||||
.css('bottom',liBottom*i)
|
||||
.prependTo(ylabelsUL);
|
||||
var label = thisLi.find('span:not(.line)');
|
||||
var topOffset = label.height()/-2;
|
||||
if(i == 0){ topOffset = -label.height(); }
|
||||
else if(i== yLabels.length-1){ topOffset = 0; }
|
||||
label
|
||||
.css('margin-top', topOffset)
|
||||
.addClass('label');
|
||||
});
|
||||
|
||||
//start from the bottom left
|
||||
ctx.translate(0,zeroLoc);
|
||||
//iterate and draw
|
||||
for(var h=0; h<dataGroups.length; h++){
|
||||
ctx.beginPath();
|
||||
var linewidth = (xInterval-o.barGroupMargin*2) / dataGroups.length; //removed +1
|
||||
var strokeWidth = linewidth - (o.barMargin*2);
|
||||
ctx.lineWidth = strokeWidth;
|
||||
var points = dataGroups[h].points;
|
||||
var integer = 0;
|
||||
for(var i=0; i<points.length; i++){
|
||||
var xVal = (integer-o.barGroupMargin)+(h*linewidth)+linewidth/2;
|
||||
xVal += o.barGroupMargin*2;
|
||||
|
||||
ctx.moveTo(xVal, 0);
|
||||
ctx.lineTo(xVal, Math.round(-points[i]*yScale));
|
||||
integer+=xInterval;
|
||||
}
|
||||
ctx.strokeStyle = dataGroups[h].color;
|
||||
ctx.stroke();
|
||||
ctx.closePath();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//create new canvas, set w&h attrs (not inline styles)
|
||||
var canvasNode = document.createElement("canvas");
|
||||
canvasNode.setAttribute('height',o.height);
|
||||
canvasNode.setAttribute('width',o.width);
|
||||
var canvas = $(canvasNode);
|
||||
|
||||
//get title for chart
|
||||
var title = o.title || self.find('caption').text();
|
||||
|
||||
//create canvas wrapper div, set inline w&h, append
|
||||
var canvasContain = (container || $('<div class="visualize" role="img" aria-label="Chart representing data from the table: '+ title +'" />'))
|
||||
.height(o.height)
|
||||
.width(o.width)
|
||||
.append(canvas);
|
||||
|
||||
//scrape table (this should be cleaned up into an obj)
|
||||
var tableData = scrapeTable();
|
||||
var dataGroups = tableData.dataGroups();
|
||||
var allData = tableData.allData();
|
||||
var dataSum = tableData.dataSum();
|
||||
var topValue = tableData.topValue();
|
||||
var bottomValue = tableData.bottomValue();
|
||||
var memberTotals = tableData.memberTotals();
|
||||
var totalYRange = tableData.totalYRange();
|
||||
var zeroLoc = o.height * (topValue/totalYRange);
|
||||
var xLabels = tableData.xLabels();
|
||||
var yLabels = tableData.yLabels();
|
||||
|
||||
//title/key container
|
||||
if(o.appendTitle || o.appendKey){
|
||||
var infoContain = $('<div class="visualize-info"></div>')
|
||||
.appendTo(canvasContain);
|
||||
}
|
||||
|
||||
//append title
|
||||
if(o.appendTitle){
|
||||
$('<div class="visualize-title">'+ title +'</div>').appendTo(infoContain);
|
||||
}
|
||||
|
||||
|
||||
//append key
|
||||
if(o.appendKey){
|
||||
var newKey = $('<ul class="visualize-key"></ul>');
|
||||
var selector;
|
||||
if(o.parseDirection == 'x'){
|
||||
selector = self.find('tr:gt(0) th').filter(o.rowFilter);
|
||||
}
|
||||
else{
|
||||
selector = self.find('tr:eq(0) th').filter(o.colFilter);
|
||||
}
|
||||
|
||||
selector.each(function(i){
|
||||
$('<li><span class="visualize-key-color" style="background: '+dataGroups[i].color+'"></span><span class="visualize-key-label">'+ $(this).text() +'</span></li>')
|
||||
.appendTo(newKey);
|
||||
});
|
||||
newKey.appendTo(infoContain);
|
||||
};
|
||||
|
||||
//append new canvas to page
|
||||
|
||||
if(!container){canvasContain.insertAfter(this); }
|
||||
if( typeof(G_vmlCanvasManager) != 'undefined' ){ G_vmlCanvasManager.init(); G_vmlCanvasManager.initElement(canvas[0]); }
|
||||
|
||||
//set up the drawing board
|
||||
var ctx = canvas[0].getContext('2d');
|
||||
|
||||
//create chart
|
||||
createChart[o.type]();
|
||||
|
||||
//clean up some doubled lines that sit on top of canvas borders (done via JS due to IE)
|
||||
$('.visualize-line li:first-child span.line, .visualize-line li:last-child span.line, .visualize-area li:first-child span.line, .visualize-area li:last-child span.line, .visualize-bar li:first-child span.line,.visualize-bar .visualize-labels-y li:last-child span.line').css('border','none');
|
||||
if(!container){
|
||||
//add event for updating
|
||||
canvasContain.bind('visualizeRefresh', function(){
|
||||
self.visualize(o, $(this).empty());
|
||||
});
|
||||
}
|
||||
}).next(); //returns canvas(es)
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
|
||||
@ -1,806 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------
|
||||
* jQuery-Plugin "visualize"
|
||||
* by Scott Jehl, scott@filamentgroup.com
|
||||
* http://www.filamentgroup.com
|
||||
* Copyright (c) 2009 Filament Group
|
||||
* Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
|
||||
*
|
||||
* --------------------------------------------------------------------
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.visualize = function (options, container) {
|
||||
return $(this).each(function () {
|
||||
//configuration
|
||||
var o = $.extend({
|
||||
type: 'bar',
|
||||
//also available: area, pie, line
|
||||
width: $(this).width(),
|
||||
//height of canvas - defaults to table height
|
||||
height: $(this).height(),
|
||||
//height of canvas - defaults to table height
|
||||
appendTitle: true,
|
||||
//table caption text is added to chart
|
||||
title: null,
|
||||
//grabs from table caption if null
|
||||
appendKey: true,
|
||||
//color key is added to chart
|
||||
colors: ['#be1e2d', '#666699', '#92d5ea', '#ee8310', '#8d10ee', '#5a3b16', '#26a4ed', '#f45a90', '#e9e744'],
|
||||
textColors: [],
|
||||
//corresponds with colors array. null/undefined items will fall back to CSS
|
||||
parseDirection: 'x',
|
||||
//which direction to parse the table data
|
||||
pieMargin: 10,
|
||||
//pie charts only - spacing around pie
|
||||
pieLabelsAsPercent: true,
|
||||
pieLabelPos: 'inside',
|
||||
lineWeight: 4,
|
||||
//for line and area - stroke weight
|
||||
lineDots: false,
|
||||
//also available: 'single', 'double'
|
||||
dotInnerColor: "#ffffff",
|
||||
// only used for lineDots:'double'
|
||||
lineMargin: (options.lineDots ? 15 : 0),
|
||||
//for line and area - spacing around lines
|
||||
barGroupMargin: 10,
|
||||
chartId: '',
|
||||
xLabelParser: null,
|
||||
// function to parse labels as values
|
||||
valueParser: null,
|
||||
// function to parse values. must return a Number
|
||||
chartId: '',
|
||||
chartClass: '',
|
||||
barMargin: 1,
|
||||
//space around bars in bar chart (added to both sides of bar)
|
||||
yLabelInterval: 30,
|
||||
//distance between y labels
|
||||
interaction: false // only used for lineDots != false -- triggers mouseover and mouseout on original table
|
||||
}, options);
|
||||
|
||||
//reset width, height to numbers
|
||||
o.width = parseFloat(o.width);
|
||||
o.height = parseFloat(o.height);
|
||||
|
||||
// reset padding if graph is not lines
|
||||
if (o.type != 'line' && o.type != 'area') {
|
||||
o.lineMargin = 0;
|
||||
}
|
||||
|
||||
var self = $(this);
|
||||
|
||||
// scrape data from html table
|
||||
var tableData = {};
|
||||
var colors = o.colors;
|
||||
var textColors = o.textColors;
|
||||
|
||||
|
||||
var parseLabels = function (direction) {
|
||||
var labels = [];
|
||||
if (direction == 'x') {
|
||||
self.find('thead tr').each(function (i) {
|
||||
$(this).find('th').each(function (j) {
|
||||
if (!labels[j]) {
|
||||
labels[j] = [];
|
||||
}
|
||||
labels[j][i] = $(this).text()
|
||||
})
|
||||
});
|
||||
} else {
|
||||
self.find('tbody tr').each(function (i) {
|
||||
$(this).find('th').each(function (j) {
|
||||
if (!labels[i]) {
|
||||
labels[i] = [];
|
||||
}
|
||||
labels[i][j] = $(this).text()
|
||||
});
|
||||
});
|
||||
}
|
||||
return labels;
|
||||
};
|
||||
|
||||
var fnParse = o.valueParser || parseFloat;
|
||||
var dataGroups = tableData.dataGroups = [];
|
||||
if (o.parseDirection == 'x') {
|
||||
self.find('tbody tr').each(function (i, tr) {
|
||||
dataGroups[i] = {};
|
||||
dataGroups[i].points = [];
|
||||
dataGroups[i].color = colors[i];
|
||||
if (textColors[i]) {
|
||||
dataGroups[i].textColor = textColors[i];
|
||||
}
|
||||
$(tr).find('td').each(function (j, td) {
|
||||
dataGroups[i].points.push({
|
||||
value: fnParse($(td).text()),
|
||||
elem: td,
|
||||
tableCords: [i, j]
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
var cols = self.find('tbody tr:eq(0) td').size();
|
||||
for (var i = 0; i < cols; i++) {
|
||||
dataGroups[i] = {};
|
||||
dataGroups[i].points = [];
|
||||
dataGroups[i].color = colors[i];
|
||||
if (textColors[i]) {
|
||||
dataGroups[i].textColor = textColors[i];
|
||||
}
|
||||
self.find('tbody tr').each(function (j) {
|
||||
dataGroups[i].points.push({
|
||||
value: $(this).find('td').eq(i).text() * 1,
|
||||
elem: this,
|
||||
tableCords: [i, j]
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
var allItems = tableData.allItems = [];
|
||||
$(dataGroups).each(function (i, row) {
|
||||
var count = 0;
|
||||
$.each(row.points, function (j, point) {
|
||||
allItems.push(point);
|
||||
count += point.value;
|
||||
});
|
||||
row.groupTotal = count;
|
||||
});
|
||||
|
||||
tableData.dataSum = 0;
|
||||
tableData.topValue = 0;
|
||||
tableData.bottomValue = Infinity;
|
||||
$.each(allItems, function (i, item) {
|
||||
tableData.dataSum += fnParse(item.value);
|
||||
if (fnParse(item.value, 10) > tableData.topValue) {
|
||||
tableData.topValue = fnParse(item.value, 10);
|
||||
}
|
||||
if (item.value < tableData.bottomValue) {
|
||||
tableData.bottomValue = fnParse(item.value);
|
||||
}
|
||||
});
|
||||
var dataSum = tableData.dataSum;
|
||||
var topValue = tableData.topValue;
|
||||
var bottomValue = tableData.bottomValue;
|
||||
|
||||
var xAllLabels = tableData.xAllLabels = parseLabels(o.parseDirection);
|
||||
var yAllLabels = tableData.yAllLabels = parseLabels(o.parseDirection === 'x' ? 'y' : 'x');
|
||||
|
||||
var xLabels = tableData.xLabels = [];
|
||||
$.each(tableData.xAllLabels, function (i, labels) {
|
||||
tableData.xLabels.push(labels[0]);
|
||||
});
|
||||
|
||||
var totalYRange = tableData.totalYRange = tableData.topValue - tableData.bottomValue;
|
||||
|
||||
var zeroLocX = tableData.zeroLocX = 0;
|
||||
|
||||
if ($.isFunction(o.xLabelParser)) {
|
||||
|
||||
var xTopValue = null;
|
||||
var xBottomValue = null;
|
||||
|
||||
$.each(xLabels, function (i, label) {
|
||||
label = xLabels[i] = o.xLabelParser(label);
|
||||
if (i === 0) {
|
||||
xTopValue = label;
|
||||
xBottomValue = label;
|
||||
}
|
||||
if (label > xTopValue) {
|
||||
xTopValue = label;
|
||||
}
|
||||
if (label < xBottomValue) {
|
||||
xBottomValue = label;
|
||||
}
|
||||
});
|
||||
|
||||
var totalXRange = tableData.totalXRange = xTopValue - xBottomValue;
|
||||
|
||||
|
||||
var xScale = tableData.xScale = (o.width - 2 * o.lineMargin) / totalXRange;
|
||||
var marginDiffX = 0;
|
||||
if (o.lineMargin) {
|
||||
var marginDiffX = -2 * xScale - o.lineMargin;
|
||||
}
|
||||
zeroLocX = tableData.zeroLocX = xBottomValue + o.lineMargin;
|
||||
|
||||
tableData.xBottomValue = xBottomValue;
|
||||
tableData.xTopValue = xTopValue;
|
||||
tableData.totalXRange = totalXRange;
|
||||
}
|
||||
|
||||
var yScale = tableData.yScale = (o.height - 2 * o.lineMargin) / totalYRange;
|
||||
var zeroLocY = tableData.zeroLocY = (o.height - 2 * o.lineMargin) * (tableData.topValue / tableData.totalYRange) + o.lineMargin;
|
||||
|
||||
var yLabels = tableData.yLabels = [];
|
||||
|
||||
var numLabels = Math.floor((o.height - 2 * o.lineMargin) / 30);
|
||||
|
||||
var loopInterval = tableData.totalYRange / numLabels; //fix provided from lab
|
||||
loopInterval = Math.round(parseFloat(loopInterval) / 5) * 5;
|
||||
loopInterval = Math.max(loopInterval, 1);
|
||||
|
||||
// var start =
|
||||
for (var j = Math.round(parseInt(tableData.bottomValue) / 5) * 5; j <= tableData.topValue - loopInterval; j += loopInterval) {
|
||||
yLabels.push(j);
|
||||
}
|
||||
if (yLabels[yLabels.length - 1] > tableData.topValue + loopInterval) {
|
||||
yLabels.pop();
|
||||
} else if (yLabels[yLabels.length - 1] <= tableData.topValue - 10) {
|
||||
yLabels.push(tableData.topValue);
|
||||
}
|
||||
|
||||
// populate some data
|
||||
$.each(dataGroups, function (i, row) {
|
||||
row.yLabels = tableData.yAllLabels[i];
|
||||
$.each(row.points, function (j, point) {
|
||||
point.zeroLocY = tableData.zeroLocY;
|
||||
point.zeroLocX = tableData.zeroLocX;
|
||||
point.xLabels = tableData.xAllLabels[j];
|
||||
point.yLabels = tableData.yAllLabels[i];
|
||||
point.color = row.color;
|
||||
});
|
||||
});
|
||||
|
||||
try {
|
||||
console.log(tableData);
|
||||
} catch (e) {}
|
||||
|
||||
var charts = {};
|
||||
|
||||
charts.pie = {
|
||||
interactionPoints: dataGroups,
|
||||
|
||||
setup: function () {
|
||||
charts.pie.draw(true);
|
||||
},
|
||||
draw: function (drawHtml) {
|
||||
|
||||
var centerx = Math.round(canvas.width() / 2);
|
||||
var centery = Math.round(canvas.height() / 2);
|
||||
var radius = centery - o.pieMargin;
|
||||
var counter = 0.0;
|
||||
|
||||
if (drawHtml) {
|
||||
canvasContain.addClass('visualize-pie');
|
||||
|
||||
if (o.pieLabelPos == 'outside') {
|
||||
canvasContain.addClass('visualize-pie-outside');
|
||||
}
|
||||
|
||||
var toRad = function (integer) {
|
||||
return (Math.PI / 180) * integer;
|
||||
};
|
||||
var labels = $('<ul class="visualize-labels"></ul>').insertAfter(canvas);
|
||||
}
|
||||
|
||||
|
||||
//draw the pie pieces
|
||||
$.each(dataGroups, function (i, row) {
|
||||
var fraction = row.groupTotal / dataSum;
|
||||
if (fraction <= 0 || isNaN(fraction)) return;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(centerx, centery);
|
||||
ctx.arc(centerx, centery, radius, counter * Math.PI * 2 - Math.PI * 0.5, (counter + fraction) * Math.PI * 2 - Math.PI * 0.5, false);
|
||||
ctx.lineTo(centerx, centery);
|
||||
ctx.closePath();
|
||||
ctx.fillStyle = dataGroups[i].color;
|
||||
ctx.fill();
|
||||
// draw labels
|
||||
if (drawHtml) {
|
||||
var sliceMiddle = (counter + fraction / 2);
|
||||
var distance = o.pieLabelPos == 'inside' ? radius / 1.5 : radius + radius / 5;
|
||||
var labelx = Math.round(centerx + Math.sin(sliceMiddle * Math.PI * 2) * (distance));
|
||||
var labely = Math.round(centery - Math.cos(sliceMiddle * Math.PI * 2) * (distance));
|
||||
var leftRight = (labelx > centerx) ? 'right' : 'left';
|
||||
var topBottom = (labely > centery) ? 'bottom' : 'top';
|
||||
var percentage = parseFloat((fraction * 100).toFixed(2));
|
||||
|
||||
// interaction variables
|
||||
row.canvasCords = [labelx, labely];
|
||||
row.zeroLocY = tableData.zeroLocY = 0; // related to zeroLocY and plugin API
|
||||
row.zeroLocX = tableData.zeroLocX = 0; // related to zeroLocX and plugin API
|
||||
row.value = row.groupTotal;
|
||||
|
||||
|
||||
if (percentage) {
|
||||
var labelval = (o.pieLabelsAsPercent) ? percentage + '%' : row.groupTotal;
|
||||
var labeltext = $('<span class="visualize-label">' + labelval + '</span>').css(leftRight, 0).css(topBottom, 0);
|
||||
if (labeltext) var label = $('<li class="visualize-label-pos"></li>').appendTo(labels).css({
|
||||
left: labelx,
|
||||
top: labely
|
||||
}).append(labeltext);
|
||||
labeltext.css('font-size', radius / 8).css('margin-' + leftRight, -labeltext.width() / 2).css('margin-' + topBottom, -labeltext.outerHeight() / 2);
|
||||
|
||||
if (dataGroups[i].textColor) {
|
||||
labeltext.css('color', dataGroups[i].textColor);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
counter += fraction;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
(function () {
|
||||
|
||||
var xInterval;
|
||||
|
||||
var drawPoint = function (ctx, x, y, color, size) {
|
||||
ctx.moveTo(x, y);
|
||||
ctx.beginPath();
|
||||
ctx.arc(x, y, size / 2, 0, 2 * Math.PI, false);
|
||||
ctx.closePath();
|
||||
ctx.fillStyle = color;
|
||||
ctx.fill();
|
||||
};
|
||||
|
||||
charts.line = {
|
||||
|
||||
interactionPoints: allItems,
|
||||
|
||||
setup: function (area) {
|
||||
|
||||
if (area) {
|
||||
canvasContain.addClass('visualize-area');
|
||||
} else {
|
||||
canvasContain.addClass('visualize-line');
|
||||
}
|
||||
|
||||
//write X labels
|
||||
var xlabelsUL = $('<ul class="visualize-labels-x"></ul>').width(canvas.width()).height(canvas.height()).insertBefore(canvas);
|
||||
|
||||
if (!o.customXLabels) {
|
||||
xInterval = (canvas.width() - 2 * o.lineMargin) / (xLabels.length - 1);
|
||||
$.each(xLabels, function (i) {
|
||||
var thisLi = $('<li><span>' + this + '</span></li>').prepend('<span class="line" />').css('left', o.lineMargin + xInterval * i).appendTo(xlabelsUL);
|
||||
var label = thisLi.find('span:not(.line)');
|
||||
var leftOffset = label.width() / -2;
|
||||
if (i == 0) {
|
||||
leftOffset = -20;
|
||||
} else if (i == xLabels.length - 1) {
|
||||
leftOffset = -label.width() + 20;
|
||||
}
|
||||
label.css('margin-left', leftOffset).addClass('label');
|
||||
});
|
||||
} else {
|
||||
o.customXLabels(tableData, xlabelsUL);
|
||||
}
|
||||
|
||||
//write Y labels
|
||||
var liBottom = (canvas.height() - 2 * o.lineMargin) / (yLabels.length - 1);
|
||||
var ylabelsUL = $('<ul class="visualize-labels-y"></ul>').width(canvas.width()).height(canvas.height())
|
||||
// .css('margin-top',-o.lineMargin)
|
||||
.insertBefore(scroller);
|
||||
|
||||
$.each(yLabels, function (i) {
|
||||
var value = Math.floor(this);
|
||||
var posB = (value - bottomValue) * yScale + o.lineMargin;
|
||||
if (posB >= o.height - 1 || posB < 0) {
|
||||
return;
|
||||
}
|
||||
var thisLi = $('<li><span>' + value + '</span></li>').css('bottom', posB);
|
||||
if (Math.abs(posB) < o.height - 1) {
|
||||
thisLi.prepend('<span class="line" />');
|
||||
}
|
||||
thisLi.prependTo(ylabelsUL);
|
||||
|
||||
var label = thisLi.find('span:not(.line)');
|
||||
var topOffset = label.height() / -2;
|
||||
if (!o.lineMargin) {
|
||||
if (i == 0) {
|
||||
topOffset = -label.height();
|
||||
} else if (i == yLabels.length - 1) {
|
||||
topOffset = 0;
|
||||
}
|
||||
}
|
||||
label.css('margin-top', topOffset).addClass('label');
|
||||
});
|
||||
|
||||
//start from the bottom left
|
||||
ctx.translate(zeroLocX, zeroLocY);
|
||||
|
||||
charts.line.draw(area);
|
||||
|
||||
},
|
||||
|
||||
draw: function (area) {
|
||||
// prevent drawing on top of previous draw
|
||||
ctx.clearRect(-zeroLocX, -zeroLocY, o.width, o.height);
|
||||
// Calculate each point properties before hand
|
||||
var integer;
|
||||
$.each(dataGroups, function (i, row) {
|
||||
integer = o.lineMargin; // the current offset
|
||||
$.each(row.points, function (j, point) {
|
||||
if (o.xLabelParser) {
|
||||
point.canvasCords = [(xLabels[j] - zeroLocX) * xScale - xBottomValue, -(point.value * yScale)];
|
||||
} else {
|
||||
point.canvasCords = [integer, -(point.value * yScale)];
|
||||
}
|
||||
|
||||
if (o.lineDots) {
|
||||
point.dotSize = o.dotSize || o.lineWeight * Math.PI;
|
||||
point.dotInnerSize = o.dotInnerSize || o.lineWeight * Math.PI / 2;
|
||||
if (o.lineDots == 'double') {
|
||||
point.innerColor = o.dotInnerColor;
|
||||
}
|
||||
}
|
||||
integer += xInterval;
|
||||
});
|
||||
});
|
||||
// fire custom event so we can enable rich interaction
|
||||
self.trigger('vizualizeBeforeDraw', {
|
||||
options: o,
|
||||
table: self,
|
||||
canvasContain: canvasContain,
|
||||
tableData: tableData
|
||||
});
|
||||
// draw lines and areas
|
||||
$.each(dataGroups, function (h) {
|
||||
// Draw lines
|
||||
ctx.beginPath();
|
||||
ctx.lineWidth = o.lineWeight;
|
||||
ctx.lineJoin = 'round';
|
||||
$.each(this.points, function (g) {
|
||||
var loc = this.canvasCords;
|
||||
if (g == 0) {
|
||||
ctx.moveTo(loc[0], loc[1]);
|
||||
}
|
||||
ctx.lineTo(loc[0], loc[1]);
|
||||
});
|
||||
ctx.strokeStyle = this.color;
|
||||
ctx.stroke();
|
||||
// Draw fills
|
||||
if (area) {
|
||||
var integer = this.points[this.points.length - 1].canvasCords[0];
|
||||
if (isFinite(integer)) ctx.lineTo(integer, 0);
|
||||
ctx.lineTo(o.lineMargin, 0);
|
||||
ctx.closePath();
|
||||
ctx.fillStyle = this.color;
|
||||
ctx.globalAlpha = .3;
|
||||
ctx.fill();
|
||||
ctx.globalAlpha = 1.0;
|
||||
} else {
|
||||
ctx.closePath();
|
||||
}
|
||||
});
|
||||
// draw points
|
||||
if (o.lineDots) {
|
||||
$.each(dataGroups, function (h) {
|
||||
$.each(this.points, function (g) {
|
||||
drawPoint(ctx, this.canvasCords[0], this.canvasCords[1], this.color, this.dotSize);
|
||||
if (o.lineDots === 'double') {
|
||||
drawPoint(ctx, this.canvasCords[0], this.canvasCords[1], this.innerColor, this.dotInnerSize);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
charts.area = {
|
||||
setup: function () {
|
||||
charts.line.setup(true);
|
||||
},
|
||||
draw: charts.line.draw
|
||||
};
|
||||
|
||||
(function () {
|
||||
|
||||
var horizontal, bottomLabels;
|
||||
|
||||
charts.bar = {
|
||||
setup: function () {
|
||||
/**
|
||||
* We can draw horizontal or vertical bars depending on the
|
||||
* value of the 'barDirection' option (which may be 'vertical' or
|
||||
* 'horizontal').
|
||||
*/
|
||||
|
||||
horizontal = (o.barDirection == 'horizontal');
|
||||
|
||||
canvasContain.addClass('visualize-bar');
|
||||
|
||||
/**
|
||||
* Write labels along the bottom of the chart. If we're drawing
|
||||
* horizontal bars, these will be the yLabels, otherwise they
|
||||
* will be the xLabels. The positioning also varies slightly:
|
||||
* yLabels are values, hence they will span the whole width of
|
||||
* the canvas, whereas xLabels are supposed to line up with the
|
||||
* bars.
|
||||
*/
|
||||
bottomLabels = horizontal ? yLabels : xLabels;
|
||||
|
||||
var xInterval = canvas.width() / (bottomLabels.length - (horizontal ? 1 : 0));
|
||||
|
||||
var xlabelsUL = $('<ul class="visualize-labels-x"></ul>').width(canvas.width()).height(canvas.height()).insertBefore(canvas);
|
||||
|
||||
$.each(bottomLabels, function (i) {
|
||||
var thisLi = $('<li><span class="label">' + this + '</span></li>').prepend('<span class="line" />').css('left', xInterval * i).width(xInterval).appendTo(xlabelsUL);
|
||||
|
||||
if (horizontal) {
|
||||
var label = thisLi.find('span.label');
|
||||
label.css("margin-left", -label.width() / 2);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Write labels along the left of the chart. Follows the same idea
|
||||
* as the bottom labels.
|
||||
*/
|
||||
var leftLabels = horizontal ? xLabels : yLabels;
|
||||
var liBottom = canvas.height() / (leftLabels.length - (horizontal ? 0 : 1));
|
||||
|
||||
var ylabelsUL = $('<ul class="visualize-labels-y"></ul>').width(canvas.width()).height(canvas.height()).insertBefore(canvas);
|
||||
|
||||
$.each(leftLabels, function (i) {
|
||||
var thisLi = $('<li><span>' + this + '</span></li>').prependTo(ylabelsUL);
|
||||
|
||||
var label = thisLi.find('span:not(.line)').addClass('label');
|
||||
|
||||
if (horizontal) {
|
||||
/**
|
||||
* For left labels, we want to vertically align the text
|
||||
* to the middle of its container, but we don't know how
|
||||
* many lines of text we will have, since the labels could
|
||||
* be very long.
|
||||
*
|
||||
* So we set a min-height of liBottom, and a max-height
|
||||
* of liBottom + 1, so we can then check the label's actual
|
||||
* height to determine if it spans one line or more lines.
|
||||
*/
|
||||
label.css({
|
||||
'min-height': liBottom,
|
||||
'max-height': liBottom + 1,
|
||||
'vertical-align': 'middle'
|
||||
});
|
||||
thisLi.css({
|
||||
'top': liBottom * i,
|
||||
'min-height': liBottom
|
||||
});
|
||||
|
||||
var r = label[0].getClientRects()[0];
|
||||
if (r.bottom - r.top == liBottom) {
|
||||
/* This means we have only one line of text; hence
|
||||
* we can centre the text vertically by setting the line-height,
|
||||
* as described at:
|
||||
* http://www.ampsoft.net/webdesign-l/vertical-aligned-nav-list.html
|
||||
*
|
||||
* (Although firefox has .height on the rectangle, IE doesn't,
|
||||
* so we use r.bottom - r.top rather than r.height.)
|
||||
*/
|
||||
label.css('line-height', parseInt(liBottom) + 'px');
|
||||
} else {
|
||||
/*
|
||||
* If there is more than one line of text, then we shouldn't
|
||||
* touch the line height, but we should make sure the text
|
||||
* doesn't overflow the container.
|
||||
*/
|
||||
label.css("overflow", "hidden");
|
||||
}
|
||||
} else {
|
||||
thisLi.css('bottom', liBottom * i).prepend('<span class="line" />');
|
||||
label.css('margin-top', -label.height() / 2)
|
||||
}
|
||||
});
|
||||
|
||||
charts.bar.draw();
|
||||
|
||||
},
|
||||
|
||||
draw: function () {
|
||||
// Draw bars
|
||||
if (horizontal) {
|
||||
// for horizontal, keep the same code, but rotate everything 90 degrees
|
||||
// clockwise.
|
||||
ctx.rotate(Math.PI / 2);
|
||||
} else {
|
||||
// for vertical, translate to the top left corner.
|
||||
ctx.translate(0, zeroLocY);
|
||||
}
|
||||
|
||||
// Don't attempt to draw anything if all the values are zero,
|
||||
// otherwise we will get weird exceptions from the canvas methods.
|
||||
if (totalYRange <= 0) return;
|
||||
|
||||
var yScale = (horizontal ? canvas.width() : canvas.height()) / totalYRange;
|
||||
var barWidth = horizontal ? (canvas.height() / xLabels.length) : (canvas.width() / (bottomLabels.length));
|
||||
var linewidth = (barWidth - o.barGroupMargin * 2) / dataGroups.length;
|
||||
|
||||
for (var h = 0; h < dataGroups.length; h++) {
|
||||
ctx.beginPath();
|
||||
|
||||
var strokeWidth = linewidth - (o.barMargin * 2);
|
||||
ctx.lineWidth = strokeWidth;
|
||||
var points = dataGroups[h].points;
|
||||
var integer = 0;
|
||||
for (var i = 0; i < points.length; i++) {
|
||||
// If the last value is zero, IE will go nuts and not draw anything,
|
||||
// so don't try to draw zero values at all.
|
||||
if (points[i].value != 0) {
|
||||
var xVal = (integer - o.barGroupMargin) + (h * linewidth) + linewidth / 2;
|
||||
xVal += o.barGroupMargin * 2;
|
||||
ctx.moveTo(xVal, 0);
|
||||
ctx.lineTo(xVal, Math.round(-points[i].value * yScale));
|
||||
}
|
||||
integer += barWidth;
|
||||
}
|
||||
ctx.strokeStyle = dataGroups[h].color;
|
||||
ctx.stroke();
|
||||
ctx.closePath();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
//create new canvas, set w&h attrs (not inline styles)
|
||||
var canvasNode = document.createElement("canvas");
|
||||
var canvas = $(canvasNode).attr({
|
||||
'height': o.height,
|
||||
'width': o.width
|
||||
});
|
||||
|
||||
//get title for chart
|
||||
var title = o.title || self.find('caption').text();
|
||||
|
||||
//create canvas wrapper div, set inline w&h, append
|
||||
var canvasContain = (container || $('<div ' + (o.chartId ? 'id="' + o.chartId + '" ' : '') + 'class="visualize ' + o.chartClass + '" role="img" aria-label="Chart representing data from the table: ' + title + '" />')).height(o.height).width(o.width);
|
||||
|
||||
var scroller = $('<div class="visualize-scroller"></div>').appendTo(canvasContain).append(canvas);
|
||||
|
||||
//title/key container
|
||||
if (o.appendTitle || o.appendKey) {
|
||||
var infoContain = $('<div class="visualize-info"></div>').appendTo(canvasContain);
|
||||
}
|
||||
|
||||
//append title
|
||||
if (o.appendTitle) {
|
||||
$('<div class="visualize-title">' + title + '</div>').appendTo(infoContain);
|
||||
}
|
||||
|
||||
|
||||
//append key
|
||||
if (o.appendKey) {
|
||||
var newKey = $('<ul class="visualize-key"></ul>');
|
||||
$.each(yAllLabels, function (i, label) {
|
||||
$('<li><span class="visualize-key-color" style="background: ' + dataGroups[i].color + '"></span><span class="visualize-key-label">' + label + '</span></li>').appendTo(newKey);
|
||||
});
|
||||
newKey.appendTo(infoContain);
|
||||
};
|
||||
|
||||
// init interaction
|
||||
if (o.interaction) {
|
||||
// sets the canvas to track interaction
|
||||
// IE needs one div on top of the canvas since the VML shapes prevent mousemove from triggering correctly.
|
||||
// Pie charts needs tracker because labels goes on top of the canvas and also messes up with mousemove
|
||||
var tracker = $('<div class="visualize-interaction-tracker"/>').css({
|
||||
'height': o.height + 'px',
|
||||
'width': o.width + 'px',
|
||||
'position': 'relative',
|
||||
'z-index': 200
|
||||
}).insertAfter(canvas);
|
||||
|
||||
var triggerInteraction = function (overOut, data) {
|
||||
var data = $.extend({
|
||||
canvasContain: canvasContain,
|
||||
tableData: tableData
|
||||
}, data);
|
||||
self.trigger('vizualize' + overOut, data);
|
||||
};
|
||||
|
||||
var over = false,
|
||||
last = false,
|
||||
started = false;
|
||||
tracker.mousemove(function (e) {
|
||||
var x, y, x1, y1, data, dist, i, current, selector, zLabel, elem, color, minDist, found, ev = e.originalEvent;
|
||||
|
||||
// get mouse position relative to the tracker/canvas
|
||||
x = ev.layerX || ev.offsetX || 0;
|
||||
y = ev.layerY || ev.offsetY || 0;
|
||||
|
||||
found = false;
|
||||
minDist = started ? 30000 : (o.type == 'pie' ? (Math.round(canvas.height() / 2) - o.pieMargin) / 3 : o.lineWeight * 4);
|
||||
// iterate datagroups to find points with matching
|
||||
$.each(charts[o.type].interactionPoints, function (i, current) {
|
||||
x1 = current.canvasCords[0] + zeroLocX;
|
||||
y1 = current.canvasCords[1] + (o.type == "pie" ? 0 : zeroLocY);
|
||||
dist = Math.sqrt((x1 - x) * (x1 - x) + (y1 - y) * (y1 - y));
|
||||
if (dist < minDist) {
|
||||
found = current;
|
||||
minDist = dist;
|
||||
}
|
||||
});
|
||||
|
||||
if (o.multiHover && found) {
|
||||
x = found.canvasCords[0] + zeroLocX;
|
||||
y = found.canvasCords[1] + (o.type == "pie" ? 0 : zeroLocY);
|
||||
found = [found];
|
||||
$.each(charts[o.type].interactionPoints, function (i, current) {
|
||||
if (current == found[0]) {
|
||||
return;
|
||||
}
|
||||
x1 = current.canvasCords[0] + zeroLocX;
|
||||
y1 = current.canvasCords[1] + zeroLocY;
|
||||
dist = Math.sqrt((x1 - x) * (x1 - x) + (y1 - y) * (y1 - y));
|
||||
if (dist <= o.multiHover) {
|
||||
found.push(current);
|
||||
}
|
||||
});
|
||||
}
|
||||
// trigger over and out only when state changes, instead of on every mousemove
|
||||
over = found;
|
||||
if (over != last) {
|
||||
if (over) {
|
||||
if (last) {
|
||||
triggerInteraction('Out', {
|
||||
point: last
|
||||
});
|
||||
}
|
||||
triggerInteraction('Over', {
|
||||
point: over
|
||||
});
|
||||
last = over;
|
||||
}
|
||||
if (last && !over) {
|
||||
triggerInteraction('Out', {
|
||||
point: last
|
||||
});
|
||||
last = false;
|
||||
}
|
||||
started = true;
|
||||
}
|
||||
});
|
||||
tracker.mouseleave(function () {
|
||||
triggerInteraction('Out', {
|
||||
point: last,
|
||||
mouseOutGraph: true
|
||||
});
|
||||
over = (last = false);
|
||||
});
|
||||
}
|
||||
|
||||
//append new canvas to page
|
||||
if (!container) {
|
||||
canvasContain.insertAfter(this);
|
||||
}
|
||||
if (typeof (G_vmlCanvasManager) != 'undefined') {
|
||||
G_vmlCanvasManager.init();
|
||||
G_vmlCanvasManager.initElement(canvas[0]);
|
||||
}
|
||||
|
||||
//set up the drawing board
|
||||
var ctx = canvas[0].getContext('2d');
|
||||
|
||||
// Scroll graphs
|
||||
scroller.scrollLeft(o.width - scroller.width());
|
||||
|
||||
// init plugins
|
||||
$.each($.visualizePlugins, function (i, plugin) {
|
||||
plugin.call(self, o, tableData);
|
||||
});
|
||||
|
||||
//create chart
|
||||
charts[o.type].setup();
|
||||
|
||||
if (!container) {
|
||||
//add event for updating
|
||||
self.bind('visualizeRefresh', function () {
|
||||
self.visualize(o, $(this).empty());
|
||||
});
|
||||
//add event for redraw
|
||||
self.bind('visualizeRedraw', function () {
|
||||
charts[o.type].draw();
|
||||
});
|
||||
}
|
||||
}).next(); //returns canvas(es)
|
||||
};
|
||||
// create array for plugins. if you wish to make a plugin,
|
||||
// just push your init funcion into this array
|
||||
$.visualizePlugins = [];
|
||||
|
||||
})(jQuery);
|
||||
@ -1,114 +0,0 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------
|
||||
* Tooltip plugin for the jQuery-Plugin "Visualize"
|
||||
* Tolltip by Iraê Carvalho, irae@irae.pro.br, http://irae.pro.br/en/
|
||||
* Copyright (c) 2010 Iraê Carvalho
|
||||
* Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
|
||||
*
|
||||
* Visualize plugin by Scott Jehl, scott@filamentgroup.com
|
||||
* Copyright (c) 2009 Filament Group, http://www.filamentgroup.com
|
||||
*
|
||||
* --------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
(function($){
|
||||
$.visualizePlugins.push(function visualizeTooltip(options,tableData) {
|
||||
//configuration
|
||||
var o = $.extend({
|
||||
tooltip: false,
|
||||
tooltipalign: 'auto', // also available 'left' and 'right'
|
||||
tooltipvalign: 'top',
|
||||
tooltipclass: 'visualize-tooltip',
|
||||
tooltiphtml: function(data){
|
||||
if(options.multiHover) {
|
||||
var html='';
|
||||
for(var i=0;i<data.point.length;i++){
|
||||
html += '<p>'+data.point[i].value+' - '+data.point[i].yLabels[0]+'</p>';
|
||||
}
|
||||
return html;
|
||||
} else {
|
||||
return '<p>'+data.point.value+' - '+data.point.yLabels[0]+'</p>';
|
||||
}
|
||||
},
|
||||
delay:false
|
||||
},options);
|
||||
|
||||
// don't go any further if we are not to show anything
|
||||
if(!o.tooltip) {return;}
|
||||
|
||||
var self = $(this),
|
||||
canvasContain = self.next(),
|
||||
scroller = canvasContain.find('.visualize-scroller'),
|
||||
scrollerW = scroller.width(),
|
||||
tracker = canvasContain.find('.visualize-interaction-tracker');
|
||||
|
||||
// IE needs background color and opacity white or the tracker stays behind the tooltip
|
||||
tracker.css({
|
||||
backgroundColor:'white',
|
||||
opacity:0,
|
||||
zIndex:100
|
||||
});
|
||||
|
||||
var tooltip = $('<div class="'+o.tooltipclass+'"/>').css({
|
||||
position:'absolute',
|
||||
display:'none',
|
||||
zIndex:90
|
||||
})
|
||||
.insertAfter(scroller.find('canvas'));
|
||||
|
||||
var usescroll = true;
|
||||
|
||||
if( typeof(G_vmlCanvasManager) != 'undefined' ){
|
||||
scroller.css({'position':'absolute'});
|
||||
tracker.css({marginTop:'-'+(o.height)+'px'});
|
||||
}
|
||||
|
||||
|
||||
self.bind('vizualizeOver',function visualizeTooltipOver(e,data){
|
||||
if(data.canvasContain.get(0) != canvasContain.get(0)) {return;} // for multiple graphs originated from same table
|
||||
if(o.multiHover) {
|
||||
var p = data.point[0].canvasCords;
|
||||
} else {
|
||||
var p = data.point.canvasCords;
|
||||
}
|
||||
var left,right,top,clasRem,clasAd,bottom,x=Math.round(p[0]+data.tableData.zeroLocX),y=Math.round(p[1]+data.tableData.zeroLocY);
|
||||
if(o.tooltipalign == 'left' || ( o.tooltipalign=='auto' && x-scroller.scrollLeft()<=scrollerW/2 ) ) {
|
||||
if($.browser.msie && ($.browser.version == 7 || $.browser.version == 6) ) {usescroll=false;} else {usescroll=true;}
|
||||
left = x-(usescroll?scroller.scrollLeft():0);
|
||||
if(x-scroller.scrollLeft()<0) { // even with when not using scroll we need to calc with it for IE
|
||||
return;
|
||||
}
|
||||
left = left+'px';
|
||||
right = '';
|
||||
clasAdd="tooltipleft";
|
||||
clasRem="tooltipright";
|
||||
} else {
|
||||
if($.browser.msie && $.browser.version == 7) {usescroll=false;} else {usescroll=true;}
|
||||
right = Math.abs(x-o.width)- (o.width-(usescroll?scroller.scrollLeft():0)-scrollerW);
|
||||
if(Math.abs(x-o.width)- (o.width-scroller.scrollLeft()-scrollerW)<0) { // even with when not using scroll we need to calc with it for IE
|
||||
return;
|
||||
}
|
||||
left = '';
|
||||
right = right+'px';
|
||||
clasAdd="tooltipright";
|
||||
clasRem="tooltipleft";
|
||||
}
|
||||
|
||||
tooltip
|
||||
.addClass(clasAdd)
|
||||
.removeClass(clasRem)
|
||||
.html(o.tooltiphtml(data))
|
||||
.css({
|
||||
display:'block',
|
||||
top: y+'px',
|
||||
left: left,
|
||||
right: right
|
||||
});
|
||||
});
|
||||
|
||||
self.bind('vizualizeOut',function visualizeTooltipOut(e,data){
|
||||
tooltip.css({display:'none'});
|
||||
});
|
||||
|
||||
});
|
||||
})(jQuery);
|
||||
@ -1,790 +0,0 @@
|
||||
/**
|
||||
* WYSIWYG - jQuery plugin 0.6
|
||||
*
|
||||
* Copyright (c) 2008-2009 Juan M Martinez
|
||||
* http://plugins.jquery.com/project/jWYSIWYG
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* $Id: $
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.document = function () {
|
||||
var element = this.get(0);
|
||||
|
||||
if (element.nodeName.toLowerCase() == 'iframe') {
|
||||
return element.contentWindow.document;
|
||||
/*
|
||||
return ( $.browser.msie )
|
||||
? document.frames[element.id].document
|
||||
: element.contentWindow.document // contentDocument;
|
||||
*/
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
$.fn.documentSelection = function () {
|
||||
var element = this.get(0);
|
||||
|
||||
if (element.contentWindow.document.selection) return element.contentWindow.document.selection.createRange().text;
|
||||
else return element.contentWindow.getSelection().toString();
|
||||
};
|
||||
|
||||
$.fn.wysiwyg = function (options) {
|
||||
if (arguments.length > 0 && arguments[0].constructor == String) {
|
||||
var action = arguments[0].toString();
|
||||
var params = [];
|
||||
|
||||
for (var i = 1; i < arguments.length; i++)
|
||||
params[i - 1] = arguments[i];
|
||||
|
||||
if (action in Wysiwyg) {
|
||||
return this.each(function () {
|
||||
$.data(this, 'wysiwyg').designMode();
|
||||
|
||||
Wysiwyg[action].apply(this, params);
|
||||
});
|
||||
} else return this;
|
||||
}
|
||||
|
||||
var controls = {};
|
||||
|
||||
/**
|
||||
* If the user set custom controls, we catch it, and merge with the
|
||||
* defaults controls later.
|
||||
*/
|
||||
if (options && options.controls) {
|
||||
var controls = options.controls;
|
||||
delete options.controls;
|
||||
}
|
||||
|
||||
options = $.extend({
|
||||
html: '<' + '?xml version="1.0" encoding="UTF-8"?' + '><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">STYLE_SHEET</head><body style="margin: 0px;">INITIAL_CONTENT</body></html>',
|
||||
css: {},
|
||||
|
||||
debug: false,
|
||||
|
||||
autoSave: true,
|
||||
// http://code.google.com/p/jwysiwyg/issues/detail?id=11
|
||||
rmUnwantedBr: true,
|
||||
// http://code.google.com/p/jwysiwyg/issues/detail?id=15
|
||||
brIE: true,
|
||||
|
||||
controls: {},
|
||||
messages: {}
|
||||
}, options);
|
||||
|
||||
options.messages = $.extend(true, options.messages, Wysiwyg.MSGS_EN);
|
||||
options.controls = $.extend(true, options.controls, Wysiwyg.TOOLBAR);
|
||||
|
||||
for (var control in controls) {
|
||||
if (control in options.controls) $.extend(options.controls[control], controls[control]);
|
||||
else options.controls[control] = controls[control];
|
||||
}
|
||||
|
||||
// not break the chain
|
||||
return this.each(function () {
|
||||
Wysiwyg(this, options);
|
||||
});
|
||||
};
|
||||
|
||||
function Wysiwyg(element, options) {
|
||||
return this instanceof Wysiwyg ? this.init(element, options) : new Wysiwyg(element, options);
|
||||
}
|
||||
|
||||
$.extend(Wysiwyg, {
|
||||
insertImage: function (szURL, attributes) {
|
||||
var self = $.data(this, 'wysiwyg');
|
||||
|
||||
if (self.constructor == Wysiwyg && szURL && szURL.length > 0) {
|
||||
if ($.browser.msie) self.focus();
|
||||
if (attributes) {
|
||||
self.editorDoc.execCommand('insertImage', false, '#jwysiwyg#');
|
||||
var img = self.getElementByAttributeValue('img', 'src', '#jwysiwyg#');
|
||||
|
||||
if (img) {
|
||||
img.src = szURL;
|
||||
|
||||
for (var attribute in attributes) {
|
||||
img.setAttribute(attribute, attributes[attribute]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
self.editorDoc.execCommand('insertImage', false, szURL);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
createLink: function (szURL) {
|
||||
var self = $.data(this, 'wysiwyg');
|
||||
|
||||
if (self.constructor == Wysiwyg && szURL && szURL.length > 0) {
|
||||
var selection = $(self.editor).documentSelection();
|
||||
|
||||
if (selection.length > 0) {
|
||||
if ($.browser.msie) self.focus();
|
||||
self.editorDoc.execCommand('unlink', false, []);
|
||||
self.editorDoc.execCommand('createLink', false, szURL);
|
||||
} else if (self.options.messages.nonSelection) alert(self.options.messages.nonSelection);
|
||||
}
|
||||
},
|
||||
|
||||
insertHtml: function (szHTML) {
|
||||
var self = $.data(this, 'wysiwyg');
|
||||
|
||||
if (self.constructor == Wysiwyg && szHTML && szHTML.length > 0) {
|
||||
if ($.browser.msie) {
|
||||
self.focus();
|
||||
self.editorDoc.execCommand('insertImage', false, '#jwysiwyg#');
|
||||
var img = self.getElementByAttributeValue('img', 'src', '#jwysiwyg#');
|
||||
if (img) {
|
||||
$(img).replaceWith(szHTML);
|
||||
}
|
||||
} else {
|
||||
self.editorDoc.execCommand('insertHTML', false, szHTML);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setContent: function (newContent) {
|
||||
var self = $.data(this, 'wysiwyg');
|
||||
self.setContent(newContent);
|
||||
self.saveContent();
|
||||
},
|
||||
|
||||
clear: function () {
|
||||
var self = $.data(this, 'wysiwyg');
|
||||
self.setContent('');
|
||||
self.saveContent();
|
||||
},
|
||||
|
||||
MSGS_EN: {
|
||||
nonSelection: 'select the text you wish to link'
|
||||
},
|
||||
|
||||
TOOLBAR: {
|
||||
bold: {
|
||||
visible: true,
|
||||
tags: ['b', 'strong'],
|
||||
css: {
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
tooltip: "Bold"
|
||||
},
|
||||
italic: {
|
||||
visible: true,
|
||||
tags: ['i', 'em'],
|
||||
css: {
|
||||
fontStyle: 'italic'
|
||||
},
|
||||
tooltip: "Italic"
|
||||
},
|
||||
strikeThrough: {
|
||||
visible: true,
|
||||
tags: ['s', 'strike'],
|
||||
css: {
|
||||
textDecoration: 'line-through'
|
||||
},
|
||||
tooltip: "Strike-through"
|
||||
},
|
||||
underline: {
|
||||
visible: true,
|
||||
tags: ['u'],
|
||||
css: {
|
||||
textDecoration: 'underline'
|
||||
},
|
||||
tooltip: "Underline"
|
||||
},
|
||||
|
||||
separator00: {
|
||||
visible: true,
|
||||
separator: true
|
||||
},
|
||||
|
||||
justifyLeft: {
|
||||
visible: true,
|
||||
css: {
|
||||
textAlign: 'left'
|
||||
},
|
||||
tooltip: "Justify Left"
|
||||
},
|
||||
justifyCenter: {
|
||||
visible: true,
|
||||
tags: ['center'],
|
||||
css: {
|
||||
textAlign: 'center'
|
||||
},
|
||||
tooltip: "Justify Center"
|
||||
},
|
||||
justifyRight: {
|
||||
visible: true,
|
||||
css: {
|
||||
textAlign: 'right'
|
||||
},
|
||||
tooltip: "Justify Right"
|
||||
},
|
||||
justifyFull: {
|
||||
visible: true,
|
||||
css: {
|
||||
textAlign: 'justify'
|
||||
},
|
||||
tooltip: "Justify Full"
|
||||
},
|
||||
|
||||
separator01: {
|
||||
visible: true,
|
||||
separator: true
|
||||
},
|
||||
|
||||
indent: {
|
||||
visible: true,
|
||||
tooltip: "Indent"
|
||||
},
|
||||
outdent: {
|
||||
visible: true,
|
||||
tooltip: "Outdent"
|
||||
},
|
||||
|
||||
separator02: {
|
||||
visible: false,
|
||||
separator: true
|
||||
},
|
||||
|
||||
subscript: {
|
||||
visible: true,
|
||||
tags: ['sub'],
|
||||
tooltip: "Subscript"
|
||||
},
|
||||
superscript: {
|
||||
visible: true,
|
||||
tags: ['sup'],
|
||||
tooltip: "Superscript"
|
||||
},
|
||||
|
||||
separator03: {
|
||||
visible: true,
|
||||
separator: true
|
||||
},
|
||||
|
||||
undo: {
|
||||
visible: true,
|
||||
tooltip: "Undo"
|
||||
},
|
||||
redo: {
|
||||
visible: true,
|
||||
tooltip: "Redo"
|
||||
},
|
||||
|
||||
separator04: {
|
||||
visible: true,
|
||||
separator: true
|
||||
},
|
||||
|
||||
insertOrderedList: {
|
||||
visible: true,
|
||||
tags: ['ol'],
|
||||
tooltip: "Insert Ordered List"
|
||||
},
|
||||
insertUnorderedList: {
|
||||
visible: true,
|
||||
tags: ['ul'],
|
||||
tooltip: "Insert Unordered List"
|
||||
},
|
||||
insertHorizontalRule: {
|
||||
visible: true,
|
||||
tags: ['hr'],
|
||||
tooltip: "Insert Horizontal Rule"
|
||||
},
|
||||
|
||||
separator05: {
|
||||
separator: true
|
||||
},
|
||||
|
||||
createLink: {
|
||||
visible: true,
|
||||
exec: function () {
|
||||
var selection = $(this.editor).documentSelection();
|
||||
|
||||
if (selection.length > 0) {
|
||||
if ($.browser.msie) {
|
||||
this.focus();
|
||||
this.editorDoc.execCommand('createLink', true, null);
|
||||
} else {
|
||||
var szURL = prompt('URL', 'http://');
|
||||
|
||||
if (szURL && szURL.length > 0) {
|
||||
this.editorDoc.execCommand('unlink', false, []);
|
||||
this.editorDoc.execCommand('createLink', false, szURL);
|
||||
}
|
||||
}
|
||||
} else if (this.options.messages.nonSelection) alert(this.options.messages.nonSelection);
|
||||
},
|
||||
|
||||
tags: ['a'],
|
||||
tooltip: "Create link"
|
||||
},
|
||||
|
||||
insertImage: {
|
||||
visible: true,
|
||||
exec: function () {
|
||||
if ($.browser.msie) {
|
||||
this.focus();
|
||||
this.editorDoc.execCommand('insertImage', true, null);
|
||||
} else {
|
||||
var szURL = prompt('URL', 'http://');
|
||||
|
||||
if (szURL && szURL.length > 0) this.editorDoc.execCommand('insertImage', false, szURL);
|
||||
}
|
||||
},
|
||||
|
||||
tags: ['img'],
|
||||
tooltip: "Insert image"
|
||||
},
|
||||
|
||||
separator06: {
|
||||
separator: true
|
||||
},
|
||||
|
||||
h1mozilla: {
|
||||
visible: true && $.browser.mozilla,
|
||||
className: 'h1',
|
||||
command: 'heading',
|
||||
arguments: ['h1'],
|
||||
tags: ['h1'],
|
||||
tooltip: "Header 1"
|
||||
},
|
||||
h2mozilla: {
|
||||
visible: true && $.browser.mozilla,
|
||||
className: 'h2',
|
||||
command: 'heading',
|
||||
arguments: ['h2'],
|
||||
tags: ['h2'],
|
||||
tooltip: "Header 2"
|
||||
},
|
||||
h3mozilla: {
|
||||
visible: true && $.browser.mozilla,
|
||||
className: 'h3',
|
||||
command: 'heading',
|
||||
arguments: ['h3'],
|
||||
tags: ['h3'],
|
||||
tooltip: "Header 3"
|
||||
},
|
||||
|
||||
h1: {
|
||||
visible: true && !($.browser.mozilla),
|
||||
className: 'h1',
|
||||
command: 'formatBlock',
|
||||
arguments: ['<H1>'],
|
||||
tags: ['h1'],
|
||||
tooltip: "Header 1"
|
||||
},
|
||||
h2: {
|
||||
visible: true && !($.browser.mozilla),
|
||||
className: 'h2',
|
||||
command: 'formatBlock',
|
||||
arguments: ['<H2>'],
|
||||
tags: ['h2'],
|
||||
tooltip: "Header 2"
|
||||
},
|
||||
h3: {
|
||||
visible: true && !($.browser.mozilla),
|
||||
className: 'h3',
|
||||
command: 'formatBlock',
|
||||
arguments: ['<H3>'],
|
||||
tags: ['h3'],
|
||||
tooltip: "Header 3"
|
||||
},
|
||||
|
||||
separator07: {
|
||||
visible: false,
|
||||
separator: true
|
||||
},
|
||||
|
||||
cut: {
|
||||
visible: false,
|
||||
tooltip: "Cut"
|
||||
},
|
||||
copy: {
|
||||
visible: false,
|
||||
tooltip: "Copy"
|
||||
},
|
||||
paste: {
|
||||
visible: false,
|
||||
tooltip: "Paste"
|
||||
},
|
||||
|
||||
separator08: {
|
||||
separator: false && !($.browser.msie)
|
||||
},
|
||||
|
||||
increaseFontSize: {
|
||||
visible: false && !($.browser.msie),
|
||||
tags: ['big'],
|
||||
tooltip: "Increase font size"
|
||||
},
|
||||
decreaseFontSize: {
|
||||
visible: false && !($.browser.msie),
|
||||
tags: ['small'],
|
||||
tooltip: "Decrease font size"
|
||||
},
|
||||
|
||||
separator09: {
|
||||
separator: true
|
||||
},
|
||||
|
||||
html: {
|
||||
visible: false,
|
||||
exec: function () {
|
||||
if (this.viewHTML) {
|
||||
this.setContent($(this.original).val());
|
||||
$(this.original).hide();
|
||||
} else {
|
||||
this.saveContent();
|
||||
$(this.original).show();
|
||||
}
|
||||
|
||||
this.viewHTML = !(this.viewHTML);
|
||||
},
|
||||
tooltip: "View source code"
|
||||
},
|
||||
|
||||
removeFormat: {
|
||||
visible: true,
|
||||
exec: function () {
|
||||
if ($.browser.msie) this.focus();
|
||||
this.editorDoc.execCommand('removeFormat', false, []);
|
||||
this.editorDoc.execCommand('unlink', false, []);
|
||||
},
|
||||
tooltip: "Remove formatting"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.extend(Wysiwyg.prototype, {
|
||||
original: null,
|
||||
options: {},
|
||||
|
||||
element: null,
|
||||
editor: null,
|
||||
|
||||
focus: function () {
|
||||
$(this.editorDoc.body).focus();
|
||||
},
|
||||
|
||||
init: function (element, options) {
|
||||
var self = this;
|
||||
|
||||
this.editor = element;
|
||||
this.options = options || {};
|
||||
|
||||
$.data(element, 'wysiwyg', this);
|
||||
|
||||
var newX = element.width || element.clientWidth;
|
||||
var newY = element.height || element.clientHeight;
|
||||
|
||||
if (element.nodeName.toLowerCase() == 'textarea') {
|
||||
this.original = element;
|
||||
|
||||
if (newX == 0 && element.cols) newX = (element.cols * 8) + 21;
|
||||
|
||||
if (newY == 0 && element.rows) newY = (element.rows * 16) + 16;
|
||||
|
||||
var editor = this.editor = $('<iframe src="javascript:false;"></iframe>').css({
|
||||
minHeight: (newY - 6).toString() + 'px',
|
||||
width: (newX - 0).toString() + 'px'
|
||||
}).attr('id', $(element).attr('id') + 'IFrame').attr('frameborder', '0');
|
||||
|
||||
/**
|
||||
* http://code.google.com/p/jwysiwyg/issues/detail?id=96
|
||||
*/
|
||||
this.editor.attr('tabindex', $(element).attr('tabindex'));
|
||||
|
||||
if ($.browser.msie) {
|
||||
this.editor.css('height', (newY).toString() + 'px');
|
||||
|
||||
/**
|
||||
var editor = $('<span></span>').css({
|
||||
width : ( newX - 6 ).toString() + 'px',
|
||||
height : ( newY - 8 ).toString() + 'px'
|
||||
}).attr('id', $(element).attr('id') + 'IFrame');
|
||||
|
||||
editor.outerHTML = this.editor.outerHTML;
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
var panel = this.panel = $('<ul role="menu" class="panel"></ul>');
|
||||
|
||||
this.appendControls();
|
||||
this.element = $('<div></div>').css({
|
||||
width: (newX > 0) ? (newX).toString() + 'px' : '100%'
|
||||
}).addClass('wysiwyg').append(panel).append($('<div><!-- --></div>').css({
|
||||
clear: 'both'
|
||||
})).append(editor);
|
||||
|
||||
$(element).hide().before(this.element);
|
||||
|
||||
this.viewHTML = false;
|
||||
this.initialHeight = newY - 8;
|
||||
|
||||
/**
|
||||
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=52
|
||||
*/
|
||||
this.initialContent = $(element).val();
|
||||
this.initFrame();
|
||||
|
||||
if (this.initialContent.length == 0) this.setContent('');
|
||||
|
||||
/**
|
||||
* http://code.google.com/p/jwysiwyg/issues/detail?id=100
|
||||
*/
|
||||
var form = $(element).closest('form');
|
||||
|
||||
if (this.options.autoSave) {
|
||||
form.submit(function () {
|
||||
self.saveContent();
|
||||
});
|
||||
}
|
||||
|
||||
form.bind('reset', function () {
|
||||
self.setContent(self.initialContent);
|
||||
self.saveContent();
|
||||
});
|
||||
},
|
||||
|
||||
initFrame: function () {
|
||||
var self = this;
|
||||
var style = '';
|
||||
|
||||
/**
|
||||
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=14
|
||||
*/
|
||||
if (this.options.css && this.options.css.constructor == String) {
|
||||
style = '<link rel="stylesheet" type="text/css" media="screen" href="' + this.options.css + '" />';
|
||||
}
|
||||
|
||||
this.editorDoc = $(this.editor).document();
|
||||
this.editorDoc_designMode = false;
|
||||
|
||||
try {
|
||||
this.editorDoc.designMode = 'on';
|
||||
this.editorDoc_designMode = true;
|
||||
} catch (e) {
|
||||
// Will fail on Gecko if the editor is placed in an hidden container element
|
||||
// The design mode will be set ones the editor is focused
|
||||
$(this.editorDoc).focus(function () {
|
||||
self.designMode();
|
||||
});
|
||||
}
|
||||
|
||||
this.editorDoc.open();
|
||||
this.editorDoc.write(
|
||||
this.options.html
|
||||
/**
|
||||
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=144
|
||||
*/
|
||||
.replace(/INITIAL_CONTENT/, function () {
|
||||
return self.initialContent;
|
||||
}).replace(/STYLE_SHEET/, function () {
|
||||
return style;
|
||||
}));
|
||||
this.editorDoc.close();
|
||||
|
||||
this.editorDoc.contentEditable = 'true';
|
||||
|
||||
if ($.browser.msie) {
|
||||
/**
|
||||
* Remove the horrible border it has on IE.
|
||||
*/
|
||||
setTimeout(function () {
|
||||
$(self.editorDoc.body).css('border', 'none');
|
||||
}, 0);
|
||||
}
|
||||
|
||||
$(this.editorDoc).click(function (event) {
|
||||
self.checkTargets(event.target ? event.target : event.srcElement);
|
||||
});
|
||||
|
||||
/**
|
||||
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=20
|
||||
*/
|
||||
$(this.original).focus(function () {
|
||||
if (!$.browser.msie) {
|
||||
self.focus();
|
||||
}
|
||||
});
|
||||
|
||||
if (this.options.autoSave) {
|
||||
/**
|
||||
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=11
|
||||
*/
|
||||
$(this.editorDoc).keydown(function () {
|
||||
self.saveContent();
|
||||
}).keyup(function () {
|
||||
self.saveContent();
|
||||
}).mousedown(function () {
|
||||
self.saveContent();
|
||||
});
|
||||
}
|
||||
|
||||
if (this.options.css) {
|
||||
setTimeout(function () {
|
||||
if (self.options.css.constructor == String) {
|
||||
/**
|
||||
* $(self.editorDoc)
|
||||
* .find('head')
|
||||
* .append(
|
||||
* $('<link rel="stylesheet" type="text/css" media="screen" />')
|
||||
* .attr('href', self.options.css)
|
||||
* );
|
||||
*/
|
||||
} else $(self.editorDoc).find('body').css(self.options.css);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
$(this.editorDoc).keydown(function (event) {
|
||||
if ($.browser.msie && self.options.brIE && event.keyCode == 13) {
|
||||
var rng = self.getRange();
|
||||
rng.pasteHTML('<br />');
|
||||
rng.collapse(false);
|
||||
rng.select();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
},
|
||||
|
||||
designMode: function () {
|
||||
if (!(this.editorDoc_designMode)) {
|
||||
try {
|
||||
this.editorDoc.designMode = 'on';
|
||||
this.editorDoc_designMode = true;
|
||||
} catch (e) {}
|
||||
}
|
||||
},
|
||||
|
||||
getSelection: function () {
|
||||
return (window.getSelection) ? window.getSelection() : document.selection;
|
||||
},
|
||||
|
||||
getRange: function () {
|
||||
var selection = this.getSelection();
|
||||
|
||||
if (!(selection)) return null;
|
||||
|
||||
return (selection.rangeCount > 0) ? selection.getRangeAt(0) : selection.createRange();
|
||||
},
|
||||
|
||||
getContent: function () {
|
||||
return $($(this.editor).document()).find('body').html();
|
||||
},
|
||||
|
||||
setContent: function (newContent) {
|
||||
$($(this.editor).document()).find('body').html(newContent);
|
||||
},
|
||||
|
||||
saveContent: function () {
|
||||
if (this.original) {
|
||||
var content = this.getContent();
|
||||
|
||||
if (this.options.rmUnwantedBr) {
|
||||
content = (content.substr(-4) == '<br>') ? content.substr(0, content.length - 4) : content;
|
||||
}
|
||||
|
||||
$(this.original).val(content);
|
||||
}
|
||||
},
|
||||
|
||||
withoutCss: function () {
|
||||
if ($.browser.mozilla) {
|
||||
try {
|
||||
this.editorDoc.execCommand('styleWithCSS', false, false);
|
||||
} catch (e) {
|
||||
try {
|
||||
this.editorDoc.execCommand('useCSS', false, true);
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
appendMenu: function (cmd, args, className, fn, tooltip) {
|
||||
var self = this;
|
||||
args = args || [];
|
||||
|
||||
$('<li></li>').append(
|
||||
$('<a role="menuitem" tabindex="-1" href="javascript:;">' + (className || cmd) + '</a>').addClass(className || cmd).attr('title', tooltip)).click(function () {
|
||||
if (fn) fn.apply(self);
|
||||
else {
|
||||
self.withoutCss();
|
||||
self.editorDoc.execCommand(cmd, false, args);
|
||||
}
|
||||
if (self.options.autoSave) self.saveContent();
|
||||
}).appendTo(this.panel);
|
||||
},
|
||||
|
||||
appendMenuSeparator: function () {
|
||||
$('<li role="separator" class="separator"></li>').appendTo(this.panel);
|
||||
},
|
||||
|
||||
appendControls: function () {
|
||||
for (var name in this.options.controls) {
|
||||
var control = this.options.controls[name];
|
||||
|
||||
if (control.separator) {
|
||||
if (control.visible !== false) this.appendMenuSeparator();
|
||||
} else if (control.visible) {
|
||||
this.appendMenu(
|
||||
control.command || name, control.arguments || [], control.className || control.command || name || 'empty', control.exec, control.tooltip || control.command || name || '');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
checkTargets: function (element) {
|
||||
for (var name in this.options.controls) {
|
||||
var control = this.options.controls[name];
|
||||
var className = control.className || control.command || name || 'empty';
|
||||
|
||||
$('.' + className, this.panel).removeClass('active');
|
||||
|
||||
if (control.tags) {
|
||||
var elm = element;
|
||||
|
||||
do {
|
||||
if (elm.nodeType != 1) break;
|
||||
|
||||
if ($.inArray(elm.tagName.toLowerCase(), control.tags) != -1) $('.' + className, this.panel).addClass('active');
|
||||
} while ((elm = elm.parentNode));
|
||||
}
|
||||
|
||||
if (control.css) {
|
||||
var elm = $(element);
|
||||
|
||||
do {
|
||||
if (elm[0].nodeType != 1) break;
|
||||
|
||||
for (var cssProperty in control.css)
|
||||
if (elm.css(cssProperty).toString().toLowerCase() == control.css[cssProperty]) $('.' + className, this.panel).addClass('active');
|
||||
} while ((elm = elm.parent()));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getElementByAttributeValue: function (tagName, attributeName, attributeValue) {
|
||||
var elements = this.editorDoc.getElementsByTagName(tagName);
|
||||
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
var value = elements[i].getAttribute(attributeName);
|
||||
|
||||
if ($.browser.msie) { /** IE add full path, so I check by the last chars. */
|
||||
value = value.substr(value.length - attributeValue.length);
|
||||
}
|
||||
|
||||
if (value == attributeValue) return elements[i];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
@ -1,10 +0,0 @@
|
||||
function clearUsername(){
|
||||
if(document.getElementById("userForm").value == "username"){
|
||||
document.getElementById("userForm").value = "";
|
||||
}
|
||||
}
|
||||
function clearPassword(){
|
||||
if(document.getElementById("passForm").value == "password"){
|
||||
document.getElementById("passForm").value = "";
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
/*
|
||||
Highcharts JS v2.1.6 (2011-07-08)
|
||||
Exporting module
|
||||
|
||||
(c) 2010-2011 Torstein H?nsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(){var k=Highcharts,y=k.Chart,C=k.addEvent,t=k.createElement,z=k.discardElement,u=k.css,w=k.merge,p=k.each,r=k.extend,D=Math.max,s=document,E=window,A="ontouchstart"in s.documentElement,B=k.setOptions({lang:{downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",exportButtonTitle:"Export to raster or vector image",printButtonTitle:"Print the chart"}});B.navigation={menuStyle:{border:"1px solid #A0A0A0",
|
||||
background:"#FFFFFF"},menuItemStyle:{padding:"0 5px",background:"none",color:"#303030",fontSize:A?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{align:"right",backgroundColor:{linearGradient:[0,0,0,20],stops:[[0.4,"#F7F7F7"],[0.6,"#E3E3E3"]]},borderColor:"#B0B0B0",borderRadius:3,borderWidth:1,height:20,hoverBorderColor:"#909090",hoverSymbolFill:"#81A7CF",hoverSymbolStroke:"#4572A5",symbolFill:"#E0E0E0",symbolStroke:"#A0A0A0",symbolX:11.5,symbolY:10.5,verticalAlign:"top",
|
||||
width:24,y:10}};B.exporting={type:"image/png",url:"http://export.highcharts.com/",width:800,enableImages:false,buttons:{exportButton:{symbol:"exportIcon",x:-10,symbolFill:"#A8BF77",hoverSymbolFill:"#768F3E",_titleKey:"exportButtonTitle",menuItems:[{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",
|
||||
onclick:function(){this.exportChart({type:"image/svg+xml"})}}]},printButton:{symbol:"printIcon",x:-36,symbolFill:"#B5C9DF",hoverSymbolFill:"#779ABF",_titleKey:"printButtonTitle",onclick:function(){this.print()}}}};r(y.prototype,{getSVG:function(b){var c=this,a,f,d,l,e,j,h=w(c.options,b);if(!s.createElementNS)s.createElementNS=function(i,g){var o=s.createElement(g);o.getBBox=function(){return k.Renderer.prototype.Element.prototype.getBBox.apply({element:o})};return o};b=t("div",null,{position:"absolute",
|
||||
top:"-9999em",width:c.chartWidth+"px",height:c.chartHeight+"px"},s.body);r(h.chart,{renderTo:b,forExport:true});h.exporting.enabled=false;if(!h.exporting.enableImages)h.chart.plotBackgroundImage=null;h.series=[];p(c.series,function(i){d=i.options;d.animation=false;d.showCheckbox=false;d.visible=i.visible;if(!h.exporting.enableImages)if(d&&d.marker&&/^url\(/.test(d.marker.symbol))d.marker.symbol="circle";d.data=[];p(i.data,function(g){l=g.config;e={x:g.x,y:g.y,name:g.name};typeof l=="object"&&g.config&&
|
||||
l.constructor!=Array&&r(e,l);e.visible=g.visible;d.data.push(e);if(!h.exporting.enableImages)(j=g.config&&g.config.marker)&&/^url\(/.test(j.symbol)&&delete j.symbol});h.series.push(d)});a=new Highcharts.Chart(h);p(["xAxis","yAxis"],function(i){p(c[i],function(g,o){var n=a[i][o],m=g.getExtremes(),q=m.userMin;m=m.userMax;if(q!==undefined||m!==undefined)n.setExtremes(q,m,true,false)})});f=a.container.innerHTML;h=null;a.destroy();z(b);f=f.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,
|
||||
"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/isTracker="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ href=/g," xlink:href=").replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" ]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/<img ([^>]*)>/gi,"<image $1 />").replace(/<\/image>/g,"").replace(/<image ([^>]*)([^\/])>/gi,"<image $1$2 />").replace(/width=(\d+)/g,'width="$1"').replace(/height=(\d+)/g,
|
||||
'height="$1"').replace(/hc-svg-href="/g,'xlink:href="').replace(/style="([^"]+)"/g,function(i){return i.toLowerCase()});f=f.replace(/(url\(#highcharts-[0-9]+)"/g,"$1").replace(/"/g,"'");if(f.match(/ xmlns="/g).length==2)f=f.replace(/xmlns="[^"]+"/,"");return f},exportChart:function(b,c){var a,f=this.getSVG(c);b=w(this.options.exporting,b);a=t("form",{method:"post",action:b.url},{display:"none"},s.body);p(["filename","type","width","svg"],function(d){t("input",{type:"hidden",name:d,value:{filename:b.filename||
|
||||
"chart",type:b.type,width:b.width,svg:f}[d]},null,a)});a.submit();z(a)},print:function(){var b=this,c=b.container,a=[],f=c.parentNode,d=s.body,l=d.childNodes;if(!b.isPrinting){b.isPrinting=true;p(l,function(e,j){if(e.nodeType==1){a[j]=e.style.display;e.style.display="none"}});d.appendChild(c);E.print();setTimeout(function(){f.appendChild(c);p(l,function(e,j){if(e.nodeType==1)e.style.display=a[j]});b.isPrinting=false},1E3)}},contextMenu:function(b,c,a,f,d,l){var e=this,j=e.options.navigation,h=j.menuItemStyle,
|
||||
i=e.chartWidth,g=e.chartHeight,o="cache-"+b,n=e[o],m=D(d,l),q,x;if(!n){e[o]=n=t("div",{className:"highcharts-"+b},{position:"absolute",zIndex:1E3,padding:m+"px"},e.container);q=t("div",null,r({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},j.menuStyle),n);x=function(){u(n,{display:"none"})};C(n,"mouseleave",x);p(c,function(v){if(v)t("div",{onmouseover:function(){u(this,j.menuItemHoverStyle)},onmouseout:function(){u(this,h)},innerHTML:v.text||k.getOptions().lang[v.textKey]},
|
||||
r({cursor:"pointer"},h),q)[A?"ontouchstart":"onclick"]=function(){x();v.onclick.apply(e,arguments)}});e.exportMenuWidth=n.offsetWidth;e.exportMenuHeight=n.offsetHeight}b={display:"block"};if(a+e.exportMenuWidth>i)b.right=i-a-d-m+"px";else b.left=a-m+"px";if(f+l+e.exportMenuHeight>g)b.bottom=g-f-m+"px";else b.top=f+l-m+"px";u(n,b)},addButton:function(b){function c(){g.attr(m);i.attr(n)}var a=this,f=a.renderer,d=w(a.options.navigation.buttonOptions,b),l=d.onclick,e=d.menuItems,j=d.width,h=d.height,
|
||||
i,g,o;b=d.borderWidth;var n={stroke:d.borderColor},m={stroke:d.symbolStroke,fill:d.symbolFill};if(d.enabled!==false){i=f.rect(0,0,j,h,d.borderRadius,b).align(d,true).attr(r({fill:d.backgroundColor,"stroke-width":b,zIndex:19},n)).add();o=f.rect(0,0,j,h,0).align(d).attr({fill:"rgba(255, 255, 255, 0.001)",title:k.getOptions().lang[d._titleKey],zIndex:21}).css({cursor:"pointer"}).on("mouseover",function(){g.attr({stroke:d.hoverSymbolStroke,fill:d.hoverSymbolFill});i.attr({stroke:d.hoverBorderColor})}).on("mouseout",
|
||||
c).on("click",c).add();if(e)l=function(){c();var q=o.getBBox();a.contextMenu("export-menu",e,q.x,q.y,j,h)};o.on("click",function(){l.apply(a,arguments)});g=f.symbol(d.symbol,d.symbolX,d.symbolY,(d.symbolSize||12)/2).align(d,true).attr(r(m,{"stroke-width":d.symbolStrokeWidth||1,zIndex:20})).add()}}});k.Renderer.prototype.symbols.exportIcon=function(b,c,a){return["M",b-a,c+a,"L",b+a,c+a,b+a,c+a*0.5,b-a,c+a*0.5,"Z","M",b,c+a*0.5,"L",b-a*0.5,c-a/3,b-a/6,c-a/3,b-a/6,c-a,b+a/6,c-a,b+a/6,c-a/3,b+a*0.5,c-
|
||||
a/3,"Z"]};k.Renderer.prototype.symbols.printIcon=function(b,c,a){return["M",b-a,c+a*0.5,"L",b+a,c+a*0.5,b+a,c-a/3,b-a,c-a/3,"Z","M",b-a*0.5,c-a/3,"L",b-a*0.5,c-a,b+a*0.5,c-a,b+a*0.5,c-a/3,"Z","M",b-a*0.5,c+a*0.5,"L",b-a*0.75,c+a,b+a*0.75,c+a,b+a*0.5,c+a*0.5,"Z"]};y.prototype.callbacks.push(function(b){var c,a=b.options.exporting,f=a.buttons;if(a.enabled!==false)for(c in f)b.addButton(f[c])})})();
|
||||
@ -1,703 +0,0 @@
|
||||
/**
|
||||
* @license Highcharts JS v2.1.6 (2011-07-08)
|
||||
* Exporting module
|
||||
*
|
||||
* (c) 2010-2011 Torstein Hønsi
|
||||
*
|
||||
* License: www.highcharts.com/license
|
||||
*/
|
||||
|
||||
// JSLint options:
|
||||
/*global Highcharts, document, window, Math, setTimeout */
|
||||
|
||||
(function() { // encapsulate
|
||||
|
||||
// create shortcuts
|
||||
var HC = Highcharts,
|
||||
Chart = HC.Chart,
|
||||
addEvent = HC.addEvent,
|
||||
createElement = HC.createElement,
|
||||
discardElement = HC.discardElement,
|
||||
css = HC.css,
|
||||
merge = HC.merge,
|
||||
each = HC.each,
|
||||
extend = HC.extend,
|
||||
math = Math,
|
||||
mathMax = math.max,
|
||||
doc = document,
|
||||
win = window,
|
||||
hasTouch = 'ontouchstart' in doc.documentElement,
|
||||
M = 'M',
|
||||
L = 'L',
|
||||
DIV = 'div',
|
||||
HIDDEN = 'hidden',
|
||||
NONE = 'none',
|
||||
PREFIX = 'highcharts-',
|
||||
ABSOLUTE = 'absolute',
|
||||
PX = 'px',
|
||||
UNDEFINED = undefined,
|
||||
|
||||
// Add language and get the defaultOptions
|
||||
defaultOptions = HC.setOptions({
|
||||
lang: {
|
||||
downloadPNG: 'Download PNG image',
|
||||
downloadJPEG: 'Download JPEG image',
|
||||
downloadPDF: 'Download PDF document',
|
||||
downloadSVG: 'Download SVG vector image',
|
||||
exportButtonTitle: 'Export to raster or vector image',
|
||||
printButtonTitle: 'Print the chart'
|
||||
}
|
||||
});
|
||||
|
||||
// Buttons and menus are collected in a separate config option set called 'navigation'.
|
||||
// This can be extended later to add control buttons like zoom and pan right click menus.
|
||||
defaultOptions.navigation = {
|
||||
menuStyle: {
|
||||
border: '1px solid #A0A0A0',
|
||||
background: '#FFFFFF'
|
||||
},
|
||||
menuItemStyle: {
|
||||
padding: '0 5px',
|
||||
background: NONE,
|
||||
color: '#303030',
|
||||
fontSize: hasTouch ? '14px' : '11px'
|
||||
},
|
||||
menuItemHoverStyle: {
|
||||
background: '#4572A5',
|
||||
color: '#FFFFFF'
|
||||
},
|
||||
|
||||
buttonOptions: {
|
||||
align: 'right',
|
||||
backgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#F7F7F7'],
|
||||
[0.6, '#E3E3E3']
|
||||
]
|
||||
},
|
||||
borderColor: '#B0B0B0',
|
||||
borderRadius: 3,
|
||||
borderWidth: 1,
|
||||
//enabled: true,
|
||||
height: 20,
|
||||
hoverBorderColor: '#909090',
|
||||
hoverSymbolFill: '#81A7CF',
|
||||
hoverSymbolStroke: '#4572A5',
|
||||
symbolFill: '#E0E0E0',
|
||||
//symbolSize: 12,
|
||||
symbolStroke: '#A0A0A0',
|
||||
//symbolStrokeWidth: 1,
|
||||
symbolX: 11.5,
|
||||
symbolY: 10.5,
|
||||
verticalAlign: 'top',
|
||||
width: 24,
|
||||
y: 10
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Add the export related options
|
||||
defaultOptions.exporting = {
|
||||
//enabled: true,
|
||||
//filename: 'chart',
|
||||
type: 'image/png',
|
||||
url: 'http://export.highcharts.com/',
|
||||
width: 800,
|
||||
enableImages: false,
|
||||
buttons: {
|
||||
exportButton: {
|
||||
//enabled: true,
|
||||
symbol: 'exportIcon',
|
||||
x: -10,
|
||||
symbolFill: '#A8BF77',
|
||||
hoverSymbolFill: '#768F3E',
|
||||
_titleKey: 'exportButtonTitle',
|
||||
menuItems: [{
|
||||
textKey: 'downloadPNG',
|
||||
onclick: function() {
|
||||
this.exportChart();
|
||||
}
|
||||
}, {
|
||||
textKey: 'downloadJPEG',
|
||||
onclick: function() {
|
||||
this.exportChart({
|
||||
type: 'image/jpeg'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
textKey: 'downloadPDF',
|
||||
onclick: function() {
|
||||
this.exportChart({
|
||||
type: 'application/pdf'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
textKey: 'downloadSVG',
|
||||
onclick: function() {
|
||||
this.exportChart({
|
||||
type: 'image/svg+xml'
|
||||
});
|
||||
}
|
||||
}/*, {
|
||||
text: 'View SVG',
|
||||
onclick: function() {
|
||||
var svg = this.getSVG()
|
||||
.replace(/</g, '\n<')
|
||||
.replace(/>/g, '>');
|
||||
|
||||
doc.body.innerHTML = '<pre>'+ svg +'</pre>';
|
||||
}
|
||||
}*/]
|
||||
|
||||
},
|
||||
printButton: {
|
||||
//enabled: true,
|
||||
symbol: 'printIcon',
|
||||
x: -36,
|
||||
symbolFill: '#B5C9DF',
|
||||
hoverSymbolFill: '#779ABF',
|
||||
_titleKey: 'printButtonTitle',
|
||||
onclick: function() {
|
||||
this.print();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
extend(Chart.prototype, {
|
||||
/**
|
||||
* Return an SVG representation of the chart
|
||||
*
|
||||
* @param additionalOptions {Object} Additional chart options for the generated SVG representation
|
||||
*/
|
||||
getSVG: function(additionalOptions) {
|
||||
var chart = this,
|
||||
chartCopy,
|
||||
sandbox,
|
||||
svg,
|
||||
seriesOptions,
|
||||
config,
|
||||
pointOptions,
|
||||
pointMarker,
|
||||
options = merge(chart.options, additionalOptions); // copy the options and add extra options
|
||||
|
||||
// IE compatibility hack for generating SVG content that it doesn't really understand
|
||||
if (!doc.createElementNS) {
|
||||
doc.createElementNS = function(ns, tagName) {
|
||||
var elem = doc.createElement(tagName);
|
||||
elem.getBBox = function() {
|
||||
return HC.Renderer.prototype.Element.prototype.getBBox.apply({ element: elem });
|
||||
};
|
||||
return elem;
|
||||
};
|
||||
}
|
||||
|
||||
// create a sandbox where a new chart will be generated
|
||||
sandbox = createElement(DIV, null, {
|
||||
position: ABSOLUTE,
|
||||
top: '-9999em',
|
||||
width: chart.chartWidth + PX,
|
||||
height: chart.chartHeight + PX
|
||||
}, doc.body);
|
||||
|
||||
// override some options
|
||||
extend(options.chart, {
|
||||
renderTo: sandbox,
|
||||
forExport: true
|
||||
});
|
||||
options.exporting.enabled = false; // hide buttons in print
|
||||
|
||||
if (!options.exporting.enableImages) {
|
||||
options.chart.plotBackgroundImage = null; // the converter doesn't handle images
|
||||
}
|
||||
|
||||
// prepare for replicating the chart
|
||||
options.series = [];
|
||||
each(chart.series, function(serie) {
|
||||
seriesOptions = serie.options;
|
||||
|
||||
seriesOptions.animation = false; // turn off animation
|
||||
seriesOptions.showCheckbox = false;
|
||||
seriesOptions.visible = serie.visible;
|
||||
|
||||
if (!options.exporting.enableImages) {
|
||||
// remove image markers
|
||||
if (seriesOptions && seriesOptions.marker && /^url\(/.test(seriesOptions.marker.symbol)) {
|
||||
seriesOptions.marker.symbol = 'circle';
|
||||
}
|
||||
}
|
||||
|
||||
seriesOptions.data = [];
|
||||
|
||||
each(serie.data, function(point) {
|
||||
|
||||
// extend the options by those values that can be expressed in a number or array config
|
||||
config = point.config;
|
||||
pointOptions = {
|
||||
x: point.x,
|
||||
y: point.y,
|
||||
name: point.name
|
||||
};
|
||||
|
||||
if (typeof config == 'object' && point.config && config.constructor != Array) {
|
||||
extend(pointOptions, config);
|
||||
}
|
||||
|
||||
pointOptions.visible = point.visible;
|
||||
seriesOptions.data.push(pointOptions); // copy fresh updated data
|
||||
|
||||
if (!options.exporting.enableImages) {
|
||||
// remove image markers
|
||||
pointMarker = point.config && point.config.marker;
|
||||
if (pointMarker && /^url\(/.test(pointMarker.symbol)) {
|
||||
delete pointMarker.symbol;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
options.series.push(seriesOptions);
|
||||
});
|
||||
|
||||
// generate the chart copy
|
||||
chartCopy = new Highcharts.Chart(options);
|
||||
|
||||
// reflect axis extremes in the export
|
||||
each(['xAxis', 'yAxis'], function(axisType) {
|
||||
each (chart[axisType], function(axis, i) {
|
||||
var axisCopy = chartCopy[axisType][i],
|
||||
extremes = axis.getExtremes(),
|
||||
userMin = extremes.userMin,
|
||||
userMax = extremes.userMax;
|
||||
|
||||
if (userMin !== UNDEFINED || userMax !== UNDEFINED) {
|
||||
axisCopy.setExtremes(userMin, userMax, true, false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// get the SVG from the container's innerHTML
|
||||
svg = chartCopy.container.innerHTML;
|
||||
|
||||
// free up memory
|
||||
options = null;
|
||||
chartCopy.destroy();
|
||||
discardElement(sandbox);
|
||||
|
||||
// sanitize
|
||||
svg = svg
|
||||
.replace(/zIndex="[^"]+"/g, '')
|
||||
.replace(/isShadow="[^"]+"/g, '')
|
||||
.replace(/symbolName="[^"]+"/g, '')
|
||||
.replace(/jQuery[0-9]+="[^"]+"/g, '')
|
||||
.replace(/isTracker="[^"]+"/g, '')
|
||||
.replace(/url\([^#]+#/g, 'url(#')
|
||||
.replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
|
||||
.replace(/ href=/g, ' xlink:href=')
|
||||
/*.replace(/preserveAspectRatio="none">/g, 'preserveAspectRatio="none"/>')*/
|
||||
/* This fails in IE < 8
|
||||
.replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
|
||||
return s2 +'.'+ s3[0];
|
||||
})*/
|
||||
|
||||
// IE specific
|
||||
.replace(/id=([^" >]+)/g, 'id="$1"')
|
||||
.replace(/class=([^" ]+)/g, 'class="$1"')
|
||||
.replace(/ transform /g, ' ')
|
||||
.replace(/:(path|rect)/g, '$1')
|
||||
.replace(/<img ([^>]*)>/gi, '<image $1 />')
|
||||
.replace(/<\/image>/g, '') // remove closing tags for images as they'll never have any content
|
||||
.replace(/<image ([^>]*)([^\/])>/gi, '<image $1$2 />') // closes image tags for firefox
|
||||
.replace(/width=(\d+)/g, 'width="$1"')
|
||||
.replace(/height=(\d+)/g, 'height="$1"')
|
||||
.replace(/hc-svg-href="/g, 'xlink:href="')
|
||||
.replace(/style="([^"]+)"/g, function(s) {
|
||||
return s.toLowerCase();
|
||||
});
|
||||
|
||||
// IE9 beta bugs with innerHTML. Test again with final IE9.
|
||||
svg = svg.replace(/(url\(#highcharts-[0-9]+)"/g, '$1')
|
||||
.replace(/"/g, "'");
|
||||
if (svg.match(/ xmlns="/g).length == 2) {
|
||||
svg = svg.replace(/xmlns="[^"]+"/, '');
|
||||
}
|
||||
|
||||
return svg;
|
||||
},
|
||||
|
||||
/**
|
||||
* Submit the SVG representation of the chart to the server
|
||||
* @param {Object} options Exporting options. Possible members are url, type and width.
|
||||
* @param {Object} chartOptions Additional chart options for the SVG representation of the chart
|
||||
*/
|
||||
exportChart: function(options, chartOptions) {
|
||||
var form,
|
||||
chart = this,
|
||||
svg = chart.getSVG(chartOptions);
|
||||
|
||||
// merge the options
|
||||
options = merge(chart.options.exporting, options);
|
||||
|
||||
// create the form
|
||||
form = createElement('form', {
|
||||
method: 'post',
|
||||
action: options.url
|
||||
}, {
|
||||
display: NONE
|
||||
}, doc.body);
|
||||
|
||||
// add the values
|
||||
each(['filename', 'type', 'width', 'svg'], function(name) {
|
||||
createElement('input', {
|
||||
type: HIDDEN,
|
||||
name: name,
|
||||
value: {
|
||||
filename: options.filename || 'chart',
|
||||
type: options.type,
|
||||
width: options.width,
|
||||
svg: svg
|
||||
}[name]
|
||||
}, null, form);
|
||||
});
|
||||
|
||||
// submit
|
||||
form.submit();
|
||||
|
||||
// clean up
|
||||
discardElement(form);
|
||||
},
|
||||
|
||||
/**
|
||||
* Print the chart
|
||||
*/
|
||||
print: function() {
|
||||
|
||||
var chart = this,
|
||||
container = chart.container,
|
||||
origDisplay = [],
|
||||
origParent = container.parentNode,
|
||||
body = doc.body,
|
||||
childNodes = body.childNodes;
|
||||
|
||||
if (chart.isPrinting) { // block the button while in printing mode
|
||||
return;
|
||||
}
|
||||
|
||||
chart.isPrinting = true;
|
||||
|
||||
// hide all body content
|
||||
each(childNodes, function(node, i) {
|
||||
if (node.nodeType == 1) {
|
||||
origDisplay[i] = node.style.display;
|
||||
node.style.display = NONE;
|
||||
}
|
||||
});
|
||||
|
||||
// pull out the chart
|
||||
body.appendChild(container);
|
||||
|
||||
// print
|
||||
win.print();
|
||||
|
||||
// allow the browser to prepare before reverting
|
||||
setTimeout(function() {
|
||||
|
||||
// put the chart back in
|
||||
origParent.appendChild(container);
|
||||
|
||||
// restore all body content
|
||||
each(childNodes, function(node, i) {
|
||||
if (node.nodeType == 1) {
|
||||
node.style.display = origDisplay[i];
|
||||
}
|
||||
});
|
||||
|
||||
chart.isPrinting = false;
|
||||
|
||||
}, 1000);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Display a popup menu for choosing the export type
|
||||
*
|
||||
* @param {String} name An identifier for the menu
|
||||
* @param {Array} items A collection with text and onclicks for the items
|
||||
* @param {Number} x The x position of the opener button
|
||||
* @param {Number} y The y position of the opener button
|
||||
* @param {Number} width The width of the opener button
|
||||
* @param {Number} height The height of the opener button
|
||||
*/
|
||||
contextMenu: function(name, items, x, y, width, height) {
|
||||
var chart = this,
|
||||
navOptions = chart.options.navigation,
|
||||
menuItemStyle = navOptions.menuItemStyle,
|
||||
chartWidth = chart.chartWidth,
|
||||
chartHeight = chart.chartHeight,
|
||||
cacheName = 'cache-'+ name,
|
||||
menu = chart[cacheName],
|
||||
menuPadding = mathMax(width, height), // for mouse leave detection
|
||||
boxShadow = '3px 3px 10px #888',
|
||||
innerMenu,
|
||||
hide,
|
||||
menuStyle;
|
||||
|
||||
// create the menu only the first time
|
||||
if (!menu) {
|
||||
|
||||
// create a HTML element above the SVG
|
||||
chart[cacheName] = menu = createElement(DIV, {
|
||||
className: PREFIX + name
|
||||
}, {
|
||||
position: ABSOLUTE,
|
||||
zIndex: 1000,
|
||||
padding: menuPadding + PX
|
||||
}, chart.container);
|
||||
|
||||
innerMenu = createElement(DIV, null,
|
||||
extend({
|
||||
MozBoxShadow: boxShadow,
|
||||
WebkitBoxShadow: boxShadow,
|
||||
boxShadow: boxShadow
|
||||
}, navOptions.menuStyle) , menu);
|
||||
|
||||
// hide on mouse out
|
||||
hide = function() {
|
||||
css(menu, { display: NONE });
|
||||
};
|
||||
|
||||
addEvent(menu, 'mouseleave', hide);
|
||||
|
||||
|
||||
// create the items
|
||||
each(items, function(item) {
|
||||
if (item) {
|
||||
var div = createElement(DIV, {
|
||||
onmouseover: function() {
|
||||
css(this, navOptions.menuItemHoverStyle);
|
||||
},
|
||||
onmouseout: function() {
|
||||
css(this, menuItemStyle);
|
||||
},
|
||||
innerHTML: item.text || HC.getOptions().lang[item.textKey]
|
||||
}, extend({
|
||||
cursor: 'pointer'
|
||||
}, menuItemStyle), innerMenu);
|
||||
|
||||
div[hasTouch ? 'ontouchstart' : 'onclick'] = function() {
|
||||
hide();
|
||||
item.onclick.apply(chart, arguments);
|
||||
};
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
chart.exportMenuWidth = menu.offsetWidth;
|
||||
chart.exportMenuHeight = menu.offsetHeight;
|
||||
}
|
||||
|
||||
menuStyle = { display: 'block' };
|
||||
|
||||
// if outside right, right align it
|
||||
if (x + chart.exportMenuWidth > chartWidth) {
|
||||
menuStyle.right = (chartWidth - x - width - menuPadding) + PX;
|
||||
} else {
|
||||
menuStyle.left = (x - menuPadding) + PX;
|
||||
}
|
||||
// if outside bottom, bottom align it
|
||||
if (y + height + chart.exportMenuHeight > chartHeight) {
|
||||
menuStyle.bottom = (chartHeight - y - menuPadding) + PX;
|
||||
} else {
|
||||
menuStyle.top = (y + height - menuPadding) + PX;
|
||||
}
|
||||
|
||||
css(menu, menuStyle);
|
||||
},
|
||||
|
||||
/**
|
||||
* Add the export button to the chart
|
||||
*/
|
||||
addButton: function(options) {
|
||||
var chart = this,
|
||||
renderer = chart.renderer,
|
||||
btnOptions = merge(chart.options.navigation.buttonOptions, options),
|
||||
onclick = btnOptions.onclick,
|
||||
menuItems = btnOptions.menuItems,
|
||||
/*position = chart.getAlignment(btnOptions),
|
||||
buttonLeft = position.x,
|
||||
buttonTop = position.y,*/
|
||||
buttonWidth = btnOptions.width,
|
||||
buttonHeight = btnOptions.height,
|
||||
box,
|
||||
symbol,
|
||||
button,
|
||||
borderWidth = btnOptions.borderWidth,
|
||||
boxAttr = {
|
||||
stroke: btnOptions.borderColor
|
||||
|
||||
},
|
||||
symbolAttr = {
|
||||
stroke: btnOptions.symbolStroke,
|
||||
fill: btnOptions.symbolFill
|
||||
};
|
||||
|
||||
if (btnOptions.enabled === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
// element to capture the click
|
||||
function revert() {
|
||||
symbol.attr(symbolAttr);
|
||||
box.attr(boxAttr);
|
||||
}
|
||||
|
||||
// the box border
|
||||
box = renderer.rect(
|
||||
0,
|
||||
0,
|
||||
buttonWidth,
|
||||
buttonHeight,
|
||||
btnOptions.borderRadius,
|
||||
borderWidth
|
||||
)
|
||||
//.translate(buttonLeft, buttonTop) // to allow gradients
|
||||
.align(btnOptions, true)
|
||||
.attr(extend({
|
||||
fill: btnOptions.backgroundColor,
|
||||
'stroke-width': borderWidth,
|
||||
zIndex: 19
|
||||
}, boxAttr)).add();
|
||||
|
||||
// the invisible element to track the clicks
|
||||
button = renderer.rect(
|
||||
0,
|
||||
0,
|
||||
buttonWidth,
|
||||
buttonHeight,
|
||||
0
|
||||
)
|
||||
.align(btnOptions)
|
||||
.attr({
|
||||
fill: 'rgba(255, 255, 255, 0.001)',
|
||||
title: HC.getOptions().lang[btnOptions._titleKey],
|
||||
zIndex: 21
|
||||
}).css({
|
||||
cursor: 'pointer'
|
||||
})
|
||||
.on('mouseover', function() {
|
||||
symbol.attr({
|
||||
stroke: btnOptions.hoverSymbolStroke,
|
||||
fill: btnOptions.hoverSymbolFill
|
||||
});
|
||||
box.attr({
|
||||
stroke: btnOptions.hoverBorderColor
|
||||
});
|
||||
})
|
||||
.on('mouseout', revert)
|
||||
.on('click', revert)
|
||||
.add();
|
||||
|
||||
//addEvent(button.element, 'click', revert);
|
||||
|
||||
// add the click event
|
||||
if (menuItems) {
|
||||
onclick = function(e) {
|
||||
revert();
|
||||
var bBox = button.getBBox();
|
||||
chart.contextMenu('export-menu', menuItems, bBox.x, bBox.y, buttonWidth, buttonHeight);
|
||||
};
|
||||
}
|
||||
/*addEvent(button.element, 'click', function() {
|
||||
onclick.apply(chart, arguments);
|
||||
});*/
|
||||
button.on('click', function() {
|
||||
onclick.apply(chart, arguments);
|
||||
});
|
||||
|
||||
// the icon
|
||||
symbol = renderer.symbol(
|
||||
btnOptions.symbol,
|
||||
btnOptions.symbolX,
|
||||
btnOptions.symbolY,
|
||||
(btnOptions.symbolSize || 12) / 2
|
||||
)
|
||||
.align(btnOptions, true)
|
||||
.attr(extend(symbolAttr, {
|
||||
'stroke-width': btnOptions.symbolStrokeWidth || 1,
|
||||
zIndex: 20
|
||||
})).add();
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// Create the export icon
|
||||
HC.Renderer.prototype.symbols.exportIcon = function(x, y, radius) {
|
||||
return [
|
||||
M, // the disk
|
||||
x - radius, y + radius,
|
||||
L,
|
||||
x + radius, y + radius,
|
||||
x + radius, y + radius * 0.5,
|
||||
x - radius, y + radius * 0.5,
|
||||
'Z',
|
||||
M, // the arrow
|
||||
x, y + radius * 0.5,
|
||||
L,
|
||||
x - radius * 0.5, y - radius / 3,
|
||||
x - radius / 6, y - radius / 3,
|
||||
x - radius / 6, y - radius,
|
||||
x + radius / 6, y - radius,
|
||||
x + radius / 6, y - radius / 3,
|
||||
x + radius * 0.5, y - radius / 3,
|
||||
'Z'
|
||||
];
|
||||
};
|
||||
// Create the print icon
|
||||
HC.Renderer.prototype.symbols.printIcon = function(x, y, radius) {
|
||||
return [
|
||||
M, // the printer
|
||||
x - radius, y + radius * 0.5,
|
||||
L,
|
||||
x + radius, y + radius * 0.5,
|
||||
x + radius, y - radius / 3,
|
||||
x - radius, y - radius / 3,
|
||||
'Z',
|
||||
M, // the upper sheet
|
||||
x - radius * 0.5, y - radius / 3,
|
||||
L,
|
||||
x - radius * 0.5, y - radius,
|
||||
x + radius * 0.5, y - radius,
|
||||
x + radius * 0.5, y - radius / 3,
|
||||
'Z',
|
||||
M, // the lower sheet
|
||||
x - radius * 0.5, y + radius * 0.5,
|
||||
L,
|
||||
x - radius * 0.75, y + radius,
|
||||
x + radius * 0.75, y + radius,
|
||||
x + radius * 0.5, y + radius * 0.5,
|
||||
'Z'
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
// Add the buttons on chart load
|
||||
Chart.prototype.callbacks.push(function(chart) {
|
||||
var n,
|
||||
exportingOptions = chart.options.exporting,
|
||||
buttons = exportingOptions.buttons;
|
||||
|
||||
if (exportingOptions.enabled !== false) {
|
||||
|
||||
for (n in buttons) {
|
||||
chart.addButton(buttons[n]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})();
|
||||
@ -1,268 +0,0 @@
|
||||
/**
|
||||
* Dark blue theme for Highcharts JS
|
||||
* @author Torstein Hønsi
|
||||
*/
|
||||
|
||||
Highcharts.theme = {
|
||||
colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
|
||||
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
|
||||
chart: {
|
||||
backgroundColor: {
|
||||
linearGradient: [0, 0, 250, 500],
|
||||
stops: [
|
||||
[0, 'rgb(48, 48, 96)'],
|
||||
[1, 'rgb(0, 0, 0)']
|
||||
]
|
||||
},
|
||||
borderColor: '#000000',
|
||||
borderWidth: 2,
|
||||
className: 'dark-container',
|
||||
plotBackgroundColor: 'rgba(255, 255, 255, .1)',
|
||||
plotBorderColor: '#CCCCCC',
|
||||
plotBorderWidth: 1
|
||||
},
|
||||
title: {
|
||||
style: {
|
||||
color: '#C0C0C0',
|
||||
font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
|
||||
}
|
||||
},
|
||||
subtitle: {
|
||||
style: {
|
||||
color: '#666666',
|
||||
font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
gridLineColor: '#333333',
|
||||
gridLineWidth: 1,
|
||||
labels: {
|
||||
style: {
|
||||
color: '#A0A0A0'
|
||||
}
|
||||
},
|
||||
lineColor: '#A0A0A0',
|
||||
tickColor: '#A0A0A0',
|
||||
title: {
|
||||
style: {
|
||||
color: '#CCC',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '12px',
|
||||
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
gridLineColor: '#333333',
|
||||
labels: {
|
||||
style: {
|
||||
color: '#A0A0A0'
|
||||
}
|
||||
},
|
||||
lineColor: '#A0A0A0',
|
||||
minorTickInterval: null,
|
||||
tickColor: '#A0A0A0',
|
||||
tickWidth: 1,
|
||||
title: {
|
||||
style: {
|
||||
color: '#CCC',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '12px',
|
||||
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
itemStyle: {
|
||||
font: '9pt Trebuchet MS, Verdana, sans-serif',
|
||||
color: '#A0A0A0'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.75)',
|
||||
style: {
|
||||
color: '#F0F0F0'
|
||||
}
|
||||
},
|
||||
toolbar: {
|
||||
itemStyle: {
|
||||
color: 'silver'
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
line: {
|
||||
dataLabels: {
|
||||
color: '#CCC'
|
||||
},
|
||||
marker: {
|
||||
lineColor: '#333'
|
||||
}
|
||||
},
|
||||
spline: {
|
||||
marker: {
|
||||
lineColor: '#333'
|
||||
}
|
||||
},
|
||||
scatter: {
|
||||
marker: {
|
||||
lineColor: '#333'
|
||||
}
|
||||
},
|
||||
candlestick: {
|
||||
lineColor: 'white'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
itemStyle: {
|
||||
color: '#CCC'
|
||||
},
|
||||
itemHoverStyle: {
|
||||
color: '#FFF'
|
||||
},
|
||||
itemHiddenStyle: {
|
||||
color: '#444'
|
||||
}
|
||||
},
|
||||
credits: {
|
||||
style: {
|
||||
color: '#666'
|
||||
}
|
||||
},
|
||||
labels: {
|
||||
style: {
|
||||
color: '#CCC'
|
||||
}
|
||||
},
|
||||
|
||||
navigation: {
|
||||
buttonOptions: {
|
||||
backgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#606060'],
|
||||
[0.6, '#333333']
|
||||
]
|
||||
},
|
||||
borderColor: '#000000',
|
||||
symbolStroke: '#C0C0C0',
|
||||
hoverSymbolStroke: '#FFFFFF'
|
||||
}
|
||||
},
|
||||
|
||||
exporting: {
|
||||
buttons: {
|
||||
exportButton: {
|
||||
symbolFill: '#55BE3B'
|
||||
},
|
||||
printButton: {
|
||||
symbolFill: '#7797BE'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// scroll charts
|
||||
rangeSelector: {
|
||||
buttonTheme: {
|
||||
fill: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#888'],
|
||||
[0.6, '#555']
|
||||
]
|
||||
},
|
||||
stroke: '#000000',
|
||||
style: {
|
||||
color: '#CCC',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
states: {
|
||||
hover: {
|
||||
fill: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#BBB'],
|
||||
[0.6, '#888']
|
||||
]
|
||||
},
|
||||
stroke: '#000000',
|
||||
style: {
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
select: {
|
||||
fill: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.1, '#000'],
|
||||
[0.3, '#333']
|
||||
]
|
||||
},
|
||||
stroke: '#000000',
|
||||
style: {
|
||||
color: 'yellow'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
inputStyle: {
|
||||
backgroundColor: '#333',
|
||||
color: 'silver'
|
||||
},
|
||||
labelStyle: {
|
||||
color: 'silver'
|
||||
}
|
||||
},
|
||||
|
||||
navigator: {
|
||||
handles: {
|
||||
backgroundColor: '#666',
|
||||
borderColor: '#AAA'
|
||||
},
|
||||
outlineColor: '#CCC',
|
||||
maskFill: 'rgba(16, 16, 16, 0.5)',
|
||||
series: {
|
||||
color: '#7798BF',
|
||||
lineColor: '#A6C7ED'
|
||||
}
|
||||
},
|
||||
|
||||
scrollbar: {
|
||||
barBackgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#888'],
|
||||
[0.6, '#555']
|
||||
]
|
||||
},
|
||||
barBorderColor: '#CCC',
|
||||
buttonArrowColor: '#CCC',
|
||||
buttonBackgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#888'],
|
||||
[0.6, '#555']
|
||||
]
|
||||
},
|
||||
buttonBorderColor: '#CCC',
|
||||
rifleColor: '#FFF',
|
||||
trackBackgroundColor: {
|
||||
linearGradient: [0, 0, 0, 10],
|
||||
stops: [
|
||||
[0, '#000'],
|
||||
[1, '#333']
|
||||
]
|
||||
},
|
||||
trackBorderColor: '#666'
|
||||
},
|
||||
|
||||
// special colors for some of the
|
||||
legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
|
||||
legendBackgroundColorSolid: 'rgb(35, 35, 70)',
|
||||
dataLabelsColor: '#444',
|
||||
textColor: '#C0C0C0',
|
||||
maskColor: 'rgba(255,255,255,0.3)'
|
||||
};
|
||||
|
||||
// Apply the theme
|
||||
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
|
||||
@ -1,268 +0,0 @@
|
||||
/**
|
||||
* Dark blue theme for Highcharts JS
|
||||
* @author Torstein Hønsi
|
||||
*/
|
||||
|
||||
Highcharts.theme = {
|
||||
colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
|
||||
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
|
||||
chart: {
|
||||
backgroundColor: {
|
||||
linearGradient: [0, 0, 250, 500],
|
||||
stops: [
|
||||
[0, 'rgb(48, 96, 48)'],
|
||||
[1, 'rgb(0, 0, 0)']
|
||||
]
|
||||
},
|
||||
borderColor: '#000000',
|
||||
borderWidth: 2,
|
||||
className: 'dark-container',
|
||||
plotBackgroundColor: 'rgba(255, 255, 255, .1)',
|
||||
plotBorderColor: '#CCCCCC',
|
||||
plotBorderWidth: 1
|
||||
},
|
||||
title: {
|
||||
style: {
|
||||
color: '#C0C0C0',
|
||||
font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
|
||||
}
|
||||
},
|
||||
subtitle: {
|
||||
style: {
|
||||
color: '#666666',
|
||||
font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
gridLineColor: '#333333',
|
||||
gridLineWidth: 1,
|
||||
labels: {
|
||||
style: {
|
||||
color: '#A0A0A0'
|
||||
}
|
||||
},
|
||||
lineColor: '#A0A0A0',
|
||||
tickColor: '#A0A0A0',
|
||||
title: {
|
||||
style: {
|
||||
color: '#CCC',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '12px',
|
||||
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
gridLineColor: '#333333',
|
||||
labels: {
|
||||
style: {
|
||||
color: '#A0A0A0'
|
||||
}
|
||||
},
|
||||
lineColor: '#A0A0A0',
|
||||
minorTickInterval: null,
|
||||
tickColor: '#A0A0A0',
|
||||
tickWidth: 1,
|
||||
title: {
|
||||
style: {
|
||||
color: '#CCC',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '12px',
|
||||
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
itemStyle: {
|
||||
font: '9pt Trebuchet MS, Verdana, sans-serif',
|
||||
color: '#A0A0A0'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.75)',
|
||||
style: {
|
||||
color: '#F0F0F0'
|
||||
}
|
||||
},
|
||||
toolbar: {
|
||||
itemStyle: {
|
||||
color: 'silver'
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
line: {
|
||||
dataLabels: {
|
||||
color: '#CCC'
|
||||
},
|
||||
marker: {
|
||||
lineColor: '#333'
|
||||
}
|
||||
},
|
||||
spline: {
|
||||
marker: {
|
||||
lineColor: '#333'
|
||||
}
|
||||
},
|
||||
scatter: {
|
||||
marker: {
|
||||
lineColor: '#333'
|
||||
}
|
||||
},
|
||||
candlestick: {
|
||||
lineColor: 'white'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
itemStyle: {
|
||||
color: '#CCC'
|
||||
},
|
||||
itemHoverStyle: {
|
||||
color: '#FFF'
|
||||
},
|
||||
itemHiddenStyle: {
|
||||
color: '#444'
|
||||
}
|
||||
},
|
||||
credits: {
|
||||
style: {
|
||||
color: '#666'
|
||||
}
|
||||
},
|
||||
labels: {
|
||||
style: {
|
||||
color: '#CCC'
|
||||
}
|
||||
},
|
||||
|
||||
navigation: {
|
||||
buttonOptions: {
|
||||
backgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#606060'],
|
||||
[0.6, '#333333']
|
||||
]
|
||||
},
|
||||
borderColor: '#000000',
|
||||
symbolStroke: '#C0C0C0',
|
||||
hoverSymbolStroke: '#FFFFFF'
|
||||
}
|
||||
},
|
||||
|
||||
exporting: {
|
||||
buttons: {
|
||||
exportButton: {
|
||||
symbolFill: '#55BE3B'
|
||||
},
|
||||
printButton: {
|
||||
symbolFill: '#7797BE'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// scroll charts
|
||||
rangeSelector: {
|
||||
buttonTheme: {
|
||||
fill: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#888'],
|
||||
[0.6, '#555']
|
||||
]
|
||||
},
|
||||
stroke: '#000000',
|
||||
style: {
|
||||
color: '#CCC',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
states: {
|
||||
hover: {
|
||||
fill: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#BBB'],
|
||||
[0.6, '#888']
|
||||
]
|
||||
},
|
||||
stroke: '#000000',
|
||||
style: {
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
select: {
|
||||
fill: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.1, '#000'],
|
||||
[0.3, '#333']
|
||||
]
|
||||
},
|
||||
stroke: '#000000',
|
||||
style: {
|
||||
color: 'yellow'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
inputStyle: {
|
||||
backgroundColor: '#333',
|
||||
color: 'silver'
|
||||
},
|
||||
labelStyle: {
|
||||
color: 'silver'
|
||||
}
|
||||
},
|
||||
|
||||
navigator: {
|
||||
handles: {
|
||||
backgroundColor: '#666',
|
||||
borderColor: '#AAA'
|
||||
},
|
||||
outlineColor: '#CCC',
|
||||
maskFill: 'rgba(16, 16, 16, 0.5)',
|
||||
series: {
|
||||
color: '#7798BF',
|
||||
lineColor: '#A6C7ED'
|
||||
}
|
||||
},
|
||||
|
||||
scrollbar: {
|
||||
barBackgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#888'],
|
||||
[0.6, '#555']
|
||||
]
|
||||
},
|
||||
barBorderColor: '#CCC',
|
||||
buttonArrowColor: '#CCC',
|
||||
buttonBackgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#888'],
|
||||
[0.6, '#555']
|
||||
]
|
||||
},
|
||||
buttonBorderColor: '#CCC',
|
||||
rifleColor: '#FFF',
|
||||
trackBackgroundColor: {
|
||||
linearGradient: [0, 0, 0, 10],
|
||||
stops: [
|
||||
[0, '#000'],
|
||||
[1, '#333']
|
||||
]
|
||||
},
|
||||
trackBorderColor: '#666'
|
||||
},
|
||||
|
||||
// special colors for some of the
|
||||
legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
|
||||
legendBackgroundColorSolid: 'rgb(35, 35, 70)',
|
||||
dataLabelsColor: '#444',
|
||||
textColor: '#C0C0C0',
|
||||
maskColor: 'rgba(255,255,255,0.3)'
|
||||
};
|
||||
|
||||
// Apply the theme
|
||||
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
|
||||
@ -1,262 +0,0 @@
|
||||
/**
|
||||
* Gray theme for Highcharts JS
|
||||
* @author Torstein Hønsi
|
||||
*/
|
||||
|
||||
Highcharts.theme = {
|
||||
colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
|
||||
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
|
||||
chart: {
|
||||
backgroundColor: {
|
||||
linearGradient: [0, 0, 0, 400],
|
||||
stops: [
|
||||
[0, 'rgb(96, 96, 96)'],
|
||||
[1, 'rgb(16, 16, 16)']
|
||||
]
|
||||
},
|
||||
borderWidth: 0,
|
||||
borderRadius: 15,
|
||||
plotBackgroundColor: null,
|
||||
plotShadow: false,
|
||||
plotBorderWidth: 0
|
||||
},
|
||||
title: {
|
||||
style: {
|
||||
color: '#FFF',
|
||||
font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
|
||||
}
|
||||
},
|
||||
subtitle: {
|
||||
style: {
|
||||
color: '#DDD',
|
||||
font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
gridLineWidth: 0,
|
||||
lineColor: '#999',
|
||||
tickColor: '#999',
|
||||
labels: {
|
||||
style: {
|
||||
color: '#999',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
title: {
|
||||
style: {
|
||||
color: '#AAA',
|
||||
font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
alternateGridColor: null,
|
||||
minorTickInterval: null,
|
||||
gridLineColor: 'rgba(255, 255, 255, .1)',
|
||||
lineWidth: 0,
|
||||
tickWidth: 0,
|
||||
labels: {
|
||||
style: {
|
||||
color: '#999',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
title: {
|
||||
style: {
|
||||
color: '#AAA',
|
||||
font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
itemStyle: {
|
||||
color: '#CCC'
|
||||
},
|
||||
itemHoverStyle: {
|
||||
color: '#FFF'
|
||||
},
|
||||
itemHiddenStyle: {
|
||||
color: '#333'
|
||||
}
|
||||
},
|
||||
labels: {
|
||||
style: {
|
||||
color: '#CCC'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
backgroundColor: {
|
||||
linearGradient: [0, 0, 0, 50],
|
||||
stops: [
|
||||
[0, 'rgba(96, 96, 96, .8)'],
|
||||
[1, 'rgba(16, 16, 16, .8)']
|
||||
]
|
||||
},
|
||||
borderWidth: 0,
|
||||
style: {
|
||||
color: '#FFF'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
plotOptions: {
|
||||
line: {
|
||||
dataLabels: {
|
||||
color: '#CCC'
|
||||
},
|
||||
marker: {
|
||||
lineColor: '#333'
|
||||
}
|
||||
},
|
||||
spline: {
|
||||
marker: {
|
||||
lineColor: '#333'
|
||||
}
|
||||
},
|
||||
scatter: {
|
||||
marker: {
|
||||
lineColor: '#333'
|
||||
}
|
||||
},
|
||||
candlestick: {
|
||||
lineColor: 'white'
|
||||
}
|
||||
},
|
||||
|
||||
toolbar: {
|
||||
itemStyle: {
|
||||
color: '#CCC'
|
||||
}
|
||||
},
|
||||
|
||||
navigation: {
|
||||
buttonOptions: {
|
||||
backgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#606060'],
|
||||
[0.6, '#333333']
|
||||
]
|
||||
},
|
||||
borderColor: '#000000',
|
||||
symbolStroke: '#C0C0C0',
|
||||
hoverSymbolStroke: '#FFFFFF'
|
||||
}
|
||||
},
|
||||
|
||||
exporting: {
|
||||
buttons: {
|
||||
exportButton: {
|
||||
symbolFill: '#55BE3B'
|
||||
},
|
||||
printButton: {
|
||||
symbolFill: '#7797BE'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// scroll charts
|
||||
rangeSelector: {
|
||||
buttonTheme: {
|
||||
fill: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#888'],
|
||||
[0.6, '#555']
|
||||
]
|
||||
},
|
||||
stroke: '#000000',
|
||||
style: {
|
||||
color: '#CCC',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
states: {
|
||||
hover: {
|
||||
fill: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#BBB'],
|
||||
[0.6, '#888']
|
||||
]
|
||||
},
|
||||
stroke: '#000000',
|
||||
style: {
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
select: {
|
||||
fill: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.1, '#000'],
|
||||
[0.3, '#333']
|
||||
]
|
||||
},
|
||||
stroke: '#000000',
|
||||
style: {
|
||||
color: 'yellow'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
inputStyle: {
|
||||
backgroundColor: '#333',
|
||||
color: 'silver'
|
||||
},
|
||||
labelStyle: {
|
||||
color: 'silver'
|
||||
}
|
||||
},
|
||||
|
||||
navigator: {
|
||||
handles: {
|
||||
backgroundColor: '#666',
|
||||
borderColor: '#AAA'
|
||||
},
|
||||
outlineColor: '#CCC',
|
||||
maskFill: 'rgba(16, 16, 16, 0.5)',
|
||||
series: {
|
||||
color: '#7798BF',
|
||||
lineColor: '#A6C7ED'
|
||||
}
|
||||
},
|
||||
|
||||
scrollbar: {
|
||||
barBackgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#888'],
|
||||
[0.6, '#555']
|
||||
]
|
||||
},
|
||||
barBorderColor: '#CCC',
|
||||
buttonArrowColor: '#CCC',
|
||||
buttonBackgroundColor: {
|
||||
linearGradient: [0, 0, 0, 20],
|
||||
stops: [
|
||||
[0.4, '#888'],
|
||||
[0.6, '#555']
|
||||
]
|
||||
},
|
||||
buttonBorderColor: '#CCC',
|
||||
rifleColor: '#FFF',
|
||||
trackBackgroundColor: {
|
||||
linearGradient: [0, 0, 0, 10],
|
||||
stops: [
|
||||
[0, '#000'],
|
||||
[1, '#333']
|
||||
]
|
||||
},
|
||||
trackBorderColor: '#666'
|
||||
},
|
||||
|
||||
// special colors for some of the demo examples
|
||||
legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
|
||||
legendBackgroundColorSolid: 'rgb(70, 70, 70)',
|
||||
dataLabelsColor: '#444',
|
||||
textColor: '#E0E0E0',
|
||||
maskColor: 'rgba(255,255,255,0.3)'
|
||||
};
|
||||
|
||||
// Apply the theme
|
||||
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
|
||||
@ -1,97 +0,0 @@
|
||||
/**
|
||||
* Grid theme for Highcharts JS
|
||||
* @author Torstein Hønsi
|
||||
*/
|
||||
|
||||
Highcharts.theme = {
|
||||
colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
|
||||
chart: {
|
||||
backgroundColor: {
|
||||
linearGradient: [0, 0, 500, 500],
|
||||
stops: [
|
||||
[0, 'rgb(255, 255, 255)'],
|
||||
[1, 'rgb(240, 240, 255)']
|
||||
]
|
||||
}
|
||||
,
|
||||
borderWidth: 2,
|
||||
plotBackgroundColor: 'rgba(255, 255, 255, .9)',
|
||||
plotShadow: true,
|
||||
plotBorderWidth: 1
|
||||
},
|
||||
title: {
|
||||
style: {
|
||||
color: '#000',
|
||||
font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
|
||||
}
|
||||
},
|
||||
subtitle: {
|
||||
style: {
|
||||
color: '#666666',
|
||||
font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
gridLineWidth: 1,
|
||||
lineColor: '#000',
|
||||
tickColor: '#000',
|
||||
labels: {
|
||||
style: {
|
||||
color: '#000',
|
||||
font: '11px Trebuchet MS, Verdana, sans-serif'
|
||||
}
|
||||
},
|
||||
title: {
|
||||
style: {
|
||||
color: '#333',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '12px',
|
||||
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
minorTickInterval: 'auto',
|
||||
lineColor: '#000',
|
||||
lineWidth: 1,
|
||||
tickWidth: 1,
|
||||
tickColor: '#000',
|
||||
labels: {
|
||||
style: {
|
||||
color: '#000',
|
||||
font: '11px Trebuchet MS, Verdana, sans-serif'
|
||||
}
|
||||
},
|
||||
title: {
|
||||
style: {
|
||||
color: '#333',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '12px',
|
||||
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
itemStyle: {
|
||||
font: '9pt Trebuchet MS, Verdana, sans-serif',
|
||||
color: 'black'
|
||||
|
||||
},
|
||||
itemHoverStyle: {
|
||||
color: '#039'
|
||||
},
|
||||
itemHiddenStyle: {
|
||||
color: 'gray'
|
||||
}
|
||||
},
|
||||
labels: {
|
||||
style: {
|
||||
color: '#99b'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Apply the theme
|
||||
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
|
||||
|
||||
@ -6,23 +6,12 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="{$PATH}/css/mainstyle.css" type="text/css" />
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery-1.6.2.min.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.tools.min.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.img.preload.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.filestyle.mini.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.wysiwyg.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.date_input.pack.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/facebox.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.visualize.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.visualize.tooltip.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.select_skin.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/ajaxupload.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/jquery.pngfix.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/custom.js"></script>
|
||||
<script type="text/javascript" src="{$PATH}/js/tools.js"></script>
|
||||
<!--[if IE]><script type="text/javascript" src="js/excanvas.js"></script><![endif]-->
|
||||
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
|
||||
<script src="{$PATH}/js/jquery.browser.js"></script>
|
||||
<script src="{$PATH}/js/jquery.tablesorter.min.js"></script>
|
||||
<script src="{$PATH}/js/custom.js"></script>
|
||||
<script src="{$PATH}/js/tools.js"></script>
|
||||
<!--[if IE]><script type="text/javascript" src="{$PATH}/js/excanvas.js"></script><![endif]-->
|
||||
<style type="text/css" media="all">
|
||||
@import url("{$PATH}/css/style.css");
|
||||
@import url("{$PATH}/css/jquery.wysiwyg.css");
|
||||
@ -30,7 +19,7 @@
|
||||
@import url("{$PATH}/css/visualize.css");
|
||||
@import url("{$PATH}/css/date_input.css");
|
||||
</style>
|
||||
<!--[if lt IE 8]><style type="text/css" media="all">@import url("css/ie.css");</style><![endif]-->
|
||||
<!--[if lt IE 8]><style type="text/css" media="all">@import url("{$PATH}/css/ie.css");</style><![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user