TPAC: Centralize font size definitions

The TPAC CSS had a mix of absolute and proportional font size
definitions, making it impossible to define a single base size and have
the layout adjust appropriately, as well as making it difficult to tweak
sizes to, say, eliminate the distinction between 11px and 12px text.

Accordingly, create a separate TT2 file to define standard font sizes,
define one base font size, and then use proportional percentage-based
size definitions for a set of standard font sizes. This way, a site
could easily adjust the base font size to 15px and the rest of the
layout should automatically adjust, and/or revert to using absolute font
sizes for different categories if they prefer.

Note that I did simplify some of the categories of font sizes, as the
distinction between 111% and 110% was probably not evident to most
humans at most font sizes, and even the distinction between 120% and
125% would be 14.4px vs. 15px given a base size of 12px - which
different user agents could render differently anyway.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Hide OPAC-invisible holdings from SRU/Z39.50

The basic_holdings Supercat method filtered out deleted call numbers and
copies, but didn't filter out copies based on the OPAC visibility status
of copy location / status / the copy itself. This has undesired results
when third-party services request copies via SRU or Z39.50 and expose
copies that should not be visible to the public.

We wrap all of the visibility and deletedness checks for a given copy up
into a subroutine so that we can avoid repeating ourselves in the
basic_holdings logic. Also, if we missed a test, we can add it in one
handy place :)

(Thanks to Galen Charlton for finding two missing tests: circ lib
visibility and owning lib visibility!)

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Art Rhyno <art632000@yahoo.ca>
Provide permission for copy editor field hiding

We can adjust what fields are available in the copy editor in 2.2+, but that
requires the general UPDATE_ORG_SETTING permission.  The YAOUS-specific
permission here allows more granular control, so that staff can be given the
ability to adjust only that one OU setting.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Update permission name to match existing ones

To be consistent with our previous naming scheme for these.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Stamping upgrade script for copy editor field hiding permission

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Fix thinkos in EDI Invoicing

The lesson of the day is, test the code you actually commit, not just
the bits and pieces.  Thanks to Bill Erickson on this.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
TPAC locale picker: use POST instead of GET

Users could (deliberately or not) change another's language
preferences by sharing links with the "set_eg_locale" GET param given
the locale picker's current behaviour. By switching to a POST param, we
prevent this result from accidentally occurring.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Art Rhyno <art632000@yahoo.ca>
Documentation: add Auto Override Patron Hold Events documentation from ESI.

Signed-off-by: Robert Soulliere <robert.soulliere@mohawkcollege.ca>
Documentation: Add one paragraph to  Auto Override Patron Hold Events.

Signed-off-by: Robert Soulliere <robert.soulliere@mohawkcollege.ca>
Use XUL_REMOTE_BROWSER constant in reporter

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
TPAC: Autosuggest focus() throws a JS error

On page load, the Dojo autosuggest code tries to set focus to the
element with the ID "search_box" - which is fine, except when the page
does not have said ID. Therefore, test for the existence of the ID
before setting focus to it.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Art Rhyno <art632000@yahoo.ca>
TPAC: size_bigger, not size-bigger

Amusingly, TT2 attempts to treat "bigger" as a value to subtract from
"size". Cute. But we don't want the messages in the Apache log.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
CStoreEditor default session locale

Adds a new package-level variable:

$OpenILS::Utils::CStoreEditor::default_locale

If set, this value is used as the session_locale for new opensrf client
sessions.  If unset, the session_locale remains untouched by
CStoreEditor.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Set the default CStoreEditor locale on page load

Ech CStoreEditor request will use the locale of the current
page as the default opensrf session locale.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Make tpac cache locale-aware

Add a locale level to the TPAC object cache.  Each component of the
cache now looks like $cache{$component}{$locale}{stuff...}

e.g. $cache{list}{en_ca}{aout} = [...] # en_ca-fetched org unit types

The calling code in the templates requires no changes (abstraction
FTW).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
TPAC i18n: Turn UA locales into Evergreen locales

We need to convert the likes of fr_ca into fr-CA to be able to pull the
appropriate localized values from the database via CStoreEditor.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
ACQ return-to-[search/invoice] buttons repair

With changes in place to support newer version of xulrunner, several
buttons no longer work in the staff client.  These include:

Return to Search in PO and Selection List pages
Return to Invoice in PO and Selection List pages
Return in lineitem worksheet page

This fix avoids using document.referrer (which is no longer available)
with an explicit 'source' CGI parameter, which contains the path and
params of the source page.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
TPAC: Standardize i18n file installation

Make TPAC i18n files act like any other i18n file. In short:

1. When in build/i18n, a 'make LOCALE=fr-CA install' will copy
   the i18n file into the Open-ILS/src/data/locale directory.
2. In the build root, a 'make install' will copy all files from
   Open-ILS/src/data/locale into (by default) the
   /openils/var/data/locale directory.

This also means that when tarballs are created, all of the locales will
get packaged appropriately.

This commit also updates eg_vhost.conf to provide working out-of-the-box
examples for any installed locales, by using the names of the actual
PO files, and adds some contextual comments to explain how the
configuration directives work.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Protect against installs with no locales

Installs from source outside of tarballs may not have a built locale,
which would result in a make error and an aborted install. Protect
against that by checking for the existence of the locale install
directory before trying to copy the files into place.

In the weird case that Open-ILS/src/data/locale has been generated but
there are no files in it, protect against erroring out via the judicious
application of the - flag.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Importing translations for 2.3.beta2

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