Skip to content

Commit

Permalink
Updates to release v1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Mar 4, 2022
1 parent 2033124 commit c7896b5
Show file tree
Hide file tree
Showing 26 changed files with 526 additions and 250 deletions.
3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

6 changes: 4 additions & 2 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Change Log: `yii2-tree-manager`

## Version 1.1.3

**Date:** _under development_
**Date:** 04-Mar-2022

- Enhancements for Bootstrap 5.x support.
- PHP 8.1 enhancements for native functions.
- (bug #259): Correct icons list display based on `iconEditSettings['show']`.
- (enh #258): Enhanced BS4 custom checkbox and radio styling for toggle inputs.
- (enh #257): Enhance search close icon styling.
Expand All @@ -16,7 +18,7 @@ Change Log: `yii2-tree-manager`

## Version 1.1.2

**Date:** 13-Mar-2019
**Date:** 13-Mar-2021

- (enh #244): Correct hidden css to use `BS_HIDE` within `bsCssMap`.
- (enh #240): Rename events triggered via jquery to start with `treeview:`.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015 - 2019, Kartik Visweswaran
Copyright (c) 2015 - 2022, Kartik Visweswaran
Krajee.com
All rights reserved.

Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
<br>
yii2-tree-manager
<hr>
<p align="center">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU"
title="Donate via Paypal" target="_blank">
<img src="http://kartik-v.github.io/bootstrap-fileinput-samples/samples/donate.png" alt="Donate"/>
</a>
title="Donate via Paypal" target="_blank"><img height="90" src="https://kartik-v.github.io/bootstrap-fileinput-samples/samples/donate.png" alt="Donate"/></a>
&nbsp; &nbsp; &nbsp;
<a href="https://www.buymeacoffee.com/kartikv" title="Buy me a coffee" ><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" align="top" height="50" alt="kartikv"/></a>
</p>
</h1>

[![Stable Version](https://poser.pugx.org/kartik-v/yii2-tree-manager/v/stable)](https://packagist.org/packages/kartik-v/yii2-tree-manager)
Expand Down Expand Up @@ -58,7 +60,7 @@ The following important PHP classes are available with this module:
6. **kartik\tree\controllers\NodeController:** _Controller_, the controller actions that manages the editing of each node for create, update, delete, or reorder (move).

## Demo
You can see detailed [documentation](http://demos.krajee.com/tree-manager) and [TreeView demonstration](http://demos.krajee.com/tree-manager-demo/treeview) or [TreeViewInput demonstration](http://demos.krajee.com/tree-manager-demo/tree-view-input) on usage of the extension.
You can see detailed [documentation](http://demos.krajee.com/tree-manager), [API Code Documentation](https://docs.krajee.com/kartik-tree-treeview) and [TreeView demonstration](http://demos.krajee.com/tree-manager-demo/treeview) or [TreeViewInput demonstration](http://demos.krajee.com/tree-manager-demo/tree-view-input) on usage of the extension.

## Installation

Expand Down Expand Up @@ -132,7 +134,7 @@ use Yii;

class Tree extends \yii\db\ActiveRecord
{
use kartik\tree\models\TreeTrait.
use kartik\tree\models\TreeTrait;

/**
* @inheritdoc
Expand Down
77 changes: 39 additions & 38 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
{
"name": "kartik-v/yii2-tree-manager",
"description": "An enhanced tree management module with tree node selection and manipulation using nested sets.",
"keywords": [
"bootstrap",
"tree",
"treeview",
"krajee",
"hierarchy",
"nested",
"set",
"nestedset",
"ajax",
"jquery"
],
"homepage": "https://github.com/kartik-v/yii2-tree-manager",
"type": "yii2-extension",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Kartik Visweswaran",
"email": "[email protected]",
"homepage": "http://www.krajee.com/"
}
],
"require": {
"kartik-v/yii2-widget-activeform": ">=1.5.7",
"creocoder/yii2-nested-sets": ">=0.9",
"kartik-v/yii2-dialog": ">=1.0"
},
"autoload": {
"psr-4": {
"kartik\\tree\\": "src"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
"name": "kartik-v/yii2-tree-manager",
"description": "An enhanced tree management module with tree node selection and manipulation using nested sets.",
"keywords": [
"bootstrap",
"tree",
"treeview",
"krajee",
"hierarchy",
"nested",
"set",
"nestedset",
"ajax",
"jquery"
],
"homepage": "https://github.com/kartik-v/yii2-tree-manager",
"type": "yii2-extension",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Kartik Visweswaran",
"email": "[email protected]",
"homepage": "http://www.krajee.com/"
}
],
"require": {
"kartik-v/yii2-krajee-base": ">=3.0.4",
"kartik-v/yii2-widget-activeform": ">=1.6.2",
"creocoder/yii2-nested-sets": ">=0.9",
"kartik-v/yii2-dialog": ">=1.0"
},
"autoload": {
"psr-4": {
"kartik\\tree\\": "src"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
}
}
43 changes: 28 additions & 15 deletions src/Module.php
Original file line number Diff line number Diff line change
@@ -1,67 +1,81 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2019
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
* @package yii2-tree
* @version 1.1.3
*/

namespace kartik\tree;

use Yii;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\web\Application as WebApplication;

/**
* The tree management module for Yii Framework 2.0.
* Module is the tree management module for Yii Framework 2.0 that enables the [[TreeView]] widget functionality.
*
* To use, configure the module named `treemanager` in the modules section of your Yii configuration file.
*
* For example,
*
* ```php
* 'modules' => [
* 'treemanager' => [
* 'class' => '\kartik\tree\Module',
* // other module settings, refer detailed documentation
* ]
* ]
* ```
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
*/
class Module extends \kartik\base\Module
{
/**
* The module name for Krajee treeview
* @var string module name for the Krajee Tree management module
*/
const MODULE = 'treemanager';
/**
* Manage node action
* @var string manage node action
*/
const NODE_MANAGE = 'manage';
/**
* Remove node action
* @var string remove node action
*/
const NODE_REMOVE = 'remove';
/**
* Move node action
* @var string move node action
*/
const NODE_MOVE = 'move';
/**
* Save node action
* @var string save node action
*/
const NODE_SAVE = 'save';
/**
* Tree details form view - Section Part 1
* @var int section part 1 of the tree details form view
*/
const VIEW_PART_1 = 1;
/**
* Tree details form view - Section Part 2
* @var int section part 2 of the tree details form view
*/
const VIEW_PART_2 = 2;
/**
* Tree details form view - Section Part 3
* @var int section part 3 of the tree details form view
*/
const VIEW_PART_3 = 3;
/**
* Tree details form view - Section Part 4
* @var int section part 4 of the tree details form view
*/
const VIEW_PART_4 = 4;
/**
* Tree details form view - Section Part 5
* @var int section part 5 of the tree details form view
*/
const VIEW_PART_5 = 5;

/**
* @var array the configuration of nested set attributes structure
* @var array the configuration of nested set attributes structure.
*/
public $treeStructure = [];

Expand Down Expand Up @@ -124,8 +138,7 @@ public function init()
'iconTypeAttribute' => 'icon_type'
];
$nodeActions = ArrayHelper::getValue($this->treeViewSettings, 'nodeActions', []);
// prepends Error in Console Applications
if (\Yii::$app instanceof \yii\web\Application) {
if (Yii::$app instanceof WebApplication) {
$nodeActions += [
self::NODE_MANAGE => Url::to(['/treemanager/node/manage']),
self::NODE_SAVE => Url::to(['/treemanager/node/save']),
Expand Down
5 changes: 3 additions & 2 deletions src/TreeSecurity.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2019
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
* @package yii2-tree-manager
* @version 1.1.3
*/
Expand All @@ -19,7 +19,8 @@
use yii\console\Application;

/**
* Tree data security and data hashing helper class
* Tree data security and data hashing helper class. This class and its methods are used by the [[TreeView]]
* widget to manage data transfer between the client and the server in a secure way.
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
Expand Down
Loading

0 comments on commit c7896b5

Please sign in to comment.