Remove Upcoming Events row from the messaging preferences table

Developer: Liz Rea (NEKLS)

Purpose: Remove the Upcoming Events row from the messaging prefs table. This was confusing because upcoming events notification requires additional software, but was always offered even if the additional software wasn't installed. This JQuery removes that row in the preferences table.

Remove Return All functionality from check out screen/Patron Detail page

Developer: Liz Rea (NEKLS)

Purpose: Since the Return All functionality is only partially complete (it doesn't process holds correctly when used, a big problem in our system) we have chosen to remove the column for Return all, and the associated button.

Purpose: Change the staff client's "Change Password" field to password type input. Useful if your staff client terminal is viewable by the public. This also removes Koha's default "suggested password" from the field.

Add additional searches to Intranet

Developer: Magnus Enger, but based on "Add additional searches to OPAC" by Jared Camins-Esakov above

Purpose: Adds additional searches to the Intranet Search type dropdown, in a specific place in the drop down

Status: Completed

Intranet or OPAC?: Intranet

Version: Any

Note: The goal here is to add the Dewey index after the "Subject as Phrase" index, and indent it to the same level as that index. Since matching is done on the values of elements in the list of options (and not on the text labels) this should work across translations too.

Remove link to Holds to pull page

Note: Often, the Holds to pull list is deprecated for library use vs. the Holds Queue. This query removes the link in an effort to remove staff confusion. Sponsored by MassCat.

$("ul li:contains('Holds to pull')").remove();

Streamline Import Patrons page

Developer: Daniel Grobani

Purpose: removes unneeded fields and sets desired values

Status: Completed

Intranet or OPAC?: Intranet

Version: LLEK 4.0200019

// remove "default values" fieldset$('form[action] legend:contains("Default values")').parent().remove();// set record matching field to ID$('fieldset:has(legend:contains("Field to use for record matching")) #matchpoint').val("ID");// overwrite matching record$('#overwrite_cardnumberno').attr('checked','false');$('#overwrite_cardnumberyes').attr('checked','true');// replace only included extended attributes$('#ext_preserve_0').attr('checked','false');$('#ext_preserve_1').attr('checked','true');

Point out there is a button for renewing items at bottom of patron page

Developer: Jared Camins-Esakov, ByWater Solutions

Purpose: Alerting staff to the fact that they can renew/return items directly from the patron record; particularly relevant for patrons with huge numbers of items checked out, where staff might forget about the renewal button at the bottom

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.4

$("#issuest").parent().prepend("<div id='renewref'>See below to renew all or selected items.</div>");

Don't Allow Checkout Overrides

Developer: Scott Merrill , CAUSE

Purpose: Removes the override option for circulation rules that block checkouts... right now, if you have a maximum line of X item type out to a patron type, you'll always get a prompt asking if you want to override, this removes the prompt

Add 'Hide/Unhide $0.00 balances' toggle button to fines screen

Purpose: Creates a toggle button that hides or shows any lines from the patron fines table that have been paid in full.

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.8

Note: The button requires 2 parts. The first part adds a Jquery selector called 'contentIs.' The second statement creates the toggle button. For the button to work correctly you must include the statement to create the 'contentIs' selector.

Change Manual Credit to Add Note

Note: Manual Credit was problematic for us, especially in reporting. Our staff used it only because of the notes field in order to give a reason when writing off a fine. Since the form assumes $0.00 upon submission, we just hide the amount field and then change the text on various elements.

Force Staff to use Datepicker when altering due dates, renewal dates, and suspend until dates

Purpose: Since incorrectly formatted due dates can be entered in the "specify due date", "renewal date", and "suspend until" input boxes (and incorrectly formatted dates can cause system errors), this jQuery forces staff to use the calendar datepicker to choose dates for these options.

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.8

//BEGIN Force staff to use datepicker for altering due dates, renewal dates, and suspend unitl dates$("#duedatespec").attr("readonly","readonly");$("#newduedate").attr("readonly","readonly");$("#suspend_until").attr("readonly","readonly");$(".hint:contains('Specify due date (MM/DD/YYYY):')").text('Use calendar button to choose new Due Date');$("p:contains(Renewal due date:)").prepend('Use calendar button to choose ');$(".hint:contains('Specify date on which to resume (MM/DD/YYYY):')").text('Use calendar button to specify the date when holds will resume');//END Force staff to use datepicker for altering due dates, renewal dates, and suspend unitl dates

Note: Catalogers in our consortium want the default display of these screens to be shorter but they also need the ability to look at all fields if necessary. This example hides the 0, 1, 4, f, and j subfields. To remove different fields from the default display when the page loads add "li:contains(SUBFIELD -)" to the selector.

Preview OPAC syspref changes

Purpose: Provides a preview for basic OPAC customizations on the OPAC syspref page.

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.10+ with bug 10405 and a special web server configuration

Note: You will need to adjust the preview URLs for your particular installation. The URLs used in this sample were especially configured so that /cgi-bin/koha/opac/ would be forwarded to the OPAC. Also be aware that only part of the script goes in $(document).ready(..). To make this clear, I have included the $(document).ready(...) in the script.

Validate patron data fields

Note: Koha performs only basic validation (i.e. required fields). This jQuery script replaces the default SAVE button with a VALIDATE button which runs a custom validation using regular expressions. Upon successful validation it submits the form data. NOTE - this script is very large and will require additional customization to fit your library, since it contains our library's unique patron categorycodes and our validation definitions. For example, we require 2 email addresses for all patrons, but allow the 2 addresses to be the same for only some categorycodes, while requiring them to be different for other categorycodes.

Interrupt check-in process for hold/transfer confirmations

Developer: Christopher Brannon

Purpose: Stop staff from overlooking a hold/transfer confirmation during the check-in process.

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.10+

Note: This will interrupt the process of check-in by taking the focus away from the check-in text box if a confirmation screen appears for holds or transfers. If another book is scanned, nothing will happen. I've also colored the print button green to draw attention to the message. This is the preferred button for us. You can change the color of a different button if your workflow is different.

Highlight patron's home library

Purpose: Add a class tag to an element without one by finding it. In this case find the string rcvd and add a around it.

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.10

$(document).ready(function(){//highlight the home library on the left of the patron record in red$('ul').html(function(i,h){return h.replace('<li>Home library:','<li style="color: red; font-weight: bolder;">Home library:');});});

Hide price column on check out summary

Developer: Nicole C. Engard, ByWater Solutions

Purpose: This hides the Price column found when looking at patron's checkouts

Allow only a supervisor to write off a fine

Purpose: Koha 3.12 does not allow for granular control over the Write Off functions. This code mimics supervisory control by hiding the Write Off All and Write Off buttons, then requiring the input of a secret supervisor code to unhide the Write Off button.

Allow only a supervisor to lift a manual restriction

Purpose: Koha 3.14 does not allow for granular control over the new Manual Restriction functions. This code mimics supervisory control by hiding the remove links, then requiring the input of a secret supervisor code to unhide the remove links.

Show Local Copy Status in Staff Search Results, Hide all others

Purpose: This script combines earlier work done by Christopher Brannon (Hide locations/copies on Staff search results) and Nick Clemens (Hide non-local copies when searching staff interface), and changes the location column in the staff search results to (1) show total copy counts, (2) show the holdingbranch items for the logged in staff user, (3) hide all other items at other locations, if no copies are at/checked out at the logged in library, (4) display a "no local copies available" message displays, (5) provide a trigger to show all items on a single result and (6) provide a button to show the original, full search results.

Show Local Copy Status in Staff Search Results, Hide all others (Variation)

Purpose: This script combines earlier work done by Christopher Brannon (Hide locations/copies on Staff search results) and Nick Clemens (Hide non-local copies when searching staff interface), and changes the location column in the staff search results to (1) show total copy counts, (2) show the holdingbranch items for the logged in staff user, (3) hide all other items at other locations, if no copies are at/checked out at the logged in library, (4) display a "no local copies available" message displays, (5) provide a trigger to show all items on a single result and (6) provide a button to show the original, full search results.

This variation is an attempt to streamline the code and reduce leftover elements in the rearrangement of information. Layout, labels and visuals are a bit different in this variation.

Hide Check in Column on Checkout Table

Purpose: Hides the check in column in the patron checkout Ajax table. The check in feature in this screen tends to skip hold and transfer actions, which is why we hide it. Traditional jQuery can't catch adjust this table because the table is populated after the page is loaded, so it was necessary to watch for Ajax events. Thanks to Kyle Hall for figuring out the logistics with capturing the Ajax events for me. This code also disables the forgive fines checkbox and rewords the button below the table. The first function using "ajaxSend.dt" will catch elements in the rendered table structure before the table is populated. The function using "init.dt" will catch everything else once the table is populated.

Move overdue items to the top of the current checkouts table

Purpose: In Koha 3.16 the new checkouts table sorts all of the patrons items by date checked out. This means that if the patron has any overdue items, they appear at the bottom of the table and if the patron has a lot of checkouts it can take a lot of scrolling to find the overdues. This code groups any overdue checkouts at the top of the table under a big pink banner that says "Patron has overdue items." It also, thanks to some advice from Christopher Brannon at CIN, disables the column sort on the due date column sine that sort does not work correctly.

Creation Date: 2014-11-06

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.16

//BEGIN Move overdues to the top of the table$('#issues-table').on('init.dt',function(){$("#issues-table:has(.overdue)").attr('od','overduetable');if($("#issues-table").attr('od')){$("#issues-table tbody").attr("class","checkoutbody");$('.checkoutbody tr:first').before('<tr id="overduetr"><td colspan="10" style="background-color:pink; font-size: x-large"><strong>Patron has overdue items</strong></td></tr>');$("#issues-table .overdue").parents("tr").insertAfter("#overduetr");};$("#issues-table th:first").off("click").removeClass();});//END Move overdues to the top of the table

Copy mobile phone to SMS field

Purpose: Take the contents of the mobile phone field and populate the SMS field with a +1 and the number

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.22

//Add the +1 to the SMS number field and SMS to fill in with Mobileif($("#memberentry_messaging_prefs input[id='SMSnumber']").val()==''){$("#entryform #mobile").blur(function(){$("#memberentry_messaging_prefs input[id='SMSnumber']").val("+1"+$("#entryform #mobile").val());});}

Add a check/uncheck all libraries button to export.pl

Developer: Nick Clemens. ByWater Solutions

Creation Date: 2016-04-15

Purpose: Add a button to allow for checking/unchecking all libraries on the export tool

Fill in default values for indicators and hide them from catalographers

Developer: Joachim Ganseman. Koninklijk Conservatorium Brussel

Creation Date: 2016-06-23

Purpose: Speed up catalography by automatically filling in indicators for fields where they are always the same.

Status: Completed

Intranet or OPAC?: Intranet

Version: 16.05

if($("#cat_addbiblio")){// only do this in the addbiblio form// Fill in default values for some indicators$("input[name^='tag_028_indicator1']").val("2");// Field 028 : Default to plate nr$("input[name^='tag_028_indicator2']").val("0");$("input[name^='tag_100_indicator1']").val("1");// Field 100 : Default to Family Name$("input[name^='tag_490_indicator1']").val("0");// Field 490 : Default to untraced series$("input[name^='tag_542_indicator1']").val("1");// Field 542 : Default to publicly available info$("input[name^='tag_650_indicator1']").val("0");// Field 650 : Default to "undefined level, no thesaurus"$("input[name^='tag_650_indicator2']").val("4");$("input[name^='tag_700_indicator1']").val("1");// Field 700 : Default to Family Name// Now hide all indicator elements in the input form from the user. $("input[class~='indicator']").hide();};// end if

Check validity of ISBN, ISSN, ISMN and URL before submitting the addbiblio form

Pass data from the addbiblio to the additem form

Purpose: Speed up catalography by automatically filling fields of the additem form with data from the addbiblio form.

Status: Completed

Intranet or OPAC?: Intranet

Version: 16.05

if($("#cat_addbiblio")){// only do this in the addbiblio form// add an additional event handler to the save buttons: when saved, store data in browser. $("#saverecord, #saveandview, #saveanditems, #saveandcontinue").click(function( event ){// copy values that need to be available in additem.pl to HTML5 sessionStorage (no need for cookies)
sessionStorage.setItem("current_callnumber",$("[id^='tag_001_subfield_00']").val());// our callnumber is recorded in 001
sessionStorage.setItem("current_accessrestriction",$("[id^='tag_506_subfield_a']").val());// our accessrestriction is recorded in 506
sessionStorage.setItem("current_status",$("[id^='tag_583_subfield_l']").val());// our lost status is recorded in 583returntrue;}};// end if in the addbiblio formif($("#cat_additem")){// only do this in the additem form.// pre-fill the 952$1 "lost status". In Koha default settings, this is encoded as "1" in subfield 1.$("[id^='tag_952_subfield_1']").val((sessionStorage.getItem("current_status")=="LOST")?"1":"");// pre-fill the 952$7 "not for loan status". In Koha default settings, this is encoded as "1" in subfield 7.$("[id^='tag_952_subfield_7']").val((sessionStorage.getItem("current_accessrestriction")!="")?"1":"");// pre-fill the 952$o "full call number" field.$("[id^='tag_952_subfield_o']").val( sessionStorage.getItem("current_callnumber"));};// end if in the additem form

Copy data entered in one field to another

Developer: Joachim Ganseman. Koninklijk Conservatorium Brussel

Creation Date: 2016-06-23

Purpose: Speed up catalography by automatically filling in duplicated fields.

Status: Completed

Intranet or OPAC?: Intranet

Version: 16.05

// Example: in addbiblio form, copy data from field 001, once entered, into field 590$a$("[id^='tag_001_subfield_00']").blur(function(){$("[id^='tag_590_subfield_a']").val($("[id^='tag_001_subfield_00']").val());});

Autofill catalographer information in the addbiblio form

Developer: Joachim Ganseman. Koninklijk Conservatorium Brussel

Creation Date: 2016-06-23

Purpose: Automatically add data that records who did the catalography to a bibliographic record.

Status: Completed

Intranet or OPAC?: Intranet

Version: 16.05

if($("#cat_addbiblio")){// only do this in the addbiblio form// put string "Catalography:" in field 583$a$("[id^='tag_583_subfield_a']").val("Catalography:");// copy login of the current user to field 583$k $("[id^='tag_583_subfield_k']").val($(".loggedinusername").text());// if not yet set, copy current date in yyyymmdd format to field 583$cvar yyyymmdd =(new Date()).toISOString().slice(0,10).replace(/-/g,"");// note: this is the GMT date!var currentdate =$("[id^='tag_583_subfield_c']").val();if(!currentdate || currentdate ==""){$("[id^='tag_583_subfield_c']").val(yyyymmdd);}};// end if addbiblio

Remove "Pay selected" button from "Pay fines" tab in Fines module

Developer: George H. Williams - Northeast Kansas Library System

Purpose: Removes the "Pay selected" button - There is a bug in 3.22 (see https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15397) that is causing fee payment problems with the "Pay selected" button. This jQuery should remove that button until the bug can be fixed which should prevent new problems from being created

Hide fields on add/edit items page based on field label

Purpose: Hides fields on the add/edit items screen (additem.pl). Streamlines workflow and prevents data from being entered into the wrong field.

Creation Date: 8/11/2016

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.22

Note: Some fields are hidden by default via the frameworks. I still included those in this as removing them in this manner also removes the extra space their absence creates which makes the screen look cleaner.

Create button to hide left hand navigation menu on the circulation rules page

Developer: George Williams (NExpress)

Purpose: Becasue the circulation rules table is 7 miles wide, it can be hard to follow which line you're looking at from one end of the table to the other. This jQuery creates a button to hide left hand navigation menu on the circulaiton and fine rules page so that if you don't need that menu you can fit more of the rules table on one screen.

Move rows in the circulaiton and fine rules table to move it to the bottom with click

Developer: George Williams (NExpress)

Purpose: Becasue the circulation rules table is 7 miles wide, it can be hard to follow which line you're looking at from one end of the table to the other. This jQuery moves any row of the rules table to the bottom of the table in order to make it easier to for your eyes to track across the screen.

Creation Date: 3/30/2017

Status: Completed

Intranet or OPAC?: Intranet

Version: Developed on 3.22.08

//BEGIN Click on circ rule to move it to the bottom of the table$("#default-circulation-rules tr:contains(Edit)").click(function(){$(this).insertBefore("#edit_row");});//END

Autofill "Hold expires on" date when placing a request in the staff client

Developer: George Williams (NExpress)

Purpose: Autofills the "Hold expires on date" with the date 1 year from today when placing a request from the staff client. There is a corresponding piece of jQuery for the OPAC in the OPAC section. The future date can be modified by changing the values in the day, month, and year variables.

Creation Date: 3/30/2017

Status: Completed

Intranet or OPAC?: Intranet

Version: Developed on 3.16

Koha breadcrumbs: Catalog › TITLENAME › Place a hold on TITLENAME

//BEGIN Set newly placed holds in staff client to expire after one year if not filledvar holdtodate =new Date();var day =("0"+ holdtodate.getDate()).slice(-2);var month =("0"+(holdtodate.getMonth()+1)).slice(-2);var year =("0"+(holdtodate.getFullYear()+1)).slice(-4);var holdtill =(month)+"/"+(day)+"/"+(year);$('#hold-request-form .holddateto').val(holdtill);//END

Force staff to select SMS provider and enter SMS number before checkboxes can be checked

Developer: George Williams (NExpress)

Purpose: There is a bug in Koha 16.11 that breaks patron messaging if SMS checkboxes are checked but no SMS provider is selected. This jQuery attempts to fix this by 1) disabling the checkboxes and SMS number entry if no provider is selected 2) clearing the SMS number and all SMS checkboxes if the provider is removed 3) forcing the SMS number to 10 numeric characters with no punctuation or spaces 4) moving the SMS provider and SMS number above the messaging preferences table so it is more intuitive for staff to enter that information first 5) and finally renaming the SMS labels from "SMS" to "Text message" because many staff at our libraries don't know what SMS means. There is corresponding jQuery for the OPAC below

Creation Date: 4/10/2017

Status: Completed

Intranet or OPAC?: Intranet

Version: Developed on 16.11.05

Koha breadcrumbs: Home › Patrons › Add patron

Koha breadcrumbs: Home › Patrons › PATRONNAME › Modify patron

//BEGIN SMS changes in the staff client//BEGIN Hides SMS number and all SMS checkboxes when page is loaded$("#SMSnumber").parent().hide();$("#sms1, #sms2, #sms4, #sms5, #sms6").attr("disabled","disabled");//BEGIN Show SMS number if provider is not null and clear number and all SMS checkboxes if the provider is changed to null$("body").on("mousemove change click keyup",function(){if($("#sms_provider_id").val()!=""){$("#SMSnumber").parent().show("slow");}else{$("#SMSnumber").parent().hide("slow");$("#SMSnumber").val("");$("#smsbuttons").hide();$("#sms1, #sms2, #sms4, #sms5, #sms6").attr("disabled","disabled");$("#sms1, #sms2, #sms4, #sms5, #sms6").prop("checked",false);}});//BEGIN Enable SMS checkboxes only if SMS number is 10 digits and force SMS number entry to numerals only - no punctuation, alphanumeric characters, or spaces$("#SMSnumber").attr('maxlength','10');$('#SMSnumber').keydown(function(e){if($.inArray(e.keyCode,[46,8,9,27,13,110,190])!==-1||(e.keyCode==65&& e.ctrlKey===true)||(e.keyCode>=35&& e.keyCode<=40)){return;}if((e.shiftKey||(e.keyCode<48|| e.keyCode>57))&&(e.keyCode<96|| e.keyCode>105)){
e.preventDefault();}});$("body").on("mousemove change click keyup",function(){if($("#SMSnumber").val().length==10){$("#sms1, #sms2, #sms4, #sms5, #sms6").removeAttr("disabled");$("#smsbuttons").show("slow");}else{$("#sms1, #sms2, #sms4, #sms5, #sms6").attr("disabled","disabled");$("#sms1, #sms2, #sms4, #sms5, #sms6").prop("checked",false);$("#smsbuttons").hide("slow");}});//BEGIN Move SMS stuff above the table so that the first fields that need to be filled out are the first ones that staff see$("#memberentry_messaging_prefs > table").wrap('<div id="messagetable"></div>');$("#memberentry_messaging_prefs label:contains('SMS number:')").parent().wrap('<div id="smsnumbermove"></div>');$("#memberentry_messaging_prefs label:contains('SMS provider:')").parent().wrap('<div id="smsprovidermove"></div>');$("#smsnumbermove").prependTo("#messagetable").parent();$("#smsprovidermove").prependTo("#messagetable").parent();//BEGIN Rename SMS "Text messaging" for the sake of staff who don't know what SMS stands for$('#memberentry_messaging_prefs label, #memberentry_messaging_prefs th').each(function(){vartext=$(this).text();$(this).text(text.replace('SMS','Text message'));});

Hide non-local patrons on the "Update patron records" page

Developer: George Williams (NExpress)

Purpose: With 50+ branches it can be hard for staff to find the patrons from their library on the "Update patron records" screen. This hides all non-local-library patrons from the patron update screen. This includes an optional button so that those may actually need to see all of the patrons needing updates can see everyone if they choose.

Prevent over-write-offs

Developer: George Williams (NExpress)

Purpose: Now that we have partial write-offs staff can accidentally write-off an amount greater than the amount owed on an individual fee, thus adding a credit to the patron's account (community bug 20120). This prevents a write-off amount greater than the amount outstanding on an individual fee until such a time that this bug is patched.

OPAC JQuery Statements

Changing the logo in Koha’s OPAC

Developer: Koustubha Kale (anantcorp.com)

Purpose: Changing the logo in Koha’s OPAC

Status: Completed

Intranet or OPAC?: OPAC

Version: Any

A jquery based script that can be used in “opacuserjs” syspref which overcomes the image size limitation of "opacsmallimage" syspref. This script allows you to put your own logo in place of the default Koha logo while it shifts the Koha logo, prepending it with text “Powered by :” and a link back to the koha-community.org site, at the bottom of the page. The script takes care to add it below any credits you might have added by using the “opaccredits” syspref.

On line number one of the script you can give link to your logo.
On line two you can set the background color for the transparent Koha logo image and on line three the color of the words “Powered by :” is set. I have tried to read in the values of Koha OPAC’s search block’s background and text color here but you can simply replace these with your favorite colors.

Add a link to the header only if a patron is logged into the OPAC

Developer: Galen Charlton

Purpose: Adds a link to the OPAC masthead only if the patron is logged into the OPAC.

Status: Completed

Intranet or OPAC?: OPAC

Version: Any

Note: This can be generalized to alter behavior or display when a patron is logged in. For this specific example, note that somebody viewing source can see the link's URL, so be careful if using this to present super-sekrit (sic) stuff only to logged-in patrons.

Change "Available for reference" note in search results to something more appropriate to ebooks

Developer: Jared Camins-Esakov, ByWater Solutions

Purpose: Change the text of the "Available for reference" note in OPAC search results to something more appropriate for ebooks, which may not actually be available as a physical book in the library at all.

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.2+

$(".available b:contains('reference')").text("View e-resources online; If available in print, one or more copies may only be used in: ");

Hide 'Save Record' Box in OPAC

Developer: Joy Nelson, ByWater Solutions

Purpose: Remove the 'Save Record' box on the bib detail in the OPAC.

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.4+

$(document).ready(function(){$("#export").remove();});

Change Text in Drop Down list for 'Save Record' (3.4+)

Developer: Joy Nelson, ByWater Solutions

Purpose: Change Text in Drop Down list for 'Save Record' from BIBTEX to Endnote

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.4+

$('#export option[value="bibtex"]').text('EndNote');

Change Text in Drop Down list for 'Save Record' (3.14+)

Developer: Nicole Engard, ByWater Solutions

Purpose: Change Text in Drop Down list for 'Save Record' from BIBTEX to RefWorks

Hiding a library from the list in the drop-down in the OPAC

Developer: Ed Veal, ByWater Solutions

Purpose: This hides a library branch from the drop-down selection on the search main screen. You will need to identify the branch code and replace "CODE" with the appropriate code for the branch you wish to hide.

Status: Completed

Intranet or OPAC?: Intranet

Version: 3.6+

$("#select_library option[value='branch:CODE']").remove();

Move Navigation

Developer: Elliott Davis (UT Tyler)

Purpose: Move Navigation Menu Below OpacMainSearch

Status: Completed

Intranet or OPAC?: OPAC

Version: All

$('#header-wrapper').append($('#navigation'));

Move List Dropdown

Developer: Elliott Davis (UT Tyler)

Purpose: Move lists dropdown to main menu

Status: Completed

Intranet or OPAC?: OPAC

Version: All

$('#listsmenulink').appendTo('.main-menu > .last');

Opac Search Results Sort

Developer: Elliott Davis (UT Tyler)

Purpose: Change wording in call number sort

Status: Completed

Intranet or OPAC?: OPAC

Version: All

$("option[value='call_number_asc']").html("Call Number Ascending");$("option[value='call_number_dsc']").html("Call Number Descending");

Add a bookplate when cover images are not found

Developer: Jared Camins-Esakov, C & P Bibliography Services

Purpose: Replace the "No cover image" message on the OPAC with a custom bookplate

Status: Completed

Intranet or OPAC?: OPAC

Version: All

Note: Replace "bookplate.jpg" in the script with the URL to the image you want to use

$('.no-image').css('background-image','url(bookplate.jpg)');

Show nothing when cover images are not found

Developer: Nicole C. Engard, ByWater Solutions

Purpose: Remove the "No cover image" message on the OPAC

Status: Completed

Intranet or OPAC?: OPAC

Version: All

$(document).ready(function(){$('.no-image').remove();});

Alert patrons about exhausting their renewals early when they login to the OPAC

Purpose: Adds an alert to the top of the OPAC only if the patron is logged into the OPAC.

Status: Completed

Intranet or OPAC?: OPAC

Version: Any

Note: When the OPAC RenewalPeriodBase preference is set to the current date, patrons can accidently exhaust their renewals early. This code will place a prominent alert at the top of the OPAC upon patron login. This code is a modified version of Galen Charlton's code Add a link to the header only if a patron is logged into the OPAC

if($("#logout").length){$("#members").prepend("<p style=\"text-align:center;font-size:20px;background:red;color:white;margin-right:25%;margin-left:25%\">ALERT - renewing your items early or clicking 'renew' more than once will reduce your total checkout time.</p>");}

Move OPACResultsSidebar to the top

Developer: Derryn Jones

Purpose: Moves the OPACResultsSidebar to the top

Status: Completed

Intranet or OPAC?: OPAC

Version: Any (Tested on 3.6 - 3.10)

$("#facetcontainer.container").prepend($("#opacresultssidebar"));

Remove all links on SCO (Self-Checkout)

Developer: Derryn Jones

Creation Date: 2013-03-26

Purpose: Removes all links on SCO page to stop people using the SCO as a browser (Very useful if you're using a kiosk with no back/forward buttons)

Status: Completed

Intranet or OPAC?: OPAC

Version: Any (Tested on 3.10)

if(/sco-main/.test(self.location.href)){$('a').removeAttr('href')}

Hiding a library from the pickup location drop-down in the OPAC "Place Hold" screen

Developer: George H. Williams, Latah County Library District

Purpose: This hides a library branch from the pickup location drop-down in the "Place Hold" screen in the OPAC. This prevents patrons from having a hold delivered to the branch you specify unless that branch is their home library. Replace "BRANCHCODE" with the code for the branch you wish to remove from the drop-down.

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.8

$("#bibitemloop option[value='BRANCHCODE']").hide();

Hiding a library from the pickup location drop-down in the OPAC "Place Hold" screen (3.18+)

Developer: David Roberts, PTFS Europe

Purpose: This hides a library branch from the pickup location drop-down in the "Place Hold" screen in the OPAC. This prevents patrons from having a hold delivered to the branch you specify unless that branch is their home library. Replace "BRANCHCODE" with the code for the branch you wish to remove from the drop-down.

Change Browse Authorities to say Search

Purpose: The link to search the authorities says 'browse' but it's a search, so this changes it to be clearer.

Status: Completed

Intranet or OPAC?: OPAC

Version: Any

$("a:contains('Browse by author or subject')").text("Search authorities");

Make the opac more multilingual

Developer: Jonathan Druart, Gaetan Boisson, BibLibre

Creation Date: (2013-06-06), updated 2013-06-18

Purpose: The system preferences for customizing OPAC regions only allow for one language, so an opac with several languages will always show the same text here whatever the language selected by the user. This allows for switching to a different language when using the selector at the bottom of the screen. To achieve this, you will need to put each language in a separate div in the concerned system preference, each div will have a class named after the value the KohaOpacLanguage cookie will take when this language is selected. You will also need to add a bit of css so that all those divs are hidden by default. (Such as "div.en, div.ar-Arab {display:none;}"). If not language is set, the default is set to english, be sure to change this if your opac doesn't use this language, as it will be used when a user first land on the website.

On our first iteration we used the values in the cookie, here is the code for reference, which shows how to fetch the information from cookies, but the new version above is obviously much more simple and fool proof (you don't need to set a default value as it seems this attribute is always set).

Change "Quote of the Day" Label

Purpose: This changes the text of the Quote of the Day label in the OPAC.

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.10.x+

$('#daily-quote h1').text('Wisdom of the Day');

Hide Login Help

Developer: Nicole C. Engard, ByWater Solutions

Purpose: Hide the login help text from the OPAC login page

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.10+

$("#nologininstructions").hide();

Change Login Help

Developer: Ed Veal, ByWater Solutions

Purpose: Change the login help text from the OPAC login page

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.10+

$("#nologininstructions").html("<h5>Do not have a password yet?</h5><p>If you do not have a password yet, give us a call at XXX or email us at XXX.</p><h5>Do not have a library card?</h5><p> If you do not have a library card, stop by your local library to sign up. </p>");

Change "purchase suggestion" to "request for this item"

Purpose: Change tab on patron's record from 'my fines' to 'my charges'

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.10+

$('a[href="/cgi-bin/koha/opac-suggestions.pl?op=add"]').text('request for this item');

Change "purchase suggestion" to "request for this item"

Developer: Nicole C. Engard, ByWater Solutions

Purpose: Change privacy list items on 'my privacy' tab

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.10+

$("li.privacy0").html("Forever - Keep my reading history until I choose to delete it.");$("li.privacy1").html("Default - Keep my reading history until the end of the current semester or summer or until I choose to delete it.");$("li.privacy2").html("Never - Delete my reading history immediately. Upon check-in, my name will not display and the item will never appear in my reading history.");

Hide branch from search pulldown

Developer: Ed Veal, ByWater Solutions

Purpose: Hide a branch from the search pull down

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.10+

$("#select_library option[value='branch:BRANCHCODE']").hide();

Change comment pending text

Developer: Ed Veal, ByWater Solutions

Purpose: Change the text that appears when a comment is pending

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.10+

$("#reviewf p").replaceWith("<p>Your comment, once approved by a librarian, will be made public in the library’s web-based catalog. Your full name will be associated with your comment. The library respects the right of its users to express themselves but will not tolerate abusive behavior. Reviews may not include profanity, obscenities, spiteful remarks, personal information, URLs or email addresses.</p>");

Pre-fill the UserID fields with a library card prefix

Developer: Aaron Sakovich

Purpose: Pre-fills the User ID fields with a library card prefix or other value.

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.14+

Theme: BootStrap

Note: If your system uses a standard prefix for library cards, this can save your patrons a little bit of typing while also providing them a visual cue as to where to enter their card number when logging in to the OPAC. Note in the sample code below, the 7 digit prefix used is 1234567; this should be changed for your prefix or other value you'd like.

Autofill "Hold expires on" date when placing a request in the OPAC

Developer: George Williams (NExpress)

Purpose: Autofills the "Hold expires on date" with the date 1 year from today when patrons place a request in the OPAC. There is a corresponding piece of jQuery for the staff client in the intranet section. The future date can be modified by changing the values in the day, month, and year variables.

Creation Date: 3/30/2017

Status: Completed

Intranet or OPAC?: Intranet

Version: Developed on 3.16

//BEGIN Set newly placed holds in OPAC to expire after one year if not filledvar holdtodate =new Date();var day =("0"+ holdtodate.getDate()).slice(-2);var month =("0"+(holdtodate.getMonth()+1)).slice(-2);var year =("0"+(holdtodate.getFullYear()+1)).slice(-4);var holdtill =(month)+"/"+(day)+"/"+(year);$('#hold-request-form #to').val(holdtill);//END

Hide PayPal if patron owes less than $10.00

Developer: George Williams (NExpress)

Purpose: Hides the PayPal option in the OPAC if the patron owes less than $10.00 and puts a note on the page saying that payments can't be accepted for less than that (this wouldn't prevent a patron from making a $2.00 payment on a fee of $25.00, but it does prevent someone who only owes $2.00 from making any payments via PayPal)

Force patron to select SMS provider and enter SMS number before checkboxes can be checked

Developer: George Williams (NExpress)

Purpose: There is a bug in Koha 16.11 that breaks patron messaging if SMS checkboxes are checked but no SMS provider is selected. This jQuery attempts to fix this by 1) disabling the checkboxes and SMS number entry if no provider is selected 2) clearing the SMS number and all SMS checkboxes if the provider is removed 3) forcing the SMS number to 10 numeric characters with no punctuation or spaces 4) moving the SMS provider and SMS number above the messaging preferences table so it is more intuitive for patrons to enter that information first 5) and finally renaming the SMS labels from "SMS" to "Text message" because many patrons arent going to know what SMS means. There is corresponding jQuery for the staff client above

Creation Date: 4/10/2017

Status: Completed

Intranet or OPAC?: OPAC

Version: Developed on 16.11.05

OPAC breadcrumbs: Home › PATRONNAME › Your messaging settings

//BEGIN Hides SMS number and all SMS checkboxes when page is loaded$("#sms1, #sms2, #sms4, #sms5, #sms6").attr("disabled","disabled");$("#SMSnumber").parent().hide();//BEGIN Show SMS number if provider is not null and clear number and all SMS checkboxes if the provider is changed to null $("body").on("mousemove change click keyup",function(){if($("#sms_provider_id").val()!=""){$("#SMSnumber").parent().show("slow");}else{$("#SMSnumber").parent().hide("slow");$("#SMSnumber").val("");$("#smsbuttons").hide();$("#sms1, #sms2, #sms4, #sms5, #sms6").attr("disabled","disabled");$("#sms1, #sms2, #sms4, #sms5, #sms6").prop("checked",false);}});//BEGIN Enable SMS checkboxes only if SMS number is 10 digits and force SMS number entry to numerals only - no punctuation, alphanumeric characters, or spaces$("#SMSnumber").attr('maxlength','10');$('#SMSnumber').keydown(function(e){if($.inArray(e.keyCode,[46,8,9,27,13,110,190])!==-1||(e.keyCode==65&& e.ctrlKey===true)||(e.keyCode>=35&& e.keyCode<=40)){return;}if((e.shiftKey||(e.keyCode<48|| e.keyCode>57))&&(e.keyCode<96|| e.keyCode>105)){
e.preventDefault();}});$("body").on("mousemove change click keyup",function(){if($("#SMSnumber").val().length==10){$("#sms1, #sms2, #sms4, #sms5, #sms6").removeAttr("disabled");$("#smsbuttons").show("slow");}else{$("#sms1, #sms2, #sms4, #sms5, #sms6").attr("disabled","disabled");$("#sms1, #sms2, #sms4, #sms5, #sms6").prop("checked",false);$("#smsbuttons").hide("slow");}});//BEGIN Move SMS stuff above the table so that the first fields that need to be filled out are the first ones that patrons see$("#opac-messaging #usermessaging > form > fieldset.rows").insertBefore($("#opac-messaging #usermessaging > form > table"));$("#opac-messaging #usermessaging > form > fieldset.rows > ol:nth-child(3)").insertBefore($("#opac-messaging #usermessaging > form > fieldset.rows > ol:nth-child(2)"));//BEGIN Rename SMS "Text messaging" for the sake of people who don't know what SMS stands for$('#opac-messaging label, #opac-messaging th').each(function(){vartext=$(this).text();$(this).text(text.replace('SMS','Text message'));});

Change the label on the "Note" column in the patron summary

Developer: George Williams (NExpress)

Purpose: Changes the label in the header on the "Note" column in the checkouts table on the patron's summary page from "Note" to "Report a problem"

Search-related customizations for the OPAC

Add additional searches to OPAC

Developer: Jared Camins-Esakov

Purpose: Adds additional searches to the OPAC Search type dropdown

Status: Completed

Intranet or OPAC?: OPAC

Version: Any

Note: Both indexes used here are custom. In order to use the Auction date index, MARC21 field 033$a would need to be indexed and linked to CCL search prefix 'adate:'. In order to use the Journal title index, MARC21 field 773$t would need to be indexed and linked to CCL search prefix 'Host-item:'.

Add a link to map the publisher's location

Developer: Jared Camins-Esakov, C & P Bibliography Services

Purpose: Add a link to map the publisher's location.

Status: Completed

Intranet or OPAC?: OPAC

Version: All

Note: This particular implementation is for MARC21, and retrieves the location from an authority-controlled 751. In order to identify the correct 751, it looks for the relator code 'pup' (place of publication).

Note: This particular implementation is for MARC21, and retrieves the location from the 260$a, then removes any trailing punctuation. For all but the most recent of books, this is likely to result in an inaccurate (or useless) map.

Duplicate Novelist readalikes into the right sidebar on opac-detail.pl

Developer: Jason Robb (SEKLS)

Purpose: Creates a brief preview of Novelist content on the right sidebar in opac-detail.pl to lure patrons down the page for full content.

Status: Completed

Intranet or OPAC?: OPAC

Version: 3.22 (Requires Novelist Select subscription)

Note: I could only get this to work with two separate document.ready clauses. You can see the intended result in my OPAC.

//Wrap this in the first $(document).ready()$("#NovelistSelect").clone().prop({ id:"NovSidebar"}).appendTo("#ulactioncontainer");//Duplicates Novelist content and adds it to the right side of the page//Wrap this in the second $(document).ready()$(window).load(function(){if($(".NovSimilarTitles").length){$("#NovSidebar h3").text("You might also like...");$("#NovSidebar").append("<a href='#NovelistSelect' name='#NovelistSelect' id='MoreBelow'>See more recommendations</a>");$('#MoreBelow').click(function(){$('html, body').animate({scrollTop:$($.attr(this,'href')).offset().top},500);returnfalse;});}else{$("#NovSidebar h3").hide();$("#NovelistSelect h3").hide();}});

I adjusted some styles for a cleaner look. It hides much of the cloned content and formats what's left. The styles are somewhat specific to my OPAC so they'll likely need tweaked. This goes in the OPACUserCSS syspref.

Change the default view on OPAC detail pages

Developer: Owen Leonard

Creation Date: 2012-10-19

Purpose: to change the default view on OPAC or Intranet detail pages from holdings to, in this case, the title notes tab. The "1" indicates the number of the tab, starting with 0, so for title notes, you would need tab 1.

Status: Completed

Intranet or OPAC?: OPAC or Intranet

Version:3.8.

$('#bibliodescriptions > ul').tabs('select',1);

In 3.10 use:

$('#bibliodescriptions').tabs('select',1);

In 3.12 use:

$('#bibliodescriptions').tabs({ active:1});

SCO JQuery Statements

Hitting "Enter" key in the username field will jump focus to the password field instead of submitting form