|
@@ -37,28 +37,32 @@ file that was distributed with this source code.
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block javascripts %}
|
|
|
- <script>
|
|
|
- window.SONATA_CONFIG = {
|
|
|
- CONFIRM_EXIT: {% if sonata_admin.adminPool.getOption('confirm_exit') %}true{% else %}false{% endif %},
|
|
|
- USE_SELECT2: {% if sonata_admin.adminPool.getOption('use_select2') %}true{% else %}false{% endif %},
|
|
|
- USE_ICHECK: {% if sonata_admin.adminPool.getOption('use_icheck') %}true{% else %}false{% endif %},
|
|
|
- USE_STICKYFORMS: {% if sonata_admin.adminPool.getOption('use_stickyforms') %}true{% else %}false{% endif %}
|
|
|
- };
|
|
|
- window.SONATA_TRANSLATIONS = {
|
|
|
- CONFIRM_EXIT: '{{ 'confirm_exit'|trans({}, 'SonataAdminBundle')|escape('js') }}'
|
|
|
- };
|
|
|
-
|
|
|
- // http://getbootstrap.com/getting-started/#support-ie10-width
|
|
|
- if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
|
|
- var msViewportStyle = document.createElement('style');
|
|
|
- msViewportStyle.appendChild(document.createTextNode('@-ms-viewport{width:auto!important}'));
|
|
|
- document.querySelector('head').appendChild(msViewportStyle);
|
|
|
- }
|
|
|
- </script>
|
|
|
-
|
|
|
- {% for javascript in sonata_admin.adminPool.getOption('javascripts', []) %}
|
|
|
- <script src="{{ asset(javascript) }}"></script>
|
|
|
- {% endfor %}
|
|
|
+ {% block sonata_javascript_config %}
|
|
|
+ <script>
|
|
|
+ window.SONATA_CONFIG = {
|
|
|
+ CONFIRM_EXIT: {% if sonata_admin.adminPool.getOption('confirm_exit') %}true{% else %}false{% endif %},
|
|
|
+ USE_SELECT2: {% if sonata_admin.adminPool.getOption('use_select2') %}true{% else %}false{% endif %},
|
|
|
+ USE_ICHECK: {% if sonata_admin.adminPool.getOption('use_icheck') %}true{% else %}false{% endif %},
|
|
|
+ USE_STICKYFORMS: {% if sonata_admin.adminPool.getOption('use_stickyforms') %}true{% else %}false{% endif %}
|
|
|
+ };
|
|
|
+ window.SONATA_TRANSLATIONS = {
|
|
|
+ CONFIRM_EXIT: '{{ 'confirm_exit'|trans({}, 'SonataAdminBundle')|escape('js') }}'
|
|
|
+ };
|
|
|
+
|
|
|
+ // http://getbootstrap.com/getting-started/#support-ie10-width
|
|
|
+ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
|
|
+ var msViewportStyle = document.createElement('style');
|
|
|
+ msViewportStyle.appendChild(document.createTextNode('@-ms-viewport{width:auto!important}'));
|
|
|
+ document.querySelector('head').appendChild(msViewportStyle);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ {% endblock %}
|
|
|
+
|
|
|
+ {% block sonata_javascript_pool %}
|
|
|
+ {% for javascript in sonata_admin.adminPool.getOption('javascripts', []) %}
|
|
|
+ <script src="{{ asset(javascript) }}"></script>
|
|
|
+ {% endfor %}
|
|
|
+ {% endblock %}
|
|
|
|
|
|
{% set locale = app.request.locale %}
|
|
|
{# localize moment #}
|