Commit dfc1d87b authored by mattwire's avatar mattwire
Browse files

Merge branch 'moveregion' into 'master'

Release 1.2 - load libraries in page-header instead of page-footer

See merge request !1
parents 416d3524 8f4e302e
# sweetalert
![Screenshot](/images/screenshot.png)
![Screenshot](images/screenshot.png)
Provides support for the [sweetalert2 library](https://sweetalert2.github.io/), a "beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes".
......@@ -8,7 +8,7 @@ The extension is licensed under [AGPL-3.0](LICENSE.txt). sweetalert2 is availabl
## Requirements
* PHP v7.0+
* PHP v7.2+
* CiviCRM 5.latest
## Installation
......@@ -26,6 +26,10 @@ This extension does not do anything out of the box. It is available for other ex
## Changelog
#### 1.2
Load libraries in `page-header` region instead of `page-footer` so it is always available for libraries loaded in later regions.
#### 1.1
Switch to SweetAlert2 version 9.7.1 - see "Breaking Changes" at https://github.com/sweetalert2/sweetalert2/releases/tag/v9.0.0
......@@ -14,11 +14,11 @@
<url desc="Support">https://lab.civicrm.org/extensions/sweetalert/issues</url>
<url desc="Licensing">https://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2020-02-05</releaseDate>
<version>1.1</version>
<releaseDate>2020-06-08</releaseDate>
<version>1.2</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.19</ver>
<ver>5.24</ver>
</compatibility>
<civix>
<namespace>CRM/Sweetalert</namespace>
......
......@@ -139,8 +139,8 @@ function sweetalert_civicrm_entityTypes(&$entityTypes) {
*/
function sweetalert_civicrm_buildForm($formName, &$form) {
Civi::resources()
->addStyleFile(E::SHORT_NAME, 'css/sweetalert2.min.css')
->addScriptFile(E::SHORT_NAME, 'js/sweetalert2.min.js');
->addStyleFile(E::SHORT_NAME, 'css/sweetalert2.min.css', 0, 'page-header')
->addScriptFile(E::SHORT_NAME, 'js/sweetalert2.min.js', 0, 'page-header');
}
/**
......@@ -148,6 +148,6 @@ function sweetalert_civicrm_buildForm($formName, &$form) {
*/
function sweetalert_civicrm_pageRun(&$page) {
Civi::resources()
->addStyleFile(E::SHORT_NAME, 'css/sweetalert2.min.css')
->addScriptFile(E::SHORT_NAME, 'js/sweetalert2.min.js');
->addStyleFile(E::SHORT_NAME, 'css/sweetalert2.min.css', 0, 'page-header')
->addScriptFile(E::SHORT_NAME, 'js/sweetalert2.min.js', 0, 'page-header');
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment