aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Donnet2012-10-09 16:33:22 +0200
committerLuc Donnet2012-10-09 16:33:22 +0200
commit95c9fd1a1e5445b95dc6d84aac369f0dad8b427f (patch)
tree62f86f3236dc7890181a6fa77883826023552233
parent8b9706c8ab8904957da95e60e6b7d8bb7af3d7b8 (diff)
downloadchouette-core-95c9fd1a1e5445b95dc6d84aac369f0dad8b427f.tar.bz2
Update calendar color for period date and overlap dates
-rw-r--r--Gemfile.lock2
-rw-r--r--app/assets/stylesheets/calendar.css.scss36
-rw-r--r--app/views/time_tables/show.html.erb8
3 files changed, 31 insertions, 15 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index 85cb92b1e..0b98f9825 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: git://chouette.dryade.priv/ninoxe
- revision: 51dddb6a98e02b88d5f4f02e1b3142bd8583b6e0
+ revision: b272a1637aab7e8692a57ec7a87147c406814903
specs:
ninoxe (0.0.8)
GeoRuby
diff --git a/app/assets/stylesheets/calendar.css.scss b/app/assets/stylesheets/calendar.css.scss
index a35fbd665..e63d7f088 100644
--- a/app/assets/stylesheets/calendar.css.scss
+++ b/app/assets/stylesheets/calendar.css.scss
@@ -59,33 +59,45 @@ thead tr {
border-bottom: 1px solid white;
}
-.otherMonth, .day, .specialDay {
+.otherMonth {
+ color: #999999;
+ background-color: #4f4f5b;
padding: 0.7em;
border-right: 1px solid #111111;
border-bottom: 1px solid #111111;
}
-.otherMonth {
- color: #999999;
- background-color: #4f4f5b;
-}
+.day { background-color: #333333; }
-.day, .specialDay {
+.day, .specialDay, .selected_period, .selected_date, .overlap_date {
+ border-bottom: 1px solid #111111;
+ padding: 0.7em;
+ border-right: 1px solid #111111;
border-bottom: 1px solid #111111;
- background-color: #333333;
}
+
.specialDay {
- background-color: #a8a8a8 !important;
+ background-color: #a8a8a8;
color: black;
}
-.specialDay a, .specialDay a:visited, .specialDay a:hover {
- color: white;
- text-decoration: none;
+.selected_period { background-color: #ffbd2b; }
+
+.selected_date { background-color: #8fc861; }
+
+.overlap_date { background-color: #ffbd2b; }
+
+.specialDay, .selected_period, .selected_date, .overlap_date {
+ a, a:visited, a:hover {
+ color: white;
+ text-decoration: none;
+ }
}
-.specialDay a:hover {
+
+.specialDay a:hover, selected_period a:hover, selected_date a:hover, overlap_date a:hover {
color: black;
}
+
.weekendDay {
background-color: #787888;
}
diff --git a/app/views/time_tables/show.html.erb b/app/views/time_tables/show.html.erb
index a1b113a5a..45763fad5 100644
--- a/app/views/time_tables/show.html.erb
+++ b/app/views/time_tables/show.html.erb
@@ -72,8 +72,12 @@
<%= cal = ""
(1..12).each do |month|
cal << calendar(:year => @year, :month => month, :first_day_of_week => 1) do |d|
- if @time_table.include_day?(d)
- [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "specialDay"}]
+ if @time_table.include_in_dates?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "selected_date"}]
+ elsif @time_table.include_in_periods?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "selected_period"}]
+ elsif @time_table.include_in_overlap_dates?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "overlap_date"}]
end
end
end