Skip to content

Instantly share code, notes, and snippets.

@dougn
Last active December 17, 2015 12:59
Show Gist options
  • Save dougn/5614002 to your computer and use it in GitHub Desktop.
Save dougn/5614002 to your computer and use it in GitHub Desktop.
FogBugz BugMonkey Customization script to open selected cases in new windows (tabs).
name: View Selected Cases
description: Adds a link to the titlebar (if there is one) to open all selected cases in new windows.
author: Daniel Jalkut, Doug Napoleone
version: 1.0.0.0
js:
// Based on original code by Daniel Jalkut: https://gist.github.com/danielpunkass/5612389
if ($('div.viewMoreOptions')) {
$('div.viewMoreOptions')
.prepend('<a href="javascript:;" id="idCustomDougCA2" ' +
'class="novisited listNavLink dotted">' +
'View Selected Cases</a> | ');
$('#idCustomDougCA2').click(function () {
var selected = $('td[style="background-color: rgb(253, 253, 212);"] div nobr span a[class$=vb]:not(.title), ' +
'td[style="background-color: rgb(249, 250, 211);"] div nobr span a[class$=vb]:not(.title)');
$.each(selected, function(i, node) {
var newWindow = window.open(node.href, "_blank");
});
return false;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment