phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] api/skins/default profile.xsl, 1.1.2.2 setup.xsl, 1.


From: uid65886
Subject: [Phpgroupware-cvs] api/skins/default profile.xsl, 1.1.2.2 setup.xsl, 1.1.1.1.2.10 phpgw.xsl, 1.1.1.1.2.26 widgets.xsl, 1.1.1.1.2.16 admin.xsl, 1.1.2.4 login.xsl, 1.1.1.1.2.9 account_mgr.xsl, 1.1.2.22 default.css, 1.1.1.1.2.10 acl_popup.xsl, 1.1.2.1
Date: Wed, 27 Apr 2005 06:42:16 -0000

Update of api/skins/default

Modified Files:
     Branch: proposal-branch
            profile.xsl lines: +3 -8
            setup.xsl lines: +27 -2
            phpgw.xsl lines: +84 -4
            widgets.xsl lines: +269 -19
            admin.xsl lines: +2 -2
            login.xsl lines: +2 -2
            account_mgr.xsl lines: +33 -22
            default.css lines: +34 -2
Added Files:
     Branch: proposal-branch
            acl_popup.xsl lines: +142 -0

Log Message:
*NOTE* Since Savannah was down for a long period of time, this is many of the 
changes I made locally.  Some things aren't finished and I might have forgotten 
to mention quite a few things I did durring the down time.  What I can remeber 
is as follows:

- Changed the way forms work, developers no longer specify there <form> tags,
  the API handles this. Its mainly due to the way statecaching works now.
  This only means, each screen can ONLY be *1* form.
- Total overhaul of statecache and op history, this isn't has cumbersum as the
  previous version.
- Fixed a number of image issues with IE
- Fixed table alignment issues with IE and Firebird
- Created widget for time fields
- Added in jscalendar and created widgets for it. (Note: This needs to follow
  users preferences)
- Fixed quite a few issues with layout on Opera
- Ported over nextmatchs, this needs a little twinking on how the op is
  passed, I don't think it should be a required field unless its an odd case.
  Chances are, I will change this.
- Note: There is a current bug with preferences not getting saved most of the
  time, I am looking into it.
- Started working on the ACL manager for single records. This is no where near
  complete and needs a lot of work.
- Started working on the infolog port (application name WILL change in the
  future, I hate the name infolog) I needed this as a test bed for multipage
  forms using tabs, making tabs in general work, ACL manager for single
  records on new records, etc. For this application to fully work, it needs
  contacts and categories. So, until those are complete, this application will
  NOT be usable.
- Removed some legacy code from the PostgreSQL db classes. The MySQL ones are
  NOT as up to date, they will require some updating. I am not worring about
  it now, becuase I will be rewritting the PostgreSQL ones first. It will be
  re-written using safeargs, and as an extended class like the 0.9.x ones, not
  to mention a ton of changes to make it cleaner and better error handling.

====================================================
Index: api/skins/default/profile.xsl
diff -u api/skins/default/profile.xsl:1.1.2.1 
api/skins/default/profile.xsl:1.1.2.2
--- api/skins/default/profile.xsl:1.1.2.1       Mon Nov 10 00:36:05 2003
+++ api/skins/default/profile.xsl       Thu Dec 25 02:20:18 2003
@@ -6,11 +6,9 @@
 <xsl:output indent="yes" />

 <xsl:template match="APP[action_type='profile']">
-       <br />
-       <form method="POST">
        <input type="hidden" name="profile_submit" value="True" />

-       <table class="normalbox" cellSpacing="1" cellPadding="0" width="40%" 
border="0">
+       <table class="normalbox" cellSpacing="1" cellPadding="0" width="40%" 
border="0" align="center">
                <tr>
                        <td class="sideboxtitle" align="center" height="28" 
width="100%">&#160;</td>
                </tr>
@@ -60,9 +58,7 @@
                                                <td colspan="3">
                                                        <table width="100%" 
border="0">
                                                                <td 
align="left" width="24"><input type="image" name="op" 
src="{$api_image_path}/clearform.png" value="api.statecache.clear" alt="Clear 
Form" title="Clear Form" /></td>
-                                                               <td 
align="left" width="24"><input type="image" name="op" 
src="{$api_image_path}/pause.png" value="api.statecache.pause" alt="Place form 
on hold" title="Place form on hold" /></td>
                                                                <td 
width="*">&#160;</td>
-                                                               <td 
align="right" width="24"><input type="image" name="op" 
src="{$api_image_path}/cancel.png" value="api.statecache.cancel" alt="Cancel" 
title="Cancel" /></td>
                                                                <td 
align="right" width="24"><input type="image" name="op" 
src="{$api_image_path}/save.png" value="api.base.profile" alt="Save" 
title="Save" /></td>
                                                        </table>
                                                </td>
@@ -72,7 +68,6 @@
                        </td>
                </tr>
        </table>
-       </form>

        <p>&#160;</p>
 </xsl:template>

====================================================
Index: api/skins/default/setup.xsl
diff -u api/skins/default/setup.xsl:1.1.1.1.2.9 
api/skins/default/setup.xsl:1.1.1.1.2.10
--- api/skins/default/setup.xsl:1.1.1.1.2.9     Mon Dec  1 06:17:42 2003
+++ api/skins/default/setup.xsl Thu Dec 25 02:20:18 2003
@@ -19,8 +19,33 @@
                <table border="0" width="90%" cellspacing="0" cellpadding="0" 
class="normalbox">
                        <tr>
                                <td>
-                                       <xsl:if test="message = 
node()"><center><b><xsl:value-of 
select="message"/></b></center><br/><br/></xsl:if>
+                                       <xsl:if test="message = node()">
+
+                                               <table cellspacing="1" 
cellpadding="0" border="0" align="center" width="100%">
+                                                       <tr>
+                                                               <td 
class="sideboxtitle" align="left" height="28">&#160;</td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
class="sideboxcontent" bgcolor="#efefef">
+                                                                       <table 
class="sideboxtext" cellspacing="0" cellpadding="0" width="100%" border="0">
+                                                                               
<tr bgcolor="#e6e6e6">
+                                                                               
        <td align="center"><br /><img width="300" height="1" 
src="api/templates/default/images/spacer.png" alt="" /></td>
+                                                                               
</tr>
+                                                                               
<tr bgcolor="#e6e6e6">
+                                                                               
        <td align="center">
+                                                                               
                <b><xsl:value-of select="message"/></b>
+                                                                               
                <p>&#160;</p>
+                                                                               
                <p>&#160;</p>
+                                                                               
        </td>
+                                                                               
</tr>
+                                                                       </table>
+                                                               </td>
+                                                       </tr>
+                                               </table>
+
+                                       </xsl:if>
                                        <center>
+
                                        <xsl:choose>
                                                <xsl:when test="stage = '1'">
                                                        <xsl:call-template 
name="CONFIGFILE"/>

====================================================
Index: api/skins/default/phpgw.xsl
diff -u api/skins/default/phpgw.xsl:1.1.1.1.2.25 
api/skins/default/phpgw.xsl:1.1.1.1.2.26
--- api/skins/default/phpgw.xsl:1.1.1.1.2.25    Mon Nov 24 20:14:35 2003
+++ api/skins/default/phpgw.xsl Thu Dec 25 02:20:18 2003
@@ -68,14 +68,13 @@
                                                <xsl:for-each 
select="/PHPGW/API/op_history/op_history_item">
                                                        <xsl:variable name="op" 
select="op" />
                                                        <xsl:variable 
name="title" select="title" />
-                                                       <xsl:variable 
name="position" select="position() - 1" />

                                                        <xsl:choose>
                                                                <xsl:when 
test="/PHPGW/API/form_lock = 1">
                                                                        
<b><xsl:value-of select="$title" /></b>
                                                                </xsl:when>
                                                                <xsl:otherwise>
-                                                                       <b><a 
href="{$baseurl}&amp;op=api.base.op_history_redirect&amp;position_id={$position}"><xsl:value-of
 select="$title" /></a></b>
+                                                                       <b><a 
href="{$baseurl}&amp;op=api.statecache.restore&amp;position_id={position}"><xsl:value-of
 select="$title" /></a></b>
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                        <xsl:if 
test="position() != count(/PHPGW/API/op_history/op_history_item)">
@@ -158,13 +157,23 @@
                                                                        
<!--<xsl:apply-templates select="PHPGW/API/hooks/hooks_item" />-->

                                                                        
<xsl:choose>
-                                                                       
<xsl:when test="PHPGW/APP != '' or /PHPGW/API/APPHTML">
+                                                                               
<xsl:when test="PHPGW/APP != '' or /PHPGW/API/APPHTML">
+                                                                               
<form method="POST" name="phpgw_form">
                                                                        <table 
cellSpacing="0" cellPadding="0" width="100%" border="0">
                                                                                
<tr>
                                                                                
        <td vAlign="top" height="100%">
                                                                                
                <table align="center" class="box" cellSpacing="1" 
cellPadding="0" width="100%" border="0">
                                                                                
                        <tr>
                                                                                
                                <td height="23" colSpan="2" align="center" 
class="articletitle">
+                                                                               
                                        <table border="0" align="center" 
width="100%">
+                                                                               
                                                <tr>
+                                                                               
                                                        <td align="left" 
width="5%">
+                                                                               
                                                        <xsl:if 
test="/PHPGW/API/form_lock = 1">
+                                                                               
                                                                <input 
type="image" name="op" value="api.statecache.clear" 
src="{$api_image_path}/clear.png" />
+                                                                               
                                                        </xsl:if>
+                                                                               
                                                        </td>
+
+                                                                               
                                                        <td align="center">
                                                                                
                                        <xsl:choose>
                                                                                
                                                <xsl:when 
test="/PHPGW/API/title">
                                                                                
                                                        <xsl:value-of 
select="/PHPGW/API/title"/>
@@ -175,6 +184,19 @@
                                                                                
                                                </xsl:otherwise>
                                                                                
                                        </xsl:choose>
                                                                                
                                        <xsl:if test="/PHPGW/API/subtitle"> - 
<xsl:value-of select="/PHPGW/API/subtitle"/></xsl:if>
+                                                                               
                                                        </td>
+                                                                               
                                                        <td align="right" 
width="5%">
+                                               <xsl:if 
test="/PHPGW/API/form_lock = 1">
+                                                       <input type="image" 
name="op" value="api.statecache.minimize" src="{$api_image_path}/min.png" />
+                                               </xsl:if>
+                                               <xsl:if 
test="count(/PHPGW/API/op_history/op_history_item) != 1">
+                                                       <input type="image" 
name="op" value="api.statecache.close" src="{$api_image_path}/close.png" />
+                                                       <input type="hidden" 
name="position_id" value="{/PHPGW/API/current_history_position}" />
+                                               </xsl:if>
+                                                                               
                                                        </td>
+                                                                               
                                                </tr>
+                                                                               
                                        </table>
+
                                                                                
                                </td>
                                                                                
                        </tr>
                                                                                
                        <tr align="center">
@@ -185,7 +207,9 @@
                                                                                
                                                        <xsl:value-of 
disable-output-escaping="yes" select="/PHPGW/API/APPHTML" />
                                                                                
                                                </xsl:when>
                                                                                
                                                <xsl:otherwise>
+                                                                               
                                                        <br />
                                                                                
                                                        <xsl:apply-templates 
select="PHPGW/APP" />
+                                                                               
                                                        <br />
                                                                                
                                                </xsl:otherwise>
                                                                                
                                        </xsl:choose>
                                                                                
                                </td>
@@ -194,6 +218,7 @@
                                                                                
        </td>
                                                                                
</tr>
                                                                        </table>
+                                                               </form>
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                        
<xsl:apply-templates select="PHPGW/API/msgbox" />
@@ -215,6 +240,61 @@
 </html>
 </xsl:template>

+<!--
+<xsl:template name="inside_app_box">
+       <xsl:param name="title" select="''" />
+
+       <table cellSpacing="0" cellPadding="0" width="100%" border="0">
+               <tr>
+                       <td vAlign="top" height="100%">
+
+                               <table align="center" class="box" 
cellSpacing="1" cellPadding="0" width="100%" border="0">
+                                       <tr>
+                                               <td height="23" colSpan="2" 
align="center" class="articletitle">
+
+                                                       <table border="0" 
align="center" width="100%">
+                                                               <tr>
+                                                                       <td 
align="center">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="/PHPGW/API/title">
+                                                                               
                <xsl:value-of select="/PHPGW/API/title"/>
+                                                                               
        </xsl:when>
+                                                                               
        <xsl:otherwise>
+                                                                               
                <xsl:variable name="app" select="/PHPGW/API/op/appname"/>
+                                                                               
                <xsl:value-of 
select="/PHPGW/API/apps/apps_item[name=$app]/title"/>
+                                                                               
        </xsl:otherwise>
+                                                                               
</xsl:choose>
+                                                                               
<xsl:if test="/PHPGW/API/subtitle"> - <xsl:value-of 
select="/PHPGW/API/subtitle"/></xsl:if>
+                                                                       </td>
+                                                                       <td 
align="right" width="5%">
+                                                                               
<input type="image" name="op" value="api.statecache.pause"  
src="{$api_image_path}/min.png" />&#160;<input type="image" name="op" 
value="api.statecache.cancel" src="{$api_image_path}/close.png" />
+                                                                       </td>
+                                                               </tr>
+                                                       </table>
+                                               </td>
+                                       </tr>
+                                       <tr align="center">
+                                               <td height="20" colSpan="2" 
bgColor="#efefef" class="mainnote">
+                                                       <xsl:apply-templates 
select="PHPGW/API/msgbox" />
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="/PHPGW/API/APPHTML">
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="/PHPGW/API/APPHTML" />
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       <br />
+                                                                       
<xsl:apply-templates select="PHPGW/APP" />
+                                                                       <br />
+                                                               </xsl:otherwise>
+                                                       </xsl:choose>
+                                               </td>
+                                       </tr>
+                               </table>
+                       </td>
+               </tr>
+       </table>
+</xsl:template>
+-->
+
 <xsl:template match="hooks_item">
 </xsl:template>


====================================================
Index: api/skins/default/widgets.xsl
diff -u api/skins/default/widgets.xsl:1.1.1.1.2.15 
api/skins/default/widgets.xsl:1.1.1.1.2.16
--- api/skins/default/widgets.xsl:1.1.1.1.2.15  Mon Dec  1 06:17:42 2003
+++ api/skins/default/widgets.xsl       Thu Dec 25 02:20:18 2003
@@ -11,19 +11,64 @@
 </xsl:template>

 <xsl:template name="nextmatchs_left">
-       <xsl:param name="first_start" />
-       <xsl:param name="prev_start" />
+       <xsl:param name="op" select="/PHPGW/API/op/current_op" />

-       <img src="{$api_image_path}/first-grey.gif" />
-       <img src="{$api_image_path}/prev-grey.gif" />
+       <xsl:choose>
+               <xsl:when test="(/PHPGW/API/nextmatchs/current_position != 0) 
and (/PHPGW/API/nextmatchs/current_position > /PHPGW/API/prefs/api.maxmatchs)">
+                       <a href="{$op}&amp;start=0"><img 
src="{$api_image_path}/first.png" border="0" /></a>
+               </xsl:when>
+               <xsl:otherwise>
+                       <img src="{$api_image_path}/first-grey.png" />
+               </xsl:otherwise>
+       </xsl:choose>
+
+       <xsl:choose>
+               <xsl:when test="/PHPGW/API/nextmatchs/current_position != 0">
+                       <xsl:choose>
+                               <xsl:when 
test="(/PHPGW/API/nextmatchs/current_position div 
/PHPGW/API/nextmatchs/record_count) &lt; 2">
+                                       <xsl:variable name="prev" 
select="/PHPGW/API/nextmatchs/current_position - 
/PHPGW/API/prefs/api.maxmatchs" />
+                                       <xsl:choose>
+                                               <xsl:when test="$prev > 0">
+                                                       &#160;<a 
href="{$op}&amp;start={$prev}"><img src="{$api_image_path}/prev.png" border="0" 
/></a>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       &#160;<a 
href="{$op}&amp;start=0"><img src="{$api_image_path}/prev.png" border="0" /></a>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       &#160;<img 
src="{$api_image_path}/prev-grey.png" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:when>
+               <xsl:otherwise>
+                       &#160;<img src="{$api_image_path}/prev-grey.png" />
+               </xsl:otherwise>
+       </xsl:choose>
 </xsl:template>

 <xsl:template name="nextmatchs_right">
-       <xsl:param name="last_start" />
-       <xsl:param name="next_start" />
+       <xsl:param name="op" select="/PHPGW/API/op/current_op" />
+
+       <xsl:choose>
+               <xsl:when test="/PHPGW/API/nextmatchs/current_position &lt; 
/PHPGW/API/nextmatchs/record_count and /PHPGW/API/nextmatchs/current_position + 
/PHPGW/API/prefs/api.maxmatchs &lt; /PHPGW/API/nextmatchs/record_count">
+                       <xsl:variable name="next" 
select="/PHPGW/API/nextmatchs/current_position + 
/PHPGW/API/prefs/api.maxmatchs" />
+                       <a href="{$op}&amp;start={$next}"><img 
src="{$api_image_path}/next.png" border="0" /></a>
+               </xsl:when>
+               <xsl:otherwise>
+                       <img src="{$api_image_path}/next-grey.png" />
+               </xsl:otherwise>
+       </xsl:choose>

-       <img src="{$api_image_path}/next-grey.gif" />
-       <img src="{$api_image_path}/last-grey.gif" />
+       <xsl:choose>
+               <xsl:when test="(/PHPGW/API/nextmatchs/current_position != 
/PHPGW/API/nextmatchs/record_count - /PHPGW/API/prefs/api.maxmatchs) and 
(/PHPGW/API/nextmatchs/record_count - /PHPGW/API/prefs/api.maxmatchs) > 
(/PHPGW/API/nextmatchs/current_position + /PHPGW/API/prefs/api.maxmatchs)">
+                       <xsl:variable name="next" 
select="/PHPGW/API/nextmatchs/record_count - /PHPGW/API/prefs/api.maxmatchs" />
+                       &#160;<a href="{$op}&amp;start={$next}"><img 
src="{$api_image_path}/last.png" border="0" /></a>
+               </xsl:when>
+               <xsl:otherwise>
+                       &#160;<img src="{$api_image_path}/last-grey.png" />
+               </xsl:otherwise>
+       </xsl:choose>
 </xsl:template>

 <xsl:template name="widget_dialog_yesno">
@@ -117,6 +162,59 @@

 <xsl:template name="tab_widget">
        <xsl:param name="values" />
+
+       <script>
+               function tab_submit(tab)
+               {
+                       document.phpgw_form.select_tab.value = tab;
+                       document.phpgw_form.submit();
+               }
+       </script>
+
+       <input type="hidden" name="select_tab" />
+       <table border="0" width="100%" cellspacing="0" cellpadding="0">
+               <tr valign="bottom">
+                       <td>
+                               <table border="0" width="100%" class="0" 
cellspacing="0">
+                                       <tr valign="bottom">
+
+                                               <xsl:for-each 
select="$values/tab_widget_item">
+                                                       <td nowrap="nowrap">
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="string(current) = '1'">
+                                                                               
<table cellspacing="0" cellpadding="0">
+                                                                               
        <tr>
+                                                                               
                <td nowrap="True" class="tab_active th"><xsl:value-of 
select="title"/> </td>
+                                                                               
        </tr>
+                                                                               
</table>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<table cellpadding="0">
+                                                                               
        <tr>
+                                                                               
                <td nowrap="True" class="tab row_on">
+                                                                               
                        <xsl:variable name="pos" select="position()" />
+                                                                               
                        <a href="javascript: tab_submit('{$pos}');" 
class="tablink"><xsl:value-of select="title"/></a>
+                                                                               
                </td>
+                                                                               
        </tr>
+                                                                               
</table>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </td>
+                                               </xsl:for-each>
+
+                                               <td width="99%">&#160;</td>
+                               </tr>
+                       </table>
+               </td>
+       </tr>
+</table>
+
+</xsl:template>
+
+<!-- These tabs will be for the Verdilak layout, so I am keeping them here 
until that template set is ported over (jengo) -->
+<!--
+<xsl:template name="tab_widget">
+       <xsl:param name="values" />

        <table border="0" cellspacing="0" cellpadding="0">
                <tr>
@@ -138,7 +236,7 @@
                                        </xsl:otherwise>
                                </xsl:choose>

-                               <!-- Test these as a string, or the results are 
very very fscking strange -->
+                               ** comment**    Test these as a string, or the 
results are very very fscking strange ** comment **
                                <xsl:if test="position() != 
count($values/tab_widget_item)">
                                        <xsl:variable name="c" 
select="string(current)" />
                                        <xsl:variable name="n" 
select="string(following::tab_widget_item/current[position() = 1])" />
@@ -176,6 +274,7 @@
                </tr>
        </table>
 </xsl:template>
+-->

 <xsl:template name="widget_langlist">
        <xsl:param name="value" />
@@ -199,10 +298,9 @@

 <xsl:template match="pref_widget">
        <br />
-       <form method="POST">
        <input type="hidden" name="form_submit" value="True" />

-       <table class="normalbox" cellSpacing="1" cellPadding="0" width="50%" 
border="0">
+       <table class="normalbox" cellSpacing="1" cellPadding="0" width="50%" 
border="0" align="center">
                <tr>
                        <td class="sideboxtitle" align="center" height="28" 
width="100%">Preferences</td>
                </tr>
@@ -213,6 +311,67 @@
                                                <xsl:choose>
                                                        <xsl:when test="type = 
'checkbox'">
                                                                
<xsl:call-template name="checkbox">
+                                                                       
<xsl:with-param name="array_name" select="new_prefs" />
+                                                                       
<xsl:with-param name="name" select="name" />
+                                                                       
<xsl:with-param name="value" select="value" />
+                                                                       
<xsl:with-param name="label" select="label" />
+                                                                       
<xsl:with-param name="checked" select="checked" />
+                                                               
</xsl:call-template>
+                                                       </xsl:when>
+
+                                                       <xsl:when test="type = 
'inputbox'">
+                                                               
<xsl:call-template name="inputbox">
+                                                                       
<xsl:with-param name="array_name" select="new_prefs" />
+                                                                       
<xsl:with-param name="name" select="name" />
+                                                                       
<xsl:with-param name="value" select="value" />
+                                                                       
<xsl:with-param name="label" select="label" />
+                                                               
</xsl:call-template>
+                                                       </xsl:when>
+
+                                                       <xsl:when test="type = 
'selectbox'">
+                                                               
<xsl:call-template name="selectbox">
+                                                                       
<xsl:with-param name="array_name" select="new_prefs" />
+                                                                       
<xsl:with-param name="name" select="name" />
+                                                                       
<xsl:with-param name="label" select="label" />
+                                                                       
<xsl:with-param name="values" select="values" />
+                                                                       
<xsl:with-param name="multiple" select="multiple" />
+                                                                       
<xsl:with-param name="size" select="size" />
+                                                               
</xsl:call-template>
+                                                       </xsl:when>
+
+                                                       <xsl:otherwise>
+                                                               Unknown type - 
<xsl:value-of select="type" />
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:for-each>
+                                       <tr>
+                                               <td colspan="2">&#160;</td>
+                                       </tr>
+                                       <tr>
+                                               <td colspan="2" 
align="right"><input type="image" name="op" src="{$api_image_path}/save.png" 
value="api.base.prefs" alt="Create" title="Create" /></td>
+                                       </tr>
+                               </table>
+                       </td>
+               </tr>
+       </table>
+</xsl:template>
+
+<xsl:template match="config_widget">
+       <br />
+       <input type="hidden" name="form_submit" value="True" />
+
+       <table class="normalbox" cellSpacing="1" cellPadding="0" width="70%" 
border="0" align="center">
+               <tr>
+                       <td class="sideboxtitle" align="center" height="28" 
width="100%">Configuration for [ insert location name ]</td>
+               </tr>
+               <tr>
+                       <td class="sideboxcontent" bgColor="#efefef">
+                               <table class="sideboxtext" cellSpacing="1" 
cellPadding="1" width="80%" border="0" valign="top" align="center">
+                                       <xsl:for-each 
select="config_widget_item">
+                                               <xsl:choose>
+                                                       <xsl:when test="type = 
'checkbox'">
+                                                               
<xsl:call-template name="checkbox">
+                                                                       
<xsl:with-param name="array_name" select="new_config" />
                                                                        
<xsl:with-param name="name" select="name" />
                                                                        
<xsl:with-param name="value" select="value" />
                                                                        
<xsl:with-param name="label" select="label" />
@@ -222,6 +381,7 @@

                                                        <xsl:when test="type = 
'inputbox'">
                                                                
<xsl:call-template name="inputbox">
+                                                                       
<xsl:with-param name="array_name" select="new_prefs" />
                                                                        
<xsl:with-param name="name" select="name" />
                                                                        
<xsl:with-param name="value" select="value" />
                                                                        
<xsl:with-param name="label" select="label" />
@@ -230,6 +390,7 @@

                                                        <xsl:when test="type = 
'selectbox'">
                                                                
<xsl:call-template name="selectbox">
+                                                                       
<xsl:with-param name="array_name" select="new_prefs" />
                                                                        
<xsl:with-param name="name" select="name" />
                                                                        
<xsl:with-param name="label" select="label" />
                                                                        
<xsl:with-param name="values" select="values" />
@@ -247,17 +408,16 @@
                                                <td colspan="2">&#160;</td>
                                        </tr>
                                        <tr>
-                                               <td align="left"><input 
type="image" name="op" src="{$api_image_path}/cancel.png" 
value="api.base.start" alt="Cancel" title="Cancel" /></td>
-                                               <td align="right"><input 
type="image" name="op" src="{$api_image_path}/save.png" value="api.base.prefs" 
alt="Create" title="Create" /></td>
+                                               <td colspan="2" 
align="right"><input type="image" name="op" src="{$api_image_path}/save.png" 
value="api.base.config" alt="Create" title="Create" /></td>
                                        </tr>
                                </table>
                        </td>
                </tr>
        </table>
-       </form>
 </xsl:template>

 <xsl:template name="checkbox">
+       <xsl:param name="array_name" />
        <xsl:param name="name" />
        <xsl:param name="value" />
        <xsl:param name="label" />
@@ -267,28 +427,30 @@
                <td valign="top"><xsl:value-of select="$label" />:</td>
        <xsl:choose>
                <xsl:when test="$checked = 1">
-                       <td align="left"><input type="checkbox" 
name="new_prefs[{$name}]" value="{$value}" checked="checked" /></td>
+                       <td align="left"><input type="checkbox" 
name="{$array_name}[{$name}]" value="{$value}" checked="checked" /></td>
                </xsl:when>

                <xsl:otherwise>
-                       <td align="left"><input type="checkbox" 
name="new_prefs[{$name}]" value="{$value}" /></td>
+                       <td align="left"><input type="checkbox" 
name="{$array_name}[{$name}]" value="{$value}" /></td>
                </xsl:otherwise>
        </xsl:choose>
        </tr>
 </xsl:template>

 <xsl:template name="inputbox">
+       <xsl:param name="array_name" />
        <xsl:param name="name" />
        <xsl:param name="value" />
        <xsl:param name="label" />

        <tr>
                <td valign="top"><xsl:value-of select="$label" />:</td>
-               <td align="left"><input name="new_prefs[{$name}]" 
value="{$value}" /></td>
+               <td align="left"><input name="{$array_name}[{$name}]" 
value="{$value}" /></td>
        </tr>
 </xsl:template>

 <xsl:template name="selectbox">
+       <xsl:param name="array_name" />
        <xsl:param name="name" />
        <xsl:param name="label" />
        <xsl:param name="values" />
@@ -297,7 +459,7 @@

        <tr>
                <td valign="top"><xsl:value-of select="$label" />:</td>
-               <td align="left"><select name="new_prefs[{$name}]">
+               <td align="left"><select name="{$array_name}[{$name}]">

                <xsl:if test="multiple = 1">
                        <xsl:attribute name="multiple">multiple</xsl:attribute>
@@ -404,6 +566,94 @@
        <p>&#160;</p>
 </xsl:template>

+
+<xsl:template name="forloop">
+       <xsl:param name="counter" select="'0'" />
+       <xsl:param name="total" select="'5'" />
+       <xsl:param name="selected" select="''" />
+
+       <option value="{$counter}">
+               <xsl:if test="$selected = $counter">
+                       <xsl:attribute name="selected">selected</xsl:attribute>
+               </xsl:if>
+
+               <xsl:value-of select="$counter" />
+       </option>
+
+       <xsl:if test="$counter &lt; $total">
+               <xsl:call-template name="forloop">
+                       <xsl:with-param name="counter" select="$counter +1" />
+                       <xsl:with-param name="total" select="$total" />
+                       <xsl:with-param name="selected" select="$selected" />
+               </xsl:call-template>
+       </xsl:if>
+</xsl:template>
+
+<!-- FIXME: This should respect the users preference for time format (12 / 24 
hour) -->
+<xsl:template name="time_widget">
+       <xsl:param name="var_name" select="'time'" />
+       <xsl:param name="hour" select="''" />
+       <xsl:param name="minute" select="''" />
+       <xsl:param name="ap" select="''" />
+
+       <select name="{$var_name}[hour]">
+               <option value=""></option>
+               <xsl:call-template name="forloop">
+                       <xsl:with-param name="counter" select="1" />
+                       <xsl:with-param name="total" select="12" />
+                       <xsl:with-param name="selected" select="$hour" />
+               </xsl:call-template>
+       </select>
+       :
+       <select name="{$var_name}[minute]">
+               <option value=""></option>
+               <xsl:call-template name="forloop">
+                       <xsl:with-param name="counter" select="1" />
+                       <xsl:with-param name="total" select="59" />
+                       <xsl:with-param name="selected" select="$minute" />
+               </xsl:call-template>
+       </select>
+       <select name="{$var_name}[ap]">
+               <option value="am">
+                       <xsl:if test="$ap = 'am'">
+                               <xsl:attribute 
name="selected">selected</xsl:attribute>
+                       </xsl:if>
+                       AM
+               </option>
+
+               <option value="pm">
+                       <xsl:if test="$ap = 'pm'">
+                               <xsl:attribute 
name="selected">selected</xsl:attribute>
+                       </xsl:if>
+                       PM
+               </option>
+       </select>
+</xsl:template>
+
+<xsl:template name="jscalendar">
+       <xsl:param name="var_name" select="'date'" />
+       <xsl:param name="default" select="''" />
+
+       <link rel="stylesheet" type="text/css" media="all" 
href="/~jengo/phpgw_1_9_0/api/skins/default/jscalendar/calendar-win2k-cold-1.css"
 title="win2k-cold-1" />
+       <script type="text/javascript" 
src="/~jengo/phpgw_1_9_0/api/skins/default/jscalendar/calendar.js"></script>
+       <script type="text/javascript" 
src="/~jengo/phpgw_1_9_0/api/skins/default/jscalendar/lang/calendar-en.js"></script>
+       <script type="text/javascript" 
src="/~jengo/phpgw_1_9_0/api/skins/default/jscalendar/calendar-setup.js"></script>
+
+       <input type="text" name="{$var_name}" id="f_{$var_name}_c" readonly="1" 
value="{$default}" />&#160;
+       <img src="{$api_image_path}/calendar_popup.png" 
id="f_{$var_name}_trigger" title="Select date" style="cursor:pointer; 
cursor:hand;" />
+
+       <script type="text/javascript">
+               Calendar.setup({
+                       inputField     :    "f_<xsl:value-of select="$var_name" 
/>_c",     // id of the input field
+                       ifFormat       :    "%B %e, %Y",      // format of the 
input field
+                       button         :    "f_<xsl:value-of select="$var_name" 
/>_trigger",  // trigger for the calendar (button ID)
+                       align          :    "Tl",           // alignment 
(defaults to "Bl")
+                       singleClick    :    true
+               });
+       </script>
+</xsl:template>
+
+
 <!--

 <select name=lr>

====================================================
Index: api/skins/default/admin.xsl
diff -u api/skins/default/admin.xsl:1.1.2.3 api/skins/default/admin.xsl:1.1.2.4
--- api/skins/default/admin.xsl:1.1.2.3 Fri Nov 21 00:59:46 2003
+++ api/skins/default/admin.xsl Thu Dec 25 02:20:18 2003
@@ -10,7 +10,7 @@

 <xsl:template match="APP[action_type='current_users']">
        <br />
-       <table class="normalbox" cellSpacing="0" cellPadding="0" width="97%" 
border="0">
+       <table class="normalbox" cellSpacing="0" cellPadding="0" width="97%" 
border="0" align="center">
                <tr>
                        <td class="sideboxtitle" align="center" height="28" 
width="100%">

@@ -28,7 +28,7 @@
                        </td>
                </tr>
                <tr>
-                       <td class="sideboxcontent" bgColor="#efefef">
+                       <td class="articlecontent" bgColor="#efefef">
                                <table class="sideboxtext" cellSpacing="0" 
cellPadding="0" width="100%" border="0" valign="top">
                                        <xsl:for-each 
select="current_users/current_users_item">
                                                <xsl:variable name="lid" 
select="lid" />

====================================================
Index: api/skins/default/login.xsl
diff -u api/skins/default/login.xsl:1.1.1.1.2.8 
api/skins/default/login.xsl:1.1.1.1.2.9
--- api/skins/default/login.xsl:1.1.1.1.2.8     Mon Nov 24 20:14:35 2003
+++ api/skins/default/login.xsl Thu Dec 25 02:20:18 2003
@@ -27,7 +27,7 @@
                <td vAlign="top">
                        <table cellSpacing="0" cellPadding="0" width="100%" 
bgcolor="#ffffff" border="0">
                                <tr>
-                                       <td width="185" rowspan="2" 
align="center" vAlign="top" class="toppannel"><a 
href="http://www.phpgroupware.org/"; target="_blank"><img border="0" 
title="www.phpGroupWare.org"><xsl:attribute name="src"><xsl:value-of 
select="$api_image_path" />/logo.png</xsl:attribute></img></a></td>
+                                       <td width="185" rowspan="2" 
align="left" vAlign="top" class="toppannel"><a 
href="http://www.phpgroupware.org/"; target="_blank"><img border="0" 
title="www.phpGroupWare.org"><xsl:attribute name="src"><xsl:value-of 
select="$api_image_path" />/logo.png</xsl:attribute></img></a></td>
                                        <td colspan="2" valign="top" 
style="background-repeat: repeat-x;"><xsl:attribute 
name="background"><xsl:value-of select="$api_image_path" 
/>/panel.png</xsl:attribute></td>
                                        <td width="15" rowspan="2" vAlign="top" 
class="toppannel">&#160;</td>
                                </tr>

====================================================
Index: api/skins/default/account_mgr.xsl
diff -u api/skins/default/account_mgr.xsl:1.1.2.21 
api/skins/default/account_mgr.xsl:1.1.2.22
--- api/skins/default/account_mgr.xsl:1.1.2.21  Mon Dec  1 23:55:34 2003
+++ api/skins/default/account_mgr.xsl   Thu Dec 25 02:20:18 2003
@@ -8,11 +8,35 @@

 <xsl:template match="APP[action_type='accounts']">
        <br />
-       <table class="normalbox" cellSpacing="1" cellPadding="0" width="80%" 
border="0">
-               <tr>
+       <table cellSpacing="1" cellPadding="0" width="80%" border="0" 
align="center">
+               <tr>
+                       <td width="100%">
+                               <table border="0" width="100%">
+                                       <tr>
+                                               <td align="left">
+                                                       <xsl:call-template 
name="nextmatchs_left">
+                                                               <xsl:with-param 
name="op" select="concat($baseurl,'&amp;op=api.account_mgr.start')" />
+                                                       </xsl:call-template>
+                                               </td>
+                                               <td align="center">
+                                                       <xsl:value-of 
select="/PHPGW/API/nextmatchs/text" />
+                                               </td>
+                                               <td align="right">
+                                                       <xsl:call-template 
name="nextmatchs_right">
+                                                               <xsl:with-param 
name="op" select="concat($baseurl,'&amp;op=api.account_mgr.start')" />
+                                                       </xsl:call-template>
+                                               </td>
+                                       </tr>
+                               </table>
+                       </td>
+               </tr>
+       </table>
+
+       <table class="normalbox" cellSpacing="1" cellPadding="0" width="80%" 
border="0" align="center">
+               <tr>
                        <td class="sideboxtitle" align="center" height="28" 
width="100%">

-                               <table border="0" width="100%" cellspacing="0" 
cellpadding="0" class="normalbox_title">
+                               <table class="normalbox_title" border="0" 
width="100%" cellspacing="0" cellpadding="0">
                                        <tr>
                                                <td 
width="31%"><b>LoginID</b></td>
                                                <td width="31%"><b>First 
name</b></td>
@@ -25,13 +49,13 @@
                        </td>
                </tr>
                <tr>
-                       <td class="sideboxcontent" bgColor="#efefef">
-                               <table class="sideboxtext" cellSpacing="0" 
cellPadding="0" width="100%" border="0" valign="top">
+                       <td class="articlecontent" bgcolor="#efefef" 
align="center" width="100%">
+                               <table class="sideboxtext" cellspacing="0" 
cellpadding="0" width="100%" border="0" valign="top" align="center">
                                        <xsl:for-each 
select="accounts/accounts_item">
                                        <xsl:variable name="account_id" 
select="account_id" />
                                        <xsl:variable name="account_lid" 
select="account_lid" />
                                        <tr class="sideboxtext">
-                                               <xsl:choose>
+                                               <xsl:choose>
                                                        <xsl:when 
test="position() mod 2 = 1">
                                                                <xsl:attribute 
name="class">row_on</xsl:attribute>
                                                        </xsl:when>
@@ -78,9 +102,7 @@
 </xsl:template>

 <xsl:template match="APP[action_type='add_account']">
-       <br />
-       <form method="POST">
-       <input type="hidden" name="create_account_submit" value="True" />
+       <input type="hidden" name="form_submit" value="True" />

        <table width="95%" align="center">
                <tr>
@@ -146,10 +168,7 @@
                                                        <xsl:variable 
name="prevop" select="/PHPGW/API/prevop" />

                                                        <table width="100%" 
border="0">
-                                                               <td 
align="left" width="24"><input type="image" name="op" 
src="{$api_image_path}/clearform.png" value="api.statecache.clear" alt="Clear 
Form" title="Clear Form" /></td>
-                                                               <td 
align="left" width="24"><input type="image" name="op" 
src="{$api_image_path}/pause.png" value="api.statecache.pause" alt="Place form 
on hold" title="Place form on hold" /></td>
                                                                <td 
width="*">&#160;</td>
-                                                               <td 
align="right" width="24"><input type="image" name="op" 
src="{$api_image_path}/cancel.png" value="api.admin.start" alt="Cancel" 
title="Cancel" /></td>
                                                                <td 
align="right" width="24"><input type="image" name="op" 
src="{$api_image_path}/save.png" value="api.account_mgr.create" alt="Create" 
title="Create" /></td>
                                                        </table>
                                                </td>
@@ -166,14 +185,12 @@
        </tr>

        </table>
-       </form>

        <p>&#160;</p>
 </xsl:template>

 <xsl:template match="APP[action_type='edit_account']">
-       <br />
-       <form method="POST">
+
        <input type="hidden" name="edit_account_submit" value="True" />
        <input type="hidden" name="account_id" value="{account_id}" />

@@ -236,9 +253,7 @@
                                                <td colspan="3">
                                                        <table width="100%" 
border="0">
                                                                <td 
align="left" width="24"><input type="image" name="op" 
src="{$api_image_path}/clearform.png" value="api.statecache.clear" alt="Clear 
Form" title="Clear Form" /></td>
-                                                               <td 
align="left" width="24"><input type="image" name="op" 
src="{$api_image_path}/pause.png" value="api.statecache.pause" alt="Place form 
on hold" title="Place form on hold" /></td>
                                                                <td 
width="*">&#160;</td>
-                                                               <td 
align="right" width="24"><input type="image" name="op" 
src="{$api_image_path}/cancel.png" value="api.statecache.cancel" alt="Cancel" 
title="Cancel" /></td>
                                                                <td 
align="right" width="24"><input type="image" name="op" 
src="{$api_image_path}/save.png" value="api.account_mgr.edit" alt="Save 
changes" title="Save changes" /></td>
                                                        </table>
                                                </td>
@@ -248,7 +263,6 @@
                        </td>
                </tr>
        </table>
-       </form>

        <p>&#160;</p>
 </xsl:template>
@@ -340,9 +354,6 @@
                                                                <tr>
                                                                        <td 
colspan="2">&#160;</td>
                                                                </tr>
-                                                               <tr>
-                                                                       <td 
colspan="2" align="right"><input type="image" name="op" 
src="{$api_image_path}/cancel.png" value="api.statecache.cancel" alt="Done" 
title="Done" /></td>
-                                                               </tr>
                                                        </table>
                                                </td>
                                        </tr>

====================================================
Index: api/skins/default/default.css
diff -u api/skins/default/default.css:1.1.1.1.2.9 
api/skins/default/default.css:1.1.1.1.2.10
--- api/skins/default/default.css:1.1.1.1.2.9   Mon Nov  3 10:52:38 2003
+++ api/skins/default/default.css       Thu Dec 25 02:20:18 2003
@@ -191,7 +191,7 @@
        height: 20px
 }

-.row_on
+.row_on, .th_bright
 {
        background: #DDDDDD;
 }
@@ -201,3 +201,35 @@
        background: #EEEEEE;
 }

+.tab
+{
+       border-style: solid;
+       border-width: 1px 1px 0px;
+       border-color: black;
+       padding: 4px;
+       width: 60px;
+}
+
+.tab_active
+{
+       border-style: solid;
+       border-width: 1px 1px 0px;
+       border-color: black;
+       padding: 6px;
+       width: 60px;
+}
+
+.tab_body
+{
+       border-style: solid;
+       border-color: black;
+       border-width: 1px;
+}
+
+.th
+{
+       background: #D3DCE3;
+       font-weight: bold;
+}
+
+

====================================================
Index: acl_popup.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
<xsl:output indent="yes"/>

<xsl:variable name="baseurl" select="/PHPGW/API/baseurl"/>
<xsl:variable name="api_image_path">api/skins/<xsl:value-of 
select="/PHPGW/API/prefs/api.skin" />/images</xsl:variable>
<xsl:variable name="app_image_path"><xsl:value-of 
select="/PHPGW/API/op/appname" />/skins/<xsl:value-of 
select="/PHPGW/API/prefs/api.skin" />/images</xsl:variable>

<xsl:template match="/">
<html>
<head>
        <title>phpGroupWare ACL manager</title>
        <xsl:for-each select="/PHPGW/API/css_list/css_list_item">
                <link rel="stylesheet" type="text/css" 
href="{app}/skins/default/{file}.css"/>
        </xsl:for-each>
</head>

<body onUnload="parent.location.reload()">
        <form name="acl_manager">
                <script>
                        function enable_checkboxes()
                        {
                                for (var i=0; i &lt; 
document.acl_manager.elements.length; i++)
                                {
                                        if 
(document.acl_manager.elements[i].type == 'checkbox')
                                        {
                                                
document.acl_manager.elements[i].disabled = 0;

                                                if 
(document.acl_manager.elements[i].name == 'acl_allow[]')
                                                {
                                                        
document.acl_manager.elements[i].checked = 0;
                                                }

                                                if 
(document.acl_manager.elements[i].name == 'acl_deny[]')
                                                {
                                                        
document.acl_manager.elements[i].checked = 1;
                                                }
                                        }
                                }
                        }

                        // FIXME: If you click on the same checkbox 2 times, it 
will leave it unchecked
                        // Which is not correct, I couldn't find a good way to 
handle this without lots of
                        // sloppy code.  Needless to say, I suck at Javascript 
:P                  (jengo)
                        function acl_click(value,name)
                        {
                                var other_name;
                                if (name == 'acl_allow[]')
                                {
                                        other_name = 'acl_deny[]';
                                }
                                else
                                {
                                        other_name = 'acl_allow[]';
                                }

                                for (var i=0; i &lt; 
document.acl_manager.elements.length; i++)
                                {
                                        if 
(document.acl_manager.elements[i].type == 'checkbox')
                                        {
                                                if 
(document.acl_manager.elements[i].name == other_name)
                                                {
                                                        if 
(document.acl_manager.elements[i].value == value)
                                                        {
                                                                
document.acl_manager.elements[i].checked = 0;
                                                        }
                                                }
                                        }
                                }
                        }

                        function save()
                        {
                                opener.location.reload();
                                windown.opener.location.reload();
                                window.close();
                        }
                </script>

                <input type="hidden" name="location" 
value="{/PHPGW/APP/acl_location}" />
                <input type="hidden" name="form_submit" value="True" />

                <div align="right">
                        <input type="image" src="{$api_image_path}/close.png" />
                </div>

                <table border="0" width="100%">
                        <tr>
                                <td width="50%" align="center">
                                        <select name="account" size="10">
                                                <xsl:for-each 
select="/PHPGW/APP/acl_accounts/acl_accounts_item">
                                                        <option 
value="{account_id}" onclick="javascript: enable_checkboxes();">
                                                                [<xsl:value-of 
select="account_type" />]
                                                                
&#160;&lt;<xsl:value-of select="account_lid" />&gt;
                                                                
&#160;<xsl:value-of select="account_lastname" />,
                                                                
&#160;<xsl:value-of select="account_firstname" />
                                                        </option>
                                                </xsl:for-each>
                                        </select>
                                </td>
                                <td width="50%" align="center" valign="top">
                                        <table border="0" width="100%">
                                                <tr>
                                                        <td>&#160;</td>
                                                        <td 
align="left">Allow</td>
                                                        <td 
align="left">Deny</td>
                                                </tr>

                                                <tr>
                                                        <td 
align="left">Read</td>
                                                        <td><input 
type="checkbox" name="acl_allow[]" value="1" disabled="True" 
onclick="javascript: acl_click(1,'acl_allow[]');" /></td>
                                                        <td><input 
type="checkbox" name="acl_deny[]" value="1" disabled="True" 
onclick="javascript: acl_click(1,'acl_deny[]');" /></td>
                                                </tr>
                                                <tr>
                                                        <td 
align="left">Update</td>
                                                        <td><input 
type="checkbox" name="acl_allow[]" value="2" disabled="True" 
onclick="javascript: acl_click(2,'acl_allow[]');" /></td>
                                                        <td><input 
type="checkbox" name="acl_deny[]" value="2" disabled="True" 
onclick="javascript: acl_click(2,'acl_deny[]');" /></td>
                                                </tr>
                                                <tr>
                                                        <td 
align="left">Delete</td>
                                                        <td><input 
type="checkbox" name="acl_allow[]" value="4" disabled="True" 
onclick="javascript: acl_click(4,'acl_allow[]');" /></td>
                                                        <td><input 
type="checkbox" name="acl_deny[]" value="4" disabled="True" 
onclick="javascript: acl_click(4,'acl_deny[]');" /></td>
                                                </tr>
                                        </table>
                                </td>
                        </tr>
                </table>
                <div align="right">
                        <input type="image" src="{$api_image_path}/save.png" 
onclick="javascript: save();"/>&#160; &#160;
                        <!-- name="op" value="api.base.acl" -->
                </div>
        </form>
</body>
</html>

</xsl:template>

<xsl:template match="APP">
</xsl:template>

</xsl:stylesheet>







reply via email to

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