Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
5 Apr 2014

Issue

Today, the articles category view still loads MooTools, but it isn't needed anymore.
However the core.js JavaScript file is still needed for the sorting function within the default layout (the blog one doesn't has this).

Solution

Currently, the layouts use JHtml::_('behavior.framework); which loads MooTools together with core.js. So far this was the only way to load core.js while using the Joomla API. With Joomla 3.3 we have now a new method (JHtml::_('behavior.core);) to load core.js which will no longer load MooTools.

This PR makes removes the behavior.framework calls from the layouts and adds the behavior.core call to JHtml::_('grid.sort') which is the method that actually needs core.js.

Testing Instructions

Create two menu items for an article category view. Once for the default layout and once for the blog one.
Make sure everything works as before while MooTools is no longer loaded.
If MooTools is still loaded after applying the patch, you may have to disable some modules or plugins because they may be loading MooTools.
Important: This works only in Joomla 3.3!

Tracker

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

avatar Bakual Bakual - open - 5 Apr 2014
avatar Bakual
Bakual - comment - 6 Apr 2014

On a sidenote: JHtmlGrid used to load core.js as part of the tooltips. It stopped loading it when the tooltips got changed to bootstrap months ago with #1329 :smile:
I discovered that in my own extension because I didn't load the framework in my layouts.

avatar roland-d
roland-d - comment - 6 Apr 2014

When I try to apply the patch using the patch tester I get this error:

JHtmlBehavior::core not found.

This is using an up-to-date version of the staging branch.

avatar mbabker
mbabker - comment - 6 Apr 2014

You need to be on the 3.3-dev branch to test this.

On Sunday, April 6, 2014, RolandD notifications@github.com wrote:

When I try to apply the patch using the patch tester I get this error:

JHtmlBehavior::core not found.

This is using an up-to-date version of the staging branch.

Reply to this email directly or view it on GitHub#3410 (comment)
.

avatar Bakual
Bakual - comment - 6 Apr 2014

Updated the testing instructions to make it clear that this needs Joomla 3.3.

avatar roland-d
roland-d - comment - 10 Apr 2014

Tested and this works as described. After the patch is applied the pages still load and the sorting works as expected.

avatar Bakual Bakual - change - 12 May 2014
Title
Remove mootools from com_content category view
[#33568] Remove mootools from com_content category view
avatar Bakual Bakual - change - 12 May 2014
Title
Remove mootools from com_content category view
[#33568] Remove mootools from com_content category view
avatar Bakual Bakual - change - 12 May 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-05-12 13:32:21
avatar Bakual Bakual - close - 12 May 2014
avatar Bakual Bakual - close - 12 May 2014
avatar Bakual Bakual - head_ref_deleted - 31 May 2014

Add a Comment

Login with GitHub to post a comment