Changeset 16431

Show
Ignore:
Timestamp:
05/22/08 09:16:39 (5 months ago)
Author:
rambo
Message:

fixes JS syntax error when we have no location yet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/midcom.helper.datamanager2/widget/position.php

    r15513 r16431  
    611611        $lon = str_replace(",", ".", $lon); 
    612612 
    613         $script = "jQuery('#{$this->_element_id}').dm2_pw_init_current_pos({$lat},{$lon});"; 
    614         $_MIDCOM->add_jquery_state_script($script); 
     613        if (   !empty($lat) 
     614            && !empty($lon)) 
     615        { 
     616            $script = "jQuery('#{$this->_element_id}').dm2_pw_init_current_pos({$lat},{$lon});"; 
     617            $_MIDCOM->add_jquery_state_script($script); 
     618        } 
    615619 
    616620        return Array