Skip to content

Commit

Permalink
Remove unused code and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkrovitch committed Apr 3, 2021
1 parent 8b161bb commit 1625180
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 84 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
php_version:
- '7.4'
- '8.0'
# - '8.0' TODO fix
steps:
- uses: actions/checkout@v2

Expand All @@ -34,7 +34,7 @@ jobs:
coverage: pcov
tools: composer, php-cs-fixer, cs2pr

- name: Run phpunit
- name: Install dependencies
run: composer install --no-interaction

- name: Run phpunit
Expand Down
6 changes: 1 addition & 5 deletions TODO.md → HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
## Chore:
- Allow dynamic header template in the field configuration
- Remove dependencies between application, admin, admin view and action configuration

v0.n+1:
v1.0:
- add filters
- file exporters : array type, association
- move export logic into a separate service
Expand Down
37 changes: 0 additions & 37 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,3 @@ import '../scss/admin.scss';
const application = Application.start();
const context = require.context("./controllers", true, /\.js$/);
application.load(definitionsFromContext(context));



// import 'jquery';
// import 'popper.js/dist/popper';
// import 'bootstrap/dist/js/bootstrap';
// import 'bootstrap/dist/css/bootstrap.css';
//
// import '@fortawesome/fontawesome-free/js/all.js';
// //import '@fortawesome/fontawesome-free/css/all.css';
//
// import '../scss/admin.scss';
// import Collapse from "./components/Collapse";
//
// // Collapse
// document.querySelectorAll('.link-toggle').forEach((element) => {
// let collapse = new Collapse(element);
// collapse.bind();
// });

// document.querySelectorAll('.dropdown-toggle').forEach(element => {
// console.log(element);
// element.addEventListener('click', event => {
// const targetId = element.getAttribute('id');
// console.log('id', targetId);
//
// if (!targetId) {
// return;
// }
// const targets = document.querySelectorAll('[aria-labelledby="' + targetId + '"]').forEach(container => {
// container.classList.toggle('show');
// console.log(container);
// });
// });
//
//
// });
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"devDependencies": {
"@symfony/ux-dropzone": "file:vendor/symfony/ux-dropzone/Resources/assets",
"@symfony/webpack-encore": "^0.31.0",
"core-js": "^3.6.5",
"postcss-loader": "^3.0.0",
"regenerator-runtime": "^0.13.7",
"webpack-notifier": "^1.6.0",
"@symfony/ux-dropzone": "file:vendor/symfony/ux-dropzone/Resources/assets"
"webpack-notifier": "^1.6.0"
},
"license": "UNLICENSED",
"private": true,
Expand All @@ -32,4 +32,4 @@
"tinymce": "^5.6.2",
"tinymce-i18n": "^20.12.25"
}
}
}
35 changes: 0 additions & 35 deletions src/Form/Extension/CollectionExtensionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,13 @@

use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Contracts\Translation\TranslatorInterface;

/**
* @deprecated
*/
class CollectionExtensionType extends AbstractTypeExtension
{
private TranslatorInterface $translator;

public static function getExtendedTypes(): iterable
{
return [
CollectionType::class,
];
}

//
// public function __construct($registry, TranslatorInterface $translator)
// {
// $this->registry = $registry;
// $this->translator = $translator;
// }

public function finishView(FormView $view, FormInterface $form, array $options)
{
// TODO remove
// $this->registry->register('/bundles/lagadmin/assets/admin.collection.js');
//
// if (!key_exists('class', $view->vars['attr'])) {
// $view->vars['attr']['class'] = 'collection-container';
// } else {
// $view->vars['attr']['class'] .= ' collection-container';
// }
//
// if ($options['allow_delete']) {
// $view->vars['attr']['data-remove-button'] = str_replace(
// '%s',
// $this->translator->trans('lag.admin.delete'),
// '<button class="remove-link btn btn-danger"><i class="fa fa-times"></i>&nbsp;%s</button>'
// );
// }
}
}
3 changes: 1 addition & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ Encore
.setManifestKeyPrefix('assets')
.setPublicPath('/bundles/lagadmin')

// .addEntry('admin', './assets/js/admin.js')
// .addEntry('admin.collection', './assets/js/admin.collection.js')
// TODO remove bootstrap js
.addEntry('js/jquery', './node_modules/jquery-easing/jquery.easing.1.3.js')
.addEntry('js/jquery-easing', './node_modules/jquery/dist/jquery.js')
.addEntry('js/sb-admin', './node_modules/startbootstrap-sb-admin-2/js/sb-admin-2.js')
Expand Down

0 comments on commit 1625180

Please sign in to comment.