[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] etemplate/inc class.date_widget.inc.php, 1.13.2.5, 1
From: |
Dave Hall <address@hidden> |
Subject: |
[Phpgroupware-cvs] etemplate/inc class.date_widget.inc.php, 1.13.2.5, 1.13.2.6 |
Date: |
Sun, 16 Nov 2003 16:31:12 +0000 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv24958
Modified Files:
Tag: Version-0_9_16-branch
class.date_widget.inc.php
Log Message:
readd jscal
Index: class.date_widget.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.date_widget.inc.php,v
retrieving revision 1.13.2.5
retrieving revision 1.13.2.6
diff -C2 -d -r1.13.2.5 -r1.13.2.6
*** class.date_widget.inc.php 7 Sep 2003 01:26:41 -0000 1.13.2.5
--- class.date_widget.inc.php 16 Nov 2003 16:31:09 -0000 1.13.2.6
***************
*** 37,40 ****
--- 37,44 ----
'date-timeonly' => 'Time'
);
+ if ($ui == 'html')
+ {
+ $this->jscal =
CreateObject('phpgwapi.jscalendar');
+ }
function date_widget($ui)
***************
*** 71,74 ****
--- 75,79 ----
case 'Y': $value['Y'] = $dat;
break;
case 'm': $value['m'] = $dat;
break;
+ case 'M': $value['m'] = $dat;
break;
case 'd': $value['d'] = $dat;
break;
case 'H': $value['H'] = $dat;
break;
***************
*** 148,156 ****
{
$dcell = $tpl->empty_cell();
! $dcell['type'] = $types[$format[$n]];
! $dcell['size'] = $opts[$format[$n]];
! $dcell['name'] = $format[$n];
! $dcell['help'] = lang($help[$format[$n]]).':
'.lang($cell['help']); // note: no lang on help, already done
!
if ($n == 4)
{
--- 153,174 ----
{
$dcell = $tpl->empty_cell();
! // test if we can use jsCalendar
! if ($n == 0 && $this->jscal &&
$tmpl->java_script())
! {
! $dcell['type'] = 'html';
! $dcell['name'] = 'str';
! $value['str'] =
$this->jscal->input($name.'[str]',False,$value['Y'],$value['m'],$value['d'],lang($cell['help']));
! $n = 2; // no
other fields
! $options &= ~2; // no set-today
button
! // register us for process_exec
!
$GLOBALS['phpgw_info']['etemplate']['to_process'][$name] = 'ext-'.$cell['type'];
! }
! else
! {
! $dcell['type'] = $types[$format[$n]];
! $dcell['size'] = $opts[$format[$n]];
! $dcell['name'] = $format[$n];
! $dcell['help'] =
lang($help[$format[$n]]).': '.lang($cell['help']); // note: no lang on
help, already done
! }
if ($n == 4)
{
***************
*** 226,229 ****
--- 244,255 ----
$value[$d] = date($d);
}
+ }
+ if (isset($value_in['str']) && !empty($value_in['str']))
+ {
+ if (!is_array($value))
+ {
+ $value = array();
+ }
+ $value +=
$this->jscal->input2date($value_in['str'],False,'d','m','Y');
}
if ($value['d'] || isset($value['H']) && $value['H']
!== '' ||
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] etemplate/inc class.date_widget.inc.php, 1.13.2.5, 1.13.2.6,
Dave Hall <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] calendar/inc class.bocalendar.inc.php, 1.71.2.33.2.18, 1.71.2.33.2.19 class.uicalendar.inc.php, 1.66.2.55.2.22, 1.66.2.55.2.23
- Next by Date:
[Phpgroupware-cvs] etemplate/inc class.date_widget.inc.php, 1.13.2.6, 1.13.2.7
- Previous by thread:
[Phpgroupware-cvs] calendar/inc class.bocalendar.inc.php, 1.71.2.33.2.18, 1.71.2.33.2.19 class.uicalendar.inc.php, 1.66.2.55.2.22, 1.66.2.55.2.23
- Next by thread:
[Phpgroupware-cvs] etemplate/inc class.date_widget.inc.php, 1.13.2.6, 1.13.2.7
- Index(es):