|
| 1 | +# Script Loader |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +Load scripts in your Mendix page/layout |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- Load javascript files from an external source |
| 10 | +- Execute action on load/error |
| 11 | +- Execute action when all are loaded |
| 12 | +- Load scripts in parallel or sequential order |
| 13 | + |
| 14 | +## Important note |
| 15 | + |
| 16 | +> While you can load external scripts (like we do in out demo), you should be aware that the script might not work, or more importantly: mess with the Mendix runtime in your page. |
| 17 | +
|
| 18 | +For example: |
| 19 | +- Loading jQuery works fine |
| 20 | +- Loading Lodash seems to not work properly. The script loads fine, but when the page tries to load Javascript Actions, it breaks |
| 21 | + |
| 22 | +So, if you have issues with your Mendix application when you are using the Script Loader widget, check if any of the loaded scripts interfere with the app itself. |
| 23 | + |
| 24 | +## Usage |
| 25 | + |
| 26 | +Import the Script Loader widget in your page (or preferably, your layout), set the different options (should be intuitive) and let it run. |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +## Demo project |
| 33 | + |
| 34 | +[Click here](https://caffcodecontenttestapp-sandbox.mxapps.io/p/script-loader-home) |
| 35 | + |
| 36 | +## Issues, suggestions and feature requests |
| 37 | + |
| 38 | +You can find all the information on [Github](https://github.com/j3lte/mendix-script-loader) |
| 39 | + |
| 40 | +## License |
| 41 | + |
| 42 | +The MIT License (MIT) |
| 43 | + |
| 44 | +Copyright © CaffCode 2022. All Rights Reserved. |
| 45 | + |
| 46 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 47 | +of this software and associated documentation files (the "Software"), to deal |
| 48 | +in the Software without restriction, including without limitation the rights |
| 49 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 50 | +copies of the Software, and to permit persons to whom the Software is |
| 51 | +furnished to do so, subject to the following conditions: |
| 52 | + |
| 53 | +The above copyright notice and this permission notice shall be included in |
| 54 | +all copies or substantial portions of the Software. |
| 55 | + |
| 56 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 57 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 58 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 59 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 60 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 61 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 62 | +THE SOFTWARE. |
0 commit comments