This patch implements the code to allow a patron to receive multiple
orders at the same time in /cgi-bin/koha/acqui/orderreceive.pl page
To test:
1. apply all patches
2. updatedatabase
3. Go to system preferences and allow AcqReceiveMultipleOrderLines
4. In acquisitions module, create a vendor if you don't have one and add
3 baskets.. one with create items on ordering, one with create items
on receiving and finally one with create items when cataloguing
5. Fill baskets with orders (There should be at least 15 orders in total). There should be a mix of orders created by suggestions, others by subscriptions and others by neither of those methods.
6. Close all baskets and receive shipment.
CHECK => in /cgi-bin/koha/acqui/parcel.pl page, in top table there is a column with checkboxes, and a button that says "Receive selected"
7. If all orders from all baskets are shown in the table, set the rows per page to 10, so table has more than one page
8. Check some of the checkboxes
CHECK => "Receive selected" button shows how many rows are selected
9. Go to the next page and select some more rows
CHECK => Changing page does not modify how many rows where selected
10. Go back to previous page
CHECK => Previously selected rows are still selected
11. Reload the page to deselect all rows
12. Select only one row and click on "Receive selected" button
CHECK => the page /cgi-bin/koha/acqui/orderreceive.pl behaves just the same as if the "receive" link in the selected row would have been clicked.
13. Click on cancel to go back to parcel.pl page
14. Select all rows (even the ones from the next page of the table) and
click on "Receive selected"
CHECH => In orderreceive.pl page there is a table with all selected rows
15. Ensure table has more than one page, as in step 7
16. Click on the "edit" link in the last row of the current page
CHECK => A modal window is displayed with 4 tabs within: Info,
Accounting, Receipt history and Items
CHECK => Modal has 4 buttons at the bottom, 'Previous' to go to previos
order, 'Cancel' to close the modal without keeping modifications, 'Save'
to close modal keeping modifications and 'Next' to go to the next order
CHECK => Even that we are at the end of the current page, 'Next' button
is still available
17. Click on 'Next' button
CHECK => The table behind the modal now displays the next page, and the modal was not closed
18. Click on 'Previous'
CHECK => The table behind the modal went back to the first page, and the modal was not closed
19. Click on 'Previous' button till you reach the first row of the first
page
CHECK => Only when you reach the first row of the first page 'Previous'
button gets disabled
20. Click on 'Next' button till you reach the last row of the last page
CHECK => Only when you reach the last button of the last page 'Next'
button gets disabled
21. Check that behaviour for the different types of order are still the
same
a. For orders that where created through suggestion, check that the
suggestion info is present in Info tab. If when suggestion was accepted
you set a reason, a dropdown to change the reason shoul display also.
b. For orders that where created through subscriptions, check that
the Items tab is disabled, and the Receipt history is enabled. On
accounting tab you should be able to change quantity ordered. If there
were less items received than ordered, the next time you receive this
order the child order generated from this one shoul appear in receipt
history.
c. For orders that don't come from subscription and creates there items on ordering, Receipt history
should be disabled, and a table with prefilled items shold appear in the
Items tab. You can edit them and the changes should appear in the item's
row.
d. For orders that don't come from subscription and creates there
items on receiving, Receipt history should be disabled, and a form to
create the items should appear in Items tab. When you add an item a
table should appear.
e. For orders that don't come from subscription and creates there
ites on cataloguing, Receipt history and Items tabs should be disabled.
f. Any changes made in quantity (received or ordered) or funds in the modal should be
reflected in the table if you click save from the modal.
22. Once you've done all you checking and verifications click save
23. While saving a progress bar should appear
24. If no error was detected, you should be redirected back to parcel.pl
page
25. If an error or warning was detected (like there is an order with 0
items to receive) the save button should be disabled and warnings
are dispayed.
26. prove t/db_dependent/Koha/Acquisition/Fund.t t/db_dependent/Koha/Acquisitoin/Order.t t/db_dependent/Koha/Item.t
Sponsored-by: Virginia Polytechnic Institute and State University
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The bibliographic record's details page in the Staff interface
includes a 'Holdings' table at the bottom with information for
each item attached to the record. When activating the filters
in this table, there is no input field for the barcode column
but just bold text.
This broke in v22.11.00, the related commit being 018a981b9b
from Bug 29282 where two new hidden columns were added to that
table.
We can fix this by taking advantage of the existing code in
koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc
(introduced by commit dfb7af91af from Bug 23307) which allows
us to create and hook our own custom columnsInit() function in
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
to redraw the DataTable filters upon page load if a column is
marked as 'is_hidden: 1' in admin/columns_settings.yml, or if
a column is added/removed via the "⚙ Columns" button (both
are handled by the DataTables column-visibility.dt event).
Redrawing the filters via the above method also fixes the
issue described in Bug 32448.
Test plan:
1) Confirm the erratic DataTable behaviour outlined above
2) Apply this patch and reload all JS assets (hit CTRL-F5)
3) Confirm that you now see the correct input text field
for the 'Barcode' column
4) Confirm that you can search for barcodes or in any other
column successfully
5) Try toggling the visibility of the columns and making as
many search variations as possible -- it should all now
work without any glitches!
For extra credit ;-) you can also test the 'Other holdings'
table by setting the SeparateHoldings SysPref to 'Separate'.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds a database call to get the table and column names in the
database and parse them into the autocomplete engine.
Test Plan:
As previous commit but also check for column/table names in the
autocomplete popup
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This adds auto-complete for the sql reports editor codemirror instance.
To prevent a regression in syntax highlighting the overlay mode
'sqlPlaceholders' has been removed and replaced with a highlighting
engine that works correctly with the autocomplete engine.
Test Plan:
1. Navigate to reports and create a new sql report
2. Write an Sql query and observe that there is no autocomplete options
3. Apply patch
4. Write a new Sql query and observe that there are now auto-complete
options that can be navigated through with the arrow keys and
accepted with either tab or the enter keys.
5. Ensure that items bounded in << >> or [[ ]] are still syntax
highlighted post-patch
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch makes minor modifications to the Chocolat CSS so that the
buttons (next, previous, close) are styled with colors that conform to
the new interface color scheme.
Note: You may encounter Bug 32307 when testing.
To test, apply the patch and enable at least two cover image services in
the staff interface: Amazon, Local cover images, and/or Coce.
Locate a bibliographic record which has at least two cover images and
view the detail page. Click on the cover image to trigger the image
viewer overlay.
Confirm that the controls in this view are colored green, matching the
current color scheme.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Issue #21
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
What this patch does:
- change the navigation bar style
- change the breadcrumbs style
- change the "last borrower" link style
- move the search bar inside the navigation bar
- move the help link to the same row as the breadcrumbs
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds a new system preference:
autoControlNumber
The option "biblionumber" will set field 001 to the biblionumber when you create a new record
or edit an existing record and clear the 001 field.
If a value is present in 001 when saving the record it will be preserved.
If set to 'OFF' the 001 field wil not be touched
When duplicating a record the 001 will be removed if autoControlNumber is set
To test:
1 - Apply patches and updatedatabase
2 - Create a new record with no 001 field
3 - Save and view the MAC, confirm there is no 001
4 - Set the system preference to 'biblionumber'
5 - Edit the record you created previously
6 - Note the 001 is prepopulated with the biblionumber
7 - Delete the field
8 - Save the record
9 - View the MARC, the 001 is filled with biblionumber
10 - Edit the record
11 - Set the 001 to a different value "Not the biblionumber"
12 - Save
13 - View the marc and confirm the value you entered is retained
14 - Edit a record with an existing 001 that is not the biblionumber
15 - Save and confirm 001 is not updated
To test duplication:
1 - Edit a record as duplicate when using the advanced editor
2 - Confirm the 001 does not load, but record saves correctly
3 - Edit the record
4 - Switch to 'basic editor'
5 - Save, then view record
6 - Edit as duplicate in basic editor
7 - Confirm the 001 is removed
8 - Confirm the 001 is added on save
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Koha Team University Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Koha Team University Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch updates the jQuery Validation plugin in both the OPAC and
staff interface. This upgrade brings the plugin to the current latest
version (1.19.4) which includes compatibility fixes for the latest
version of jQuery.
To test, apply the patch and test various forms in the OPAC and staff
interface to confirm that validation is still working correctly.
In the OPAC:
- Patron self-registration: Required fields, password match
and complexity. Test also the "Forgot password" and "Change password"
interfaces.
In the staff interface, for example:
- Patrons -> Patron password change: Required fields, password match and
complexity.
- Administration -> Patron categories -> New category:
- Required fields
- One or the other enrollment period inputs
- Digits required in password expiration, age required, upper age
limit
- Numbers required in enrollment and hold fee.
- Administration -> Budgets -> New budget:
- Required fields
- End date must be after start date
- Administration -> Cities & towns: Required fields
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
This is the same as preevious patch, but for advanced cataloging editor
To test:
1 - Enable EnableAdvancedCatalogingEditor
2 - Create a new record in advanced edtior
3 - Hover over leader6 and 008 type
4 - Confirm notes are useful
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch updates the basket groups interface so that it doesn't rely
on YUI to move baskets in and out of groups. The patch also removes
all YUI assets and many long-obsolete references to YUI-related classes
and IDs.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
- Go to Acquisitions.
- Locate a vendor with multiple closed baskets.
- Click "Basket groups" in the sidebar menu.
- Create or edit a basket group.
- On the basket group page you should see the basket group form in one
column and ungrouped baskets in another.
- Both grouped and ungrouped baskets should be in a sortable
DataTable.
- Test that when you click the "Add to group" button on an ungrouped
basket the row is removed from the table of ungrouped baskets and
added to the table of grouped baskets.
- The button text on the row should now read "Remove."
- Test the reverse operation: Clicking "Remove" on a grouped basket
should move it to the table of ungrouped baskets.
- Test that when all baskets are moved out of either of the tables a row
is displayed with a message specific to that table, e.g. "There are no
ungrouped baskets."
- Test that the basket group saves correctly when zero or more baskets
are added to the group.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch updates the Flatpickr plugin shortcut-buttons which adds the
"Yesterday," "Today," and "Tomorrow" links to Flatpickr widgets. This
updates it to the latest version, 0.4.0.
The file is modified in two ways: The version information is added to
the top of the file, and the sourceMappingURL line is removed from the
bottom. This quiets browser console warnings about a missing map file.
To test:
- apply the patch and clear your browser cache.
- Go to Circulation -> Check out and check out to a patron.
- Click "Checkout settings" and click the "Specify due date" field.
- In the pop-up calendar, test all controls, including the shortcut
links, to confirm that everything works as before.
- In the browser console there should be no warning related to
shortcut-buttons-flatpickr. (Firefox didn't have the warning, Chromium
can be used.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch removes references to the jquery.cookie.js plugin which is
now unused, replaced by js-cookie.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
jQuery is upgraded from 2.2.3 to 3.6.0.
jQuery Migrate is upgraded from 1.3.0 to 3.3.2.
The next patch will update links to point to the new assets.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates templates to include the new version of jQueryUI. It
removes some references to the now unused datepicker widget as well as
the jQuery timepicker addon.
Some minor JavaScript and style updates to fix issues resulting from the
upgrade.
To test, apply the patch and update the CSS in the staff interface AND
in the OPAC
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
IN THE OPAC:
- The OPAC only uses the tabs jQueryUI widget.
- View pages where tabs are used: Bibliographic details, user summary,
advanced search.
IN THE STAFF INTERFACE:
- The staff interface uses four jQueryUI widgets: accordion,
autocomplete, sortable, and tabs
- Test the accordion widget on two pages: Administration -> Table
settings and Patrons -> Patrons requesting modifications.
- Test autocomplete (requires PatronAutoComplete to be enabled) on
various pages. For example:
- From the "Check out" tab in the header search box.
- From the "Search patrons" tab in the header search box, e.g. from
the main Patrons page.
- Place hold -> Search patrons.
- Tools -> Patron lists -> Add patrons to list -> Patron search.
- Test sortable:
- Administration -> System preferences -> Language.
- With more than one language installed you should be able to
drag to re-order the enabled languages. Confirm that your change
is saved successfully.
- Administration -> MARC bibliographic framework -> MARC structure ->
Edit subfields on a tag with multiple subfields. You should be able
to drag to re-order the tabs at the top of the subfield constraints
edit page. Confirm that your changes are saved successfully.
- Cataloging -> New record. Test that you can re-order subfields
under a tag with multiple subfields and that your changes are
saved.
- Tabs: View various pages with tabs: Check out, bibliographic details,
basic MARC editor. They're everywhere.
Also confirm that the removal of the leftover datepicker doesn't affect
pages which use the calendar include: Test various pages which use
Flatpickr, e.g. check out, renew, reports, etc.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates jQueryUI in the OPAC and staff interface. Old assets
are removed and new assets added.
jQueryUI has been re-compiled in each interface to include only the
required features. In the OPAC: tabs and tooltip. In the staff
interface: accordion, autocomplete, sortable, and tabs.
The next patch will make the required updates to templates.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch replaces jQueryUI tabs on the item circulation alerts page as
a simple example to start the process of switching how we implement
tabbed interfaces.
The patch bumps the Bootstrap version from 3.3.7 to 3.4.1 and adds the
tabs component.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Go to Administration -> Item circulation alerts.
- Confirm that the "Checkout" and "Check-in" tabs look correct and work
correctly.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch upgrades the jstree plugin in the OPAC and the staff
interface. The old version had compatibility issues with the latest
jQuery.
Also changed: When viewing an authority record in the OPAC's MARC view,
clicking one of the hierarchy links should now open the MARC view again
rather than reverting to the normal view.
To test, apply the patch and rebuild the staff interface and OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
To test you must have the AuthDisplayHierarchy system preference
enabled, and you must have some authorities data which can be displayed
as a hierarchy. From the test plan for Bug 8523:
"Create authority records with a hierarchy of see also fields (in
MARC21/NORMARC, you'll be using 5xx fields for this, with a subfield
$w = 'g' for broader terms and subfield $w = 'h' for narrower terms)"
- Perform an authority search in the OPAC which will return one of your
modified authority records.
- View the record.
- There should be an expanded tree menu at the top of the authority
information.
- Clicking the arrows in the tree should correctly expand
and collapse the nodes.
- Clicking the authority record link in the node should load that
record.
- Test also from the OPAC's MARC view of the authority record.
- Confirm that clicking an authority record link in the MARC view
opens the corresponding record in MARC view again.
- Perform the same tests in the staff interface.
Signed-off-by: Eugene Espinoza <eugenegf@yahoo.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
It's not implemented, looks like we need to use a plugin for that
https://github.com/flatpickr/flatpickr/issues/576https://github.com/jcsmorais/shortcut-buttons-flatpickr
Test plan:
Confirm that flatpickr instances now have a yesterday, today and
tomorrow buttons.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch upgrades TinyMCE in the staff interface from 5.0.16 to 5.9.2.
Other than the required TinyMCE package files, the only other change is
to the internationalization include file, which is updated to include
the latest set of strings for translation.
To test, apply the patch and clear your browser cache if necessary.
Test that the TinyMCE editor works in the staff interface:
- In system preferences, with the UseWYSIWYGinSystemPreferences
preference enabled: IntranetCirculationHomeHTML,
IntranetmainUserblock, IntranetReportsHomeHTML, etc.
- Additional contents, with the AdditionalContentsEditor preference
set to "WYSIWYG."
- Administration -> Libraries, in the "OPAC info" field.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch is a proof of concept demonstrating how jQueryUI date & time
pickers could be replaced using the Flatpickr library
(https://flatpickr.js.org/).
NEW: I've modified the default configuration of Flatpickr instances so
that a "Clear date" link is automatically appended. This eliminates the
need to add a button to the markup and event handling for each case.
NEW: Date/time formatting should be corrected in this revised patch.
The patch modifies three pages as test cases:
- Circulation -> Renew (with SpecifyDueDates enabled), to demonstrate
date and time selection.
- NEW: You can also test the datepicker shown when you renew an
on-hold item. This demonstrates a configuration which requires that
the selection be after today.
- Administration -> Patron categories -> New category, to demonstrate a
calendar-only date picker enforcing a date after today.
- NEW: Reports -> Patrons. The "Date of birth" fields are linked so
that the second cannot be before the first.
I've made some customizations to the default Flatpickr library's CSS and
incorporated it into staff-global.scss, so you must rebuild the staff
client SCSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch fixes a bug and adds some style changes which I think are
nice. The bugfix is to change the z-index of the lightbox footer so that
it isn't hidden when there is a language menu in the footer.
The cosmetic changes replace the Chocolat image icons with new SVG
assets based on Bootstrap Icons (https://icons.getbootstrap.com/). The
color changes I think help the controls to be more visible.
License information about Bootstrap Icons has been added to the About
page.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In order to display link in the description we need to adjust
chocolat.js
Maybe this needs to be reported upstream
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Chocolat is a lightbox JS library.
https://chocolat.insipi.dehttps://github.com/nicolas-t/Chocolathttps://chocolat.gitbook.io
Why Chocolat? It's released under the GPL v3 license, easy to use,
configure and extend, and is still maintained/active.
(and it has a nice name)
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds some additional configuration to CodeMirror so that
runtime parameters have a distinct color in the CodeMirror SQL editor.
To test, apply the patch and create or edit an SQL report which contains
one or more runtime parameters, e.g. <<branches>>, <<categorycode>>,
etc.
Confirm that when editing the SQL, these parameters should appear as
green text. Save your report and view it. The syntax highlighting should
be updated in this view too.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The intent of the macro insert new function is to add a new field at the correct numerical place in the record. If you have a blank line while editing, however, the new line will be inserted at the blank line, rather than checking the rest of the record.
To test:
1 - Create a macro like
new 690=‡aLOCAL SUBJECT
2 - Insert a blank line into your record somewhere before where the 690 should be inserted
3 - Run the macro
4 - Line is inserted before the blank line
5 - Apply patch
6 - Reload (ensure cache is cleared and JS files are reloaded)
7 - Remove the previously created field, but leave the blank
8 - Run the macro
9 - Field is created at correct position
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 27308: (QA follow-up) Remove commented line
I don't think we need to keep the original line as a comment.. this
patch simply cleans it up.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch removes the jquery.checkboxes plugin from the staff client.
It also removes some leftover instances of the "checkboxed" class which
was used in some cases to enable the checkbox plugin on selected
elements.
To test, apply the patch and check that the jquery.checkboxes plugin no
longer exists in /intranet-tmpl/lib/jquery/plugins.
To test changes to the templates, confirm that "Check all" and "Check
none" links still work on these pages:
- The tags review page. See the test plan for Bug 26120.
- The inventory page. See the test plan for Bug 26150.
- The list contents page. See the test plan for Bug 26204.
The other modified templates contained the "checkboxed" class but it
served no purpose:
- Serials -> Serials collection
- Labels -> Edit label batch
- Patron cards -> Edit card batch
If you search the Koha codebase for instances of "checkboxed" the only
results should be from the OPAC (if Bug 26805 hasn't been applied) and
in Z39.50 templates where the class is still used by JavaScript.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Previously we put all the servers into an object with keys of the server id
This patch converts it to an array of objects to preserve order, and adjusts code to use the array index
where necessary and store the server id within the array
To test:
1 - Add some new Z3950 servers, they don't need to be valid
FIRST
SECOND
THIRD
FOURTH
2 - Adjust the ranking so FOURTH:1 THIRD:2 SECOND:3 FIRST:4
3 - Enable and launch the advanced editor
4 - Click 'Advanced' under search on the left
5 - Note the list displays in the order you entered the servers
6 - Apply patch
7 - Reload
8 - Order is correct
9 - With valid servers, confirm that searching still works and servers can be checked or unchecked to include/remove from results
https://bugs.koha-community.org/show_bug.cgi?id=17515
Signed-off-by: B Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In order to benefit from the last feature of Select we should upgrade to the version 4.
For instance it adds the ability to dynamically create new entries
https://select2.org/tagging
Test plan:
Confirm that there is no visible regression on dropdown list with select2
Like edit a bibliographic records, and the items.
Sponsored-by: Orex Digital
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
While adding the data from the existing field to the auth_finder URI,
we're using encodeURI(), which is meant for an entire URI and thus
doesn't escape &. Things that are going into a querystring need
encodeURIComponent() instead.
Test plan:
1. Enable the system preference EnableAdvancedCatalogingEditor
2. Clear your browser cache, even a shift+reload won't get you a fresh
marc-editor.js for the advanced editor
3. Create a Topical Term authority with 150 $aThis & That$xStuff & Junk
4. In the Basic editor, use the authority plugin on the 650 field to
select that authority.
5. Click the authority plugin again, verify that the popup contains This
& That and Stuff & Junk rather than just This and Stuff
6. From the Cataloging home page choose Advanced editor
7. In a new line paste 650 _ _ ‡aThis & That‡xStuff & Junk
8. Type ctrl+shift+L and verify the popup shows both words in both
fields
9. When you remember the plugin exists there too, edit your
Stuff & Junk authority, and in a 550 tag type One & Two in
$a and Three & Four in $x and click the plugin link, verify that
the search window has your search terms not cut off.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When you click Unhighlight on the search results of a search in the staff client
when the search terms contain the same word twice, like "ma ma", the highlighted
words disappear, and don't reappear if you click Highlight.
This patch makes the same change to the intranet copy of jquery.highlight-3.js that
bug 5844 made to the OPAC copy.
Test plan:
1) Without this patch, search in the intranet for ma ma and verify you have at least
two matching records.
2) Notice that the Ma in Material type: Book is highlighted.
3) Click Unhighlight, and notice that it has become terial type: Book
4) Apply this patch, repeat the search with a shift+reload to reload the .js
5) Click Unhighlight, and verify that Material type: Book remains Material
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds koha-tmpl/intranet-tmpl/lib/moment/moment-timezone-with-data-10-year-range.min.js in order to use the moment library with timezones (https://momentjs.com/timezone/)
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds koha-tmpl/intranet-tmpl/lib/moment/moment.min.js in order to use the moment library (https://momentjs.com/)
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1 - Apply patches
2 - Confirm you can save, load, and run macros
3 - Confirm you have no choice of format
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
system preferences
This patch adds CodeMirror plugins for linting JS, CSS, HTML, and YAML.
When invalid data is entered in a linted CodeMirror editor an icon is
displayed in the editor's "gutter." Hovering over the icon displays the
error message.
This patch renames the minified CodeMirror JS file to match convention
but the version is unchanged.
To test, apply the patch and go to Administration -> System preferences.
Test preferences of each type and confirm that each type of CodeMirror
editor shows an error indicator if you entry invalid data. Valid data
should trigger no error indicator.
- HTML: e.g. OpacMainUserBlock, opacheader. Enter invalid HTML, for
example "<h1>Hello <h2>World</h2>."
Example valid HTML: "<h1>Hello world</h1>"
- JavaScript: e.g. OpacUserJS, IntranetUserJS. Example bad JS,
"alert("Success!');"
Example valid JS: "alert("Success!");"
- CSS: e.g. IntranetUserCSS, SCOUserCSS. Example bad CSS,
"p { color blue }"
Example valid CSS, "p { color: blue; }"
- YAML: e.g. OpacHiddenItems. Example bad YAML:
"one: two, three: four"
Example valid YAML:
"one: two
three: four"
Also test that other CodeMirror instances still work correctly without
linting: The advanced MARC editor, SQL reports editing.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch replaces the unmaintained third party rowGrouping datatables
plugin with the supported core rowGroup replacement.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a new JavaScript file to the staff client's global
JavaScript include file: js.cookie-2.2.1.min.js. This "plugin" will
replace jquery.cookie.js which is no longer maintained.
The "About" page in the staff client is updated to include this new
resource as well as adding previously-missing information about the old
plugin which will remain until all instances of its usage have been
removed.
To test, apply the patch and check the About page to confirm the correct
information is included.
No functionality change is introduced by this bug. The only other
observable change is the existence of the new files and the inclusion of
the minified version of the file in any staff client page.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch updates the JavaScript and CSS for the advanced MARC editor
so that multiple consecutive spaces within a line will be detected and
highlighted.
To test the EnableAdvancedCatalogingEditor system preference should be
enabled. Apply the patch and clear your browser cache if necessary.
- Go to Cataloging -> Advanced editor.
- On any text entry line (e.g. 245), enter some words with one, two,
and more spaces in between them. When there are two or more spaces
between words the spaces between the words should have a dotted red
underline.
- Remove the extra spaces and confirm that the dotted line disappears.
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Update the jEditable plugin to a maintained version and use the new
'number' type to enable increment arrows on click and remap onblur event
to submit.
Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch upgrades the jQuery Validate plugin in the staff client from
v1.10.0 to v1.19.1.
To test, apply the patch and clear your browser cache if necessary.
Test various pages to confirm that form validation works as expected:
- Patron password change form:
- Password must conform to minPasswordLength
- Password must not contain leading/trailing spaces
- Passwords must match
- Administration -> Add or edit budget:
- Description, start date, and end date are required
- Start date must be before end date
- Administration -> Add or edit Z39.50/SRU server:
- Server name, hostname, port, and database are required
- Port, rank, and timeout must be a number
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch updates the TinyMCE editor to the latest version (5.0.16) and
adds a translatable include file which will allow the TinyMCE interface
to show the same translation as Koha.
The configuration of the editor has been updated according to the new
version's requirements, keeping all the tools available we had before
and adding emoji support.
To test, apply the patch and enable the UseWYSIWYGinSystemPreferences
system preference.
TESTING THE UPGRADED EDITOR
- Go to Administration -> System preferences -> OPAC.
- Multiple instances of the TinyMCE editor should appear on the page:
opaccredits, OpacCustomSearch, OpacLoginInstructions, etc.
- Test adding and editing content to one or more of these editors.
Confirm that the various editor tools work correctly.
- Verify that changing the contents of any editor (including via paste)
enables the corresponding "Save all X preferences" button.
- Test the news editor under Tools -> News.
- Test the library "OPAC info" editor in libraries administration:
Administration -> Libraries -> Edit library -> OPAC info.
TESTING TRANSLATABILITY
- Update a translation:
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for the staff client, e.g.
misc/translator/po/fr-FR-staff-prog.po
- Locate strings pulled from includes/str/tinymce_i18n.inc for
translation, e.g.:
#. SCRIPT
#: intranet-tmpl/prog/en/includes/str/tinymce_i18n.inc:1
#, fuzzy
msgid "File"
msgstr "Fichier :"
- Edit the "msgstr" string however you want (it's just for testing) and
remove the "fuzzy" line.
- Install the updated translation:
> perl translate install fr-FR
- Go to Administration -> System preferences -> OPAC.
- In each instance of the TinyMCE editor, the first menu item should
have as its label the translation "msgstr" string you edited.
- Check that the "About" page shows updated information about
the TinyMCE version, 5.0.16.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Correct error whereby object curCursor was invoked as a function.
Added action whereby the most recent entry in the clipboard is
selected after all copy and cut operations.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>