1

Every specific case event can be "jumped" to, using the link available on the date+time. But if the case is short, it's not clear which event it is, because the browser can't scroll it to the top. Is there some way to let it stand out?

flag

1 Answer

1

Of course you can! :-)

Using BugMonkey and a bit of jQuery, it's relatively simple to implement a customization that does that. For instance:

name:          Highlight Hash Event
description:   Highlights the specific event the user jumped to
author:        Michel de Ruiter
version:       1.3.0.0

js:
function showHash() {
  var ev = $('a[name="' + location.hash.match(/BugEvent\.[0-9]+/) + '"]')
    .closest('.bugevent');
  ev.stop().slideDown(1000);
  window.scrollBy(0, -90);
  var hadClass = ev.hasClass('anchorHighlight');
  $('.anchorHighlight').removeClass('anchorHighlight'); // Remove old one.
  if (!hadClass)
    ev.addClass('anchorHighlight');
}
setTimeout(showHash, 1000);
$(window).bind('hashchange', showHash);
$('a[href*="#BugEvent."]').click(showHash);

css:
.bugevent.anchorHighlight {
  background-color:   #8F8 !important;
}

This also makes sure the case event is actually visible, for instance when using a customization like this.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.