phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.custom_fields.inc.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] phpgwapi/inc class.custom_fields.inc.php
Date: Mon, 08 Jan 2007 22:41:01 +0000

CVSROOT:        /sources/phpgwapi
Module name:    phpgwapi
Changes by:     Sigurd Nes <sigurdne>   07/01/08 22:41:01

Modified files:
        inc            : class.custom_fields.inc.php 

Log message:
        jscalendar

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.custom_fields.inc.php?cvsroot=phpgwapi&r1=1.16&r2=1.17

Patches:
Index: class.custom_fields.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.custom_fields.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- class.custom_fields.inc.php 29 Nov 2006 12:53:16 -0000      1.16
+++ class.custom_fields.inc.php 8 Jan 2007 22:41:01 -0000       1.17
@@ -8,7 +8,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package phpgwapi
-       * @version $Id: class.custom_fields.inc.php,v 1.16 2006/11/29 12:53:16 
skwashd Exp $
+       * @version $Id: class.custom_fields.inc.php,v 1.17 2007/01/08 22:41:01 
sigurdne Exp $
        */
 
        /**
@@ -1093,16 +1093,28 @@
                        ksort($dlarr);
 
                        $dateformat= (implode($sep,$dlarr));
-
+//_debug_array($values['attributes']);
                        $m=0;
                        for ($i=0;$i<count($values['attributes']);$i++)
                        {
                                $values['attributes'][$i]['datatype_text']      
= $this->translate_datatype($values['attributes'][$i]['datatype']);
-                               if($values['attributes'][$i]['datatype']=='D' 
&& $values['attributes'][$i]['value'])
+                               if($values['attributes'][$i]['datatype']=='D')
+                               {
+                                       if(!isset($jscal) || !is_object($jscal))
+                                       {
+                                               $jscal = 
CreateObject('phpgwapi.jscalendar');
+                                       }
+
+                                       
$jscal->add_listener('values_attribute_' . 
$values['attributes'][$i]['column_name']);
+                                       $values['attributes'][$i]['img_cal']= 
$GLOBALS['phpgw']->common->image('phpgwapi','cal');
+                                       
$values['attributes'][$i]['lang_datetitle']= lang('Select date');
+
+                                       
if(isset($values['attributes'][$i]['value']) && 
$values['attributes'][$i]['value'])
                                {
                                        $timestamp_date= 
mktime(0,0,0,date(m,strtotime($values['attributes'][$i]['value'])),date(d,strtotime($values['attributes'][$i]['value'])),date(y,strtotime($values['attributes'][$i]['value'])));
                                        $values['attributes'][$i]['value']      
= $GLOBALS['phpgw']->common->show_date($timestamp_date,$dateformat);
                                }
+                               }
                                if($values['attributes'][$i]['datatype']=='AB')
                                {
                                        if($values['attributes'][$i]['value'])
@@ -1202,7 +1214,6 @@
                                
$GLOBALS['phpgw']->session->appsession('insert_record_values' . 
$location,$appname,$insert_record_values);
                        }
 
-//_debug_array($values);
                        return $values;
                }
 




reply via email to

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