django-helpdeskmig/htdocs/filter.js
Ross Poulton c626b22f4d * Add interface for filtering mechanism - now only shows the filtering
options that are being used, allowing users to add or remove more options
  rather than just display the lot on screen. 

* Break out filtering and row hover into separate javascript files (hover
  is used in the ticket list & dashboard - same code was used in both 
  places. Anti-DRY)
2008-01-15 05:07:19 +00:00

22 lines
698 B
JavaScript

$(document).ready(function() {
$("#filterBuilderButton").click(function() {
var boxName = "#filterBox" + $("#filterBuilderSelect").val();
$(boxName).slideDown();
return false;
});
$(".filterBuilderRemove").click(function() {
var boxName = "#" + $(this).parent().attr('id');
$(boxName).slideUp();
$(boxName).children("input:text").each(function() {
$(this).val("");
});
$(boxName).children("input:checkbox").each(function() {
this.checked = false;
});
$(boxName).children("select").each(function() {
this.selectedIndex = -1;
});
return false;
});
});