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>
This patchset introduces an internal clipboard to the advanced editor
and provides some new functionality to make use of this, default shortcuts are provided
but can be edited per bug 21411
The default shortcuts for new/changed functions are:
Changed:
Ctrl-X: Now cuts a line into the clipboard area
Shift-Ctrl-X: Now cuts current subfield into clipboard area
Added:
Ctrl-C: Copies a line into the clipboard area
Shift-Ctrl-C: Copies current subfield into clipboard area
Ctrl-P: Pastes the selected item from the clipboard at cursor
Ctrl-I: Copies the current line and inserts onto a new line below
To test:
Verify all functionality above and confirm it behaves as expected
Note:
Ctrl-v pastes from the system clipboard - codemirror does not have
access and this is why we use our "Clipboard"
For browser cut/paste please use mouse right click or context menus
Ctrl-P can be accessed as print by focusing outside the editor window
Signed-off-by: Alex Sassmannshausen <alex@komputilo.eu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch upgrades DataTables and makes some style changes to the
default DataTables toolbar style. DataTables assets are now combined and
minified using their download customizer, bundling together these
elements:
- JSZip 2.5.0
- pdfmake 0.1.36
- DataTables 1.10.18
- Buttons 1.5.6
- Column visibility 1.5.6
- HTML5 export 1.5.6
- Print view 1.5.6
- FixedHeader 3.1.4
DataTables assets have been moved from lib/jquery/plugins to
lib/datatables. The global header and footer include files are updated
correspondingly.
This patch removes the custom "four_button" pagination configuration and
updates pages which used it to use the built-in "full" type instead.
This is done for the sake of consistency and upgradability. This change
touches a lot of files.
Table-specific CSS has been moved from staff-global.scss to a new
include, _tables.scss. A second common include, _mixins.scss has some
variable definitions used in both files.
Many images have been made obsolete by this change and have been
removed.
To test, apply the patch and regenerate the staff client CSS. View
various pages in the staff client with tables:
- Not formatted by DataTables:
- Reports -> Most circulated items
- Catalog -> Search results
- Formatted by DataTables without column configuration
- Acquisitions -> Vendor search
- Lists
- Formatted by DataTables with column configuration
- Administration -> Libraries
- Administration -> Item types
- Reports -> Saved SQL reports
- Non-standard DataTables configurations:
- Circulation -> Checkouts
- Administration -> System preferences
- Reports -> Lost items
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch removes the CSS file reset-fonts-grids.css which was required
when the staff client templates used YUI grids. Now that all staff
client templates have been converted to Bootstrap grid markup the file
can be deleted.
Because the YUI CSS also did set some baseline properties for different
tags the global SCSS file is modified in this patch in order to keep
things looking consistent. Most of these updates change font-size
declarations to preserve the previous appearance.
Some styling has been added to (non Bootstrap-classed) <input> and
<button> tags in order to keep button style consistent.
Removed from staff-global.scss: YUI-specific CSS which has been made
obsolete by the template conversions.
To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Clear your browser cache if necessary.
Browse through various pages of thes staff client to confirm that the
changes work well.
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
We don't seem to directly handle the errors in most cases, let's always return the record
To test:
1 - Add some blank lines to editor, previous patch is okay with this
2 - Add a line with just 'e' or some other incomplete field
3 - Try to save
4 - Note JS leader error
5 - Apply this patch
6 - No errors
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Since bug 16251 we use TextMarc to get some record fields, however, it throws an error when
processing blank lines.
We should just pass on these rather then erroring
To test:
1 - Define a new macro that delete more fields than it adds
delete 245
2 - Run it
3 - Note an error in JS console, and helpers will not load
4 - Apply patch
5 - Reload, try again
6 - No error
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch just updates us to the latest version of the jQuery library
introduced in this patchset.
Thankyou goes out to Josef Moravec who has already contributed a
language translation upstream for Czech (and the reason I pulled in this
updated library at this time)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds Mottie keyboard (https://github.com/Mottie/Keyboard) to advanced editor.
To test:
1) Apply patches
2) perl install/data/mysql/updatedatabase.pl
3) Enable EnableAdvancedCatalogingEditor system preference
4) Go to cataloguing and to Advanced editor
5) Click on Keyboard shortcuts
SUCCESS => the keyboard shortcut "Ctrl-K" should be displayed, with "Toggle keyboard" as description
6) press Ctrl-K
SUCCESS => a virtual keyboard should be displayed, and a new toolbar button labeled "Keyboard layout" should appear.
=> when you press a letter on both the physical and virtual keyboard, they should be added to the editor.
7) Click on "Keyboard layout"
SUCCESS => a modal should appear, where you can filter and select keyboard layouts.
=> when you select a layout, it should be reflected on the keyboard.
=> when you close the modal without selecting a layout, it should keep using the previous layout.
8) Sign off
Sponsored-by: Round Rock Public Library
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch allows for redfining the keyboard shortcuts used in rancor.
For now these are set globally (per instance)
Ctrl-S is a codemirror setting and cannot be altered
To test:
1 - Apply patches
2 - update database
3 - Load the advanced cataloging editor
4 - Click the "Keyboard shortcuts" button
5 - Ensure the list looks correct
6 - Note that 'Ctrl-S' note sit cannot be remapped
7 - Note the 'Redefine shortcuts' link at the top of the menu
8 - Confirm all the listed shortcuts work as expected
9 - Click the 'Redefine' link
10 - Ensure current mappings load correctly
11 - Read explanation and verify it makes sense
12 - Remap some functions
13 - Return to the cataloging editor
14 - Confirm your mappings work
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds the dependencies required to provide YAML syntax
highlighting in CodeMirror text areas. The OpacHiddenItems system
preference configuration is updated to use a "text/x-yaml" CodeMirror
syntax.
To test, apply the patch and go to Administration -> System preferences
-> OPAC.
Expand the OpacHiddenItems preference and test that YAML-formatted text
entry has the correct syntax highlighting.
Signed-off-by: Michal Denar <black23@gmail.com>
https://bugs.koha-community.org/show_bug.cgi?id=2700
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds CodeMirror syntax highlighting by default to JS and CSS
system preferences. HTML preferences will use CodeMirror editors if
UseWYSIWYGinSystemPreferences is disabled.
Three new CodeMirror files are added to support three new syntax
highlighting modes: XML (for HTML), CSS, and JS.
A new option is added to *.pref file configurations for textareas which
are intended for HTML, JS, or CSS: syntax. This option is passed to the
CodeMirror configuration to control syntax highlighting mode.
Textareas without a syntax option specified will not have CodeMirror
enabled.
To test, apply the patch and go to Administration -> System preferences.
Test the behavior of several preferences which use <textarea> as their
input. For example:
- OPACUserJS (JS)
- IntranetUserCSS (CSS)
- OpacHeader (HTML)
- BibtexExportAdditionalFields (no highlighting)
Text entry in each of these should have the correct syntax highlighting
applied to them. All data should be saved correctly.
Test with UseWYSIWYGinSystemPreferences both on and off.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
There is a 1-1 relationship between the material type values and the
position 00 of 007 field. Selecting a material type should set this
position's value.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Upload a file to stage
2 - Select your import options
3 - Delete the file from the server, example:
sudo rm /tmp/koha_kohadev_uploads/
4 - 'Click stage for import'
5 - Get an alert 'Failed to submit form: error'
6 - Apply patches
7 - Repeat 1-4
8 - Get a pretty error with additional info
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes a number of changes in order to improve the way the
staff client's header menu adjusts at narrower browser widths:
- Updated version of Bootstrap 3.3.7 which includes the "collapse"
JavaScript plugin.
- Modified default Bootstrap CSS using Bootstrap's customization tool.
These changes facilitate the removal of some custom CSS (overriding
Bootstrap) from staff-global.scss.
- Added Bootstrap config file for loading customizations at
https://getbootstrap.com/docs/3.3/customize/
- Revised button classes for buttons in Bootstrap-styled toolbars.
The modified default CSS resets the base font size in Bootstrap to
better match our global CSS. A side-effect of this is that toolbar
buttons ended up looking smaller than they should. Changing the
button class solves this.
- Restructure the header menu in order to allow different rules to
govern the appearance of the navigational part of the menu
(Circulation, Search, etc) and the user menu (Set library, My
account, Log out).
- Modify the cart JS to so that the popup works well at narrow widths.
To test, apply the patch, regenerate the staff client CSS, and clear
your browser cache.
- Log in to the staff client and observe the layout of the header menu
as you adjust the browser to various widths.
- Confirm that sections of the menu "collapse" as the window gets
narrower.
- Confirm that dropdown menus behave correctly and that links work.
- Confirm that the Cart link works as expected when the cart empty
and when it has items.
- Install and enable multiple translations, including at least one
set of sub-languages (e.g. fr-FR and fr-CA).
- Test the appearance of the language menus in the footer at
various browser widths.
- View pages with button toolbars and confirm that they appear unchanged
(e.g. biblio detail page, patron detail page).
NOTE: While this patch is intended to make improvements to staff client
responsiveness, it does so within a limited scope. There are still many
pages which do not work well at narrower browser widths.
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch updates the patron permissions interface in order to
emphasize permission descriptions (which can be translated) over
permission code (which cannot).
The tree structure (and jQuery plugin) is removed, and permissions are
displayed in a table-like way. Sub-permissions are shown or hidden with
a link.
A free-text filter is added to the top for narrowing the list by
keyword.
Save and cancel buttons are now in a floating toolbar.
To test, apply the patch, regenerate the staff client CSS, and clear
your browser cache if necessary.
- Open the "Set permissions" page for any patron.
- Confirm that the filter works correctly to show only lines which
match your entry
- Note that the superlibrarian line stays visible all the time. This
is to make it clearer that sub-permissions cannot be selected if
superlibrarian is checked.
- Check the superlibrarain "hint" text for clarity.
- Test the show/hide controls.
- Test that checking a "parent" permission displays the
sub-permissions.
- Test that the toolbar with Save and Cancel floats when scrolling.
- Test that changing and saving permissions works correctly.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The material type is selected in accordance with the leader (06-07)
Test plan:
1. Create a new record using the advanced editor
2. Set the leader 6th position to 'c'
3. Save the record and reload the page
4. 'Music' should be automatically selected for 008
5. Try other values for the leader 6th and 7th positions
See comment 0 of this bug for the complete mapping
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch replaces the fixFloat jQuery plugin with a new one: HC-sticky
(https://github.com/somewebmedia/hc-sticky). This plugin provides the
same functionality without the page-reflow problems fixFloat suffers
from.
To test, apply the patch and regenerate the staff client CSS. Test the
behavior of the floating toolbar on these pages:
- Acquisitions -> Vendor -> Vendor details
- Acquisitions -> Vendor -> View basket
- On both these pages, test toolbar behavior before and after
expanding the "Orders search" options at the top of the page.
- Administration -> System preferences
- Authorities -> Create or edit an authority
- Catalog -> Advanced search
- Search results
- Catalog -> Item search
- Cataloging -> Add or edit a record
- Open the plugin window for the 008 field
- Tools -> Label creator -> New label batch -> Add items -> Search ->
Results
- Patrons -> New patron
- Test before and after expanding the patron search options at the
top of the page
- Test editing a patron too
- Tools -> Automatic item modifications by age -> Edit
- Tools -> Notices & slips -> Edit
- Lists -> View list
Check that the About page has been updated with information about the
plugin.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Includes:
* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments
* SytemPreferences:
Mana Activation:
- add a value "no, let me think about it", that is the default value.
- as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
- Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)
* Interface :
- On mana-search, rows are now sorted by date of last import, then by number of users
- Windows redesigned to improve the user experience
* New Feature : report a mistake.
- people can now report an invalid data (wrong, obsolete,...)
- if a data is reported as invalid many time, it will appear differently
- Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
- When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists
* API (svc/mana)
- add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
- no hardcoding for resources in the code of api (api needs to be called with a ressourcename)
* New feature : SQL report sharing
- Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
- New feature: share reports with Mana-KB
- New feature: search report in Mana-KB with keywords
- New feature: load reports from Mana-KB
Test plan:
1 - Apply Patch + update database
2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
<!-- URL of the mana KB server -->
<!-- alternative value http://mana-test.koha-community.org to query the test server -->
<mana_config>https://mana-kb.koha-community.org</mana_config>
3 - Check Mana syspref and AutoShareWithMana syspref are not activated
4 - Search the syspref ManaToken and follow the instructions
5 - subscriptions
- Try create a new subscription for a first serial => Mana-KB shouldn't show you anything (except if the base hase been filled)
- Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
- Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
- Activate AutoShareWithMana => Subscriptions
- Create a new subscription for a second serial
- There shouldn't be any Share button
- Create a second subscription => the message should appear, click again on use
6 - SQL Report
- Create a new SQL report, without notes.
- On the table with all report (reports > use saved), there should be the action "Share"
- If you click on share, you have an error message
- Create a new report, with a title and notes longer than 20 characters
- You can share it with mana => you will have a success message
- On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list.
7 - Report mistakes.
- On any table containing Mana-KB search results, you can report a mistake and add a comment.
8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
search.js uses the 1=1004
author personal attribute which isn't supported by libraries like
Seattle Public Library.
This patch aligns search.js
with C4/Breeding.pm which uses the more widely supported 1=1003
author attribute.
To test:
1. Set up Seattle Public Library as a Z39.50 target
2. Try to search author using the Advanced Editor advanced search
3. Observe failure
4. Apply the patch
5. Try to search again
6. Observe successful retrieval of records
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds CodeMirror syntax highlighting to the SQL reports
editor. Newly added is a file containing the sql-specific syntax
highlighting code, in both compressed and uncompressed versions.
Unrelated changes:
- Some JavaScript has been moved from inside the body of the page to
the footer.
- Paths to some assets have been corrected to no use relative paths.
To test, apply the patch and go to Reports -> Saved SQL reports
- Edit an existing report and confirm that the SQL is correctly
highlighted and that there are no display problems when editing.
- Confirm that changes are saved successfully.
- Perform the same test when creating a new SQL report.
- View an existing report and confirm that the SQL is syntax-highlighted
but is read-only.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Add a form under report's result that allow to configure and draw a
chart (pie, bar, line and combination).
Pie: Usefull only for a two-column report's result
bar: Horizontal: Can be horizontal or vertical (check/uncheck
horizontal checkbox),
Group: allows to group columns (stacked bar chart),
Line: show some columns as line in a bar chart (combination)
line: line chart :)
This patch adds 2 new js libraries: d3js and c3js:
- c3.min.css
- c3.min.js
- d3.min.js
Test plan:
- Apply this patch,
- execute a report,
- click on show chart settings button (in the tool bar),
- draw chart (click on draw button),
- check the chart
Features:
- Include all rows (ignore pagination),
- Download the chart (svg),
- Choose x column and y columns,
- Exclude last line (Rollup)
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Also minor tweaks to how the fields look.
Test plan:
1. Try moving from field to field and inside control fields with tab/shift-tab.
2. Make sure focus doesn't get stuck in any position.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch upgrades Codemirror to the latest version (5.40.2). Doing so
fixes a problem with the advanced cataloging editor's macro editor which
appears in the latest version of Firefox (62): The first line of the
macro editor is not visible.
To test, apply the patch and clear your browser cache if necessary.
EnableAdvancedCatalogingEditor must be set to "Enable."
- Go to Cataloging -> Advanced editor.
- Click the "Macros" toolbar button.
- In the main part of this modal window you should see a blank line
marked "1."
- Click "New macro..."
- The editor's line 1 should now be editable. Enter text to confirm that
it works correctly.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>