mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fix momentjs in project list view
This commit is contained in:
parent
a0b02d85f5
commit
9c20d1d604
2 changed files with 11 additions and 4 deletions
|
@ -144,6 +144,12 @@ block content
|
||||||
mixin tag('{{ project_id }}', '{{ tagName }}', true)
|
mixin tag('{{ project_id }}', '{{ tagName }}', true)
|
||||||
|
|
||||||
- locals.supressDefaultJs = true
|
- locals.supressDefaultJs = true
|
||||||
|
script
|
||||||
|
window.requirejs = {
|
||||||
|
"paths" : {
|
||||||
|
"moment": "libs/moment"
|
||||||
|
}
|
||||||
|
};
|
||||||
script(
|
script(
|
||||||
data-main=jsPath+'list.js?fingerprint='+fingerprint(jsPath + 'list.js'),
|
data-main=jsPath+'list.js?fingerprint='+fingerprint(jsPath + 'list.js'),
|
||||||
baseurl=jsPath,
|
baseurl=jsPath,
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
require [
|
require [
|
||||||
"tags"
|
"tags"
|
||||||
|
"moment"
|
||||||
"gui"
|
"gui"
|
||||||
"libs/moment"
|
|
||||||
"libs/underscore"
|
"libs/underscore"
|
||||||
"libs/fineuploader"
|
"libs/fineuploader"
|
||||||
"libs/jquery.storage"
|
"libs/jquery.storage"
|
||||||
], (tagsManager)->
|
], (tagsManager, moment)->
|
||||||
|
|
||||||
$('.isoDate').each (i, d)->
|
$('.isoDate').each (i, d)->
|
||||||
html = $(d)
|
html = $(d)
|
||||||
unparsedDate = html.text()
|
unparsedDate = html.text().trim()
|
||||||
formatedDate = moment(unparsedDate).format('LLL')
|
console.log unparsedDate
|
||||||
|
formatedDate = moment(unparsedDate).format("Do MMM YYYY, h:mm:ss a")
|
||||||
html.text(formatedDate)
|
html.text(formatedDate)
|
||||||
|
|
||||||
refreshProjectFilter = ->
|
refreshProjectFilter = ->
|
||||||
|
|
Loading…
Reference in a new issue