The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Added jmikola/js-assets-helper-bundle

This bundle is now used instead of old webRoot hack.

Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
master
Gergely POLONKAI (W00d5t0ck) 10 years ago
parent 78bf4d61b7
commit 4c5b2880b7
  1. 1
      app/AppKernel.php
  2. 8
      app/config/config.yml
  3. 3
      app/config/routing.yml
  4. 1
      composer.json
  5. 4
      src/KekRozsak/FrontBundle/Resources/public/js/forum.js
  6. 5
      src/KekRozsak/FrontBundle/Resources/views/Default/main_template.html.twig

@ -24,6 +24,7 @@ class AppKernel extends Kernel
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Io\TcpdfBundle\IoTcpdfBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new Jmikola\JsAssetsHelperBundle\JmikolaJsAssetsHelperBundle(),
// Own bundles
new KekRozsak\FrontBundle\KekRozsakFrontBundle(),
new KekRozsak\SecurityBundle\KekRozsakSecurityBundle(),

@ -8,6 +8,9 @@ jms_di_extra:
bundles: [ KekRozsakFrontBundle, KekRozsakSecurityBundle ]
directories: [ "%kernel.root_dir%/../src" ]
jmikola_js_assets_helper:
packages_to_expose: [ KekRozsakFrontBundle ]
framework:
#esi: ~
#translator: { fallback: %locale% }
@ -17,7 +20,10 @@ framework:
form: true
csrf_protection: true
validation: { enable_annotations: true }
templating: { engines: ['twig'] } #assets_version: SomeVersionScheme
templating:
engines: ['twig']
packages:
KekRozsakFrontBundle: ~
default_locale: %locale%
trust_proxy_headers: false # Should Request object should trust proxy headers (X_FORWARDED_FOR/HTTP_CLIENT_IP)
session: ~

@ -1,6 +1,9 @@
fos_js_routing:
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
jmikola_js_assets_helper_routing:
resource: "@JmikolaJsAssetsHelperBundle/Resources/config/routing/routing.xml"
KekRozsakAdminBundle:
resource: "@KekRozsakAdminBundle/Controller/"
type: annotation

@ -27,6 +27,7 @@
"doctrine/doctrine-migrations-bundle": "dev-master",
"egeloen/ckeditor-bundle": "dev-master",
"friendsofsymfony/jsrouting-bundle": "dev-master",
"jmikola/js-assets-helper-bundle": "dev-master",
"gergelypolonkai/tcpdfbundle": "dev-master"
},
"scripts": {

@ -25,7 +25,7 @@ function favouriteOn()
url: url
}).done(function() {
elem.find('img').attr('alt', '[Kedvenc]');
elem.find('img').attr('src', webRoot + '/bundles/kekrozsakfront/images/penta-yellow-24.png');
elem.find('img').attr('src', AssetsHelper.getURL('bundles/kekrozsakfront/images/penta-yellow-24.png'));
elem.removeClass('favourite-topic-button');
elem.addClass('unfavourite-topic-button');
elem.attr('id', 'unfavourite-topic-button-' + topicSlug);
@ -60,7 +60,7 @@ function favouriteOff()
url: url
}).done(function() {
elem.find('img').attr('alt', '[Nem kedvenc]');
elem.find('img').attr('src', webRoot + '/bundles/kekrozsakfront/images/penta-blue-24.png');
elem.find('img').attr('src', AssetsHelper.getUrl('/bundles/kekrozsakfront/images/penta-blue-24.png'));
elem.removeClass('unfavourite-topic-button');
elem.addClass('favourite-topic-button');
elem.attr('id', 'favourite-topic-button-' + topicSlug);

@ -17,12 +17,11 @@
<script type="text/javascript" src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
<script type="text/javascript" src="{{ path('fos_js_routing_js', {callback: 'fos.Router.setData'}) }}"></script>
<script type="text/javascript" src="{{ asset('js/jquery-form/jquery.form.js') }}"></script>
<script type="text/javascript" src="{{ asset('bundles/jmikolajsassetshelper/js/asset_helper.js') }}"></script>
<script type="text/javascript" src="{{ path('jmikola_js_assets_helper_js') }}"></script>
{% javascripts 'bundles/kekrozsakfront/js/*' output='js/kekrozsak.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
<script type="text/javascript">
var webRoot = '{{ asset('') }}';
</script>
{% block additional_js %}{% endblock %}
</head>
<body>

Loading…
Cancel
Save