Skip to content

alpharder/dynatree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

  1. Download archive https://github.com/alphard-code/dynatree/archive/master.zip and extract it to your application's extensions directory.

  2. Add the alias to your application configuration:

    'aliases' => array(
      'yiiExtensions' => 'path.to.extensions.dir',
    ),
  3. If you are needed to use functionality of displaying and managing nested sets, you will also need to install my fork of Nested Set Behavior.

Usage

  • Simple usage of plain dynatree plugin:

    $this->widget('yiiExtensions\dynatree\Dynatree', array(
    	'options' => array(
             // Options that will be passed to Javascript constructor of Dynatree plugin.
             // @see http:https://wwwendt.de/tech/dynatree/doc/dynatree-doc.html#h4.1
    	),		
    ));
  • Widget can be associated with a data model and an attribute, if so hidden input with automatically generated name and ID will be inserted into plugin container. This behavior is similar to standart CInputWidget. The value of input will be updated with node key by the handler of an event, specified as "updateInputValueEvent":

    $this->widget('yiiExtensions\dynatree\Dynatree', array(
    	'model' => $model, // instance of CModel
    	'attribute' => 'attributeName', 
    	
    	// Name of an event that will trigger update of hidden input value. Defaults to 'onActivate'.
    	// @see http:https://wwwendt.de/tech/dynatree/doc/dynatree-doc.html#h5.1
    	'updateInputValueEvent' => 'onActivate', 
    ));
  • Nested set displaying and manipulation:

About

Yii framework integration of Dynatree plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published