aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/chat.tpl2
-rw-r--r--view/tpl/head.tpl1
-rw-r--r--view/tpl/js_strings.tpl20
-rw-r--r--view/tpl/messages_widget.tpl9
-rw-r--r--view/tpl/notifications_widget.tpl6
-rw-r--r--view/tpl/pinned_item.tpl2
6 files changed, 11 insertions, 29 deletions
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index 766205ee0..1020399c7 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -206,7 +206,7 @@ function update_chats(chats) {
chat_issue_notification(item.name + ':\n' + item.text, 'Hubzilla Chat');
}
$('#chatLineHolder').append(newNode);
- $(".autotime").timeago();
+ updateRelativeTime('.autotime');
var elem = document.getElementById('chatTopBar');
elem.scrollTop = elem.scrollHeight;
diff --git a/view/tpl/head.tpl b/view/tpl/head.tpl
index d2efcced9..18941f454 100644
--- a/view/tpl/head.tpl
+++ b/view/tpl/head.tpl
@@ -8,6 +8,7 @@
{{$linkrel}}
{{$plugins}}
<script>
+ var lang = '{{$lang}}';
var updateInterval = {{$update_interval}};
var sse_enabled = {{$sse_enabled}};
var localUser = {{if $local_channel}}{{$local_channel}}{{else}}false{{/if}};
diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl
index 46536a89a..38168ccfe 100644
--- a/view/tpl/js_strings.tpl
+++ b/view/tpl/js_strings.tpl
@@ -39,26 +39,6 @@
'pin_item' : "{{$pin_item}}",
'unpin_item' : "{{$unpin_item}}",
- 'plural_func' : "{{$plural_func}}",
-
- 't01' : "{{$t01}}",
- 't02' : "{{$t02}}",
- 't03' : "{{$t03}}",
- 't04' : "{{$t04}}",
- 't05' : "{{$t05}}",
- 't06' : "{{$t06}}",
- 't07' : "{{$t07}}",
- 't08' : "{{$t08}}",
- 't09' : "{{$t09}}",
- 't10' : "{{$t10}}",
- 't11' : "{{$t11}}",
- 't12' : "{{$t12}}",
- 't13' : "{{$t13}}",
- 't14' : "{{$t14}}",
- 't15' : "{{$t15}}",
- 't16' : "{{$t16}}",
- 't17' : "{{$t17}}",
-
'monthNames' : [ "{{$January}}","{{$February}}","{{$March}}","{{$April}}","{{$May}}","{{$June}}","{{$July}}","{{$August}}","{{$September}}","{{$October}}","{{$November}}","{{$December}}" ],
'monthNamesShort' : [ "{{$Jan}}","{{$Feb}}","{{$Mar}}","{{$Apr}}","{{$MayShort}}","{{$Jun}}","{{$Jul}}","{{$Aug}}","{{$Sep}}","{{$Oct}}","{{$Nov}}","{{$Dec}}" ],
'dayNames' : ["{{$Sunday}}","{{$Monday}}","{{$Tuesday}}","{{$Wednesday}}","{{$Thursday}}","{{$Friday}}","{{$Saturday}}"],
diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl
index ebd76ec89..2201095bd 100644
--- a/view/tpl/messages_widget.tpl
+++ b/view/tpl/messages_widget.tpl
@@ -40,7 +40,7 @@
{7}
<strong title="{4}">{4}</strong>
</div>
- <small class="messages-timeago opacity-75" title="{1}"></small>
+ <small class="autotime-narrow opacity-75" title="{1}"></small>
</div>
<div class="text-truncate">
<small class="opacity-75" title="{5}">{5}</small>
@@ -82,7 +82,7 @@
{{$e.icon}}
<strong title="{{$e.author_name}}">{{$e.author_name}}</strong>
</div>
- <small class="messages-timeago opacity-75" title="{{$e.created}}"></small>
+ <small class="autotime-narrow opacity-75" title="{{$e.created}}"></small>
</div>
<div class="text-truncate">
<small class="opacity-75" title="{{$e.author_addr}}">{{$e.author_addr}}</small>
@@ -116,7 +116,8 @@
let file;
$(document).ready(function () {
- $('.messages-timeago').timeago();
+ updateRelativeTime('.autotime-narrow');
+
if (bParam_mid) {
$('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active');
}
@@ -251,7 +252,7 @@
$('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active');
}
$('#messages-loading').hide();
- $('.messages-timeago').timeago();
+ updateRelativeTime('.autotime-narrow');
});
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 97901e052..c1d7edd66 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -401,8 +401,6 @@
}).appendTo('#nav-' + notifyType + '-menu');
}
- $("#nav-" + notifyType + "-menu .notifications-autotime").timeago();
-
if($('#tt-' + notifyType + '-only').hasClass('active'))
$('#nav-' + notifyType + '-menu [data-thread_top=false]').addClass('tt-filter-active');
@@ -421,6 +419,8 @@
});
}
}
+
+ updateRelativeTime('.autotime-narrow');
}
function sse_updateNotifications(type, mid) {
@@ -552,7 +552,7 @@
<div class="text-truncate pe-1">
<strong title="{2} - {3}">{2}</strong>
</div>
- <small class="notifications-autotime opacity-75" title="{5}"></small>
+ <small class="autotime-narrow opacity-75" title="{5}"></small>
</div>
<div class="text-truncate">{4}</div>
</div>
diff --git a/view/tpl/pinned_item.tpl b/view/tpl/pinned_item.tpl
index 90905a145..aa5b94664 100644
--- a/view/tpl/pinned_item.tpl
+++ b/view/tpl/pinned_item.tpl
@@ -214,5 +214,5 @@
</script>
{{/if}}
<script>
- $(".pinned-item .autotime").timeago();
+ updateRelativeTime('.autotime');
</script>