mirror of
https://github.com/snipe/snipe-it.git
synced 2025-10-29 11:21:21 +00:00
Fixed js errors
This commit is contained in:
parent
3d47277614
commit
d5d01136c4
@ -1587,6 +1587,9 @@ Radio toggle styles for permission settings and check/uncheck all
|
||||
border-radius: 4px;
|
||||
border: 1px transparent solid;
|
||||
}
|
||||
.remember-toggle {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=app.css.map*/
|
||||
File diff suppressed because one or more lines are too long
@ -1211,6 +1211,9 @@ Radio toggle styles for permission settings and check/uncheck all
|
||||
border-radius: 4px;
|
||||
border: 1px transparent solid;
|
||||
}
|
||||
.remember-toggle {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=overrides.css.map*/
|
||||
File diff suppressed because one or more lines are too long
6
public/css/dist/all.css
vendored
6
public/css/dist/all.css
vendored
@ -22923,6 +22923,9 @@ Radio toggle styles for permission settings and check/uncheck all
|
||||
border-radius: 4px;
|
||||
border: 1px transparent solid;
|
||||
}
|
||||
.remember-toggle {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=app.css.map*/
|
||||
@ -24621,6 +24624,9 @@ Radio toggle styles for permission settings and check/uncheck all
|
||||
border-radius: 4px;
|
||||
border: 1px transparent solid;
|
||||
}
|
||||
.remember-toggle {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=overrides.css.map*/
|
||||
@ -2,8 +2,8 @@
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=cf893d4dd2aecc588b0eb6bf42288af6",
|
||||
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=42f97cd5b9ee7521b04a448e7fc16ac9",
|
||||
"/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=3e8b8221c159b829a0edd562eb717563",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=9a7af068f65f26e40354018cb3045fb1",
|
||||
"/css/build/app.css": "/css/build/app.css?id=65522446562845e17f274a3e596fdd9c",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=b5f8aade4b14002a8e57d5999bf9cb44",
|
||||
"/css/build/app.css": "/css/build/app.css?id=8dbcedb7e8f5d10cdfb0d85c246b4c74",
|
||||
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=ee0ed88465dd878588ed044eefb67723",
|
||||
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=3d8a3d2035ea28aaad4a703c2646f515",
|
||||
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=3979929a3423ff35b96b1fc84299fdf3",
|
||||
@ -19,7 +19,7 @@
|
||||
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=b2cd9f59d7e8587939ce27b2d3363d82",
|
||||
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=7277edd636cf46aa7786a4449ce0ead7",
|
||||
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=cbd06cc1d58197ccc81d4376bbaf0d28",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=8c4e5a47765e94f5897fbbfab2dde17d",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=0a82b3a7cb1b65fd08be77ba5c29b22f",
|
||||
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde",
|
||||
|
||||
@ -662,3 +662,41 @@ document.addEventListener('livewire:init', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// toggle everything
|
||||
$(".remember-toggle").on("click",function(){
|
||||
var toggleable_callout_id = $(this).attr('id');
|
||||
var toggle_content_class = 'toggle-content-'+$(this).attr('id');
|
||||
var toggle_arrow = '#toggle-arrow-' + toggleable_callout_id;
|
||||
var toggle_cookie_name='toggle_state_'+toggleable_callout_id;
|
||||
|
||||
console.log('Callout ID: ' + toggleable_callout_id);
|
||||
console.log('Content ID: '+toggle_content_class);
|
||||
console.log('Arrow ID: '+toggle_arrow);
|
||||
console.log('Cookie Name: '+toggle_cookie_name);
|
||||
|
||||
$('.'+toggle_content_class).fadeToggle(100);
|
||||
$(toggle_arrow).toggleClass('fa-caret-right fa-caret-down');
|
||||
var toggle_open = $(toggle_arrow).hasClass('fa-caret-down');
|
||||
console.log('Cookie will set open state to: '+toggle_open);
|
||||
document.cookie=toggle_cookie_name+"="+toggle_open+';path=/';
|
||||
});
|
||||
|
||||
var all_cookies = document.cookie.split(';')
|
||||
for (var i in all_cookies) {
|
||||
var trimmed_cookie = all_cookies[i].trim(' ')
|
||||
elems = all_cookies[i].split('=', 2);
|
||||
|
||||
|
||||
// We have to do more here since we don't know the name of the selector
|
||||
if (trimmed_cookie.startsWith('toggle_state_')) {
|
||||
|
||||
var toggle_selector_name = elems[0].replace(' toggle_state_','');
|
||||
if (elems[1] == 'true') {
|
||||
console.log('Selector name for cookie click trigger: '+toggle_selector_name);
|
||||
$('#'+toggle_selector_name+'.remember-toggle').trigger('click')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,175 +1,192 @@
|
||||
@foreach ($permissions as $area => $area_permission)
|
||||
|
||||
@foreach ($permissions as $main_section => $main_section_permission)
|
||||
|
||||
<!-- handle superadmin and reports, and anything else with only one option -->
|
||||
@php
|
||||
$localPermission = $area_permission[0];
|
||||
$sectionPermission = $main_section_permission[0];
|
||||
@endphp
|
||||
<div id="{{ str_slug($localPermission['permission'])}}" class="form-group {{ (count($area_permission) > 2) ? ' remember-toggle': '' }}{{ ($localPermission['permission']!='superuser') ? ' nonsuperuser' : '' }}{{ ( ($localPermission['permission']!='superuser') && ($localPermission['permission']!='admin')) ? ' nonadmin' : '' }}">
|
||||
<div class="callout callout-legend col-md-12">
|
||||
<div class="col-md-10">
|
||||
<a>
|
||||
<h4>
|
||||
@if (count($area_permission) > 2)
|
||||
<x-icon type="caret-down" class="fa-fw" id="toggle-arrow-{{ str_slug($localPermission['permission'])}}" />
|
||||
@endif
|
||||
{{ trans('permissions.'.str_slug($area).'.name') }}
|
||||
</h4>
|
||||
</a>
|
||||
<div class="form-group {{ ($sectionPermission['permission']!='superuser') ? ' nonsuperuser' : '' }}{{ ( ($sectionPermission['permission']!='superuser') && ($sectionPermission['permission']!='admin')) ? ' nonadmin' : '' }}">
|
||||
|
||||
@if (\Lang::has('permissions.'.str_slug($area).'.note'))
|
||||
<p>{{ trans('permissions.'.str_slug($area).'.note') }}</p>
|
||||
@endif
|
||||
<!-- start callout legend for major sections -->
|
||||
<div class="callout callout-legend col-md-12">
|
||||
|
||||
<!-- start left column with area name and note -->
|
||||
<div class="col-md-10">
|
||||
|
||||
<h4 id="{{ str_slug($sectionPermission['permission'])}}" class="{{ (count($main_section_permission) > 1) ? 'remember-toggle': '' }}">
|
||||
@if (count($main_section_permission) > 1)
|
||||
<x-icon type="caret-down" class="fa-fw" id="toggle-arrow-{{ str_slug($sectionPermission['permission'])}}" />
|
||||
@endif
|
||||
{{ trans('permissions.'.str_slug($main_section).'.name') }}
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Handle the checkall ALLOW and DENY radios -->
|
||||
<div class="col-md-2 text-right header-row">
|
||||
<div class="radio-toggle-wrapper">
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ (count($area_permission) > 1) ? trans('permissions.grant_all', ['area' => $area]) : trans('permissions.grant', ['area' => $area]) }}">
|
||||
<input
|
||||
class="form-control {{ str_slug($area) }} allow"
|
||||
data-checker-group="{{ str_slug($area) }}"
|
||||
aria-label="{{ str_slug($area) }}"
|
||||
name="permission[{{ str_slug($area) }}]"
|
||||
@checked(array_key_exists(str_slug($area), $groupPermissions) && $groupPermissions[str_slug($area)] == '1')
|
||||
type="radio"
|
||||
value="1"
|
||||
{{-- Disable the superuser and admin allow if the user is not a superuser --}}
|
||||
@if (((str_slug($area) == 'admin') && (!auth()->user()->hasAccess('admin'))) || ((str_slug($area) == 'superuser') && (!auth()->user()->isSuperUser())))
|
||||
disabled
|
||||
@endif
|
||||
id="{{ str_slug($area) }}_allow"
|
||||
>
|
||||
|
||||
<label class="allow" for="{{ str_slug($area) }}_allow">
|
||||
<i class="fa-solid fa-square-check"></i>
|
||||
</label>
|
||||
@if (\Lang::has('permissions.'.str_slug($main_section).'.note'))
|
||||
<p>{{ trans('permissions.'.str_slug($main_section).'.note') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<!-- end left column with area name and note -->
|
||||
|
||||
<!-- Handle the checkall ALLOW and DENY radios in the right column -->
|
||||
<div class="col-md-2 text-right header-row">
|
||||
<div class="radio-toggle-wrapper">
|
||||
|
||||
@if ($use_inherit)
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ (count($area_permission) > 1) ? trans('permissions.inherit_all', ['area' => $area]) : trans('permissions.inherit', ['area' => $area]) }}">
|
||||
<input
|
||||
class="form-control {{ str_slug($area) }} inherit"
|
||||
data-checker-group="{{ str_slug($area) }}"
|
||||
aria-label="{{ str_slug($area) }}"
|
||||
name="permission[{{ str_slug($area) }}]"
|
||||
@checked(array_key_exists(str_slug($area), $groupPermissions) && $groupPermissions[str_slug($area)] == '0')
|
||||
type="radio"
|
||||
value="0"
|
||||
{{-- Disable the superuser and admin allow if the user is not a superuser --}}
|
||||
@if (((str_slug($area) == 'admin') && (!auth()->user()->hasAccess('admin'))) || ((str_slug($area) == 'superuser') && (!auth()->user()->isSuperUser())))
|
||||
disabled
|
||||
@endif
|
||||
id="{{ str_slug($area) }}_inherit"
|
||||
>
|
||||
<!-- start .radio-slider-inputs allow -->
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ (count($main_section_permission) > 1) ? trans('permissions.grant_all', ['area' => $main_section]) : trans('permissions.grant', ['area' => $main_section]) }}">
|
||||
<input
|
||||
class="form-control {{ str_slug($main_section) }} allow"
|
||||
data-checker-group="{{ str_slug($main_section) }}"
|
||||
aria-label="{{ str_slug($main_section) }}"
|
||||
name="permission[{{ str_slug($main_section) }}]"
|
||||
@checked(array_key_exists(str_slug($main_section), $groupPermissions) && $groupPermissions[str_slug($main_section)] == '1')
|
||||
type="radio"
|
||||
value="1"
|
||||
{{-- Disable the superuser and admin allow if the user is not a superuser --}}
|
||||
@if (((str_slug($main_section) == 'admin') && (!auth()->user()->hasAccess('admin'))) || ((str_slug($main_section) == 'superuser') && (!auth()->user()->isSuperUser())))
|
||||
disabled
|
||||
@endif
|
||||
id="{{ str_slug($main_section) }}_allow"
|
||||
>
|
||||
|
||||
<label class="inherit" for="{{ str_slug($area) }}_inherit">
|
||||
<i class="fa-solid fa-layer-group"></i>
|
||||
</label>
|
||||
</div>
|
||||
<label class="allow" for="{{ str_slug($main_section) }}_allow">
|
||||
<i class="fa-solid fa-square-check"></i>
|
||||
</label>
|
||||
</div>
|
||||
<!-- end .radio-slider-inputs allow -->
|
||||
|
||||
@endif
|
||||
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ (count($area_permission) > 1) ? trans('permissions.deny_all', ['area' => $area]) : trans('permissions.deny', ['area' => $area]) }}">
|
||||
<input
|
||||
class="form-control {{ str_slug($area) }} deny"
|
||||
data-checker-group="{{ str_slug($area) }}"
|
||||
aria-label="{{ str_slug($area) }}"
|
||||
name="permission[{{ str_slug($area) }}]"
|
||||
@checked(array_key_exists(str_slug($area), $groupPermissions) && $groupPermissions[str_slug($area)] == '-1')
|
||||
type="radio"
|
||||
value="-1"
|
||||
{{-- Disable the superuser and admin allow if the user is not a superuser --}}
|
||||
@if (((str_slug($area) == 'admin') && (!auth()->user()->hasAccess('admin'))) || ((str_slug($area) == 'superuser') && (!auth()->user()->isSuperUser())))
|
||||
disabled
|
||||
@endif
|
||||
id="{{ str_slug($area) }}_deny"
|
||||
>
|
||||
|
||||
<label class="deny" for="{{ str_slug($area) }}_deny">
|
||||
<i class="fa-solid fa-square-xmark"></i>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@if (count($area_permission) > 2)
|
||||
|
||||
@foreach ($area_permission as $index => $this_permission)
|
||||
@if ($this_permission['display'])
|
||||
@php
|
||||
$section_translation = trans('permissions.'.str_slug($this_permission['permission']).'.name');
|
||||
@endphp
|
||||
<div id="{{ str_slug($this_permission['permission']) }}" class="toggle-content-{{ str_slug($localPermission['permission']) }} {{ ($localPermission['permission']!='superuser') ? ' nonsuperuser' : '' }}{{ ( ($localPermission['permission']!='superuser') && ($localPermission['permission']!='admin')) ? ' nonadmin' : '' }}">
|
||||
<div class="form-group" style="border-bottom: 1px solid #eee; padding-right: 13px;">
|
||||
<div class="col-md-10">
|
||||
<strong>{{ $section_translation }}</strong>
|
||||
@if (\Lang::has('permissions.'.str_slug($this_permission['permission']).'.note'))
|
||||
<p>{{ trans('permissions.'.str_slug($this_permission['permission']).'.note') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2 text-right">
|
||||
<div class="radio-toggle-wrapper">
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ trans('permissions.grant', ['area' => $section_translation]) }}">
|
||||
<!-- start .radio-slider-inputs inherit if used -->
|
||||
@if ($use_inherit)
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ (count($main_section_permission) > 1) ? trans('permissions.inherit_all', ['area' => $main_section]) : trans('permissions.inherit', ['area' => $main_section]) }}">
|
||||
<input
|
||||
class="form-control allow radiochecker-{{ str_slug($area) }}"
|
||||
aria-label="permission[{{ $this_permission['permission'] }}]"
|
||||
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '1')
|
||||
name="permission[{{ $this_permission['permission'] }}]"
|
||||
class="form-control {{ str_slug($main_section) }} inherit"
|
||||
data-checker-group="{{ str_slug($main_section) }}"
|
||||
aria-label="{{ str_slug($main_section) }}"
|
||||
name="permission[{{ str_slug($main_section) }}]"
|
||||
@checked(array_key_exists(str_slug($main_section), $groupPermissions) && $groupPermissions[str_slug($main_section)] == '0')
|
||||
type="radio"
|
||||
id="{{ str_slug($this_permission['permission']) }}_allow"
|
||||
value="1"
|
||||
>
|
||||
<label for="{{ str_slug($this_permission['permission']) }}_allow" class="allow">
|
||||
<i class="fa-solid fa-square-check"></i>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@if ($use_inherit)
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ trans('permissions.inherit', ['area' => $section_translation]) }}">
|
||||
<input
|
||||
class="form-control inherit radiochecker-{{ str_slug($area) }}"
|
||||
aria-label="permission[{{ $this_permission['permission'] }}]"
|
||||
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '0')
|
||||
name="permission[{{ $this_permission['permission'] }}]"
|
||||
type="radio"
|
||||
id="{{ str_slug($this_permission['permission']) }}_inherit"
|
||||
value="0"
|
||||
{{-- Disable the superuser and admin allow if the user is not a superuser --}}
|
||||
@if (((str_slug($main_section) == 'admin') && (!auth()->user()->hasAccess('admin'))) || ((str_slug($main_section) == 'superuser') && (!auth()->user()->isSuperUser())))
|
||||
disabled
|
||||
@endif
|
||||
id="{{ str_slug($main_section) }}_inherit"
|
||||
>
|
||||
<label for="{{ str_slug($this_permission['permission']) }}_inherit" class="inherit">
|
||||
|
||||
<label class="inherit" for="{{ str_slug($main_section) }}_inherit">
|
||||
<i class="fa-solid fa-layer-group"></i>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
<!-- end .radio-slider-inputs inherit if used -->
|
||||
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ trans('permissions.deny', ['area' => $section_translation]) }}">
|
||||
<input
|
||||
class="form-control deny radiochecker-{{ str_slug($area) }}"
|
||||
aria-label="permission[{{ $this_permission['permission'] }}]"
|
||||
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '-1')
|
||||
name="permission[{{ $this_permission['permission'] }}]"
|
||||
type="radio"
|
||||
value="-1"
|
||||
id="{{ str_slug($this_permission['permission']) }}_deny"
|
||||
>
|
||||
<label for="{{ str_slug($this_permission['permission']) }}_deny">
|
||||
<i class="fa-solid fa-square-xmark"></i>
|
||||
</label>
|
||||
</div>
|
||||
<!-- start .radio-slider-inputs deny -->
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ (count($main_section_permission) > 1) ? trans('permissions.deny_all', ['area' => $main_section]) : trans('permissions.deny', ['area' => $main_section]) }}">
|
||||
<input
|
||||
class="form-control {{ str_slug($main_section) }} deny"
|
||||
data-checker-group="{{ str_slug($main_section) }}"
|
||||
aria-label="{{ str_slug($main_section) }}"
|
||||
name="permission[{{ str_slug($main_section) }}]"
|
||||
@checked(array_key_exists(str_slug($main_section), $groupPermissions) && $groupPermissions[str_slug($main_section)] == '-1')
|
||||
type="radio"
|
||||
value="-1"
|
||||
{{-- Disable the superuser and admin allow if the user is not a superuser --}}
|
||||
@if (((str_slug($main_section) == 'admin') && (!auth()->user()->hasAccess('admin'))) || ((str_slug($main_section) == 'superuser') && (!auth()->user()->isSuperUser())))
|
||||
disabled
|
||||
@endif
|
||||
id="{{ str_slug($main_section) }}_deny"
|
||||
>
|
||||
|
||||
<label class="deny" for="{{ str_slug($main_section) }}_deny">
|
||||
<i class="fa-solid fa-square-xmark"></i>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end .radio-slider-inputs deny -->
|
||||
|
||||
</div> <!-- end .radio-toggle-wrapper -->
|
||||
</div> <!-- end right column radios -->
|
||||
|
||||
</div> <!-- end callout legend for major sections -->
|
||||
</div> <!-- end form row -->
|
||||
|
||||
<!-- now handle sub-permissions if they exist -->
|
||||
@if (count($main_section_permission) > 2)
|
||||
<div
|
||||
class="toggle-content-{{ str_slug($sectionPermission['permission']) }} {{ str_slug($sectionPermission['permission']) }}
|
||||
{{ ($sectionPermission['permission']!='superuser') ? ' nonsuperuser' : '' }}{{ ( ($sectionPermission['permission']!='superuser') && ($sectionPermission['permission']!='admin')) ? ' nonadmin' : '' }}"
|
||||
>
|
||||
|
||||
@foreach ($main_section_permission as $index => $this_permission)
|
||||
@if ($this_permission['display'])
|
||||
|
||||
@php
|
||||
$section_translation = trans('permissions.'.str_slug($this_permission['permission']).'.name');
|
||||
@endphp
|
||||
|
||||
<div class="form-group" style="border-bottom: 1px solid #eee; padding-right: 13px;">
|
||||
<div class="col-md-10">
|
||||
<strong>{{ $section_translation }}</strong>
|
||||
@if (\Lang::has('permissions.'.str_slug($this_permission['permission']).'.note'))
|
||||
<p>{{ trans('permissions.'.str_slug($this_permission['permission']).'.note') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2 text-right">
|
||||
<div class="radio-toggle-wrapper">
|
||||
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ trans('permissions.grant', ['area' => $section_translation]) }}">
|
||||
<input
|
||||
class="form-control allow radiochecker-{{ str_slug($main_section) }}"
|
||||
aria-label="permission[{{ $this_permission['permission'] }}]"
|
||||
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '1')
|
||||
name="permission[{{ $this_permission['permission'] }}]"
|
||||
type="radio"
|
||||
id="{{ str_slug($this_permission['permission']) }}_allow"
|
||||
value="1"
|
||||
>
|
||||
<label for="{{ str_slug($this_permission['permission']) }}_allow" class="allow">
|
||||
<i class="fa-solid fa-square-check"></i>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@if ($use_inherit)
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ trans('permissions.inherit', ['area' => $section_translation]) }}">
|
||||
<input
|
||||
class="form-control inherit radiochecker-{{ str_slug($main_section) }}"
|
||||
aria-label="permission[{{ $this_permission['permission'] }}]"
|
||||
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '0')
|
||||
name="permission[{{ $this_permission['permission'] }}]"
|
||||
type="radio"
|
||||
id="{{ str_slug($this_permission['permission']) }}_inherit"
|
||||
value="0"
|
||||
>
|
||||
<label for="{{ str_slug($this_permission['permission']) }}_inherit" class="inherit">
|
||||
<i class="fa-solid fa-layer-group"></i>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="radio-slider-inputs" data-tooltip="true" title="{{ trans('permissions.deny', ['area' => $section_translation]) }}">
|
||||
<input
|
||||
class="form-control deny radiochecker-{{ str_slug($main_section) }}"
|
||||
aria-label="permission[{{ $this_permission['permission'] }}]"
|
||||
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '-1')
|
||||
name="permission[{{ $this_permission['permission'] }}]"
|
||||
type="radio"
|
||||
value="-1"
|
||||
id="{{ str_slug($this_permission['permission']) }}_deny"
|
||||
>
|
||||
<label for="{{ str_slug($this_permission['permission']) }}_deny">
|
||||
<i class="fa-solid fa-square-xmark"></i>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
||||
@ -721,16 +721,16 @@ $(document).ready(function() {
|
||||
// toggle everything
|
||||
$(".remember-toggle").on("click",function(){
|
||||
var toggleable_callout_id = $(this).attr('id');
|
||||
var toggle_content_id = 'toggle-content-'+$(this).attr('id');
|
||||
var toggle_content_class = 'toggle-content-'+$(this).attr('id');
|
||||
var toggle_arrow = '#toggle-arrow-' + toggleable_callout_id;
|
||||
var toggle_cookie_name='toggle_state_'+toggleable_callout_id;
|
||||
|
||||
console.log('Callout ID: ' + toggleable_callout_id);
|
||||
console.log('Content ID: '+toggle_content_id);
|
||||
console.log('Content ID: '+toggle_content_class);
|
||||
console.log('Arrow ID: '+toggle_arrow);
|
||||
console.log('Cookie Name: '+toggle_cookie_name);
|
||||
|
||||
$('.'+toggle_content_id).fadeToggle(100);
|
||||
$('.'+toggle_content_class).fadeToggle(100);
|
||||
$(toggle_arrow).toggleClass('fa-caret-right fa-caret-down');
|
||||
var toggle_open = $(toggle_arrow).hasClass('fa-caret-down');
|
||||
console.log('Cookie will set open state to: '+toggle_open);
|
||||
@ -766,8 +766,8 @@ $(document).ready(function() {
|
||||
// alert('toggle cookies exist!');
|
||||
// alert(elems);
|
||||
var toggle_selector_name = elems[0].replace(' toggle_state_','');
|
||||
console.log('Browser Cookie Name:'+elems[0]);
|
||||
if (elems[1] != 'true') {
|
||||
// console.log('Browser Cookie Name:'+elems[0]);
|
||||
if (elems[1] == 'true') {
|
||||
console.log('Selector name for cookie click trigger: '+toggle_selector_name);
|
||||
$('#'+toggle_selector_name+'.remember-toggle').trigger('click')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user