Skip to content

Commit 033e1c4

Browse files
committed
Merge branch 'main' into summernote-field-fix
2 parents a238ab4 + 17614b8 commit 033e1c4

File tree

7 files changed

+27
-70
lines changed

7 files changed

+27
-70
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"require": {
3838
"laravel/framework": "^10.0",
3939
"prologue/alerts": "^1.0",
40-
"backpack/basset": "^1.0.0",
40+
"backpack/basset": "^1.1.1",
4141
"creativeorange/gravatar": "~1.0",
4242
"doctrine/dbal": "^3.0",
4343
"guzzlehttp/guzzle": "^7.0"

src/BackpackServiceProvider.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Illuminate\Support\Facades\Blade;
1414
use Illuminate\Support\ServiceProvider;
1515
use Illuminate\Support\Str;
16+
use Illuminate\View\Compilers\BladeCompiler;
1617

1718
class BackpackServiceProvider extends ServiceProvider
1819
{
@@ -22,7 +23,6 @@ class BackpackServiceProvider extends ServiceProvider
2223
\Backpack\CRUD\app\Console\Commands\Install::class,
2324
\Backpack\CRUD\app\Console\Commands\AddMenuContent::class,
2425
\Backpack\CRUD\app\Console\Commands\AddCustomRouteContent::class,
25-
\Backpack\CRUD\app\Console\Commands\PublishAssets::class,
2626
\Backpack\CRUD\app\Console\Commands\Version::class,
2727
\Backpack\CRUD\app\Console\Commands\CreateUser::class,
2828
\Backpack\CRUD\app\Console\Commands\PublishBackpackMiddleware::class,
@@ -275,10 +275,13 @@ public function loadConfigs()
275275

276276
// add the backpack_users password broker to the configuration
277277
$laravelAuthPasswordBrokers = app()->config['auth.passwords'];
278+
$laravelFirstPasswordBroker = is_array($laravelAuthPasswordBrokers) && current($laravelAuthPasswordBrokers) ?
279+
current($laravelAuthPasswordBrokers)['table'] :
280+
'';
278281

279282
$backpackPasswordBrokerTable = config('backpack.base.password_resets_table') ??
280283
config('auth.passwords.users.table') ??
281-
current($laravelAuthPasswordBrokers)['table'];
284+
$laravelFirstPasswordBroker;
282285

283286
app()->config['auth.passwords'] = $laravelAuthPasswordBrokers +
284287
[
@@ -302,7 +305,9 @@ public function loadConfigs()
302305

303306
public function loadViewComponents()
304307
{
305-
Blade::componentNamespace('Backpack\\CRUD\\app\\View\\Components', 'backpack');
308+
$this->app->afterResolving(BladeCompiler::class, function () {
309+
Blade::componentNamespace('Backpack\\CRUD\\app\\View\\Components', 'backpack');
310+
});
306311
}
307312

308313
/**

src/app/Console/Commands/Install.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function handle()
9393

9494
// Install Backpack Basset
9595
$this->progressBlock('Installing Basset');
96-
$this->executeArtisanProcess('basset:install --no-interaction');
96+
$this->executeArtisanProcess('basset:install --no-check');
9797
$this->closeProgressBlock();
9898

9999
// Optional commands
@@ -113,6 +113,8 @@ public function handle()
113113
$this->closeProgressBlock();
114114
}
115115

116+
//execute basset checks
117+
$this->call('basset:check');
116118
// Done
117119
$url = Str::of(config('app.url'))->finish('/')->append('admin/');
118120
$this->infoBlock('Backpack installation complete.', 'done');

src/app/Console/Commands/PublishAssets.php

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/config/backpack/ui.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,17 @@
131131
// 'resources/js/app.js',
132132
],
133133

134+
'classes' => [
135+
/**
136+
* Use this as fallback config for themes to pass classes to the table displayed in List Operation
137+
* It defaults to: "table table-striped table-hover nowrap rounded card-table table-vcenter card-table shadow-xs border-xs".
138+
*/
139+
'table' => null,
140+
141+
/**
142+
* Use this as fallback config for themes to pass classes to the table wrapper component displayed in List Operation.
143+
*/
144+
'tableWrapper' => null,
145+
],
146+
134147
];

src/resources/views/crud/fields/color.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
@push('crud_fields_styles')
3939
@bassetBlock('backpack/crud/fields/color.css')
4040
<style>
41-
[bp-field-name="color"] input[type="color"] {
41+
[bp-field-type="color"] input[type="color"] {
4242
background-color: unset;
4343
border: 0;
4444
width: 1.8rem;
4545
height: 1.8rem;
4646
}
47-
[bp-field-name="color"] .input-group-text {
47+
[bp-field-type="color"] .input-group-text {
4848
padding: 0 0.4rem;
4949
}
5050
</style>

src/resources/views/crud/inc/datatables_logic.blade.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -348,16 +348,6 @@ functionsToRunOnDataTablesDrawEvent: [],
348348
localStorage.setItem('DataTables_crudTable_/{{$crud->getRoute()}}_pageLength', len);
349349
});
350350
351-
// make sure AJAX requests include XSRF token
352-
$.ajaxPrefilter(function(options, originalOptions, xhr) {
353-
var token = $('meta[name="csrf_token"]').attr('content');
354-
355-
if (token) {
356-
return xhr.setRequestHeader('X-XSRF-TOKEN', token);
357-
}
358-
});
359-
360-
361351
$('#crudTable').on( 'page.dt', function () {
362352
localStorage.setItem('page_changed', true);
363353
});

0 commit comments

Comments
 (0)