fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6681] merge 6679:6680 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [6681] merge 6679:6680 from trunk
Date: Thu, 16 Dec 2010 13:37:36 +0000

Revision: 6681
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6681
Author:   sigurdne
Date:     2010-12-16 13:37:36 +0000 (Thu, 16 Dec 2010)
Log Message:
-----------
merge 6679:6680 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/property/inc/class.borequest.inc.php
    branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
    branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
    branches/Version-1_0-branch/property/js/yahoo/request.index.js

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680

Modified: branches/Version-1_0-branch/property/inc/class.borequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.borequest.inc.php    
2010-12-16 13:36:36 UTC (rev 6680)
+++ branches/Version-1_0-branch/property/inc/class.borequest.inc.php    
2010-12-16 13:37:36 UTC (rev 6681)
@@ -66,17 +66,17 @@
                                $this->use_session = true;
                        }
 
-                       $start  = phpgw::get_var('start', 'int', 'REQUEST', 0);
-                       $query  = phpgw::get_var('query');
-                       $sort   = phpgw::get_var('sort');
-                       $order  = phpgw::get_var('order');
-                       $filter = phpgw::get_var('filter', 'int');
-                       $cat_id = phpgw::get_var('cat_id', 'int');
-                       $status_id      = phpgw::get_var('status_id');
-                       $allrows        = phpgw::get_var('allrows', 'bool');
-                       $this->p_num                    = 
phpgw::get_var('p_num');
+                       $start                  = phpgw::get_var('start', 
'int', 'REQUEST', 0);
+                       $query                  = phpgw::get_var('query');
+                       $sort                   = phpgw::get_var('sort');
+                       $order                  = phpgw::get_var('order');
+                       $filter                 = phpgw::get_var('filter', 
'int');
+                       $district_id    = phpgw::get_var('district_id', 'int');
+                       $cat_id                 = phpgw::get_var('cat_id', 
'int');
+                       $status_id              = phpgw::get_var('status_id');
+                       $allrows                = phpgw::get_var('allrows', 
'bool');
+                       $this->p_num    = phpgw::get_var('p_num');
 
-
                        if(isset($_POST['start']) || isset($_GET['start']))
                        {
                                $this->start = $start;
@@ -97,6 +97,10 @@
                        {
                                $this->order = $order;
                        }
+                       if(isset($_POST['district_id']) || 
isset($_GET['district_id']))
+                       {
+                               $this->district_id = $district_id;
+                       }
                        if(isset($_POST['cat_id']) || isset($_GET['cat_id']))
                        {
                                $this->cat_id = $cat_id;
@@ -127,12 +131,13 @@
                {
                        $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->cat_id   = $data['cat_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->status_id        = $data['status_id'];
                }
 
@@ -265,7 +270,7 @@
                function read($data)
                {
                        $request = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id,'status_id' => 
$this->status_id,
+                                                                               
        '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));
                        $this->total_records = $this->so->total_records;

Modified: branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sorequest.inc.php    
2010-12-16 13:36:36 UTC (rev 6680)
+++ branches/Version-1_0-branch/property/inc/class.sorequest.inc.php    
2010-12-16 13:37:36 UTC (rev 6681)
@@ -165,22 +165,21 @@
 
                function read($data)
                {
-                       if(is_array($data))
-                       {
-                               $start                  = isset($data['start']) 
&& $data['start'] ? $data['start'] : 0;
-                               $filter                 = 
isset($data['filter'])?$data['filter']:'';
-                               $query                  = 
isset($data['query'])?$data['query']:'';
-                               $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;
-                               $status_id              = 
isset($data['status_id']) && $data['status_id'] ? $data['status_id']:0;
-                               $project_id             = 
isset($data['project_id'])?$data['project_id']:'';
-                               $allrows                = 
isset($data['allrows'])?$data['allrows']:'';
-                               $list_descr             = 
isset($data['list_descr'])?$data['list_descr']:'';
-                               $dry_run                = 
isset($data['dry_run']) ? $data['dry_run'] : '';
-                               $p_num                  = isset($data['p_num']) 
? $data['p_num'] : '';
-                       }
+                       $start                  = isset($data['start']) && 
$data['start'] ? $data['start'] : 0;
+                       $filter                 = 
isset($data['filter'])?$data['filter']:'';
+                       $query                  = 
isset($data['query'])?$data['query']:'';
+                       $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;
+                       $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']:'';
+                       $allrows                = 
isset($data['allrows'])?$data['allrows']:'';
+                       $list_descr             = 
isset($data['list_descr'])?$data['list_descr']:'';
+                       $dry_run                = isset($data['dry_run']) ? 
$data['dry_run'] : '';
+                       $p_num                  = isset($data['p_num']) ? 
$data['p_num'] : '';
 
+
                        $entity_table = 'fm_request';
 
                        $cols .= $entity_table . '.location_code';
@@ -287,6 +286,12 @@
                                $where = 'AND';
                        }
 
+                       if($district_id)
+                       {
+                               $filtermethod .= " {$where} 
fm_part_of_town.district_id = {$district_id}";
+                               $where= 'AND';
+                       }
+
                        if($query)
                        {
                                if(stristr($query, '.') && $p_num)

Modified: branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uirequest.inc.php    
2010-12-16 13:36:36 UTC (rev 6680)
+++ branches/Version-1_0-branch/property/inc/class.uirequest.inc.php    
2010-12-16 13:37:36 UTC (rev 6681)
@@ -85,6 +85,7 @@
                        $this->filter                           = 
$this->bo->filter;
                        $this->cat_id                           = 
$this->bo->cat_id;
                        $this->status_id                        = 
$this->bo->status_id;
+                       $this->district_id                      = 
$this->bo->district_id;
 
                        $this->allrows                          = 
$this->bo->allrows;
                        $this->p_num                            = 
$this->bo->p_num;
@@ -94,14 +95,15 @@
                {
                        $data = array
                        (
-                               'start'         => $this->start,
-                               'query'         => $this->query,
-                               'sort'          => $this->sort,
-                               'order'         => $this->order,
-                               'filter'        => $this->filter,
-                               'cat_id'        => $this->cat_id,
-                               'status_id'     => $this->status_id,
-                               'allrows'       => $this->allrows
+                               'start'                 => $this->start,
+                               'query'                 => $this->query,
+                               'sort'                  => $this->sort,
+                               'order'                 => $this->order,
+                               'filter'                => $this->filter,
+                               'cat_id'                => $this->cat_id,
+                               'status_id'             => $this->status_id,
+                               'district_id'   => $this->district_id,
+                               'allrows'               => $this->allrows
                        );
                        $this->bo->save_sessiondata($data);
                }
@@ -177,20 +179,25 @@
                                                                                
                        ."project_id:'{$project_id}',"
                                                                                
."filter:'{$this->filter}',"
                                                                                
."status_id:'{$this->status_id}',"
+                                                                               
."district_id: '{$this->district_id}',"
                                                                                
."cat_id:'{$this->cat_id}'";
 
-                               $values_combo_box[0] = 
$this->cats->formatted_xslt_list(array('select_name' => 'cat_id','selected' => 
$this->cat_id,'globals' => True));
+                               $values_combo_box[0]  = 
$this->bocommon->select_district_list('filter',$this->district_id);
+                               $default_value = array 
('id'=>'','name'=>lang('no district'));
+                               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));
                                $default_value = array ('cat_id'=>'','name'=> 
lang('no category'));
-                               array_unshift 
($values_combo_box[0]['cat_list'],$default_value);
+                               array_unshift 
($values_combo_box[1]['cat_list'],$default_value);
 
-                               $values_combo_box[1]  = 
$this->bo->select_status_list('filter',$this->status_id);
+                               $values_combo_box[2]  = 
$this->bo->select_status_list('filter',$this->status_id);
                                $default_value = array ('id'=>'','name'=> 
lang('no status'));
-                               array_unshift 
($values_combo_box[1],$default_value);
+                               array_unshift 
($values_combo_box[2],$default_value);
 
-                               $values_combo_box[2]  = 
$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[2],array('user_id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>$GLOBALS['phpgw_info']['user']['fullname']));
+                               $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']));
                                $default_value = array 
('user_id'=>'','name'=>lang('no user'));
-                               array_unshift 
($values_combo_box[2],$default_value);
+                               array_unshift 
($values_combo_box[3],$default_value);
 
                                $datatable['actions']['form'] = array(
                                        array(
@@ -202,18 +209,27 @@
                                                                        
'filter'                        => $this->filter,
                                                                        
'status_id'                     => $this->status_id,
                                                                        
'project_id'            => $project_id,
+                                                       'district_id'       => 
$this->district_id,
                                                                        'query' 
                        => $this->query
                                                                )
                                                        ),
                                                'fields'        => array(
                                        'field' => array(
+                                                                       array( 
//boton  DISTRICT
+                                                                           
'id' => 'btn_district_id',
+                                                                           
'name' => 'district_id',
+                                                                           
'value'     => lang('district'),
+                                                                           
'type' => 'button',
+                                                                           
'style' => 'filter',
+                                                                           
'tab_index' => 1
+                                                                       ),
                                                           array( //boton       
CATEGORY
                                                                    'id' => 
'btn_cat_id',
                                                                    'name' => 
'cat_id',
                                                                    'value'     
=> lang('Category'),
                                                                    'type' => 
'button',
                                                                    'style' => 
'filter',
-                                                                   'tab_index' 
=> 1
+                                                                   'tab_index' 
=> 2
                                                                ),
                                                                array( //boton  
STATUS
                                                                    'id' => 
'btn_status_id',
@@ -221,7 +237,7 @@
                                                                    'value'     
=> lang('Status'),
                                                                    'type' => 
'button',
                                                                    'style' => 
'filter',
-                                                                   'tab_index' 
=> 2
+                                                                   'tab_index' 
=> 3
                                                                ),
                                                                array( //boton  
FILTER
                                                                    'id' => 
'btn_user_id',
@@ -229,25 +245,25 @@
                                                                    'value'     
=> lang('User'),
                                                                    'type' => 
'button',
                                                                    'style' => 
'filter',
-                                                                   'tab_index' 
=> 3
+                                                                   'tab_index' 
=> 4
                                                                ),
                                                                                
                        array(
                                                                                
'type'  => 'button',
                                                                                
'id'    => 'btn_export',
                                                                                
'value' => lang('download'),
-                                                                               
'tab_index' => 8
+                                                                               
'tab_index' => 9
                                                                            ),
                                                                                
                        array(
                                                                                
'type'  => 'button',
                                                                                
'id'    => 'btn_update',
                                                                                
'value' => lang('Update project'),
-                                                                               
'tab_index' => 7
+                                                                               
'tab_index' => 8
                                                                            ),
                                                                                
                        array(
                                                                                
'type'  => 'button',
                                                                                
'id'    => 'btn_new',
                                                                                
'value' => lang('add'),
-                                                                               
'tab_index' => 6
+                                                                               
'tab_index' => 7
                                                                            ),
                                                                array( //boton  
   SEARCH
                                                                    'id' => 
'btn_search',
@@ -255,7 +271,7 @@
                                                                    'value'    
=> lang('search'),
                                                                    
'onkeypress' => 'return pulsar(event)',
                                                                    'type' => 
'button',
-                                                                   'tab_index' 
=> 5
+                                                                   'tab_index' 
=> 6
                                                                ),
                                                                            
array( //hidden request
                                                                                
        'type'  => 'hidden',
@@ -271,7 +287,7 @@
                                                                    'type' => 
'text',
                                                                    'size'    
=> 28,
                                                                    
'onkeypress' => 'return pulsar(event)',
-                                                                   'tab_index' 
=> 4
+                                                                   'tab_index' 
=> 5
                                                                ),
                                                                                
                        array(
                                                                                
                'type'=> 'link',
@@ -280,21 +296,25 @@
                                                                                
                       array(
                                                                                
                           'menuaction' => 
'property.uirequest.priority_key'))."','','width=350,height=250')",
                                                                                
                 'value' => lang('Priority key'),
-                                                                               
                 'tab_index' => 3
+                                                                               
                 'tab_index' => 4
                                                                                
            )
                                                                        ),
                                                'hidden_value' => array(
-                                                                               
array( //div values  combo_box_0
-                                                                               
                    'id' => 'values_combo_box_0',
-                                                                               
                    'value'     => 
$this->bocommon->select2String($values_combo_box[0]['cat_list'], 'cat_id') 
//i.e.  id,value/id,vale/
-                                                                               
              ),
-                                                                               
        array( //div values  combo_box_1
+                                                                               
        array( //div values  combo_box_0
+                                                                               
                                                        'id' => 
'values_combo_box_0',
+                                                                               
                                                        'value' => 
$this->bocommon->select2String($values_combo_box[0])
+                                                                               
      ),
+                                                                               
array( //div values  combo_box_1
                                                                                
                    'id' => 'values_combo_box_1',
-                                                                               
                    'value'     => 
$this->bocommon->select2String($values_combo_box[1])
+                                                                               
                    'value'     => 
$this->bocommon->select2String($values_combo_box[1]['cat_list'], 'cat_id') 
//i.e.  id,value/id,vale/
                                                                                
              ),
-                                                                               
                                         array( //div values  combo_box_2
+                                                                               
        array( //div values  combo_box_2
                                                                                
                    'id' => 'values_combo_box_2',
-                                                                               
                    'value'     => 
$this->bocommon->select2String($values_combo_box[2], 'user_id')
+                                                                               
                    'value'     => 
$this->bocommon->select2String($values_combo_box[2])
+                                                                               
              ),
+                                                                               
                                         array( //div values  combo_box_3
+                                                                               
                    'id' => 'values_combo_box_3',
+                                                                               
                    'value'     => 
$this->bocommon->select2String($values_combo_box[3], 'user_id')
                                                                                
              )
                                                                                
                )
                                                                                
                )
@@ -546,21 +566,17 @@
                        // Pagination and sort values
                        $datatable['pagination']['records_start']       = 
(int)$this->bo->start;
                        $datatable['pagination']['records_limit']       = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
-                       //$datatable['pagination']['records_returned'] = 
count($request_list);
                        $datatable['pagination']['records_total']       = 
$this->bo->total_records;
 
-
                        if($dry_run)
                        {
                                        
$datatable['pagination']['records_returned'] = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];           
         
                        }
                        else
                        {
-                               $datatable['pagination']['records_returned']= 
count($entity_list);
+                               $datatable['pagination']['records_returned']= 
count($request_list);
                        }
 
-
-
                        $appname                                        = 
lang('request');
                        $function_msg                           = lang('list 
request');
 

Modified: branches/Version-1_0-branch/property/js/yahoo/request.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/request.index.js      
2010-12-16 13:36:36 UTC (rev 6680)
+++ branches/Version-1_0-branch/property/js/yahoo/request.index.js      
2010-12-16 13:37:36 UTC (rev 6681)
@@ -2,11 +2,12 @@
 // Declaration of request.index vars
 //--------------------------------------------------------
        //define SelectButton
-       var oMenuButton_0, oMenuButton_1, oMenuButton_2;
+       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3;
        var selectsButtons = [
-       {order:0, 
var_URL:'cat_id',name:'btn_cat_id',style:'categorybutton',dependiente:''},
-       {order:1, 
var_URL:'status_id',name:'btn_status_id',style:'districtbutton',dependiente:''},
-       {order:2, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''}
+       {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:''}
        ]
 
        // define buttons
@@ -44,24 +45,30 @@
                if(flag_particular_setting=='init')
                {
 //     console.log(path_values);
-                       //category
-                       index = 
locate_in_array_options(0,"value",path_values.cat_id);
+                       //district
+                       index = 
locate_in_array_options(0,"value",path_values.district_id);
                        if(index)
                        {
                                oMenuButton_0.set("label", ("<em>" + 
array_options[0][index][1] + "</em>"));
                        }
-                       //status
-                       index = 
locate_in_array_options(1,"value",path_values.status_id);
+                       //category
+                       index = 
locate_in_array_options(1,"value",path_values.cat_id);
                        if(index)
                        {
                                oMenuButton_1.set("label", ("<em>" + 
array_options[1][index][1] + "</em>"));
                        }
-                       //user
-                       index = 
locate_in_array_options(2,"value",path_values.filter);
+                       //status
+                       index = 
locate_in_array_options(2,"value",path_values.status_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);
+                       if(index)
+                       {
+                               oMenuButton_3.set("label", ("<em>" + 
array_options[3][index][1] + "</em>"));
+                       }
 
                        oMenuButton_0.focus();
                }




reply via email to

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