From: <fxp...@us...> - 2011-01-13 10:46:33
|
Revision: 7145 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=7145&view=rev Author: fxprunayre Date: 2011-01-13 10:46:27 +0000 (Thu, 13 Jan 2011) Log Message: ----------- Fix reset for simple and advanced search. Fix output parameter. Fix sort order for hitsPerPage parameter. Set title, keywords and logo element only for text only output (differences with full was only the thumbnail). Modified Paths: -------------- trunk/web/src/main/webapp/scripts/gn_search.js trunk/web/src/main/webapp/xsl/search-results-xhtml.xsl trunk/web/src/main/webapp/xsl/searchform_advanced.xsl trunk/web/src/main/webapp/xsl/searchform_simple_template.xsl Modified: trunk/web/src/main/webapp/scripts/gn_search.js =================================================================== --- trunk/web/src/main/webapp/scripts/gn_search.js 2011-01-13 10:13:25 UTC (rev 7144) +++ trunk/web/src/main/webapp/scripts/gn_search.js 2011-01-13 10:46:27 UTC (rev 7145) @@ -108,8 +108,8 @@ setParam(form['sortBy'], 'relevance'); setParam(form['sortOrder'], ''); - setParam(form['hitsPerPage'], '10'); - setParam(form['output'], 'full'); + setParam(form['hitsPerPage_simple'], '10'); + setParam(form['output_simple'], 'full'); } Modified: trunk/web/src/main/webapp/xsl/search-results-xhtml.xsl =================================================================== --- trunk/web/src/main/webapp/xsl/search-results-xhtml.xsl 2011-01-13 10:13:25 UTC (rev 7144) +++ trunk/web/src/main/webapp/xsl/search-results-xhtml.xsl 2011-01-13 10:46:27 UTC (rev 7145) @@ -420,6 +420,7 @@ </xsl:choose> </div> + <xsl:if test="/root/gui/searchDefaults/output = 'full'"> <!-- abstract --> <xsl:if test="$metadata/abstract"> <div class="hittext_middle"> @@ -437,11 +438,12 @@ </div> </div> </xsl:if> - + </xsl:if> + <!-- keywords --> <xsl:if test="$metadata/keyword"> <xsl:variable name="keywords"> - <xsl:for-each select="$metadata/keyword"> + <xsl:for-each select="$metadata/keyword"> <xsl:if test="position() > 1">, </xsl:if> <xsl:value-of select="."/> </xsl:for-each> @@ -463,6 +465,7 @@ </div> </xsl:if> + <xsl:if test="/root/gui/searchDefaults/output = 'full'"> <!-- schema --> <xsl:if test="$metadata/geonet:info/schema"> <div class="hittext_middle"> @@ -472,7 +475,7 @@ </div> </div> </xsl:if> - + <xsl:if test="normalize-space($metadata/geoBox) or $metadata/temporalExtent"> <div class="hittext_middle"> <div class="caption"><xsl:value-of select="/root/gui/strings/extent"/></div> @@ -493,6 +496,8 @@ </div> </div> </xsl:if> + </xsl:if> + </div> </div> Modified: trunk/web/src/main/webapp/xsl/searchform_advanced.xsl =================================================================== --- trunk/web/src/main/webapp/xsl/searchform_advanced.xsl 2011-01-13 10:13:25 UTC (rev 7144) +++ trunk/web/src/main/webapp/xsl/searchform_advanced.xsl 2011-01-13 10:46:27 UTC (rev 7145) @@ -130,7 +130,8 @@ <span class="labelField"><xsl:value-of select="/root/gui/strings/hitsPerPage"/></span> <select class="content" id="hitsPerPage" name="hitsPerPage" onchange="$('hitsPerPage_simple').value = this.options[this.selectedIndex].value"> <xsl:for-each select="/root/gui/strings/hitsPerPageChoice"> - <option> + <xsl:sort select="@value" data-type="number"/> + <option> <xsl:if test="string(@value)=string(/root/gui/searchDefaults/hitsPerPage)"> <xsl:attribute name="selected">selected</xsl:attribute> @@ -148,7 +149,7 @@ <div class="row"> <span class="labelField"><xsl:value-of select="/root/gui/strings/output"/></span> - <select id="output" size="1" class="content" onchange="$('output_simple').value = this.options[this.selectedIndex].value"> + <select id="output" name="output" size="1" class="content" onchange="$('output_simple').value = this.options[this.selectedIndex].value"> <xsl:for-each select="/root/gui/strings/outputType"> <option value="{@id}"> <xsl:if test="@id = /root/gui/searchDefaults/output"> @@ -1087,8 +1088,9 @@ <span class="labelField"><xsl:value-of select="/root/gui/strings/hitsPerPage"/></span> <select class="content" id="hitsPerPage" name="hitsPerPage"> <xsl:for-each select="/root/gui/strings/hitsPerPageChoice"> + <xsl:sort select="@value" data-type="number"/> <option> - <xsl:if test="string(@value)=string(/root/gui/searchDefaults/hitsPerPage)"> + <xsl:if test="string(@value)=string(/root/gui/searchDefaults/hitsPerPage)"> <xsl:attribute name="selected"/> </xsl:if> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> Modified: trunk/web/src/main/webapp/xsl/searchform_simple_template.xsl =================================================================== --- trunk/web/src/main/webapp/xsl/searchform_simple_template.xsl 2011-01-13 10:13:25 UTC (rev 7144) +++ trunk/web/src/main/webapp/xsl/searchform_simple_template.xsl 2011-01-13 10:46:27 UTC (rev 7145) @@ -126,9 +126,10 @@ <!-- hits per page - - - - - - - - - - - - - - - - - - --> <div class="row"> <!-- div row--> <span class="labelField"><xsl:value-of select="/root/gui/strings/hitsPerPage"/></span> - <select id="hitsPerPage_simple" size="1" class="content" onchange="$('hitsPerPage').value = this.options[this.selectedIndex].value"> + <select id="hitsPerPage_simple" size="1" class="content" name="hitsPerPage" onchange="$('hitsPerPage').value = this.options[this.selectedIndex].value"> <xsl:for-each select="/root/gui/strings/hitsPerPageChoice"> + <xsl:sort select="@value" data-type="number"/> <option value="{@value}"> <xsl:if test="@value = /root/gui/searchDefaults/hitsPerPage"> <xsl:attribute name="selected">selected</xsl:attribute> @@ -142,10 +143,11 @@ <!-- output - - - - - - - - - - - - - - - - - - - - - - --> <div class="row"> <!-- div row--> <span class="labelField"><xsl:value-of select="/root/gui/strings/output"/></span> - <select id="output_simple" size="1" class="content" onchange="$('output').value = this.options[this.selectedIndex].value"> + <select id="output_simple" size="1" class="content" name="output" onchange="$('output').value = this.options[this.selectedIndex].value"> <xsl:for-each select="/root/gui/strings/outputType"> <option value="{@id}"> - <xsl:if test="@id = /root/gui/searchDefaults/output"> + <xsl:if test="(/root/gui/searchDefaults/output and @id = /root/gui/searchDefaults/output) + or @default = 'true'"> <xsl:attribute name="selected">selected</xsl:attribute> </xsl:if> <xsl:value-of select="."/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |