Permalink
Browse files

Merge pull request #74 from ianwallen/2.8.x

Cherry pick changes from master for the 2.8.1 release
  • Loading branch information...
2 parents 354feb8 + dddbaa4 commit c9e681484ae4ba3bb53ccb99ee24887eb5db20b0 @jesseeichar jesseeichar committed Feb 27, 2013
View
1 web/src/main/webapp/WEB-INF/config-gui.xml
@@ -186,6 +186,7 @@
<!-- Add an option to be able to toggle all fieldsets
in view and edit mode. -->
<metadata-view-toggleTab/>
+ <metadata-show showMapPanel="true"/>
<!-- Actions configuration
-->
View
12 ...main/webapp/WEB-INF/data/config/schema_plugins/iso19139/templates/vector-multilingual.xml
@@ -186,22 +186,22 @@
<gco:CharacterString>The ISO19115 metadata standard is the preferred metadata standard to use. This template is multilingual with a default language set to english. Other language could be used to translate part of the metadata record. Main language is define in metadata section. Other languages could be added to metadata section / locale element.</gco:CharacterString>
<gmd:PT_FreeText>
<gmd:textGroup>
- <gmd:LocalisedCharacterString locale="#CH">元数据标准的ISO19115是首选元数据标准使用。这个模板是多语种的默认语言设置为英语。其他语言可以用来翻译部分的元数据记录。主要语言是界定元一节。其他语言可以增加元数据节/地区因素。</gmd:LocalisedCharacterString>
+ <gmd:LocalisedCharacterString locale="#CHI">元数据标准的ISO19115是首选元数据标准使用。这个模板是多语种的默认语言设置为英语。其他语言可以用来翻译部分的元数据记录。主要语言是界定元一节。其他语言可以增加元数据节/地区因素。</gmd:LocalisedCharacterString>
</gmd:textGroup>
<gmd:textGroup>
- <gmd:LocalisedCharacterString locale="#AR">فإن معيار ISO19115 الفوقية هو المفضل لاستخدام البيانات الوصفية القياسية. هذا القالب هو متعدد اللغات مع اللغة الافتراضية لمجموعة الانجليزية. لغة أخرى يمكن استخدامها لتحويل جزء من الفوقية. اللغة الرئيسية هي تحديد الفوقية في هذا الباب. لغات أخرى يمكن أن تضاف إلى الباب الفوقية / عنصر المكان.</gmd:LocalisedCharacterString>
+ <gmd:LocalisedCharacterString locale="#ARA">فإن معيار ISO19115 الفوقية هو المفضل لاستخدام البيانات الوصفية القياسية. هذا القالب هو متعدد اللغات مع اللغة الافتراضية لمجموعة الانجليزية. لغة أخرى يمكن استخدامها لتحويل جزء من الفوقية. اللغة الرئيسية هي تحديد الفوقية في هذا الباب. لغات أخرى يمكن أن تضاف إلى الباب الفوقية / عنصر المكان.</gmd:LocalisedCharacterString>
</gmd:textGroup>
<gmd:textGroup>
- <gmd:LocalisedCharacterString locale="#RU">В метаданных стандарта ISO19115 предпочтительным является стандарт метаданных для использования. Этот шаблон многоязычный с языком по умолчанию установлен на английском языке. Другие языки могут использоваться для перевода части метаданных записи. Основным языком является определение метаданных разделе. Другие языки могут быть добавлены метаданные раздел / локаль элемент.</gmd:LocalisedCharacterString>
+ <gmd:LocalisedCharacterString locale="#RUS">В метаданных стандарта ISO19115 предпочтительным является стандарт метаданных для использования. Этот шаблон многоязычный с языком по умолчанию установлен на английском языке. Другие языки могут использоваться для перевода части метаданных записи. Основным языком является определение метаданных разделе. Другие языки могут быть добавлены метаданные раздел / локаль элемент.</gmd:LocalisedCharacterString>
</gmd:textGroup>
<gmd:textGroup>
- <gmd:LocalisedCharacterString locale="#SP">El estándar de metadatos ISO19115 es el estándar de metadatos a utilizar. Esta plantilla es multilingüe, con un idioma por defecto configurado en Inglés. En otros idiomas puede ser usado para traducir parte del registro de metadatos. Idioma principal es definir los metadatos en la sección. Otros idiomas pueden ser añadidos a la sección de metadatos / locale elemento.</gmd:LocalisedCharacterString>
+ <gmd:LocalisedCharacterString locale="#SPA">El estándar de metadatos ISO19115 es el estándar de metadatos a utilizar. Esta plantilla es multilingüe, con un idioma por defecto configurado en Inglés. En otros idiomas puede ser usado para traducir parte del registro de metadatos. Idioma principal es definir los metadatos en la sección. Otros idiomas pueden ser añadidos a la sección de metadatos / locale elemento.</gmd:LocalisedCharacterString>
</gmd:textGroup>
<gmd:textGroup>
- <gmd:LocalisedCharacterString locale="#GE">Die ISO19115 Metadaten-Standard ist der bevorzugte Metadaten-Standard zu verwenden. Diese Vorlage ist mehrsprachig mit einer Standard-Sprache auf Englisch. Andere Sprache verwendet werden könnten, um Teil der Metadaten werden. Sprache definieren, ist in Abschnitt Metadaten. Weitere Sprachen können hinzugefügt werden, um Metadaten Abschnitt / locale Element.</gmd:LocalisedCharacterString>
+ <gmd:LocalisedCharacterString locale="#GER">Die ISO19115 Metadaten-Standard ist der bevorzugte Metadaten-Standard zu verwenden. Diese Vorlage ist mehrsprachig mit einer Standard-Sprache auf Englisch. Andere Sprache verwendet werden könnten, um Teil der Metadaten werden. Sprache definieren, ist in Abschnitt Metadaten. Weitere Sprachen können hinzugefügt werden, um Metadaten Abschnitt / locale Element.</gmd:LocalisedCharacterString>
</gmd:textGroup>
<gmd:textGroup>
- <gmd:LocalisedCharacterString locale="#FR">La norme de métadonnées ISO19115 est la norme de métadonnées à utiliser. Ce modèle est multilingue avec une langue par défaut en anglais. D'autres langues pourraient être utilisées pour traduire une partie de la de métadonnées. La langue principale est de définir dans la section des métadonnées. D'autres langues pourraient être ajoutées à la section des métadonnées / locale élément.</gmd:LocalisedCharacterString>
+ <gmd:LocalisedCharacterString locale="#FRE">La norme de métadonnées ISO19115 est la norme de métadonnées à utiliser. Ce modèle est multilingue avec une langue par défaut en anglais. D'autres langues pourraient être utilisées pour traduire une partie de la de métadonnées. La langue principale est de définir dans la section des métadonnées. D'autres langues pourraient être ajoutées à la section des métadonnées / locale élément.</gmd:LocalisedCharacterString>
</gmd:textGroup>
</gmd:PT_FreeText>
</gmd:abstract>
View
25 web/src/main/webapp/xsl/main-page.xsl
@@ -18,16 +18,6 @@
-->
<xsl:template mode="script" match="/">
- <!-- To avoid an interaction with prototype and ExtJs.Tooltip, should be loadded before ExtJs -->
- <xsl:choose>
- <xsl:when test="/root/request/debug">
- <script type="text/javascript" src="{/root/gui/url}/scripts/prototype.js"/><xsl:text>&#10;</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <script type="text/javascript" src="{/root/gui/url}/scripts/lib/gn.libs.js"/><xsl:text>&#10;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
-
<xsl:call-template name="geoHeader"/>
<!-- Required by keyword selection panel -->
@@ -37,10 +27,6 @@
<xsl:choose>
<xsl:when test="/root/request/debug">
- <script type="text/javascript" src="{/root/gui/url}/scripts/geonetwork.js"/><xsl:text>&#10;</xsl:text>
- <script type="text/javascript" src="{/root/gui/url}/scripts/scriptaculous/scriptaculous.js?load=slider,effects,controls"/><xsl:text>&#10;</xsl:text>
- <script type="text/javascript" src="{/root/gui/url}/scripts/modalbox.js"/><xsl:text>&#10;</xsl:text>
-
<script type="text/javascript" src="{/root/gui/url}/scripts/gn_search.js"/><xsl:text>&#10;</xsl:text>
<!--link rel="stylesheet" type="text/css" href="{/root/gui/url}/scripts/ext/resources/css/ext-all.css" />
@@ -49,15 +35,6 @@
<link rel="stylesheet" type="text/css" href="{/root/gui/url}/scripts/openlayers/theme/default/style.css"/>
<link rel="stylesheet" type="text/css" href="{/root/gui/url}/geonetwork_map.css" /-->
- <script type="text/javascript" src="{/root/gui/url}/scripts/ext/adapter/ext/ext-base.js"/><xsl:text>&#10;</xsl:text>
- <script type="text/javascript" src="{/root/gui/url}/scripts/ext/ext-all.js"/><xsl:text>&#10;</xsl:text>
- <script type="text/javascript" src="{/root/gui/url}/scripts/ext/form/FileUploadField.js"/><xsl:text>&#10;</xsl:text>
-
- <script type="text/javascript" src="{/root/gui/url}/scripts/openlayers/OpenLayers.js"/><xsl:text>&#10;</xsl:text>
- <script type="text/javascript" src="{/root/gui/url}/scripts/openlayers/addins/LoadingPanel.js"/><xsl:text>&#10;</xsl:text>
- <script type="text/javascript" src="{/root/gui/url}/scripts/openlayers/addins/ScaleBar.js"/><xsl:text>&#10;</xsl:text>
- <script type="text/javascript" src="{/root/gui/url}/scripts/geo/proj4js-compressed.js"/><xsl:text>&#10;</xsl:text>
-
<script type="text/javascript" src="{/root/gui/url}/scripts/geoext/lib/GeoExt.js"/><xsl:text>&#10;</xsl:text>
<script type="text/javascript" src="{/root/gui/url}/scripts/mapfish/MapFish.js"/><xsl:text>&#10;</xsl:text>
@@ -119,8 +96,6 @@
<script type="text/javascript" src="{/root/gui/url}/scripts/editor/metadata-editor.js"/><xsl:text>&#10;</xsl:text>
</xsl:when>
<xsl:otherwise>
- <script type="text/javascript" src="{/root/gui/url}/scripts/lib/gn.libs.scriptaculous.js"/><xsl:text>&#10;</xsl:text>
- <script type="text/javascript" src="{/root/gui/url}/scripts/lib/gn.js"/><xsl:text>&#10;</xsl:text>
<script type="text/javascript" src="{/root/gui/url}/scripts/lib/gn.search.js"/><xsl:text>&#10;</xsl:text>
<!-- Editor JS is still required here at least for batch operation -->
View
271 web/src/main/webapp/xsl/metadata-show.xsl
@@ -6,7 +6,7 @@
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gco="http://www.isotc211.org/2005/gco"
exclude-result-prefixes="gco gmd dc exslt geonet"
- >
+ >
<!--
show metadata form
@@ -15,11 +15,12 @@
<xsl:include href="main.xsl"/>
<xsl:include href="metadata.xsl"/>
- <xsl:variable name="protocol" select="/root/gui/env/server/protocol" />
+ <xsl:variable name="protocol" select="/root/gui/env/server/protocol" />
<xsl:variable name="host" select="/root/gui/env/server/host" />
<xsl:variable name="port" select="/root/gui/env/server/port" />
<xsl:variable name="baseURL" select="concat($protocol,'://',$host,':',$port,/root/gui/url)" />
<xsl:variable name="serverUrl" select="concat($protocol,'://',$host,':',$port,/root/gui/locService)" />
+ <xsl:variable name="showMap" select="/root/gui/config/metadata-show/@showMapPanel" />
<xsl:template mode="css" match="/">
<xsl:if test="$currTab!='xml'">
@@ -32,28 +33,264 @@
additional scripts
-->
<xsl:template mode="script" match="/">
- <script type="text/javascript" src="{/root/gui/url}/scripts/core/kernel/kernel.js"/>
+
<xsl:call-template name="geoHeader"/>
- <xsl:call-template name="jsHeader">
- <xsl:with-param name="small" select="false()"/>
- </xsl:call-template>
+ <xsl:call-template name="ext-ux"/>
<xsl:choose>
- <xsl:when test="/root/request/debug">
- <script type="text/javascript" src="{/root/gui/url}/scripts/editor/metadata-show.js"></script>
- <script type="text/javascript" src="{/root/gui/url}/scripts/editor/metadata-editor.js"></script>
- <script type="text/javascript" src="{/root/gui/url}/scripts/editor/simpletooltip.js"></script>
- </xsl:when>
- <xsl:otherwise>
- <script type="text/javascript" src="{/root/gui/url}/scripts/lib/gn.editor.js"></script>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:when test="/root/request/debug">
+ <script type="text/javascript" src="{/root/gui/url}/scripts/gn_search.js"/><xsl:text>&#10;</xsl:text>
+
+ <!--link rel="stylesheet" type="text/css" href="{/root/gui/url}/scripts/ext/resources/css/ext-all.css" />
+ <link rel="stylesheet" type="text/css" href="{/root/gui/url}/scripts/ext/resources/css/file-upload.css"/>
+
+ <link rel="stylesheet" type="text/css" href="{/root/gui/url}/scripts/openlayers/theme/default/style.css"/>
+ <link rel="stylesheet" type="text/css" href="{/root/gui/url}/geonetwork_map.css" /-->
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/geoext/lib/GeoExt.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/mapfish/MapFish.js"/><xsl:text>&#10;</xsl:text>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/core/OGCUtil.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/core/MapStateManager.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/core/CatalogueInterface.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/core/WMCManager.js"/><xsl:text>&#10;</xsl:text>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/Control/ExtentBox.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/Control/ZoomWheel.js"/><xsl:text>&#10;</xsl:text>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/de.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/en.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/es.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/fr.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/nl.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/no.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/fi.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/it.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/ca.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/lang/tr.js"/><xsl:text>&#10;</xsl:text>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/Ext.ux/form/DateTime.js"/><xsl:text>&#10;</xsl:text>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/tree/WMSListGenerator.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/tree/WMSTreeGenerator.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/wms/BrowserPanel.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/wms/LayerInfoPanel.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/wms/LayerStylesPanel.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/wms/PreviewPanel.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/wms/WMSLayerInfo.js"/><xsl:text>&#10;</xsl:text>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/FeatureInfoPanel.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/LegendPanel.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/OpacitySlider.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/PrintAction.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/ProjectionSelector.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/widgets/TimeSelector.js"/><xsl:text>&#10;</xsl:text>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/BaseWindow.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/SingletonWindowManager.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/AddWMS.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/FeatureInfo.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/Opacity.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/LoadWmc.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/WMSTime.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/LayerStyles.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/WmsLayerMetadata.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/map/windows/Disclaimer.js"/><xsl:text>&#10;</xsl:text>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/ol_settings.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/ol_minimap.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/ol_map.js"/><xsl:text>&#10;</xsl:text>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/editor/tooltip.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/editor/tooltip-manager.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/editor/simpletooltip.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/editor/metadata-show.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/editor/metadata-editor.js"/><xsl:text>&#10;</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/lib/gn.search.js"/><xsl:text>&#10;</xsl:text>
+
+ <!-- Editor JS is still required here at least for batch operation -->
+ <script type="text/javascript" src="{/root/gui/url}/scripts/lib/gn.editor.js"/><xsl:text>&#10;</xsl:text>
+ <script type="text/javascript" src="{/root/gui/url}/scripts/lib/gn.libs.map.js"/><xsl:text>&#10;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <script type="text/javascript" src="{/root/gui/url}/scripts/core/kernel/kernel.js"/><xsl:text>&#10;</xsl:text>
+
+ <xsl:variable name="urlWMS"><xsl:copy-of select="/root/request/url"/></xsl:variable>
+ <xsl:variable name="typeWMS"><xsl:copy-of select="/root/request/type"/></xsl:variable>
+
+
+<xsl:if test="$showMap!='false'">
+ <script type="text/javascript">
+
+ function init() {};
+
+
+ var getIMServiceURL = function(service){
+ // FIXME: the "/intermap/" context should be parametrized
+ return "/intermap/srv/"+Env.lang+"/"+service;
+ };
+
+
+ Ext.onReady(function(){
+
+ var GNCookie = new Ext.state.CookieProvider({
+ expires: new Date(new Date().getTime()+(1000*60*60*24*365))
+ //1 year from now
+ });
+
+ Ext.state.Manager.setProvider(GNCookie);
+
+ GeoNetwork.MapStateManager.loadMapState();
+
+ initMapViewer();
+ var mapViewport = GeoNetwork.mapViewer.getViewport();
+
+ var viewport = new Ext.Panel({
+ region: 'center',
+ layout:'border',
+ border:false,
+ autoScroll:true,
+ items:[
+ // North: header
+ {
+ region:'north',
+ contentEl :'header',
+ border:false
+ },
+
+ // Center: Content
+ {
+ region:'center',
+ layout:'border',
+ border:false,
+ layoutConfig:{
+ animate:true
+ },
+ items:[
+ {region:'center',
+ border:false,
+ layout: 'border',
+ items:
+ [{region:'center',
+ id: 'main-viewport',
+ border:false,
+ layout: 'border',
+ items: [
+ {region:'north',
+ id: 'north-map-panel',
+ title: '<xsl:value-of select="/root/gui/strings/mapViewer"/>',
+ border:false,
+ collapsible: true,
+ collapsed: true,
+ split: true,
+ height: 450,
+ minSize: 300,
+ //maxSize: 500,
+ layout: 'fit',
+ listeners: {
+ collapse: collapseMap,
+ expand: expandMap
+ },
+ items: [mapViewport]
+
+ },
+ {region:'center',
+ contentEl :'content',
+ border:false,
+ autoScroll: true
+ }]
+ }]
+ }]
+ }]
+ });
+
+ mainViewport = new Ext.Viewport({
+ layout:'border',
+ border:false,
+ autoScroll: true,
+ items:[viewport]
+ });
+
+
+ <!-- If a WMS server & layername(s) are passed, it will be opened
+ in the map viewer the large map viewer will also be opened -->
+ var urlWMS="<xsl:value-of select="$urlWMS"/>";
+ var typeWMS="<xsl:value-of select="$typeWMS"/>";
+ servicesWMS = new Array();
+ <xsl:for-each select="/root/request/service">
+ <xsl:text>servicesWMS.push("</xsl:text><xsl:value-of select="."/><xsl:text>");</xsl:text>
+ </xsl:for-each>
+ if (urlWMS!='') {
+ if (servicesWMS.length!=null || servicesWMS.length>0) {
+ if (typeWMS!='') {
+ imc_addServices(urlWMS, servicesWMS, typeWMS, im_servicesAdded);
+ openIntermap();
+ }
+ }
+ }
+ });
+
+ function initMapViewer() {
+ var mapOptions = <xsl:value-of select='/root/gui/config/mapViewer/@options'/>;
+
+ // Load layers defined in config file
+ var layers = [];
+
+ <xsl:for-each select="/root/gui/config/mapViewer/layers/layer">
+ layers.push(["<xsl:value-of select='@tocName'/>","<xsl:value-of select='@server'/>",<xsl:value-of select='@params'/>, <xsl:value-of select='@options'/>]);
+ </xsl:for-each>
+
+ // Init projection list
+ <xsl:for-each select="/root/gui/config/mapViewer/proj/crs">
+ GeoNetwork.ProjectionList.push(["<xsl:value-of select='@code'/>","<xsl:value-of select='@name'/>"]);
+ </xsl:for-each>
+
+ // Init WMS server list
+ <xsl:for-each select="/root/gui/config/mapViewer/servers/server">
+ GeoNetwork.WMSList.push(["<xsl:value-of select='@name'/>","<xsl:value-of select='@url'/>"]);
+ </xsl:for-each>
+
+ var scales = <xsl:value-of select='/root/gui/config/mapViewer/scales/@values'/>;
+
+ // Initialize map viewer
+ GeoNetwork.mapViewer.init(backgroundLayers, mapOptions, scales);
+ GeoNetwork.CatalogueInterface.init(GeoNetwork.mapViewer.getMap());
+ GeoNetwork.MapStateManager.applyMapState(GeoNetwork.mapViewer.getMap());
+ }
+
+ function collapseMap(pnl) {
+ Ext.getCmp('main-viewport').layout.north.getCollapsedEl().titleEl.dom.innerHTML = '<xsl:value-of select="/root/gui/strings/showMap"/>';
+ }
+
+ function expandMap(pnl) {
+ Ext.getCmp('main-viewport').layout.north.getCollapsedEl().titleEl.dom.innerHTML = '<xsl:value-of select="/root/gui/strings/mapViewer"/>';
+ }
+
+ </script>
+ </xsl:if>
</xsl:template>
-
+
+ <xsl:template name="content">
+ <!-- Page content -->
+ <div id="content" >
+ <xsl:call-template name="pageContent"/>
+ </div>
+ <xsl:if test="$currTab!='xml'">
+ <!-- Map panel -->
+ <div id="map_container" style="overflow:hidden; clear: both;">
+ <div id="form_wmc" style="display:none"></div>
+ <div id="ol_map"></div>
+ </div>
+ </xsl:if>
+ </xsl:template>
+
<!--
page content
-->
- <xsl:template name="content">
+ <xsl:template name="pageContent">
<xsl:param name="schema">
<xsl:apply-templates mode="schema" select="."/>
</xsl:param>

0 comments on commit c9e6814

Please sign in to comment.