Switch to new Google Books API; make SSL friendly

As implied in the title, this commit does two things.  First, it
switches to the new Google Books API (which is both imminent and
also necessary to make SSL calls work).  From what I have read and
experienced, we do not need an API key to do searches and previews.
I have also not hit any kind of unauthenticated limit in several
days of heavy testing, so I would figure we are safe (at this
point) for normal end-user OPAC browsing.

Second, all Google Book requests are now done over https.  This
eliminates the majority of mixed content warnings when browsing
securely, though you still get a warning when you actual do preview
a book.

In addition to possibly implementing protocol detection (rather
than doing https all the time as a "lowest" common denominator),
there are a few minor points where we might consider future changes.
Those points are commented within the code.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Quasi-backport fixes a bug whereby the copy browser does not
automatically refresh after adding volumes.  This bug is fixed
in future versions by git commit bcd6f20b but the bugfix itself
is not noted in that commit message.

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Enable record summary to be scrollable at larger font sizes

The record summary at the top of the cataloguing interfaces appears to
determine its size based on the "normal" font size at load; then, when a
larger font size is applied to the page, the text gets hidden by the
fixed size of the groupbox.  Ideally the groupbox would adjust to
accomodate the larger font size, but after trying many different
approaches the best short-term approach seems to be to enable overflow
so that scrollbars can appear when necessary.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Fix for LP894125 - reshelving interval

Update to reshelving code to utilize actor.org_unit_ancestor_setting function
and properly retrieve org settings for "circ.reshelving_complete.interval" for
org unit or ancestors.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Revert Lucid prereq for PostgreSQL 9.0 client

rel_2_0 only requires PostgreSQL 8.4; commit
f87437cb1e209eba04c4719adbdf2ddc21b36f04 pushed the prereq to 9.0 but as
that requires adding backport repos many sites will break when trying to
just upgrade from 2.0.9 -> 2.0.10. So, revert that.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Fix LP851000.

Remove about 14 lines from OpenILS/Application/Circ/Circulate.pm
in the checkin_handle_circ subroutine that check whether or not
the checkin happens at the copy's circ_lib and the value of the
circ.lost_immediately_available org unit setting.

This change causes the handle_lost subroutine to run regardless of
where the checkin takes place for a more consistent experience.

Whether or not billings are voided, overdues restored, etc. is still
determined by the copy's circ_lib.

Given how the hold targeter and transit code works, it does not appear
the the circ.lost_immediately_available setting could ever do what it
was intended to do. Given these changes to the code it is now unnecessary.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Check OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE in checkin_handle_lost.

Check the value of OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE before
changing the copy status in checkin_handle_lost. This makes the setting
actually do something.

Add a couple of blank lines to aid in readability.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Code comments and tweaks for lost processing

This commit is intended to do the following:

* Fix case where MISSING status is not retained for items
  being sent 'home' (as it was in previous versions)
* Be more explicit about when we unset the LOST status and when
  we do not in checkin_handle_lost()
* Prevent update of the copy in checkin_handle_lost() unless we
  actually change the status
* Restore log messages for special handling of LOST/MISSING
  checkins away from 'home'
* Provide additional code comments to clarify intended behavior

Note: Given the current restructure, MISSING item behavior is no
longer affected by 'lost_immediately_available' setting.  That
seemed more bug than feature, and can be implemented later
(perhaps as a separate setting) if required.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Clear hold shelf/shelf_expire time for pickup lib change

If a hold is on the holds shelf and the pickup library changes, clear
the shelf_time and shelf_expire_time, since the hold is now in transit.

This is particularly important for avoiding action_trigger events for
the "hold_request.shelf_expires_soon" hook for what is now an
in-transit item.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Allow for the page offset when listing the "Result x of y" values.

The record details page did not show the page offset correctly, so
result 13 would show up as "Result 3 of ###", and result 23 would also
show up as "Result 3 of ###".

Signed-off-by: bott <bott@grpl.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Fix Dewey call number sorting

Ported over Koha commit aef8358c - fix for Koha Bug 4265.
Further documented in Evergreen LP # 902667
Here's the description from the commit message by Magnus Enger:

C4::ClassSortRoutine::Dewey turns "306 Les" into "306_Les"
for items.cn_sort and MARC-field 952$6, which results in
"306.46 Les" being sorted before "306 Les" in the OPAC.
With this patch, "306 Les" is turned into "306_000000000000000_Les".

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
LP# 902667 - Wrap upgrade script for Dewey sorting

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Show Suspended holds as Suspended

In the staff client and JSPac show the status of a suspended hold as
Suspended rather than something like "Waiting for copy".

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
LP#845763 remote added content breaks

remote added content breaks when using locally served content

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
LP822918 fix adapted for rel_2_0

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Stamping upgrade script for the backport of the renewal counting fix

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Add customization to staff client serial and print CSS files

The *_custom.css variants of these are created automatically at install
time, so give the parents the ability to actually use them.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Remove 'boo' alert in hold details interface

Willing to let any surprises here be natural. :-)  We can re-bug if there are
issues.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Don't show estimated wait for negative estimates

JSPac code was just checking for the truth of the estimated_wait return,
but the estimated_wait return can be -1 under some circumstances.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Acq fix for LP#901378

Proratable invoice charges do not have a fund_debit, we need to check for
this before attempting to delete the charge.  If there's no fund_debit
we can generally assume that there's no corresponding debit to this charge
and skip trying to delete it.

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>