phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc check.js,1.2,1.3 class.bocommon.in


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc check.js,1.2,1.3 class.bocommon.inc.php,1.5,1.6 class.boinvestment.inc.php,1.1,1.2class.soinvestment.inc.php,1.1,1.2 class.uiinvestment.inc.php,1.1,1.2
Date: Wed, 22 Jan 2003 06:20:49 -0500

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv28570/inc

Modified Files:
        check.js class.bocommon.inc.php class.boinvestment.inc.php 
        class.soinvestment.inc.php class.uiinvestment.inc.php 
Log Message:
no message

Index: check.js
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/check.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** check.js    15 Jan 2003 20:55:46 -0000      1.2
--- check.js    22 Jan 2003 11:20:46 -0000      1.3
***************
*** 1,4 ****
  
! function check_all(which)
  {
    for (i=0; i<document.form.elements.length; i++)
--- 1,4 ----
  
! function check_all_radio(which)
  {
    for (i=0; i<document.form.elements.length; i++)
***************
*** 11,15 ****
  }
  
! function transfer_all(which)
  {
    for (i=0; i<document.form.elements.length; i++)
--- 11,15 ----
  }
  
! function check_all_checkbox(which)
  {
    for (i=0; i<document.form.elements.length; i++)

Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.bocommon.inc.php      21 Jan 2003 17:53:01 -0000      1.5
--- class.bocommon.inc.php      22 Jan 2003 11:20:46 -0000      1.6
***************
*** 111,114 ****
--- 111,122 ----
                        }
  
+ 
+                       $admins = 
$GLOBALS['phpgw']->session->appsession('admins',$this->currentapp);
+                       $module_order = 
$GLOBALS['phpgw']->session->appsession('module_order',$this->currentapp);
+ 
+                       
$this->admin_equipment=$admins[$module_order['equipment']]['equipment']['admin'];
+                       
$this->admin_workorder=$admins[$module_order['workorder']]['workorder']['admin'];
+                       
$this->admin_activity=$admins[$module_order['activity']]['activity']['admin'];
+                       
$this->admin_invoice=$admins[$module_order['invoice']]['invoice']['admin'];
                }
  
***************
*** 219,230 ****
                        //$sub='property';
  
-                       $admins = 
$GLOBALS['phpgw']->session->appsession('admins',$this->currentapp);
-                       $module_order = 
$GLOBALS['phpgw']->session->appsession('module_order',$this->currentapp);
- 
-                       
$admin_equipment=$admins[$module_order['equipment']]['equipment']['admin'];
-                       
$admin_workorder=$admins[$module_order['workorder']]['workorder']['admin'];
-                       
$admin_activity=$admins[$module_order['activity']]['activity']['admin'];
-                       
$admin_invoice=$admins[$module_order['invoice']]['invoice']['admin'];
- 
  //                    _debug_array($admins);
  
--- 227,230 ----
***************
*** 326,330 ****
                                $menu['sublang_invoice_powermeter']=lang('Power 
meter');
                                
$menu['sublang_invoice_consume']=lang('consume');
!                               if ($admin_invoice)
                                {
                                        
$menu['sub_invoice_investment_value']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiinvestment.index&sub=invoice');
--- 326,330 ----
                                $menu['sublang_invoice_powermeter']=lang('Power 
meter');
                                
$menu['sublang_invoice_consume']=lang('consume');
!                               if ($this->admin_invoice)
                                {
                                        
$menu['sub_invoice_investment_value']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiinvestment.index&sub=invoice');
***************
*** 389,393 ****
                                
$menu['sublang_workorder_archive']=lang('Archive');
                                
$menu['sublang_workorder_template']=lang('Workorder template');
!                               if($admin_workorder)
                                {
                                        
$menu['sub_workorder_event']=$GLOBALS['phpgw']->link('/property/list_event.php','sub=workorder');
--- 389,393 ----
                                
$menu['sublang_workorder_archive']=lang('Archive');
                                
$menu['sublang_workorder_template']=lang('Workorder template');
!                               if($this->admin_workorder)
                                {
                                        
$menu['sub_workorder_event']=$GLOBALS['phpgw']->link('/property/list_event.php','sub=workorder');

Index: class.boinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boinvestment.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.boinvestment.inc.php  21 Jan 2003 17:53:01 -0000      1.1
--- class.boinvestment.inc.php  22 Jan 2003 11:20:46 -0000      1.2
***************
*** 151,154 ****
--- 151,199 ----
  
  
+               function filter($format='',$selected='')
+               {
+                       switch($format)
+                       {
+                               case 'select':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('filter_select'));
+                                       break;
+                               case 'filter':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('filter_filter',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
+                                       break;
+                       }
+ 
+                       $filters[0][id]='investment';
+                       $filters[0][name]=lang('Investment');
+                       $filters[1][id]='funding';
+                       $filters[1][name]=lang('Funding');
+ 
+                       while (is_array($filters) && list(,$filter) = 
each($filters))
+                       {
+                               $sel_filter = '';
+                               if ($filter['id']==$selected)
+                               {
+                                       $sel_filter = 'selected';
+                               }
+ 
+                               $filter_list[] = array
+                               (
+                                       'id'    => $filter['id'],
+                                       'name'          => $filter['name'],
+                                       'selected'      => $sel_filter
+                               );
+                       }
+ 
+                       for ($i=0;$i<count($filter_list);$i++)
+                       {
+                               if ($filter_list[$i]['selected'] != 'selected')
+                               {
+                                       unset($filter_list[$i]['selected']);
+                               }
+                       }
+ 
+                       return $filter_list;
+               }
+ 
+ 
                function read_single($property_id,$building_id)
                {

Index: class.soinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvestment.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.soinvestment.inc.php  21 Jan 2003 17:53:01 -0000      1.1
--- class.soinvestment.inc.php  22 Jan 2003 11:20:46 -0000      1.2
***************
*** 58,62 ****
                                        $start=0;
                                }
!                               $filter = 
(isset($data['filter'])?$data['filter']:'none');
                                $query = 
(isset($data['query'])?$data['query']:'');
                                $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
--- 58,62 ----
                                        $start=0;
                                }
!                               $filter = 
(isset($data['filter'])?$data['filter']:'');
                                $query = 
(isset($data['query'])?$data['query']:'');
                                $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
***************
*** 79,82 ****
--- 79,91 ----
                        {
                                $filtermethod = "and boei_bydel.bydel_id 
='$part_of_town_id'";
+                       }
+ 
+                       if ($filter=='investment')
+                       {
+                               $filtermethod .= "and initial_value > 0";
+                       }
+                       if ($filter=='funding')
+                       {
+                               $filtermethod .= "and initial_value < 0";
                        }
  

Index: class.uiinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvestment.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.uiinvestment.inc.php  21 Jan 2003 17:53:01 -0000      1.1
--- class.uiinvestment.inc.php  22 Jan 2003 11:20:46 -0000      1.2
***************
*** 24,28 ****
                        'index'  => True,
                        'view'   => True,
!                       'edit'   => True,
                        'delete' => True
                );
--- 24,28 ----
                        'index'  => True,
                        'view'   => True,
!                       'add'   => True,
                        'delete' => True
                );
***************
*** 48,51 ****
--- 48,52 ----
                        $this->cat_id                           = 
$this->bo->cat_id;
                        $this->part_of_town_id          = 
$this->bo->part_of_town_id;
+                       $this->admin_invoice            = 
$this->bocommon->admin_invoice;
                }
  
***************
*** 71,84 ****
                                                                                
'menu',
                                                                                
'nextmatchs',
!                                                                               
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'app_header',
!                                                                               
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'filter_select',
!                                                                               
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'search_field'));
  
                        $sub = get_var('sub',array('POST','GET'));
                        $links = $this->bocommon->menu($sub);
  
                        $investment_list = $this->bo->read();
  
! //_debug_array($investment_list);
  
                        $dateformat = 
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
--- 72,84 ----
                                                                                
'menu',
                                                                                
'nextmatchs',
!                                                                               
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'app_header'));
  
                        $sub = get_var('sub',array('POST','GET'));
                        $links = $this->bocommon->menu($sub);
+                       $values         = get_var('values',array('POST'));
  
                        $investment_list = $this->bo->read();
  
! //_debug_array($values);
  
                        $dateformat = 
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
***************
*** 102,106 ****
--- 102,108 ----
                                        'part_of_town'                          
=> $investment['part_of_town'],
                                        'descr'                                 
        => $investment['descr'],
+                                       'initial_value_ex'                      
=> $investment['initial_value'],
                                        'initial_value'                         
=> number_format($investment['initial_value'], 0, ',', ' '),
+                                       'value_ex'                              
        => $investment['value'],
                                        'value'                                 
        => number_format($investment['value'], 0, ',', ' '),
                                        'this_index'                            
=> $investment['this_index'],
***************
*** 111,115 ****
                                        'link_history'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.history&entity_id='
 . $investment['entity_id'].'&investment_id=' . 
$investment['investment_id'].'&entity_type=' . $this->cat_id),
                                        'lang_history'                          
=> lang('History'),
!                                       'lang_history_statustext'       => 
lang('View/Edit the history')
                                );
  
--- 113,118 ----
                                        'link_history'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.history&entity_id='
 . $investment['entity_id'].'&investment_id=' . 
$investment['investment_id'].'&entity_type=' . $this->cat_id),
                                        'lang_history'                          
=> lang('History'),
!                                       'lang_history_statustext'       => 
lang('View/Edit the history'),
!                                       'is_admin'                              
        => $this->admin_invoice
                                );
  
***************
*** 119,123 ****
                        }
  
- 
                        $table_header[] = array
                        (
--- 122,125 ----
***************
*** 138,146 ****
                        );
  
                        $table_add[] = array
                        (
!                               'lang_add'                              => 
lang('add'),
                                'lang_add_statustext'   => lang('add a 
investment'),
!                               'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.edit')
                        );
  
--- 140,169 ----
                        );
  
+ 
+                       $dateformat = 
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
+                       $dlarr[strpos($dateformat,'y')]                 = 
'yyyy';
+                       $dlarr[strpos($dateformat,'m')]                 = 'MM';
+                       $dlarr[strpos($dateformat,'d')]                 = 'DD';
+                       ksort($dlarr);
+ 
+ 
+                       $table_update[] = array
+                       (
+                               'dateformat'                            => 
(implode($sep,$dlarr)),
+                               'link_calendar_date'            => 
'setDateField(document.form.date);top.newWin=window.open('."'.".'/'.$this->currentapp.'/inc/calendar.html'."'".','."'".'cal'."'".','."'dependent=yes,width=210,height=230,screenX=200,screenY=300,titlebar=yes'".')',
+                               'calendar_gif'                          => 
'./'.$this->currentapp.'/templates/default/images/calendar.gif',
+                               'calendar_source'                       => 
'./'.$this->currentapp.'/inc/calendar.js',
+                               'lang_popup_calendar'           => lang('Popup 
Calendar'),
+                               'lang_date_statustext'          => lang('Select 
the date for the update'),
+                               'lang_update'                           => 
lang('Update'),
+                               'lang_update_statustext'        => lang('update 
selected investments'),
+                               'update_action'                         => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.edit')
+                       );
+ 
                        $table_add[] = array
                        (
!                               'lang_add'                              => 
lang('Add'),
                                'lang_add_statustext'   => lang('add a 
investment'),
!                               'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.add')
                        );
  
***************
*** 151,159 ****
                                'sort'                          => $this->sort,
                                'cat_id'                        => 
$this->cat_id,
!                               'user_lid'                      => 
$this->user_lid,
                                'sub'                           => $this->sub,
                                'query'                         => $this->query,
                                'start'                         => $this->start,
-                               'paid'                          => $paid,
                                'filter'                        => $this->filter
                        );
--- 174,181 ----
                                'sort'                          => $this->sort,
                                'cat_id'                        => 
$this->cat_id,
!                               'part_of_town_id'       => 
$this->part_of_town_id,
                                'sub'                           => $this->sub,
                                'query'                         => $this->query,
                                'start'                         => $this->start,
                                'filter'                        => $this->filter
                        );
***************
*** 182,198 ****
                                'select_name'                                   
=> 'cat_id',
                                'cat_list'                                      
        => $this->bo->select_category('select',$this->cat_id),
-                               'select_action'                                 
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.index'),
                                'lang_town_statustext'                  => 
lang('Select the part of town the investment belongs to. To do not use a part 
of town -  select NO PART OF TOWN'),
                                'lang_part_of_town'                             
=> lang('Part of town'),
!                               'lang_no_part_of_town'                  => 
lang('No part of town'),
                                'part_of_town_list'                             
=> $this->bocommon->select_part_of_town('select',$this->part_of_town_id),
                                'select_name_part_of_town'              => 
'part_of_town_id',
  
  
!                               'filter_list'                                   
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter,'yours' => 
'yes')),
                                'lang_filter_statustext'                => 
lang('Select the filter. To show all entries select SHOW ALL'),
!                               'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
!                               'lang_searchbutton_statustext'  => lang('Submit 
the search string'),
!                               'query'                                         
        => $this->query,
                                'lang_submit'                                   
=> lang('submit'),
                                'table_header'                                  
=> $table_header,
--- 204,219 ----
                                'select_name'                                   
=> 'cat_id',
                                'cat_list'                                      
        => $this->bo->select_category('select',$this->cat_id),
                                'lang_town_statustext'                  => 
lang('Select the part of town the investment belongs to. To do not use a part 
of town -  select NO PART OF TOWN'),
                                'lang_part_of_town'                             
=> lang('Part of town'),
!                               'lang_no_part_of_town'                  => 
lang('Show all'),
                                'part_of_town_list'                             
=> $this->bocommon->select_part_of_town('select',$this->part_of_town_id),
                                'select_name_part_of_town'              => 
'part_of_town_id',
  
  
!                               'filter_list'                                   
=> $this->bo->filter('select',$this->filter),
!                               'filter_name'                                   
=> 'filter',
                                'lang_filter_statustext'                => 
lang('Select the filter. To show all entries select SHOW ALL'),
!                               'lang_show_all'                                 
=> lang('Show all'),
! 
                                'lang_submit'                                   
=> lang('submit'),
                                'table_header'                                  
=> $table_header,
***************
*** 201,204 ****
--- 222,226 ----
                                'sum_value'                                     
        => number_format($sum_value, 0, ',', ' '),
  
+                               'table_update'                                  
=> $table_update,
                                'table_add'                                     
        => $table_add
                        );





reply via email to

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