phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.bolocation.inc.php,1.2,1.3 cl


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.bolocation.inc.php,1.2,1.3 class.uilocation.inc.php,1.3,1.4
Date: Thu, 05 Jun 2003 03:28:16 -0400

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

Modified Files:
        class.bolocation.inc.php class.uilocation.inc.php 
Log Message:
no message

Index: class.bolocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.bolocation.inc.php    4 Jun 2003 12:24:40 -0000       1.2
--- class.bolocation.inc.php    5 Jun 2003 07:28:14 -0000       1.3
***************
*** 117,120 ****
--- 117,225 ----
  
  
+               function initiate_ui_location($data)
+               {
+ //_debug_array($data);
+ 
+                       switch($data['location_type'])
+                       {
+                               case 'form':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('location_form'));
+                                       break;
+                               case 'view':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('location_view'));
+                                       break;
+                       }
+ 
+                       if($data['equipment'])
+                       {
+                               $location['equipment']                          
                = True;
+                               $location['lang_select_location_statustext']= 
lang('select either a location or an equipment');
+                               $location['equipment_link']                     
                = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.equipment');
+                               $location['lang_equipment']                     
                = lang('Equipment');
+                               $location['value_equipment_id']                 
        = $data['equipment_id'];
+                               $location['lang_select_equipment_help']         
= lang('Klick this link to select equipment');
+ 
+                               if($data['equipment_id'])
+                               {
+                                       $location['value_equipment_type'] = 
$this->socommon->get_equipment_type($data['equipment_id']);
+                               }
+ 
+                       }
+                       else
+                       {
+                               $location['lang_select_location_statustext']    
= lang('select a location');
+                       }
+ 
+ 
+                       if($data['tenant'])
+                       {
+                               $location['tenant']                             
                                = True;
+                               $location['lang_tenant']                        
                        = lang('Tenant');
+                               $location['tenant_link']                        
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=tenant');
+                               $location['lang_tenant_phone']                  
                = lang('Tenant phone');
+                               $location['lang_select_tenant_help']            
        = lang('Klick this link to select tenant');
+                               $location['value_tenant_id']                    
                = $data['tenant_id'];
+                               $location['value_tenant_name']                  
                = $data['tenant_name'];
+                               $location['value_tenant_phone']                 
                = $data['tenant_phone'];
+                               $data['apartment']                              
                                = True;
+                       }
+                       if($data['apartment'])
+                       {
+                               $location['apartment']                          
                        = True;
+                               $location['apartment_link']                     
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=apartment');
+                               $location['value_apartment_id']                 
                = $data['apartment_id'];
+                               $location['value_floor']                        
                        = $data['floor'];
+                               $location['lang_select_apartment_help']         
        = lang('Klick this link to select apartment');
+                               $location['lang_floor']                         
                        = lang('Floor');
+                               $location['lang_apartment']                     
                        = lang('Apartment');
+                               $data['entrance']                               
                                = True;
+                               $data['address']                                
                                = True;
+                       }
+ 
+                       if($data['address'])
+                       {
+                               $location['address']                            
                        = True;
+                               $location['lang_address']                       
                        = lang('Address');
+                               $location['value_street_name']                  
                = $data['street_name'];
+                               $location['value_street_number']                
                = $data['street_number'];
+                       }
+                       if($data['entrance'])
+                       {
+                               $location['entrance']                           
                        = True;
+                               $location['value_entrance_id']                  
                = $data['entrance_id'];
+                               $location['value_street_name']                  
                = $data['street_name'];
+                               $location['value_street_number']                
                = $data['street_number'];
+                               $location['entrance_link']                      
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=entrance');
+                               $location['lang_entrance']                      
                        = lang('Entrance');
+                               $location['lang_select_entrance_help']          
        = lang('Klick this link to select entrance');
+                               $data['building']                               
                                = True;
+                       }
+ 
+                       if($data['building'])
+                       {
+                               $location['building']                           
                = True;
+                               $location['value_building_id']                  
        = $data['building_id'];
+                               $location['building_link']                      
                = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=building');
+                               $location['lang_building']                      
                = lang('Building');
+                               $location['lang_select_building_help']          
= lang('Klick this link to select building');
+                       }
+ 
+                       $location['overlib_source']                             
                        = './'.$this->currentapp.'/inc/overlib.js';
+                       $location['value_property_id']                          
                = $data['property_id'];
+                       $location['value_property_name']                        
                = $data['property_name'];
+                       $location['lang_location']                              
                        = lang('Location');
+                       $location['location_link']                              
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=property');
+                       $location['property_link']                              
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=property');
+                       $location['lang_property']                              
                        = lang('Property');
+                       $location['lang_select_property_help']                  
        = lang('Klick this link to select property');
+                       $location['lang_property_name']                         
                = lang('Property Name');
+ 
+ //_debug_array($location);
+                       return $location;
+ 
+               }
+ 
+ 
+ 
                function 
select_category_location_list($format='',$selected='',$type_id='')
                {

Index: class.uilocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.uilocation.inc.php    4 Jun 2003 12:24:40 -0000       1.3
--- class.uilocation.inc.php    5 Jun 2003 07:28:14 -0000       1.4
***************
*** 74,77 ****
--- 74,78 ----
  
                        $type_id                = 
get_var('type_id',array('GET'));
+                       $lookup                 = 
get_var('lookup',array('POST','GET'));
  
                        $links = $this->bocommon->menu();
***************
*** 89,103 ****
                                {
                                        $content[$j]['row'][$i]['value']        
                = $location[$uicols['name'][$i]];
                                }
  
!                               $content[$j]['row'][$i]['statustext']           
        = lang('view the location');
!                               $content[$j]['row'][$i]['text']                 
                = lang('view');
!                               $content[$j]['row'][$i++]['link']               
                = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.view&location_code='
 . $location['location_code']);
!                               $content[$j]['row'][$i]['statustext']           
        = lang('edit the location');
!                               $content[$j]['row'][$i]['text']                 
                = lang('edit');
!                               $content[$j]['row'][$i++]['link']               
                = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&location_code='
 . $location['location_code']);
!                               $content[$j]['row'][$i]['statustext']           
        = lang('delete the location');
!                               $content[$j]['row'][$i]['text']                 
                = lang('delete');
!                               $content[$j]['row'][$i++]['link']               
                = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.delete&location_code='
 . $location['location_code']);
                                $j++;
                        }
--- 90,109 ----
                                {
                                        $content[$j]['row'][$i]['value']        
                = $location[$uicols['name'][$i]];
+                                       $content[$j]['row'][$i]['name_hidden']  
        = $uicols['name'][$i];
+                                       $content[$j]['row'][$i]['lookup']       
                = $lookup;
                                }
  
!                               if(!$lookup)
!                               {
!                                       $content[$j]['row'][$i]['statustext']   
                = lang('view the location');
!                                       $content[$j]['row'][$i]['text']         
                        = lang('view');
!                                       $content[$j]['row'][$i++]['link']       
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.view&location_code='
 . $location['location_code']);
!                                       $content[$j]['row'][$i]['statustext']   
                = lang('edit the location');
!                                       $content[$j]['row'][$i]['text']         
                        = lang('edit');
!                                       $content[$j]['row'][$i++]['link']       
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&location_code='
 . $location['location_code']);
!                                       $content[$j]['row'][$i]['statustext']   
                = lang('delete the location');
!                                       $content[$j]['row'][$i]['text']         
                        = lang('delete');
!                                       $content[$j]['row'][$i++]['link']       
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.delete&location_code='
 . $location['location_code']);
!                               }
                                $j++;
                        }
***************
*** 120,123 ****
--- 126,130 ----
                                                                                
                                                        'type_id'       
=>$type_id,
                                                                                
                                                        'query'         
=>$this->query,
+                                                                               
                                                        'lookup'        
=>$lookup,
                                                                                
                                                        'cat_id'        
=>$this->cat_id)
  
***************
*** 127,139 ****
                        }
  
!                       $table_header[$i]['width']                      = '5%';
!                       $table_header[$i]['align']                      = 
'center';
!                       $table_header[$i++]['header']           = lang('view');
!                       $table_header[$i]['width']                      = '5%';
!                       $table_header[$i]['align']                      = 
'center';
!                       $table_header[$i++]['header']           = lang('edit');
!                       $table_header[$i]['width']                      = '5%';
!                       $table_header[$i]['align']                      = 
'center';
!                       $table_header[$i++]['header']           = 
lang('delete');
  
  //_debug_array($table_header);
--- 134,155 ----
                        }
  
!                       if(!$lookup)
!                       {
!                               $table_header[$i]['width']                      
= '5%';
!                               $table_header[$i]['align']                      
= 'center';
!                               $table_header[$i++]['header']           = 
lang('view');
!                               $table_header[$i]['width']                      
= '5%';
!                               $table_header[$i]['align']                      
= 'center';
!                               $table_header[$i++]['header']           = 
lang('edit');
!                               $table_header[$i]['width']                      
= '5%';
!                               $table_header[$i]['align']                      
= 'center';
!                               $table_header[$i++]['header']           = 
lang('delete');
!                       }
!                       else
!                       {
!                               $table_header[$i]['width']                      
= '5%';
!                               $table_header[$i]['align']                      
= 'center';
!                               $table_header[$i++]['header']           = 
lang('select');
!                       }
  
  //_debug_array($table_header);
***************
*** 156,164 ****
--- 172,194 ----
                                                'filter'                
=>$this->filter,
                                                'query'                 
=>$this->query,
+                                               'lookup'                
=>$lookup,
                                                'type_id'               
=>$type_id
                        );
  
+ 
+                               for ($i=0;$i<$type_id;$i++)
+                               {
+                                       $function_exchange_values .= 
'opener.document.form.loc' . ($i+1) .'.value = thisform.elements[' . $i . 
'].value;' ."\r\n";
+                               }
+ 
+                               $function_exchange_values .='window.close()';
+ 
+ 
                        $data = array
                        (
+                               'exchange_values'                               
=> 'Exchange_values(this.form);',
+                               'function_exchange_values'              => 
$function_exchange_values,
+                               'lang_select'                                   
=> lang('select'),
+                               'lookup'                                        
        => $lookup,
                                'overlib_source'                                
=> './'.$this->currentapp.'/inc/overlib.js',
                                'lang_property_name'                    => 
lang('Property name'),
***************
*** 206,209 ****
--- 236,243 ----
                        $apartment_id = $location[3];
  
+ 
+                       $type_id                = 
get_var('type_id',array('GET'));
+ 
+ 
                        $values                                 = 
get_var('values',array('POST','GET'));
                        if($values)
***************
*** 339,343 ****
                        }
  
!                       
$location_data=$this->bocommon->initiate_ui_location(array(
                                                'location_type' => 
$location_type,
                                                'entrance'              => True,
--- 373,387 ----
                        }
  
! /*                    
$location_data=$this->bocommon->initiate_ui_location(array(
!                                               'location_type' => 
$location_type,
!                                               'entrance'              => True,
!                                               'property_id'   => 
$values['property_id'],
!                                               'property_name' => 
$values['property_name'],
!                                               'building_id'   => 
$values['building_id'],
!                                               'entrance_id'   => 
$values['entrance_id'],
!                                               ));
! 
! */
!                       $location_data=$this->bo->initiate_ui_location(array(
                                                'location_type' => 
$location_type,
                                                'entrance'              => True,





reply via email to

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