Galen Charlton [Sat, 19 Jan 2013 05:46:32 +0000 (00:46 -0500)]
LP#1086458: clean up after event listeners in circ/patron interface
Upon window unload, now removes event listeners, both ones explicitly
created by the page JavsScript as well as ones created by
util.list, util.controller, and persist_helper().
The same approach of defining cleanup fnctions used by unload
events can be applied to the rest of the staff client, but
this patch focuses on circulation first.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
EventListenerList allows one to maintain a list
of event listeners, then remove them all when it's
time to clean up a window.
Usage is:
var list = new EventListenerList();
// attach an event listener
list.add(node, 'command', function(ev) { alert('BOO!'); }, false);
...
// get rid of them
list.removeAll();
Based on an idea by Jason Etheridge.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
After discussion with Mike Rylander, moved the new flags
to internal flags, as exposing them to the staff client's
global flag admin page could lead to records getting incompletely
ingested without there being an easy way to rectify the problem
from the staff client.
Also, sync up with other recent work on ingest.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Mike Rylander [Sat, 13 Oct 2012 15:38:55 +0000 (11:38 -0400)]
LP#1066326: Allow component partitioning of ingest
The component parts of the indexing process are fairly flexible. In some
places they can be called with parameters that control the behavior, and
other places will respond to global and/or internal flags. However, there
is some inconsistency to which parts will react to each mechanism.
Previous to this commit, there was no way to cause ingest to skip specific
parts of the indexing process (search / facet / browse, in particular)
even though the stored procedure responsible for this had the ability to
perform, and parameters for the control of, this behavior. Now, when any
of the parameters are false (the default, saying "do not skip") it will
check the value of a related global flag and, if enabled, skip that part
of the ingest.
This will allow one to do perform massive, batch, parallel ingests of bib
records, something that was effectively blocked by the way browse ingest
is performed. By disabling browse ingest during the main record loading,
and then performing only the browse ingest later, one can significantly
reduce the time required to load massive batches of records.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Wells [Wed, 16 Jan 2013 20:05:17 +0000 (15:05 -0500)]
TPAC: Don't display serial headers without content
Currently, the TPAC serial display code will print a section
header, then see if there is any content to show. This causes
headers to show up when they are unnecessary or unwanted.
Now, we only show the header if we have content needing heading.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Tue, 22 Jan 2013 14:52:52 +0000 (09:52 -0500)]
Provide some level of support for legacy install locations
If someone really wants to keep OpenSRF and Evergreen installed in
/openils, then enable the configure script to find the osrf_config
script and add the library location to the test to prevent it from
failing.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Fri, 19 Oct 2012 21:05:53 +0000 (17:05 -0400)]
Reduce hard-coded configure defaults
We can and should be smarter about how we set configuration variables.
Rather than using hard-coded defaults for the OpenSRF header and library
locations, ask osrf_config what values to use.
Also be smarter about how we check for the OpenSRF library as a dependency.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Fri, 19 Oct 2012 19:23:28 +0000 (15:23 -0400)]
Generate Apache config files for increased portability
Continue weaning ourselves off of hardcoded paths such as /openils in config
files. Also, install the Apache config example files into a docs directory
instead of just leaving them in the source tree. Similarly, remove some
hardcoded paths from eg_db_config.pl.
At the same time, drop the '.pl' suffix from the scripts that we're touching,
and make the Apache startup script a little less generic in name.
The change from "startup.pl" to "eg_startup" and from "eg_db_config.pl"
to "eg_db_config" also results in updates to installation and upgrading
documentation.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
The asset.merge_record_assets function was not checking for deleted call numbers
and merging items onto deleted call numbers that of course causes issues.
Signed-off-by: Steve Callender <stevecallender@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Jason Etheridge [Thu, 20 Dec 2012 18:40:41 +0000 (13:40 -0500)]
lp1092644 refresh row with Item Status Edit Volume
Assuming the Trim List box is not selected, this simply refreshes selected rows
in the Item Status interface that were used to provide context for the Actions
for Catalogers -> Edit Volumes command. If Trim List is selected, then the items
are instead re-added to top of the list.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Tue, 26 Feb 2013 19:33:58 +0000 (14:33 -0500)]
Repair clear holds shelf transaction timeout
Initiate our cstore transaction after making the initial, potentially
long-running call to collect the clear-shelf holds to process.
Otherwise, the cstore transaction may time out while waiting on the
holds retrieval to complete.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Mike Rylander [Fri, 8 Feb 2013 15:15:39 +0000 (10:15 -0500)]
Speed up sorted-related-holds query
In several interfaces, we use a server side method which gathers statistics
about a hold: related holds, it's position in the (approximate) queue, the
estimated wait time, etc. Within this method is a relatively complicated
json_query that returns the list of related, (FIFO-ish) sorted holds -- ones
that could be filled by a copy which could fill the hold in question. This
commit restructures that query so as to make it faster when the list of
related holds is large, by removing duplicate (cartesian product, actually)
hold ids that were being fed into an INNER JOIN clause.
Testing shows a speed increase of 4x for related-hold queue of around 675
holds [~2s -> ~0.5s] on a relatively large Evergreen installation,
appropriately tuned. The speed improvement gets larger with longer queues.
There is no observed decrease in speed for smaller queue sizes.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Mike Rylander [Tue, 12 Feb 2013 16:51:16 +0000 (11:51 -0500)]
Use LIMIT to speed EXISTS subqueries
EXISTS without LIMIT is considered harmful in many cases. Thus, we will
apply such an explicit planner hint in SuperCat. This reduces the runtime
of URI lookups on some records from 1.2s+ to less than 1ms.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
The ranking algorithm that chooses the best hold to target a copy in
hand at a capture time used to be fairly simple. It had two modes, FIFO
and not-FIFO, and that was it.
This change allows full configuration of that algorithm. In other
words, when the system captures a copy and sets out to evaluate what
hold, if any, that copy might best fulfull, site staff of sufficient
permission level are now empowered to choose exactly which comparisons
the systems makes in what order. This gives said staff much greater
flexibililty than they have today over holds policy.
For more information, see the included tech spec documents.
Allows customization to the way that Evergreen measures the distance
between org units for the purposes of 1) determining what copy at what
org unit is best suited for targeting a title-level hold, and 2)
determining what hold is best suited for fulfillment by a copy-in-hand
at capture (checkin) time. The customization is based on a table
'actor.org_unit_proximity_adjustment', with certain matching criteria
that the system compares to properties of the holds and copies in
question.
This feature is actually side-ported from the FulfILLment project, where
it was originally developed by Mike Rylander. Lebbeous Fogle-Weekley
was responsible for integration into current Evergreen code, some
testing and bug-fixing, and minor refinement of documentation.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jeff Davis [Wed, 17 Oct 2012 23:19:36 +0000 (16:19 -0700)]
Vandelay: default match set
Adds an org unit setting to specify a default Record Match Set when
importing MARC records with Vandelay. NB: If this is set, it will not
be possible to leave the Record Match Set field blank; it may be
necessary to define a default match set that replicates the current
default behavior.
A new "Vandelay" settings group is also created.
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
If a given node contains only negative atoms the rank query was coming out as
an empty string, which was generating bad SQL. This causes the default to be a
null tsquery instead.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Wed, 20 Feb 2013 16:37:08 +0000 (11:37 -0500)]
TPAC: Make Google Books Preview depend on Dojo
It would be possible, but painful, to do all of this in raw JavaScript,
so make the preview functionality depend on Dojo. Also, split out the
relevant JavaScript into its own file. Also, don't search for a preview
if no ISBNs have been gathered; I'm sure Google is never going to return
a result for ISBN:undefined.
You can test this functionality in the sample record set using ISBN 4431287752.
Thanks to Ben Shum for the review comments!
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Tue, 5 Feb 2013 17:25:24 +0000 (12:25 -0500)]
TPAC: Google Books preview loader
Refinements should include checking more than just the first ISBN for
embeddability and passing more identifiers to the preview loader.
Roughly equivalent to what JSPAC had though.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
In XML-RPC Gateway, substitute __ for - in method names
Dashes have never actually been valid in XML-RPC method names, and some
clients (like newer versions of Perl's RPC::XML) enforce this rule on
their clients. This way we give XML-RPC clients a way they can still reach
our methods.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Dan Scott <dan@coffeecode.net>
Conflicts:
Open-ILS/src/extras/Makefile.install
Chris Sharp [Thu, 21 Feb 2013 18:33:31 +0000 (13:33 -0500)]
Install CPAN on Fedora
Fedora 18 split CPAN out into its own separate package, rather
bizarrely, and as we sadly still need to install some unpackaged
dependencies from CPAN we had better try to install it.
Serials: change more carp() to croak() to avoid infinite loops
This addresses a problem very similar to that in LP #1075167, where
certain loops never end because problems with the data elicited calls to
carp(), which fills up log, but never gives our loops notice to end.
Visible symptoms include 1) a greate volume of log spew and 2) an
open-ils.serial drone that ties up a CPU.
The fault lies maybe in our loops rather than in the MFHD
package, but this fixes the problem fastest, and should not have
undesirable side-effects.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Dan Scott [Tue, 29 Jan 2013 10:55:10 +0000 (12:55 +0200)]
LP1108867: i18n support for holds in record details
Rather than constructing a string of "Place hold on " + "copy", etc,
just display more complete "Copy hold" / "Volume hold" / "Issue hold"
strings that have a chance of being translatable.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Dan Wells [Fri, 1 Feb 2013 19:39:23 +0000 (14:39 -0500)]
Standardize on 'My' for user pronoun labels
The TPAC currently uses a mish-mash of 'My' and 'Your' when
labeling user elements (e.g. 'my list', 'your account', etc.).
This commit settles on the use of 'My', but only for labels, not
for "dialog" (e.g. 'Your payment has been approved') or for
imperative statements (e.g. 'Please change your password'). One
text which is borderline is 'Log in to Your Account', but I
decided to treat it as imperative and leave it alone for now.
This commit also changes a heading on the list page which was
lacking title case, as the rest of the interface uses title
case for all headings.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Dan Scott <dan@coffeecode.net>
Conflicts:
Open-ILS/src/templates/opac/myopac/lists.tt2
Pasi Kallinen [Tue, 22 Jan 2013 10:53:46 +0000 (12:53 +0200)]
TPAC: Allow multiline buttons and other minor button work.
Allows using multiline buttons; instead of using opac-button
-class in the a-tag, wrap the a-tag in a div with
opac-multiline-button -class.
Changes the login help button so a longer button text
behaves properly and looks good.
Unifies the green OPAC button behaviour when hovering
a mouse over them; the input and button -tag buttons
did not change their color.
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi> Signed-off-by: Dan Scott <dan@coffeecode.net>
Conflicts:
Open-ILS/src/templates/opac/css/style.css.tt2
Dan Scott [Mon, 18 Feb 2013 22:59:45 +0000 (17:59 -0500)]
Fix failing SIP unit test
Per LP# 1099595, just copy the constant inline instead of requiring the
SIPServer code to be installed on every instance where you don't want
'make check' to fail. (Skipping the test in the absence of the SIPServer
code would be another option, but then you're skipping the test, and for
the sake of 1 constant, that seems like a bad trade.)
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Mike Rylander <mrylander@gmail.com>
The Ubuntu parts of Makefile.install don't use the same list of CPAN
packages to install since for Ubuntu there are more distro packages
available than for Debian.
Spotted by Ben Shum.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Galen Charlton [Mon, 18 Feb 2013 17:44:50 +0000 (12:44 -0500)]
LP#1129318: fix exception thrown when printing circ receipts
Because of a misplaced parenthesis in the patch introducing the
PATRON_EXPIRE_DATE_YMD receipt macro, attempting to print
various circ receipts would result in the following exception:
Error in util.date.formatted_date:
location.href = oils://remote/xul/2.3_5/server/circ/checkin.xul
typeof orig_date = string orig_date = 2014-11-07T00:00:00-0500
typeof _date = object _date = Fri Nov 07 2014 00:00:00 GMT-0500 (Eastern Standard Time)
format = undefined
TypeError: s is undefined
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Ben Shum [Wed, 16 Jan 2013 21:33:22 +0000 (16:33 -0500)]
LP 1092284 - Fix add to my list dropdown with ContentCafe links
As noted in the bug ticket, the dropdown menu for Add to my list disappears
whenever hovering over the Reviews & More link for ContentCafe-enabled TPACs.
Removing position:relative from .results_review seems to keep the two areas
from having any strange interactions.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Both in the code and in the generated where clause.
The where clause we start a new line whenever:
1 - We encounter an AND or OR
2 - We are building a complex subquery (including embedded newlines)
3 - We enter a subplan
This makes for a nicely human-readable where clause.
For the code we split many long lines into multiple. A number of those were
changed due to the where clause formatting.
We also change all instances of multiple ${spc} being added to use the
${spc} x #
method of doing things, as it tends to be shorter.
Also, we move some conditionals from the ends of lines to the fronts, mainly
in those situations where we are moving something from single to multi line.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Ensure that phrases don't get parsed as containing anything other than
individual atoms. This ensures that you can phrase-escape things that would
otherwise be treated as QP syntax.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>