Thanks Christopher for sharing with us all!! Nicole
On Fri, Sep 7, 2012 at 1:25 PM, BRANNON, CHRISTOPHER <cbran...@cdalibrary.org> wrote: > I just posted this on the JQuery library. Hope this is helpful to others. > > Add a filter to the patron Fines screens > > * Developer: Christopher Brannon (Coeur d'Alene Public Library), based of > original code by Kobi Lidershnider at > http://kobikobi.wordpress.com/2008/09/15/using-jquery-to-filter-table-rows/ > * Purpose: To help find information in the Account and Pay fines portions > of patron Fines. > * Status: Completed > * Intranet or OPAC?: Intranet > * Version: Any > > //Add filter to fines > > $("#yui-main div[class='tabs-container'] table").attr("class","filterable"); > > > > $("<i>Filter: </i><input type='text' id='FilterTextBox' name='FilterTextBox' > /><a href='#' class='clear' rel='nofollow'> > Clear</a></p>").insertBefore("#yui-main table[class='filterable']"); > > > > $(".filterable tr:has(td)").each(function(){var t = > $(this).text().toLowerCase(); > > $("<td class='indexColumn'></td>").hide().text(t).appendTo(this); > > });//each tr > > $("#FilterTextBox").keyup(function(){ > > var s = $(this).val().toLowerCase().split(" "); > > //show all rows. > > $(".filterable tr:hidden").show(); > > $.each(s, function(){ > > $(".filterable tr:visible .indexColumn:not(:contains('" > > + this + "'))").parent().hide(); > > });//each > > });//key up. > > > > $(".clear").click(function(){ > > $("#FilterTextBox").val("").keyup(); > > return false; > > }); > > //end fines filter > > Christopher Brannon > _______________________________________________ > Koha mailing list http://koha-community.org > Koha@lists.katipo.co.nz > http://lists.katipo.co.nz/mailman/listinfo/koha _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha