Merge pull request #660 from thelounge/astorije/98-add-timestamp-title
Display localized timestamp in title of message times
This commit is contained in:
commit
cd90d50a37
5
client/js/libs/handlebars/localetime.js
Normal file
5
client/js/libs/handlebars/localetime.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
Handlebars.registerHelper("localetime", function(time) {
|
||||||
|
return new Date(time).toLocaleString();
|
||||||
|
});
|
@ -1,5 +1,5 @@
|
|||||||
<div class="msg {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" id="msg-{{id}}">
|
<div class="msg {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" id="msg-{{id}}">
|
||||||
<span class="time">
|
<span class="time" title="{{localetime time}}">
|
||||||
{{tz time}}
|
{{tz time}}
|
||||||
</span>
|
</span>
|
||||||
<span class="from">
|
<span class="from">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="msg {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" id="msg-{{id}}">
|
<div class="msg {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" id="msg-{{id}}">
|
||||||
<span class="time">
|
<span class="time" title="{{localetime time}}">
|
||||||
{{tz time}}
|
{{tz time}}
|
||||||
</span>
|
</span>
|
||||||
<span class="from"></span>
|
<span class="from"></span>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="msg {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}">
|
<div class="msg {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}">
|
||||||
<span class="time">
|
<span class="time" title="{{localetime time}}">
|
||||||
{{tz time}}
|
{{tz time}}
|
||||||
</span>
|
</span>
|
||||||
<span class="from">[{{command}}]</span>
|
<span class="from">[{{command}}]</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user