From: Tom Hughes Date: Thu, 11 Mar 2010 08:58:48 +0000 (+0000) Subject: Use CSS to style the disabled tabs. X-Git-Tag: live~6842^2~44 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/910937ae4b96c30b598ea18bf1ffbde30811cfae?hp=8434fb53b7901b7c47aa815492aca6fe313d2b93 Use CSS to style the disabled tabs. --- diff --git a/public/javascripts/site.js b/public/javascripts/site.js index c17500f57..cabb1568c 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -61,11 +61,11 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,obj } node.href = setArgs("/edit", args); node.title = i18n("javascripts.site.edit_tooltip"); - node.style.fontStyle = 'normal'; + node.removeClassName("disabled"); } else { node.href = 'javascript:alert(i18n("javascripts.site.edit_zoom_alert"));'; node.title = i18n("javascripts.site.edit_disabled_tooltip"); - node.style.fontStyle = 'italic'; + node.addClassName("disabled"); } } @@ -88,11 +88,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'; + node.removeClassName("disabled"); } else { node.href = 'javascript:alert(i18n("javascripts.site.history_zoom_alert"));'; node.title = i18n("javascripts.site.history_disabled_tooltip"); - node.style.fontStyle = 'italic'; + node.addClassName("disabled"); } } diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index ca6a7be20..10e335143 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -285,6 +285,11 @@ hr { background: #fff; } +#tabnav a.disabled +{ + font-style: italic; +} + /* Rules for greeting bar in the top right corner */ #greeting {