diff --git a/app/Http/Controllers/BulkAssetModelsController.php b/app/Http/Controllers/BulkAssetModelsController.php index 43381da783..a312ba1f6e 100644 --- a/app/Http/Controllers/BulkAssetModelsController.php +++ b/app/Http/Controllers/BulkAssetModelsController.php @@ -92,7 +92,7 @@ class BulkAssetModelsController extends Controller AssetModel::whereIn('id', $models_raw_array)->update($update_array); return redirect()->route('models.index') - ->with('success', trans('admin/models/message.bulkedit.success')); + ->with('success', trans_choice('admin/models/message.bulkedit.success', count($models_raw_array), ['model_count' => count($models_raw_array)])); } return redirect()->route('models.index') diff --git a/package.json b/package.json index 442513a9f9..f6cc53307f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "chart.js": "^2.9.4", "css-loader": "^4.0.0", "ekko-lightbox": "^5.1.1", - "icheck": "^1.0.2", "imagemin": "^8.0.1", "jquery-form-validator": "^2.3.79", "jquery-slimscroll": "^1.3.8", diff --git a/public/css/build/app.css b/public/css/build/app.css index b67a5f6a1c..558970fa05 100644 --- a/public/css/build/app.css +++ b/public/css/build/app.css @@ -950,9 +950,6 @@ th.css-accessory > .th-inner::before { .select2-container--default .select2-selection--multiple { border-radius: 0px; } -.bs-checkbox input { - zoom: 1.5; -} @media screen and (max-width: 511px) { .sidebar-menu { margin-top: 160px; @@ -973,4 +970,135 @@ th.css-accessory > .th-inner::before { white-space: nowrap; text-overflow: ellipsis; } +/** Form-stuff overrides for checkboxes and stuff **/ +label.form-control { + display: grid; + grid-template-columns: 1.8em auto; + gap: 0.5em; + border: 0px; + padding-left: 0px; + background-color: inherit; + color: inherit; + font-size: inherit; + font-weight: inherit; +} +label.form-control--disabled { + color: #959495; + pointer-events: none; + cursor: not-allowed; +} +/** --------------------------------------- **/ +/** Start checkbox styles to replace iCheck **/ +/** --------------------------------------- **/ +input[type="checkbox"] { + /* Add if not using autoprefixer */ + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + /* For iOS < 15 to remove gradient background */ + background-color: #fff; + /* Not removed via appearance */ + margin: 0; + font: inherit; + color: #959495; + width: 1.8em; + height: 1.8em; + border: 0.05em solid; + border-radius: 0em; + transform: translateY(-0.075em); + display: grid; + place-content: center; + /*Windows High Contrast Mode*/ +} +/** This sets the display of a checkbox, and what the "fill" checkmark should look like */ +input[type="checkbox"]::before { + /** If you want to use the non-checkbox, filled square, use this instead **/ + box-shadow: inset 1em 1em #d3d3d3; + content: ""; + width: 1em; + height: 1em; + -webkit-clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); + clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); + transform: scale(0); + transform-origin: bottom left; + transition: 120ms transform ease-in-out; + box-shadow: inset 1em 1em #428bca; + /* Windows High Contrast Mode */ + background-color: CanvasText; +} +/** This sets the size of the scale up for the shape we defined above **/ +input[type="checkbox"]:checked::before { + transform: scale(1); +} +/** This sets the scale and color of the DISABLED but CHECKED checkbox */ +input[type=checkbox]:disabled::before, +input[type=radio]:disabled::before { + content: ""; + width: 1em; + height: 1em; + transform: scale(1); + box-shadow: inset 1em 1em #d3d3d3; +} +/* This sets the scale and style of a DISABLED checkbox that is NOT checked */ +input[type=checkbox]:disabled:not(:checked)::before, +input[type=radio]:disabled:not(:checked)::before { + content: ""; + transform: scale(0); + cursor: not-allowed; + pointer-events: none; +} +/** this is the color of the checkbox and content on a disabled, checked box **/ +input[type=checkbox]:disabled, +input[type=radio]:disabled { + --form-control-color: #d3d3d3; + color: #959495; + cursor: not-allowed; + pointer-events: none; +} +/** Radio styles to replace iCheck **/ +input[type="radio"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + margin: 0; + font: inherit; + color: #959495; + width: 1.8em; + height: 1.8em; + border: 0.05em solid; + border-radius: 50%; + transform: translateY(-0.075em); + display: grid; + place-content: center; +} +input[type="radio"]::before { + content: ""; + width: 1em; + height: 1em; + border-radius: 50%; + transform: scale(0); + transition: 120ms transform ease-in-out; + box-shadow: inset 1em 1em #428bca; +} +input[type="radio"]:checked::before { + transform: scale(1); +} +/** +* This addresses the column selector in bootstrap-table. Without these two lines, the +* checkbox and the with the label text that BS tables generates will +* end up on two different lines and it looks assy. + */ +.dropdown-item-marker input[type=checkbox] { + font-size: 10px; +} +.bootstrap-table .fixed-table-toolbar li.dropdown-item-marker label { + font-weight: normal; + display: grid; + grid-template-columns: 0.1em auto; + gap: 1.5em; +} +/** --------------------------------------- **/ +/** End checkbox styles to replace iCheck **/ +/** --------------------------------------- **/ diff --git a/public/css/build/overrides.css b/public/css/build/overrides.css index 7d0450d520..37ec7d15c3 100644 --- a/public/css/build/overrides.css +++ b/public/css/build/overrides.css @@ -583,9 +583,6 @@ th.css-accessory > .th-inner::before { .select2-container--default .select2-selection--multiple { border-radius: 0px; } -.bs-checkbox input { - zoom: 1.5; -} @media screen and (max-width: 511px) { .sidebar-menu { margin-top: 160px; @@ -606,4 +603,135 @@ th.css-accessory > .th-inner::before { white-space: nowrap; text-overflow: ellipsis; } +/** Form-stuff overrides for checkboxes and stuff **/ +label.form-control { + display: grid; + grid-template-columns: 1.8em auto; + gap: 0.5em; + border: 0px; + padding-left: 0px; + background-color: inherit; + color: inherit; + font-size: inherit; + font-weight: inherit; +} +label.form-control--disabled { + color: #959495; + pointer-events: none; + cursor: not-allowed; +} +/** --------------------------------------- **/ +/** Start checkbox styles to replace iCheck **/ +/** --------------------------------------- **/ +input[type="checkbox"] { + /* Add if not using autoprefixer */ + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + /* For iOS < 15 to remove gradient background */ + background-color: #fff; + /* Not removed via appearance */ + margin: 0; + font: inherit; + color: #959495; + width: 1.8em; + height: 1.8em; + border: 0.05em solid; + border-radius: 0em; + transform: translateY(-0.075em); + display: grid; + place-content: center; + /*Windows High Contrast Mode*/ +} +/** This sets the display of a checkbox, and what the "fill" checkmark should look like */ +input[type="checkbox"]::before { + /** If you want to use the non-checkbox, filled square, use this instead **/ + box-shadow: inset 1em 1em #d3d3d3; + content: ""; + width: 1em; + height: 1em; + -webkit-clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); + clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); + transform: scale(0); + transform-origin: bottom left; + transition: 120ms transform ease-in-out; + box-shadow: inset 1em 1em #428bca; + /* Windows High Contrast Mode */ + background-color: CanvasText; +} +/** This sets the size of the scale up for the shape we defined above **/ +input[type="checkbox"]:checked::before { + transform: scale(1); +} +/** This sets the scale and color of the DISABLED but CHECKED checkbox */ +input[type=checkbox]:disabled::before, +input[type=radio]:disabled::before { + content: ""; + width: 1em; + height: 1em; + transform: scale(1); + box-shadow: inset 1em 1em #d3d3d3; +} +/* This sets the scale and style of a DISABLED checkbox that is NOT checked */ +input[type=checkbox]:disabled:not(:checked)::before, +input[type=radio]:disabled:not(:checked)::before { + content: ""; + transform: scale(0); + cursor: not-allowed; + pointer-events: none; +} +/** this is the color of the checkbox and content on a disabled, checked box **/ +input[type=checkbox]:disabled, +input[type=radio]:disabled { + --form-control-color: #d3d3d3; + color: #959495; + cursor: not-allowed; + pointer-events: none; +} +/** Radio styles to replace iCheck **/ +input[type="radio"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + margin: 0; + font: inherit; + color: #959495; + width: 1.8em; + height: 1.8em; + border: 0.05em solid; + border-radius: 50%; + transform: translateY(-0.075em); + display: grid; + place-content: center; +} +input[type="radio"]::before { + content: ""; + width: 1em; + height: 1em; + border-radius: 50%; + transform: scale(0); + transition: 120ms transform ease-in-out; + box-shadow: inset 1em 1em #428bca; +} +input[type="radio"]:checked::before { + transform: scale(1); +} +/** +* This addresses the column selector in bootstrap-table. Without these two lines, the +* checkbox and the with the label text that BS tables generates will +* end up on two different lines and it looks assy. + */ +.dropdown-item-marker input[type=checkbox] { + font-size: 10px; +} +.bootstrap-table .fixed-table-toolbar li.dropdown-item-marker label { + font-weight: normal; + display: grid; + grid-template-columns: 0.1em auto; + gap: 1.5em; +} +/** --------------------------------------- **/ +/** End checkbox styles to replace iCheck **/ +/** --------------------------------------- **/ diff --git a/public/css/dist/all.css b/public/css/dist/all.css index f1f0b46d30..5839a9a35d 100644 --- a/public/css/dist/all.css +++ b/public/css/dist/all.css @@ -21545,127 +21545,6 @@ a.ui-button:active, box-shadow: 0px 0px 5px #666666; } -/* iCheck plugin Minimal skin, blue ------------------------------------ */ -.icheckbox_minimal-blue, -.iradio_minimal-blue { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(blue.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-blue { - background-position: 0 0; -} - .icheckbox_minimal-blue.hover { - background-position: -20px 0; - } - .icheckbox_minimal-blue.checked { - background-position: -40px 0; - } - .icheckbox_minimal-blue.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-blue.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-blue { - background-position: -100px 0; -} - .iradio_minimal-blue.hover { - background-position: -120px 0; - } - .iradio_minimal-blue.checked { - background-position: -140px 0; - } - .iradio_minimal-blue.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-blue.checked.disabled { - background-position: -180px 0; - } - -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), - only screen and (-moz-min-device-pixel-ratio: 1.5), - only screen and (-o-min-device-pixel-ratio: 3/2), - only screen and (min-device-pixel-ratio: 1.5) { - .icheckbox_minimal-blue, - .iradio_minimal-blue { - background-image: url(blue@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} -/* iCheck plugin Minimal skin, black ------------------------------------ */ -.icheckbox_minimal, -.iradio_minimal { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(minimal.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal { - background-position: 0 0; -} - .icheckbox_minimal.hover { - background-position: -20px 0; - } - .icheckbox_minimal.checked { - background-position: -40px 0; - } - .icheckbox_minimal.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal { - background-position: -100px 0; -} - .iradio_minimal.hover { - background-position: -120px 0; - } - .iradio_minimal.checked { - background-position: -140px 0; - } - .iradio_minimal.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal, - .iradio_minimal { - background-image: url(minimal@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} /*! * Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker) * @@ -23830,9 +23709,6 @@ th.css-accessory > .th-inner::before { .select2-container--default .select2-selection--multiple { border-radius: 0px; } -.bs-checkbox input { - zoom: 1.5; -} @media screen and (max-width: 511px) { .sidebar-menu { margin-top: 160px; @@ -23853,6 +23729,137 @@ th.css-accessory > .th-inner::before { white-space: nowrap; text-overflow: ellipsis; } +/** Form-stuff overrides for checkboxes and stuff **/ +label.form-control { + display: grid; + grid-template-columns: 1.8em auto; + gap: 0.5em; + border: 0px; + padding-left: 0px; + background-color: inherit; + color: inherit; + font-size: inherit; + font-weight: inherit; +} +label.form-control--disabled { + color: #959495; + pointer-events: none; + cursor: not-allowed; +} +/** --------------------------------------- **/ +/** Start checkbox styles to replace iCheck **/ +/** --------------------------------------- **/ +input[type="checkbox"] { + /* Add if not using autoprefixer */ + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + /* For iOS < 15 to remove gradient background */ + background-color: #fff; + /* Not removed via appearance */ + margin: 0; + font: inherit; + color: #959495; + width: 1.8em; + height: 1.8em; + border: 0.05em solid; + border-radius: 0em; + transform: translateY(-0.075em); + display: grid; + place-content: center; + /*Windows High Contrast Mode*/ +} +/** This sets the display of a checkbox, and what the "fill" checkmark should look like */ +input[type="checkbox"]::before { + /** If you want to use the non-checkbox, filled square, use this instead **/ + box-shadow: inset 1em 1em #d3d3d3; + content: ""; + width: 1em; + height: 1em; + -webkit-clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); + clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); + transform: scale(0); + transform-origin: bottom left; + transition: 120ms transform ease-in-out; + box-shadow: inset 1em 1em #428bca; + /* Windows High Contrast Mode */ + background-color: CanvasText; +} +/** This sets the size of the scale up for the shape we defined above **/ +input[type="checkbox"]:checked::before { + transform: scale(1); +} +/** This sets the scale and color of the DISABLED but CHECKED checkbox */ +input[type=checkbox]:disabled::before, +input[type=radio]:disabled::before { + content: ""; + width: 1em; + height: 1em; + transform: scale(1); + box-shadow: inset 1em 1em #d3d3d3; +} +/* This sets the scale and style of a DISABLED checkbox that is NOT checked */ +input[type=checkbox]:disabled:not(:checked)::before, +input[type=radio]:disabled:not(:checked)::before { + content: ""; + transform: scale(0); + cursor: not-allowed; + pointer-events: none; +} +/** this is the color of the checkbox and content on a disabled, checked box **/ +input[type=checkbox]:disabled, +input[type=radio]:disabled { + --form-control-color: #d3d3d3; + color: #959495; + cursor: not-allowed; + pointer-events: none; +} +/** Radio styles to replace iCheck **/ +input[type="radio"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + margin: 0; + font: inherit; + color: #959495; + width: 1.8em; + height: 1.8em; + border: 0.05em solid; + border-radius: 50%; + transform: translateY(-0.075em); + display: grid; + place-content: center; +} +input[type="radio"]::before { + content: ""; + width: 1em; + height: 1em; + border-radius: 50%; + transform: scale(0); + transition: 120ms transform ease-in-out; + box-shadow: inset 1em 1em #428bca; +} +input[type="radio"]:checked::before { + transform: scale(1); +} +/** +* This addresses the column selector in bootstrap-table. Without these two lines, the +* checkbox and the with the label text that BS tables generates will +* end up on two different lines and it looks assy. + */ +.dropdown-item-marker input[type=checkbox] { + font-size: 10px; +} +.bootstrap-table .fixed-table-toolbar li.dropdown-item-marker label { + font-weight: normal; + display: grid; + grid-template-columns: 0.1em auto; + gap: 1.5em; +} +/** --------------------------------------- **/ +/** End checkbox styles to replace iCheck **/ +/** --------------------------------------- **/ .select2-container { @@ -24922,9 +24929,6 @@ th.css-accessory > .th-inner::before { .select2-container--default .select2-selection--multiple { border-radius: 0px; } -.bs-checkbox input { - zoom: 1.5; -} @media screen and (max-width: 511px) { .sidebar-menu { margin-top: 160px; @@ -24945,4 +24949,135 @@ th.css-accessory > .th-inner::before { white-space: nowrap; text-overflow: ellipsis; } +/** Form-stuff overrides for checkboxes and stuff **/ +label.form-control { + display: grid; + grid-template-columns: 1.8em auto; + gap: 0.5em; + border: 0px; + padding-left: 0px; + background-color: inherit; + color: inherit; + font-size: inherit; + font-weight: inherit; +} +label.form-control--disabled { + color: #959495; + pointer-events: none; + cursor: not-allowed; +} +/** --------------------------------------- **/ +/** Start checkbox styles to replace iCheck **/ +/** --------------------------------------- **/ +input[type="checkbox"] { + /* Add if not using autoprefixer */ + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + /* For iOS < 15 to remove gradient background */ + background-color: #fff; + /* Not removed via appearance */ + margin: 0; + font: inherit; + color: #959495; + width: 1.8em; + height: 1.8em; + border: 0.05em solid; + border-radius: 0em; + transform: translateY(-0.075em); + display: grid; + place-content: center; + /*Windows High Contrast Mode*/ +} +/** This sets the display of a checkbox, and what the "fill" checkmark should look like */ +input[type="checkbox"]::before { + /** If you want to use the non-checkbox, filled square, use this instead **/ + box-shadow: inset 1em 1em #d3d3d3; + content: ""; + width: 1em; + height: 1em; + -webkit-clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); + clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); + transform: scale(0); + transform-origin: bottom left; + transition: 120ms transform ease-in-out; + box-shadow: inset 1em 1em #428bca; + /* Windows High Contrast Mode */ + background-color: CanvasText; +} +/** This sets the size of the scale up for the shape we defined above **/ +input[type="checkbox"]:checked::before { + transform: scale(1); +} +/** This sets the scale and color of the DISABLED but CHECKED checkbox */ +input[type=checkbox]:disabled::before, +input[type=radio]:disabled::before { + content: ""; + width: 1em; + height: 1em; + transform: scale(1); + box-shadow: inset 1em 1em #d3d3d3; +} +/* This sets the scale and style of a DISABLED checkbox that is NOT checked */ +input[type=checkbox]:disabled:not(:checked)::before, +input[type=radio]:disabled:not(:checked)::before { + content: ""; + transform: scale(0); + cursor: not-allowed; + pointer-events: none; +} +/** this is the color of the checkbox and content on a disabled, checked box **/ +input[type=checkbox]:disabled, +input[type=radio]:disabled { + --form-control-color: #d3d3d3; + color: #959495; + cursor: not-allowed; + pointer-events: none; +} +/** Radio styles to replace iCheck **/ +input[type="radio"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #fff; + margin: 0; + font: inherit; + color: #959495; + width: 1.8em; + height: 1.8em; + border: 0.05em solid; + border-radius: 50%; + transform: translateY(-0.075em); + display: grid; + place-content: center; +} +input[type="radio"]::before { + content: ""; + width: 1em; + height: 1em; + border-radius: 50%; + transform: scale(0); + transition: 120ms transform ease-in-out; + box-shadow: inset 1em 1em #428bca; +} +input[type="radio"]:checked::before { + transform: scale(1); +} +/** +* This addresses the column selector in bootstrap-table. Without these two lines, the +* checkbox and the with the label text that BS tables generates will +* end up on two different lines and it looks assy. + */ +.dropdown-item-marker input[type=checkbox] { + font-size: 10px; +} +.bootstrap-table .fixed-table-toolbar li.dropdown-item-marker label { + font-weight: normal; + display: grid; + grid-template-columns: 0.1em auto; + gap: 1.5em; +} +/** --------------------------------------- **/ +/** End checkbox styles to replace iCheck **/ +/** --------------------------------------- **/ diff --git a/public/js/build/app.js b/public/js/build/app.js index 3c65e5fa81..000ab0bf37 100644 --- a/public/js/build/app.js +++ b/public/js/build/app.js @@ -1049,14 +1049,6 @@ $(document).ready(function () { } }); /* - * iCheck checkbox plugin - */ - - $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({ - checkboxClass: 'icheckbox_minimal-blue', - radioClass: 'iradio_minimal-blue' - }); - /* * Select2 */ @@ -1431,26 +1423,14 @@ function htmlEntities(str) { }; })(jQuery); /** - * Universal Livewire Select2 and iCheck integration + * Universal Livewire Select2 integration * * How to use: * - * 1. Set the class of your select2 elements to 'livewire-select2' and your icheck elements to 'livewire-icheck' (as appropriate). - * (For iCheck, you may still need to apply the other iCheck classes like 'minimal' or 'iCheck') + * 1. Set the class of your select2 elements to 'livewire-select2'). * 2. Name your element to match a property in your Livewire component * 3. Add an attribute called 'data-livewire-component' that points to $_instance->id (via `{{ }}` if you're in a blade, * or just $_instance->id if not). - * 4. For iCheck, you need to wrap the 'checkbox' element with wire:ignore - perhaps in the