From 9218674e316031be36f025c45a8038a971556605 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Sun, 2 Dec 2007 18:24:20 +0000 Subject: [PATCH] Fixing a JavaScript error, cleanup. --- includes/DefaultSettings.php | 2 +- skins/common/block.js | 30 +++++++++++++----------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b1ea6e5959..b45d2719ec 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1243,7 +1243,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches don't keep obsolete copies of global * styles. */ -$wgStyleVersion = '101'; +$wgStyleVersion = '102'; # Server-side caching: diff --git a/skins/common/block.js b/skins/common/block.js index 741dd76ae2..78ae3bf2c6 100644 --- a/skins/common/block.js +++ b/skins/common/block.js @@ -1,4 +1,3 @@ - function considerChangingExpiryFocus() { if (!document.getElementById) { return; @@ -31,26 +30,23 @@ function updateBlockOptions() { var isEmpty = addy.match(/^\s*$/); var isIp = addy.match(/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|:(:[0-9A-Fa-f]{1,4}){1,7}|[0-9A-Fa-f]{1,4}(:{1,2}[0-9A-Fa-f]{1,4}|::$){1,7})(\/\d+)?$/); - /* - var anonymousCheck = document.getElementById('wpAnonOnly'); - anonymousCheck.disabled = !isIp && !isEmpty; - - var autoblockCheck = document.getElementById('wpEnableAutoblock'); - autoblockCheck.disabled = isIp && !isEmpty; - - var emailblockCheck = document.getElementById('wpEmailBan'); - emailblockCheck.disabled = isIp && !isEmpty; - */ - var anonymousRow = document.getElementById('wpAnonOnlyRow'); - anonymousRow.style.display = (!isIp && !isEmpty) ? 'none' : ''; + if( anonymousRow ) { + anonymousRow.style.display = (!isIp && !isEmpty) ? 'none' : ''; + } var autoblockRow = document.getElementById('wpEnableAutoblockRow'); - autoblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + if( autoblockRow ) { + autoblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + } var emailblockRow = document.getElementById('wpEnableEmailBan'); - emailblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + if( emailblockRow ) { + emailblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + } - var emailblockRow = document.getElementById('wpEnableHideUser'); - emailblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + var hideuserRow = document.getElementById('wpEnableHideUser'); + if( hideuserRow ) { + hideuserRow.style.display = isIp && !isEmpty ? 'none' : ''; + } } -- 2.20.1