Les stats vides sont prises en compte comme 0 dans les sparklines

This commit is contained in:
echarp 2014-11-06 15:36:25 +01:00
parent 61367d026e
commit 77f618e332

View File

@ -1,9 +1,11 @@
$(document).ready -> $(document).ready ->
$('table.list.dates tbody tr').each -> $('table.list.dates tbody tr').each ->
vals = $(this).find('td.quantity a').map -> vals = $(this).find('td.quantity').map ->
val = $(this).html().replace(' ', '').trim() val = $(this).find('a').html().replace(' ', '').trim()
if (val != '') if (val && val != '')
return parseInt val return parseInt val
else
return 0
$(this).find('.sparkline').sparkline vals, width: '5em' $(this).find('.sparkline').sparkline vals, width: '5em'