2015-01-20 19:29:31 +01:00
|
|
|
(function() {
|
2015-02-05 09:27:12 +01:00
|
|
|
$('body').on('mouseenter', '[data-toggle="tooltip"]', function( event ) {
|
|
|
|
$(this).tooltip('show');
|
|
|
|
}).on('mouseleave', '[data-toggle="tooltip"]', function( event ) {
|
|
|
|
$(this).tooltip('hide');
|
2015-02-18 09:57:45 +01:00
|
|
|
});
|
|
|
|
|
2015-04-24 06:09:09 +02:00
|
|
|
$.fn.sparkline.defaults.bar.height = 63;
|
2015-03-27 17:52:42 +01:00
|
|
|
$.fn.sparkline.defaults.bar.barWidth = 6;
|
2018-04-08 13:39:22 +02:00
|
|
|
|
|
|
|
if( $('body').width() < 600 )
|
|
|
|
$.fn.sparkline.defaults.bar.barWidth = 4;
|
|
|
|
else if( $('body').width() < 1200 )
|
|
|
|
$.fn.sparkline.defaults.bar.barWidth = 5;
|
2015-04-28 09:43:56 +02:00
|
|
|
$.fn.sparkline.defaults.bar.barSpacing = 1;
|
2015-03-27 17:52:42 +01:00
|
|
|
$.fn.sparkline.defaults.bar.tooltipClassname = 'jqstooltip';
|
|
|
|
$.fn.sparkline.defaults.bar.tooltipOffsetX = 0;
|
2015-05-19 10:07:48 +02:00
|
|
|
$.fn.sparkline.defaults.bar.tooltipFormat = $.spformat('<div class="tooltip-arrow"></div><div class="tooltip-inner">{{prefix}}{{value}} {{suffix}}</div>');
|
2015-03-27 17:52:42 +01:00
|
|
|
$.fn.sparkline.defaults.bar.colorMap = $.range_map({
|
2018-12-01 01:14:59 +01:00
|
|
|
'0:6': '#8be9fd',
|
|
|
|
'6:15': '#50fa7b',
|
|
|
|
'15:40': '#f1fa8c',
|
|
|
|
'40:60': '#ffb86c',
|
|
|
|
'60:': '#ff5555'
|
2015-03-27 17:52:42 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
moment.relativeTimeThreshold('s', 60);
|
2015-04-23 15:17:31 +02:00
|
|
|
moment.relativeTimeThreshold('m', 60);
|
|
|
|
moment.relativeTimeThreshold('h', 24);
|
|
|
|
moment.relativeTimeThreshold('d', 28);
|
|
|
|
moment.relativeTimeThreshold('M', 12);
|
|
|
|
|
2015-06-02 12:29:50 +02:00
|
|
|
})();
|