diff --git a/assets/app.js b/assets/app.js deleted file mode 100644 index bb0a6aa1..00000000 --- a/assets/app.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Welcome to your app's main JavaScript file! - * - * We recommend including the built version of this JavaScript file - * (and its CSS file) in your base layout (base.html.twig). - */ - -// any CSS you import will output into a single css file (app.css in this case) -import './styles/app.css'; - -// start the Stimulus application -import './bootstrap'; diff --git a/assets/controllers/hello_controller.js b/assets/controllers/hello_controller.js deleted file mode 100644 index 8c79f65a..00000000 --- a/assets/controllers/hello_controller.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Controller } from 'stimulus'; - -/* - * This is an example Stimulus controller! - * - * Any element with a data-controller="hello" attribute will cause - * this controller to be executed. The name "hello" comes from the filename: - * hello_controller.js -> "hello" - * - * Delete this file or adapt it for your use! - */ -export default class extends Controller { - connect() { - this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js'; - } -} diff --git a/assets/js/app.js b/assets/js/app.js index 2eb8508b..ad3af37f 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -26,15 +26,16 @@ // any CSS you require will output into a single css file (app.css in this case) -require('../css/app.css'); +// Main CSS files +import '../css/app.css'; + +// start the Stimulus application +import '../bootstrap'; // Need jQuery? Install it with "yarn add jquery", then uncomment to require it. const $ = require('jquery'); //Only include javascript - - - import '@fortawesome/fontawesome-free/css/all.css' import 'datatables.net-bs4/css/dataTables.bootstrap4.css' @@ -47,8 +48,10 @@ import "patternfly-bootstrap-treeview/src/css/bootstrap-treeview.css" import "bootstrap-fileinput/css/fileinput.css" -require('bootstrap'); +//import * as Turbo from "@hotwired/turbo" +require('bootstrap'); +/** //require( 'jszip' ); //#require( 'pdfmake' ); require( 'datatables.net-bs4' ); @@ -97,9 +100,9 @@ import 'katex/dist/katex.css'; window.ClipboardJS = require('clipboard'); require('../ts_src/ajax_ui'); -import {ajaxUI} from "../ts_src/ajax_ui"; +//import {ajaxUI} from "../ts_src/ajax_ui"; -window.ajaxUI = ajaxUI; +//window.ajaxUI = ajaxUI; //Require all events; require('../ts_src/event_listeners'); @@ -125,8 +128,8 @@ try { } //Start AjaxUI AFTER all event has been registered -$(document).ready(ajaxUI.start()); - +//$(document).ready(ajaxUI.start()); +*/ //console.log('Hello Webpack Encore! Edit me in assets/js/app.js'); \ No newline at end of file diff --git a/templates/base.html.twig b/templates/base.html.twig index b6537c36..27ab6230 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -47,6 +47,11 @@ {{ encore_entry_link_tags('app') }} {% endblock %} + + {% block javascripts %} + {{ encore_entry_script_tags('app') }} + {{ encore_entry_script_tags('ru2ftwofactor') }} + {% endblock %} {% block body %} @@ -119,9 +124,6 @@ {% endblock %} -{% block javascripts %} - {{ encore_entry_script_tags('app') }} - {{ encore_entry_script_tags('ru2ftwofactor') }} -{% endblock %} +