[Koha] Can't get jquery scripts to work in koha

Marty Jongepier marty.jongepier at gmail.com
Sun Oct 12 12:11:24 NZDT 2014


Hi all,

I tried to get a jquery to work in koha 3.16.04.000, using iceweasel with
iced-tea web plugin.

Since i am new to jquery, I tried two existing jquery scripts,

I copied and pasted from here; http://www.mydk-tomic.net/?q=node/17, which
should be a script that gives me 3 different words in the advanced search
page, instead of 3 times keyword, I want title, author and subject, or
whatever else I choose .

Apparently this script should do it;

$(document).ready(function(){   $("#booleansearch
option:eq(0)[value='ti']").attr('selected','selected');$("#booleansearch
option:eq(1)[value='au,wrdl']").attr('selected','selected');$("#booleansearch
option:eq(2)[value='su,wrdl']").attr('selected','selected');});

I pasted that in the intranetuserjs system preference, and behold; nothing
is happening. I still get keyword, keyword, keyword.

So I tried something else, and found in the koha jquery library a script by
Nicole C. Engard (and I am convinced she KNOWS what she is doing) to change
the text of the OPAC login form. I pasted that into the opacuserjs system
preference, and that did not do anything either. Just for reference, I
pasted that in here as well (see end of message).

So, what do I do wrong? Did I miss a setting, is there a kind of main
switch preference for turning jquery on or off? Thanks!

Marty

$(document).ready(function(){
  $("#auth legend:contains('Log in to your account')").text("Log in to
your library account");
  $("#auth label[for='userid']").html("Library Card Number:");
  $("#auth label[for='password']").html("PIN:");});


More information about the Koha mailing list