diff --git a/console.js b/console.js index 4af7515..4f172d4 100644 --- a/console.js +++ b/console.js @@ -5,6 +5,7 @@ var repl = require('repl') , context = repl.start().context; context.app = require('./config/application'); +context.Date = Date; context.Item = context.app.db.model('Item'); process.stdin.on('close', function() { diff --git a/lib/strftime.js b/lib/strftime.js index 1a94767..6b4d450 100644 --- a/lib/strftime.js +++ b/lib/strftime.js @@ -1,2 +1,4 @@ var strftime = require('strftime').strftime; -Date.prototype.toLocaleFormat = function toLocaleFormat(fmt) { strftime(fmt, this); }; +Date.prototype.toLocaleFormat = function toLocaleFormat(fmt) { + return strftime(fmt, this); +}; diff --git a/public/stylesheets/all.styl b/public/stylesheets/all.styl index 5c97bc8..a5f7ac9 100644 --- a/public/stylesheets/all.styl +++ b/public/stylesheets/all.styl @@ -16,9 +16,7 @@ table.hour color white text-shadow 0 -1px 0 hsla(0, 0%, 0%, 0.5) padding 5px - &.hour - width 5em - &.duration + &.hour, &.duration width 3em &.app width 10em diff --git a/views/items/index.jade b/views/items/index.jade index 353d5f6..c02d252 100644 --- a/views/items/index.jade +++ b/views/items/index.jade @@ -3,13 +3,15 @@ h1= items[0].start.toDateString() - if (items) table.hour tr - th.hour= items[0].start.toLocaleFormat('%H:%M') + th: input( type="checkbox" ) + th.hour= items[0].start.toLocaleFormat('%l %p') th.duration duration th.app app th.title title - each item in items tr - td= item.start.toLocaleTimeString() + td: input( type="checkbox" ) + td!= item.start.toLocaleFormat('%l:%M:%S') td.duration - if (item.duration > 60) = (item.duration / 60).toFixed(0) + ' m'