From 910937ae4b96c30b598ea18bf1ffbde30811cfae Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 11 Mar 2010 08:58:48 +0000 Subject: [PATCH 1/1] Use CSS to style the disabled tabs. --- public/javascripts/site.js | 8 ++++---- public/stylesheets/common.css | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) 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 { -- 2.39.5