[fusion-commits] r1929 - in trunk: text widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Oct 2 15:03:56 EDT 2009
Author: madair
Date: 2009-10-02 15:03:55 -0400 (Fri, 02 Oct 2009)
New Revision: 1929
Modified:
trunk/text/en.json
trunk/text/fr.json
trunk/widgets/Maptip.js
Log:
closes #233: get link text from i18n files and use the OpenLInk method to open the window so that winFeatures value can be specified
Modified: trunk/text/en.json
===================================================================
--- trunk/text/en.json 2009-10-02 17:57:46 UTC (rev 1928)
+++ trunk/text/en.json 2009-10-02 19:03:55 UTC (rev 1929)
@@ -49,6 +49,7 @@
'printCancel': 'Cancel',
'printGenerate': 'Generate',
'zoomRect': 'Zoom Rectangle',
+'maptipLinkText': 'Click for more information',
'end': ''
};
Modified: trunk/text/fr.json
===================================================================
--- trunk/text/fr.json 2009-10-02 17:57:46 UTC (rev 1928)
+++ trunk/text/fr.json 2009-10-02 19:03:55 UTC (rev 1929)
@@ -48,6 +48,7 @@
'zoomIn': 'Cliquer pour agrandir',
'printCancel': 'Cancel',
'printGenerate': 'Generate',
+'maptipLinkText': 'Cliquer pour plus d'information',
'end': ''
};
Modified: trunk/widgets/Maptip.js
===================================================================
--- trunk/widgets/Maptip.js 2009-10-02 17:57:46 UTC (rev 1928)
+++ trunk/widgets/Maptip.js 2009-10-02 19:03:55 UTC (rev 1929)
@@ -243,9 +243,11 @@
mapTipContent.innerHTML = hyperlink
} else {
var anchor = document.createElement('A');
- anchor.href = hyperlink;
+ var openLink = OpenLayers.Function.bind(this.openLink, this, hyperlink);
+ anchor.onclick = OpenLayers.Function.bindAsEventListener(openLink, this);
anchor.target = "_blank";
- anchor.innerHTML = hyperlink;
+ anchor.href = 'javascript:void(0)';
+ anchor.innerHTML = OpenLayers.i18n('maptipLinkText');
mapTipContent.appendChild(anchor);
}
contentDiv.appendChild(mapTipContent);
More information about the fusion-commits
mailing list