templates/section/javascript.html.twig line 1

Open in your IDE?
  1. <!-- jQuery -->
  2. <script src="/vendor/components/jquery/jquery.min.js"></script>
  3. <!-- jQuery UI 1.11.4 -->
  4. <script src="/assets/vendor/jquery-ui/jquery-ui.min.js"></script>
  5. <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  6. <script>
  7. $.widget.bridge('uibutton', $.ui.button)
  8. </script>
  9. <!-- Bootstrap 4 -->
  10. <script src="/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  11. <script>
  12. $(function () {
  13. $('[data-toggle="tooltip"]').tooltip()
  14. })
  15. </script>
  16. <!-- SweetAlert2 -->
  17. <script src="/assets/vendor/sweetalert2/sweetalert2.all.min.js"></script>
  18. <!-- AdminLTE App -->
  19. <script src="/assets/js/adminlte.js"></script>
  20. <script src="/assets/js/custom.js"></script>
  21. <script src="/assets/js/pages/dashboard.js"></script>
  22. {% if app.environment == 'prod' %}
  23. <!-- Cronitor RUM -->
  24. <script async src="https://rum.cronitor.io/script.js"></script>
  25. <script>
  26. window.cronitor = window.cronitor || function() { (window.cronitor.q = window.cronitor.q || []).push(arguments); };
  27. cronitor('config', { clientKey: '{{ secret.cronitor }}' });
  28. </script>
  29. {# User #}
  30. {% if (app.user is not null) and (app.session.get('signed') is not null) %}
  31. <!-- Drift -->
  32. <!-- Start of Async Drift Code -->
  33. <script>
  34. "use strict";
  35. !function() {
  36. var t = window.driftt = window.drift = window.driftt || [];
  37. if (!t.init) {
  38. if (t.invoked) return void (window.console && console.error && console.error("Drift snippet included twice."));
  39. t.invoked = !0, t.methods = [ "identify", "config", "track", "reset", "debug", "show", "ping", "page", "hide", "off", "on" ],
  40. t.factory = function(e) {
  41. return function() {
  42. var n = Array.prototype.slice.call(arguments);
  43. return n.unshift(e), t.push(n), t;
  44. };
  45. }, t.methods.forEach(function(e) {
  46. t[e] = t.factory(e);
  47. }), t.load = function(t) {
  48. var e = 3e5, n = Math.ceil(new Date() / e) * e, o = document.createElement("script");
  49. o.type = "text/javascript", o.async = !0, o.crossorigin = "anonymous", o.src = "https://js.driftt.com/include/" + n + "/" + t + ".js";
  50. var i = document.getElementsByTagName("script")[0];
  51. i.parentNode.insertBefore(o, i);
  52. };
  53. }
  54. }();
  55. drift.SNIPPET_VERSION = '0.3.1';
  56. drift.load('{{ secret.drift }}');
  57. drift.identify("{{ app.user.getAdUserUu }}",
  58. {
  59. clientId: "{{ app.user.getAdClientId }}",
  60. externalId: "{{ app.user.getAdUserUu }}",
  61. endUser: true,
  62. email: "{{ app.user.getEmail }}",
  63. name: "{{ app.user.getDescription }}",
  64. site: "{{ project.url }}"
  65. },
  66. { userJwt: "{{ app.session.get('signed') }}" }
  67. );
  68. </script>
  69. <!-- End of Async Drift Code -->
  70. {% endif %}
  71. {% endif %}
  72. <script>
  73. $('#logout').on('click', function() {
  74. Swal.fire({
  75. title: '¿Desea cerrar la sesión?',
  76. icon: 'warning',
  77. showCancelButton: true,
  78. confirmButtonText: 'Cerrar Sesión',
  79. confirmButtonColor: '#dc3545',
  80. cancelButtonText: `Cancelar`,
  81. cancelButtonColor: '#007bff',
  82. }).then((result) => {
  83. if (result.isConfirmed) {
  84. setTimeout(() => {
  85. window.location.replace("{{ path('app_logout') }}");
  86. }, 1500);
  87. }
  88. });
  89. });
  90. </script>