From d56c3b8e09551aac85a351970b7e066188326868 Mon Sep 17 00:00:00 2001 From: Julio Date: Fri, 20 Dec 2019 15:06:57 +0100 Subject: [PATCH] Upgrade sweetalert to sweetalert2 --- assets/js/app.js | 3 ++ assets/js/vendor.js | 2 +- package.json | 2 +- .../views/Layout/base-layout.html.twig | 49 ++++++++++--------- yarn.lock | 21 ++------ 5 files changed, 35 insertions(+), 42 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index acb29f1942..043af02cb4 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -22,6 +22,9 @@ require('./main'); require('webpack-jquery-ui'); require('webpack-jquery-ui/css'); +import Swal from 'sweetalert2'; +window.Swal = Swal; + // @todo rework url naming const homePublicUrl = Routing.generate('home'); const mainUrl = homePublicUrl + 'main/'; diff --git a/assets/js/vendor.js b/assets/js/vendor.js index 562630106c..f1707b7ead 100644 --- a/assets/js/vendor.js +++ b/assets/js/vendor.js @@ -23,7 +23,7 @@ require('jquery.scrollbar'); require('blueimp-file-upload'); require('select2'); require('timeago'); -require('sweetalert/dist/sweetalert.min'); +require('sweetalert2'); require('bootstrap-select/dist/js/bootstrap-select.js'); require('bootstrap-daterangepicker'); require('fullcalendar/dist/fullcalendar.js'); diff --git a/package.json b/package.json index 4220dc4d55..a5c1d0e7f5 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "qtip2": "^3.0.3", "readmore-js": "^2.2.1", "select2": "^4.0", - "sweetalert": "^2.1.2", + "sweetalert2": "^9.5.3", "timeago": "^1.6.7", "timepicker": "^1.11.14", "uglifyjs-webpack-plugin": "^1.3.0", diff --git a/src/ThemeBundle/Resources/views/Layout/base-layout.html.twig b/src/ThemeBundle/Resources/views/Layout/base-layout.html.twig index 3992d1bf28..b8a00f9a5b 100644 --- a/src/ThemeBundle/Resources/views/Layout/base-layout.html.twig +++ b/src/ThemeBundle/Resources/views/Layout/base-layout.html.twig @@ -15,7 +15,6 @@ {% include "@ChamiloTheme/Layout/head.html.twig" %} {% endblock %} - - - {% block chamilo_wrap %} - + {% block page_header %} + {% include '@ChamiloTheme/Layout/header.html.twig' %} + {% endblock %} - -
{% block page_sidebar %} @@ -51,14 +48,14 @@
+ {% endblock %} - - {% block chamilo_footer %} + {% include '@ChamiloTheme/Layout/footer.html.twig' %} + {% endblock %} -