fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8989] property: select


From: Sigurd Nes
Subject: [Fmsystem-commits] [8989] property: select
Date: Sat, 17 Mar 2012 19:41:36 +0000

Revision: 8989
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8989
Author:   sigurdne
Date:     2012-03-17 19:41:36 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
property: select

Modified Paths:
--------------
    trunk/property/inc/class.uibudget.inc.php
    trunk/property/js/yahoo/budget.obligations.js

Modified: trunk/property/inc/class.uibudget.inc.php
===================================================================
--- trunk/property/inc/class.uibudget.inc.php   2012-03-17 19:25:24 UTC (rev 
8988)
+++ trunk/property/inc/class.uibudget.inc.php   2012-03-17 19:41:36 UTC (rev 
8989)
@@ -1032,10 +1032,17 @@
                                array_unshift 
($values_combo_box[1],$default_value);
 
                                $cat_filter =  
$this->cats->formatted_xslt_list(array('select_name' => 'cat_id','selected' => 
$this->cat_id,'globals' => True,'link_data' => $link_data));
-                               $values_combo_box[2] =  $cat_filter[cat_list];
+                               $values_combo_box[2] =  $cat_filter['cat_list'];
                                $default_value = array 
('cat_id'=>'','name'=>lang('no category'));
                                array_unshift 
($values_combo_box[2],$default_value);
+                               
+                               foreach($values_combo_box[2] as &$entry)
+                               {
+                                       $entry['id'] = $entry['cat_id'];
+                               }
 
+//_debug_array($values_combo_box[2]);die();
+
                                $values_combo_box[3] =  
$this->bo->get_b_group_list($this->grouping);
                                $default_value = array 
('id'=>'','name'=>lang('no grouping'));
                                array_unshift 
($values_combo_box[3],$default_value);
@@ -1080,7 +1087,7 @@
                                                                        'style' 
        => 'filter',
                                                                        
'tab_index' => 2
                                                                ),
-                                                               array
+/*                                                             array
                                                                ( //boton       
CATEGORY
                                                                        'id'    
        => 'btn_cat_id',
                                                                        'name'  
        => 'cat_id',
@@ -1106,8 +1113,45 @@
                                                                        'type'  
        => 'button',
                                                                        'style' 
        => 'filter',
                                                                        
'tab_index' => 5
+                                                               ),*/
+                                                               array
+                                                               ( //boton       
USER
+                                                                       //      
'id' => 'btn_user_id',
+                                                                       'id' => 
'sel_cat_id',
+                                                                       'name' 
=> 'cat_id',
+                                                                       'value' 
=> lang('Category'),
+                                                                       'type' 
=> 'select',
+                                                                       'style' 
=> 'filter',
+                                                                       
'values' => $values_combo_box[2],
+                                                                       
'onchange'=> 'onChangeSelect("cat_id");',
+                                                                       
'tab_index' => 3
                                                                ),
                                                                array
+                                                               ( //boton       
USER
+                                                                       //      
'id' => 'btn_user_id',
+                                                                       'id' => 
'sel_grouping',
+                                                                       'name' 
=> 'grouping',
+                                                                       'value' 
=> lang('grouping'),
+                                                                       'type' 
=> 'select',
+                                                                       'style' 
=> 'filter',
+                                                                       
'values' => $values_combo_box[3],
+                                                                       
'onchange'=> 'onChangeSelect("grouping");',
+                                                                       
'tab_index' => 4
+                                                               ),
+                                                               array
+                                                               ( //boton       
USER
+                                                                       //      
'id' => 'btn_user_id',
+                                                                       'id' => 
'sel_dimb_id',
+                                                                       'name' 
=> 'dimb_id',
+                                                                       'value' 
=> lang('dimb'),
+                                                                       'type' 
=> 'select',
+                                                                       'style' 
=> 'filter',
+                                                                       
'values' => $values_combo_box[4],
+                                                                       
'onchange'=> 'onChangeSelect("dimb_id");',
+                                                                       
'tab_index' => 5
+                                                               ),
+
+                                                               array
                                                                (
                                                                        'type'  
=> 'button',
                                                                        'id'    
=> 'btn_export',
@@ -1144,7 +1188,7 @@
                                                                ( //div values  
combo_box_1
                                                                        'id' => 
'values_combo_box_1',
                                                                        'value' 
=> $this->bocommon->select2String($values_combo_box[1])
-                                                               ),
+                                                               )/*,
                                                                array
                                                                ( //div values  
combo_box_2
                                                                        'id' => 
'values_combo_box_2',
@@ -1159,7 +1203,7 @@
                                                                ( //div values  
combo_box_4
                                                                        'id' => 
'values_combo_box_4',
                                                                        'value' 
=> $this->bocommon->select2String($values_combo_box[4])
-                                                               )
+                                                               )*/
 
                                                        )
                                                )

Modified: trunk/property/js/yahoo/budget.obligations.js
===================================================================
--- trunk/property/js/yahoo/budget.obligations.js       2012-03-17 19:25:24 UTC 
(rev 8988)
+++ trunk/property/js/yahoo/budget.obligations.js       2012-03-17 19:41:36 UTC 
(rev 8989)
@@ -3,13 +3,13 @@
 //--------------------------------------------------------
 
                //define SelectButton
-               var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4;
+               var oMenuButton_0, oMenuButton_1;//, oMenuButton_2, 
oMenuButton_3, oMenuButton_4;
                var selectsButtons = [
                {order:0, var_URL:'year',               name:'btn_year',        
        style:'',dependiente:[]},
-               {order:1, var_URL:'district_id',name:'btn_district_id', 
style:'',dependiente:[]},
-               {order:2, var_URL:'cat_id',             name:'btn_cat_id',      
        style:'',dependiente:[]},
-               {order:3, var_URL:'grouping',   name:'btn_grouping',    
style:'',dependiente:[]},
-               {order:4, var_URL:'dimb_id',    name:'btn_dimb_id',             
style:'',dependiente:[]}
+               {order:1, var_URL:'district_id',name:'btn_district_id', 
style:'',dependiente:[]}
+//             {order:2, var_URL:'cat_id',             name:'btn_cat_id',      
        style:'',dependiente:[]},
+//             {order:3, var_URL:'grouping',   name:'btn_grouping',    
style:'',dependiente:[]},
+//             {order:4, var_URL:'dimb_id',    name:'btn_dimb_id',             
style:'',dependiente:[]}
                ]
 
                // define buttons
@@ -39,6 +39,21 @@
 
                var tableYUI;
        
/********************************************************************************/
              
+
+               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();
+               }
+
                this.filter_grouping = function(year,district_id,param,details)
                {
                        if(details)
@@ -103,14 +118,15 @@
                                        oMenuButton_0.set("label", ("<em>" + 
array_options[0][index][1] + "</em>"));
                                }
                                //dimb
+/*
                                index = 
locate_in_array_options(4,"value",path_values.dimb_id);
                                if(index)
                                {
                                        oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
                                }
+*/
 
 
-
                                //locate (asign ID) to datatable
                                tableYUI = 
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[0].parentNode;
                                tableYUI.setAttribute("id","tableYUI");




reply via email to

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