Authority popups are empty: fix dojo.query() usage

When you right-click on a controllable field to display the contents of
the matching authority records, the contents of the matching authority
records simply appear as empty grey boxes.

This is another case of needing to iterate over multiple values
separately rather than using one convenient CSS selector.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Rollback cstore transaction before bbag record load

To avoid timeouts, which results in transaction rollbacks, preemptively
roll back the bookbag fetching cstore transaction before we retrieve
what could be a very large list of bookbag records data.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Admin -> Local Admin -> Item Attribute Editor

Main purpose is to allow you to spawn the Item Attribute Editor for the purpose
of configuring templates and using the Hide Fields feature without actually
finding an item to work and putting it at risk of accidental modification.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Sort Templates/Reports/Output

By name for Templates/Reports, by Run Time for Output.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Ben Shum <bshum@biblio.org>
LP#826917: Marc editor, CTRL+F6, F7, F8 no longer working on 2.0+

Updated marcedit.js to recognize F6/7/8 according to codes at:
http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes.
Did not modify behavior (so input focus is not adjusted post record load).

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Add missing ? to url_prefix regex check

Fixes Barcode Completion and who knows what else.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Add detailed contents content to TPAC record summary

Drawing from the LoC MARC definitions for the 500 field, display'em if you
got'em. Given that many keyword searches are likely to draw upon this content,
we should display the matches in the record summary.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
TPAC: Show contents notes directly in record summary

By popular demand in IRC, move the contents notes directly into the body
of the record summary rather than hiding the content under a twisty.
This improves external indexing of the page and makes the contents notes
more immediately evident to users.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
TPAC: Use a single table for all content notes

Rather than having one table per kind of content note, keep them all in
a single table. Thanks to Ben Shum for the prod.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
TPAC: indent Content descriptions to line up with Record details

In the interest of trying to keep things a little more presentable, indent
the new content notes so that they line up with the record details bulleted
list items.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
LP#1066629: Acq: Receiving an item should not change the status to "In Process" in many cases

As suggested, when received, restrict copy status update for lineitem copies to only those that were on-order. Otherwise copies may have the status set to 'In Process' inappropriately.

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Sample Apache error syslog captures stderr

Not all STDERR output and not all $req->log->foo() output makes it to
the Apache error log when using the 'ErrorLog syslog:local7'
configuration directive.  This changes the sample config to match the
CustomLog config so that all output is captured and redirected to
syslog.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
TPAC: don't repeat subfields in record content notes

Given a MARC field like "500 $a 1 $b 2 $c 3", the content note would
display as "1 1 2 1 2 3" as each subfield was appended to the total
set of notes.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Avoid specific version mention for database extensions

As tsbere pointed out, the 9.1 database script will be used for every
version after 9.1... which makes it confusing to have a version number.
As the primary reason for the difference is the switch to extensions
instead of contrib modules, use a name that flags that difference.

Convert the 9.1 full-text search configuration into a symbolic link
instead of maintaining a separate copy of the file.

Given that the pre-9.1 database script was focused on the creation of
PostgreSQL contribs, call it that, rather than the (now confusingly)
generic "create_database.sql" that existed from a time when contribs
ruled the earth and extensions were mere fantasy.

Adjust eg_db_config.sql for these changes as well - including the
command line switches.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Add support for PostgreSQL 9.2, drop TSearch2 extension

The TSearch2 extension hasn't been needed for a long time, and it causes
problems trying to use ts_rewrite(TSQUERY, TEXT) at least.

Add a full text search config script for PostgreSQL 9.2.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Add tsearch2 removal upgrade script

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Munge concerto to include # signs in series facets

Search for "Piano concerto in C major, op. 39" or "Beethoven: concertos
and overtures" and you'll get facets with # signs to assist with fixing
LP # 856811.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
TPAC: Add search torture tests to concerto record

In addition to # signs causing problems in facets, we found that search
syntax in general is surfaced directly in most links that are exposed to
users in the TPAC. This commit adds several examples to the record with
the title "Trombone concerto (1991)":

In the title, there is an embedded "subject:" search which will be
triggered by autocomplete.

In the author (100 field), there is an embedded "author:" search which
will be triggered from the record details page. This also includes
another usage of the # sign.

In the subject fields, there are:
  * an embedded "subject:" search which will be triggered from the
    facets, autocomplete, and record details page
  * an embedded negation operator which will be triggered from the
    facets, autocomplete, and record details page

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
TPAC: Address some search syntax leaks in links

Expand the list of filtered characters to cover all of the special
characters documented for the Evergreen search grammar
(http://evergreen-ils.org/dokuwiki/doku.php?id=documentation:technical:search_grammar)
when generating links in the TPAC so as to avoid inadvertently launching
filtered searches when a user clicks on something that should just be a
display value.

For example, if a title includes "Presenting a subject: tips for
consultants", it should _not_ launch a search for "subject" containing
"tips for consultants".

This commit addresses most of the link problems in the record
display, as well as the author links in the search results table.

Still problematic are the facets (which seem to rely on exact matching,
such that filtering out the problematic characters is itself
problematic) and autocomplete (which requires modifying the Autocomplete
Dojo widget).

In addition, this commit makes the series code actually display, as it
was using a non-standard method to attempt to return the results from
the BLOCK (and failing). Also, it makes the links for authors in the
record details match the MODS32 definition for personal name parts and
only use the "acdq" subfields. This enables a click on the link to
actually return results; previously, in the case where the author field
included (for example) a subfield "g" value, that value would be
included in the generated link and would likely lead to 0 hits.

For authors, we substitute with a space rather than just eliding the
substituted value. Authors are particularly likely to have dates like
1899-1978; "1899 1978" matches, but "18991978" will not.

Perhaps we should take the same approach with the others, or break down
the search/replace logic a little further (for example, we could remove
the "-" only if it is preceded by a space or is at the start of the
string and is followed immediately by a character, and preserve it if it
is surrounded by digits). But this seems to take us pretty far down the
road of less negatively surprising results.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Staff client initial hostname

Add support for an initial staff client hostname.

It can be specified during building the staff client or via configure.

During making the staff client:

make INITIAL_HOST=hostname build

During configure:

./configure --with-initialhost=hostname

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>