? ? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
4 Feb 2014

This is same as #2696 but against staging.

Issue

Currently, when we want to load core.js (kind of our own Joomla JavaScript "library") we use the same function as when we want to load the MooTools JavaScript library. That is JHtml::_('behavior.framework').
So far this wasn't a problem since core.js needed MooTools anyway.
Since we want to remove MooTools and there are quite a few PRs around which deals with that and also rewrites core.js to jQuery, we may end up loading MooTools only to get core.js. This is of course not good.

Proposed Solution

This PR will introduce a new function JHtml::_('behavior.core') which is supposed to only load core.js.
Currently, this would still load MooTools since core.js depends on it. It's implemented as a simple proxy to behavior.framework for now.
As soon as core.js is rewritten to jQuery, the function can be changed to load jquery.framework and core.js instead.
I already wrote the code for that with comments what needs to be done.

Goal

Introducing this new class already "ahead of time" would allow us to start rewriting our extensions to use this new class, so when core.js is changed, we don't need to change anything anymore.
After all core javascript functions are rewritten to jQuery, we can then deprecate behavior.framework and remove it with J4.0.
This also gives 3rd party developers a bit more time to do the transition.

Tracker

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32994

avatar Bakual Bakual - open - 4 Feb 2014
avatar Bakual Bakual - close - 9 Mar 2014
avatar Bakual
Bakual - comment - 9 Mar 2014

Closing as core.js is now rewritten to jQuery. New PR: #3268

avatar Bakual Bakual - change - 9 Mar 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-03-09 18:44:04
avatar Bakual Bakual - close - 9 Mar 2014
avatar Bakual Bakual - head_ref_deleted - 12 May 2014

Add a Comment

Login with GitHub to post a comment