Make it say later today

Categories before:

> Now, today, tomorrow, Friday…

Categories after:

> Now, later today, tomorrow Friday…

This reduces the ambiguity of ‘now’ vs ‘today’, and keeping the word
‘later’ suggests what this features is about.

This implementation here is a bit hacky, but it works…
This commit is contained in:
Chris Hill-Scott
2016-10-11 17:59:09 +01:00
parent a78d9d5048
commit 8a01e6af36
3 changed files with 10 additions and 6 deletions

View File

@@ -78,10 +78,11 @@
.on('click', '.js-category-button', function(event) {
event.preventDefault();
let day = $(this).attr('value');
let wordsInDay = $(this).attr('value').split(' ');
let day = wordsInDay[wordsInDay.length - 1].toLowerCase();
render('choose', {
'choices': choices.filter(
element => element.label.indexOf(day) > -1
element => element.label.toLowerCase().indexOf(day) > -1
),
'name': name
});