fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7581] Property: tweak request


From: Sigurd Nes
Subject: [Fmsystem-commits] [7581] Property: tweak request
Date: Tue, 13 Sep 2011 11:49:38 +0000

Revision: 7581
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7581
Author:   sigurdne
Date:     2011-09-13 11:49:38 +0000 (Tue, 13 Sep 2011)
Log Message:
-----------
Property: tweak 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
    trunk/property/templates/base/request.xsl

Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php   2011-09-13 08:19:32 UTC (rev 
7580)
+++ trunk/property/inc/class.bocommon.inc.php   2011-09-13 11:49:38 UTC (rev 
7581)
@@ -1333,7 +1333,7 @@
 
                        $from = " FROM $paranthesis $entity_table ";
 
-                       $sql = "SELECT $cols $from $joinmethod";
+                       $sql = "SELECT DISTINCT $cols $from $joinmethod";
 
                        return $sql;
 

Modified: trunk/property/inc/class.borequest.inc.php
===================================================================
--- trunk/property/inc/class.borequest.inc.php  2011-09-13 08:19:32 UTC (rev 
7580)
+++ trunk/property/inc/class.borequest.inc.php  2011-09-13 11:49:38 UTC (rev 
7581)
@@ -42,7 +42,7 @@
                var $order;
                var $cat_id;
                public $sum_budget = 0;
-               public $sum_residual_demand = 0;
+               public $sum_consume = 0;
 
                var $public_functions = array
                        (
@@ -74,6 +74,7 @@
                        $sort                   = phpgw::get_var('sort');
                        $order                  = phpgw::get_var('order');
                        $filter                 = phpgw::get_var('filter', 
'int');
+                       $property_cat_id= phpgw::get_var('property_cat_id', 
'int');
                        $district_id    = phpgw::get_var('district_id', 'int');
                        $cat_id                 = phpgw::get_var('cat_id', 
'int');
                        $status_id              = phpgw::get_var('status_id');
@@ -107,6 +108,11 @@
                        {
                                $this->district_id = $district_id;
                        }
+
+                       if(isset($_POST['property_cat_id']) || 
isset($_GET['property_cat_id']))
+                       {
+                               $this->property_cat_id = $property_cat_id;
+                       }
                        if(isset($_POST['cat_id']) || isset($_GET['cat_id']))
                        {
                                $this->cat_id = $cat_id;
@@ -147,14 +153,15 @@
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data','request');
 
-                       $this->start            = $data['start'];
-                       $this->query            = $data['query'];
-                       $this->filter           = $data['filter'];
-                       $this->sort                     = $data['sort'];
-                       $this->order            = $data['order'];
-                       $this->district_id      = $data['district_id'];
-                       $this->cat_id           = $data['cat_id'];
-                       $this->status_id        = $data['status_id'];
+                       $this->start                    = $data['start'];
+                       $this->query                    = $data['query'];
+                       $this->filter                   = $data['filter'];
+                       $this->sort                             = $data['sort'];
+                       $this->order                    = $data['order'];
+                       $this->district_id              = $data['district_id'];
+                       $this->cat_id                   = $data['cat_id'];
+                       $this->property_cat_id = $data['property_cat_id'];
+                       $this->status_id                = $data['status_id'];
                        $this->start_date               = 
isset($data['start_date']) ? $data['start_date']: '';
                        $this->end_date                 = 
isset($data['end_date']) ? $data['end_date']: '';
 
@@ -396,10 +403,12 @@
                        $request = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                '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));
+                               '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));
 
                        $this->total_records    = $this->so->total_records;
                        $this->sum_budget               = $this->so->sum_budget;
+                       $this->sum_consume              = 
$this->so->sum_consume;
                        $this->uicols                   = $this->so->uicols;
                        $cols_extra                             = 
$this->so->cols_extra;
 

Modified: trunk/property/inc/class.sorequest.inc.php
===================================================================
--- trunk/property/inc/class.sorequest.inc.php  2011-09-13 08:19:32 UTC (rev 
7580)
+++ trunk/property/inc/class.sorequest.inc.php  2011-09-13 11:49:38 UTC (rev 
7581)
@@ -37,7 +37,7 @@
        class property_sorequest
        {
                public $sum_budget = 0;
-
+               public $sum_consume = 0;
                function __construct()
                {
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
@@ -201,6 +201,7 @@
                        $sort                   = isset($data['sort']) && 
$data['sort'] ? $data['sort'] : 'DESC';
                        $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;
                        $district_id    = isset($data['district_id']) && 
$data['district_id'] ? $data['district_id']:0;
                        $project_id             = 
isset($data['project_id'])?$data['project_id']:'';
@@ -217,10 +218,12 @@
 
                        $entity_table = 'fm_request';
 
-                       $cols .= $entity_table . '.location_code';
-                       $cols_return[] = 'location_code';
+                       $cols .= "{$entity_table}.location_code";
+                       $cols_return[]                          = 
'location_code';
+                       $cols_group[]                           = 
"{$entity_table}.location_code";
 
-                       $cols .= ",$entity_table.id as request_id";
+
+                       $cols .= ",{$entity_table}.id as request_id";
                        $cols_return[]                          = 'request_id';
                        $uicols['input_type'][]         = 'text';
                        $uicols['name'][]                       = 'request_id';
@@ -236,6 +239,7 @@
 
                        $cols.= ",fm_request_status.descr as status";
                        $cols_return[]                          = 'status';
+                       $cols_group[]                           = 'status';
                        $uicols['input_type'][]         = 'text';
                        $uicols['name'][]                       = 'status';
                        $uicols['descr'][]                      = 
lang('status');
@@ -248,11 +252,18 @@
                        $uicols['sortable'][]           = false;
 
                        $cols.= 
",$entity_table.start_date,$entity_table.entry_date,$entity_table.closed_date,$entity_table.in_progress_date,$entity_table.delivered_date";
-                       $cols_return[]                          = 'start_date';
-                       $cols_return[]                          = 'entry_date';
-                       $cols_return[]                          = 'closed_date';
-                       $cols_return[]                          = 
'in_progress_date';
-                       $cols_return[]                          = 
'delivered_date';
+                       $cols_return[]                          = "start_date";
+                       $cols_return[]                          = "entry_date";
+                       $cols_return[]                          = "closed_date";
+                       $cols_return[]                          = 
"in_progress_date";
+                       $cols_return[]                          = 
"delivered_date";
+
+                       $cols_group[]                           = 
"{$entity_table}.start_date";
+                       $cols_group[]                           = 
"{$entity_table}.entry_date";
+                       $cols_group[]                           = 
"{$entity_table}.closed_date";
+                       $cols_group[]                           = 
"{$entity_table}.in_progress_date";
+                       $cols_group[]                           = 
"{$entity_table}.delivered_date";
+
                        $uicols['input_type'][]         = 'text';
                        $uicols['name'][]                       = 'start_date';
                        $uicols['descr'][]                      = lang('start 
date');
@@ -267,6 +278,7 @@
 
                        $cols.= ",$entity_table.title as title";
                        $cols_return[]                          = 'title';
+                       $cols_group[]                           = "title";
                        $uicols['input_type'][]         = 'text';
                        $uicols['name'][]                       = 'title';
                        $uicols['descr'][]                      = lang('title');
@@ -283,6 +295,7 @@
                        {
                                $cols.= ",$entity_table.descr as descr";
                                $cols_return[]                          = 
'descr';
+                               $cols_group[]                           = 
"$entity_table.descr";
                                $uicols['input_type'][]         = 'text';
                                $uicols['name'][]                       = 
'descr';
                                $uicols['descr'][]                      = 
lang('descr');
@@ -296,8 +309,23 @@
                        }
 
 
+                       $cols.= ",$entity_table.building_part";
+                       $cols_return[]                          = 
'building_part';
+                       $cols_group[]                           = 
'building_part';
+                       $uicols['input_type'][]         = 'text';
+                       $uicols['name'][]                       = 
'building_part';
+                       $uicols['descr'][]                      = 
lang('building part');
+                       $uicols['statustext'][]         = lang('building part');
+                       $uicols['exchange'][]           = '';
+                       $uicols['align'][]                      = '';
+                       $uicols['datatype'][]           = '';
+                       $uicols['formatter'][]          = '';
+                       $uicols['classname'][]          = '';
+                       $uicols['sortable'][]           = true;
+
                        $cols.= ",$entity_table.budget as budget";
                        $cols_return[]                          = 'budget';
+                       $cols_group[]                           = 'budget';
                        $uicols['input_type'][]         = 'text';
                        $uicols['name'][]                       = 'budget';
                        $uicols['descr'][]                      = lang('cost 
estimate');
@@ -309,8 +337,24 @@
                        $uicols['classname'][]          = '';
                        $uicols['sortable'][]           = true;
 
+                       
+
+                       $cols.= ",sum(amount) as consume";
+                       $cols_return[]                          = 'consume';
+                       $uicols['input_type'][]         = 'text';
+                       $uicols['name'][]                       = 'consume';
+                       $uicols['descr'][]                      = 
lang('consume');
+                       $uicols['statustext'][]         = lang('consume');
+                       $uicols['exchange'][]           = '';
+                       $uicols['align'][]                      = '';
+                       $uicols['datatype'][]           = '';
+                       $uicols['formatter'][]          = 'FormatterRight';
+                       $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');
@@ -325,6 +369,7 @@
 
                        $cols.= ",$entity_table.score";
                        $cols_return[]                          = 'score';
+                       $cols_group[]                           = 'score';
                        $uicols['input_type'][]         = 'text';
                        $uicols['name'][]                       = 'score';
                        $uicols['descr'][]                      = lang('score');
@@ -342,27 +387,38 @@
                        {
                                $cols .= ",{$entity_table}." . 
$this->db->f('column_name');
 
-                               $cols_return[]                          =  
$this->db->f('column_name');
+                               $cols_return[]                          = 
$this->db->f('column_name');
+                               $cols_group[]                           = 
$this->db->f('column_name');
                                $uicols['input_type'][]         = 'text';
-                               $uicols['name'][]                       =  
$this->db->f('column_name');
-                               $uicols['descr'][]                      =  
$this->db->f('input_text',true);
-                               $uicols['statustext'][]         =  
$this->db->f('statustext',true);
+                               $uicols['name'][]                       = 
$this->db->f('column_name');
+                               $uicols['descr'][]                      = 
$this->db->f('input_text',true);
+                               $uicols['statustext'][]         = 
$this->db->f('statustext',true);
                                $uicols['exchange'][]           = '';
                                $uicols['align'][]                      = '';
                                $uicols['datatype'][]           = 
$this->db->f('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 .= '(';
+                       $joinmethod .= "{$this->left_join} fm_request_consume 
ON {$entity_table}.id = fm_request_consume.request_id)";
+
+
                        $sql    = 
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols'=>$cols,'cols_return'=>$cols_return,
                                
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,
                                'query'=>$query,'force_location'=>true));
 
+                       $cols_group[] = "{$entity_table}.id";
+                       $cols_group[] = 'fm_request_status.descr';
+                       $cols_group[] = "{$entity_table}.address";
+
+                       $groupmethod = 'GROUP BY ' . implode(',', $cols_group);
+                       
                        if ($order)
                        {
                                $ordermethod = " order by $order $sort";
@@ -383,6 +439,15 @@
                                $where= 'AND';
                        }
 
+
+
+
+                       if ($property_cat_id > 0)
+                       {
+                               $filtermethod .= " $where 
fm_location1.category='{$property_cat_id}' ";
+                               $where = 'AND';
+                       }
+
                        if ($cat_id > 0)
                        {
                                $filtermethod .= " $where 
fm_request.category='{$cat_id}' ";
@@ -437,7 +502,7 @@
                                }
                        }
 
-                       $sql .= " $filtermethod $querymethod";
+                       $sql .= " $filtermethod $querymethod $groupmethod";
 //_debug_array($sql);
                        $this->uicols           = $this->bocommon->uicols;
                        $cols_return            = $this->bocommon->cols_return;
@@ -446,11 +511,15 @@
 
                        $this->db->fetchmode = 'ASSOC';
 
-                       $sql2 = 'SELECT count(*) as cnt, sum(budget) as 
sum_budget ' . substr($sql,strripos($sql,'from'));
+               //      $sql2 = 'SELECT count(*) as cnt, sum(budget) as 
sum_budget ' . substr($sql,strripos($sql,'FROM'));
+
+                       $sql2 = "SELECT count(*) as cnt, sum(budget) as 
sum_budget, sum(consume) as sum_consume FROM ({$sql}) as t";
+//_debug_array($sql2);
                        $this->db->query($sql2,__LINE__,__FILE__);
                        $this->db->next_record();
                        $this->total_records = $this->db->f('cnt');
                        $this->sum_budget       = $this->db->f('sum_budget');
+                       $this->sum_consume      = $this->db->f('sum_consume');
                        
                        //address@hidden 23/10/08 avoid retrieve data in first 
time, only render definition for headers (var myColumnDefs)
                        if($dry_run)

Modified: trunk/property/inc/class.uirequest.inc.php
===================================================================
--- trunk/property/inc/class.uirequest.inc.php  2011-09-13 08:19:32 UTC (rev 
7580)
+++ trunk/property/inc/class.uirequest.inc.php  2011-09-13 11:49:38 UTC (rev 
7581)
@@ -84,6 +84,7 @@
                        $this->sort                                     = 
$this->bo->sort;
                        $this->order                            = 
$this->bo->order;
                        $this->filter                           = 
$this->bo->filter;
+                       $this->property_cat_id          = 
$this->property_cat_id;
                        $this->cat_id                           = 
$this->bo->cat_id;
                        $this->status_id                        = 
$this->bo->status_id;
                        $this->district_id                      = 
$this->bo->district_id;
@@ -109,6 +110,7 @@
                                        'allrows'               => 
$this->allrows,
                                        'start_date'    => $this->start_date,
                                        'end_date'              => 
$this->end_date,
+                                       'property_cat_id'       => 
$this->property_cat_id,
                                );
                        $this->bo->save_sessiondata($data);
                }
@@ -235,27 +237,41 @@
                                        ."project_id:'{$project_id}',"
                                        ."filter:'{$this->filter}',"
                                        ."status_id:'{$this->status_id}',"
+                                       
."property_cat_id:'{$this->property_cat_id}',"
                                        ."district_id: '{$this->district_id}',"
                                        ."start_date:'{$this->start_date}',"
                                        ."end_date: '{$this->end_date}',"
                                        ."cat_id:'{$this->cat_id}'";
 
-                               $values_combo_box[0]  = 
$this->bocommon->select_district_list('filter',$this->district_id);
-                               $default_value = array 
('id'=>'','name'=>lang('no district'));
+                               $values_combo_box[0]  = 
$this->bocommon->select_category_list(array
+                                       (
+                                               'format'=>'filter',
+                               //              'selected' => $this->cat_id,
+                                               'type' =>'location',
+                                               'type_id' =>1,
+                                               'order'=>'descr'
+                                       )
+                               );
+                               $default_value = array 
('id'=>'','name'=>lang('no category'));
                                array_unshift 
($values_combo_box[0],$default_value);
 
-                               $values_combo_box[1] = 
$this->cats->formatted_xslt_list(array('select_name' => 'cat_id','selected' => 
$this->cat_id,'globals' => True));
+
+                               $values_combo_box[1]  = 
$this->bocommon->select_district_list('filter',$this->district_id);
+                               $default_value = array 
('id'=>'','name'=>lang('no district'));
+                               array_unshift 
($values_combo_box[1],$default_value);
+
+                               $values_combo_box[2] = 
$this->cats->formatted_xslt_list(array('select_name' => 'cat_id','selected' => 
$this->cat_id,'globals' => True));
                                $default_value = array ('cat_id'=>'','name'=> 
lang('no category'));
-                               array_unshift 
($values_combo_box[1]['cat_list'],$default_value);
+                               array_unshift 
($values_combo_box[2]['cat_list'],$default_value);
 
-                               $values_combo_box[2]  = 
$this->bo->select_status_list('filter',$this->status_id);
+                               $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[2],$default_value);
+                               array_unshift 
($values_combo_box[3],$default_value);
 
-                               $values_combo_box[3]  = 
$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[3],array('user_id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>$GLOBALS['phpgw_info']['user']['fullname']));
+                               $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']));
                                $default_value = array 
('user_id'=>'','name'=>lang('no user'));
-                               array_unshift 
($values_combo_box[3],$default_value);
+                               array_unshift 
($values_combo_box[4],$default_value);
 
                                $datatable['actions']['form'] = array
                                        (
@@ -266,6 +282,7 @@
                                                        (
                                                                'menuaction'    
        => 'property.uirequest.index',
                                                                'lookup'        
        => $lookup,
+                                                               
'property_cat_id'       => $this->property_cat_id,
                                                                'cat_id'        
                => $this->cat_id,
                                                                'filter'        
                => $this->filter,
                                                                'status_id'     
                => $this->status_id,
@@ -283,6 +300,15 @@
                                                        (
                                                                array
                                                                ( //boton       
DISTRICT
+                                                                       'id' => 
'btn_property_cat',
+                                                                       'name' 
=> 'property_cat_id',
+                                                                       'value' 
=> lang('property type'),
+                                                                       'type' 
=> 'button',
+                                                                       'style' 
=> 'filter',
+                                                                       
'tab_index' => 1
+                                                               ),
+                                                               array
+                                                               ( //boton       
DISTRICT
                                                                        'id' => 
'btn_district_id',
                                                                        'name' 
=> 'district_id',
                                                                        'value' 
=> lang('district'),
@@ -321,17 +347,18 @@
                                                                array
                                                                (
                                                                        'type'  
=> 'button',
-                                                                       'id'    
=> 'btn_export',
-                                                                       'value' 
=> lang('download'),
+                                                                       'id'    
=> 'btn_update',
+                                                                       'value' 
=> lang('Update project'),
                                                                        
'tab_index' => 9
                                                                ),
                                                                array
                                                                (
                                                                        'type'  
=> 'button',
-                                                                       'id'    
=> 'btn_update',
-                                                                       'value' 
=> lang('Update project'),
+                                                                       'id'    
=> 'btn_export',
+                                                                       'value' 
=> lang('download'),
                                                                        
'tab_index' => 8
                                                                ),
+
                                                                array
                                                                (
                                                                        'type'  
=> 'button',
@@ -427,17 +454,22 @@
                                                                        array
                                                                        ( //div 
values  combo_box_1
                                                                                
'id' => 'values_combo_box_1',
-                                                                               
'value' => $this->bocommon->select2String($values_combo_box[1]['cat_list'], 
'cat_id') //i.e.  id,value/id,vale/
+                                                                               
'value' => $this->bocommon->select2String($values_combo_box[1])
                                                                        ),
                                                                        array
                                                                        ( //div 
values  combo_box_2
                                                                                
'id' => 'values_combo_box_2',
-                                                                               
'value' => $this->bocommon->select2String($values_combo_box[2])
+                                                                               
'value' => $this->bocommon->select2String($values_combo_box[2]['cat_list'], 
'cat_id') //i.e.  id,value/id,vale/
                                                                        ),
                                                                        array
                                                                        ( //div 
values  combo_box_3
                                                                                
'id' => 'values_combo_box_3',
-                                                                               
'value' => $this->bocommon->select2String($values_combo_box[3], 'user_id')
+                                                                               
'value' => $this->bocommon->select2String($values_combo_box[3])
+                                                                       ),
+                                                                       array
+                                                                       ( //div 
values  combo_box_4
+                                                                               
'id' => 'values_combo_box_4',
+                                                                               
'value' => $this->bocommon->select2String($values_combo_box[4], 'user_id')
                                                                        )
                                                                )
                                                        )
@@ -738,7 +770,7 @@
                                        'currentPage'           => 
$datatable['sorting']['currentPage'],
                                        'records'                       => 
array(),
                                        'sum_budget'            => 
$this->bo->sum_budget,
-                                       'sum_residual_demand'=> 
$this->bo->sum_residual_demand
+                                       'sum_consume'           => 
$this->bo->sum_consume
 
                                );
 

Modified: trunk/property/js/yahoo/request.index.js
===================================================================
--- trunk/property/js/yahoo/request.index.js    2011-09-13 08:19:32 UTC (rev 
7580)
+++ trunk/property/js/yahoo/request.index.js    2011-09-13 11:49:38 UTC (rev 
7581)
@@ -2,21 +2,22 @@
 // Declaration of request.index vars
 //--------------------------------------------------------
        //define SelectButton
-       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3;
+       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4;
        var selectsButtons = [
-       {order:0, 
var_URL:'district_id',name:'btn_district_id',style:'districtbutton',dependiente:''},
-       {order:1, 
var_URL:'cat_id',name:'btn_cat_id',style:'categorybutton',dependiente:''},
-       {order:2, 
var_URL:'status_id',name:'btn_status_id',style:'districtbutton',dependiente:''},
-       {order:3, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''}
+    {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:''}
        ]
 
        // define buttons
        var oNormalButton_0, oNormalButton_1, oNormalButton_2, oNormalButton_3;
        var normalButtons = [
        {order:0, name:'btn_search', funct:"onSearchClick"},
-       {order:1, name:'btn_export', funct:"onDownloadClick"},
-       {order:2, name:'btn_update', funct:"onUpdateProject"},
-       {order:3, name:'btn_new', funct:"onNewClick"}
+       {order:1, name:'btn_update', funct:"onUpdateProject"},
+       {order:2, name:'btn_new', funct:"onNewClick"},
+       {order:3, name:'btn_export', funct:"onDownloadClick"}
        ]
 
        // define Text buttons
@@ -26,7 +27,8 @@
 
        var toolTips =
        [
-               {name:'btn_export', title:'Download', description:'Download 
table to your browser',ColumnDescription:''}
+               {name:'btn_export', title:'Download', description:'Download 
table to your browser',ColumnDescription:''},
+               {name:'btn_update', title:'Update Project', description:'Update 
project with selected',ColumnDescription:''}
        ]
 
        var linktoolTips =
@@ -56,30 +58,37 @@
                        tableYUI.setAttribute("id","tableYUI");
 
 //     console.log(path_values);
-                       //district
-                       index = 
locate_in_array_options(0,"value",path_values.district_id);
+
+                       index = 
locate_in_array_options(0,"value",path_values.property_cat_id);
                        if(index)
                        {
                                oMenuButton_0.set("label", ("<em>" + 
array_options[0][index][1] + "</em>"));
                        }
-                       //category
-                       index = 
locate_in_array_options(1,"value",path_values.cat_id);
+
+                       //district
+                       index = 
locate_in_array_options(1,"value",path_values.district_id);
                        if(index)
                        {
                                oMenuButton_1.set("label", ("<em>" + 
array_options[1][index][1] + "</em>"));
                        }
-                       //status
-                       index = 
locate_in_array_options(2,"value",path_values.status_id);
+                       //category
+                       index = 
locate_in_array_options(2,"value",path_values.cat_id);
                        if(index)
                        {
                                oMenuButton_2.set("label", ("<em>" + 
array_options[2][index][1] + "</em>"));
                        }
-                       //user
-                       index = 
locate_in_array_options(3,"value",path_values.filter);
+                       //status
+                       index = 
locate_in_array_options(3,"value",path_values.status_id);
                        if(index)
                        {
                                oMenuButton_3.set("label", ("<em>" + 
array_options[3][index][1] + "</em>"));
                        }
+                       //user
+                       index = 
locate_in_array_options(4,"value",path_values.filter);
+                       if(index)
+                       {
+                               oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
+                       }
 
                        oMenuButton_0.focus();
                }
@@ -158,7 +167,7 @@
        this.addFooterDatatable = function()
        {
                tmp_sum_budget = YAHOO.util.Number.format(values_ds.sum_budget, 
{decimalPlaces:0, decimalSeparator:",", thousandsSeparator:" "});
-//             tmp_sum_residual_demand = 
YAHOO.util.Number.format(values_ds.sum_residual_demand, {decimalPlaces:0, 
decimalSeparator:",", thousandsSeparator:" "});
+               tmp_sum_consume = 
YAHOO.util.Number.format(values_ds.sum_consume, {decimalPlaces:0, 
decimalSeparator:",", thousandsSeparator:" "});
 
                count_empty = 0;
                for(i=0;i<myColumnDefs.length;i++)
@@ -177,7 +186,7 @@
 
                td_empty(count_empty);
                td_sum(tmp_sum_budget);
-       //      td_sum(tmp_sum_residual_demand);
+               td_sum(tmp_sum_consume);
                td_empty(count_empty_end);
                //Add to Table
 

Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang  2011-09-13 08:19:32 UTC (rev 7580)
+++ trunk/property/setup/phpgw_no.lang  2011-09-13 11:49:38 UTC (rev 7581)
@@ -639,7 +639,7 @@
 enter a description of the document    property        no      gi en 
beskrivelse av dokumentet
 enter a description of the equipment   property        no      gi en 
beskrivelse av utstyret
 enter a description of the project     property        no      gi en 
beskrivelse av prosjektet
-enter a description of the request     property        no      Gi en 
beskrivelse av tiltaket
+enter a description of the request     property        no      Gi en 
beskrivelse av tilstanden
 enter a description of the standard    property        no      gi en 
beskrivelse av standarden
 enter a description of the status      property        no      Angi en 
beskrivelse av statusen
 enter a description the attribute      property        no      gi en 
beskrivelse av attributten

Modified: trunk/property/templates/base/request.xsl
===================================================================
--- trunk/property/templates/base/request.xsl   2011-09-13 08:19:32 UTC (rev 
7580)
+++ trunk/property/templates/base/request.xsl   2011-09-13 11:49:38 UTC (rev 
7581)
@@ -263,27 +263,23 @@
                                                                </tr>
                                                        </xsl:for-each>
 
+                                                       <xsl:variable 
name="lang_request_title"><xsl:value-of select="php:function('lang', 'enter 
request title')" /></xsl:variable>
                                                        <tr>
-                                                               <td 
valign="top">
+                                                               <td 
valign="top" title= "{$lang_request_title}">
                                                                        
<xsl:value-of select="php:function('lang', 'request title')" />
                                                                </td>
                                                                <td>
-                                                                       <input 
type="text" name="values[title]" value="{value_title}" size="60">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enter request title')" />
-                                                                               
</xsl:attribute>
+                                                                       <input 
type="text" name="values[title]" value="{value_title}" size="60" title= 
"{$lang_request_title}">
                                                                        </input>
                                                                </td>
                                                        </tr>
+                                                       <xsl:variable 
name="lang_request_description"><xsl:value-of select="php:function('lang', 
'enter a description of the request')" /></xsl:variable>
                                                        <tr>
-                                                               <td 
valign="top">
+                                                               <td 
valign="top" title= "{$lang_request_description}">
                                                                        
<xsl:value-of select="php:function('lang', 'request description')" />
                                                                </td>
                                                                <td>
-                                                                       
<textarea cols="60" rows="6" name="values[descr]">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enter a description of the 
request')" />
-                                                                               
</xsl:attribute>
+                                                                       
<textarea cols="60" rows="6" name="values[descr]" title= 
"{$lang_request_description}">
                                                                                
<xsl:value-of select="value_descr"/>
                                                                        
</textarea>
                                                                </td>




reply via email to

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