From: <pva...@us...> - 2009-04-30 14:13:52
|
Revision: 3404 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=3404&view=rev Author: pvalsecc Date: 2009-04-30 14:13:41 +0000 (Thu, 30 Apr 2009) Log Message: ----------- Some progress on the metadata maps Modified Paths: -------------- sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/MapComponent.js sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/MapDrawComponent.js sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/searchTools.js sandbox/geocat.ch/trunk/web/geonetwork/xsl/metadata-iso19139.xsl Modified: sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/MapComponent.js =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/MapComponent.js 2009-04-30 13:46:28 UTC (rev 3403) +++ sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/MapComponent.js 2009-04-30 14:13:41 UTC (rev 3404) @@ -7,6 +7,9 @@ this.style.display = "none"; }; +OpenLayers.DOTS_PER_INCH = 254; +Ext.BLANK_IMAGE_URL = window.gMfLocation + '../ext/resources/images/default/s.gif'; +OpenLayers.IMAGE_RELOAD_ATTEMPTS = 1; /** * Class: MapComponent @@ -83,11 +86,6 @@ }) ]; - - Ext.BLANK_IMAGE_URL = window.gMfLocation + '../ext/resources/images/default/s.gif'; - OpenLayers.DOTS_PER_INCH = 254; - OpenLayers.IMAGE_RELOAD_ATTEMPTS = 1; - this.map = this.getMap(); if (this.drawPanel) { this.panel = this.getPanel(); Modified: sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/MapDrawComponent.js =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/MapDrawComponent.js 2009-04-30 13:46:28 UTC (rev 3403) +++ sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/MapDrawComponent.js 2009-04-30 14:13:41 UTC (rev 3404) @@ -105,7 +105,7 @@ }); } - if (this.activate || !this.toolbar && this.controls.length) this.controls[0].activate(); + if ((this.activate || !this.toolbar) && this.controls && this.controls.length) this.controls[0].activate(); }, Modified: sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/searchTools.js =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/searchTools.js 2009-04-30 13:46:28 UTC (rev 3403) +++ sandbox/geocat.ch/trunk/web/geonetwork/scripts/mapfishIntegration/searchTools.js 2009-04-30 14:13:41 UTC (rev 3404) @@ -480,31 +480,38 @@ for (var idx=0; idx<viewers.length; ++idx) { var viewer = viewers[idx]; - var children + + var edit = viewer.getAttribute("edit")=='true'; + + var children; if( Ext ) children = viewer.childNodes else children = viewer.childElements(); var tmp = []; for( var i=0; i < children.length; i++){ - if(children[i].localName !=null ){ - tmp.push(children[i]); - } + if(children[i].localName !=null ){ + tmp.push(children[i]); + } } - children = tmp + children = tmp; if( children.length > 1 ) continue; // Creates map component - var id + var id; if( Ext ) { - id=Ext.id(viewer); + id = Ext.id(viewer); }else{ - id = viewer.identify(); + id = viewer.identify(); } - var mapCmp = new MapComponent(id, {displayLayertree: false}); + var mapCmp = new MapComponent(id, { + panelWidth: edit?650:400, + drawPanel: edit, + displayLayertree: false + }); var drawCmp = new MapDrawComponent(mapCmp.map, { toolbar: mapCmp.toolbar, hideDrawControls: true, @@ -520,7 +527,7 @@ options.to=searchTools.ch03; if( Ext ) { - id=Ext.id(children[0]); + id = Ext.id(children[0]); }else{ id = children[0].identify(); } Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/metadata-iso19139.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/metadata-iso19139.xsl 2009-04-30 13:46:28 UTC (rev 3403) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/metadata-iso19139.xsl 2009-04-30 14:13:41 UTC (rev 3404) @@ -205,13 +205,14 @@ <xsl:with-param name="schema" select="$schema" /> <xsl:with-param name="edit" select="$edit" /> <xsl:with-param name="content"> - <td class="padded" align="center"> - <xsl:variable name="replaceComma" select="util:takeUntil(util:replace(string(.),',',' '), ';\Z')"/> - <xsl:variable name="geom" select="concat('Polygon((',util:replace($replaceComma,';',','),'))')"/> - <xsl:call-template name="showMap"> - <xsl:with-param name="coords" select="$geom"/> - </xsl:call-template> - </td> + <td class="padded" align="center"> + <xsl:variable name="replaceComma" select="util:takeUntil(util:replace(string(.),',',' '), ';\Z')"/> + <xsl:variable name="geom" select="concat('Polygon((',util:replace($replaceComma,';',','),'))')"/> + <xsl:call-template name="showMap"> + <xsl:with-param name="edit" select="$edit" /> + <xsl:with-param name="coords" select="$geom"/> + </xsl:call-template> + </td> </xsl:with-param> </xsl:apply-templates> </xsl:template> @@ -1485,6 +1486,7 @@ <xsl:variable name="geom" > <xsl:value-of select="concat('Polygon((', $w, ' ', $s,',',$e,' ',$s,',',$e,' ',$n,',',$w,' ',$n,',',$w,' ',$s, '))')"/></xsl:variable> <xsl:call-template name="showMap"> + <xsl:with-param name="edit" select="$edit" /> <xsl:with-param name="coords" select="$geom"/> </xsl:call-template> </td> @@ -3262,8 +3264,9 @@ </xsl:template> <xsl:template name="showMap"> + <xsl:param name="edit" /> <xsl:param name="coords"/> - <div class="extentViewer" > + <div class="extentViewer" style="width:400px; height:300px;" edit="{$edit}"> <div id="{$coords}" /> </div> </xsl:template> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |