summaryrefslogtreecommitdiff
path: root/public/assets/js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-09-07 01:44:04 -0400
committerJules Laplace <jules@okfoc.us>2015-09-07 01:44:04 -0400
commita19867180c1bf221f8a5d1d1115c9a0ba95d1b63 (patch)
tree54b2c6f7bd7971ebb3782e25be5ca2a08fbdc5bd /public/assets/js
parent2bb87671b1c5b59d6c770627b99a17a784f81e1d (diff)
comments styling
Diffstat (limited to 'public/assets/js')
-rw-r--r--public/assets/js/lib/views/details/comments.js2
-rw-r--r--public/assets/js/lib/views/details/files.js2
-rw-r--r--public/assets/js/util/format.js4
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 + '&#8209;' + short_months[date.getMonth()] + '&#8209;' + date.getFullYear()
var time = h + ':' + m + meridian