[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] projects/inc/class.uiconfig.inc.php, 1.26
From: |
nomail |
Subject: |
[Phpgroupware-cvs] projects/inc/class.uiconfig.inc.php, 1.26 |
Date: |
Sun, 23 May 2004 10:49:31 -0000 |
Update of /projects/inc
Modified Files:
Branch:
class.uiconfig.inc.php
date: 2004/05/02 00:11:55; author: ceb; state: Exp; lines: +41 -32
Log Message:
update
=====================================================================
Index: projects/inc/class.uiconfig.inc.php
diff -u projects/inc/class.uiconfig.inc.php:1.25
projects/inc/class.uiconfig.inc.php:1.26
--- projects/inc/class.uiconfig.inc.php:1.25 Thu Apr 29 15:53:38 2004
+++ projects/inc/class.uiconfig.inc.php Sun May 2 00:11:55 2004
@@ -244,9 +244,23 @@
'action' => 'accounting'
);
+ $jscal = CreateObject('phpgwapi.jscalendar');
+
if ($values['save'])
{
//_debug_array($values);
+ if(is_array($sdate))
+ {
+ $start_array =
$jscal->input2date($sdate['str']);
+ $values['sdate'] =
$start_array['raw'];
+ }
+ //_debug_array($start_array);
+ if(is_array($edate))
+ {
+ $end_array =
$jscal->input2date($edate['str']);
+ $values['edate'] =
$end_array['raw'];
+ }
+
$error =
$this->boconfig->check_pa_values($values,'accounting');
if(is_array($error))
{
@@ -266,12 +280,12 @@
}
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('projects') . ': ' . lang('accounting');
- $jscal = CreateObject('phpgwapi.jscalendar');
$this->display_app_header();
$GLOBALS['phpgw']->template->set_file(array('emp_list_t' =>
'list_employees.tpl'));
$GLOBALS['phpgw']->template->set_block('emp_list_t','emp_list','list');
+
//$GLOBALS['phpgw']->template->set_block('emp_list_t','emp_tframe','flist');
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
=> $this->query)));
@@ -293,6 +307,8 @@
//------------------- list header variable template-declarations
-------------------------
$GLOBALS['phpgw']->template->set_var('sort_name',$this->nextmatchs->show_sort_order($this->sort,'account_id',$this->order,'/index.php',lang('employee'),$link_data));
+
$GLOBALS['phpgw']->template->set_var('sort_sdate',$this->nextmatchs->show_sort_order($this->sort,'sdate',$this->order,'/index.php',lang('start
date'),$link_data));
+
$GLOBALS['phpgw']->template->set_var('sort_edate',$this->nextmatchs->show_sort_order($this->sort,'edate',$this->order,'/index.php',lang('end
date'),$link_data));
$GLOBALS['phpgw']->template->set_var('sort_per_hour',$this->nextmatchs->show_sort_order($this->sort,'accounting',$this->order,'/index.php',lang('per
hour'),$link_data));
$GLOBALS['phpgw']->template->set_var('sort_per_day',$this->nextmatchs->show_sort_order($this->sort,'d_accounting',$this->order,'/index.php',lang('per
day'),$link_data));
$GLOBALS['phpgw']->template->set_var('currency',$GLOBALS['phpgw_info']['user']['preferences']['common']['currency']);
@@ -309,6 +325,8 @@
'emp_name'
=> $emps[$i]['account_name'],
'factor'
=> $emps[$i]['accounting'],
'd_factor'
=> $emps[$i]['d_accounting'],
+ 'sdate_formatted' =>
$emps[$i]['sdate_formatted'],
+ 'edate_formatted' =>
$emps[$i]['edate_formatted'],
'delete_emp' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_employees&id='
. $emps[$i]['id'] .
'&delete=True'),
'delete_img' =>
$GLOBALS['phpgw']->common->image('phpgwapi','delete'),
@@ -325,20 +343,8 @@
$GLOBALS['phpgw']->template->set_var('lang_add_factor',lang('add factor'));
$GLOBALS['phpgw']->template->set_var('emp_select',$this->employee_format($values['account_id']));
- if(is_array($sdate))
- {
- $start_array =
$jscal->input2date($sdate['str']);
- $start_val = $start_array['raw'];
- }
-
- if(is_array($edate))
- {
- $end_array =
$jscal->input2date($edate['str']);
- $end_val = $end_array['raw'];
- }
-
-
$GLOBALS['phpgw']->template->set_var('sdate_select',$jscal->input('sdate[str]',$start_val));
-
$GLOBALS['phpgw']->template->set_var('edate_select',$jscal->input('edate[str]',$end_val));
+
$GLOBALS['phpgw']->template->set_var('sdate_select',$jscal->input('sdate[str]',$values['sdate']));
+
$GLOBALS['phpgw']->template->set_var('edate_select',$jscal->input('edate[str]',$values['edate']));
$this->save_sessiondata('accounting');
$GLOBALS['phpgw']->template->pfp('out','emp_list_t',True);
@@ -346,10 +352,26 @@
function edit_employee_factor()
{
- $id = get_var('id',array('GET','POST'));
+ $id =
get_var('id',array('GET','POST'));
+ $values = $_POST['values'];
+ $sdate = get_var('sdate',array('GET','POST'));
+ $edate = get_var('edate',array('GET','POST'));
+ $jscal = CreateObject('phpgwapi.jscalendar');
if ($values['save'])
{
+ if(is_array($sdate))
+ {
+ $start_array =
$jscal->input2date($sdate['str']);
+ $values['sdate'] =
$start_array['raw'];
+ }
+ //_debug_array($start_array);
+ if(is_array($edate))
+ {
+ $end_array =
$jscal->input2date($edate['str']);
+ $values['edate'] =
$end_array['raw'];
+ }
+ $values['id'] = $id;
//_debug_array($values);
$error =
$this->boconfig->check_pa_values($values,'accounting');
if(is_array($error))
@@ -364,7 +386,6 @@
}
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('projects') . ': ' . lang('accounting');
- $jscal = CreateObject('phpgwapi.jscalendar');
$this->display_app_header();
@@ -380,20 +401,8 @@
$GLOBALS['phpgw']->template->set_var('lang_save_factor',lang('save factor'));
$GLOBALS['phpgw']->template->set_var('emp_select',$this->employee_format($values['account_id']));
- if(is_array($sdate))
- {
- $start_array =
$jscal->input2date($sdate['str']);
- $start_val = $start_array['raw'];
- }
-
- if(is_array($edate))
- {
- $end_array =
$jscal->input2date($edate['str']);
- $end_val = $end_array['raw'];
- }
-
-
$GLOBALS['phpgw']->template->set_var('sdate_select',$jscal->input('sdate[str]',$start_val));
-
$GLOBALS['phpgw']->template->set_var('edate_select',$jscal->input('edate[str]',$end_val));
+
$GLOBALS['phpgw']->template->set_var('sdate_select',$jscal->input('sdate[str]',$values['sdate']));
+
$GLOBALS['phpgw']->template->set_var('edate_select',$jscal->input('edate[str]',$values['edate']));
$GLOBALS['phpgw']->template->pfp('out','emp_form',True);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] projects/inc/class.uiconfig.inc.php, 1.26,
nomail <=