2017 © Pedro Peláez
 

library jqtreewidget

Tree

image

webvimark/jqtreewidget

Tree

  • Sunday, May 17, 2015
  • by webvimark
  • Repository
  • 1 Watchers
  • 0 Stars
  • 56 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

JQTreeWidget

Wrapper for awesome http://mbraak.github.io/jqTree/, (*1)

--, (*2)

Lets say you have model Category with following structure:, (*3)

  • id
  • parent_id
  • active
  • sorter

Then name, description and so on., (*4)

This widget will help you to create nice tree, which allows you to sort and change structre by drug and drop, (*5)

Twitter bootstrap 2 would be nice, but not necessary, (*6)

Installation

1) Place this widget in "extensions" folder 2) Probably you have folder named "jqtreewidget" in lowercase. Rename it to "JQTreeWidget", (*7)

Usage

If your model doesn't have 'status' or similar field, then just remove 'statusField', (*8)


widget('ext.JQTreeWidget.JQTreeWidget', array( 'models' => Category::find()->orderBy('sorter')->all(), // It has to be ordered by **'orderField'** 'modelName' => 'Category', 'parentIdField' => 'parent_id', 'statusField' => 'active', 'orderField' => 'sorter', 'withChildren' => false, //default = true 'leafName' => function($model){ return Html::a($model->name, ['/content/page/update', 'id'=>$model->id]); }, )) ?>

The Versions

17/05 2015

dev-master

9999999-dev

Tree

  Sources   Download

17/05 2015

1.0.0

1.0.0.0

Tree

  Sources   Download