From e442b837b9dccc3e9678d7774095a9c8b695a2f3 Mon Sep 17 00:00:00 2001 From: David Leung Date: Mon, 28 Jan 2013 13:55:14 -0800 Subject: [PATCH] Re-enabled "show all button" after bootstrap.js is removed in Sidekiq UI. --- web/assets/javascripts/application.js | 4 ++++ web/views/_workers.slim | 2 +- web/views/queue.slim | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/web/assets/javascripts/application.js b/web/assets/javascripts/application.js index ca9edf43..10190f33 100755 --- a/web/assets/javascripts/application.js +++ b/web/assets/javascripts/application.js @@ -37,4 +37,8 @@ $(function() { $(document).on("click", "[data-confirm]", function() { return confirm($(this).attr('data-confirm')); }); + + $(document).on("click", "[data-toggle]", function() { + $($(this).attr('data-target')).toggle(); + }); }); diff --git a/web/views/_workers.slim b/web/views/_workers.slim index d24a45cc..8bf8423f 100755 --- a/web/views/_workers.slim +++ b/web/views/_workers.slim @@ -15,7 +15,7 @@ table class="workers table table-hover table-bordered table-striped table-white" - if msg['payload']['args'].to_s.size > 100 = msg['payload']['args'].inspect[0..100] + "... " button data-toggle="collapse" data-target="#worker_#{index}" class="btn btn-mini" Show All - .collapse[id="worker_#{index}" style="max-width: 750px;"]= msg['payload']['args'] + .toggle[id="worker_#{index}" style="display: none;max-width: 750px;"]= msg['payload']['args'] - else = msg['payload']['args'] td== relative_time(msg['run_at'].is_a?(Numeric) ? Time.at(msg['run_at']) : Time.parse(msg['run_at'])) diff --git a/web/views/queue.slim b/web/views/queue.slim index 5801df3a..af1b96f5 100755 --- a/web/views/queue.slim +++ b/web/views/queue.slim @@ -18,7 +18,7 @@ table class="queue table table-hover table-bordered table-striped" - if msg['args'] and msg['args'].to_s.size > 100 = msg['args'].inspect[0..100] + "... " button data-toggle="collapse" data-target="#worker_#{index}" class="btn btn-mini" Show All - .collapse[id="worker_#{index}"]= msg['args'] + .toggle[id="worker_#{index}" style="display: none;"]= msg['args'] - else = msg['args'] td