Skip to content

Commit

Permalink
Merge pull request #94 from balajidharma/2.x-Changes
Browse files Browse the repository at this point in the history
Added choices js
  • Loading branch information
balajidharma authored Nov 25, 2024
2 parents c9e8ea4 + 153d1f4 commit ba4077c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Grid/Admin/ThreadGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public function columns()
'choices' => $categories,
'empty_value' => __('Select an option'),
'selected' => $model ? optional($model->getCategoriesByType(config('forum.category_name'))->first())->id : null,
'attr' => [
'data-choices' => '1',
],
];
},
],
Expand Down
2 changes: 2 additions & 0 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class AuthServiceProvider extends ServiceProvider
'BalajiDharma\LaravelMenu\Models\Menu' => 'BalajiDharma\LaravelAdminCore\Policies\MenuPolicy',
'BalajiDharma\LaravelMenu\Models\MenuItem' => 'BalajiDharma\LaravelAdminCore\Policies\MenuItemPolicy',
'Plank\Mediable\Media' => 'BalajiDharma\LaravelAdminCore\Policies\MediaPolicy',
'BalajiDharma\LaravelComment\Models\Comment' => 'BalajiDharma\LaravelAdminCore\Policies\CommentPolicy',
'BalajiDharma\LaravelForum\Models\Thread' => 'BalajiDharma\LaravelAdminCore\Policies\ThreadPolicy',
];

/**
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"alpinejs": "^3.4.2",
"autoprefixer": "^10.4.2",
"axios": "^1.6.4",
"choices.js": "^10.2.0",
"daisyui": "^4.0.0",
"laravel-vite-plugin": "^1.0",
"postcss": "^8.4.31",
Expand Down
1 change: 1 addition & 0 deletions resources/css/admin/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@tailwind components;
@tailwind utilities;

@import "choices.js/src/styles/choices";
@import '@yaireo/tagify/dist/tagify.css';

:root {
Expand Down
2 changes: 2 additions & 0 deletions resources/js/admin/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import './bootstrap';

import { themeChange } from 'theme-change';
import Tagify from '@yaireo/tagify';
import Choices from 'choices.js';

themeChange();
window.Tagify = Tagify;
window.Choices = Choices;

var selectedTheme = localStorage.getItem("theme");
if(selectedTheme === 'dark') {
Expand Down

0 comments on commit ba4077c

Please sign in to comment.