1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Merge branch 'master' of github.com:mperham/sidekiq

This commit is contained in:
Mike Perham 2016-10-17 10:54:53 -07:00
commit cb9c9e0999

View file

@ -39,16 +39,20 @@ $(function() {
$($(this).attr('data-target')).toggle();
});
var locale = $('body').data('locale');
updateFuzzyTimes($('body').data('locale'));
});
function updateFuzzyTimes(locale) {
var parts = locale.split('-');
if (typeof parts[1] !== 'undefined') {
parts[1] = parts[1].toUpperCase();
locale = parts.join('_');
}
var t = timeago()
t.render(document.querySelectorAll('time'), locale);
t.cancel();
});
}
function updatePage(url) {
setInterval(function () {
@ -63,10 +67,14 @@ function updatePage(url) {
var $header_status = $data.find('.status')
$('.status').replaceWith($header_status)
updateFuzzyTimes($('body').data('locale'));
})
}, parseInt(localStorage.timeInterval) || 2000);
}
$(function() {
'use strict';