fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8484] property: request


From: Sigurd Nes
Subject: [Fmsystem-commits] [8484] property: request
Date: Wed, 04 Jan 2012 15:32:59 +0000

Revision: 8484
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8484
Author:   sigurdne
Date:     2012-01-04 15:32:58 +0000 (Wed, 04 Jan 2012)
Log Message:
-----------
property: request

Modified Paths:
--------------
    trunk/property/inc/class.bocommon.inc.php
    trunk/property/inc/class.borequest.inc.php
    trunk/property/inc/class.sorequest.inc.php
    trunk/property/inc/class.uirequest.inc.php
    trunk/property/js/yahoo/request.index.js
    trunk/property/setup/phpgw_no.lang

Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php   2012-01-04 09:59:17 UTC (rev 
8483)
+++ trunk/property/inc/class.bocommon.inc.php   2012-01-04 15:32:58 UTC (rev 
8484)
@@ -1164,11 +1164,11 @@
                                }
                                $cols.= ",fm_location1.loc1_name";
                                $this->join = $this->socommon->join;
-                               $joinmethod .= " $this->join  fm_location1 ON 
($entity_table.loc1 = fm_location1.loc1))";
+                               $joinmethod .= " {$this->join}  fm_location1 ON 
($entity_table.loc1 = fm_location1.loc1))";
                                $paranthesis .='(';
-                               $joinmethod .= " $this->join  fm_part_of_town 
ON (fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id))";
+                               $joinmethod .= " {$this->join}  fm_part_of_town 
ON (fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id))";
                                $paranthesis .='(';
-                               $joinmethod .= " $this->join  fm_owner ON 
(fm_location1.owner_id = fm_owner.id))";
+                               $joinmethod .= " {$this->join}  fm_owner ON 
(fm_location1.owner_id = fm_owner.id))";
                                $paranthesis .='(';
                        }
                        else
@@ -1178,9 +1178,32 @@
                        }
                        $this->type_id  = $type_id;
 
-
+                       $_level = 1;
                        for ($i=0; $i<$type_id; $i++)
                        {
+                               if($_level > 1)
+                               {
+                                       for ($j = 2; $j < ($_level +1); $j++)
+                                       {
+                                               $joinmethod .= " {$this->join} 
fm_location{$j}";
+
+                                               $paranthesis .='(';
+
+                                               $on = 'ON';
+                                               for ($k=($j-1); $k>0; $k--)
+                                               {
+                                                       $joinmethod .= " $on 
(fm_location{$j}.loc{$k} = fm_location" . ($j-1) . ".loc{$k})";
+                                                       $on = 'AND';
+                                                       if($k==1)
+                                                       {
+                                                               $joinmethod .= 
")";
+                                                       }
+                                               }
+                                       }
+                               }
+                               $_level ++;
+
+
                                $uicols['input_type'][]         = 'text';
                                $uicols['name'][]                       = 'loc' 
. $location_types[$i]['id'];
                                $uicols['descr'][]                      = 
$location_types[$i]['name'];
@@ -1192,7 +1215,7 @@
                                $uicols['classname'][]          = '';
                                $uicols['sortable'][]           = $i === 0;
                        }
-
+//_debug_array($joinmethod);die();
                        unset($soadmin_location);
 
                        for ($i=0; $i< $this->type_id; $i++)
@@ -1202,6 +1225,7 @@
 
                        $GLOBALS['phpgw']->config->read();
                        $list_location_level = 
isset($GLOBALS['phpgw']->config->config_data['list_location_level'])     && 
$GLOBALS['phpgw']->config->config_data['list_location_level'] ? 
$GLOBALS['phpgw']->config->config_data['list_location_level'] : array();
+
                        for ($i=1;$i<($type_id+1);$i++)
                        {
                                $cols_return[]                          = 
"loc{$i}_name";

Modified: trunk/property/inc/class.borequest.inc.php
===================================================================
--- trunk/property/inc/class.borequest.inc.php  2012-01-04 09:59:17 UTC (rev 
8483)
+++ trunk/property/inc/class.borequest.inc.php  2012-01-04 15:32:58 UTC (rev 
8484)
@@ -78,6 +78,7 @@
                        $district_id    = phpgw::get_var('district_id', 'int');
                        $cat_id                 = phpgw::get_var('cat_id', 
'int');
                        $status_id              = phpgw::get_var('status_id');
+                       $degree_id              = phpgw::get_var('degree_id', 
'int');
                        $allrows                = phpgw::get_var('allrows', 
'bool');
                        $this->p_num    = phpgw::get_var('p_num');
 
@@ -122,6 +123,10 @@
                        {
                                $this->status_id = $status_id;
                        }
+                       if(isset($_POST['degree_id']) || 
isset($_GET['degree_id']))
+                       {
+                               $this->degree_id = $degree_id;
+                       }
                        if(isset($_POST['criteria_id']) || 
isset($_GET['criteria_id']))
                        {
                                $this->criteria_id = $criteria_id;
@@ -168,6 +173,7 @@
                        $this->cat_id                   = $data['cat_id'];
                        $this->property_cat_id  = $data['property_cat_id'];
                        $this->status_id                = $data['status_id'];
+                       $this->degree_id                = $data['degree_id'];
                        $this->building_part    = $data['building_part'];
                        $this->start_date               = 
isset($data['start_date']) ? $data['start_date']: '';
                        $this->end_date                 = 
isset($data['end_date']) ? $data['end_date']: '';
@@ -410,7 +416,8 @@
                                'filter' => $this->filter,'district_id' => 
$this->district_id,'cat_id' => $this->cat_id,'status_id' => $this->status_id,
                                'project_id' => 
$data['project_id'],'allrows'=>$data['allrows'],'list_descr' => 
$data['list_descr'],
                                'dry_run'=>$data['dry_run'], 'p_num' => 
$this->p_num,'start_date'=>$this->start_date,'end_date'=>$this->end_date,
-                               'property_cat_id' => $this->property_cat_id, 
'building_part' => $this->building_part));
+                               'property_cat_id' => $this->property_cat_id, 
'building_part' => $this->building_part,
+                               'degree_id' => $this->degree_id));
 
                        $this->total_records    = $this->so->total_records;
                        $this->sum_budget               = $this->so->sum_budget;
@@ -679,4 +686,9 @@
                {
                        $this->so->delete($request_id);
                }
+
+               public function get_user_list()
+               {
+                       return $this->so->get_user_list();
+               }
        }

Modified: trunk/property/inc/class.sorequest.inc.php
===================================================================
--- trunk/property/inc/class.sorequest.inc.php  2012-01-04 09:59:17 UTC (rev 
8483)
+++ trunk/property/inc/class.sorequest.inc.php  2012-01-04 15:32:58 UTC (rev 
8484)
@@ -202,7 +202,7 @@
                        $order                  = 
isset($data['order'])?$data['order']:'';
                        $cat_id                 = 
isset($data['cat_id'])?$data['cat_id']:0;
                        $property_cat_id= 
isset($data['property_cat_id'])?$data['property_cat_id']:0;
-                       $status_id              = isset($data['status_id']) && 
$data['status_id'] ? $data['status_id']:0;
+                       $status_id              = isset($data['status_id']) && 
$data['status_id'] ? $data['status_id']:'';
                        $district_id    = isset($data['district_id']) && 
$data['district_id'] ? $data['district_id']:0;
                        $project_id             = 
isset($data['project_id'])?$data['project_id']:'';
                        $allrows                = 
isset($data['allrows'])?$data['allrows']:'';
@@ -212,6 +212,7 @@
                        $start_date             = isset($data['start_date']) && 
$data['start_date'] ? phpgwapi_datetime::date_to_timestamp($data['start_date']) 
: 0;
                        $end_date               = isset($data['end_date']) && 
$data['end_date'] ? phpgwapi_datetime::date_to_timestamp($data['end_date']) : 0;
                        $building_part  = isset($data['building_part']) && 
$data['building_part'] ? (int)$data['building_part'] : 0;
+                       $degree_id              = $data['degree_id'];
 
                        $location_id = 
$GLOBALS['phpgw']->locations->get_id('property', '.project.request');
                        $attribute_table = 'phpgw_cust_attribute';
@@ -242,12 +243,13 @@
                        $uicols['classname'][]          = '';
                        $uicols['sortable'][]           = false;
 
-                       $cols.= ",max(fm_request_condition.degree) as 
condition_degree";
-                       $cols_return[]                          = 
'condition_degree';
+                       $cols.= ",$entity_table.building_part";
+                       $cols_return[]                          = 
'building_part';
+                       $cols_group[]                           = 
'building_part';
                        $uicols['input_type'][]         = 'text';
-                       $uicols['name'][]                       = 
'condition_degree';
-                       $uicols['descr'][]                      = 
lang('condition degree');
-                       $uicols['statustext'][]         = lang('condition 
degree');
+                       $uicols['name'][]                       = 
'building_part';
+                       $uicols['descr'][]                      = 
lang('building part');
+                       $uicols['statustext'][]         = lang('building part');
                        $uicols['exchange'][]           = '';
                        $uicols['align'][]                      = '';
                        $uicols['datatype'][]           = '';
@@ -285,7 +287,7 @@
                        $cols_group[]                           = "title";
                        $uicols['input_type'][]         = 'text';
                        $uicols['name'][]                       = 'title';
-                       $uicols['descr'][]                      = lang('title');
+                       $uicols['descr'][]                      = lang('request 
description');
                        $uicols['statustext'][]         = lang('Request title');
                        $uicols['exchange'][]           = '';
                        $uicols['align'][]                      = '';
@@ -312,14 +314,12 @@
                                $uicols['sortable'][]           = false;
                        }
 
-
-                       $cols.= ",$entity_table.building_part";
-                       $cols_return[]                          = 
'building_part';
-                       $cols_group[]                           = 
'building_part';
+                       $cols.= ",max(fm_request_condition.degree) as 
condition_degree";
+                       $cols_return[]                          = 
'condition_degree';
                        $uicols['input_type'][]         = 'text';
-                       $uicols['name'][]                       = 
'building_part';
-                       $uicols['descr'][]                      = 
lang('building part');
-                       $uicols['statustext'][]         = lang('building part');
+                       $uicols['name'][]                       = 
'condition_degree';
+                       $uicols['descr'][]                      = 
lang('condition degree');
+                       $uicols['statustext'][]         = lang('condition 
degree');
                        $uicols['exchange'][]           = '';
                        $uicols['align'][]                      = '';
                        $uicols['datatype'][]           = '';
@@ -327,6 +327,7 @@
                        $uicols['classname'][]          = '';
                        $uicols['sortable'][]           = true;
 
+
                        $cols.= ",$entity_table.budget as budget";
                        $cols_return[]                          = 'budget';
                        $cols_group[]                           = 'budget';
@@ -356,21 +357,7 @@
                        $uicols['classname'][]          = '';
                        $uicols['sortable'][]           = true;
 
-                       $cols.= ",$entity_table.coordinator";
-                       $cols_return[]                          = 'coordinator';
-                       $cols_group[]                           = 'coordinator';
-                       $uicols['input_type'][]         = 'text';
-                       $uicols['name'][]                       = 'coordinator';
-                       $uicols['descr'][]                      = 
lang('Coordinator');
-                       $uicols['statustext'][]         = lang('Project 
coordinator');
-                       $uicols['exchange'][]           = '';
-                       $uicols['align'][]                      = '';
-                       $uicols['datatype'][]           = '';
-                       $uicols['formatter'][]          = '';
-                       $uicols['classname'][]          = '';
-                       $uicols['sortable'][]           = false;
 
-
                        $cols.= ",$entity_table.score";
                        $cols_return[]                          = 'score';
                        $cols_group[]                           = 'score';
@@ -405,6 +392,21 @@
                                $uicols['sortable'][]           = false;
                        }
 
+                       $cols.= ",$entity_table.coordinator";
+                       $cols_return[]                          = 'coordinator';
+                       $cols_group[]                           = 'coordinator';
+                       $uicols['input_type'][]         = 'text';
+                       $uicols['name'][]                       = 'coordinator';
+                       $uicols['descr'][]                      = 
lang('Coordinator');
+                       $uicols['statustext'][]         = lang('Project 
coordinator');
+                       $uicols['exchange'][]           = '';
+                       $uicols['align'][]                      = '';
+                       $uicols['datatype'][]           = '';
+                       $uicols['formatter'][]          = '';
+                       $uicols['classname'][]          = '';
+                       $uicols['sortable'][]           = false;
+
+
                        $paranthesis = '(';
                        $joinmethod = "{$this->left_join} fm_request_status ON 
{$entity_table}.status = fm_request_status.id)";
                        $paranthesis .= '(';
@@ -417,7 +419,6 @@
                        $sql    = 
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols'=>$cols,'cols_return'=>$cols_return,
                                
'uicols'=>array(),'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,
                                'query'=>$query,'force_location'=>true, 
'location_level' => $_location_level));
-                       unset($_location_level);
 
                        $cols_group[] = "{$entity_table}.id";
                        $cols_group[] = 'fm_request_status.descr';
@@ -456,15 +457,36 @@
                                $where = 'AND';
                        }
 
-                       if ($status_id)
+                       if ($status_id && $status_id != 'all')
                        {
-                               $filtermethod .= " $where 
fm_request.status='{$status_id}'";
+
+                               if($status_id == 'open')
+                               {
+                                       $_status_filter = array();
+                                       $this->db->query("SELECT * FROM 
fm_request_status WHERE delivered IS NULL AND closed IS NULL");
+                                       while($this->db->next_record())
+                                       {
+                                               $_status_filter[] = 
$this->db->f('id');
+                                       }
+                                       $filtermethod .= " $where 
fm_request.status IN ('" . implode("','", $_status_filter) . "')"; 
+                               }
+                               else
+                               {
+                                       $filtermethod .= " $where 
fm_request.status='$status_id' ";
+                               }
+                               $where= 'AND';
+                       }
+
+                       if ($degree_id)
+                       {
+                               $degree_id = (int)$degree_id -1;
+                               $filtermethod .= " $where 
fm_request_condition.degree = {$degree_id}";
                                $where = 'AND';
                        }
 
                        if ($building_part)
                        {
-                               $filtermethod .= " $where 
fm_request.building_part='{$building_part}'";
+                               $filtermethod .= " $where 
fm_request.building_part {$this->like} '{$building_part}%'";
                                $where = 'AND';
                        }
 
@@ -506,7 +528,12 @@
                                else
                                {
                                        $query = 
$this->db->db_addslashes($query);
-                                       $querymethod = " $where 
(fm_request.title $this->like '%$query%' or fm_request.address $this->like 
'%$query%' or fm_request.location_code $this->like '%$query%')";
+                                       $querymethod = " $where 
(fm_request.title {$this->like} '%$query%' OR fm_request.address {$this->like} 
'%$query%' OR fm_request.location_code {$this->like} '%$query%'";
+                                       for ($i=1;$i<=($_location_level);$i++)
+                                       {
+                                               $querymethod .= " OR 
fm_location{$i}.loc{$i}_name {$this->like} '%$query%'";
+                                       }
+                                       $querymethod .= ')';
                                }
                        }
 
@@ -1103,4 +1130,35 @@
                        $this->interlink->delete_at_target('property', 
'.project.request', $request_id, $this->db);
                        $this->db->transaction_commit();
                }
+
+               public function get_user_list()
+               {
+                       $values = array();
+                       $users = 
$GLOBALS['phpgw']->accounts->get_list('accounts', $start=-1, $sort='ASC', 
$order='account_lastname', $query,$offset=-1);
+                       $sql = 'SELECT DISTINCT coordinator FROM fm_request';
+                       $this->db->query($sql,__LINE__,__FILE__);
+
+                       $account_lastname = array();
+                       while($this->db->next_record())
+                       {
+                               $user_id        = $this->db->f('coordinator');
+                               if(isset($users[$user_id]))
+                               {
+                                       $name   = 
$users[$user_id]->__toString();
+                                       $values[] = array
+                                       (
+                                               'user_id'       => $user_id,
+                                               'name'          => $name
+                                       );
+                                       $account_lastname[]  = $name;
+                               }
+                       }
+
+                       if($values)
+                       {
+                               array_multisort($account_lastname, SORT_ASC, 
$values);
+                       }
+
+                       return $values;
+               }
        }

Modified: trunk/property/inc/class.uirequest.inc.php
===================================================================
--- trunk/property/inc/class.uirequest.inc.php  2012-01-04 09:59:17 UTC (rev 
8483)
+++ trunk/property/inc/class.uirequest.inc.php  2012-01-04 15:32:58 UTC (rev 
8484)
@@ -87,6 +87,7 @@
                        $this->property_cat_id          = 
$this->bo->property_cat_id;
                        $this->cat_id                           = 
$this->bo->cat_id;
                        $this->status_id                        = 
$this->bo->status_id;
+                       $this->degree_id                        = 
$this->bo->degree_id;
                        $this->district_id                      = 
$this->bo->district_id;
                        $this->start_date                       = 
$this->bo->start_date;
                        $this->end_date                         = 
$this->bo->end_date;
@@ -106,6 +107,7 @@
                                'filter'                        => 
$this->filter,
                                'cat_id'                        => 
$this->cat_id,
                                'status_id'                     => 
$this->status_id,
+                               'degree_id'                     => 
$this->degree_id,
                                'district_id'           => $this->district_id,
                                'allrows'                       => 
$this->allrows,
                                'start_date'            => $this->start_date,
@@ -238,6 +240,7 @@
                                        ."project_id:'{$project_id}',"
                                        ."filter:'{$this->filter}',"
                                        ."status_id:'{$this->status_id}',"
+                                       ."degree_id:'{$this->degree_id}',"
                                        
."property_cat_id:'{$this->property_cat_id}',"
                                        ."district_id: '{$this->district_id}',"
                                        ."start_date:'{$this->start_date}',"
@@ -266,13 +269,20 @@
                                array_unshift 
($values_combo_box[2]['cat_list'],$default_value);
 
                                $values_combo_box[3]  = 
$this->bo->select_status_list('filter',$this->status_id);
-                               $default_value = array ('id'=>'','name'=> 
lang('no status'));
-                               array_unshift 
($values_combo_box[3],$default_value);
+                               array_unshift ($values_combo_box[3],array 
('id'=>'all','name'=> lang('all')));
+                               array_unshift ($values_combo_box[3],array 
('id'=>'open','name'=> lang('open')));
 
-                               $values_combo_box[4]  = 
$this->bocommon->get_user_list('filter',$this->filter,$extra=false,$default=false,$start=-1,$sort='ASC',$order='account_lastname',$query='',$offset=-1);
-                               array_unshift 
($values_combo_box[4],array('user_id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>$GLOBALS['phpgw_info']['user']['fullname']));
+                               $values_combo_box[4]  = 
$this->bo->select_degree_list();
+                               foreach($values_combo_box[4] as &$_degree)
+                               {
+                                       $_degree['id']++;
+                               }
+                               array_unshift ($values_combo_box[4],array 
('id'=>'','name'=> lang('condition degree')));
+
+                               $values_combo_box[5]  = 
$this->bo->get_user_list('filter',$this->filter,$extra=false,$default=false,$start=-1,$sort='ASC',$order='account_lastname',$query='',$offset=-1);
+                               array_unshift 
($values_combo_box[5],array('user_id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>$GLOBALS['phpgw_info']['user']['fullname']));
                                $default_value = array 
('user_id'=>'','name'=>lang('no user'));
-                               array_unshift 
($values_combo_box[4],$default_value);
+                               array_unshift 
($values_combo_box[5],$default_value);
 
                                $_filter_buildingpart = array();
                                $filter_buildingpart = 
isset($this->bo->config->config_data['filter_buildingpart']) ? 
$this->bo->config->config_data['filter_buildingpart'] : array();
@@ -298,6 +308,7 @@
                                                                'cat_id'        
                => $this->cat_id,
                                                                'filter'        
                => $this->filter,
                                                                'status_id'     
                => $this->status_id,
+                                                               'degree_id'     
                => $this->degree_id,
                                                                'project_id'    
        => $project_id,
                                                                'district_id'   
    => $this->district_id,
                                                                'query'         
                => $this->query,
@@ -349,6 +360,15 @@
                                                                        
'tab_index' => 4
                                                                ),
                                                                array
+                                                               ( //boton       
STATUS
+                                                                       'id' => 
'btn_degree_id',
+                                                                       'name' 
=> 'degree_id',
+                                                                       'value' 
=> lang('condition degree'),
+                                                                       'type' 
=> 'button',
+                                                                       'style' 
=> 'filter',
+                                                                       
'tab_index' => 5
+                                                               ),
+                                                               array
                                                                (
                                                                        'id' => 
'sel_building_part', // traditional listbox for long list
                                                                        'name' 
=> 'building_part',
@@ -357,7 +377,7 @@
                                                                        'style' 
=> 'filter',
                                                                        
'values'        => $building_part_list,
                                                                        
'onchange'=> 'onChangeSelect("building_part");',
-                                                                       
'tab_index' => 5
+                                                                       
'tab_index' => 6
                                                                ),
                                                                array
                                                                ( //boton       
FILTER
@@ -366,21 +386,21 @@
                                                                        'value' 
=> lang('User'),
                                                                        'type' 
=> 'button',
                                                                        'style' 
=> 'filter',
-                                                                       
'tab_index' => 6
+                                                                       
'tab_index' => 7
                                                                ),
                                                                array
                                                                (
                                                                        'type'  
=> 'button',
                                                                        'id'    
=> 'btn_update',
                                                                        'value' 
=> lang('Update project'),
-                                                                       
'tab_index' => 14
+                                                                       
'tab_index' => 15
                                                                ),
                                                                array
                                                                (
                                                                        'type'  
=> 'button',
                                                                        'id'    
=> 'btn_export',
                                                                        'value' 
=> lang('download'),
-                                                                       
'tab_index' => 13
+                                                                       
'tab_index' => 14
                                                                ),
 
                                                                array
@@ -388,7 +408,7 @@
                                                                        'type'  
=> 'button',
                                                                        'id'    
=> 'btn_new',
                                                                        'value' 
=> lang('add'),
-                                                                       
'tab_index' => 12
+                                                                       
'tab_index' => 13
                                                                ),
                                                                array
                                                                (
@@ -416,7 +436,7 @@
                                                                                
'menuaction' => 'property.uiproject.date_search')
                                                                        
)."','','width=350,height=250')",
                                                                        'value' 
=> lang('Date search'),
-                                                                       
'tab_index' => 11
+                                                                       
'tab_index' => 12
                                                                ),
 
                                                                array
@@ -426,7 +446,7 @@
                                                                        'value' 
   => lang('search'),
                                                                        
'onkeypress' => 'return pulsar(event)',
                                                                        'type' 
=> 'button',
-                                                                       
'tab_index' => 10
+                                                                       
'tab_index' => 11
                                                                ),
                                                                array
                                                                ( //hidden 
request
@@ -443,7 +463,7 @@
                                                                        'type' 
=> 'text',
                                                                        'size'  
  => 28,
                                                                        
'onkeypress' => 'return pulsar(event)',
-                                                                       
'tab_index' => 9
+                                                                       
'tab_index' => 10
                                                                ),
                                                                array
                                                                (
@@ -454,7 +474,7 @@
                                                                        (
                                                                                
'menuaction' => 
'property.uirequest.priority_key'))."','','left=50,top=100,width=350,height=350,scrollbars=1')",
                                                                                
'value' => lang('Priority key'),
-                                                                               
'tab_index' => 8
+                                                                               
'tab_index' => 9
                                                                ),
                                                                array
                                                                (
@@ -465,7 +485,7 @@
                                                                        (
                                                                                
'menuaction' => 
'property.uirequest.columns'))."','','width=300,height=600,scrollbars=1')",
                                                                                
'value' => lang('columns'),
-                                                                               
'tab_index' => 7
+                                                                               
'tab_index' => 8
                                                                ),
                                                        ),
                                                        'hidden_value' => array
@@ -493,7 +513,12 @@
                                                                array
                                                                ( //div values  
combo_box_4
                                                                        'id' => 
'values_combo_box_4',
-                                                                       'value' 
=> $this->bocommon->select2String($values_combo_box[4], 'user_id')
+                                                                       'value' 
=> $this->bocommon->select2String($values_combo_box[4])
+                                                               ),
+                                                               array
+                                                               ( //div values  
combo_box_5
+                                                                       'id' => 
'values_combo_box_5',
+                                                                       'value' 
=> $this->bocommon->select2String($values_combo_box[5], 'user_id')
                                                                )
                                                        )
                                                )
@@ -502,17 +527,17 @@
 
                                if(!$this->acl_manage)//priority_key
                                {
-                                       
unset($datatable['actions']['form'][0]['fields']['field'][16]);
+                                       
unset($datatable['actions']['form'][0]['fields']['field'][17]);
                                }
 
                                if(!$this->acl_add) //add
                                {
-                                       
unset($datatable['actions']['form'][0]['fields']['field'][8]);
+                                       
unset($datatable['actions']['form'][0]['fields']['field'][9]);
                                }
 
                                if(!$project_id) // update project
                                {
-                                       
unset($datatable['actions']['form'][0]['fields']['field'][6]);
+                                       
unset($datatable['actions']['form'][0]['fields']['field'][7]);
                                }
                                $dry_run = true;
                        }

Modified: trunk/property/js/yahoo/request.index.js
===================================================================
--- trunk/property/js/yahoo/request.index.js    2012-01-04 09:59:17 UTC (rev 
8483)
+++ trunk/property/js/yahoo/request.index.js    2012-01-04 15:32:58 UTC (rev 
8484)
@@ -2,13 +2,14 @@
 // Declaration of request.index vars
 //--------------------------------------------------------
        //define SelectButton
-       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4;
+       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4, oMenuButton_5;
        var selectsButtons = [
     {order:0, var_URL:'property_cat_id', name:'btn_property_cat',      
style:'categorybutton', dependiente:[]},
        {order:1, 
var_URL:'district_id',name:'btn_district_id',style:'districtbutton',dependiente:''},
        {order:2, 
var_URL:'cat_id',name:'btn_cat_id',style:'categorybutton',dependiente:''},
        {order:3, 
var_URL:'status_id',name:'btn_status_id',style:'districtbutton',dependiente:''},
-       {order:4, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''}
+       {order:4, 
var_URL:'degree_id',name:'btn_degree_id',style:'districtbutton',dependiente:''},
+       {order:5, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''}
        ]
 
        // define buttons
@@ -98,12 +99,17 @@
                        {
                                oMenuButton_3.set("label", ("<em>" + 
array_options[3][index][1] + "</em>"));
                        }
-                       //user
-                       index = 
locate_in_array_options(4,"value",path_values.filter);
+                       index = 
locate_in_array_options(4,"value",path_values.degree_id);
                        if(index)
                        {
                                oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
                        }
+                       //user
+                       index = 
locate_in_array_options(5,"value",path_values.filter);
+                       if(index)
+                       {
+                               oMenuButton_5.set("label", ("<em>" + 
array_options[5][index][1] + "</em>"));
+                       }
 
                        oMenuButton_0.focus();
                }

Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang  2012-01-04 09:59:17 UTC (rev 8483)
+++ trunk/property/setup/phpgw_no.lang  2012-01-04 15:32:58 UTC (rev 8484)
@@ -1329,7 +1329,7 @@
 request start date     property        no      anmodning startdato
 request status property        no      Behov::status
 request title  property        no      Tiltak tittel
-request description    property        no      Tilstand beskrivelse
+request description    property        no      Tilstandbeskrivelse
 requirement    property        no      Behov/pålegg
 resend workorder       property        no      Send ordre på nytt
 reserve        property        no      reserve




reply via email to

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