After implementing #1710258: More than 2 Time Blocks Per Day: upgrade to 21, 28... hours per week, the following tasks are left.
- implement better widget
- implement hook-update_N(), to normalize existing field settings;
- implement hook-update_N(), to normalize column 'day' to 'normal' day numbers;

- update javascript so that
a) first empty time block contains 'Add more hours' link (initially the second one for each day) , and
b) all following (3rd, 4th, etc.) are hidden.

Comments

johnv’s picture

Title: ' N time blocks per day' is not complete » javascript for 'N time blocks per day' is not complete

Updated issue summary, better title.

johnv’s picture

Issue summary: View changes

Updated status

kpaxman’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.92 KB

Here's my (possibly hacky) solution for this issue. I also reformatted spacing in the file.

johnv’s picture

Title: javascript for 'N time blocks per day' is not complete » Javascript for 'N time blocks per day' is not complete
Status: Needs review » Needs work

Thanks for this.
I found 2 flaws:
- when revisiting the widget, an already filled in line, is hidden. Only if you press the 'add more hours' link, the line is shown. Data is not lost.
- when checking 'Validate hours' the entered values are not validated.

  • johnv committed d173d47 on 7.x-1.x authored by kpaxman
    Issue #1945230 by kpaxman, johnv: Fixed JavaScript for multi-block...
johnv’s picture

I've committed kpaxman's patch, along with som others, which were not related to the javaScript:
- show 2nd, 3rd block if it has a value;
- align the label 'and' to the right, for better visibility.

For validating the contents, see #1965948: Handle the exceptional values in office_hours_feeds_set_target()

johnv’s picture

Version: 7.x-1.x-dev » 7.x-1.3
Status: Needs work » Fixed

  • johnv committed d173d47 on 8.x-1.x authored by kpaxman
    Issue #1945230 by kpaxman, johnv: Fixed JavaScript for multi-block...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.