Browse Source

fix js-routing bug

develop
Simon Vieille 3 months ago
parent
commit
5e3c23ef3d
  1. 1
      .gitignore
  2. 5
      Makefile
  3. 3
      assets/js/admin/components/file-manager/Files.vue

1
.gitignore

@ -5,6 +5,7 @@
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/public/js/
/src/Command/TestCommand.php
/var/
/vendor/

5
Makefile

@ -15,10 +15,13 @@ dep:
asset-watch:
$(WEBPACK) -w
asset:
asset: js-routing
$(YARN)
$(WEBPACK)
js-routing:
$(PHP) bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
clean:
rm -fr var/cache/dev/*
rm -fr var/cache/prod/*

3
assets/js/admin/components/file-manager/Files.vue

@ -171,6 +171,8 @@ const routes = require('../../../../../public/js/fos_js_routes.json')
import Routing from '../../../../../vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.min.js';
import FileIcon from './FileIcon';
Routing.setRoutingData(routes);
export default {
name: "Files",
components: {
@ -240,7 +242,6 @@ export default {
}
},
mounted() {
Routing.setRoutingData(routes)
let view = localStorage.getItem('file-manager.view')
if (['grid', 'list'].indexOf(view) !== -1) {

Loading…
Cancel
Save