Development

Changeset 10368

You must first sign up to be able to contribute.

Changeset 10368

Show
Ignore:
Timestamp:
07/20/08 07:19:21 (4 months ago)
Author:
Dean.Glazeski
Message:

Finished adding all available effects that Dojo can do. Also created some test modules so that a user can see what the effects do and what easing is. Started a module to show off the widgets. Created an enumeration folder to house things like types and easings.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/dgDojoPlugin/trunk/lib/dojo/DojoButton.class.php

    r10347 r10368  
    3838    { 
    3939      $attributes['dojoType'] = DojoTypes::DROPDOWN_BUTTON; 
    40       if ( $this->hasOption( 'onclick' ) ) 
     40      if ( array_key_exists( 'onclick', $attributes ) ) 
    4141      { 
    4242        $attributes['dojoType'] = DojoTypes::COMBO_BUTTON; 
  • plugins/dgDojoPlugin/trunk/lib/dojo/DojoMenuItem.class.php

    r10347 r10368  
    177177   
    178178  /** 
     179   * Returns the current name for this item. 
     180   * 
     181   * @return string The name for this item 
     182   */ 
     183  public function getName() 
     184  { 
     185      return $this->name; 
     186  } 
     187   
     188  /** 
     189   * Sets the name for this item.  Must be a string or it won't work. 
     190   * 
     191   * @param string $name Name for the item 
     192   */ 
     193  public function setName( $name ) 
     194  { 
     195      if (is_string($name)) 
     196         $this->name = $name; 
     197  } 
     198   
     199  /** 
    179200   * Returns the rendered from of the DojoMenuItem including its submenu if 
    180201   * necessary.  Inheriting classes should override this for printing. 
     
    199220    else  
    200221    { 
    201       $rval = $this->name; 
     222      $rval = $name; 
    202223    } 
    203224     
     
    212233  public function __toString() 
    213234  { 
    214     return $this->render( $this->name ); 
     235    return $this->render( $this->name, null, $this->getAttributes() ); 
    215236  } 
    216237} 
  • plugins/dgDojoPlugin/trunk/lib/dojo/enumerations/DojoTypes.class.php

    r10347 r10368  
    3232    DOJOX_FX = 'dojox.fx', 
    3333    CHAIN = 'dojo.fx.chain', 
    34     COMBINE = 'dojo.fx.combine'; 
     34    COMBINE = 'dojo.fx.combine', 
     35    SCROLL = 'dojox.fx.scroll', 
     36    EASING = 'dojox.fx.easing', 
     37    STYLE = 'dojox.fx.style'; 
    3538} 
    3639?> 
  • plugins/dgDojoPlugin/trunk/lib/effect/DojoBaseEffect.class.php

    r10347 r10368  
    5959        { 
    6060            $code = $this->options['beforeBegin']; 
    61             $rval['beforeBegin'] = "function() {$code}"; 
     61            $rval['beforeBegin'] = "function() { $code }"; 
    6262        } 
    6363         
     
    6565        { 
    6666            $code = $this->options['easing']; 
    67             $rval['easing'] = "function(n) {$code}"; 
     67            $rval['easing'] = "function(n) { $code }"; 
    6868        } 
    6969         
  • plugins/dgDojoPlugin/trunk/lib/effect/DojoEffect.class.php

    r10347 r10368  
    5858     * rate     - The FPS for the effect 
    5959     * repeat   - How many times to repeat the effect 
     60     * easing   - Function taking one decimal argument and returning a decimal 
     61     *            that allows an effect to 'ease in' and 'ease out'. 
    6062     * 
    6163     * @return string All of the javascript options that have been set ready 
     
    7981        if (isset($this->options['repeat']) && $this->options['repeat'] > 0) 
    8082            $opts['repeat'] = $this->options['repeat']; 
     83             
     84        if (isset($this->options['easing']) && $this->options['easing']) 
     85            $opts['easing'] = $this->options['easing']; 
    8186 
    8287        $this->additionalOptions($opts);