implements configurable schedule granularity and improves the schedule grid for denser schedule grids on smaller screens
This commit is contained in:
parent
4089f16f17
commit
ff9ca4a817
11 changed files with 56 additions and 24 deletions
|
|
@ -1,6 +1,9 @@
|
|||
- cells_length = event.event_type.length / EventType::LENGTH_STEP
|
||||
/ this height fits the room cells
|
||||
- height = (cells_length * 58) - 23
|
||||
- compact_grid = EventType::LENGTH_STEP < 15
|
||||
- single_cell_height = compact_grid ? 32 : 58
|
||||
- height = (cells_length * single_cell_height)
|
||||
- height -= 23 unless compact_grid
|
||||
/ subtracting the padding before calculate the number of lines
|
||||
- lines = (height - 7) / 23
|
||||
- color = event.track.try(:color).present? ? event.track.try(:color) : 'FFFFFF'
|
||||
|
|
@ -8,7 +11,8 @@
|
|||
id: "event-#{event.id}", |
|
||||
event_id: event.id, |
|
||||
length: cells_length, |
|
||||
event_schedule_id: event_schedule_id }
|
||||
event_schedule_id: event_schedule_id, |
|
||||
class: ('compact' if compact_grid) }
|
||||
.schedule-event-text{ style: "-webkit-line-clamp: #{lines}; height: #{lines * 23}px;"}
|
||||
%span.schedule-event-delete-button{ onclick: "Schedule.remove(\'event-#{event.id}\');" } X
|
||||
= event.title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue