roadmap
roadmap copied to clipboard
labels and checkboxes: some display improvements?
Please complete the following fields as applicable:
What version of the DMPRoadmap code are you running? (e.g. v2.2.0)
3.0.2
Improvements:
-
in the contributor tab of a plan a tooltip is attached to the checkbox. Better not attach it to the label that wraps both text and checkbox? Otherwise you'll see the help text too late.
-
checkboxes with text next to it should be activated by clicking on the text. This can be done by either wrapping the checkbox in a label, or by setting the attributor "for" of a label. e.g. list of themes in the template editor.
-
in the share tab of a plan one single tooltip is shown if you hover over the available permission options. Better not split this apart? That would make it more readable, I think.
Yes agree on all counts.
@nicolasfranck would you have the time to have a go at this one? would be great if so. Cheers.
@briri
There is a problem with this commit: https://github.com/DMPRoadmap/roadmap/pull/2333/files
If I add a label to every theme, it automatically changes the attribute for so it points to the tinymce iframe.
yes, good catch. That is far too generic and I can confirm that its doing this on other pages that have multiple tinymce editors. Instead of using iframe.closest('form').find('label');
Maybe something like:
const textarea = iframe.closest('.mce-container').siblings('textarea.tinymce')[0];
if (isObject(textarea)) {
const lbl = $(`label[for="${textarea.attr('id')}"]`);
if (isObject(lbl)) {
// Connect the label to the iframe
lbl.attr('for', iframe.attr('id'));
}
}
Another option would be to perhaps use this: https://www.tiny.cloud/docs-4x/api/tinymce.ui/tinymce.ui.label/
That may mean passing the label into the init function.