This change makes the JS in for preset management more resilient.
Previously, if the button was not on the page then an error was thrown.
Instead this code changes the listener to listen to the document and
filters the clicked element based on the same selector. This is a much
safer approach as it will not error if the selector was not found on the
page.
In this case the behat test introduced elsewhere in this issue is
testing a scenario where the Save as preset button is not present
because there are no fields to store as a preset.
On the Database page:
- The List/single view is displayed in the right.
- The buttons Import entries, export entries and Export to portfolio
have been moved to the Actions menu.
- The List/Single view headings have been removed.
- The "Save settings" secondary button is hidden when advanced search
is enabled.
- The result (Found X out of Y entries, No records found) are not
displayed as notifications anymore.
On the Presets page:
- The buttons (Import, Export and Save as preset) have been moved to an
actions menu to the tertiary navigation. Some of these options have been
renamed.
- Remove the Action column heading from the table.
On the Presets preview page:
- Move the preset name to the heading in the tertiary navigation (Preview
of xxxxx), and remove the current preset name from the page.
- Align the List/single template to the right in the tertiary navigation.
- Make primary the "Use this preset" button.
On the Fields page:
- Remove the "Manage fields" menu.
- Remove the Export and Save as preset from the tertiary navigation.
- Align Create a field to the right in the tertiary navigation.
- Add a description at the top of the page.
- Remove the Action column heading from the table.
- Move field actions (Edit and Delete) to ellipsis.
On the Templates page:
- Move Export and Save as preset to the Actions menu.
- Move the templates list to a tertiary navigation selector and remove
the template heading.
- Reorder the templates list (Add entry template should be displayed
at the begining, instead of List template).
- Rename "Enable editor" to "Enable code editor".
* Use a modal instead of a standard page to select the preset file
and import it.
* Change the zero state import button to a modal dialog so it uses the same
workflow as on the preset page
Each template should display at the top the information about the
user who has created the entry, when it was created and modified.
Apart from that, this commit also includes:
- For the Journal preset, a link on each card entry title has been
added, to open the Single view.
- For the Resources preset, the Author field has been renamed to
"Author of resource" and the Description to "Content".
- For the Resources preset, the Author and Type fields will be
hidden in the List view for small devices.
Apart from removing the "List view" and "Single view" h2 headings,
the presets and templates must be also reviewed to confirm no
heading is skipped (so h2 > h3 > h4 ...).
For the Journal preset, the "Reflections" heading has been removed
here too.
The lock ensures that multiple conversions do not happen for the same
assignment submission.
Otherwise, subsequent conversions will fail when trying to save the
converted file.
Polling conversions will run the document conversion immediately if the
conversion has not already been completed.
Releasing the session lock while doing this ensures large conversions
do not unnecessarily hold the users session.