From 395001d8db3102d2e9d3de8e89f0f749408d77b6 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Wed, 29 Aug 2012 12:54:58 -0400 Subject: [PATCH] Indicate narrowing (imported from commit 19682fc07393f0848481abf72339eefd56b30ab2) --- templates/zephyr/index.html | 5 +++-- zephyr/static/js/zephyr.js | 10 ++++++++++ zephyr/static/styles/zephyr.css | 11 ++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/templates/zephyr/index.html b/templates/zephyr/index.html index ced7d83a27..dce0092fc6 100644 --- a/templates/zephyr/index.html +++ b/templates/zephyr/index.html @@ -26,9 +26,10 @@ -
+
- + +
diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 16ee20b858..57d91a292e 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -90,6 +90,9 @@ function narrow(class_name, target_zephyr) { // Try to keep the zephyr in the same place on the screen after narrowing. scroll_to_zephyr(target_zephyr, old_top); + + $("#unhide").removeAttr("disabled"); + $("#narrow_indicator").html("Showing " + class_name + ""); } function narrow_instance(class_name, instance, target_zephyr) { @@ -108,6 +111,10 @@ function narrow_instance(class_name, instance, target_zephyr) { // Try to keep the zephyr in the same place on the screen after narrowing. scroll_to_zephyr(target_zephyr, old_top); + + $("#unhide").removeAttr("disabled"); + $("#narrow_indicator").html("Showing " + class_name + + " " + instance + ""); } function prepare_personal(username) { @@ -121,6 +128,9 @@ function unhide() { p = $("#selected"); tr = $(p).closest("tr"); scroll_to_zephyr(tr.attr("id"), 0); + + $("#unhide").attr("disabled", "disabled"); + $("#narrow_indicator").html(""); } $(function() { diff --git a/zephyr/static/styles/zephyr.css b/zephyr/static/styles/zephyr.css index d46f3a06c6..aadb56ac99 100644 --- a/zephyr/static/styles/zephyr.css +++ b/zephyr/static/styles/zephyr.css @@ -21,10 +21,19 @@ form.zephyr textarea { width: 95%; } -#unhide { +#narrow_bar { margin-top: 5px; } +#unhide { + vertical-align: middle; +} + +#narrow_indicator { + vertical-align: middle; + margin-left: 5px; +} + .zephyr_class { background-color: #b94a48; }