From ae3f35114269af754918593e1d18281d83b5ba52 Mon Sep 17 00:00:00 2001 From: pikesley Date: Wed, 30 Dec 2015 17:06:13 +0000 Subject: [PATCH] Do not push code containing debugger, you fuckwit --- lib/views/grid.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/views/grid.erb b/lib/views/grid.erb index ed5d68d..3dcf397 100644 --- a/lib/views/grid.erb +++ b/lib/views/grid.erb @@ -11,7 +11,6 @@ latestCell(j) ) } else if (j['type'] === 'graph') { - debugger ecks = Object.keys(j['data'][0])[0] why = Object.keys(j['data'][0])[1] var points = [ @@ -40,8 +39,10 @@ }) function latestCell(json) { - fixedDate = moment(json['data'][json['data'].length -1][json['date-field']], 'YYYY-MM-DD').format('dddd Do MMMM') - content = '

Last ' + json['title'] + ' was on

' + fixedDate + ' (n days / weeks / months ago)

' + d = json['data'][json['data'].length -1][json['date-field']] + fixedDate = moment(d, 'YYYY-MM-DD').format('dddd Do MMMM') + age = moment(d, 'YYYY-MM-DD').fromNow() + content = '

Last ' + json['title'] + ' was on

' + fixedDate + '

(' + age + ')

' return cellContent(json['id'], content) }