mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Refactor server with Sequelize ORM, refactor server configs, now will show note status (created or updated) and support docs (note alias)
This commit is contained in:
parent
e613aeba75
commit
49b51e478f
35 changed files with 1877 additions and 2120 deletions
|
@ -1,15 +1,24 @@
|
|||
//auto update last change
|
||||
var createtime = null;
|
||||
var lastchangetime = null;
|
||||
var lastchangeui = {
|
||||
status: $(".ui-status-lastchange"),
|
||||
time: $(".ui-lastchange"),
|
||||
user: $(".ui-lastchangeuser"),
|
||||
nouser: $(".ui-no-lastchangeuser")
|
||||
}
|
||||
|
||||
function updateLastChange() {
|
||||
if (lastchangetime && lastchangeui) {
|
||||
lastchangeui.time.html(moment(lastchangetime).fromNow());
|
||||
lastchangeui.time.attr('title', moment(lastchangetime).format('llll'));
|
||||
if (!lastchangeui) return;
|
||||
if (createtime) {
|
||||
if (createtime && !lastchangetime) {
|
||||
lastchangeui.status.text('created');
|
||||
} else {
|
||||
lastchangeui.status.text('changed');
|
||||
}
|
||||
var time = lastchangetime || createtime;
|
||||
lastchangeui.time.html(moment(time).fromNow());
|
||||
lastchangeui.time.attr('title', moment(time).format('llll'));
|
||||
}
|
||||
}
|
||||
setInterval(updateLastChange, 60000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue