Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 5712944

Browse files
committed
Resolved changelog conflicts with master
2 parents 2a47846 + 415e73a commit 5712944

23 files changed

+482
-151
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ v1.1.1
1313
v1.1
1414
---------------------
1515
* NEW: Permissions selector as a real Tree-based selector.
16-
* Bugfix: Fix wrong unique name validations for Role and Permission creating form
16+
* Bugfix: Fix wrong unique name validations for Role and Permission creating form.
17+
* Bugfix: Fatal error on creating Role/Permission with existed name.
1718

1819
v1.0.2
1920
---------------------
2021
* Bugfix: Routes Scanner take info from comments as well, not class definition.
2122

2223
v1.0.1
2324
---------------------
24-
* Disable inherit permissions in role permissions multi-select box.
25+
* Disable inherit permissions in role permissions selector.
2526

2627
v1.0
2728
---------------------

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
"minimum-stability": "dev",
1919
"require": {
2020
"php": ">=7.0.0",
21-
"yiisoft/yii2": "~2.0.11",
21+
"yiisoft/yii2": "~2.0.12",
2222
"kartik-v/yii2-widget-select2": "~2.1.0"
2323
},
2424
"autoload": {
2525
"psr-4": {
2626
"justcoded\\yii2\\rbac\\": "src/"
2727
}
2828
}
29-
}
29+
}

src/Module.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@
66
class Module extends \yii\base\Module
77
{
88

9-
public $defaultRoute = 'index';
10-
11-
//
12-
// public $module = 'admin';
13-
//
14-
// public $layoutPath = '@admin/views/layout/main';
15-
//
16-
//
17-
// public $urlRules = [
18-
// 'admin/permissions' => 'admin/rbac/permissions',
19-
// 'admin/rbac/permissions' => 'admin/permissions'
20-
// ];
9+
public $defaultRoute = 'permissions/index';
2110

2211
public function init()
2312
{

src/assets/RbacAssetBundle.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ class RbacAssetBundle extends \yii\web\AssetBundle
77
public $sourcePath = '@vendor/justcoded/yii2-rbac/src/assets';
88

99
public $css = [
10+
'css/jstree.min.css',
11+
'css/custom.css',
1012
];
1113

1214
public $js = [
13-
'js/multiselect.min.js',
15+
'js/jstree.min.js',
16+
'js/jstree-double-panel.js',
1417
'js/rbac.js'
1518
];
1619
public $depends = [

src/assets/css/32px.png

3.05 KB
Loading

src/assets/css/40px.png

1.84 KB
Loading

src/assets/css/custom.css

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
.js-tree-box{
2+
color: #212529;
3+
font-size: 16px;
4+
}
5+
.js-tree-box .label{
6+
display: block;
7+
margin: 0 0 10px;
8+
color: #212529;
9+
padding: 0;
10+
font-size: 16px;
11+
font-weight: normal;
12+
text-align: left;
13+
}
14+
.js-tree-box .simple-input{
15+
display: block;
16+
color: #a3a3a3;
17+
width: 100%;
18+
height: 34px;
19+
padding: 0 10px;
20+
border: 1px solid #d7dbe2;
21+
outline: none;
22+
flex-shrink: 0;
23+
}
24+
.js-tree-box .btn-simple{
25+
display: block;
26+
font-size: 0;
27+
color: #3a3a3a;
28+
background: #f2f2f2;
29+
width: 100%;
30+
height: 34px;
31+
padding: 0 10px;
32+
border: none;
33+
border-radius: 3px;
34+
outline: none;
35+
transition: background 0.3s ease-in-out;
36+
cursor: pointer;
37+
margin: 0 0 5px;
38+
position: relative;
39+
}
40+
.js-tree-box .btn-simple:before{
41+
content: '';
42+
position: absolute;
43+
top: 50%;
44+
left: 50%;
45+
margin-left: -7px;
46+
margin-top: -7px;
47+
background: url(../images/next.png) no-repeat 50% 50%;
48+
background-size: contain;
49+
width: 14px;
50+
height: 14px;
51+
pointer-events: none;
52+
}
53+
.js-tree-box .btn-simple.add-all:before{
54+
background: url(../images/next.png) no-repeat 50% 50%;
55+
}
56+
.js-tree-box .btn-simple.remove-all:before{
57+
background: url(../images/prev.png) no-repeat 50% 50%;
58+
}
59+
.js-tree-box .btn-simple.add:before{
60+
background: url(../images/right.png) no-repeat 50% 50%;
61+
}
62+
.js-tree-box .btn-simple.remove:before{
63+
background: url(../images/left.png) no-repeat 50% 50%;
64+
}
65+
.js-tree-box .btn-simple:hover{
66+
background-color: #dad8d8;
67+
}
68+
.js-tree-box .btn-holder{
69+
padding: 120px 0 0;
70+
}
71+
.js-tree-box .jstree{
72+
padding: 30px 0;
73+
border: 1px solid #d7dbe2;
74+
border-top-width: 0;
75+
height: 300px;
76+
overflow: auto;
77+
}
78+
.jstree-default .jstree-disabled {
79+
opacity: 0.5;
80+
}
81+
@media (max-width: 767px){
82+
.js-tree-box .btn-holder{
83+
padding: 34px 0;
84+
}
85+
.js-tree-box .btn-simple:before{
86+
transform: rotate(90deg);
87+
}
88+
}

src/assets/css/jstree.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/css/throbber.gif

1.68 KB
Loading

src/assets/images/left.png

471 Bytes
Loading

0 commit comments

Comments
 (0)