Details
-
Technical Task
-
Status: Closed
-
Resolution: Completed
-
None
-
None
-
6.2.x
-
Sprint 5: Nov, 23 - Dec, 04, Sprint 06: Dec, 07 - Dec, 18
Description
When an event is defined as weekly recurring, we can choose the days of week it will repeat on. It is done with checkboxes. These checkboxes, however, have some odd properties:
- each one is named with a day of week abbreviation (e.g. the Monday checkbox is named <portlet:namespace />MO);
- they have a data-weekday attribute whose content is the localized name of the week.
This configuration is proving itself complicated to maintain:
- the labels are not localized;
- in other places, the JavaScript code should check equality with localized strings;
- the JavaScript code is made unnecessarily more dependent of JSP-generated info;
- the processing of the submitted form is quite unusual, since one has to get a submitted parameter and, if it does exist, then do something.
So, it may make the code leaner to do the following:
- remove the data-weekday attribute;
- make the name of the checkboxes <portlet:namespace />weekdays;
- retrieve an array with days of week at the back-end;
- delegate any translation to the RecurrenceUtil.getSummary().