Bill Erickson [Fri, 2 Nov 2012 19:28:27 +0000 (15:28 -0400)]
CStoreEditor auto-activity log redaction
CStoreEditor logs all update calls to the activity log as key/value
pairs on the updated object. Avoid loging key/value pairs for objects
when the API call being relayed by CStoreEditor is on the list of
log-protect API calls. Instead, log "**DETAILS REDACTED**".
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Mike Rylander [Wed, 10 Oct 2012 21:36:52 +0000 (17:36 -0400)]
Make it possible to suppress IDL fields
Some clients of external services, particularly pcrud and reporter-store,
need to be able to access tables that contain columns we'd rather restrict.
For instance, the passwd field on actor.usr.
To effect this feature we provide a blacklist attribute for fields, called
suppress_controller, which works in the same way as the class controller
attribute but names controllers not allowed to use the field. When the field
is explicitly named in a query (fieldmapper select block or json_query) an
error is thrown, and suppressed fields are ingored in general fieldmapper
search/retreive requests.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Wed, 10 Oct 2012 21:26:06 +0000 (17:26 -0400)]
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>
Mark Cooper [Tue, 23 Oct 2012 05:01:22 +0000 (22:01 -0700)]
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>
Mark Cooper [Wed, 10 Oct 2012 04:04:32 +0000 (21:04 -0700)]
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>
Bill Erickson [Thu, 18 Oct 2012 18:54:08 +0000 (14:54 -0400)]
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.
Namely, this means:
- You see five facets per category by default, not ten.
- You can click a link to see all the facets in a category
(before this it was impossible to display more than ten).
- When viewing all the facets in a category, you can click a link
to reduce the list back to five.
- This number five I'm talking about is configurable in config.tt2.
- Alphabetical sorting of facets grouped by the same numbers of
results is restored.
Steven Callender [Mon, 15 Oct 2012 14:48:28 +0000 (10:48 -0400)]
Added a check for the money.collections_tracker table when using the open-ils.collections.users_of_interest.warning_penalty.retrieve API call.
Users that are already entered into the money.collections_tracker table should not be recalled from the open-ils.collections.users_of_interest.warning_penalty.retrieve API. This change will check for the existance of the user in the money.colletions_tracker table.
Signed-off-by: Steven Callender <stevecallender@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Thu, 11 Oct 2012 05:43:01 +0000 (01:43 -0400)]
TPAC: Respect location visibility for result copies
Robert Soulliere noted in LP# 1062502 that copies in a location marked
"opac_visible = FALSE" were erroneously being displayed in search
results. This would occur if at least one copy on a record was in a
visible location, but other copies were in an invisible location.
This commit prevents copies in hidden locations from being displayed,
and also adds guards for the visibility of the copy status and the
circulation library.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Robert Soulliere <robert.soulliere@mohawkcollege.ca>
Serials: Don't force a Receive Unit Template in Alt Serials Control
Mary Llewellyn reported that she used to be able to use serials and
perform copy-less receiving without any value in this field.
The requirement that a value be set in the Receive Unit Template field
of serial distributions was added (by me) in 2.1 to the alternate serials
control interface, but is not enforced at lower levels.
I now believe that requiring a value here must have been a ham-handed
way to avoid a difficult-to-troubleshoot issue in copy-FUL receiving,
but copy-LESS serials receiving workflows indeed don't need this, so
this commit removes the requirement.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Wed, 5 Sep 2012 18:39:36 +0000 (14:39 -0400)]
Use current fiscal year for PO creation (API)
When creating a PO, if no fiscal_year is specified by the caller, use
the current fiscal year of the ordering agency. This change primarily
affects the Open-ILS/src/support-scripts/acq_order_reader.pl script (and
any other direct API callers) which does not offer the user a chance to
set the fiscal year manually.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Mike Rylander [Thu, 20 Sep 2012 19:17:36 +0000 (15:17 -0400)]
Fix autosuggest when in no-vis-check mode
When autosuggest is configured to avoid visiblity checking, it sends a
special org unit id of -1 to the database as a signal. However, the stored
procedure is expecting a NULL instead. This allows either by transforming
-1 to NULL within the stored procedure.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Conflicts:
Mike Rylander [Mon, 8 Oct 2012 18:12:49 +0000 (14:12 -0400)]
Be more strict about dates we generate
ISO-8601 dates must have a 4-character year component, however strftime does
not left-pad years to 4 characters when the century is one character long even
though the man page for strftime(3) suggests otherwise:
%F Equivalent to %Y-%m-%d (the ISO 8601 date format). (C99)
This makes stricter ISO-8601 parsers, such as Perl's DateTime module, unhappy.
So, we'll do it ourselves using the glibc extensions available to strftime for
specifying a padding character and desired length.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Mon, 8 Oct 2012 19:08:47 +0000 (15:08 -0400)]
Checkout: further validation of due date override
The check_past() function failed if given a date that was not strictly
in YYYY-mm-dd format; interestingly, a common transposition typo such
as "0212-10-20" results in "212-10-20" getting passed to check_past(),
and therefore generating an invalid date. Throw an exception in
check_past() rather than returning true, because we are not in fact
stating that the due date is in the past - and catch the exception and
flag the due date override box accordingly in the checkout screen.
We could bubble the exception up to the user, but hopefully highlighting
the checkout box as being in an invalid state will catch the attention
of the users.
[LFW: Slightly amended a comment in OpenILS/WWW/EGCatLoader/Util.pm]
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Mon, 8 Oct 2012 15:25:41 +0000 (11:25 -0400)]
TPAC: Invalid due dates cause 500 server error
CStore appears to return dates with leading 0s (such as '0212-10-08
23:59:59-05:17:32') with the leading 0s stripped off, resulting in
cases with 1-digit or 3-digit years for which DateTime::Format::ISO8601
returns an error.
We can protect against this problem by adding some defensive code to the
TPAC utility method to add the 0s back to the start of the year. We can
also log the problem when it occurs so that administrators can fix the
problem dates in the database.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Steven Chan [Wed, 25 Jul 2012 20:45:40 +0000 (13:45 -0700)]
Fix LP1029095, Acq: Receive Items on an Invoice does not work with Line Item Alerts
1. Item reception was encountering a Javascript exception in the
check_lineitem_alerts() helper function, because there was a mismatch
between the input parameter name and the variable name actually used.
2. Also, took the opportunity to improve the performance of the for loop
to scan through alerts.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Make scrollOnFocus default to false for dojo-based/conify interfaces
This change is intended to prevent a phenomenon in certain user
interfaces wherein clicking on a button or other widget can cause a
user's screen to suddenly jump and the user to need to click the widget
a second time before the desired function actually happens.
Dijits that have the scrollOnFocus property are the ones that tend to
exhibit this issue, especially, but not always, within the staff client
when the user's xulrunner window is not maximized.
There may be cases of interfaces actually relying on scrollOnFocus to do
something, but I think those cases should be so rare that this is still
worth doing, and exceptions can be applied there as needed.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Michael Peters [Mon, 1 Oct 2012 18:51:31 +0000 (14:51 -0400)]
LP#1020261 Better label for "Host" field in acq.edi_account
The host field of acq.edi_account is really meant to contain more than just a hostname.
It needs a scheme part, so that the whole contents of the field should be URI-ish, like
ftp://ftp1.somevendor.com
Otherwise Evergreen's EDI mechanism can guess wrongly that we want to use
SSH instead of FTP to connect.
This also adds a description for the field, in the footer, along with the other
"helpers".
Signed-off-by: Michael Peters <mrpeters@library.in.gov> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Fri, 21 Sep 2012 21:10:58 +0000 (17:10 -0400)]
Copy location group searching repairs
In the get_library BLOCK, upgrade any use of 'loc' to 'locg' instead of
trying to determine which to use in which situation. Before this change,
'loc' was being used as the loc_name for the main org unit selector,
which should always use 'locg'. For any other cases (related to search
params), it's always safe to use 'locg' over 'loc'.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
After upgrade, list records with missing or incorrect 901$c
This is a common cause of pain for upgrades. Let's try to identify the
problem early (even if it takes forever on a site with 3 million bibs)
and offer advice on correcting the problem if it is flagged.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Thu, 27 Sep 2012 03:25:53 +0000 (23:25 -0400)]
Apply the 0715 update for acq settings_group
We add the 'acq' config.settings_group in the seed data, and add the
other settings groups in the 2.1-2.2 upgrade script, but need to add the
acq settings_group to the 2.1-2.2 upgrade script.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Jeff Godin [Wed, 25 Apr 2012 06:59:01 +0000 (02:59 -0400)]
Syndetic AC: Add more review sources with comments
* Add more Syndetic review sources (commented out)
Add additional Syndetic review sources, commented out
for performance reasons -- each source represents a distinct
request from the server to the AC provider, and we currently
lack a means of configuring which are on/off, short of
commenting / uncommenting.
* Add comments for Syndetics review sources
* Fix file name for School Library Journal reviews, add New
York Times reviews.
Signed-off-by: Jeff Godin <jgodin@tadl.org> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Ben Shum [Wed, 25 Apr 2012 03:23:04 +0000 (23:23 -0400)]
Do not hide copy counts from results in staff client.
Remove the check for whether you are a staff login or not.
Ideally, we would want the copy counts to be displayed in both
public catalog and staff client.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Wells [Thu, 30 Aug 2012 19:26:15 +0000 (15:26 -0400)]
Increase Overlay Speed for Standard Identifiers
Due to an inefficient query order and a confused query planner,
some overlay matching can end up going abysmally slow. See LP
bug #1024095 for elaboration on the issue.
This commit reorders the joins as originally suggested by Lebbeous,
then adds a specific index to coax the query planner into making the
best choices. The example index here only targets the 02x identifier
fields, so other tag/subfield/substring(value) indexes will likely
be necessary for maximum benefit when matching on other fields
(e.g. 010).
These changes combined with the previous commit which replaces 'LIKE
ANY' with 'LIKE (... OR ...)' has shown great promise in testing.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Although the following four queries should be equivalent:
george || fred
(george) || fred
george || (fred)
(george) || (fred)
The Pg QueryParser driver generates SQL queries that return different
numbers of results for each of those queries, with all desired results
appearing only with the first query. This seems to be because of the way
filters are added in the interface.
This patch adjusts the Search code in TPAC to add an explicit group
around the user-entered query, which enables the Pg QueryParser driver
to handle all four of the above queries properly.
This patch should also resolve the problems encountered with the patch
for bug #1040740, "Implicit ANDs should have higher precedence than
explicit ORs"
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Mon, 13 Aug 2012 20:50:33 +0000 (16:50 -0400)]
TPAC: Make call number browse record links retain search lib
In addition to maintaining scope for the call number browse search
results, we also need to maintain the scope for the links for the call
number records in the results themselves (for example, the "retrieve
this record" link, or the "search for this author" link).
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Steven Callender [Tue, 10 Jul 2012 19:43:59 +0000 (15:43 -0400)]
Changed the thawing of a hold to first update the hold record and then re-target.
When thawing a hold, originaly we were first re-targeting before actually saving the hold record. On items with large quantities, sometimes the hold would timeout on targetig before getting a chance to actually save. This patch moves things around to first save the hold record before attempting to retarget.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Acq: New lineitems added to existing POs should inherit provider
Jeremy Miller of the Albany Public Library in Albany, OR, reports that
through the interface at
Actions For This Record -> View/Place Orders
in the staff client, when you add a lineitem to an existing PO, the new
lineitem has a null value in the "provider" field, instead of inheriting
the expected value from the PO.
This causes problems for some Acquisitions workflows.
The feature containing the bug appeared in 2.2, and this fix for it can be
backported that far.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Wed, 2 May 2012 13:55:06 +0000 (09:55 -0400)]
ACQ support for two-step vandelay imports
If a lineitm is loaded into a queue via ACQ+Vandelay and a later attempt
is made to load the record into the catalog via ACQ+Vandelay, the
attempt will fail, because ACQ+Vandelay treats all
not-yet-fully-imported lineitems as new to vandelay. This change
inspects lineitems at vandelay processing time to determine if they are
already linked to a VL record or if a new one is needed. It also
removes the requirement that a queue be provided when all records in
process are already linked to a VL record (which already lives in a
queue).
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
And adjust the comment to make more sense. There is no higher level filter
that prevents copy holds on parted items, so there is no filter for them to
"slip through".
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Thu, 16 Aug 2012 19:40:58 +0000 (15:40 -0400)]
Sanity check cstore limit/offset param values
Certain cstore calls (direct / json_query) that support limit/offset
params called with a non-string / non-numeric value
e.g. { "limit": null }
result in a cstore segfault as it tries to call atoi(NULL) under the
covers. This patch prevents this by verifying that the limit/offset
values are actual strings or numbers (i.e. return a value from
jsonObjectGetString) and not JSON_NULL, etc.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Wed, 15 Aug 2012 11:18:53 +0000 (07:18 -0400)]
TPAC: Move "Export to RefWorks" into utility area
When the RefWorks functionality was being added to TPAC, the design and
layout were very much in flux. Now that the layout has been established
with utilities like "Place Hold" on the right hand side, move the
"Export to RefWorks" button into the same location.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Art Rhyno <art632000@yahoo.ca>
Dan Scott [Tue, 21 Aug 2012 21:23:26 +0000 (17:23 -0400)]
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>
Dan Scott [Mon, 20 Aug 2012 18:11:50 +0000 (14:11 -0400)]
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>
Dan Scott [Mon, 30 Jul 2012 15:30:50 +0000 (11:30 -0400)]
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>
Dan Scott [Sat, 4 Aug 2012 14:26:25 +0000 (10:26 -0400)]
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>
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>
Conflicts:
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Mike Rylander [Thu, 16 Aug 2012 17:45:23 +0000 (13:45 -0400)]
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>
Conflicts:
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Dan Scott [Mon, 16 Jul 2012 17:27:54 +0000 (13:27 -0400)]
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>
Trying to update patron CSS color fails here, so don't try
After modifying user standing penalties ("messages" in the staff client
patron interface), you could get this error message in an alert() dialog:
TypeError: patron.display is undefined.
We were apparently trying to use patron.util.set_patron_css() wrongly,
so the commented out changed verison of the call got farther, but stopped at
...penalties[i].standing_penalty().name is not a function.
Which probably has something to do with unfleshed data. Somebody can
get to the bottom of this if they want, but for now it's easier just not
to try to do this and make the alert() dialog go away.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Sometimes it seems that child_init has not run properly for supercat.
This attempts to fix that by checking for the global appsession objects. If
they are not there we run child_init. The function that does this is being
called from all handler entry functions.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Ben Shum [Tue, 7 Aug 2012 17:48:31 +0000 (13:48 -0400)]
TPAC - fix pickup locations for edit holds
When a patron goes to edit a hold in TPAC, they have the option to
choose a different pickup location. Unfortunately, it looks like that
dropdown does not prevent them from selecting locations that aren't
normally allowed for pickups, such as system groups or consortium
itself.
This patch adds a check for 'can_have_vols_only' to the edit holds
screen.
Credit to Melissa Lefebvre for finally nailing down the source of
the issue.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Fri, 10 Aug 2012 18:06:36 +0000 (14:06 -0400)]
Fiscal year selector in ACQ order record upload
* Support a 'fiscal_year' parameter to ACQ order record upload API.
* Adds a new "Fiscal Year" selector to the upload form to facilitate
uploading orders to different fiscal years.
This partially resolves LP 1031927 by allowing manual selection of the
correct fiscal year.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Ben Shum [Sun, 12 Aug 2012 07:25:49 +0000 (03:25 -0400)]
TPAC - add library scoping to shelf browser
The shelf browser currently uses the 'loc' variable to define scoping and
limit browsing to specific org units. However, since much of the scoping
actually uses 'locg', the scoping was broken for the shelf browser.
Additionally, under Advanced Search's Numeric Search, the option for
'Call Number (Shelf Browse)' only applies the 'cn' variable to searches
and never adds the search scope, despite the search library now being
an available filter choice.
Based on suggestion by Dan Scott in IRC, this patch uses the function for
_get_search_lib() to retrieve the search library and add it to both parts
of the shelf browser.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Jason Stephenson [Wed, 25 Jul 2012 17:43:38 +0000 (13:43 -0400)]
Make opac/results.tt2 remember facet when sorting, etc.
Add a hidden field in the search form and set its value to the value
of the CGI 'facet' param if the facet parameter is set. This appears
to work for multiple facets. Clearing a facet is as simple as clicking
on the gray-backgounded facet name.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Ben Shum [Thu, 9 Aug 2012 16:27:57 +0000 (12:27 -0400)]
TPAC - fix alignment of "You are now browsing..." in shelf browser
The "You are now browsing..." message does not align to the center of the
page. Changing the <div> to a <p> seems to properly align the text.
Along the way, we should remove the extra <span> and <strong> (the strong
is redundant with the css being inherited by color_4 class) and make the
new single line message more i18n-friendly for future translations.
Credit to Michael Peters for noticing the problem and thanks to Dan Scott,
Lebbeous Fogle-Weekley, and Thomas Berezansky for help via IRC for the
i18n-bits.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Michael Peters <mrpeters@library.in.gov> Signed-off-by: Dan Scott <dscott@laurentian.ca>
The cnoffset was strictly checking for values that start with a digit.
But negative numbers start with a "-" instead. Once this check was
changed, the previous link will continue to move further into negative
offsets.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 9 Aug 2012 22:25:00 +0000 (18:25 -0400)]
Authorities: Fix broken UI due to new XUL/Dojo/regressions
New versions of XUL, since Firefox 10, hate dojo.query("foo bar"), so we
have to refactor it to use dojo.query("foo").query("bar") instead. At
least until we upgrade to a new version of Dojo.
In addition, 522d8d82 introduced a regression meaning that the text of
the authorities was no longer wrapped in a SPAN element with a class of
"text". That in turn meant that the Dojo queries weren't picking up the
labels for the merge box, leaving no visual indication to the user as to
what authorities exactly were being merged. So, repair that.
Also, similar to a fix for the MFHD editor, set the initial height of
the spawned MARC Editor for an authority record to something reasonable.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Conflicts:
Open-ILS/web/js/ui/default/cat/authority/list.js
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Fri, 3 Aug 2012 14:59:33 +0000 (10:59 -0400)]
Add dependencies for Fedora
Noted by Net Wolf on the mailing list, some core dependencies were
missing from the Fedora Makefile.install installer. As some of them have
recently been packaged for Fedora 17, add them to the package
collection; others are still unpackaged, so leave them there.
Note: the packages are not available on Fedora 16, but that has a
limited remaining shelf life anyway, so consider this a shift to
supporting only the latest stable version of Fedora.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Fri, 27 Jul 2012 20:27:29 +0000 (16:27 -0400)]
Use MARC::Field objects to append new fields
While the deprecated MARC::Record::add_fields() method allows you to add
a list of fields using a list object, append_fields() requires
MARC::Field objects.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Dan Scott [Tue, 24 Jul 2012 18:14:01 +0000 (14:14 -0400)]
Switch to a PLPERLU maintain_901() trigger function
We've been burned by regexes that fail to grok XML properly numerous
times now. Standardizing on something that actually understands MARC
seems like a good idea.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The regex used to insert the 901 field can put the new
field in the wrong location if the MARCXML record being
modified uses namespace prefixes. This patch tightens
the regexp to avoid this problem.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 26 Jul 2012 14:45:25 +0000 (10:45 -0400)]
Get the TPAC basic link inline for <noscript>
The TPAC basic link appeared outside the <p> tag inside the <noscript>
section of the JSPAC, meaning that it would display on the far left
border of the screen rather than right after the colon. Fix that by
getting it inline.
Also apply a style to the link so it appears as some kind of a link.
What kind of madman overrode the basic <a> element style to make it
appear as plain text by default in the first place? :P
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Wed, 25 Jul 2012 16:45:27 +0000 (12:45 -0400)]
Add evergreen.get_locale_name() function to base schema
I added the evergreen.get_locale_name() function to the database schema
upgrades in 0723 but failed to add it to the base schema, resulting in
errors like: 'egweb: template error: undef error - Can't call method
"maketext"'. Get rid of that problem!
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Dan Scott [Fri, 20 Jul 2012 17:41:50 +0000 (13:41 -0400)]
TPAC: Decode translated strings into UTF8
Without the _decode pragma, Locale::Maketext::Lexixcon did not
understand that it was being handed Unicode and generated some funky
output in the TPAC templates.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Tue, 17 Jul 2012 21:37:54 +0000 (17:37 -0400)]
TPAC: Implement a locale picker
In situations in which more than a single locale is configured, display
a locale picker in the TPAC header based on the registered locales. We
set the eg_locale cookie if passed a set_eg_locale GET param. Default
the selection to the currently selected locale (if any) and resubmit the
current page request.
Grabs the localized locale names, if available, from the database;
otherwise falls back to the en-US version of the locale names.
The locale picker form resubmits the current page with any variables
that were present in the current page request, so that switching locales
should still maintain state.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Conflicts: