Aded documentation module

This commit is contained in:
Mark Gregory
2026-06-12 15:32:09 +01:00
parent a2c68bc4dc
commit 1c9ed1a537
18 changed files with 418 additions and 85 deletions
@@ -44,11 +44,11 @@
@if (($reply_parent_id ?? null) === $comment->id)
<form wire:submit="addReply" class="mt-4 rounded-xl border border-blue-200 bg-blue-50 p-4 dark:border-blue-900 dark:bg-blue-950/40">
<x-helpdesk::html-editor wire:model="replyBody" label="Reply" rows="4" placeholder="Write a reply..." />
<x-helpdesk::html-editor wire:key="reply-editor-{{ $comment->id }}" wire:model="replyBody" label="Reply" rows="4" placeholder="Write a reply..." />
<div class="mt-4 flex justify-end gap-2">
<flux:button type="button" wire:click="cancelReply" variant="ghost">Cancel</flux:button>
<flux:button type="submit" variant="primary">Post reply</flux:button>
<flux:button type="submit" variant="primary" class="!bg-emerald-600 !text-white hover:!bg-emerald-700">Post reply</flux:button>
</div>
</form>
@endif
@@ -0,0 +1,30 @@
@script
<script>
const initialiseHelpdeskSelect2 = function () {
if (!window.jQuery || !window.jQuery.fn || !window.jQuery.fn.select2) {
return;
}
window.jQuery('[data-helpdesk-select2], [data-helpdesk-select]').each(function () {
const element = window.jQuery(this);
if (element.data('select2')) {
return;
}
element.select2({
width: '100%',
theme: 'default'
});
element.on('change', function () {
this.dispatchEvent(new Event('input', { bubbles: true }));
this.dispatchEvent(new Event('change', { bubbles: true }));
});
});
};
initialiseHelpdeskSelect2();
document.addEventListener('livewire:navigated', initialiseHelpdeskSelect2);
</script>
@endscript