diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-09-07 01:44:04 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-09-07 01:44:04 -0400 |
| commit | a19867180c1bf221f8a5d1d1115c9a0ba95d1b63 (patch) | |
| tree | 54b2c6f7bd7971ebb3782e25be5ca2a08fbdc5bd /public/assets/js | |
| parent | 2bb87671b1c5b59d6c770627b99a17a784f81e1d (diff) | |
comments styling
Diffstat (limited to 'public/assets/js')
| -rw-r--r-- | public/assets/js/lib/views/details/comments.js | 2 | ||||
| -rw-r--r-- | public/assets/js/lib/views/details/files.js | 2 | ||||
| -rw-r--r-- | public/assets/js/util/format.js | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/public/assets/js/lib/views/details/comments.js b/public/assets/js/lib/views/details/comments.js index 164a3b1..168cc3f 100644 --- a/public/assets/js/lib/views/details/comments.js +++ b/public/assets/js/lib/views/details/comments.js @@ -15,7 +15,7 @@ var CommentsView = FormView.extend({ }, parse: function(comment){ - var datetime = verbose_date(comment.date) + var datetime = verbose_date(comment.date, true) var t = this.template.replace(/{{username}}/g, comment.username) .replace(/{{comment}}/g, comment.comment) .replace(/{{date}}/g, datetime[0]) diff --git a/public/assets/js/lib/views/details/files.js b/public/assets/js/lib/views/details/files.js index 5a19519..b19cf3c 100644 --- a/public/assets/js/lib/views/details/files.js +++ b/public/assets/js/lib/views/details/files.js @@ -29,7 +29,7 @@ var FilesView = FormView.extend({ parse: function(file){ var size = hush_size(file.size) - var datetime = verbose_date(file.date) + var datetime = verbose_date(file.date, true) var date_class = carbon_date(file.date) var t = this.template.replace(/{{username}}/g, file.username) diff --git a/public/assets/js/util/format.js b/public/assets/js/util/format.js index de8fd65..b789602 100644 --- a/public/assets/js/util/format.js +++ b/public/assets/js/util/format.js @@ -22,7 +22,7 @@ function privacy_dot (p) { } var short_months = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ") -function verbose_date (date) { +function verbose_date (date, no_pad_hours) { var date = new Date(date * 1000) var d = date.getDate() var m = date.getMinutes() @@ -46,7 +46,7 @@ function verbose_date (date) { if (d < 10) d = "0" + d if (m < 10) m = "0" + m - if (h < 10) h = "0" + h + if (! no_pad_hours && h < 10) h = "0" + h var date = d + '‑' + short_months[date.getMonth()] + '‑' + date.getFullYear() var time = h + ':' + m + meridian |
