Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

Commit

Permalink
Close #13, #14: Added docs about how to add extra resource files
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrogehlen authored Apr 24, 2017
1 parent 0c13a18 commit e877695
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ or add

to the require section of your `composer.json` file.

## How to use
## Usage

**Model**

Expand Down Expand Up @@ -112,4 +112,32 @@ use leandrogehlen\treegrid\TreeGrid;
]); ?>
```

## Adding resources

When is necessary to add other resource files, then should be used the [Dependency Injection](http://www.yiiframework.com/doc-2.0/guide-concept-di-container.html#registering-dependencies) concept.

To use the `saveState` option it's necessary to add `jquery.cookie.js`.

```php
//config/web.php

$config = [
'id' => 'my-app',
'components' => [
...
]
...
]

Yii::$container->set('leandrogehlen\treegrid\TreeGridAsset',[
'js' => [
'js/jquery.cookie.js',
'js/jquery.treegrid.min.js',
]
]);

return $config;
```



0 comments on commit e877695

Please sign in to comment.