aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/route.js.coffee15
-rw-r--r--app/assets/stylesheets/layout.css.scss15
-rw-r--r--app/assets/stylesheets/lines.css.scss1
-rw-r--r--app/views/lines/show.html.erb1
-rw-r--r--app/views/routes/show.html.erb25
5 files changed, 46 insertions, 11 deletions
diff --git a/app/assets/javascripts/route.js.coffee b/app/assets/javascripts/route.js.coffee
new file mode 100644
index 000000000..a3dd304d3
--- /dev/null
+++ b/app/assets/javascripts/route.js.coffee
@@ -0,0 +1,15 @@
+jQuery ->
+ switch_journey_patterns = (event) ->
+ event.preventDefault()
+ $('.routes.show .journey_patterns.content').toggle('slow')
+ $('a.journey_patterns .switcher').toggle()
+
+ $('.routes.show a.journey_patterns').click(switch_journey_patterns)
+
+ switch_stop_points = (event) ->
+ event.preventDefault()
+ $('.routes.show .stop_points.content').toggle('slow')
+ $('a.stop_points .switcher').toggle()
+
+ $('.routes.show a.stop_points').click(switch_stop_points)
+
diff --git a/app/assets/stylesheets/layout.css.scss b/app/assets/stylesheets/layout.css.scss
index dced2ebb6..2c51cd6df 100644
--- a/app/assets/stylesheets/layout.css.scss
+++ b/app/assets/stylesheets/layout.css.scss
@@ -7,6 +7,21 @@ $text_color: #222;
@import "user_interface/layout";
+p.after_map {
+ clear: both;
+}
+#header .infos div.title
+{
+ margin: 20px 0 0 30px;
+
+ h1 {
+ font-family: "Comic Sans", "Comic Sans MS", cursive;
+ font-size: 32px;
+ font-weight: bold;
+ padding: 0px;
+ }
+}
+
#sidebar ul {
padding: 0 8px;
diff --git a/app/assets/stylesheets/lines.css.scss b/app/assets/stylesheets/lines.css.scss
index 56a5572e5..cbd39f90b 100644
--- a/app/assets/stylesheets/lines.css.scss
+++ b/app/assets/stylesheets/lines.css.scss
@@ -63,7 +63,6 @@
.line_color{ color: white;
font-weight: bold;
padding: 0 5px 0 5px;}
- h3.routes { clear: both; }
.route {
@include div_for_object;
diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb
index 2f74ab4fa..6da0bf61e 100644
--- a/app/views/lines/show.html.erb
+++ b/app/views/lines/show.html.erb
@@ -59,6 +59,7 @@
</div>
</div>
+<p class="after_map" />
<h3 class="routes"><%= t('.itineraries') %></h3>
<div class="routes paginated_content">
diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb
index e6fbcce3f..9980543c7 100644
--- a/app/views/routes/show.html.erb
+++ b/app/views/routes/show.html.erb
@@ -64,13 +64,24 @@
</div>
-<h3 class="route_stop_points"><%= t('.stop_points') %></h3>
-<div class="stop_points paginated_content">
+<p class="after_map" />
+ <h3 class="route_stop_points"><%= t('.stop_points') %>
+ <a class="stop_points">
+ <span class="switcher">+</span>
+ <span class="switcher" style="display: none;">-</span>
+ </a>
+ </h3>
+<div class="stop_points content" style="display: none;">
<%= render :partial => "stop_points/stop_point", :collection => @stop_points %>
</div>
-<h3 class="route_journey_patterns"><%= t('.journey_patterns') %></h3>
-<div class="journey_patterns">
+<h3 class="route_journey_patterns"><%= t('.journey_patterns') %>
+ <a class="journey_patterns">
+ <span class="switcher">+</span>
+ <span class="switcher" style="display: none;">-</span>
+ </a>
+</h3>
+<div class="journey_patterns content" style="display: none;">
<%= render :partial => "journey_patterns/journey_pattern", :collection => @route.journey_patterns %>
</div>
@@ -87,12 +98,6 @@
<li>
<%= link_to t('vehicle_journeys.actions.index'), [@referential, @line, @route, :vehicle_journeys], :class => "link" %>
</li>
- <li>
- <%= link_to t(".journey_patterns"), "#journey_patterns", :class => "select_parent" %>
- </li>
- <li>
- <%= link_to t(".stop_points"), "#stop_points", :class => "select_parent" %>
- </li>
</ul>
<% end %>