Make the tooltips for the tabs a bit more consistent and make the edit

and history tooltips change when those tabs are disabled to explain that
the user needs to zoom in to use them.
This commit is contained in:
Tom Hughes 2010-02-26 18:49:22 +00:00
parent 3851a672e2
commit c6077fd124
3 changed files with 13 additions and 7 deletions

View 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>
<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 %>

View file

@ -887,15 +887,13 @@ en:
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_tooltip: Edit maps
history: History
history_tooltip: Changeset history
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
@ -1619,5 +1617,9 @@ en:
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
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

View 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);
node.title = i18n("javascripts.site.edit_tooltip");
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';
}
}
@ -85,9 +87,11 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,obj
}
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.title = i18n("javascripts.site.history_disabled_tooltip");
node.style.fontStyle = 'italic';
}
}