fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11650] property: fix lookup function


From: Sigurd Nes
Subject: [Fmsystem-commits] [11650] property: fix lookup function
Date: Sun, 02 Feb 2014 13:24:33 +0000

Revision: 11650
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11650
Author:   sigurdne
Date:     2014-02-02 13:24:31 +0000 (Sun, 02 Feb 2014)
Log Message:
-----------
property: fix lookup function

Modified Paths:
--------------
    trunk/property/inc/class.bolocation.inc.php

Modified: trunk/property/inc/class.bolocation.inc.php
===================================================================
--- trunk/property/inc/class.bolocation.inc.php 2014-02-01 17:20:29 UTC (rev 
11649)
+++ trunk/property/inc/class.bolocation.inc.php 2014-02-02 13:24:31 UTC (rev 
11650)
@@ -542,7 +542,7 @@
                                        $p_cat_id = 
isset($data['entity_data'][$entity['id']]['p_cat_id']) ? 
$data['entity_data'][$entity['id']]['p_cat_id'] : '';
                                        $lookup_functions[] = array
                                                (
-                                                       'filter_level'          
=> $config_count,
+                                                       'filter_level'          
=> count($location_types),
                                                        'name'                  
        => 'lookup_entity_' . $entity['id'] .'()',
                                                        'link'                  
        => 
"menuaction:'property.uilookup.entity',location_type:{$data['type_id']},entity_id:{$entity['id']},cat_id:'{$p_cat_id}',location_code:'{$filter_location}',block_query:'{$block_query}'",
                                                        'action'                
        => 
'Window1=window.open(strURL,"Search","left=50,top=100,width=1200,height=700,toolbar=no,scrollbars=yes,resizable=yes");'
@@ -666,18 +666,25 @@
                                                        {
                                                                
for(i=1;i<=filter_level;i++)
                                                                {
-                                                                       
if(eval('document.form.loc'+i+'.value'))
+                                                                       if 
(typeof eval('document.form.loc'+i) != 'undefined')
                                                                        {
-                                                                               
block = true;
-                                                                               
if(!filter)
+                                                                               
if( eval('document.form.loc'+i+'.value'))
                                                                                
{
-                                                                               
        filter = eval('document.form.loc'+i+'.value');
+                                                                               
        block = true;
+                                                                               
        if(!filter)
+                                                                               
        {
+                                                                               
                filter = eval('document.form.loc'+i+'.value');
+                                                                               
        }
+                                                                               
        else
+                                                                               
        {
+                                                                               
                filter = filter  + '-' + eval('document.form.loc'+i+'.value');  
                                                                
+                                                                               
        }
                                                                                
}
-                                                                               
else
-                                                                               
{
-                                                                               
        filter = filter  + '-' + eval('document.form.loc'+i+'.value');          
                                                        
-                                                                               
}
                                                                        }
+                                                                       else
+                                                                       {
+                                                                               
break;
+                                                                       }
                                                                }
                                                        }
 JS;




reply via email to

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