Sha256: 845d3599456e98a60330c7f6cc65b6a78668affdf978b92d529f132cfda2f3e1
Contents?: true
Size: 1.73 KB
Versions: 1
Compression:
Stored size: 1.73 KB
Contents
//= require vendor/jquery //= require vendor/jquery.timeago //= require bootstrap //= require_tree . $(function() { $.timeago.settings.allowFuture = true; $.timeago.settings.refreshMillis = 0; $("time").timeago(); }); $(function() { $('.check_all').live('click', function() { var checked = $(this).attr('checked'); if (checked == 'checked') { $('input[type=checkbox]', $(this).closest('table')).attr('checked', checked); } else { $('input[type=checkbox]', $(this).closest('table')).removeAttr('checked'); } }); }); $(function() { function pad(n) { return ('0' + n).slice(-2); } $('a[name=poll]').data('polling', false); $('a[name=poll]').on('click', function(e) { e.preventDefault(); var pollLink = $(this); if (pollLink.data('polling')) { clearInterval(pollLink.data('interval')); pollLink.text('Live Poll'); $('.poll-status').text(''); } else { var href = pollLink.attr('href'); pollLink.data('interval', setInterval(function() { $.get(href, function(data) { var responseHtml = $(data); $('.hero-unit').replaceWith(responseHtml.find('.hero-unit')); $('.workers').replaceWith(responseHtml.find('.workers')); $('time').timeago(); }); var currentTime = new Date(); $('.poll-status').text('Last polled at: ' + currentTime.getHours() + ':' + pad(currentTime.getMinutes()) + ':' + pad(currentTime.getSeconds())); }, 2000)); $('.poll-status').text('Starting to poll...'); pollLink.text('Stop Polling'); } pollLink.data('polling', !pollLink.data('polling')); }) }); $(function() { $('[data-confirm]').click(function() { return confirm($(this).attr('data-confirm')); }); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sidekiq-2.4.0 | web/assets/javascripts/application.js |