Bug 12112: remove disused routine C4::Breeding::ImportBreeding()

This patch removes the ImportBreeding() routine, which lost its
last caller as of the patch for bug 10462.

To test:

[1] Verify that prove -v t/Breeding.t passes.
[2] Perform a Z39.50 search in the staff interface.
[3] Perform a cataloguing reservoir search in the staff
    interface; verifying that cached records from the search
    done in step 2 are retrieved.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12103 - Move ajaxfileupload jQuery plugin outside of language-specific directory

This patch moves the ajaxfileupload jQuery plugin to
intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated
for each set of translated templates.

To test, apply the patch and test a page which requires the file upload
plugin. For instance: Tools -> Upload local cover image. The upload
process should finish correctly.

Tested with patron and local cover images. Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12107 - Move checkboxes jQuery plugin outside of language-specific directory

This patch moves the checkboxes jQuery plugin to
intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated
for each set of translated templates.

To test, apply the patch and confirm that select all/clear all controls
continue to work on the following pages:

- Acquisitions -> Late orders
- Acquisitions -> Add to order from an external source (search targets)
- Acquisitions -> Suggestions
- Administration -> Funds -> Planning (show/hide all columns)
  * Some unused code has been removed
- Administration -> Library transfer limits
- Staff client cart
- Authorities -> New from Z39.50 (search targets)
- Cataloging -> New from Z39.50 (search targets)
- Circulation -> Check out to a patron (renew/check in selections)
- Circulation -> Offline circulation -> Pending operations
- Patrons -> Patron detail (renew/check in selections)
- Patrons -> Fines -> Pay fines
- Serials -> Subscription -> Serial collection
- Tools -> Label creator -> Batches -> Search results
- Tools -> Patron card creator -> Batches -> Search results
- Tools -> Tags moderation
- Tools -> Batch item deletion
- Tools -> Batch item modification
- Tools -> Inventory -> Submit a batch of barcodes
- Lists -> List contents view

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described! I don't think I've ever checked so many boxes
before...

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12101 - Move Greybox library outside of language-specific directory

This patch moves the Greybox library to intranet-tmpl/lib so that it is
not duplicated for each set of translated templates. The Greybox library
files are called directly only by one include file, greybox.inc, which
is modified by this patch.

To test, apply the patch and view any page which calls the Greybox
library and confirm that modal windows are still generated correctly.

For instance, Cataloging -> Cataloging search, click the "Preview MARC"
link.

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12116 - Move fixFloat jQuery plugin outside of language-specific directory

This patch moves the fixFloat jQuery plugin to
intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated
for each set of translated templates.

This patch also includes a change to staff-global.css to override some
style the floating toolbar inherited when we added Bootstrap widgets.

To test, apply the patch and confirm that the toolbar "sticks" to the
top of the screen when scrolling down on the following pages:

- System preferences
- Authorities editor (Authorities -> New authority)
- Cataloging editor (Cataloging -> New record)
- List contents view (Lists -> View a list's contents)

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12119 - Move jeditable jQuery plugin outside of language-specific directory outside of language-specific directory

This patch moves the jeditable jQuery plugin to
intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated
for each set of translated templates.

To test, apply the patch and confirm that editing quotes works correctly
in the Quote of the Day manager.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12131: Remove unused dependency on Exporter

C4::TmplToken depends on Exporter but does not use any
of its facilities. Removed the dead code so it does not
clog up the source and waste compilation time

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Module still compiles correctly; t/TmplToken.t passes.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12118 - remove unnecessary YUI assets included in offline circ manifest

The offline circulation asset manifest includes some YUI JavaScript
files which are no longer used by any template in Koha except for
acquisitions/basketgroup.tt. This patch removes them from the manifest.

To test, apply the patch and test offline circulation. Everything should
work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12114: Fix encoding problem with reports JSON web service (opac)

- catalog a record that includes umlauts äöü
- write a report, that has the record in the result set
- access the JSON output of the report
  <OPAC BaseURL/cgi-bin/koha/svc/report?id=1
- verify the umlaut displays not correctly
- switch the encoding in the browser to 'western'/latin1
- verify the umlaut now displays correctly
- apply patch
- verify umlaut now displays correctly from the beginning

Based on paste from Galen Charlton.

Followed test plan. Result as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12114: Fix encoding problem with reports JSON web service (staff)

Repeat tests from first patch, but this time, access the report
with your staff client base URL.

<Staff BaseURL>/cgi-bin/koha/svc/report?id=<reportid>

Based on paste from Galen Charlton.

Followed test plan. Result as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12114: (QA Followup) Use JSON instead of JSON::XS

RM note: on most platforms, the JSON module will use JSON::XS
by default.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11588: fix untranslatable subscription frequency units

To test:

1) cd misc/translator
2) perl translate update xx-YY
3) check that there's no msgid that contains the subscription
   frequencies (day, week, month and year) in
   po/xx-YY-i-staff-t-prog-v-3006000.po (search for
   "BLOCK translate_frequnit")
4) apply patch
5) perl translate update xx-YY
6) check po/xx-YY-i-staff-t-prog-v-3006000.po that it contains the
   msgid for the frequencies. (search for "BLOCK translate_frequnit")

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10823: add class info to enumchron data in detail.tt, for better styling

This patch adds spans to style parts of the enumchron and serialseq
information in the holdings table in the taff interface:

These include:

- items.enumchron
- the separator used
- serial.serialseq
- items.publisheddate

TEST PLAN
---------
1) Apply patch 10825
2) Find a biblio where the enumchron and serialseq are different.
   -- in MySQL:
      SELECT items.biblionumber,items.enumchron,serial.serialseq
      FROM items,serial,serialitems
      WHERE items.itemnumber=serilaitems.itemnumber
        AND serialitems.serialid=serial.serialid;
3) In the staff client, view the source for that item.
   -- It should be one class for the entire <td> cell.
4) Apply patch 10823
5) Refresh the page
6) Look at the source for that item again.
   -- It should have <span> tags around the 4 things listed
      above.
7) Run the koha qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change only, no regression found.
Using [%- -%] could improve readability of HTML source code.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11631: Make i18n toolchain ignore useless strings

This patch removes several types of strings from the
PO files that cannot be usefully translated, including
ones that consist entirely of punctuation and/or HTML entities.

Test:
1) Update PO files of some lang, xx-YY-*po
cd misc/translator
perl translate update xx-YY
2) Do it again, just in case
3) rm po/xx-YY*po~
4) Extract all msgid's, sorted
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-pre
5) Apply the patch
6) Repeat 1-3
7) Repeat 4 again, other file
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-post
8) Do a diff, inspect results, only strings with %s and \s
diff xx-YY-pre xx-YY-post | less

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, 380 strings less to 'translate'
No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11497: remove TT construct for picking a default string that i18n toolchain fails to pick up

The i18n toolchain fails to pick up constant text defined inside
[% ... %].  In particular, in a construct like this

  [% var OR "string" %]

the string "string" will not be available to be translated.

This patch fixes all the cases I could find.

To test:
1. Update your preferred language
(cd misc/translator; perl translate update fi-FI)

2. Count headers for example
egrep "^msgid.*Koha online" misc/translator/po/fi-FI-* | wc -l

3. Apply the patch

4. Repeat 1 and 2, now there are more lines
Or translate to some lang and visit every touched page and look the title

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described. Template changes only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12138 - Use placeholders in translatable Javascript strings

Currently translating Javascript strings with variables in them is hard,
because the strings are created from separate parts. For example:

 _("Are you sure you want to delete the") + " " + count + " " +
_("attached items?")

This is translated in two different parts, and the translator cannot
affect the place where the count-variable is.

Now, if the javascript strings allowed placeholders, similar to how the
template strings do, the above could be written as:

_("Are you sure you want to delete the %s attached
items?").format(count)

This would make translation much easier.

Attached patch adds a Javascript string formatter, and changes all the
concatenated translatable JS strings used in intranet to use that.

To test:
1) cd misc/translator
2) perl translate update xx-YY
3) grep ^msgid po/xx-YY-i-staff-t-prog-v-3006000.po | sort | uniq >
xx-YY-pre
4) apply patch
5) perl translate update xx-YY
6) grep ^msgid po/xx-YY-i-staff-t-prog-v-3006000.po | sort | uniq >
xx-YY-post
7) compare the files: diff -Nurd xx-YY-pre xx-yy-post | less
   should show the javascript strings that changed.
8) Test the UIs where the formatted js strings are used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

I tested *most* of the changed files. There were some instances where it
wasn't clear to me how to trigger the warnings which were modified,
especially tags/review.tt, admin/manage-marc-import.tt, and holidays.tt.
Everything I was able to test worked correctly.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Works nicely, no regressions found. Thx!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11227: remove some JavaScript from staff PO files

This patch rewrites authorities_js.inc so translate
script will process it correctly. To do that I added
<script></script> at the file

To test:
1) Update po files for your preffered language

2) Check occurrence of mergeAuth on staff PO file
or try
egrep -n  "Merging with authority: |Cancel merge"
strings appear in a JS func

3) Apply the patch

4) Update translations again, check again, old
strings now begin with #~ (obsoleted) and there
are new entries for the messages

5) Check functionality provided by script

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and fixes a translation difficulty.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11769 - Use validation plugin when creating new MARC framework

The page for adding a new MARC framework includes some custom form
validation JavaScript which can be removed in favor of HTML5 validation
attributes and Koha's built-in validation plugin. This patch does so.

To test, apply the patch and go to Administration -> MARC bibliographic
framework -> New framework. Try submitting the form without entering a
tag number. This should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing framework should also work correctly.

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11769: (follow-up) style required fields

This follow up adds the correct "required" style to the required form
fields as well as the "required" text after each required field.

To test, apply all patches and go to Administration -> MARC
bibliographic framework -> New framework. The framework code and
description fields should show that they are required.

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described and feels a million times better.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, template changes only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>