fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9858] property: new calendar


From: Sigurd Nes
Subject: [Fmsystem-commits] [9858] property: new calendar
Date: Wed, 15 Aug 2012 10:30:58 +0000

Revision: 9858
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9858
Author:   sigurdne
Date:     2012-08-15 10:30:58 +0000 (Wed, 15 Aug 2012)
Log Message:
-----------
property: new calendar

Modified Paths:
--------------
    trunk/property/inc/class.custom_fields.inc.php
    trunk/property/inc/class.uientity.inc.php
    trunk/property/templates/base/attributes_form.xsl

Modified: trunk/property/inc/class.custom_fields.inc.php
===================================================================
--- trunk/property/inc/class.custom_fields.inc.php      2012-08-15 09:11:54 UTC 
(rev 9857)
+++ trunk/property/inc/class.custom_fields.inc.php      2012-08-15 10:30:58 UTC 
(rev 9858)
@@ -87,6 +87,12 @@
                        {
                                $attributes['datatype_text']    = 
$this->translate_datatype($attributes['datatype']);
                                $attributes['help_url']                 = 
$attributes['helpmsg'] ? $GLOBALS['phpgw']->link('/index.php', 
array('menuaction'=> 'manual.uimanual.attrib_help', 'appname'=> $appname, 
'location'=> $location, 'id' => $attributes['id'])): '';
+
+                               if(!$view_only && $attributes['history'])
+                               {
+                                       
$GLOBALS['phpgw']->jqcal->add_listener("values_attribute_{$i}_date");
+                               }
+
                                if($attributes['datatype'] == 'D' || 
$attributes['datatype'] == 'DT' || $attributes['datatype'] == 'date' || 
$attributes['datatype'] == 'timestamp')
                                {
                                        if(!$view_only)

Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php   2012-08-15 09:11:54 UTC (rev 
9857)
+++ trunk/property/inc/class.uientity.inc.php   2012-08-15 10:30:58 UTC (rev 
9858)
@@ -1964,43 +1964,8 @@
                        }
 
 
-                       $dateformat = 
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
-                       $sep = '/';
-                       $dlarr[strpos($dateformat,'y')] = 'yyyy';
-                       $dlarr[strpos($dateformat,'m')] = 'MM';
-                       $dlarr[strpos($dateformat,'d')] = 'DD';
-                       ksort($dlarr);
-
-                       $dateformat= (implode($sep,$dlarr));
-
-                       switch(substr($dateformat,0,1))
-                       {
-                       case 'M':
-                               $dateformat_validate= 
"javascript:vDateType='1'";
-                               $onKeyUp        = 
"DateFormat(this,this.value,event,false,'1')";
-                               $onBlur         = 
"DateFormat(this,this.value,event,true,'1')";
-                               break;
-                       case 'y':
-                               $dateformat_validate="javascript:vDateType='2'";
-                               $onKeyUp        = 
"DateFormat(this,this.value,event,false,'2')";
-                               $onBlur         = 
"DateFormat(this,this.value,event,true,'2')";
-                               break;
-                       case 'D':
-                               $dateformat_validate="javascript:vDateType='3'";
-                               $onKeyUp        = 
"DateFormat(this,this.value,event,false,'3')";
-                               $onBlur         = 
"DateFormat(this,this.value,event,true,'3')";
-                               break;
-                       }
-                       
$GLOBALS['phpgw']->js->validate_file('dateformat','dateformat','property');
-
-
                        $data = array
                                (
-                                       'lang_dateformat'                       
        => strtolower($dateformat),
-                                       'dateformat_validate'                   
=> $dateformat_validate,
-                                       'onKeyUp'                               
                => $onKeyUp,
-                                       'onBlur'                                
                => $onBlur,
-
                                        'property_js'                           
        => 
json_encode($GLOBALS['phpgw_info']['server']['webserver_url']."/property/js/yahoo/property2.js"),
                                        'datatable'                             
                => $datavalues,
                                        'myColumnDefs'                          
        => $myColumnDefs,       

Modified: trunk/property/templates/base/attributes_form.xsl
===================================================================
--- trunk/property/templates/base/attributes_form.xsl   2012-08-15 09:11:54 UTC 
(rev 9857)
+++ trunk/property/templates/base/attributes_form.xsl   2012-08-15 10:30:58 UTC 
(rev 9858)
@@ -556,7 +556,7 @@
                                                </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">
+                                                               <input 
type="text" id="values_attribute_{counter}_date" 
name="values_attribute[{counter}][date]" value="" size="12" maxlength="10">
                                                                </input>
                                                                <xsl:variable 
name="link_history">
                                                                        
<xsl:value-of select="link_history"/>




reply via email to

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