]> git.openstreetmap.org Git - rails.git/commitdiff
Make the tooltips for the tabs a bit more consistent and make the edit
authorTom Hughes <tom@compton.nu>
Fri, 26 Feb 2010 18:49:22 +0000 (18:49 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 26 Feb 2010 18:49:22 +0000 (18:49 +0000)
and history tooltips change when those tabs are disabled to explain that
the user needs to zoom in to use them.

app/views/layouts/site.html.erb
config/locales/en.yml
public/javascripts/site.js

index dc621c631d3bca5aab9832ccaa1a33775c2bb645..8fb9beae1c5125016ed799903e8ef4634aaa608f 100644 (file)
@@ -65,8 +65,8 @@
         diaryclass = 'active' if params['controller'] == 'diary_entry'
         %>
         <li><%= link_to t('layouts.view'), {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => t('layouts.view_tooltip'), :class => viewclass} %></li>
         diaryclass = 'active' if params['controller'] == 'diary_entry'
         %>
         <li><%= link_to t('layouts.view'), {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => t('layouts.view_tooltip'), :class => viewclass} %></li>
-        <li><%= link_to t('layouts.edit'), {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => t('layouts.edit_tooltip'), :class => editclass} %></li>
-        <li><%= link_to t('layouts.history'), {:controller => 'changeset', :action => 'list' }, {:id => 'historyanchor', :title => t('layouts.history_tooltip'), :class => historyclass} %></li>
+        <li><%= link_to t('layouts.edit'), {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => t('javascripts.site.edit_tooltip'), :class => editclass} %></li>
+        <li><%= link_to t('layouts.history'), {:controller => 'changeset', :action => 'list' }, {:id => 'historyanchor', :title => t('javascripts.site.history_tooltip'), :class => historyclass} %></li>
         <% if params['controller'] == 'site' and (params['action'] == 'index' or params['action'] == 'export') %>
         <li><%= link_to_remote t('layouts.export'), {:url => {:controller => 'export', :action => 'start'}}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass, :href => url_for(:controller => 'site', :action => 'export')} %></li>
         <% else %>
         <% if params['controller'] == 'site' and (params['action'] == 'index' or params['action'] == 'export') %>
         <li><%= link_to_remote t('layouts.export'), {:url => {:controller => 'export', :action => 'start'}}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass, :href => url_for(:controller => 'site', :action => 'export')} %></li>
         <% else %>
index 64690965d066860504aca76e88b8fdcfe8b77fd6..37538cc1a76d88257d73527360a7edede6f9026d 100644 (file)
@@ -887,15 +887,13 @@ en:
     sign_up: sign up
     sign_up_tooltip: Create an account for editing
     view: View
     sign_up: sign up
     sign_up_tooltip: Create an account for editing
     view: View
-    view_tooltip: View maps
+    view_tooltip: View the map
     edit: Edit
     edit: Edit
-    edit_tooltip: Edit maps
     history: History
     history: History
-    history_tooltip: Changeset history
     export: Export
     export_tooltip: Export map data
     gps_traces: GPS Traces
     export: Export
     export_tooltip: Export map data
     gps_traces: GPS Traces
-    gps_traces_tooltip: Manage traces
+    gps_traces_tooltip: Manage GPS traces
     user_diaries: User Diaries
     user_diaries_tooltip: View user diaries
     tag_line: The Free Wiki World Map
     user_diaries: User Diaries
     user_diaries_tooltip: View user diaries
     tag_line: The Free Wiki World Map
@@ -1619,5 +1617,9 @@ en:
       overlays:
         maplint: Maplint
     site:
       overlays:
         maplint: Maplint
     site:
+      edit_tooltip: Edit the map
+      edit_disabled_tooltip: Zoom in to edit the map
       edit_zoom_alert: You must zoom in to edit the map
       edit_zoom_alert: You must zoom in to edit the map
-      history_zoom_alert: You must zoom in to see the editing history
+      history_tooltip: View edits for this area
+      history_disabled_tooltip: Zoom in to view edits for this area
+      history_zoom_alert: You must zoom in to view edits for this area
index 43cca261c4175bc544e2d38bab6f57399c9adf2f..c17500f571701c9ebb5fff2ec317db5bf7eba09a 100644 (file)
@@ -60,9 +60,11 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,obj
         args[objtype] = objid;
       }
       node.href = setArgs("/edit", args);
         args[objtype] = objid;
       }
       node.href = setArgs("/edit", args);
+      node.title = i18n("javascripts.site.edit_tooltip");
       node.style.fontStyle = 'normal';
     } else {
       node.href = 'javascript:alert(i18n("javascripts.site.edit_zoom_alert"));';
       node.style.fontStyle = 'normal';
     } else {
       node.href = 'javascript:alert(i18n("javascripts.site.edit_zoom_alert"));';
+      node.title = i18n("javascripts.site.edit_disabled_tooltip");
       node.style.fontStyle = 'italic';
     }
   }
       node.style.fontStyle = 'italic';
     }
   }
@@ -85,9 +87,11 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,obj
       }
 
       node.href = setArgs("/history", args);
       }
 
       node.href = setArgs("/history", args);
+      node.title = i18n("javascripts.site.history_tooltip");
       node.style.fontStyle = 'normal';
     } else {
       node.href = 'javascript:alert(i18n("javascripts.site.history_zoom_alert"));';
       node.style.fontStyle = 'normal';
     } else {
       node.href = 'javascript:alert(i18n("javascripts.site.history_zoom_alert"));';
+      node.title = i18n("javascripts.site.history_disabled_tooltip");
       node.style.fontStyle = 'italic';
     }
   }
       node.style.fontStyle = 'italic';
     }
   }