simple_calendar-timeslot 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/app/assets/stylesheets/simple_calendar-timeslot.css +6 -0
- data/app/views/simple_calendar/timeslot/_timeslot_calendar.html.erb +2 -2
- data/lib/simple_calendar/timeslot/timeslot_calendar.rb +4 -0
- data/lib/simple_calendar/timeslot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e642f680ea5441076624a829e2e672a1cbb57f8b2ffffcf161dd658ae8b5b17c
|
4
|
+
data.tar.gz: 39caf7b4c9a72da1e11e8b21c12fb2fd8c7928ef86d18a572afaa6a0d9709d0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae67297856bc7d27e71ab6740c9b73b7e033d24a5cd7f3b5d9d3f4cc032fa0e7f36f1b5f63375529aa954af4f6a34be0385cbdf5d2d8abeabfe997aaff44bbf2
|
7
|
+
data.tar.gz: 05126f7fe63a2027f731f56138bffd965aebf46e0943da182b2d35cb337f6df860a0e097bc1293522ce4256706ae429fd944071aa0543516ed16641ca7ecba26
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.6.0] - 2021-11-15
|
4
|
+
### Added
|
5
|
+
- Added option horizontal_scroll_split to view helper, which defaults to false. This option affects
|
6
|
+
horizontal orientation only. If set to false, the
|
7
|
+
different days of the calendar scroll together horizontally, which is more consistent with the
|
8
|
+
behaviour of the vertical layout. If set to true, the days scroll independently.
|
9
|
+
|
3
10
|
## [0.5.1] - 2021-11-15
|
4
11
|
### Fixed
|
5
12
|
- Fixed reliance of calendar on legacy function to
|
data/Gemfile.lock
CHANGED
@@ -9,6 +9,10 @@
|
|
9
9
|
display: flex;
|
10
10
|
flex-direction: column;
|
11
11
|
}
|
12
|
+
.timeslot-calendar .days-wrapper-horizontal.scroll-link {
|
13
|
+
overflow-x: auto;
|
14
|
+
overflow-y: hidden;
|
15
|
+
}
|
12
16
|
.timeslot-calendar .day-wrapper {
|
13
17
|
flex: 1 1 0;
|
14
18
|
}
|
@@ -21,6 +25,8 @@
|
|
21
25
|
display: flex;
|
22
26
|
flex-direction: column;
|
23
27
|
position: relative;
|
28
|
+
}
|
29
|
+
.timeslot-calendar .day-content-horizontal.scroll-split {
|
24
30
|
overflow-x: auto;
|
25
31
|
overflow-y: hidden;
|
26
32
|
}
|
@@ -66,7 +66,7 @@
|
|
66
66
|
<% end %>
|
67
67
|
</div>
|
68
68
|
<% elsif calendar.orientation == :horizontal %>
|
69
|
-
<div class="days-wrapper-horizontal">
|
69
|
+
<div class="days-wrapper-horizontal <%= calendar.horizontal_scroll_split ? "" : "scroll-link" %>">
|
70
70
|
<% date_range.slice(0, 7).each do |day| %>
|
71
71
|
<div class="day-wrapper">
|
72
72
|
<div class="day-title-row">
|
@@ -78,7 +78,7 @@
|
|
78
78
|
</span>
|
79
79
|
</div>
|
80
80
|
<%= content_tag :div, class: calendar.td_classes_for(day) do %>
|
81
|
-
<div class="day-content-horizontal">
|
81
|
+
<div class="day-content-horizontal <%= calendar.horizontal_scroll_split ? "scroll-split" : "" %>">
|
82
82
|
<div class="day-content-horizontal-inner" style="width:<%=calendar.height%>px;height:<%=calendar.horizontal_height_px%>px">
|
83
83
|
<% if calendar.display_grid %>
|
84
84
|
<div class="hour-indicator-col-horizontal" style="z-index:-10;">
|
@@ -50,6 +50,10 @@ module SimpleCalendar
|
|
50
50
|
@options.fetch(:display_grid, true)
|
51
51
|
end
|
52
52
|
|
53
|
+
def horizontal_scroll_split
|
54
|
+
@options.fetch(:horizontal_scroll_split, false)
|
55
|
+
end
|
56
|
+
|
53
57
|
def height
|
54
58
|
#h = (24 - TimeslotCalendar::FIRST_HOUR_SLOT) * 60 * px_per_minute
|
55
59
|
h = 24 * 60 * px_per_minute
|