Included support for new label attribute at Bebop Widgets into Mandalay and the Heirloom theme.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2688 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
6cf2fb1d57
commit
17c183a25a
|
|
@ -94,6 +94,7 @@ public class ArticlePropertyForm extends GenericArticlePropertyForm
|
|||
TextArea lead = new TextArea(leadParam);
|
||||
lead.setCols(40);
|
||||
lead.setRows(5);
|
||||
lead.setLabel(GlobalizationUtil.globalize("cms.contenttypes.ui.lead"));
|
||||
lead.setHint(GlobalizationUtil.globalize("cms.contenttypes.ui.lead_hint"));
|
||||
add(lead);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,39 @@
|
|||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||
exclude-result-prefixes="xsl bebop"
|
||||
version="1.0">
|
||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||
exclude-result-prefixes="xsl bebop"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" indent="yes"/>
|
||||
<xsl:output method="html" indent="yes"/>
|
||||
|
||||
<xsl:template match="bebop:formWidget">
|
||||
<input>
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
</input>
|
||||
</xsl:template>
|
||||
<xsl:template match="bebop:formWidget">
|
||||
<xsl:if test="@label">
|
||||
<label for="{@name}">
|
||||
<xsl:value-of select="@label"/>
|
||||
</label>
|
||||
</xsl:if>
|
||||
<input>
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
</input>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="bebop:formWidget[@type='submit']">
|
||||
<input>
|
||||
<xsl:if test="boolean(@onclick) = false()">
|
||||
<xsl:attribute name="onclick">
|
||||
<xsl:text>dcp_hide(this);</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
</input>
|
||||
</xsl:template>
|
||||
<xsl:template match="bebop:formWidget[@type='submit']">
|
||||
<input>
|
||||
<xsl:if test="boolean(@onclick) = false()">
|
||||
<xsl:attribute name="onclick">
|
||||
<xsl:text>dcp_hide(this);</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
</input>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:output method="html" indent="yes"/>
|
||||
<xsl:output method="html" indent="yes"/>
|
||||
|
||||
|
||||
<xsl:template match="bebop:textarea"
|
||||
<xsl:template match="bebop:textarea"
|
||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0">
|
||||
<textarea>
|
||||
<xsl:for-each select="@*[not(name()='value')]">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="string-length(@value)=0"> </xsl:if>
|
||||
<xsl:value-of select="@value"/>
|
||||
</textarea>
|
||||
</xsl:template>
|
||||
<xsl:if test="@label">
|
||||
<label for="{@name}">
|
||||
<xsl:value-of select="@label"/>
|
||||
</label>
|
||||
</xsl:if>
|
||||
<textarea>
|
||||
<xsl:for-each select="@*[not(name()='value')]">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="string-length(@value)=0"> </xsl:if>
|
||||
<xsl:value-of select="@value"/>
|
||||
</textarea>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -1,43 +1,48 @@
|
|||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||
exclude-result-prefixes="xsl bebop"
|
||||
version="1.0">
|
||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||
exclude-result-prefixes="xsl bebop"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" indent="yes"/>
|
||||
<xsl:output method="html" indent="yes"/>
|
||||
|
||||
|
||||
<xsl:template match="bebop:formErrors">
|
||||
<font color="red">
|
||||
<xsl:value-of disable-output-escaping="yes" select="@message"/>
|
||||
</font>
|
||||
<br />
|
||||
</xsl:template>
|
||||
<xsl:template match="bebop:formErrors">
|
||||
<font color="red">
|
||||
<xsl:value-of disable-output-escaping="yes" select="@message"/>
|
||||
</font>
|
||||
<br />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="bebop:formWidget">
|
||||
<xsl:element name="input">
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
<xsl:template match="bebop:formWidget">
|
||||
<xsl:if test="@label">
|
||||
<label for="{@name}">
|
||||
<xsl:value-of select="@label"/>
|
||||
</label>
|
||||
</xsl:if>
|
||||
<xsl:element name="input">
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="bebop:formWidget[@type='submit']">
|
||||
<input>
|
||||
<xsl:if test="boolean(@onclick) = false()">
|
||||
<xsl:attribute name="onclick">
|
||||
<xsl:text>dcp_hide(this);</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
</input>
|
||||
</xsl:template>
|
||||
<xsl:template match="bebop:formWidget[@type='submit']">
|
||||
<input>
|
||||
<xsl:if test="boolean(@onclick) = false()">
|
||||
<xsl:attribute name="onclick">
|
||||
<xsl:text>dcp_hide(this);</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
</input>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -165,6 +165,14 @@
|
|||
<!-- DE Erzeugt alle Formular-Eingabefelder, die per <input> in HTML angelegt werden. -->
|
||||
<!-- EN Creates all form input field, which are created by a <input> in html. -->
|
||||
<xsl:template match="bebop:formWidget">
|
||||
<!--<xsl:if test="@label">
|
||||
<label for="{@name}">
|
||||
<xsl:value-of select="@label"/>
|
||||
</label>
|
||||
</xsl:if>-->
|
||||
<xsl:call-template name="processLabel">
|
||||
<xsl:with-param name="widget" select="."/>
|
||||
</xsl:call-template>
|
||||
<input>
|
||||
<xsl:call-template name="mandalay:processAttributes"/>
|
||||
<!-- DE Besondere Behandlung von Submit-Button Double-Click-Protection -->
|
||||
|
|
@ -181,6 +189,9 @@
|
|||
<!-- DE Erzeugt ein Textfeld -->
|
||||
<!-- EN Create a textarea -->
|
||||
<xsl:template match="bebop:textarea">
|
||||
<xsl:call-template name="processLabel">
|
||||
<xsl:with-param name="widget" select="."/>
|
||||
</xsl:call-template>
|
||||
<textarea>
|
||||
<xsl:call-template name="mandalay:processAttributes"/>
|
||||
<xsl:value-of select="@value"/>
|
||||
|
|
@ -209,4 +220,26 @@
|
|||
</fieldset>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="processLabel">
|
||||
<xsl:param name="widget"/>
|
||||
|
||||
<xsl:if test="$widget/@label">
|
||||
<label for="{$widget/@name}">
|
||||
<xsl:value-of select="$widget/@label"/>
|
||||
<xsl:if test="string-length($widget/@hint) > 0">
|
||||
<span class="hint">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="@hint"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="mandalay:getSetting">
|
||||
<xsl:with-param name="module" select="'bebop'"/>
|
||||
<xsl:with-param name="setting" select="'hintSymbol'"/>
|
||||
<xsl:with-param name="default" select="'(?)'"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
</xsl:if>
|
||||
</label>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -394,7 +394,9 @@ Setting up global templates like getStaticText and getSetting
|
|||
<!-- EN Process all attributes -->
|
||||
<xsl:template name="mandalay:processAttributes">
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:if test="name() != 'href_no_javascript'">
|
||||
<xsl:if test="(name() != 'href_no_javascript')
|
||||
and (name() != 'hint')
|
||||
and (name() != 'label')">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
<setting id="padding/showPadding">false</setting>
|
||||
<setting id="padding/borderColor">cccccc</setting>
|
||||
|
||||
<setting id="hintSymbol">(?)</setting>
|
||||
|
||||
<setting id="table/setImage/checkboxChecked">/images/bebop/checkBoxChecked.gif</setting>
|
||||
<setting id="table/setImage/checkboxUnchecked">/images/bebop/checkBoxUnchecked.gif</setting>
|
||||
<setting id="table/setImage/checkboxGreyChecked">/images/bebop/checkBoxGreyChecked.gif</setting>
|
||||
|
|
|
|||
Loading…
Reference in New Issue