Skip to content

Commit

Permalink
Move date picker (#7809)
Browse files Browse the repository at this point in the history
* Move date picker

* Remove older things

* point to latest form-extenions

* Add upgrade note

* Use twig function from SonataFormExtension

* Fix builds

* Fix cs fixer

* Update composer.json
  • Loading branch information
jordisala1991 authored May 12, 2022
1 parent c7f7c19 commit 7ab7cbd
Show file tree
Hide file tree
Showing 151 changed files with 396 additions and 1,569 deletions.
37 changes: 37 additions & 0 deletions UPGRADE-4.x.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
UPGRADE 4.x
===========

UPGRADE FROM 4.11.1 to 4.x
==========================

## Datetime picker assets

Datetime picker assets were moved from SonataAdminBundle to form-extensions.
Normally this should not affect you, unless you have modified
the default javascript and/or stylesheets
(remember that you can also add extra stylesheets or javascript using
`extra_stylesheets` and `extra_javascripts` to avoid this kind of issues):

Before
```yaml
sonata_admin:
assets:
javascript:
bundles/sonataadmin/app.js
your_own.js
stylesheets:
bundles/sonataadmin/app.css
your_own.css
```
After
```yaml
sonata_admin:
assets:
javascript:
bundles/sonataadmin/app.js
bundles/sonataform/app.js
your_own.js
stylesheets:
bundles/sonataadmin/app.css
bundles/sonataform/app.css
your_own.css
```
UPGRADE FROM 4.7 to 4.8
=======================
Expand Down
13 changes: 0 additions & 13 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,7 @@ import 'jquery.scrollto';
import 'jquery-ui/ui/widget';
import 'jquery-ui/ui/widgets/sortable';
import 'bootstrap';
import moment from 'moment';

// Eonasdan Bootstrap DateTimePicker in its version 3 does not
// provide the scss or plain css, it only provides the less version
// of its source files, that's why it is not included it via npm.
//
// Eonasdan Bootstrap DateTimePicker is not directly used in SonataAdmin
// but it is used on form-extensions package
import '../vendor/bootstrap-datetimepicker.min';
import 'jquery-form';

// Boostrap 3 JavaScript for the X-editable library
Expand Down Expand Up @@ -60,8 +52,3 @@ import './base';
// Create global $ and jQuery variables to be used outside this script
global.$ = $;
global.jQuery = $;

// Create global moment variable to be used by the locale script.
// It expects moment to be available on the global scope
// in order to define the requested locale translations
global.moment = moment;
8 changes: 0 additions & 8 deletions assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@
@import '~admin-lte/dist/css/alt/AdminLTE-without-plugins.css';
@import '~icheck/skins/square/blue.css';

// Eonasdan Bootstrap DateTimePicker in its version 3 does not
// provide the scss or plain css, it only provides the less version
// of its source files, that's why it is not included it via npm.
//
// Eonasdan Bootstrap DateTimePicker is not directly used in SonataAdmin
// but it is used on form-extensions package
@import '../vendor/bootstrap-datetimepicker.min.css';

// Only use sortable widget from jQuery UI library
@import '~jquery-ui/themes/base/sortable.css';
@import '~select2/dist/css/select2.css';
Expand Down
5 changes: 0 additions & 5 deletions assets/vendor/bootstrap-datetimepicker.min.css

This file was deleted.

2 changes: 0 additions & 2 deletions assets/vendor/bootstrap-datetimepicker.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"sonata-project/block-bundle": "^4.11",
"sonata-project/doctrine-extensions": "^1.8",
"sonata-project/exporter": "^2.11",
"sonata-project/form-extensions": "^1.7.1",
"sonata-project/form-extensions": "^1.15",
"sonata-project/twig-extensions": "^1.4.1",
"symfony/asset": "^4.4 || ^5.3 || ^6.0",
"symfony/config": "^4.4 || ^5.3 || ^6.0",
Expand Down
Loading

0 comments on commit 7ab7cbd

Please sign in to comment.