fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9604] controller: register control til component


From: Sigurd Nes
Subject: [Fmsystem-commits] [9604] controller: register control til component
Date: Sun, 17 Jun 2012 08:49:12 +0000

Revision: 9604
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9604
Author:   sigurdne
Date:     2012-06-17 08:49:11 +0000 (Sun, 17 Jun 2012)
Log Message:
-----------
controller: register control til component

Modified Paths:
--------------
    trunk/controller/inc/class.uicontrol_location.inc.php
    trunk/controller/js/controller/ajax_control_to_component.js

Modified: trunk/controller/inc/class.uicontrol_location.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol_location.inc.php       2012-06-16 
20:05:10 UTC (rev 9603)
+++ trunk/controller/inc/class.uicontrol_location.inc.php       2012-06-17 
08:49:11 UTC (rev 9604)
@@ -801,7 +801,7 @@
                                $location_id = 
$GLOBALS['phpgw']->locations->get_id('property', 
".entity.{$entity_id}.{$cat_id}");
                                $boentity       = 
CreateObject('property.boentity',false, 'entity');
                                $boentity->results = $results;
-                               $values = 
$boentity->read(array('control_registered' => $control_registered));
+                               $values = 
$boentity->read(array('control_registered' => $control_registered, 'control_id' 
=> $control_id));
                        }               
 
                        foreach($values as &$entry)

Modified: trunk/controller/js/controller/ajax_control_to_component.js
===================================================================
--- trunk/controller/js/controller/ajax_control_to_component.js 2012-06-16 
20:05:10 UTC (rev 9603)
+++ trunk/controller/js/controller/ajax_control_to_component.js 2012-06-17 
08:49:11 UTC (rev 9604)
@@ -241,14 +241,14 @@
 
        $("#control_registered").change(function ()
        {
-               update_component_table();
+               init_component_table();
     });
 
        $("#control_id").change(function ()
        {
                $("#control_id_hidden").val( $(this).val() );
 
-               update_component_table();
+               init_component_table();
     });
 
        $("#loc2").change(function ()
@@ -433,6 +433,14 @@
                control_registered = 1;
        }
 
+       
+       var cat_id = $("#cat_id").val() != null ? $("#cat_id").val():'';
+       
+       if(!cat_id)
+       {
+               return false;
+       }
+       
        var location_code = '';
                
        if( $("#loc2").val() != null && $("#loc2").val())
@@ -447,7 +455,7 @@
        var oArgs = {
                menuaction:'controller.uicontrol_location.query2',
                entity_id:$("#entity_id").val(),
-               cat_id:$("#cat_id").val(),
+               cat_id:cat_id,
                district_id:$("#district_id").val(),
                part_of_town_id:$("#part_of_town_id").val(),
                location_code:location_code,




reply via email to

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