2016-02-08 15:41:00 +01:00
|
|
|
/*! Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
|
2014-09-10 10:45:34 +02:00
|
|
|
|
|
|
|
(function(Icinga, $) {
|
|
|
|
|
2015-11-11 15:23:45 +01:00
|
|
|
'use strict';
|
2014-09-10 10:45:34 +02:00
|
|
|
|
|
|
|
Icinga.Behaviors = Icinga.Behaviors || {};
|
|
|
|
|
|
|
|
var Sparkline = function (icinga) {
|
2014-09-12 09:09:21 +02:00
|
|
|
Icinga.EventListener.call(this, icinga);
|
|
|
|
this.on('rendered', this.onRendered, this);
|
2014-09-10 10:45:34 +02:00
|
|
|
};
|
2015-11-11 15:23:45 +01:00
|
|
|
|
2014-09-12 09:09:21 +02:00
|
|
|
Sparkline.prototype = new Icinga.EventListener();
|
|
|
|
|
2015-11-11 15:23:45 +01:00
|
|
|
Sparkline.prototype.onRendered = function(e) {
|
|
|
|
$(e.target).find('.sparkline').each(function() {
|
|
|
|
$(this).sparkline('html', {
|
|
|
|
enableTagOptions: true,
|
|
|
|
disableTooltips: true
|
|
|
|
});
|
2014-09-10 10:45:34 +02:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
Icinga.Behaviors.Sparkline = Sparkline;
|
|
|
|
|
2015-11-11 15:23:45 +01:00
|
|
|
})(Icinga, jQuery);
|