From 5076e38c1cd883be5db0a3f84fe75a8af7a6d197 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 13 Jul 2018 10:12:11 +0200 Subject: update jquery.timeago lib --- view/js/mod_mail.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/js') diff --git a/view/js/mod_mail.js b/view/js/mod_mail.js index 15a45519b..e3c891c2c 100644 --- a/view/js/mod_mail.js +++ b/view/js/mod_mail.js @@ -1,8 +1,8 @@ $(document).ready(function() { + $(".autotime").timeago(); $("#recip").name_autocomplete(baseurl + '/acl', 'm', false, function(data) { $("#recip-complete").val(data.xid); }); - $(".autotime").timeago() $('#prvmail-text').bbco_autocomplete('bbcode'); - $("#prvmail-text").editor_autocomplete(baseurl+"/acl"); + $("#prvmail-text").editor_autocomplete(baseurl+"/acl"); }); -- cgit v1.2.3 From bb7022350943c6f049641d50d28cb99caf019b83 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 13 Jul 2018 11:00:37 +0200 Subject: when calling timeago() from mod_mail.js it is called before the translations are applied - move the call to main.js and be more specific with the selector to not trigger calls for other modules (eg network) which is handled elsewhere to not be to much of an performance hog (to many dates at a time) --- view/js/main.js | 3 +++ view/js/mod_mail.js | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index 45c412296..17f94dd16 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -62,6 +62,9 @@ $(document).ready(function() { numbers : aStr['t17'], }; + //mod_mail only + $(".mail-conv-detail .autotime").timeago(); + savedTitle = document.title; updateInit(); diff --git a/view/js/mod_mail.js b/view/js/mod_mail.js index e3c891c2c..917e5414c 100644 --- a/view/js/mod_mail.js +++ b/view/js/mod_mail.js @@ -1,5 +1,4 @@ $(document).ready(function() { - $(".autotime").timeago(); $("#recip").name_autocomplete(baseurl + '/acl', 'm', false, function(data) { $("#recip-complete").val(data.xid); }); -- cgit v1.2.3