Bug 12481: Staff client detail-view "next" link is greyed out when the last search result of any results page is clicked or navigated into

When doing a staff client catalog search with more than 1 page of results
and clicking the last result on any search result page, the top-left navigation
button for "next" is greyed out.

Tested on newest Firefox & Chromium. Attempts to restore originally planned checks for navigation
with the exception of not using results.length due to buggy behaviour where the results get concatenated
upon page reload & "return to results" navigation - a separate issue?

To test:
1) Do an intranet catalog search that has more than 1 page of results.
2) Click on the last result on a page that is not the last one & confirm that the navigation button "next" is greyed out.
4) Apply patch.
5) Do an intranet search with more than 1 but less results than fit on a single page.
6) Click on the last result on the page and confirm that the "Next" navigation button is greyed out.
6) Do an intranet search with more than 1 page of results.
7) Click on the last result of a page that's not the final page of the results & confirm that "Next" is not grey out.
8) Navigate to the last page of the results and click on the final result & confirm that "Next" is greyd out.

http://bugs.koha-community.org/show_bug.cgi?id=12481

This patch prevents the "Next" button on detail view to be grayed out at the end of e result page.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12150 - Use more javascript string formatting in intranet for translated strings.

http://bugs.koha-community.org/show_bug.cgi?id=12150

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

No bug number on description
No commit message
No test plan
No koha-qa errors

I only signed this because it's useful for translations
but we can live without it, so is up to QA now

Tested some easy messages (e.g. syspref saving), and
updated PO files to check new strings.
Inspected the code, I think that there are no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12150: Add missing space and correct innerHTML typo

The previous patch forgot to add a space between the string "Edit
action" and the placeholder.

Trying to test it, I found a typo: innerhtml does not exist, it should
be innerHTML.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10652 - Ajaxfileupload.js failing in IE9 for local image upload

This patch adds a try/catch to the Javascript for adding the iframe
element. The try will work for IE8 and older versions, while newer
versions and other browsers will be covered by the check.

Test Plan:

1) Try uploading a local cover image in IE9
2) Notice that your page is reloaded with no result (except the
pop-up of a Javascript error, if you have error reporting on in
your browser).

3) Apply the patch

4) Trying uploading a local cover image again
5) Notice that it uploads correctly

6) Repeat steps 4 and 5 for IE8, IE7, and/or other modern browsers.

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

Tested in IE10 in IE10 "browser mode" and IE9 mode as well as in
Firefox. Uploads work correctly with book cover images and in MARC
uploads.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Also verified as working in Chrome.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Doesn't break functionality and fixes a known problem. I'll push this for
stable branches to use it, but will fill a new bug for updating AjaxFileUpload.js
from upstream.
Bug 12237: Remove the "horrible hack" in C4::Templates

Use C4::Languages::getlanguage() instead of
C4::Templates::_current_language()

Test plan:
1/ Set one of the 4 XSLT sysprefs to 'default'
2/ Go to the corresponding page
3/ Switch language and check that the right XSLT is used
4/ Set the same syspref to something with '{langcode}' in it. For
example:
"../koha-tmpl/opac-tmpl/bootstrap/{langcode}/xslt/UNIMARCslim2OPACDetail.xsl"
5/ Go back to the corresponding page
6/ Switch language and check that the right XSLT is used
7/ Change a compact.xsl for a language (for example
koha-tmpl/intranet-tmpl/prog/fr-FR/xslt/compact.xsl) to be able to see
differences
8/ Go to a biblio detail page in staff interface and click on "MARC
Preview: Show"
9/ Close the popup, switch language and click again on the same link
10/ Check that the correct XSLT is used.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No problems found, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12220 - bootstrap not responsive on all devices

The bootstrap theme includes a meta tag attribute which disables zooming
on some devices. This was unintentional and not desirable. This patch
removes the problematic attribute.

See:
http://blog.javierusobiaga.com/stop-using-the-viewport-tag-until-you-know-ho

To test: Apply the patch and view the OPAC on a device with a touch
interface. Attempt to zoom in on any OPAC page. Zooming should work.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Reproduced using a smartphone.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 8567: Set output directory for fines.pl in cron config created by the packages

Modified debian/koha-common.cron.daily adding instance output dir option to
the fines.pl entry as described in the ticket.

Requires patch from Bug 8566 which provides the __instancename__ feature for
koha-foreach.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12451 - circulation rule cant be edited if itemtype contains a space character

When an itemtype description contains a space character like " Book"
(often used to set this itemtype as first in sorted lists), the edition
of an existing circulation rule does not work, it selects the default
itemtype. Same for patron category.

It's because the JavaScript code performs a trim on value existing in
table itm = itm.replace(/^\s*|\s*$/g,''); This patch adds trim on select
options in editing line.

Test plan :
- Create an itemtype with a leading or trailling space in description :
  ie " Book"
- Go to cgi-bin/koha/admin/smart-rules.pl
- Create a rule with this itemtype, Unit=hours and Hard due date=Exactly
  on 31/12/2015 (any date)
- Click on Edit on this rule line
  => Without this patch, the default itemtype is selected in edition
     line
  => With this patch, the correct itemtype is selected in edition line

Check others selects are ok :
  - Create a rule with Unit=hours and Hard due date=Exactly on
    31/12/2015 (any date)
  - Click on Edit on this rule line
    => The correct options are selected
Same tests with a patron category containing a leading or trailling space in description

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11703 - Convert checkouts table to ajax datatable

When a patron has many checked out items, circulation.pl can take a very
long time to load ( on the order of minutes in some cases ). This is
primarily due to the processing of the previous checkouts list. If we
convert to this table to a datatable that fetches its data via ajax, we
can make circulation.pl far more responsive. The same should be done
with relative's checkouts as well.

Test Plan:
1) Apply this patch
2) Observe that the checkouts and relatives' checkouts tables
   are now loaded asynchronously
3) Observe and verify the renew and return actions are now
   ajax based and function in a manner equivilent to how they
   used to.

This bug had quite a few followups, so I squashed all of them into one
change so that code is easier to follow. Original commit messages are below:

Bug 11703 - Use the ajax datatables on patron details page

Bug 11703 - Convert holds tables to ajax datatables

Bug 11703 [QA Followup 1] - Center bProcessing message over table

Bug 11703 [QA Followup 2] - Remove icons from checkout and clear buttons

Bug 11703 [QA Followup 3] - Remove references to UseTablesortForCirc

Bug 11703 [QA Followup 4] - Add back in Today's checkouts/Previous checkouts rows

Bug 11703 [QA Followup 5]

Bug 11703 [QA Followup 6] - Move strings to an include file for translation purposes

Bug 11703 [QA Followup 7] - Fix issues spotted by koha-qa.pl

Bug 11703 [QA Followup 8] - Speed up api/checkouts.pl as much as possible

Bug 11703 [QA Followup 9] - Move scripts from api directory to svc directory

Bug 11703 [QA Followup 10] - Fix errors caused by rebase

Bug 11703 [QA Followup 11] - Prevent multiple fetchs from ajax source

Bug 11703 [QA Followup 12] - Fix problem detected by koha-qa.pl

Bug 11703 [QA Followup 13] - Removed uneccessary data from renewal box during renewal

Bug 11703 [QA Followup 14] - Fix table column span

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Test plan on bug report:
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11703#c98

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Bug 11703 [QA Followup]

* Bold record title, fix table width
* Change output_pref_due to output_pref
* Retain functionality of IssuesDefaultSortOrder system preferences
* Use datatables.inc in circulation.tt
* Fix up holds table details
* Add plugin to about
* fix relatives' checkouts
* add too_many string
* remove dead syspref from db
* Sort relatives' checkouts and holds tables client side
* Provide context for translation of strings
* Fix unterminated string literal, add missing paren
* Add replacement of _AUTHOR_ with title's author for holds
* Format prices correctly
* Format checkout dates correctly

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Bug 11703 [QA Followup] - Use format instead of replace for string translation

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Bug 11703 [QA Followup] - Use interface instead of themelang for checkboxes plugin

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Bug 11703 [QA Followup] - Restore showing earliest renewal date for 'too early' renewals

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Bug 11703: (qa-followup) fix update database entry

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Bug 11703 [QA Followup] - Stop IE from caching ajax request

Signed-off-by: Britta Cramer <britta.cramer@inm-gmbh.de>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Bug 11703 [QA Followup] - Allow keyboard navigation of tabs

Signed-off-by: Britta Cramer <britta.cramer@inm-gmbh.de>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Bug 11703 [QA Followup] - Change "No data available in table" to "Loading..."

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Bug 11703: (qa followup) consistency in svc

This patch removes the trailing .pl from the introduced svc scripts.
Also removes a leftover (wrong license text)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11703: DBRev 3.17.00.009

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11703: (followup) svc/holds invoked with trailing .pl

On my followup I forgot to fix js/holds.js. This patch rectifies that.

Regards
To+

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>