Foundry: Added an additional span in the HTML for the filterControls

git-svn-id: https://svn.libreccm.org/ccm/trunk@3563 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-08-10 18:09:26 +00:00
parent 0c962effa9
commit 6904c2ad79
1 changed files with 85 additions and 84 deletions

View File

@ -78,7 +78,7 @@
</xsl:template> </xsl:template>
<xsl:template match="filterControls/filters" <xsl:template match="filterControls/filters"
name="filterControlsFiltersBody"> name="filterControlsFiltersBody">
<fieldset> <fieldset>
<legend> <legend>
<xsl:value-of select="foundry:get-static-text('filter-controls', <xsl:value-of select="foundry:get-static-text('filter-controls',
@ -260,89 +260,90 @@
</label> </label>
<xsl:choose> <xsl:choose>
<xsl:when test="./multiple = 'true'"> <xsl:when test="./multiple = 'true'">
<xsl:element name="input"> <span class="category-input">
<xsl:attribute name="type">text</xsl:attribute> <xsl:element name="input">
<xsl:attribute name="size">42</xsl:attribute> <xsl:attribute name="type">text</xsl:attribute>
<xsl:attribute name="class">selectedCategories</xsl:attribute> <xsl:attribute name="size">42</xsl:attribute>
<xsl:attribute name="maxlength">1024</xsl:attribute> <xsl:attribute name="class">selectedCategories</xsl:attribute>
<xsl:attribute name="id"> <xsl:attribute name="maxlength">1024</xsl:attribute>
<xsl:value-of select="concat(./@label, 'Filter')"/> <xsl:attribute name="id">
</xsl:attribute> <xsl:value-of select="concat(./@label, 'Filter')"/>
<xsl:attribute name="name"> </xsl:attribute>
<xsl:value-of select="./@label"/> <xsl:attribute name="name">
</xsl:attribute> <xsl:value-of select="./@label"/>
<xsl:attribute name="value"> </xsl:attribute>
<xsl:value-of select="./searchString"/> <xsl:attribute name="value">
</xsl:attribute> <xsl:value-of select="./searchString"/>
<xsl:attribute name="style"> </xsl:attribute>
<xsl:value-of select="'display:none'"/> <xsl:attribute name="style">
</xsl:attribute> <xsl:value-of select="'display:none'"/>
</xsl:element> </xsl:attribute>
<span class="selectedCategories"> </xsl:element>
<xsl:attribute name="id"> <span class="selectedCategories">
<xsl:value-of select="concat(./@label, 'SelectedKeywords')"/> <xsl:attribute name="id">
</xsl:attribute> <xsl:value-of select="concat(./@label, 'SelectedKeywords')"/>
<xsl:for-each select="./categories//category[@selected='selected']"> </xsl:attribute>
<span> <xsl:for-each select="./categories//category[@selected='selected']">
<xsl:attribute name="id"> <span>
<!--<xsl:value-of select="concat(../../../../@customName, ../../@label, 'Filter', 'Selected', translate(current(), ' ', '_'))"/>--> <xsl:attribute name="id">
<xsl:value-of select="concat($filterId, 'Selected', @id)"/> <!--<xsl:value-of select="concat(../../../../@customName, ../../@label, 'Filter', 'Selected', translate(current(), ' ', '_'))"/>-->
</xsl:attribute> <xsl:value-of select="concat($filterId, 'Selected', @id)"/>
<xsl:value-of select="."/>
<a>
<xsl:attribute name="href">
<xsl:value-of select="'#'"/>
</xsl:attribute> </xsl:attribute>
<xsl:text>&Cross;</xsl:text> <xsl:value-of select="."/>
</a> <a>
<script type="text/javascript"> <xsl:attribute name="href">
$("#<xsl:value-of select="concat($filterId, 'Selected', @id)"/>").click(function() { <xsl:value-of select="'#'"/>
removeSelectedCategory($("#<xsl:value-of select="concat($filterId, 'Selected', @id)"/>"), </xsl:attribute>
"<xsl:value-of select="$filterId"/>", <xsl:text>&Cross;</xsl:text>
"<xsl:value-of select="concat(@id, ../separator)"/>"); </a>
return false; <script type="text/javascript">
}); $("#<xsl:value-of select="concat($filterId, 'Selected', @id)"/>").click(function() {
</script> removeSelectedCategory($("#<xsl:value-of select="concat($filterId, 'Selected', @id)"/>"),
</span> "<xsl:value-of select="$filterId"/>",
</xsl:for-each> "<xsl:value-of select="concat(@id, ../separator)"/>");
return false;
});
</script>
</span>
</xsl:for-each>
</span>
<select size="1" class="availableCategories">
<xsl:attribute name="id">
<xsl:value-of select="concat(./@label, 'AvailableCategories')"/>
</xsl:attribute>
<option value=""></option>
<xsl:for-each select="./categories/*">
<xsl:choose>
<xsl:when test="name() = 'categoryGroup'">
<optgroup>
<xsl:attribute name="label">
<xsl:value-of select="./@label"/>
</xsl:attribute>
<xsl:for-each select="./category">
<option>
<xsl:if test="./@selected = 'selected'">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:attribute name="value">
<xsl:value-of select="./@id"/>
</xsl:attribute>
<xsl:value-of select="."/>
</option>
</xsl:for-each>
</optgroup>
</xsl:when>
<xsl:otherwise>
<option>
<xsl:attribute name="value">
<xsl:value-of select="./@id"/>
</xsl:attribute>
<xsl:value-of select="."/>
</option>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</select>
</span> </span>
<select size="1" class="availableCategories">
<xsl:attribute name="id">
<xsl:value-of select="concat(./@label, 'AvailableCategories')"/>
</xsl:attribute>
<option value=""></option>
<xsl:for-each select="./categories/*">
<xsl:choose>
<xsl:when test="name() = 'categoryGroup'">
<optgroup>
<xsl:attribute name="label">
<xsl:value-of select="./@label"/>
</xsl:attribute>
<xsl:for-each select="./category">
<option>
<xsl:if test="./@selected = 'selected'">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:attribute name="value">
<xsl:value-of select="./@id"/>
</xsl:attribute>
<xsl:value-of select="."/>
</option>
</xsl:for-each>
</optgroup>
</xsl:when>
<xsl:otherwise>
<option>
<xsl:attribute name="value">
<xsl:value-of select="./@id"/>
</xsl:attribute>
<xsl:value-of select="."/>
</option>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</select>
<script type="text/javascript"> <script type="text/javascript">
$("#<xsl:value-of select="concat(./@label, 'AvailableCategories')"/>").change(function() { $("#<xsl:value-of select="concat(./@label, 'AvailableCategories')"/>").change(function() {
var catFilterId = "<xsl:value-of select="$filterId"/>"; var catFilterId = "<xsl:value-of select="$filterId"/>";
@ -394,8 +395,8 @@
<xsl:template name="filterControlsSortFields"> <xsl:template name="filterControlsSortFields">
<!-- <xsl:if test="count(./controls/sortFields/sortField) &gt; 1">--> <!-- <xsl:if test="count(./controls/sortFields/sortField) &gt; 1">-->
<!-- <code>sortFields</code>--> <!-- <code>sortFields</code>-->
<span> <span class="sortBy">
<label> <label>
<xsl:attribute name="for"> <xsl:attribute name="for">
<xsl:value-of select="concat(../../@customName, 'SortBy')"/> <xsl:value-of select="concat(../../@customName, 'SortBy')"/>
</xsl:attribute> </xsl:attribute>