More charts work
This commit is contained in:
parent
111011e8a6
commit
d7cfe05daf
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -2604,23 +2604,70 @@ img.ui-datepicker-trigger { vertical-align: middle; margin-top: -1px; cursor: po
|
|||
float: left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 26px;
|
||||
a {
|
||||
border-right: 1px solid #dfdfdf;
|
||||
padding: 7px 10px;
|
||||
padding: 9px 10px;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
&.active {
|
||||
background: #dfdfdf;
|
||||
color: #777;
|
||||
}
|
||||
&.custom {
|
||||
padding: 9px 10px;
|
||||
vertical-align: middle;
|
||||
form, div {
|
||||
display: inline;
|
||||
margin:0;
|
||||
input.range_datepicker {
|
||||
padding: 0;
|
||||
margin:0 10px 0 0;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
color: #777;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.split {
|
||||
padding: 12px 12px 12px 224px;
|
||||
padding: 12px 12px 12px 249px;
|
||||
margin: 0 !important;
|
||||
.side {
|
||||
width: 200px;
|
||||
margin-left: -212px;
|
||||
width: 225px;
|
||||
margin-left: -237px;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
.chart-stats {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
li.stats {
|
||||
margin: 0 0 1em;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,.1);
|
||||
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,.1);
|
||||
box-shadow: 0px 1px 2px rgba(0,0,0,.1);
|
||||
h4 {
|
||||
background: #e9e9e9;
|
||||
padding: 10px;
|
||||
margin:0;
|
||||
}
|
||||
table {
|
||||
td {
|
||||
padding: 10px;
|
||||
vertical-align: top;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
td.count {
|
||||
background: #e9e9e9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.chart-legend {
|
||||
list-style: none outside;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
jQuery(document).ready(function($) {
|
||||
function showTooltip(x, y, contents) {
|
||||
jQuery('<div class="chart-tooltip">' + contents + '</div>').css( {
|
||||
top: y - 16,
|
||||
left: x + 20
|
||||
}).appendTo("body").fadeIn(200);
|
||||
}
|
||||
var previousPoint = null;
|
||||
|
||||
jQuery(".chart-placeholder").bind( "plothover", function (event, pos, item) {
|
||||
if (item) {
|
||||
// if (previousPoint != item.dataIndex) {
|
||||
previousPoint = item.dataIndex;
|
||||
|
||||
jQuery( ".chart-tooltip" ).remove();
|
||||
|
||||
/*if (item.series.label=="<?php echo esc_js( __( 'Sales amount', 'woocommerce' ) ) ?>") {
|
||||
|
||||
var y = item.datapoint[1].toFixed(2);
|
||||
showTooltip(item.pageX, item.pageY, "<?php echo get_woocommerce_currency_symbol(); ?>" + y);
|
||||
|
||||
} else*/ if ( item.series.points.show ) {
|
||||
|
||||
var y = item.datapoint[1];
|
||||
showTooltip( item.pageX, item.pageY, item.series.label + ": " + y );
|
||||
|
||||
}
|
||||
//}
|
||||
}
|
||||
else {
|
||||
jQuery(".chart-tooltip").remove();
|
||||
previousPoint = null;
|
||||
}
|
||||
});
|
||||
|
||||
var dates = jQuery( ".range_datepicker" ).datepicker({
|
||||
defaultDate: "",
|
||||
dateFormat: "yy-mm-dd",
|
||||
numberOfMonths: 1,
|
||||
maxDate: "+0D",
|
||||
showButtonPanel: true,
|
||||
showOn: "focus",
|
||||
buttonImageOnly: true,
|
||||
onSelect: function( selectedDate ) {
|
||||
var option = jQuery(this).is('.from') ? "minDate" : "maxDate",
|
||||
instance = jQuery( this ).data( "datepicker" ),
|
||||
date = jQuery.datepicker.parseDate(
|
||||
instance.settings.dateFormat ||
|
||||
jQuery.datepicker._defaults.dateFormat,
|
||||
selectedDate, instance.settings );
|
||||
dates.not( this ).datepicker( "option", option, date );
|
||||
}
|
||||
});
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
jQuery(document).ready(function(e){function t(e,t,n){jQuery('<div class="chart-tooltip">'+n+"</div>").css({top:t-16,left:e+20}).appendTo("body").fadeIn(200)}var n=null;jQuery(".chart-placeholder").bind("plothover",function(e,r,i){if(i){n=i.dataIndex;jQuery(".chart-tooltip").remove();if(i.series.points.show){var s=i.datapoint[1];t(i.pageX,i.pageY,i.series.label+": "+s)}}else{jQuery(".chart-tooltip").remove();n=null}});var r=jQuery(".range_datepicker").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,maxDate:"+0D",showButtonPanel:!0,showOn:"focus",buttonImageOnly:!0,onSelect:function(e){var t=jQuery(this).is(".from")?"minDate":"maxDate",n=jQuery(this).data("datepicker"),i=jQuery.datepicker.parseDate(n.settings.dateFormat||jQuery.datepicker._defaults.dateFormat,e,n.settings);r.not(this).datepicker("option",t,i)}})});
|
|
@ -20,6 +20,12 @@ function woocommerce_show_messages() {
|
|||
function woocommerce_weekend_area_js() {
|
||||
_deprecated_function( 'woocommerce_weekend_area_js', '2.1', '' );
|
||||
}
|
||||
function woocommerce_tooltip_js() {
|
||||
_deprecated_function( 'woocommerce_tooltip_js', '2.1', '' );
|
||||
}
|
||||
function woocommerce_datepicker_js() {
|
||||
_deprecated_function( 'woocommerce_datepicker_js', '2.1', '' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle renamed filters
|
||||
|
|
Loading…
Reference in New Issue