Compatibilité jQuery 3.1.

Tristement la librairie graphique jquery.flot ne semble pas maintenue.
dev/responsive
marcimat@rezo.net 7 years ago
parent b0762991c4
commit d4ade1a527

@ -49,7 +49,7 @@ function actualise_referers(){
}
}
jQuery(document).ready(function(){
jQuery('#activer_statistiques, #activer_referers').bind('change', actualise_referers);
jQuery('#activer_statistiques, #activer_referers').on('change', actualise_referers);
actualise_referers();
});
</script>

@ -1317,7 +1317,7 @@ Licensed under the MIT license.
octx = overlay.context;
// define which element we're listening for events on
eventHolder = $(overlay.element).unbind();
eventHolder = $(overlay.element).off();
// If we're re-using a plot object, shut down the old one
@ -1343,7 +1343,7 @@ Licensed under the MIT license.
// was fixed somewhere around 1.3.x. We can return to using
// .mouseleave when we drop support for 1.2.6.
eventHolder.bind("mouseleave", onMouseLeave);
eventHolder.on("mouseleave", onMouseLeave);
}
if (options.grid.clickable)
@ -1356,9 +1356,9 @@ Licensed under the MIT license.
if (redrawTimeout)
clearTimeout(redrawTimeout);
eventHolder.unbind("mousemove", onMouseMove);
eventHolder.unbind("mouseleave", onMouseLeave);
eventHolder.unbind("click", onClick);
eventHolder.off("mousemove", onMouseMove);
eventHolder.off("mouseleave", onMouseLeave);
eventHolder.off("click", onClick);
executeHooks(hooks.shutdown, [eventHolder]);
}

@ -33,7 +33,7 @@ When selection support is enabled, a "plotselected" event will be emitted on
the DOM element you passed into the plot function. The event handler gets a
parameter with the ranges selected on the axes, like this:
placeholder.bind( "plotselected", function( event, ranges ) {
placeholder.on( "plotselected", function( event, ranges ) {
alert("You selected " + ranges.xaxis.from + " to " + ranges.xaxis.to)
// similar for yaxis - with multiple axes, the extra ones are in
// x2axis, x3axis, ...
@ -335,11 +335,11 @@ The plugin allso adds the following methods to the plot object:
});
plot.hooks.shutdown.push(function (plot, eventHolder) {
eventHolder.unbind("mousemove", onMouseMove);
eventHolder.unbind("mousedown", onMouseDown);
eventHolder.off("mousemove", onMouseMove);
eventHolder.off("mousedown", onMouseDown);
if (mouseUpHandler)
$(document).unbind("mouseup", mouseUpHandler);
$(document).off("mouseup", mouseUpHandler);
});
}

@ -495,7 +495,7 @@
function zoomGraphique(graphique) {
pid = $(graphique).attr('id').substr(9);
$(graphique).find('.graphResult').bind("plotselected", function (event, ranges) {
$(graphique).find('.graphResult').on("plotselected", function (event, ranges) {
graph = $(event.target);
pid = graph.closest('.graphique').attr('id').substr(9);
@ -544,7 +544,7 @@
if (vignette.length) {
// zoom depuis la miniature
vignette.bind("plotselected", function (event, ranges) {
vignette.on("plotselected", function (event, ranges) {
graph = $(event.target);
pid = graph.closest('.graphique').attr('id').substr(9);
vignettesSelection[pid] = ranges;
@ -582,7 +582,7 @@
};
$.extend(true, options, settings);
$(graph).bind("plothover", function (event, pos, item) {
$(graph).on("plothover", function (event, pos, item) {
$("#x").text(pos.x.toFixed(2));
$("#y").text(pos.y.toFixed(2));
graph = $(event.target);

Loading…
Cancel
Save