[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] filemanager/templates/base app_data.xsl, 1.5 widgets.
From: |
ceb |
Subject: |
[Phpgroupware-cvs] filemanager/templates/base app_data.xsl, 1.5 widgets.xsl, 1.4 |
Date: |
Thu, 24 Feb 2005 15:08:17 -0000 |
Update of filemanager/templates/base
Modified Files:
Branch: MAIN
app_data.xsl lines: +41 -26
widgets.xsl lines: +79 -26
Log Message:
updating prefs
====================================================
Index: filemanager/templates/base/app_data.xsl
diff -u filemanager/templates/base/app_data.xsl:1.4
filemanager/templates/base/app_data.xsl:1.5
--- filemanager/templates/base/app_data.xsl:1.4 Fri Jan 21 01:41:05 2005
+++ filemanager/templates/base/app_data.xsl Sat Jan 22 23:48:25 2005
@@ -5,6 +5,9 @@
<xsl:when test="index">
<xsl:apply-templates select="index" />
</xsl:when>
+ <xsl:when test="preferences">
+ <xsl:apply-templates select="preferences" />
+ </xsl:when>
</xsl:choose>
</xsl:template>
@@ -98,30 +101,30 @@
<!--The template for each file -->
<xsl:template match="file">
- <tr>
- <xsl:choose>
- <xsl:when test="position() mod 2 = 0">
- <xsl:attribute
name="class">row_on</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute
name="class">row_off</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:for-each select="*">
- <td>
- <xsl:choose>
- <xsl:when
test='name(./*)="widget" or name(./*/*)="widget"'>
-
<xsl:apply-templates select="." />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="." />
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </xsl:for-each>
- </tr>
+ <tr>
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">
+ <xsl:attribute
name="class">row_on</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute
name="class">row_off</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:for-each select="*">
+ <td>
+ <xsl:choose>
+ <xsl:when
test='name(./*)="widget" or name(./*/*)="widget"'>
+ <xsl:apply-templates
select="." />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="." />
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </xsl:for-each>
+ </tr>
</xsl:template>
-
+
<!--Prints out the buttons-->
<xsl:template match="buttons">
<xsl:for-each select="button">
@@ -130,8 +133,10 @@
</xsl:template>
<!--The widgets that handle uploads-->
- <xsl:template match="uploads" >
- <xsl:apply-templates/>
+ <xsl:template match="uploads">
+ <xsl:for-each select="table_row">
+ <xsl:call-template name="table_row"/>
+ </xsl:for-each>
</xsl:template>
<!--Debug output-->
@@ -162,6 +167,16 @@
<a href="javascript:addMozillaPanel();"><xsl:value-of
select="link_label" /></a>
</xsl:template>
+ <xsl:template match="preferences">
+ <center>
+ <xsl:variable name="action_url" select="action_url" />
+ <form action="{$action_url}" method="POST">
+ <xsl:apply-templates select="table"/>
+ </form>
+ </center>
+ </xsl:template>
+
<xsl:template match="filemanager_nav">
</xsl:template>
+
====================================================
Index: filemanager/templates/base/widgets.xsl
diff -u filemanager/templates/base/widgets.xsl:1.3
filemanager/templates/base/widgets.xsl:1.4
--- filemanager/templates/base/widgets.xsl:1.3 Fri Jan 21 01:41:05 2005
+++ filemanager/templates/base/widgets.xsl Sat Jan 22 23:48:25 2005
@@ -12,14 +12,22 @@
<xsl:choose>
<xsl:when test='$type="select"'>
<select>
- <xsl:attribute name="name">
<xsl:value-of select="name"/> </xsl:attribute>
- <xsl:attribute name="value">
<xsl:value-of select="value"/> </xsl:attribute> <xsl:value-of select="caption"/>
- <xsl:for-each select="options/option" >
- <option>
- <xsl:attribute
name="value"><xsl:value-of select="value"/></xsl:attribute>
- <xsl:value-of select="caption"/>
- </option>
- </xsl:for-each>
+ <xsl:attribute
name="name"><xsl:value-of select="name"/></xsl:attribute>
+ <xsl:value-of select="caption"/>
+ <xsl:for-each select="options/option">
+ <option>
+ <xsl:attribute
name="value"><xsl:value-of select="value"/></xsl:attribute>
+ <xsl:choose>
+ <xsl:when
test="selected">
+
<xsl:variable name="selected" select="selected"/>
+ <xsl:if
test="$selected=1">
+
<xsl:attribute name="selected"><xsl:text>selected</xsl:text></xsl:attribute>
+
</xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:value-of
select="caption"/>
+ </option>
+ </xsl:for-each>
</select>
</xsl:when>
<xsl:when test='$type="seperator"'>
@@ -28,14 +36,14 @@
<xsl:when test='$type="empty"'>
</xsl:when>
- <xsl:when test='$type="img"'>
+ <xsl:when test='$type="image"'>
<xsl:choose>
- <xsl:when test="name">
+ <xsl:when test="name">
<xsl:variable name="name"
select="name"/>
<xsl:variable name="src"
select="src"/>
<xsl:variable name="title"
select="title"/>
- <input type="image"
name="{$name}" value="True" src="{$src}" title="{$title}" alt="{$title}"
border="0" />
- </xsl:when>
+ <input type="{$type}"
name="{$name}" value="True" src="{$src}" title="{$title}" alt="{$title}"
border="0" />
+ </xsl:when>
<xsl:when test="link">
<xsl:variable
name="link"><xsl:value-of select="link"/></xsl:variable>
<a class="none">
@@ -60,8 +68,16 @@
<xsl:otherwise>
<input>
<xsl:attribute
name="type"><xsl:value-of select="type"/></xsl:attribute>
- <xsl:attribute name="name">
<xsl:value-of select="name"/></xsl:attribute>
- <xsl:attribute name="value">
<xsl:value-of select="value"/> </xsl:attribute>
+ <xsl:attribute
name="name"><xsl:value-of select="name"/></xsl:attribute>
+ <xsl:attribute
name="value"><xsl:value-of select="value"/></xsl:attribute>
+ <xsl:choose>
+ <xsl:when
test='$type="checkbox"'>
+ <xsl:variable
name="value" select="value"/>
+ <xsl:if test="$value=1">
+ <xsl:attribute
name="checked"><xsl:text>checked</xsl:text></xsl:attribute>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
<xsl:value-of select="caption"/>
</input>
</xsl:otherwise>
@@ -92,21 +108,22 @@
</table>
</form>
</xsl:template>
-
+
<xsl:template match="table">
- <table width="80%" border="0" cellpadding="2" cellspacing="2">
- <xsl:attribute name="class"><xsl:value-of
select="class"/></xsl:attribute>
+ <table border="0" cellpadding="2" cellspacing="2">
+ <xsl:attribute name="class"><xsl:value-of
select="class"/></xsl:attribute>
+ <xsl:attribute name="width"><xsl:value-of
select="width"/></xsl:attribute>
<xsl:apply-templates select="table_head"/>
<xsl:for-each select="table_row">
<xsl:choose>
<xsl:when test="position() mod
2 = 0">
<xsl:call-template
name="table_row">
- <xsl:with-param
name="class">row_on</xsl:with-param>
+ <xsl:with-param
name="class"><xsl:text>row_on</xsl:text></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template
name="table_row">
- <xsl:with-param
name="class">row_off</xsl:with-param>
+ <xsl:with-param
name="class"><xsl:text>row_off</xsl:text></xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
@@ -119,15 +136,51 @@
<xsl:apply-templates select="table_col"/>
</tr>
</xsl:template>
-
- <xsl:template match="table_row">
- <tr>
+
+ <xsl:template name="table_row">
+ <xsl:param name="class" select="text" />
+ <tr class="{$class}">
+ <!--<xsl:choose>
+ <xsl:when test="alternate_row_color">
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="@class">
+ <xsl:value-of
select="@class"/>
+ </xsl:when>
+ <xsl:when test="position() mod
2 = 0">
+
<xsl:text>row_off</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+
<xsl:text>row_on</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>-->
<xsl:apply-templates select="table_col" />
</tr>
</xsl:template>
-
+
<xsl:template match="table_col">
- <td align="center">
- <xsl:apply-templates />
+ <td>
+ <xsl:if test="class">
+ <xsl:attribute name="class"><xsl:value-of
select="class"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="width">
+ <xsl:attribute name="width"><xsl:value-of
select="width"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="height">
+ <xsl:attribute name="height"><xsl:value-of
select="height"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="colspan">
+ <xsl:attribute name="colspan"><xsl:value-of
select="colspan"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="align">
+ <xsl:attribute name="align"><xsl:value-of
select="align"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="valign">
+ <xsl:attribute name="valign"><xsl:value-of
select="valign"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates select="widget"/>
</td>
</xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] filemanager/templates/base app_data.xsl, 1.5 widgets.xsl, 1.4,
ceb <=
- Prev by Date:
[Phpgroupware-cvs] filemanager/inc hook_settings.inc.php, 1.2 class.bofilemanager.inc.php, 1.9 class.uifilemanager.inc.php, 1.12 hook_preferences.inc.php, 1.13
- Next by Date:
[Phpgroupware-cvs] filemanager index.php,1.44
- Previous by thread:
[Phpgroupware-cvs] filemanager/inc hook_settings.inc.php, 1.2 class.bofilemanager.inc.php, 1.9 class.uifilemanager.inc.php, 1.12 hook_preferences.inc.php, 1.13
- Next by thread:
[Phpgroupware-cvs] filemanager index.php,1.44
- Index(es):