Updating Bootstrap JS CSS Sources
Due to the ongoing development of the Frontend-frameworks we are using, it is recommended to update the sourcefiles to increase speed, resolve bugs and increase overall responsiveness of the website.
In most cases it is sufficient to upgrade the main file of jQuery, DataTables and Bootstrap.
The Downloadlinks for the current version are:
Bootstrap: http://getbootstrap.com/getting-started/#download
Datatables: https://datatables.net/download /index
Datatables Kombifiles
jQuery: https://code.jquery.com/jquery/
The implementation is done in views/bootstrap/header.blade.php (for CSS) and views/bootstrap/footer.blade.php (JS) Files. There are several ways to implement these Frameworks, such as via cdn, by downloading the corresponding files or composer.
For every Framework there are several files available.
- development version (uncompressed): The development version provides console warning messages when deprecated and/or removed APIs are used. Use this version during development and debugging, and whenever you are reporting bugs to the jQuery team.
- production version (minimized): The minified production file is compressed and does not generate console warnings. It will only generate a console log message upon loading, or if it detects and error such as an outdated version of jQuery that it does not support. Do not use this file for development or debugging, it will make your life miserable.
- (slim and slim minified): similar to development and production version but with a smaller feature set.
1 CDN implementation
For fast development, prototyping and testing it is recommended to use CDN (Content Delivery Network) links. The needed links can be found on the mentioned websites.
Pros | Cons |
---|---|
|
|
|
|
|
|
|
|
2 Local implementation
For the deployment version a local implementation is recommended.
The files can be downloaded from the mentioned websites or get them with wget and the CDN links
The files that need to be replaced are inside the public/components/assets-admin/plugins/[Pluginname] Folder.
Info
if you copy the files in these folders don't forget to do
#> chmod +x ./[Filename]
#> chown apache:apache ./[Filename]
Implementation is the same as with CDN variant.
Pros | Cons |
---|---|
|
|
| Â |
| Â |
Formating the downloaded file in Sublime3 - recommended to prevent bugs/bad behaviour
To work with the files, they almost always need to be reformatted, because they are only machine readable and due to for me unknown properties the lines are sometimes too long and get not completely interpreted.
For Sublime 3 exists a Plug-in to automatically beautify HTML, JS and CSS code. With the help of this Plug-in the code becomes human-readable and gets interpreted without errors
Link to sublime Plug-in page: https://packagecontrol.io/packages/HTML-CSS-JS%20Prettify
The simplest method of installation is through the Sublime Text console. The console is accessed via the ctrl+` shortcut or the
menu. Once open, paste the appropriate Python code into the consol.This code creates the Installed Packages folder (if necessary), and then downloads the Package Control.sublime-package into it. The download will be done over HTTP instead of HTTPS due to Python standard library limitations, however the file will be validated using SHA-256.
Now right-click into sublime in the opened file and click on HTML/CSS/JS Prettify -> Prettify Code
3 Installation through composer
TO-DO: Check Composer implementation seems also possible and would be easier to maintain and does automatic updates, but was not used by me, because copying the files to the corresponding folders was sufficient for me.
Â