Development

Changeset 3497

You must first sign up to be able to contribute.

Changeset 3497

Show
Ignore:
Timestamp:
02/18/07 10:52:59 (2 years ago)
Author:
fabien
Message:

fixed observe_field with frequency=>0 outputs incorrect javascript (closes #1385)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/lib/helper/JavascriptHelper.php

    r3214 r3497  
    991991  } 
    992992 
     993  if options[:with] && !options[:with].include?("=") 
     994    options[:with] = "'#{options[:with]}=' + value" 
     995  else 
     996    options[:with] ||= 'value' if options[:update] 
     997  end 
     998 
    993999  function _build_observer($klass, $name, $options = array()) 
    9941000  { 
     
    10011007 
    10021008    $javascript  = 'new '.$klass.'("'.$name.'", '; 
    1003     if (isset($options['frequency'])
     1009    if (isset($options['frequency']) && $options['frequency'] > 0
    10041010    { 
    10051011      $javascript .= $options['frequency'].", ";