fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7569] more on demo


From: Sigurd Nes
Subject: [Fmsystem-commits] [7569] more on demo
Date: Thu, 08 Sep 2011 18:28:36 +0000

Revision: 7569
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7569
Author:   sigurdne
Date:     2011-09-08 18:28:35 +0000 (Thu, 08 Sep 2011)
Log Message:
-----------
more on demo

Modified Paths:
--------------
    trunk/demo/inc/class.sodemo.inc.php
    trunk/demo/inc/class.uidemo.inc.php
    trunk/demo/templates/base/attributes_form.xsl
    trunk/demo/templates/base/edit.xsl

Added Paths:
-----------
    trunk/demo/setup/phpgw_no.lang

Modified: trunk/demo/inc/class.sodemo.inc.php
===================================================================
--- trunk/demo/inc/class.sodemo.inc.php 2011-09-08 16:55:49 UTC (rev 7568)
+++ trunk/demo/inc/class.sodemo.inc.php 2011-09-08 18:28:35 UTC (rev 7569)
@@ -427,7 +427,7 @@
                                }
                        }
 
-                       if (isset($values_attribute) AND 
is_array($values_attribute))
+                       if (isset($values_attribute) && 
is_array($values_attribute))
                        {
                                foreach($values_attribute as $entry)
                                {
@@ -444,7 +444,7 @@
                                                        {
                                                                
if($entry['value'] == $entry['value2'])
                                                                {
-                                                                       $cols[] 
= $entry['column_name'];
+                                                                       $cols[] 
= $entry['name'];
                                                                        $vals[] 
= md5($entry['value']);
                                                                }
                                                                else
@@ -454,7 +454,7 @@
                                                        }
                                                        else
                                                        {
-                                                               $cols[] = 
$entry['column_name'];
+                                                               $cols[] = 
$entry['name'];
                                                                $vals[] = 
$entry['value'];
                                                        }
 
@@ -527,7 +527,7 @@
                                                        {
                                                                
if($entry['value'] == $entry['value2'])
                                                                {
-                                                                       
$value_set[$entry['column_name']]       = md5($entry['value']);
+                                                                       
$value_set[$entry['name']]      = md5($entry['value']);
                                                                }
                                                                else
                                                                {
@@ -537,7 +537,7 @@
                                                }
                                                else
                                                {
-                                                       
$value_set[$entry['column_name']]       = $entry['value'];
+                                                       
$value_set[$entry['name']]      = $entry['value'];
                                                }
                                        }
                                }

Modified: trunk/demo/inc/class.uidemo.inc.php
===================================================================
--- trunk/demo/inc/class.uidemo.inc.php 2011-09-08 16:55:49 UTC (rev 7568)
+++ trunk/demo/inc/class.uidemo.inc.php 2011-09-08 18:28:35 UTC (rev 7569)
@@ -758,13 +758,13 @@
                                                if (isset($values['save']) && 
$values['save'])
                                                {
                                                        
$GLOBALS['phpgw']->session->appsession('session_data','demo_receipt',$receipt);
-                                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=> 
'demo.uidemo.index', 'output'=> $output));
+                                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=> 
'demo.uidemo.index2', 'output'=> $output));
                                                }
                                        }
                                }
                                else
                                {
-                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=> 
'demo.uidemo.index', 'output'=> $output));
+                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=> 
'demo.uidemo.index2', 'output'=> $output));
                                }
                        }
 
@@ -874,7 +874,7 @@
                                'value_id'                                      
        => $demo_id,
 
                                'cat_select'                                    
=> $this->cats->formatted_xslt_list(array('select_name' => 
'values[cat_id]','selected' => 
(isset($values['cat_id'])?$values['cat_id']:''))),
-                               'attributes_values'                             
=> $values['attributes'],
+                               'custom_attributes'                             
=> array('attributes' => $values['attributes']),
                                'value_access'                                  
=> isset($values['access'])?$values['access']:'',
                                'generic_list_1'                                
=> array('options' => $generic_list_1),
                                'generic_list_2'                                
=> array('options' => $generic_list_2),
@@ -886,7 +886,9 @@
                                'property_js'                                   
=> 
json_encode($GLOBALS['phpgw_info']['server']['webserver_url']."/property/js/yahoo/property2.js"),
                                'datatable'                                     
        => $datavalues,
                                'myColumnDefs'                                  
=> $myColumnDefs,
-                               'tabs'                                          
                => self::_generate_tabs(),
+                               'tabs'                                          
        => self::_generate_tabs(),
+                               'textareacols'                                  
=> 60,
+                               'textarearows'                                  
=> 10
                        );
 
                        $GLOBALS['phpgw']->richtext->replace_element('remark');
@@ -923,6 +925,7 @@
                                'list'          => array('label' => 
lang('list'), 'link' => '#list'),
                                'tables'        => array('label' => 
lang('inline tables'), 'link' => '#tables'),
                                'dates'         => array('label' => 
lang('dates'), 'link' => '#dates'),
+                               'custom'        => array('label' => 
lang('custom attributes'), 'link' => '#custom'),
                        );
 
                        phpgwapi_yui::tabview_setup('demo_tabview');

Added: trunk/demo/setup/phpgw_no.lang
===================================================================
--- trunk/demo/setup/phpgw_no.lang                              (rev 0)
+++ trunk/demo/setup/phpgw_no.lang      2011-09-08 18:28:35 UTC (rev 7569)
@@ -0,0 +1,15 @@
+demo app       demo    no      Demonstrasjonsmodul
+demo   common  no      Demo Modul
+Add    demo    no      Legg til
+Delete demo    no      Slett
+Edit   demo    no      Editer
+View   demo    no      Vis
+apply  demo    no      Mellomlagre
+list   demo    no      Liste
+general        demo    no      Generell
+dates  demo    no      Datoer
+custom attributes      demo    no      Egendefinerte attributter
+no category    demo    no      Kategori ikke valgt
+time created   demo    no      Tidsstempel
+inline tables  demo    no      Tabeller
+table  demo    no      Tabell

Modified: trunk/demo/templates/base/attributes_form.xsl
===================================================================
--- trunk/demo/templates/base/attributes_form.xsl       2011-09-08 16:55:49 UTC 
(rev 7568)
+++ trunk/demo/templates/base/attributes_form.xsl       2011-09-08 18:28:35 UTC 
(rev 7569)
@@ -1,31 +1,27 @@
 <!-- $Id$ -->
-
        <xsl:template name="attributes_form">
                <xsl:apply-templates select="attributes_values"/>
        </xsl:template>
 
-       <xsl:template match="attributes_values">
-               <xsl:variable name="statustext"><xsl:value-of 
select="statustext"/></xsl:variable>
+
+       <xsl:template name="attributes_values" xmlns:php="http://php.net/xsl";>
+               <xsl:for-each select="attributes_group" >
+                       <div id="{link}">
+                               <table cellpadding="2" cellspacing="2" 
width="100%" align="center" border="0">
+                                       <xsl:apply-templates 
select="attributes"/>
+                               </table>
+                       </div>
+               </xsl:for-each>
+       </xsl:template>
+
+       <xsl:template match="attributes" xmlns:php="http://php.net/xsl";>
+                       <xsl:variable name="statustext"><xsl:value-of 
select="statustext"/></xsl:variable>
                        <tr>
-                               <xsl:attribute name="class">
+                               <td align="left" width="19%" valign="top" 
title="{$statustext}">
                                        <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>
-
-                               <td class="{class}" align="left" valign="top" 
title="{$statustext}" style="cursor:help">
-                                       <xsl:choose>
                                                <xsl:when test="helpmsg=1">
-                                                       <xsl:variable 
name="help_url"><xsl:value-of select="help_url"/>&amp;attrib_id=<xsl:value-of 
select="attrib_id"/></xsl:variable>
-                                                       <a href="javascript:var 
w=window.open('{$help_url}','','width=550,height=400,scrollbars')">
+                                                       <xsl:variable 
name="help_url"><xsl:value-of select="help_url"/></xsl:variable>
+                                                       <a href="javascript:var 
w=window.open('{$help_url}','','left=50,top=100,width=550,height=400,scrollbars')">
                                                                
<xsl:text>[</xsl:text><xsl:value-of select="input_text"/><xsl:text>]</xsl:text>
                                                        </a>
                                                </xsl:when>
@@ -39,10 +35,10 @@
                                                        <xsl:text>[ </xsl:text>
                                                        <xsl:choose>
                                                                <xsl:when 
test="value!=''">
-                                                                       
<xsl:value-of select="//lang_edit"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'edit')" />
                                                                </xsl:when>
                                                                <xsl:otherwise>
-                                                                       
<xsl:value-of select="//lang_add"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'add')" />
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                        <xsl:text> ]</xsl:text>
@@ -52,11 +48,11 @@
                                <td align="left">
                                        <xsl:choose>
                                                <xsl:when test="name!=''">
-                                                       <input type="hidden" 
name="values_attribute[{counter}][column_name]" value="{column_name}"></input>
+                                                       <input type="hidden" 
name="values_attribute[{counter}][name]" value="{name}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][datatype]" value="{datatype}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][history]" value="{history}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][attrib_id]" value="{id}"></input>
-                                                       <input type="hidden" 
name="values_attribute[{counter}][allow_null]" value="{allow_null}"></input>
+                                                       <input type="hidden" 
name="values_attribute[{counter}][nullable]" value="{nullable}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][input_text]" value="{input_text}"></input>
                                                        <xsl:choose>
                                                                <xsl:when 
test="datatype='R'">
@@ -66,7 +62,7 @@
                                                                        
<xsl:call-template name="choice"/>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='LB'">
-                                                                       <select 
name="values_attribute[{counter}][value]" class="forms" 
onMouseover="window.status='{statustext}'; return true;" 
onMouseout="window.status='';return true;">
+                                                                       <select 
name="values_attribute[{counter}][value]" class="forms">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -74,8 +70,10 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<option value=""><xsl:value-of select="//lang_none"/></option>
-                                                                               
<xsl:for-each select="choice">  
+                                                                               
<option value="">
+                                                                               
        <xsl:value-of select="php:function('lang', 'select')" />
+                                                                               
</option>
+                                                                               
<xsl:for-each select="choice">
                                                                                
        <xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="checked='checked'">
@@ -84,46 +82,115 @@
                                                                                
                <xsl:otherwise>
                                                                                
                        <option value="{$id}"><xsl:value-of 
disable-output-escaping="yes" select="value"/></option>
                                                                                
                </xsl:otherwise>
-                                                                               
        </xsl:choose>                           
+                                                                               
        </xsl:choose>
                                                                                
</xsl:for-each>
                                                                        
</select>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='AB'">
-                                                                       
<xsl:variable name="contact_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
-                                                                       
<xsl:variable name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="5" onMouseout="window.status='';return true;" >
+                                                                       <table>
+                                                                               
<tr>
+                                                                               
        <td>
+                                                                               
                <xsl:variable name="contact_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
+                                                                               
                <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
                <xsl:variable 
name="clear_function"><xsl:text>clear_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
                <input type="hidden" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="5">
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="disabled!=''">
+                                                                               
                                        <xsl:attribute name="disabled">
+                                                                               
                                                <xsl:text> disabled</xsl:text>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </xsl:when>
+                                                                               
                        </xsl:choose>
+                                                                               
                </input>
+                                                                               
                <input  size="30" type="text" name="{$contact_name}" 
value="{contact_name}"  onClick="{$lookup_function}" readonly="readonly"> 
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="disabled!=''">
+                                                                               
                                        <xsl:attribute name="disabled">
+                                                                               
                                                <xsl:text> disabled</xsl:text>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </xsl:when>
+                                                                               
                        </xsl:choose>
+                                                                               
                </input>
+                                                                               
                <input type="checkbox" name="clear_{name}_box"  
onClick="{$clear_function}" >
+                                                                               
                        <xsl:attribute name="title">
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'delete')" />
+                                                                               
                        </xsl:attribute>
+                                                                               
                        <xsl:attribute name="readonly">
+                                                                               
                                <xsl:text>readonly</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </td>
+                                                                               
</tr>
                                                                                
<xsl:choose>
-                                                                               
        <xsl:when test="disabled!=''">
-                                                                               
                <xsl:attribute name="disabled">
-                                                                               
                        <xsl:text> disabled</xsl:text>
-                                                                               
                </xsl:attribute>
+                                                                               
        <xsl:when test="contact_tel!=''">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <xsl:value-of select="contact_tel"/>
+                                                                               
                        </td>
+                                                                               
                </tr>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                                       <input  
size="30" type="text" name="{$contact_name}" value="{contact_name}"  
onClick="{$lookup_function}" readonly="readonly"> 
                                                                                
<xsl:choose>
-                                                                               
        <xsl:when test="disabled!=''">
-                                                                               
                <xsl:attribute name="disabled">
-                                                                               
                        <xsl:text> disabled</xsl:text>
-                                                                               
                </xsl:attribute>
+                                                                               
        <xsl:when test="contact_email!=''">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <a href="mailto:{contact_email}";><xsl:value-of 
select="contact_email"/></a>
+                                                                               
                        </td>
+                                                                               
                </tr>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                                                       </table>
                                                                </xsl:when>
+                                                               <xsl:when 
test="datatype='ABO'">
+                                                                       <table>
+                                                                               
<tr>
+                                                                               
        <td>
+                                                                               
                <xsl:variable name="org_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
+                                                                               
                <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
                <input type="hidden" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="5">
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="disabled!=''">
+                                                                               
                                        <xsl:attribute name="disabled">
+                                                                               
                                                <xsl:text> disabled</xsl:text>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </xsl:when>
+                                                                               
                        </xsl:choose>
+                                                                               
                </input>
+                                                                               
                <input  size="30" type="text" name="{$org_name}" 
value="{org_name}"  onClick="{$lookup_function}" readonly="readonly"> 
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="disabled!=''">
+                                                                               
                                        <xsl:attribute name="disabled">
+                                                                               
                                                <xsl:text> disabled</xsl:text>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </xsl:when>
+                                                                               
                        </xsl:choose>
+                                                                               
                </input>
+                                                                               
        </td>
+                                                                               
</tr>
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="org_tel!=''">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <xsl:value-of select="org_tel"/>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="org_email!=''">
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <a href="mailto:{org_email}";><xsl:value-of 
select="org_email"/></a>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                       </table>
+                                                               </xsl:when>
                                                                <xsl:when 
test="datatype='VENDOR'">
                                                                        
<xsl:variable name="vendor_name"><xsl:value-of 
select="name"/><xsl:text>_org_name</xsl:text></xsl:variable>
                                                                        
<xsl:variable name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6" onMouseout="window.status='';return true;" >
+                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -131,11 +198,6 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
                                                                        <input  
size="30" type="text" name="{$vendor_name}" value="{vendor_name}"  
onClick="{$lookup_function}" readonly="readonly"> 
                                                                                
<xsl:choose>
@@ -145,17 +207,12 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
-                                                               </xsl:when>     
+                                                               </xsl:when>
                                                                <xsl:when 
test="datatype='user'">
                                                                        
<xsl:variable name="user_name"><xsl:value-of 
select="name"/><xsl:text>_user_name</xsl:text></xsl:variable>
                                                                        
<xsl:variable name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6" onMouseout="window.status='';return true;" >
+                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -163,11 +220,6 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
                                                                        <input  
size="30" type="text" name="{$user_name}" value="{user_name}"  
onClick="{$lookup_function}" readonly="readonly"> 
                                                                                
<xsl:choose>
@@ -177,23 +229,13 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='D'">
-                                                                       <input 
type="text" id="values_attribute_{counter}" 
name="values_attribute[{counter}][value]" value="{value}"  size="12" 
maxlength="12"  onMouseout="window.status='';return true;" >
+                                                                       <input 
type="text" id="values_attribute_{counter}" 
name="values_attribute[{counter}][value]" value="{value}"  size="12" 
maxlength="12" >
                                                                                
<xsl:attribute name="readonly">
                                                                                
        <xsl:text> readonly</xsl:text>
                                                                                
</xsl:attribute>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>';return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -205,7 +247,7 @@
                                                                        <img 
id="values_attribute_{counter}-trigger" src="{img_cal}" alt="{lang_datetitle}" 
title="{lang_datetitle}" style="cursor:pointer; cursor:hand;" />
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='T'">
-                                                                       
<textarea cols="40" rows="6" name="values_attribute[{counter}][value]" 
wrap="virtual" onMouseout="window.status='';return true;">
+                                                                       
<textarea cols="{//textareacols}" rows="{//textarearows}" 
name="values_attribute[{counter}][value]" >
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -213,19 +255,14 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
        <xsl:text>';return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:value-of select="value"/>          
+                                                                               
<xsl:value-of select="value"/>
                                                                        
</textarea>
                                                                </xsl:when>
                                                                <xsl:when 
test="datatype='pwd'">
                                                                        <table>
                                                                                
<tr>
                                                                                
        <td>
-                                                                               
                <input type="password" 
name="values_attribute[{counter}][value]"  size="30" 
onMouseout="window.status='';return true;" >
+                                                                               
                <input type="password" 
name="values_attribute[{counter}][value]"  size="30">
                                                                                
                        <xsl:choose>
                                                                                
                                <xsl:when test="disabled!=''">
                                                                                
                                        <xsl:attribute name="disabled">
@@ -233,40 +270,98 @@
                                                                                
                                        </xsl:attribute>
                                                                                
                                </xsl:when>
                                                                                
                        </xsl:choose>
-                                                                               
                        <xsl:attribute name="onMouseover">
-                                                                               
                                <xsl:text>window.status='</xsl:text>
-                                                                               
                                        <xsl:value-of select="statustext"/>
-                                                                               
                                        <xsl:text> - </xsl:text>
-                                                                               
                                        <xsl:value-of select="datatype_text"/>
-                                                                               
                                <xsl:text>';return true;</xsl:text>
-                                                                               
                        </xsl:attribute>
                                                                                
                </input>
                                                                                
        </td>
                                                                                
</tr>
                                                                                
<tr>
                                                                                
        <td>
-                                                                               
                <input type="password" 
name="values_attribute[{counter}][value2]"  size="30" 
onMouseout="window.status='';return true;" >
+                                                                               
                <input type="password" 
name="values_attribute[{counter}][value2]"  size="30">
                                                                                
                        <xsl:choose>
                                                                                
                                <xsl:when test="disabled!=''">
                                                                                
                                        <xsl:attribute name="disabled">
                                                                                
                                                <xsl:text> disabled</xsl:text>
                                                                                
                                        </xsl:attribute>
-                                                                               
                                        </xsl:when>
+                                                                               
                                </xsl:when>
                                                                                
                        </xsl:choose>
-                                                                               
                        <xsl:attribute name="onMouseover">
-                                                                               
                                <xsl:text>window.status='</xsl:text>
-                                                                               
                                        <xsl:value-of select="statustext"/>
-                                                                               
                                        <xsl:text> - </xsl:text>
-                                                                               
                                        <xsl:value-of select="datatype_text"/>
-                                                                               
                                <xsl:text>';return true;</xsl:text>
-                                                                               
                        </xsl:attribute>
                                                                                
                </input>
                                                                                
        </td>
                                                                                
</tr>
                                                                        </table>
                                                                </xsl:when>
+                                                               <xsl:when 
test="datatype='bolean'">
+                                                                       <input 
type="checkbox" name="values_attribute[{counter}][value]" value="1">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="value!=''">
+                                                                               
                <xsl:attribute name="checked">
+                                                                               
                        <xsl:text>checked</xsl:text>
+                                                                               
                </xsl:attribute>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                       </input>
+                                                               </xsl:when>
+                                                               <xsl:when 
test="datatype='link'">
+                                                                       <input 
type="text" name="values_attribute[{counter}][value]" value="{value}" size="30">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="disabled!=''">
+                                                                               
                <xsl:attribute name="disabled">
+                                                                               
                        <xsl:text> disabled</xsl:text>
+                                                                               
                </xsl:attribute>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                       </input>
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="value!=''">
+                                                                               
        <br/><a href="{value}" target="_blank"><xsl:value-of 
select="value"/></a>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                               </xsl:when>
+                                                               <xsl:when 
test="datatype='event'">
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="warning!=''">
+                                                                               
        <xsl:value-of select="warning"/>
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
        <xsl:variable name="event_descr"><xsl:value-of 
select="name"/><xsl:text>_descr</xsl:text></xsl:variable>
+                                                                               
        <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
        <table>
+                                                                               
                <tr>
+                                                                               
                        <td>
+                                                                               
                                <input type="text" name="{name}" 
value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="6"></input>
+                                                                               
                                <input  size="30" type="text" 
name="{$event_descr}" value="{descr}"  onClick="{$lookup_function}" 
readonly="readonly"> 
+                                                                               
                                        <xsl:choose>
+                                                                               
                                                <xsl:when test="disabled!=''">
+                                                                               
                                                        <xsl:attribute 
name="disabled">
+                                                                               
                                                                <xsl:text> 
disabled</xsl:text>
+                                                                               
                                                        </xsl:attribute>
+                                                                               
                                                </xsl:when>
+                                                                               
                                        </xsl:choose>
+                                                                               
                                </input>
+                                                                               
                        </td>
+                                                                               
                </tr>
+                                                                               
                <xsl:choose>
+                                                                               
                        <xsl:when test="next!=''">
+                                                                               
                                <tr>
+                                                                               
                                        <td>
+                                                                               
                                                <xsl:value-of 
select="lang_next_run"/>
+                                                                               
                                                <xsl:text>: </xsl:text>
+                                                                               
                                                <xsl:value-of select="next"/>
+                                                                               
                                        </td>
+                                                                               
                                </tr>
+                                                                               
                                <tr>
+                                                                               
                                        <td>
+                                                                               
                                                <xsl:value-of 
select="lang_enabled"/>
+                                                                               
                                                <xsl:text>: </xsl:text>
+                                                                               
                                                <xsl:value-of select="enabled"/>
+                                                                               
                                        </td>
+                                                                               
                                </tr>
+                                                                               
                        </xsl:when>
+                                                                               
                </xsl:choose>
+                                                                               
        </table>
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
+                                                               </xsl:when>
                                                                <xsl:otherwise>
-                                                                       <input 
type="text" name="values_attribute[{counter}][value]" value="{value}" size="30" 
onMouseout="window.status='';return true;" >
+                                                                       <input 
type="text" name="values_attribute[{counter}][value]" value="{value}" size="30">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="disabled!=''">
                                                                                
                <xsl:attribute name="disabled">
@@ -274,34 +369,19 @@
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="statustext"/>
-                                                                               
                <xsl:text> - </xsl:text>
-                                                                               
                <xsl:value-of select="datatype_text"/>
-                                                                               
        <xsl:text>';return true;</xsl:text>
-                                                                               
</xsl:attribute>
                                                                        </input>
                                                                </xsl:otherwise>
                                                        </xsl:choose>
                                                        <xsl:choose>
                                                                <xsl:when 
test="history=1">
-                                                                       <input 
type="text" name="values_attribute[{counter}][date]" value="" 
onFocus="{//dateformat_validate}" onKeyUp="{//onKeyUp}" onBlur="{//onBlur}" 
size="12" maxlength="10"  onMouseout="window.status='';return true;" >
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
                <xsl:value-of select="//lang_history_date_statustext"/>
-                                                                               
        <xsl:text>';return true;</xsl:text>
-                                                                               
</xsl:attribute>
+                                                                       <input 
type="text" name="values_attribute[{counter}][date]" value="" 
onFocus="{//dateformat_validate}" onKeyUp="{//onKeyUp}" onBlur="{//onBlur}" 
size="12" maxlength="10" >
                                                                        </input>
-                                                                       
                                                                        
<xsl:variable name="link_history"><xsl:value-of 
select="link_history"/></xsl:variable>
                                                                        
<xsl:variable name="lang_history_help"><xsl:value-of 
select="//lang_history_help"/></xsl:variable>
                                                                        
<xsl:variable name="lang_history"><xsl:value-of 
select="//lang_history"/></xsl:variable>
-                                                                       <a 
href="javascript:var 
w=window.open('{$link_history}','','width=550,height=400,scrollbars')"
-                                                                       
onMouseOver="overlib('{$lang_history_help}', CAPTION, '{$lang_history}')"
-                                                                       
onMouseOut="nd()">
-                                                                       
<xsl:value-of select="//lang_history"/></a>                                     
-
+                                                                       <a 
href="javascript:var 
w=window.open('{$link_history}','','left=50,top=100,width=550,height=400,scrollbars')"
+                                                                               
title="{$lang_history_help}">
+                                                                               
<xsl:value-of select="//lang_history"/></a>
                                                                </xsl:when>
                                                        </xsl:choose>
                                                </xsl:when>
@@ -312,22 +392,22 @@
 
        <xsl:template name="choice">
                <xsl:variable name="counter"><xsl:value-of 
select="counter"/></xsl:variable>
-                       <table cellpadding="2" cellspacing="2" width="50%" 
align="left">
-                               <xsl:for-each select="choice" >
-                                       <tr>
-                                               <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>
+               <table cellpadding="2" cellspacing="2" width="50%" align="left">
+                       <xsl:for-each select="choice" >
+                               <tr>
+                                       <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>
                                        <td align="left">
                                                <xsl:value-of select="value"/>
                                                <xsl:text> </xsl:text>
@@ -342,7 +422,7 @@
                                                        </xsl:otherwise>
                                                </xsl:choose>
                                        </td>
-                                       </tr>
-                               </xsl:for-each>                         
-                       </table>
+                               </tr>
+                       </xsl:for-each>
+               </table>
        </xsl:template>

Modified: trunk/demo/templates/base/edit.xsl
===================================================================
--- trunk/demo/templates/base/edit.xsl  2011-09-08 16:55:49 UTC (rev 7568)
+++ trunk/demo/templates/base/edit.xsl  2011-09-08 18:28:35 UTC (rev 7569)
@@ -101,15 +101,6 @@
                                                                        
</textarea>
                                                                </td>
                                                        </tr>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="attributes_values != ''">
-                                                                       <tr>
-                                                                               
<td colspan="2" align="left">                           
-                                                                               
        <xsl:call-template name="attributes_form"/>
-                                                                               
</td>
-                                                                       </tr>
-                                                               </xsl:when>
-                                                       </xsl:choose>
                                                        <tr>
                                                                <td>
                                                                        
<xsl:value-of select="php:function('lang', 'private')" />
@@ -220,6 +211,11 @@
                                                        </tr>
                                                </table>
                                        </div>
+                                       <div id="custom">
+                                               <table>
+                                                       <xsl:apply-templates 
select="custom_attributes/attributes"/>
+                                               </table>
+                                       </div>
                                        <table>
                                                <tr height="50">
                                                        <td colspan = "2" align 
= "center"><table><tr>




reply via email to

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