Importing the modal library loads mootools library which should be removed.
JHtml::_('behavior.modal', 'a.modal');
Do not load mootools library
<script src="/sitename/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/sitename/media/system/js/mootools-more.js" type="text/javascript"></script>
In * /libraries/cms/html/behavior.php, *public static function modal**, the following line is called which is not necessary at all.
// Include MooTools framework
static::framework(true);
If we dig more down the same function, the script declaration has the syntax of jQuery.
// Attach modal behavior to document
$document
->addScriptDeclaration(
"
jQuery(function($) {
SqueezeBox.initialize(" . $options . ");
SqueezeBox.assign($('" . $selector . "').get(), {
parse: 'rel'
});
});
function jModalClose() {
SqueezeBox.close();
}"
);
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-09-15 13:16:32 |
Closed_By | ⇒ | mbabker |
SqueezeBox is dependent on MooTools to function (see the project site http://digitarald.de/project/squeezebox/) so it is indeed a required dependency to load it.
I'm sorry, I have failed to check this without loading mootools. I guess
like modal.js should be upgraded or converted to be used with jQuery as
Joomla has already moved away from mootools.
On 15 Sep 2015 21:16, "Michael Babker" notifications@github.com wrote:
—
Reply to this email directly or view it on GitHub
#7887 (comment).
modal.js is the SqueezeBox modal. IMO that shouldn't be touched unless they have a jQuery compatible version of their code, it's not our place to be hacking third party code.
@akfaisel I thought that converting this script to Jquery would be a good thing. Yesterday. Today I realized that for some events people might be using mootools to program them, so unfortunately this cannot be done keeping backwards compatibility. Best way out of this is by using Bootstrap modal code...
@dgt41 can you have a look into here? I'm not on the latest state regarding JQuery / Mootools ;)