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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43966203ce48c4c965bfb74fb242a926ecc9b5cb34aa0b56426d85410b3f08aa
4
- data.tar.gz: 848c5d0c11a76c476e99c9376f81b8b708619bbf1ba1aafe93ad9dc87ec41267
3
+ metadata.gz: e642f680ea5441076624a829e2e672a1cbb57f8b2ffffcf161dd658ae8b5b17c
4
+ data.tar.gz: 39caf7b4c9a72da1e11e8b21c12fb2fd8c7928ef86d18a572afaa6a0d9709d0c
5
5
  SHA512:
6
- metadata.gz: 849481225d905b3b962d6f90965324c0645db136c7e2bb5e350b26bca496ba9edf8a5f7409c37cfc4d53e3f3e3bf23d1f0d2716a7d0b25c27ceabcd004ba4369
7
- data.tar.gz: 7ab1c262be43bc58ad0d3d184c76cf1fa927c58d1156d0c9e110098429f37b2c517b4d636d6c40263cecf4f2663119d284dd3bb3c212582e67cd4487906bd8ce
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_calendar-timeslot (0.5.1)
4
+ simple_calendar-timeslot (0.6.0)
5
5
  simple_calendar (~> 2.0)
6
6
 
7
7
  GEM
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SimpleCalendar
4
4
  module Timeslot
5
- VERSION = "0.5.1"
5
+ VERSION = "0.6.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_calendar-timeslot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kim Laplume