feat: Enhance Select2 functionality with clearable options and custom placeholders, and apply new card styling to the order add page.
This commit is contained in:
@@ -78,17 +78,19 @@
|
||||
window.initSelect2 = function() {
|
||||
$(".select2").each(function () {
|
||||
if (!$(this).hasClass('select2-hidden-accessible')) {
|
||||
var placeholder = $(this).data('placeholder') || 'Select an option';
|
||||
$(this).select2({
|
||||
allowClear: false,
|
||||
allowClear: true,
|
||||
width: "100%",
|
||||
placeholder: placeholder,
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
window.initSelect2();
|
||||
});
|
||||
$(document).ready(function () {
|
||||
window.initSelect2();
|
||||
});
|
||||
|
||||
// Global ModalManager initialization
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
@@ -107,8 +109,8 @@
|
||||
|
||||
@stack('custom-scripts')
|
||||
<script type="text/javascript">
|
||||
var apiMedia = '{{ route('api.GetAllImage') }}';
|
||||
var apiUpload = '{{ route('media.upload') }}';
|
||||
var apiMedia = "{{ route('api.GetAllImage') }}";
|
||||
var apiUpload = "{{ route('media.upload') }}";
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user