fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8985] property: user select


From: Sigurd Nes
Subject: [Fmsystem-commits] [8985] property: user select
Date: Thu, 15 Mar 2012 21:04:57 +0000

Revision: 8985
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8985
Author:   sigurdne
Date:     2012-03-15 21:04:55 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
property: user select

Modified Paths:
--------------
    trunk/property/inc/class.uiproject.inc.php
    trunk/property/inc/class.uiworkorder.inc.php
    trunk/property/js/yahoo/project.index.js
    trunk/property/js/yahoo/workorder.index.js

Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php  2012-03-15 19:52:16 UTC (rev 
8984)
+++ trunk/property/inc/class.uiproject.inc.php  2012-03-15 21:04:55 UTC (rev 
8985)
@@ -263,15 +263,16 @@
                                $default_value = array 
('id'=>'','name'=>lang('no hour category'));
                                array_unshift 
($values_combo_box[3],$default_value);
 
-                               $values_combo_box[4]  = 
$this->bo->get_user_list();
-                               array_unshift 
($values_combo_box[4],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 projects')));
-                               $default_value = array 
('id'=>'','name'=>lang('no user'));
+                               $values_combo_box[4]  = 
$this->bo->get_criteria_list($this->criteria_id);
+                               $default_value = array 
('id'=>'','name'=>lang('no criteria'));
                                array_unshift 
($values_combo_box[4],$default_value);
 
-                               $values_combo_box[5]  = 
$this->bo->get_criteria_list($this->criteria_id);
-                               $default_value = array 
('id'=>'','name'=>lang('no criteria'));
+                               $values_combo_box[5]  = 
$this->bo->get_user_list();
+                               array_unshift 
($values_combo_box[5],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 projects')));
+                               $default_value = array 
('id'=>'','name'=>lang('no user'));
                                array_unshift 
($values_combo_box[5],$default_value);
 
+
                                $datatable['actions']['form'] = array
                                        (
                                                array
@@ -327,6 +328,15 @@
                                                                        
'tab_index' => 4
                                                                ),
                                                                array
+                                                               ( //boton       
search criteria
+                                                                       'id' => 
'btn_criteria_id',
+                                                                       'name' 
=> 'criteria_id',
+                                                                       'value' 
=> lang('search criteria'),
+                                                                       'type' 
=> 'button',
+                                                                       'style' 
=> 'filter',
+                                                                       
'tab_index' => 5
+                                                               ),/*
+                                                               array
                                                                ( //boton       
USER
                                                                        'id' => 
'btn_user_id',
                                                                        'name' 
=> 'user_id',
@@ -334,16 +344,19 @@
                                                                        'type' 
=> 'button',
                                                                        'style' 
=> 'filter',
                                                                        
'tab_index' => 5
-                                                               ),
-                                                               array
-                                                               ( //boton       
search criteria
-                                                                       'id' => 
'btn_criteria_id',
-                                                                       'name' 
=> 'criteria_id',
-                                                                       'value' 
=> lang('search criteria'),
-                                                                       'type' 
=> 'button',
-                                                                       'style' 
=> 'filter',
-                                                                       
'tab_index' => 6
-                                                               ),
+                                                               ),*/
+                                                                       array
+                                                                       ( 
//boton       USER
+                                                                               
//      'id' => 'btn_user_id',
+                                                                               
'id' => 'sel_filter', // testing traditional listbox for long list
+                                                                               
'name' => 'filter',
+                                                                               
'value' => lang('User'),
+                                                                               
'type' => 'select',
+                                                                               
'style' => 'filter',
+                                                                               
'values' => $values_combo_box[5],
+                                                                               
'onchange'=> 'onChangeSelect("filter");',
+                                                                               
'tab_index' => 6
+                                                                       ),
                                                                //for link 
"columns", next to Export button
                                                                array
                                                                (
@@ -455,12 +468,12 @@
                                                                ( //div values  
combo_box_4
                                                                        'id' => 
'values_combo_box_4',
                                                                        '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])
-                                                               )
+                                                               )*/
                                                        )
                                                )
                                        )

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2012-03-15 19:52:16 UTC 
(rev 8984)
+++ trunk/property/inc/class.uiworkorder.inc.php        2012-03-15 21:04:55 UTC 
(rev 8985)
@@ -270,15 +270,16 @@
                                $default_value = array ('id'=>'','name'=> 
lang('no hour category'));
                                array_unshift 
($values_combo_box[3],$default_value);
 
-                               $values_combo_box[4]  = 
$this->bo->get_user_list();
-                               array_unshift 
($values_combo_box[4],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 orders')));
-                               $default_value = array 
('id'=>'','name'=>lang('no user'));
+                               $values_combo_box[4]  = 
$this->bo->get_criteria_list($this->criteria_id);
+                               $default_value = array 
('id'=>'','name'=>lang('no criteria'));
                                array_unshift 
($values_combo_box[4],$default_value);
 
-                               $values_combo_box[5]  = 
$this->bo->get_criteria_list($this->criteria_id);
-                               $default_value = array 
('id'=>'','name'=>lang('no criteria'));
+                               $values_combo_box[5]  = 
$this->bo->get_user_list();
+                               array_unshift 
($values_combo_box[5],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 orders')));
+                               $default_value = array 
('id'=>'','name'=>lang('no user'));
                                array_unshift 
($values_combo_box[5],$default_value);
 
+
                                $datatable['actions']['form'] = array
                                        (
                                                array
@@ -340,6 +341,15 @@
                                                                        
'tab_index' => 4
                                                                ),
                                                                array
+                                                               ( //boton       
search criteria
+                                                                       'id' => 
'btn_criteria_id',
+                                                                       'name' 
=> 'criteria_id',
+                                                                       'value' 
=> lang('search criteria'),
+                                                                       'type' 
=> 'button',
+                                                                       'style' 
=> 'filter',
+                                                                       
'tab_index' => 5
+                                                               ),
+                                                       /*      array
                                                                ( //boton       
USER
                                                                        'id' => 
'btn_user_id',
                                                                        'name' 
=> 'filter',
@@ -348,15 +358,19 @@
                                                                        'style' 
=> 'filter',
                                                                        
'tab_index' => 5
                                                                ),
-                                                               array
-                                                               ( //boton       
search criteria
-                                                                       'id' => 
'btn_criteria_id',
-                                                                       'name' 
=> 'criteria_id',
-                                                                       'value' 
=> lang('search criteria'),
-                                                                       'type' 
=> 'button',
-                                                                       'style' 
=> 'filter',
-                                                                       
'tab_index' => 6
-                                                               ),
+                                                       */
+                                                                       array
+                                                                       ( 
//boton       USER
+                                                                               
//      'id' => 'btn_user_id',
+                                                                               
'id' => 'sel_filter', // testing traditional listbox for long list
+                                                                               
'name' => 'filter',
+                                                                               
'value' => lang('User'),
+                                                                               
'type' => 'select',
+                                                                               
'style' => 'filter',
+                                                                               
'values' => $values_combo_box[5],
+                                                                               
'onchange'=> 'onChangeSelect("filter");',
+                                                                               
'tab_index' => 6
+                                                                       ),
                                                                //for link 
"columns", next to Export button
                                                                array
                                                                (
@@ -457,12 +471,12 @@
                                                                ( //div values  
combo_box_4
                                                                        'id' => 
'values_combo_box_4',
                                                                        '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])
-                                                               )
+                                                               )*/
 
                                                        )
                                                )

Modified: trunk/property/js/yahoo/project.index.js
===================================================================
--- trunk/property/js/yahoo/project.index.js    2012-03-15 19:52:16 UTC (rev 
8984)
+++ trunk/property/js/yahoo/project.index.js    2012-03-15 21:04:55 UTC (rev 
8985)
@@ -2,14 +2,14 @@
 // Declaration of location.index vars
 //--------------------------------------------------------
        //define SelectButton
-       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4, oMenuButton_5;
+       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:'wo_hour_cat_id',name:'btn_hour_category_id',style:'partOFTownbutton',dependiente:''},
-       {order:4, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
-       {order:5, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
+//     {order:4, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
+       {order:4, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
        ];
 
        // define buttons
@@ -43,6 +43,20 @@
                date_search : 1 //if search has link "Data search"
        }
 
+       this.onChangeSelect = function(type)
+       {
+               var myselect=document.getElementById("sel_"+ type);
+               for (var i=0; i<myselect.options.length; i++)
+               {
+                       if (myselect.options[i].selected==true)
+                       {
+                               break;
+                       }
+               }
+               eval("path_values." +type +"='"+myselect.options[i].value+"'");
+               execute_ds();
+       }
+
        var oArgs_project = {menuaction:'property.uiproject.edit'};
        var sUrl_project = phpGWLink('index.php', oArgs_project);
        
@@ -95,19 +109,21 @@
                                oMenuButton_3.set("label", ("<em>" + 
array_options[3][index][1] + "</em>"));
                        }
 
-                       //user
-                       index = 
locate_in_array_options(4,"value",path_values.user_id);
+                       //criteria
+                       index = 
locate_in_array_options(4,"value",path_values.criteria_id);
                        if(index)
                        {
                                oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
                        }
 
-                       //criteria
-                       index = 
locate_in_array_options(5,"value",path_values.criteria_id);
+/*
+                       //user
+                       index = 
locate_in_array_options(4,"value",path_values.user_id);
                        if(index)
                        {
-                               oMenuButton_5.set("label", ("<em>" + 
array_options[5][index][1] + "</em>"));
+                               oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
                        }
+*/
 
                        //focus initial
                        //--focus for txt_query---

Modified: trunk/property/js/yahoo/workorder.index.js
===================================================================
--- trunk/property/js/yahoo/workorder.index.js  2012-03-15 19:52:16 UTC (rev 
8984)
+++ trunk/property/js/yahoo/workorder.index.js  2012-03-15 21:04:55 UTC (rev 
8985)
@@ -2,14 +2,14 @@
 // Declaration of workorder.index vars
 //--------------------------------------------------------
        //define SelectButton
-       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4, oMenuButton_5;
+       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:'wo_hour_cat_id',name:'btn_wo_hour_cat_id',style:'partOFTownbutton',dependiente:''},
-       {order:4, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
-       {order:5, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
+//     {order:4, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
+       {order:4, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
        ]
 
        // define buttons
@@ -42,6 +42,20 @@
         date_search : 1 //if search has link "Data search"
        };
 
+       this.onChangeSelect = function(type)
+       {
+               var myselect=document.getElementById("sel_"+ type);
+               for (var i=0; i<myselect.options.length; i++)
+               {
+                       if (myselect.options[i].selected==true)
+                       {
+                               break;
+                       }
+               }
+               eval("path_values." +type +"='"+myselect.options[i].value+"'");
+               execute_ds();
+       }
+
        var oArgs_project = {menuaction:'property.uiproject.edit'};
        var sUrl_project = phpGWLink('index.php', oArgs_project);
        
@@ -102,19 +116,20 @@
                                oMenuButton_3.set("label", ("<em>" + 
array_options[3][index][1] + "</em>"));
                        }
 
-                       //user
-                       index = 
locate_in_array_options(4,"value",path_values.filter);
+                       //criteria
+                       index = 
locate_in_array_options(4,"value",path_values.criteria_id);
                        if(index)
                        {
                                oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
                        }
-
-                       //criteria
-                       index = 
locate_in_array_options(5,"value",path_values.criteria_id);
+/*
+                       //user
+                       index = 
locate_in_array_options(5,"value",path_values.filter);
                        if(index)
                        {
                                oMenuButton_5.set("label", ("<em>" + 
array_options[5][index][1] + "</em>"));
                        }
+*/
 
                        //focus initial
                        //--focus for txt_query---




reply via email to

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