Commit graph

200 commits

Author SHA1 Message Date
46c0706ee1 Bug #3071 - Z39.50 search result highlights are mixed
This patch modifies z3950 search result page in order to
use jquery to highlight rows rather than an explicit
css class.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-01 10:49:53 -05:00
Joe Atzberger
aef62d880c cleanup some of value_builder MARC21 plugins
Tons of unnecessary dependencies removed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 19:06:50 -05:00
Joe Atzberger
1c5637032a perltidy some ugly value_builder plugins
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 19:06:46 -05:00
Nahuel ANGELINETTI
f62ee9385f (bug #3063) fix unimarc 4xx plugin with cloned field
this patch fix the unimarc plugin 4xx to work with cloned fields, the id of the div wasn't replaced when the field was cloned.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 19:06:41 -05:00
0a2be5e29b Changes to tabindex values to improve keyboard access.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:21 -05:00
Nahuel ANGELINETTI
04f8382d5b (bug #2978) fix differents bugs in marc editor
This patch fix two bugs:

 * tag duplication
If you try to duplicate an autority tag, the javascript call is kept, and the id is not modified, and fields are not emptied.

 * openAuth() call
The id called on duplicated fields is not the great id.
And the different values sent to auth_finder.pl to pre-fetch datas from firstname, etc... send values from all same tags, and not from the selected tag.
(cherry picked from commit 40115eb110)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 08:39:51 -06:00
Henri-Damien LAURENT
1c14654c8e Using openAuth function for authorities Searching
Adding two js functions :
getSubfieldcode(tagsubfieldid)  returns the subfieldcode from tagsubfieldid
(tag_XXX_subfield_Y_WWWW_TTTT returns Y)
getTagInputnameFilter(tagsubfieldid)
(tag_XXX_subfield_Y_WWWW_TTTT returns tag_XXX_subfield_._WWWW)

I think those two functions are much useful when cataloguing.

openAuth now takes all the information for Heading search of authorities.

TODO A javascript DOM Navigation would be better.
This js works, but is surely slower than DOM would be.
Still, it seems that our DOM tree is quite hard to decode.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 08:34:27 -06:00
Galen Charlton
8f07521a2d bug 2955: fix remaining calls to GetMarcFromKohaField
This includes part of a patch from Henri-Damien Laurent
that could not be applied because Chris and Joe patches
happened to win the race.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 16:29:19 -06:00
Nahuel ANGELINETTI
6b4fed3b47 (bug #2956) fix another results calculation
this patch fix more about 4XX plugin, for results display and calculation.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:47:41 -06:00
Chris Nighswonger
f185d69ad2 kohabug 2955 (2/2) GetMarcFromKohaField now requires $framework
Failure to pass the $framework parameter by dateaccessioned.pl causes
GetMarcFromKohaField to return 0,0 which breaks the value builder. The
patch
submitted corrects this.

This patch is build against the current 3.1.x HEAD, however, this bug
also
affects the 3.0.x codebase and should be applied there as well.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:46:28 -06:00
Chris Nighswonger
db568fdee5 kohabug 2955 GetMarcFromKohaField now requires $framework
Failure to pass the $framework parameter by barcode.pl causes
GetMarcFromKohaField to return 0,0 which breaks the value builder. The
patch
submitted corrects this.

This patch is build against the current 3.1.x HEAD, however, this bug
also
affects the 3.0.x codebase and should be applied there as well.

fbcbug 4

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:46:06 -06:00
Nahuel ANGELINETTI
f7628cac30 (bug #2956) fix 4xx plugin pagination
this patch rework the calculation of the pagination and of results

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:45:55 -06:00
Nahuel Angelinetti
7588809b0d bug 2829: add a plugin for 010$a field and 210$c
This plugin use the 'ISBN' field(010$a) to search the "publishercode"(editor) and set it in as 210$c.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-11 09:52:46 -06:00
Nahuel Angelinetti
f6cfcd933d No more used since a while.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-01 10:34:44 -06:00
Nahuel Angelinetti
e0bbb9d7e7 Delete all calls to thesaurus_popup.pl, and no more used plugins.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-01 10:31:46 -06:00
John Beppu
9f782076db bug 2563: could not input into marc 008, fields 7-10 and 11-14
You actually *could* input data into those fields, but it wasn't
immediately obvious, because the field size was "4" and the
value was "    ".  You couldn't type anything in until you
backspaced over the spaces that were there by default.

UPDATE 2008-11-05:  Make absolutely sure that those values
are 4 chars long (via JavaScript)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-06 15:53:24 -06:00
Nahuel Angelinetti
16fef8ba3e Report to user the connections errors to z39.50 server, like timeout(10007), and refused(10000).
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-21 10:23:18 -05:00
Galen Charlton
4bf76c2d77 bug 2615: remove unneeded 'require Exporter'
Most Perl scripts (as opposed to modules) do
not need to require Exporter.

No user-visible or documentation changes.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-26 09:05:08 -05:00
Jesse Weaver
852f75bba6 fix for bug 2556: Overlaying records sometimes creates new record
This makes "Try another search" in the Z39.50 search tool pass the biblionumber along, so that records are overlaid correctly.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-16 22:35:44 -05:00
Vincent Danjean
d9ac3b3d33 Shebang line must be the first of the file
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 20:23:53 -05:00
Galen Charlton
3d2f7253ea bug 2317: avoid crash when auto-creating authority
If BiblioAddsAuthorities is ON, saving a MARC bib record
in the cataloging editor can create new authority records.
When using MARC21, if one of those authority records
has diacritics in its heading, the save crashes with the
following error:

Wide character in null operation at
/usr/local/share/perl/5.8.8/MARC/Charset/Table.pm line 96

To prevent this, new MARC21 authorities created by
BiblioAddsAuthorities have the Leader/09 set to 'a'.  Note
that this is not currently required for UNIMARC authorities,
as MARC::File::XML->as_xml_record() does not attempt
to transcode UNIMARC records from MARC-8 to UTF-8.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-06 07:08:36 -05:00
Jesse Weaver
ac0d340bd5 kohabug 2345: bad comparisons pervade reports
This patch changes all $foo eq undef's to !defined($foo). It also makes misc/spellcheck_suggest/build_spellcheck_suggest.pl have proper syntax.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-27 06:11:08 -05:00
Joshua Ferraro
6cc8b7ce10 If the authorized value description doesn't exist, display the value 2008-07-25 10:08:31 -05:00
Joshua Ferraro
0bb46e1d57 Fix for bug 2398: Source of Classification - Add item or Edit item in
staff client is defaulting to the ASNCR code instead of the blank above

For some reason the loop used to build the list of values was
setting the first value to the $value variable if $value wasn't
set already, and the default_value was inside rather than outside
the loop. I've removed the setting inside the loop and placed
the default value outide the loop. It's possible I just don't
understand what the original intention was.
2008-07-24 16:23:33 -05:00
Chris Nighswonger
8f55696a4d kohabug 2374 Corrects autoBarcode behavior in additem.pl
There should be a documenation change at least for 3.0 to the effect that on systems
not running JavaScript, 'incremental' is the only option available for autoBarcode
although other options appear. A fix for this will hopefully appear in 3.2.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-22 15:50:30 -05:00
Joshua Ferraro
82076c3d39 Fix a bug where the 008 field got replaced if you
inadvertantly clicked in the field and it wasn't empty.
This patch prevents the field from being replaced unless
it's empty.
2008-07-21 19:38:52 -05:00
Joshua Ferraro
bc408475f8 This patch resolves a few MARC21 Framework issues for
a default installation:

1. Re-names several of the item fields to make more sense to catalogers and patrons
2. Remove links Non-public note from items.paidfor
3. Changes Non-public note to be hidden in the OPAC view

Fixes issues with the 'hidden' field in the framework, specifically:

1. the editor obeys the rules of possible values for hidden (>4, or <-4)
2. the OPAC MARC display obeys the rules of positive values meaning 'hidden in OPAC'
3. the staff MARC display now obeys the rules specified in the hidden values description
2008-07-18 17:39:08 -05:00
Andrew Moore
b14eb8f093 bug 1980 [3/3]: remove bug workaround from pagination links
yesterday, the C4::Output::pagination_bar had a bug in it that I was crudely working around.
atz fixed that bug this morning. This patch removes the workaround. Thanks, atz!

I'm sending along atz's patch again with my signoff. It needs to be applied before this, as does the
other 1980 patch. I have sent that along (again), too, with a modified subject line. That makes a total of 3 patches for 1980.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:18:30 -05:00
Andrew Moore
66c420c3d0 bug 1980: updateing calls to SimpleSearch to limit number of things returned
C4::Search::SimpleSearch was alredy patched to let you pass in the number of results you want back.
These instances were not using the new API. This patch makes all calls to SimpleSearch specify a limit.

I improved the documentation of SimpleSearch a bit to include the third returned value.

I believe there's a bug in C4::Output::pagination_bar, in that it doesn't deal well with URLs
with only one pair of parameter=value passed to it. I'm getting around this by passing in a second
pair that does nothing.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:11:24 -05:00
MJ Ray
500b7ee4d6 Improve Z39.50 result checking and display a little:
1. Replaces display hostname with servername as shown on the selection screen.
2. If the record download errors, try to display the error.
3. A more useful warning if $DEBUG is set.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-08 18:21:43 -05:00
Joshua Ferraro
1e45b14714 Prior to this patch, XSL and scan indexes conflicted.
This patch resolves the issue by passing $scan to the
searchResults function to toggle XSL for scan results
2008-07-08 15:59:09 -05:00
Galen Charlton
c48da8131d bug 1909: add delete field/subfield button to MARC editor
A button to delete (non-mandatory) subfields and fields
is added to the bib and authority MARC editors.  This button,
which displays as a hypen or minus sign after the plus sign
to clone a field, acts as follows:

[1] When deleting a whole MARC field, if at least
    one other repeat of that field exists, deletes
    the field from the editor page.  If the field
    to be deleted is the last instance of that tag,
    the contents of the field are cleared, not removed.
    This allows one to delete all 650 tags, then
    add a new one without having to reload the
    record in the editor.

[2] When deleting a subfield, if at least one other
    repeat of that subfield and its tag occurs
    *anywhere else in the record, not necessarily in the same tag*,
    deletes the subfield.
    Otherwise, if the subfield is the last occurrence
    of that tag/subfield combination, clears the input
    form instead.

Documentation note: new screenshots for MARC editor, plus
description of the '-' button.

Credit to MJ Ray for introducing the '-' button
and the UnCloneField JavaScript function.

Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-08 12:31:30 -05:00
Galen Charlton
9035991112 bug 2203 [1/2]: increase input maxlength in MARC editor
The maximum length allowed for input into a subfield in
the MARC editor has been increased to 9999 charaacters
(from 255), permitting data entry of a field that meets
the maximum MARC field limit of 9999 octets.

Also set the maximum length for the leader form input
to 24 characters and the length for the MARC21 008
to 40 characters.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-08 09:36:13 -05:00
Paul POULAIN
4652b4dbc6 BUGFIX : unimarc leader is 24, not 25. Fixing the javascript test
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-04 09:27:46 -05:00
Galen Charlton
98f638bb14 bug 2254 [1/3]: fixed GetAuthType(); avoid crash
Improved C4::AuthoritiesMarc::GetAuthType() so that
it returns either a hashref (if the authority type exists)
or undef (if it does not exist).  The same
accessor should not be used to either return a single
value or all values of a settings list.  Note that
all existing clients of GetAuthType are expecting
either a single hashref or undef; none of them
expected the arrayref that could be returned by
the previous version of the accessor.

When BiblioAddsAuthorities is ON, addbiblio.pl
now checks the return value of GetAuthType and
no longer crashes as follows if the MARC framework
specifies an invalid authority type for a given subfield:

Can't coerce array into hash at .../cataloging/addbiblio.pl line 738.

No documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:24 -05:00
Galen Charlton
8894d28779 bug 2206: always have $9 for headings fields
If a field can be linked to an authority record (i.e.,
an authtypecode is defined for subfield $a), always
include the subfield $9 in a (readonly) input element even
if it is marked hidden per the MARC framework.

Prior to this patch, a $9 marked hidden per the framework
would not be included in the form, causing the authority record
number link to not be added when choosing a heading from the authority
finder.  In other words, with BiblioAddsAuthorities OFF,
any authorized headings in bibs added via the MARC editor
would not have the subfield $9, and thus would appear
to not be used by any bibs.

Note that subfield $9 is set to be readonly, as changing the
authority number link does not currently change the
heading stored in the bib record.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:23 -05:00
Galen Charlton
ee49d6d372 kohabug 2207 - improve indicator input in MARC editor
Instead of having one input field for both indicators
of a variable field, the bib and authority MARC editor
now has an input field for each indicator.  This has
two main advantages:

* it is easier to tell what the indicator values are,
  even when the first indicator is a space
* it is easier to set the first indicator to blank
  and the second indicator to non-blank.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-12 11:17:35 -05:00
Henri-Damien LAURENT
6f45077848 Adding search on ISSN for z3950_search.pl
seems that search on ISSN was not taken into account adding @or @attr 1=8

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 13:52:14 -05:00
Galen Charlton
a7ba1bb941 kohabug 2105: prevent crash on IE7
Three scripts were incorrect setting the HTTP type
header to 'utf-8' instead of something appropriate
like 'text/html' - Firefox evidentally can ignore that
mistake, but IE7 does not.

Fixed by replacing an invalid print of the HTTP header
and template output with a call to
C4::Output::output_html_with_http_headers.

Also corrected POD in C4::Auth and InstallAuth to
reflect correct use of output_html_with_http_headers.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-13 17:40:36 -05:00
Galen Charlton
49bccd5308 XHTML correction - readonly attribute can contain only "readonly"
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:17:32 -05:00
Henri-Damien LAURENT
79d6243333 Bug Fix : Blocker 2017
disabled values are not passed to CGI.
So that if you disable entry, values and subfield codes are mixed up.
I changed disabled=tru to readonly and it fixes the bug.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:55 -05:00
Chris Nighswonger
9b47b82a77 Porting SimpleSearch return changes to all code calling it.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:45 -05:00
Paul POULAIN
91fca4a9ab BiblioAddsAuthorities improvement/fix
this commit restore a better behaviour :
- if ON : the librarian can enter manually an authority-linked marc field. and if it does not exist in the authorities file, it will be created automatically
- if OFF : the authority must exist in the authority file, and the librarian can't enter if manually in the MARC editor

This patch just deals with the OFF case (the ON was already here). With OFF the behaviour is now the same as in 2.2

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 02:55:08 -05:00
Andrew Moore
5c51edc653 bug 1890: fixing calls to C4::Search::SimpleSearch
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:44:23 -05:00
Ryan Higgins
d878a92b3d Add MARC preview to Z39.50 search.
Also, add title string to MARC editor.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-17 19:25:51 -05:00
Ryan Higgins
d032a81cb7 Add z39.50 search form distinct from MARC editor
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-17 19:25:48 -05:00
Galen Charlton
9222f7a6ca created old_issues and old_reserves tables
The new tables have the same structure and constraints
as the tables they archive with the following exceptions:

* borrowernumber and biblionumber in old_reserves can be
  NULL
* the FK constraints (e.g., for itemnumber) on old_reserves
  set the child column to NULL if the parent row is deleted
  instead of deleting the child row.
* there is no FK constraint on old_issues.branchcode, allowing
  a branch to be deleted without changing archived requests.

Some miscellaneous cleanup was done as part of this patch:

* GetMemberIssuesAndFines (C4::Members) now uses bind variables
* fixed POD for GetMemberIssuesAndFines

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:36:31 -05:00
Galen Charlton
86e4cdf54b use 'F' or 'W', not 'f' or 'w' when using reserves.found
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:36:24 -05:00
Galen Charlton
eec7b58efa bug 1893: add jump link to reservoir search results
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-27 09:02:52 -06:00
Chris Nighswonger
ff026f1076 Adding another barcode autogeneration sequence to barcode.pl - bumped ver to 054
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-16 11:29:13 -06:00