phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] tasks/skins/default/base.xsl, 1.1.2.5


From: nomail
Subject: [Phpgroupware-cvs] tasks/skins/default/base.xsl, 1.1.2.5
Date: Fri, 14 May 2004 07:54:30 +0200

Update of /tasks/skins/default
Modified Files:
        Branch: proposal-branch
          base.xsl

date: 2004/05/14 05:54:30;  author: jengo;  state: Exp;  lines: +120 -18

Log Message:
More work on tasks, added in "start date" and "end date", plus some other small 
updates
=====================================================================
Index: tasks/skins/default/base.xsl
diff -u tasks/skins/default/base.xsl:1.1.2.4 
tasks/skins/default/base.xsl:1.1.2.5
--- tasks/skins/default/base.xsl:1.1.2.4        Sat May  8 22:03:52 2004
+++ tasks/skins/default/base.xsl        Fri May 14 05:54:30 2004
@@ -49,11 +49,29 @@
                </tr>
                <tr class="row_on" valign="top">
                        <td align="left" width="30%">Start</td>
-                       <td width="70%"><xsl:value-of 
select="/PHPGW/APP/task_data/start" /></td>
+                       <td width="70%">
+                               <xsl:choose>
+                                       <xsl:when 
test="/PHPGW/APP/task_data/start != ''">
+                                               <xsl:value-of 
select="/PHPGW/APP/task_data/start" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               -
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </td>
                </tr>
                <tr class="row_on" valign="top">
                        <td align="left" width="30%">End</td>
-                       <td width="70%"><xsl:value-of 
select="/PHPGW/APP/task_data/end" /></td>
+                       <td width="70%">
+                               <xsl:choose>
+                                       <xsl:when 
test="/PHPGW/APP/task_data/end != ''">
+                                               <xsl:value-of 
select="/PHPGW/APP/task_data/end" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               -
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </td>
                </tr>
                <tr class="th">
                        <td colspan="2">Status</td>
@@ -80,11 +98,36 @@
                <tr class="row_on" valign="top">
                        <td align="left" width="30%">Priority</td>
                        <td width="70%">
-                               <select name="priority">
-                                       <option value="4">Urgent</option>
-                                       <option value="3">High</option>
-                                       <option value="2">Normal</option>
-                                       <option value="1">Low</option>
+                               <select name="priority">
+                                       <option value="0">
+                                               <xsl:if 
test="/PHPGW/APP/task_data/priority = 0 or /PHPGW/APP/task_data/priority = ''">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                       </option>
+                                       <option value="4">
+                                               <xsl:if 
test="/PHPGW/APP/task_data/priority = 4">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               Urgent
+                                       </option>
+                                       <option value="3">
+                                               <xsl:if 
test="/PHPGW/APP/task_data/priority = 3">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               High
+                                       </option>
+                                       <option value="2">
+                                               <xsl:if 
test="/PHPGW/APP/task_data/priority = 2">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               Normal
+                                       </option>
+                                       <option value="1">
+                                               <xsl:if 
test="/PHPGW/APP/task_data/priority = 1">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               Low
+                                       </option>
                                </select>
                        </td>
                </tr>
@@ -95,7 +138,7 @@
                        <td align="left" width="30%">Start</td>
                        <td width="70%">
                                <xsl:call-template name="jscalendar">
-                                       <xsl:with-param name="var_name" 
select="'start'" />
+                                       <xsl:with-param name="var_name" 
select="'start_date'" />
                                        <xsl:with-param name="default" 
select="/PHPGW/APP/task_data/start" />
                                </xsl:call-template>
                                &#160; &#160;
@@ -111,7 +154,7 @@
                        <td align="left" width="30%">End</td>
                        <td width="70%">
                                <xsl:call-template name="jscalendar">
-                                       <xsl:with-param name="var_name" 
select="'end'" />
+                                       <xsl:with-param name="var_name" 
select="'end_date'" />
                                        <xsl:with-param name="default" 
select="/PHPGW/APP/task_data/end" />
                                </xsl:call-template>
                                &#160; &#160;
@@ -129,9 +172,24 @@
                <tr class="row_on" valign="top">
                        <td align="left" width="30%">Status</td>
                        <td width="70%" align="left">
-                               <select name="status">
-                                       <option value="ongoing">Ongoing</option>
-                                       <option value="done">Done</option>
+                               <select name="status">
+                                       <option value="0">
+                                               <xsl:if 
test="/PHPGW/APP/task_data/status = 0 or /PHPGW/APP/task_data/status = ''">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                       </option>
+                                       <option value="2">
+                                               <xsl:if 
test="/PHPGW/APP/task_data/status = 2">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               Ongoing
+                                       </option>
+                                       <option value="1">
+                                               <xsl:if 
test="/PHPGW/APP/task_data/status = 1">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               Done
+                                       </option>
                                </select>
                        </td>
                </tr>
@@ -225,6 +283,41 @@
 </xsl:template>
 
 <xsl:template match="APP[action_type='task_start']">
+       <script>
+
+           <!-- This function borrowed from phpMyAdmin, needs to be rewritten 
for CSS -->
+           function setPointer(theRow, thePointerColor)
+           {
+               if (thePointerColor == '' || typeof(theRow.style) == 
'undefined')
+               {
+                   return false;
+               }
+
+               if (typeof(document.getElementsByTagName) != 'undefined')
+               {
+                   var theCells = theRow.getElementsByTagName('td');
+               }
+               else if (typeof(theRow.cells) != 'undefined')
+               {
+                   var theCells = theRow.cells;
+               }
+               else
+               {
+                   return false;
+               }
+
+               var rowCellsCnt = theCells.length;
+
+               for (var c = 0; c &lt; rowCellsCnt; c++)
+               {
+                   theCells[c].style.backgroundColor = thePointerColor;
+               }
+
+               return true;
+           }
+
+        </script>
+
        <br />
 
        <table class="normalbox" cellSpacing="1" cellPadding="0" width="95%" 
border="0" align="center">
@@ -253,14 +346,23 @@
                                        </xsl:if>
 
                                        <xsl:for-each 
select="tasks_data/tasks_data_item">
-                                               <xsl:variable name="class">
+                                               <tr class="sideboxtext">
                                                        <xsl:choose>
-                                                               <xsl:when 
test="position() mod 2 = 1">row_on</xsl:when>
-                                                               
<xsl:otherwise>row_off</xsl:otherwise>
+                                                               <!-- NOTE and 
FIXME: The setPointer() function was borrowed -->
+                                                               <!-- from 
phpMyAdmin, it doesn't use CSS, it needs to be -->
+                                                               <!-- converted 
to handle it -->
+                                                               <xsl:when 
test="position() mod 2 = 1">
+                                                                       
<xsl:attribute name="class">row_on</xsl:attribute>
+                                                                       
<xsl:attribute name="onmouseover">setPointer(this, '#D3DCE3')</xsl:attribute>
+                                                                       
<xsl:attribute name="onmouseout">setPointer(this, '#DDDDDD')</xsl:attribute>
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       
<xsl:attribute name="class">row_off</xsl:attribute>
+                                                                       
<xsl:attribute name="onmouseover">setPointer(this, '#D3DCE3')</xsl:attribute>
+                                                                       
<xsl:attribute name="onmouseout">setPointer(this, '#EEEEEE')</xsl:attribute>
+                                                               </xsl:otherwise>
                                                        </xsl:choose>
-                                               </xsl:variable>
 
-                                               <tr class="{$class}">
                                                        <td width="10%"><font 
color="#000000"><xsl:value-of select="status" /></font></td>
                                                        <td width="*"><font 
color="#000000"><a 
href="{$baseurl}&amp;op=tasks.base.view&amp;task_id={id}"><xsl:value-of 
select="subject" /></a></font></td>
                                                        <td width="10%"><font 
color="#000000"><xsl:value-of select="start" /></font></td>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]