[fusion-commits] r1458 - in trunk: lib widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Aug 12 16:17:15 EDT 2008
Author: madair
Date: 2008-08-12 16:17:15 -0400 (Tue, 12 Aug 2008)
New Revision: 1458
Modified:
trunk/lib/ApplicationDefinition.js
trunk/widgets/Legend.js
Log:
closes #102: don't add target attribute to anchor for javascript: URLs
Modified: trunk/lib/ApplicationDefinition.js
===================================================================
--- trunk/lib/ApplicationDefinition.js 2008-08-12 20:08:17 UTC (rev 1457)
+++ trunk/lib/ApplicationDefinition.js 2008-08-12 20:17:15 UTC (rev 1458)
@@ -386,13 +386,13 @@
if (extension.Links[0].Group instanceof Array) {
for (var j=0; j<extension.Links[0].Group.length; j++) {
var group = extension.Links[0].Group[j];
- links.groups.push({name:group.Name,url:group.Url});
+ links.groups.push({name:group.Name[0],url:group.Url[0]});
}
}
if (extension.Links[0].Layer instanceof Array) {
for (var j=0; j<extension.Links[0].Layer.length; j++) {
var layer = extension.Links[0].Layer[j];
- links.layers.push({name:layer.Name,url:layer.Url});
+ links.layers.push({name:layer.Name[0],url:layer.Url[0]});
}
}
}
Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js 2008-08-12 20:08:17 UTC (rev 1457)
+++ trunk/widgets/Legend.js 2008-08-12 20:17:15 UTC (rev 1458)
@@ -249,7 +249,9 @@
if (groupInfo) {
var a = document.createElement('a');
a.href = groupInfo;
- a.target = '_blank';
+ if (groupInfo.indexOf('javascript:') < 0) {
+ a.target = '_blank';
+ }
var img = document.createElement('img');
Jx.addToImgQueue({domElement:img, src: this.imgGroupInfoIcon});
img.border = 0;
@@ -429,7 +431,9 @@
if (layerInfo) {
var a = document.createElement('a');
a.href = layerInfo;
- a.target = '_blank';
+ if (layerInfo.indexOf('javascript:') < 0) {
+ a.target = '_blank';
+ }
var img = document.createElement('img');
Jx.addToImgQueue({domElement:img, src:this.imgLayerInfoIcon});
img.border = 0;
@@ -473,7 +477,9 @@
if (layerInfo) {
var a = document.createElement('a');
a.href = layerInfo;
- a.target = '_blank';
+ if (layerInfo.indexOf('javascript:') < 0) {
+ a.target = '_blank';
+ }
var img = document.createElement('img');
Jx.addToImgQueue({domElement:img, src: this.imgLayerInfoIcon});
img.border = 0;
More information about the fusion-commits
mailing list