I see current version of Appgini is still loading prototype.js (resources/lightbox/js - Prototype V1.7.1)
Prototype is know to have several conflicts with both Bootstrap and select2 (I see some fixes have been added to common.js.php & dynamic.css.php in the current Appgini to remedy some conflicts)
prototype.js V1.7.1 was released in 2014. Last update to the Prototype JS project was Sept 2015.
Native Bootstrap tabs/pils and other functions still conflict with Prototype and a manual fix is required. There are plenty of other current (and maintained) lightbox js functions out there.
Whilst I am a great fan of Appgini, I do think it is time to get rid of Prototype JS completely. Just my 2c worth
Time for prototype.js to retire
Re: Time for prototype.js to retire
Just to add to the my own post above.
You can fix some (if not all?) Prototype conflicts by adding the following to your hooks/header-extras.php I've tested and fixes my bootstrap issues at least. No apparent negative effects at this stage. Not tested in all browsers however......
All credit goes here: https://jsfiddle.net/dgervalle/hhBc6/
You can fix some (if not all?) Prototype conflicts by adding the following to your hooks/header-extras.php I've tested and fixes my bootstrap issues at least. No apparent negative effects at this stage. Not tested in all browsers however......
Code: Select all
<script>
jQuery.noConflict();
if (Prototype.BrowserFeatures.ElementExtensions) {
var disablePrototypeJS = function (method, pluginsToDisable) {
var handler = function (event) {
event.target[method] = undefined;
setTimeout(function () {
delete event.target[method];
}, 0);
};
pluginsToDisable.each(function (plugin) {
jQuery(window).on(method + '.bs.' + plugin, handler);
});
},
pluginsToDisable = ['collapse', 'dropdown', 'modal', 'tooltip', 'popover', 'tab', 'pill'];
disablePrototypeJS('show', pluginsToDisable);
disablePrototypeJS('hide', pluginsToDisable);
}
jQuery(document).ready(function ($) {
$('.bs-example-tooltips').children().each(function () {
$(this).tooltip();
});
$('.bs-example-popovers').children().each(function () {
$(this).popover();
});
});
</script>
Re: Time for prototype.js to retire
Thanks for sharing this code snippet. We're gradually migrating Prototype code to jQuery with each new release of AppGini, and plan to remove it altogether in AppGini 5.80.
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.