Browse Source

Compatibilité jQuery 3.1.

Tristement la librairie graphique jquery.flot ne semble pas maintenue.
svn/root/tags/plugins/statistiques/1.0.6
marcimat@rezo.net 4 years ago
parent
commit
d4ade1a527
4 changed files with 13 additions and 13 deletions
  1. +1
    -1
      formulaires/configurer_compteur.html
  2. +5
    -5
      javascript/jquery.flot.js
  3. +4
    -4
      javascript/jquery.flot.selection.js
  4. +3
    -3
      javascript/jquery.tflot.js

+ 1
- 1
formulaires/configurer_compteur.html View File

@ -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>

+ 5
- 5
javascript/jquery.flot.js View File

@ -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]);
}


+ 4
- 4
javascript/jquery.flot.selection.js View File

@ -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);
});
}


+ 3
- 3
javascript/jquery.tflot.js View File

@ -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