]> git.openstreetmap.org Git - rails.git/commitdiff
Eliminate loading flash for welcome overlay
authorJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 19 Nov 2013 19:18:11 +0000 (11:18 -0800)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 19 Nov 2013 19:18:11 +0000 (11:18 -0800)
app/assets/javascripts/index.js
app/assets/stylesheets/common.css.scss
app/assets/stylesheets/small.css.scss
app/views/layouts/map.html.erb
app/views/site/index.html.erb

index 59e231381778bb5d1591982f0256f57e2fc0e55e..365d33e3abc76d30c392d5855b7a3c607472844d 100644 (file)
@@ -198,22 +198,19 @@ $(document).ready(function () {
   OSM.Index = function(map) {
     var page = {};
 
-    page.pushstate = function(path) {
+    page.pushstate = function() {
       $("#content").addClass("overlay-sidebar");
       map.invalidateSize({pan: false})
         .panBy([-350, 0], {animate: false});
-      OSM.loadSidebarContent(path);
-      page.load();
     };
 
     page.load = function() {
       return map.getState();
     };
 
-    page.popstate = function(path) {
+    page.popstate = function() {
       $("#content").addClass("overlay-sidebar");
       map.invalidateSize({pan: false});
-      OSM.loadSidebarContent(path);
     };
 
     page.unload = function() {
index a7591ba214d0d597d1339096429d4bb6c5628125..ebc5109c6335b4825ff9aa3811467590aba547b4 100644 (file)
@@ -649,12 +649,22 @@ nav.secondary {
     }
   }
 
+  .welcome {
+    display: none;
+  }
+
   .overlay-sidebar #sidebar {
     position: absolute;
     z-index: 1000;
     height: auto;
     border-bottom-right-radius: 5px;
     overflow: hidden;
+    .welcome {
+      display: block;
+    }
+    #sidebar_content {
+      display: none;
+    }
   }
 
   .welcome {
index 39b946af06d93c96eacf54d691bb6fbb02c54c27..e9d0a477901c0d9caa9c902a57b0330293cda9ac 100644 (file)
@@ -122,7 +122,7 @@ nav.secondary {
 }
 
 #sidebar .welcome {
-  display: none;
+  display: none !important;
 }
 
 .leaflet-top.leaflet-right {
index 2170705b00b20c7ff6a0186416172d5b39c18c14..2fe8b9b3bda7dae9e7f4733de061d39f9f018c33 100644 (file)
       <%= render :partial => "layouts/flash" %>
       <%= yield %>
     </div>
+
+    <% unless @user %>
+      <div class="welcome">
+        <h2><%= t 'layouts.intro_header' %></h2>
+        <p><%= t 'layouts.intro_text' %></p>
+        <a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
+        <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.sign_up') %></a>
+      </div>
+    <% end %>
   </div>
 
   <noscript>
index 6f215235cfe686b409bb64e36fa3bf870dca74e6..7603bb1bdd0c26fbcb3c9fa0e0e9d9f8a94a2574 100644 (file)
@@ -1,13 +1,4 @@
 <%
-    set_title()
-    content_for(:content_class) { "overlay-sidebar" }
+   set_title()
+   content_for(:content_class) { "overlay-sidebar" }
 %>
-
-<% unless @user %>
-  <div class="welcome">
-    <h2><%= t 'layouts.intro_header' %></h2>
-    <p><%= t 'layouts.intro_text' %></p>
-    <a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
-    <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.sign_up') %></a>
-  </div>
-<% end %>