Skip to content

Commit

Permalink
Nicer icheck for user menu
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Nov 8, 2017
1 parent 61617a2 commit e5c1e41
Show file tree
Hide file tree
Showing 12 changed files with 88,037 additions and 110 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"bootstrap-less": "^3.3.8",
"ekko-lightbox": "^5.1.1",
"font-awesome": "^4.7.0",
"icheck": "^1.0.2",
"jquery-slimscroll": "^1.3.8",
"jquery-ui": "^1.12.1",
"jquery-ui-bundle": "^1.12.1",
Expand Down
3,441 changes: 3,439 additions & 2 deletions public/css/AdminLTE.css

Large diffs are not rendered by default.

6,892 changes: 6,889 additions & 3 deletions public/css/app.css

Large diffs are not rendered by default.

4,377 changes: 4,372 additions & 5 deletions public/css/build/all.css

Large diffs are not rendered by default.

4,377 changes: 4,372 additions & 5 deletions public/css/dist/all.css

Large diffs are not rendered by default.

339 changes: 337 additions & 2 deletions public/css/overrides.css

Large diffs are not rendered by default.

7,852 changes: 7,826 additions & 26 deletions public/js/build/all.js

Large diffs are not rendered by default.

52,945 changes: 52,943 additions & 2 deletions public/js/build/vue.js

Large diffs are not rendered by default.

7,852 changes: 7,826 additions & 26 deletions public/js/dist/all.js

Large diffs are not rendered by default.

20 changes: 8 additions & 12 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"/js/build/vue.js": "/js/build/vue.js?id=e6804371942215bd1d7d",
"/css/AdminLTE.css": "/css/AdminLTE.css?id=b8be19a285eaf44eec37",
"/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405",
"/css/overrides.css": "/css/overrides.css?id=9ae1a3c861441320c5a1",
"/js/build/vue.js.map": "/js/build/vue.js.map?id=3b3d417664a61dcce3e9",
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=99f5a5a03c4155cf69f6",
"/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72",
"/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b",
"/css/dist/all.css": "/css/dist/all.css?id=7c3842d2639193ac7e88",
"/js/dist/all.js": "/js/dist/all.js?id=991cd06c975979f6f067",
"/css/build/all.css": "/css/build/all.css?id=7c3842d2639193ac7e88",
"/js/build/all.js": "/js/build/all.js?id=991cd06c975979f6f067"
"/js/build/vue.js": "/js/build/vue.js?id=e9504cad01a748f9b0fa",
"/css/AdminLTE.css": "/css/AdminLTE.css?id=889dc040f2ddfca6efde",
"/css/app.css": "/css/app.css?id=3a1e8c168fa8714043a6",
"/css/overrides.css": "/css/overrides.css?id=3911514a8a64a4247483",
"/css/dist/all.css": "/css/dist/all.css?id=f2d4896e67e878a47434",
"/js/dist/all.js": "/js/dist/all.js?id=0d558c3ed637f4c81a77",
"/css/build/all.css": "/css/build/all.css?id=f2d4896e67e878a47434",
"/js/build/all.js": "/js/build/all.js?id=0d558c3ed637f4c81a77"
}
46 changes: 22 additions & 24 deletions resources/views/users/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,30 +474,29 @@ class="form-control">
<td class="col-md-5 tooltip-base permissions-item"
data-toggle="tooltip"
data-placement="right"
title="{{ $localPermission['note'] }}"
>
title="{{ $localPermission['note'] }}">
<h4>{{ $area . ': ' . $localPermission['label'] }}</h4>
</td>

<td class="col-md-1 permissions-item">
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled"]) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled", 'class'=>'minimal']) }}
@else
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['value'=>"grant"]) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['value'=>"grant", 'class'=>'minimal']) }}
@endif
</td>
<td class="col-md-1 permissions-item">
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled"]) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled", 'class'=>'minimal']) }}
@else
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['value'=>"deny"]) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['value'=>"deny", 'class'=>'minimal']) }}
@endif
</td>
<td class="col-md-1 permissions-item">
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled"] ) }}
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled",'class'=>'minimal'] ) }}
@else
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['value'=>"inherit"] ) }}
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['value'=>"inherit", 'class'=>'minimal'] ) }}
@endif
</td>
</tr>
Expand All @@ -509,13 +508,13 @@ class="form-control">
<h3>{{ $area }}</h3>
</td>
<td class="col-md-1 permissions-item">
{{ Form::radio("$area", '1',false,['value'=>"grant"]) }}
{{ Form::radio("$area", '1',false,['value'=>"grant", 'class'=>'minimal']) }}
</td>
<td class="col-md-1 permissions-item">
{{ Form::radio("$area", '-1',false,['value'=>"deny"]) }}
{{ Form::radio("$area", '-1',false,['value'=>"deny", 'class'=>'minimal']) }}
</td>
<td class="col-md-1 permissions-item">
{{ Form::radio("$area", '0',false,['value'=>"inherit"] ) }}
{{ Form::radio("$area", '0',false,['value'=>"inherit", 'class'=>'minimal'] ) }}
</td>
</tr>

Expand All @@ -526,29 +525,28 @@ class="form-control">
class="col-md-5 tooltip-base permissions-item"
data-toggle="tooltip"
data-placement="right"
title="{{ $permission['note'] }}"
>
title="{{ $permission['note'] }}">
{{ $permission['label'] }}
</td>
<td class="col-md-1 permissions-item">
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[$permission['permission'] ] == '1', ["value"=>"grant", 'disabled'=>'disabled']) }}
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[$permission['permission'] ] == '1', ["value"=>"grant", 'disabled'=>'disabled', 'class'=>'minimal']) }}
@else
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[ $permission['permission'] ] == '1', ["value"=>"grant"]) }}
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[ $permission['permission'] ] == '1', ["value"=>"grant",'class'=>'minimal']) }}
@endif
</td>
<td class="col-md-1 permissions-item">
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny", 'disabled'=>'disabled']) }}
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny", 'disabled'=>'disabled', 'class'=>'minimal']) }}
@else
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny"]) }}
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny",'class'=>'minimal']) }}
@endif
</td>
<td class="col-md-1 permissions-item">
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit", 'disabled'=>'disabled']) }}
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit", 'disabled'=>'disabled', 'class'=>'minimal']) }}
@else
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit"]) }}
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit", 'class'=>'minimal']) }}
@endif
</td>
@endif
Expand Down Expand Up @@ -588,11 +586,11 @@ class="col-md-5 tooltip-base permissions-item"
</script>

<script nonce="{{ csrf_token() }}">
$('tr.header-row input:radio').click(function() {
value = $(this).attr('value');
$(this).parent().parent().siblings().each(function() {
$(this).find('td input:radio[value='+value+']').prop("checked", true);
})
$('tr.header-row input:radio').on('ifClicked', function () {
value = $(this).attr('value');
$(this).parent().parent().parent().siblings().each(function(idx,elem) {
$(this).find('td input:radio[value='+value+']').iCheck('check');
})
});
$('.header-name').click(function() {
Expand Down
5 changes: 2 additions & 3 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mix
'./resources/assets/css/app.css',
'public/css/AdminLTE.css',
'resources/assets/css/font-awesome/font-awesome.min.css',
'./bower_components/iCheck/skins/minimal/minimal.css',
'./node_modules/icheck/skins/minimal/minimal.css',
'./node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.standalone.css',
'public/css/bootstrap-tables-sticky-header.css',
'public/css/overrides.css'
Expand All @@ -40,10 +40,9 @@ mix
'./node_modules/jquery-slimscroll/jquery.slimscroll.js',
'./node_modules/jquery.iframe-transport/jquery.iframe-transport.js',
'./node_modules/blueimp-file-upload/js/jquery.fileupload.js',
// './node_modules/fastclick/lib/fastclick.js',
'./node_modules/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js',
'./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
'./bower_components/iCheck/icheck.js',
'./node_modules/icheck/icheck.js',
'./node_modules/ekko-lightbox/dist/ekko-lightbox.js',
'./resources/assets/js/app.js', //this is part of AdminLTE
'./resources/assets/js/snipeit.js', //this is the actual Snipe-IT JS
Expand Down

0 comments on commit e5c1e41

Please sign in to comment.