Skip to content

Commit

Permalink
Move images to root assets folder (#7109)
Browse files Browse the repository at this point in the history
* Move images to root assets folder

* Remove unused files

* modify upgrade note
  • Loading branch information
jordisala1991 authored Apr 28, 2021
1 parent 373004a commit 50d4fef
Show file tree
Hide file tree
Showing 245 changed files with 400 additions and 484 deletions.
2 changes: 1 addition & 1 deletion UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ From these dependencies, only the necessary files are exposed publicly through W

The jQuery UI dependency was fully included before, but now we only include the sortable widget (JavaScript and CSS), the rest of this dependency is not exposed. If you are adding more JavaScript or CSS using another widget of jQuery UI please include it yourself.

Please check the `src/Resources/public/dist` and the documentation to see the used CSS, JavaScript, images and fonts.
Please check the `src/Resources/public` and the documentation to see the used CSS, JavaScript, images and fonts.

If you are customising (specially removing standard JavaScript or CSS) assets, this will affect you.

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
11 changes: 3 additions & 8 deletions docs/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Full Configuration Options
- OWNER
acl_user_manager: null
title: 'Sonata Admin'
title_logo: bundles/sonataadmin/logo_title.png
title_logo: bundles/sonataadmin/images/logo_title.png
search: true
default_controller: 'sonata.admin.controller.crud'
options:
Expand Down Expand Up @@ -179,7 +179,7 @@ Full Configuration Options
stylesheets:
# The default stylesheet list:
- bundles/sonataadmin/dist/app.css
- bundles/sonataadmin/app.css
# stylesheet paths to add to the page in addition to the list above
extra_stylesheets: []
Expand All @@ -190,12 +190,7 @@ Full Configuration Options
javascripts:
# The default javascript list:
- bundles/sonataadmin/dist/app.js
- bundles/sonataadmin/Admin.js
- bundles/sonataadmin/jquery.confirmExit.js
- bundles/sonataadmin/treeview.js
- bundles/sonataadmin/sidebar.js
- bundles/sonataadmin/base.js
- bundles/sonataadmin/app.js
# javascript paths to add to the page in addition to the list above
extra_javascripts: []
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
"build": "encore production"
},
"resolutions": {
"admin-lte/jquery": "^2.2",
"jquery-form/jquery": "^2.2",
"readmore-js/jquery": "^2.2"
"jquery": "^2.2"
},
"browserslist": [
"defaults"
Expand Down
8 changes: 4 additions & 4 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()

->scalarNode('title')->defaultValue('Sonata Admin')->cannotBeEmpty()->end()
->scalarNode('title_logo')->defaultValue('bundles/sonataadmin/logo_title.png')->cannotBeEmpty()->end()
->scalarNode('title_logo')->defaultValue('bundles/sonataadmin/images/logo_title.png')->cannotBeEmpty()->end()
->booleanNode('search')->defaultTrue()->info('Enable/disable the search form in the sidebar')->end()

->arrayNode('global_search')
Expand Down Expand Up @@ -180,7 +180,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->info('Enable locking when editing an object, if the corresponding object manager supports it.')
->end()
->scalarNode('mosaic_background')
->defaultValue('bundles/sonataadmin/default_mosaic_image.png')
->defaultValue('bundles/sonataadmin/images/default_mosaic_image.png')
->info('Background used in mosaic view')
->end()
->end()
Expand Down Expand Up @@ -388,7 +388,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->children()
->arrayNode('stylesheets')
->defaultValue([
'bundles/sonataadmin/dist/app.css',
'bundles/sonataadmin/app.css',
])
->prototype('scalar')->end()
->end()
Expand All @@ -404,7 +404,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->arrayNode('javascripts')
->defaultValue([
'bundles/sonataadmin/dist/app.js',
'bundles/sonataadmin/app.js',
])
->prototype('scalar')->end()
->end()
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/SonataAdminExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public function getNamespace(): string
private function buildStylesheets(array $config): array
{
$config['assets']['stylesheets'][] = sprintf(
'bundles/sonataadmin/dist/admin-lte-skins/%s.min.css',
'bundles/sonataadmin/admin-lte-skins/%s.min.css',
$config['options']['skin']
);

Expand Down
2 changes: 1 addition & 1 deletion src/Object/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class Metadata implements MetadataInterface
/**
* @var string
*/
public const DEFAULT_MOSAIC_BACKGROUND = 'bundles/sonataadmin/default_mosaic_image.png';
public const DEFAULT_MOSAIC_BACKGROUND = 'bundles/sonataadmin/images/default_mosaic_image.png';

/**
* @var string
Expand Down
1 change: 1 addition & 0 deletions src/Resources/public/app.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/Resources/public/dist/app.css

This file was deleted.

Loading

0 comments on commit 50d4fef

Please sign in to comment.