Bug 9183: Refactor ZOOM event loop

Prior to this patch, there were three identical ZOOM event loops in
C4::Search. This is wasteful, and goes against all good programming
practice. This patch refactors the ZOOM event loops into a separate
subroutine which is called by SimpleSearch, searchResults, and
GetDistinctValues call.

The new routine, _ZOOM_event_loop process the ZOOM event loop and,
once it has been fully processed, passes control to a closure provided
by the calling routine for processing the results, and destroys the
result sets.

To test (after applying patch):
1) Do a regular bibliographic search that should return results.
2) Do a search in the Cataloging module that should return results.
3) If you get results from both searches, the patch works.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 7143 adding Kiriaki Roditi as translator

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 7368: Update GetXmlBiblio documentation

Only changing some documentation about GetXmlBiblio

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Added the word 'contain'

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Revert "Bug 8378 - <fine> syntax not working on overdues anymore"

This reverts commit 40f9914e60e002ae4cbf10d09cff8bbf32abd8fe.

Per Colin's report (confirmed by Mathieu and Julian):
  "I've had some problems with this patch. With it applied I found
  overdues for multiple users getting the same user's overdue message
  text, eg user 1 gets their correct message but users 2, 3 and 4
  get it as well. reverting the patch corrected this. I've not tracked
  down the cause as yet."

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

This behaviour has been confirmed by others, reverting in 3.10.x also
Bug 9052 - followup: fix the YUI CSS locations for SCO

This is followup to the previous YUI-fixing patch, and simply causes the
self-checkout page to load the YUI files via the sco CSS file,
and that gets re-written at package build time to work.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested on a package installation using packages built by
Mirko Tietgen and a git dev installation.

To test:
1) Enable WebBasedSelfCheck system preference
2) Enter login date for staff user in AutoSelfCheckAllowed... prefernces
3) Go to the self checkout page:
   .../cgi-bin/koha/sco/sco-main.pl
4) Verify all pages have the usual look, CSS, Javascript and images
   look normal
5) Verify the same is true for translated templates

Manual: http://manual.koha-community.org/3.10/en/selfcheckout.html
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 9289 - Adjacent checkbox behavior broken on circulation.pl

This patch fixes the behavior of adjacent checkboxes in the list of
checkouts on circulation.pl. Checkboxes in both the "renew" and "check
in" columns should not be able to be checked at the same time.

A line was commented out (by me) which was necessary to this working
correctly. I'm guessing it was done in debugging and left by mistake.

To test, load a patron for checkout who has items checked out. You
should not be able to check boxes in both the "renew" and "check in"
columns in the same row, whether you click the checkbox itself or the
containing table cell.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8712 - We should use WAI-ARIA guidelines to help with accessibility

Added title to the search box

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8299 - overdue_notice.pl shows error messages

fixes 2 warnings...

 Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl line 659.
 Use of uninitialized value in pattern match (m//) at /usr/share/koha/bin/cronjobs/overdue_notices.pl line 670.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9284 - JavaScript should follow rules recommended by JSHint

Coding style corrections to members.js:

- Mixed tab/space indentation converted to spaces.
- Converted "!=" and "==" to "!==" and "===" for comparisons with ''.
- Adding missing semicolons.

To test, create or edit a patron and confirm that validation hasn't been
broken by the changes to members.js: Invalid date, empty required
fields, guarantor popup, restricted-until field display, etc.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9209 - Mocked Koha::Calendar tests

Using specific method for populating the internal data structures from Koha::Calendar
has yielded to the non-detection of several bugs. There are also several tests that where
db_dependent which is not always desirable.

I propose the use of DBD::Mock (::Session) for using the actual code used by Koha in production
for testing, mocking the DB queries itselves.

I also took the time to repeat several tests in different syspref configurations (they applied
only to daysMode=Calendar, and now cover all confs).

Notes:
- I used DBD:Mock 1.45 as previous version (1.43, from 12.04) was broken
- Some tests revealed a bug on days_between as I see it... reporting as Bug #9211

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Elliott Davis <elliott@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9209: Skip tests for older DBD::Mock

Because the calendar tests require a more recent version of DBD::Mock
than has been packaged by Debian, it makes sense to skip all the tests
requiring the database when only an older version is present.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Works as advertised
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>