Skip to content

Commit f67f3b1

Browse files
committed
small refactoring
1 parent a2baa34 commit f67f3b1

File tree

8 files changed

+24
-70
lines changed

8 files changed

+24
-70
lines changed

ActionBarAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/**
77
* ActionBarAsset represents a collection of asset files, such as CSS, JS, images.
88
*
9-
* @author Oleg Belostotskiy <olgblst@gmail.com>
9+
* @author Oleg Belostotsky <olegbelostotsky@gmail.com>
1010
*/
1111
class ActionBarAsset extends AssetBundle
1212
{

CHANGELOG.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Action Bar Changelog
1+
ActionBar Changelog
22
====================
33

44
Version 1.0.0 July 15, 2014
@@ -10,8 +10,3 @@ Version 1.1.0 December 09, 2016
1010
---------------------------
1111

1212
- Request parameter "ids" change support
13-
14-
Version 1.1.1 March 10, 2017
15-
---------------------------
16-
17-
- Added CSRF notice in documentaion

DOCUMENTATION.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Action Bar Documentation
1+
ActionBar Documentation
22
=======================
33

44
The widget allows you to use the following properties and methods.
@@ -12,11 +12,11 @@ Widget Class
1212

1313
- `options`: *array*, the HTML attributes for the widget container tag. See [renderTagAttributes()] for details on how attributes are being rendered.
1414

15-
- `renderContainer`: *boolean*, whether the action bar content should be included in a div container.
15+
- `renderContainer`: *boolean*, whether the widget content should be included in a div container.
1616

1717
- `containerOptions`: *array*, the HTML attributes for the content container tag. This is only used when `renderContainer` is true. See [renderTagAttributes()] for details on how attributes are being rendered.
1818

19-
- `templates`: *array*, templates used to render action bar elements, in addition, may be specified the array keys with the HTML attributes for the container tag. Tokens enclosed within curly brackets are treated as controller action IDs (also called *element names* in the context of action column). They will be replaced by the corresponding element rendering values specified in `elements`. For example, the token `{bulk-actions}` will be replaced by the result of the value `elements['bulk-actions']`. If a value cannot be found, the token will be replaced with an empty string. See [renderTagAttributes()] for details on how attributes are being rendered.
19+
- `templates`: *array*, templates used to render widget elements, in addition, may be specified the array keys with the HTML attributes for the container tag. Tokens enclosed within curly brackets are treated as controller action IDs (also called *element names* in the context of action column). They will be replaced by the corresponding element rendering values specified in `elements`. For example, the token `{bulk-actions}` will be replaced by the result of the value `elements['bulk-actions']`. If a value cannot be found, the token will be replaced with an empty string. See [renderTagAttributes()] for details on how attributes are being rendered.
2020

2121
- `elements`: *array*, elements rendering values. The array keys are the element names (without curly brackets), and the values are the corresponding element rendering values.
2222

@@ -27,8 +27,8 @@ Widget Class
2727
- `bulkActionsItems`: *array*, the option data items for the Bulk Actions. See [dropDownList()] for details on how this is to be rendered.
2828

2929
- `bulkActionsOptions`: *array*, the Bulk Actions options in terms of name-value pairs. The following attributes for the select option tag are specially handled:
30-
- url: string, used to send the array with the selected rows (based on the AJAX request) to the clienton the specified URL.
31-
- data-confirm: string, displays a confirm box before deleting selected items.
30+
- `url`: string, used to send the array with the selected rows (based on the AJAX request) to the clienton the specified URL.
31+
- `data-confirm`: string, displays a confirm box before deleting selected items.
3232

3333
See [dropDownList()] for details on how this is to be rendered.
3434

DeleteMultipleAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* DeleteMultipleAction deletes the selected rows of the GridView.
1212
*
13-
* @author Oleg Belostotskiy <olgblst@gmail.com>
13+
* @author Oleg Belostotsky <olegbelostotsky@gmail.com>
1414
*/
1515
class DeleteMultipleAction extends Action
1616
{

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright &copy; 2014, Oleg Belostotskiy
1+
Copyright &copy; 2014, Oleg Belostotsky
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,19 @@
1-
Action Bar
2-
==========
1+
ActionBar
2+
=========
33

4-
Action Bar is a Yii 2 widget that render the drop-down list for manipulation selected GridView items and control buttons. The widget permits you to fully customize elements.
4+
ActionBar is a Yii 2 widget that render the drop-down list for manipulation selected the GridView items and control buttons. The widget permits you to fully customize elements.
55

66
![Screenshot](https://cloud.githubusercontent.com/assets/8091481/3558541/f447ff48-093c-11e4-91ad-b784c929ed32.png)
77

88
Installation
99
------------
1010

11-
You can install the widget in two ways, using [Composer] or by downloading an archive file.
11+
You can install the widget using [Composer]. Just run the following command under your application folder:
1212

13-
### Installing via Composer
14-
15-
Run the following commands under your application folder:
16-
17-
```
18-
php composer.phar require --prefer-dist "mickgeek/yii2-actionbar *"
1913
```
20-
21-
> Note: You can just do `composer update --prefer-dist` if pre-adding the following to `require` section of your `composer.json`:
22-
>
23-
> "mickgeek/yii2-actionbar": "*"
24-
>
25-
26-
### Installing from an Archive File
27-
28-
Download [the archive file], unpack it to `path/to/app/vendor/mickgeek` folder and modify the main configuration file like this:
29-
30-
```php
31-
$vendorDir = dirname(__DIR__) . '/vendor';
32-
33-
return [
34-
'vendorPath' => $vendorDir,
35-
'extensions' => array_merge(
36-
require($vendorDir . '/yiisoft/extensions.php'),
37-
[
38-
'mickgeek/yii2-actionbar' => [
39-
'name' => 'mickgeek/yii2-actionbar',
40-
'version' => '9999999-dev',
41-
'alias' => [
42-
'@mickgeek/actionbar' => $vendorDir . '/mickgeek/yii2-actionbar',
43-
],
44-
],
45-
]
46-
),
47-
...
48-
];
14+
php composer.phar require --prefer-dist mickgeek/yii2-actionbar
4915
```
5016

51-
where `$vendorDir` is the path to the directory that stores vendor files.
52-
5317
Usage
5418
-----
5519

@@ -79,9 +43,6 @@ public function actions()
7943
8044
> Tip: For information about properties and methods of the widget, see the bundled `DOCUMENTATION.md`.
8145
82-
### CSRF validation
83-
For enable CSRF validation make sure you have ```<?= Html::csrfMetaTags() ?>``` in main layout.
84-
8546
Examples
8647
--------
8748

@@ -202,4 +163,3 @@ License
202163
This extension is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.
203164

204165
[Composer]:https://getcomposer.org
205-
[the archive file]:https://github.com/mickgeek/yii2-actionbar/archive/master.zip

Widget.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* \mickgeek\actionbar\Widget renders the drop-down list to manipulation selected GridView items and control buttons.
1212
*
13-
* @author Oleg Belostotskiy <olgblst@gmail.com>
13+
* @author Oleg Belostotsky <olegbelostotsky@gmail.com>
1414
*/
1515
class Widget extends \yii\base\Widget
1616
{
@@ -29,7 +29,7 @@ class Widget extends \yii\base\Widget
2929
*/
3030
public $options = ['class' => 'widget-action-bar'];
3131
/**
32-
* @var boolean whether the action bar content should be included in a div container.
32+
* @var boolean whether the widget content should be included in a div container.
3333
*/
3434
public $renderContainer = true;
3535
/**
@@ -38,7 +38,7 @@ class Widget extends \yii\base\Widget
3838
*/
3939
public $containerOptions = ['class' => 'row'];
4040
/**
41-
* @var array templates used to render action bar elements, in addition, may be specified the array keys with
41+
* @var array templates used to render widget elements, in addition, may be specified the array keys with
4242
* the HTML attributes for the container tag. Tokens enclosed within curly brackets are treated as
4343
* controller action IDs (also called *element names* in the context of action column). They will be replaced
4444
* by the corresponding element rendering values specified in [[elements]]. For example,
@@ -73,9 +73,9 @@ class Widget extends \yii\base\Widget
7373
* @var array the Bulk Actions options in terms of name-value pairs. The following attributes
7474
* for the select option tag are specially handled:
7575
*
76-
* - url: string, used to send the array with the selected rows (based on the AJAX request) to the client
76+
* - `url`: string, used to send the array with the selected rows (based on the AJAX request) to the client
7777
* on the specified URL.
78-
* - data-confirm: string, displays a confirm box before deleting selected items.
78+
* - `data-confirm`: string, displays a confirm box before deleting selected items.
7979
*
8080
* @see \yii\helpers\Html::dropDownList() for details on how this is to be rendered.
8181
*/

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
{
22
"name": "mickgeek/yii2-actionbar",
33
"type": "yii2-extension",
4-
"description": "Customizable bar with the drop-down list for manipulation selected GridView items and control buttons.",
5-
"keywords": ["yii2", "extension", "widget", "grid", "dropdown", "bulk actions"],
4+
"description": "A control bar with bulk actions for the GridView widget.",
5+
"keywords": ["yii2", "extension", "widget", "grid", "bulk actions"],
66
"homepage": "https://github.com/mickgeek/yii2-actionbar",
7-
"license": "BSD 3-Clause",
7+
"license": "BSD-3-Clause",
88
"authors": [
99
{
10-
"name": "Oleg Belostotskiy",
11-
"email": "[email protected]",
12-
"homepage": "http://mickgeek.com",
10+
"name": "Oleg Belostotsky",
11+
"email": "[email protected]",
1312
"role": "Developer"
1413
}
1514
],

0 commit comments

Comments
 (0)