joomla/joomla-cms — pull request #3268 by Bakual (2014-03-09 18:41:07+00:00)
Title: Adding new JHtml function behavior.core to load core.js

### 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 now core.js is rewritten to jQuery, that JHtml method also has to load the jQuery framework.

### Proposed Solution
This PR will introduce a new function `JHtml::_('behavior.core')` which is supposed to only load core.js. Since core.js depends on jQuery, it will also load jQuery. If we ever decide to rewrite core.js so it doesn't use jQuery anymore, this method could be changed easy to not loading jQuery anymore.

### Future work and testing
This only introduces the new method. To test, you need to manually change the call `JHtml::_('behavior.framework')` to `JHtml::_('behavior.core')` where possible and see that mootools is now longer loaded but core.js still is.
This will also be needed work for future PRs to change the current calls and remove the (hopefully now) unneeded loading of Mootools.
My goal is to introduce this method now so it can be used as a base for future PRs.

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

#### Remark
This is basically the same as PR #3047, but now against 3.3 and taking into account that core.js is rewritten now.