Moved JS and styles into js and css files

This commit is contained in:
snipe
2025-10-23 13:24:26 +01:00
parent 891bec9cdb
commit 8f4a1f5801
13 changed files with 359 additions and 175 deletions

View File

@@ -1537,6 +1537,56 @@ This just hides the padding on the right side of the mark tag for a less weird v
mark {
padding-right: 0px;
}
/**
Radio toggle styles for permission settings and check/uncheck all
*/
.radio-toggle-wrapper {
display: flex;
padding: 2px;
background-color: #e9e9e9;
margin-bottom: 3px;
border-radius: 4px;
border: 1px #d6d6d6 solid;
}
.radio-slider-inputs {
flex-grow: 1;
}
.radio-slider-inputs input[type=radio] {
display: none;
}
.radio-slider-inputs label {
display: block;
margin-bottom: 0px;
padding: 6px 8px;
color: #fff;
font-weight: bold;
text-align: center;
transition: all 0.4s 0s ease;
cursor: pointer;
}
.radio-slider-inputs label {
color: #9a9999;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .allow:checked + label {
background-color: green;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .inherit:checked + label {
background-color: rgba(255, 204, 51, 0.11);
color: #9a9999;
border-radius: 4px;
border: 1px white solid;
}
.radio-slider-inputs .deny:checked + label {
background-color: #a94442;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
/*# sourceMappingURL=app.css.map*/

File diff suppressed because one or more lines are too long

View File

@@ -1161,6 +1161,56 @@ This just hides the padding on the right side of the mark tag for a less weird v
mark {
padding-right: 0px;
}
/**
Radio toggle styles for permission settings and check/uncheck all
*/
.radio-toggle-wrapper {
display: flex;
padding: 2px;
background-color: #e9e9e9;
margin-bottom: 3px;
border-radius: 4px;
border: 1px #d6d6d6 solid;
}
.radio-slider-inputs {
flex-grow: 1;
}
.radio-slider-inputs input[type=radio] {
display: none;
}
.radio-slider-inputs label {
display: block;
margin-bottom: 0px;
padding: 6px 8px;
color: #fff;
font-weight: bold;
text-align: center;
transition: all 0.4s 0s ease;
cursor: pointer;
}
.radio-slider-inputs label {
color: #9a9999;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .allow:checked + label {
background-color: green;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .inherit:checked + label {
background-color: rgba(255, 204, 51, 0.11);
color: #9a9999;
border-radius: 4px;
border: 1px white solid;
}
.radio-slider-inputs .deny:checked + label {
background-color: #a94442;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
/*# sourceMappingURL=overrides.css.map*/

File diff suppressed because one or more lines are too long

View File

@@ -22873,6 +22873,56 @@ This just hides the padding on the right side of the mark tag for a less weird v
mark {
padding-right: 0px;
}
/**
Radio toggle styles for permission settings and check/uncheck all
*/
.radio-toggle-wrapper {
display: flex;
padding: 2px;
background-color: #e9e9e9;
margin-bottom: 3px;
border-radius: 4px;
border: 1px #d6d6d6 solid;
}
.radio-slider-inputs {
flex-grow: 1;
}
.radio-slider-inputs input[type=radio] {
display: none;
}
.radio-slider-inputs label {
display: block;
margin-bottom: 0px;
padding: 6px 8px;
color: #fff;
font-weight: bold;
text-align: center;
transition: all 0.4s 0s ease;
cursor: pointer;
}
.radio-slider-inputs label {
color: #9a9999;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .allow:checked + label {
background-color: green;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .inherit:checked + label {
background-color: rgba(255, 204, 51, 0.11);
color: #9a9999;
border-radius: 4px;
border: 1px white solid;
}
.radio-slider-inputs .deny:checked + label {
background-color: #a94442;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
/*# sourceMappingURL=app.css.map*/
@@ -24521,6 +24571,56 @@ This just hides the padding on the right side of the mark tag for a less weird v
mark {
padding-right: 0px;
}
/**
Radio toggle styles for permission settings and check/uncheck all
*/
.radio-toggle-wrapper {
display: flex;
padding: 2px;
background-color: #e9e9e9;
margin-bottom: 3px;
border-radius: 4px;
border: 1px #d6d6d6 solid;
}
.radio-slider-inputs {
flex-grow: 1;
}
.radio-slider-inputs input[type=radio] {
display: none;
}
.radio-slider-inputs label {
display: block;
margin-bottom: 0px;
padding: 6px 8px;
color: #fff;
font-weight: bold;
text-align: center;
transition: all 0.4s 0s ease;
cursor: pointer;
}
.radio-slider-inputs label {
color: #9a9999;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .allow:checked + label {
background-color: green;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .inherit:checked + label {
background-color: rgba(255, 204, 51, 0.11);
color: #9a9999;
border-radius: 4px;
border: 1px white solid;
}
.radio-slider-inputs .deny:checked + label {
background-color: #a94442;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
/*# sourceMappingURL=overrides.css.map*/

42
public/js/dist/all.js vendored
View File

@@ -52789,6 +52789,48 @@ function htmlEntities(str) {
};
})(jQuery);
/**
* This handles the show/hide of superuser and admin specific permissions
* on the group edit and user edit pages
*/
if ($("#superuser_allow").is(':checked')) {
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonsuperuser").hide();
$(".nonsuperuser").attr('display', 'none');
}
$(".superuser").change(function () {
if ($(this).val() == '1') {
$(".nonsuperuser").fadeOut();
$(".nonsuperuser").attr('display', 'none');
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display', 'none');
} else if ($(this).val() != '1') {
$(".nonsuperuser").fadeIn();
$(".nonsuperuser").attr('display', 'block');
}
});
if ($("#admin_allow").is(':checked')) {
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonadmin").hide();
$(".nonadmin").attr('display', 'none');
}
$(".admin").change(function () {
if ($(this).val() == '1') {
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display', 'none');
} else if ($(this).val() != '1') {
$(".nonadmin").fadeIn();
$(".nonadmin").attr('display', 'block');
}
});
// Check/Uncheck all radio buttons in the permissions group
$('.header-row input:radio').change(function () {
value = $(this).attr('value');
area = $(this).data('checker-group');
$('.radiochecker-' + area + '[value=' + value + ']').prop('checked', true);
});
/**
* Universal Livewire Select2 integration
*

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,9 @@
{
"/js/dist/all.js": "/js/dist/all.js?id=76d88f0f91b852f7eecbce357ab5858b",
"/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=465a8ea1975b39e936cb715033786882",
"/css/build/app.css": "/css/build/app.css?id=507ff83b5b8e3a9f8ac636f8e6237111",
"/css/build/overrides.css": "/css/build/overrides.css?id=9a7af068f65f26e40354018cb3045fb1",
"/css/build/app.css": "/css/build/app.css?id=65522446562845e17f274a3e596fdd9c",
"/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=bd048a75bb06ef72d1cac7c19f0ef8a6",
"/css/dist/all.css": "/css/dist/all.css?id=8c4e5a47765e94f5897fbbfab2dde17d",
"/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",

View File

@@ -579,6 +579,58 @@ function htmlEntities(str) {
})(jQuery);
/**
* This handles the show/hide of superuser and admin specific permissions
* on the group edit and user edit pages
*/
if ($("#superuser_allow").is(':checked')) {
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonsuperuser").hide();
$(".nonsuperuser").attr('display','none');
}
$(".superuser").change(function() {
if ($(this).val() == '1') {
$(".nonsuperuser").fadeOut();
$(".nonsuperuser").attr('display','none');
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display','none');
} else if ($(this).val() != '1') {
$(".nonsuperuser").fadeIn();
$(".nonsuperuser").attr('display','block');
}
});
if ($("#admin_allow").is(':checked')) {
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonadmin").hide();
$(".nonadmin").attr('display','none');
}
$(".admin").change(function() {
if ($(this).val() == '1') {
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display','none');
} else if ($(this).val() != '1') {
$(".nonadmin").fadeIn();
$(".nonadmin").attr('display','block');
}
});
// Check/Uncheck all radio buttons in the permissions group
$('.header-row input:radio').change(function() {
value = $(this).attr('value');
area = $(this).data('checker-group');
$('.radiochecker-'+area+'[value='+value+']').prop('checked', true);
});
/**
* Universal Livewire Select2 integration
*

View File

@@ -1301,4 +1301,62 @@ This just hides the padding on the right side of the mark tag for a less weird v
*/
mark {
padding-right: 0px;
}
/**
Radio toggle styles for permission settings and check/uncheck all
*/
.radio-toggle-wrapper {
display: flex;
padding: 2px;
background-color: #e9e9e9;
margin-bottom: 3px;
border-radius: 4px;
border: 1px #d6d6d6 solid;
}
.radio-slider-inputs {
flex-grow: 1;
}
.radio-slider-inputs input[type=radio] {
display: none;
}
.radio-slider-inputs label {
display: block;
margin-bottom: 0px;
padding: 6px 8px;
color: #fff;
font-weight: bold;
text-align: center;
transition : all .4s 0s ease;
cursor: pointer;
}
.radio-slider-inputs label {
color: #9a9999;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .allow:checked + label {
background-color: green;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .inherit:checked + label {
background-color: rgba(255, 204, 51, 0.11);
color: #9a9999;
border-radius: 4px;
border: 1px white solid;
}
.radio-slider-inputs .deny:checked + label {
background-color: #a94442;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}

View File

@@ -78,64 +78,3 @@
</div>
@stop
@section('moar_scripts')
<script nonce="{{ csrf_token() }}">
$(document).ready(function(){
if ($("#superuser_allow").is(':checked')) {
// alert('superuser is checked on page load');
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonsuperuser").hide();
$(".nonsuperuser").attr('display','none');
}
$(".superuser").change(function() {
if ($(this).val() == '1') {
$(".nonsuperuser").fadeOut();
$(".nonsuperuser").attr('display','none');
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display','none');
} else if ($(this).val() == '0') {
$(".nonsuperuser").fadeIn();
$(".nonsuperuser").attr('display','block');
}
});
if ($("#admin_allow").is(':checked')) {
// alert('admin is checked on page load');
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonadmin").hide();
$(".nonadmin").attr('display','none');
}
$(".admin").change(function() {
if ($(this).val() == '1') {
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display','none');
} else if ($(this).val() == '0') {
$(".nonadmin").fadeIn();
$(".nonadmin").attr('display','block');
}
});
// Check/Uncheck all radio buttons in the group
$('.header-row input:radio').change(function() {
value = $(this).attr('value');
area = $(this).data('checker-group');
$('.radiochecker-'+area+'[value='+value+']').prop('checked', true);
});
});
</script>
@stop

View File

@@ -1,62 +1,3 @@
<style>
.radio-toggle-wrapper {
display: flex;
padding: 2px;
background-color: #e9e9e9;
margin-bottom: 3px;
border-radius: 4px;
border: 1px #d6d6d6 solid;
}
.radio-slider-inputs {
flex-grow: 1;
}
.radio-slider-inputs input[type=radio] {
display: none;
}
.radio-slider-inputs label {
display: block;
margin-bottom: 0px;
padding: 6px 8px;
color: #fff;
font-weight: bold;
text-align: center;
transition : all .4s 0s ease;
cursor: pointer;
}
.radio-slider-inputs label {
color: #9a9999;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .allow:checked + label {
background-color: green;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .inherit:checked + label {
background-color: rgba(255, 204, 51, 0.11);
color: #9a9999;
border-radius: 4px;
border: 1px #d6d6d6 solid;
}
.radio-slider-inputs .deny:checked + label {
background-color: #a94442;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
</style>
@foreach ($permissions as $area => $area_permission)
<!-- handle superadmin and reports, and anything else with only one option -->

View File

@@ -765,54 +765,6 @@ $(document).ready(function() {
});
});
if ($("#superuser_allow").is(':checked')) {
// alert('superuser is checked on page load');
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonsuperuser").hide();
$(".nonsuperuser").attr('display','none');
}
$(".superuser").change(function() {
if ($(this).val() == '1') {
$(".nonsuperuser").fadeOut();
$(".nonsuperuser").attr('display','none');
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display','none');
} else if ($(this).val() != '1') {
$(".nonsuperuser").fadeIn();
$(".nonsuperuser").attr('display','block');
}
});
if ($("#admin_allow").is(':checked')) {
// alert('admin is checked on page load');
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonadmin").hide();
$(".nonadmin").attr('display','none');
}
$(".admin").change(function() {
if ($(this).val() == '1') {
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display','none');
} else if ($(this).val() != '1') {
$(".nonadmin").fadeIn();
$(".nonadmin").attr('display','block');
}
});
// Check/Uncheck all radio buttons in the group
$('.header-row input:radio').change(function() {
value = $(this).attr('value');
area = $(this).data('checker-group');
$('.radiochecker-'+area+'[value='+value+']').prop('checked', true);
});