From ee326b94404961c87e389be259b8a359e1bb800c Mon Sep 17 00:00:00 2001 From: crschmidt Date: Fri, 29 Jun 2007 09:54:20 +0000 Subject: [PATCH] Commit patch for #788, "Control displayClass is not correct if CLASS_NAME contains >= 2 periods" from fredj, who is a wonderful contributor who not only wrote code, and tests, but upgraded all the existing control tests, because he is just that full of awesome. (Thanks Fred!) git-svn-id: http://svn.openlayers.org/trunk/openlayers@3534 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Control.js | 2 +- tests/Control/test_KeyboardDefaults.html | 3 ++- tests/Control/test_LayerSwitcher.html | 3 ++- tests/Control/test_NavToolbar.html | 3 ++- tests/Control/test_OverviewMap.html | 9 +++++---- tests/Control/test_PanZoom.html | 3 ++- tests/Control/test_PanZoomBar.html | 3 ++- tests/Control/test_Panel.html | 3 ++- tests/Control/test_Permalink.html | 3 ++- tests/Control/test_Scale.html | 3 ++- 10 files changed, 22 insertions(+), 13 deletions(-) diff --git a/lib/OpenLayers/Control.js b/lib/OpenLayers/Control.js index 6ccd490c37..d55be78bc7 100644 --- a/lib/OpenLayers/Control.js +++ b/lib/OpenLayers/Control.js @@ -52,7 +52,7 @@ OpenLayers.Control.prototype = { // We do this before the extend so that instances can override // className in options. this.displayClass = - this.CLASS_NAME.replace("OpenLayers.", "ol").replace(".",""); + this.CLASS_NAME.replace("OpenLayers.", "ol").replace(/\./g, ""); OpenLayers.Util.extend(this, options); diff --git a/tests/Control/test_KeyboardDefaults.html b/tests/Control/test_KeyboardDefaults.html index c8cb53c5c8..7c44ff4b2d 100644 --- a/tests/Control/test_KeyboardDefaults.html +++ b/tests/Control/test_KeyboardDefaults.html @@ -4,11 +4,12 @@