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:
commit
cb9c9e0999
1 changed files with 10 additions and 2 deletions
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in a new issue