[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.date_widget.inc.php, 1.13, 1
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.date_widget.inc.php, 1.13, 1.14 class.uietemplate.inc.php, 1.62, 1.63 |
Date: |
Mon, 18 Aug 2003 19:16:01 -0400 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv8698
Modified Files:
class.date_widget.inc.php class.uietemplate.inc.php
Log Message:
added the jsCalendar to the date_widget
Index: class.date_widget.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.date_widget.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.date_widget.inc.php 27 Apr 2003 08:50:20 -0000 1.13
--- class.date_widget.inc.php 18 Aug 2003 23:15:59 -0000 1.14
***************
*** 37,40 ****
--- 37,44 ----
function date_widget($ui)
{
+ if ($ui == 'html')
+ {
+ $this->jscal =
CreateObject('phpgwapi.jscalendar');
+ }
$this->timeformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'];
}
***************
*** 145,152 ****
{
$dcell = $tpl->empty_cell();
! $dcell['type'] = $types[$format[$n]];
! $dcell['size'] = $opts[$format[$n]];
! $dcell['name'] = $format[$n];
! $dcell['help'] = lang($help[$format[$n]]).':
'.$cell['help']; // note: no lang on help, already done
if ($n == 4)
{
--- 149,170 ----
{
$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'],$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]]).': '.$cell['help']; // note: no lang on help,
already done
! }
if ($n == 4)
{
***************
*** 208,215 ****
}
! function
post_process($name,&$value,&$extension_data,&$loop,&$tmpl)
{
! //echo
"date_widget::post_process('$name','$extension_data') value=<pre>";
print_r($value); echo "</pre>\n";
! if (!isset($value))
{
return False;
--- 226,233 ----
}
! function
post_process($name,&$value,&$extension_data,&$loop,&$tmpl,$value_in)
{
! //echo
"<p>date_widget::post_process('$name','$extension_data') value=";
print_r($value); echo ", value_in="; print_r($value_in); echo "</p>\n";
! if (!isset($value) && !isset($value_in))
{
return False;
***************
*** 223,227 ****
}
}
! if ($value['d'] || isset($value['H']) && $value['H']
!== '' ||
isset($value['i']) && $value['i']
!== '')
{
--- 241,249 ----
}
}
! if (isset($value_in['str']))
! {
! $value =
$this->jscal->input2date($value_in['str'],False,'d','m','Y');
! }
! if ($value['d'] || isset($value['H']) && $value['H']
!== '' ||
isset($value['i']) && $value['i']
!== '')
{
Index: class.uietemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.uietemplate.inc.php,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -r1.62 -r1.63
*** class.uietemplate.inc.php 6 Jul 2003 20:07:19 -0000 1.62
--- class.uietemplate.inc.php 18 Aug 2003 23:15:59 -0000 1.63
***************
*** 115,118 ****
--- 115,119 ----
$GLOBALS['phpgw_info']['flags']['app_header'] =
$content['app_header'];
}
+ /*
$html = '';
if ($this->stable)
***************
*** 135,138 ****
--- 136,140 ----
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('java_script' =>
$this->include_java_script(2)));
}
+ */
if ($GLOBALS['phpgw_info']['flags']['currentapp'] !=
'etemplate')
{
***************
*** 143,147 ****
$GLOBALS['phpgw_info']['etemplate']['form_options'] =
''; // might be set in show
$GLOBALS['phpgw_info']['etemplate']['to_process'] =
array();
! $html .= ($this->stable ?
$this->html->themeStyles()."\n\n" : ''). // so they get included once
$this->html->form($this->include_java_script(1).
$this->show($this->complete_array_merge($content,$changes),$sel_options,$readonlys,'exec'),array(
--- 145,149 ----
$GLOBALS['phpgw_info']['etemplate']['form_options'] =
''; // might be set in show
$GLOBALS['phpgw_info']['etemplate']['to_process'] =
array();
! $html = ($this->stable ?
$this->html->themeStyles()."\n\n" : ''). // so they get included once
$this->html->form($this->include_java_script(1).
$this->show($this->complete_array_merge($content,$changes),$sel_options,$readonlys,'exec'),array(
***************
*** 150,153 ****
--- 152,174 ----
),'/etemplate/process_exec.php','','eTemplate',$GLOBALS['phpgw_info']['etemplate']['form_options']);
//_debug_array($GLOBALS['phpgw_info']['etemplate']['to_process']);
+ if ($this->stable)
+ {
+ $hooked =
$GLOBALS['phpgw']->template->get_var('phpgw_body');
+ if
(address@hidden'phpgw_info']['etemplate']['hooked'] && !$return_html)
+ {
+
$GLOBALS['phpgw_info']['flags']['java_script'] .= $this->include_java_script(2);
+
$GLOBALS['phpgw']->common->phpgw_header();
+ }
+ else
+ {
+ $html =
$this->include_java_script(2).$html; // better than nothing
+ }
+ }
+ else
+ {
+ $hooked =
$GLOBALS['phpgw']->xslttpl->get_var('phpgw');
+ $hooked = $hooked['body_data'];
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('java_script' =>
$GLOBALS['phpgw_info']['flags']['java_script'].$this->include_java_script(2)));
+ }
list($width,$height,,,,,$overflow) =
explode(',',$this->size);
if ($overflow)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.date_widget.inc.php, 1.13, 1.14 class.uietemplate.inc.php, 1.62, 1.63,
Ralf Becker <address@hidden> <=