Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions libraries/cms/html/behavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,49 @@ public static function framework($extras = false, $debug = null)
}

JHtml::_('script', 'system/mootools-' . $type . '.js', false, true, false, false, $debug);

// Remove as soon as core.js is rewritten to jQuery (Pull https://github.com/joomla/joomla-cms/pull/2687)
JHtml::_('script', 'system/core.js', false, true);

/* Uncomment as soon as core.js is rewritten to jQuery
// Keep loading core.js for BC reasons
static::core();
*/

static::$loaded[__METHOD__][$type] = true;

return;
}

/**
* Method to load core.js into the document head.
*
* Core.js defines the 'Joomla' namespace and contains functions which are used across extensions
*
* @return void
*
* @since 3.2.2
*/
public static function core()
{
// Only a proxy for now. Remove when core.js is rewritten to jQuery (Pull https://github.com/joomla/joomla-cms/pull/2687)
static::framework();

/* Uncomment as soon as core.js is rewritten to jQuery
// Only load once
if (isset(static::$loaded[__METHOD__]))
{
return;
}

JHtml::_('jquery.framework');
JHtml::_('script', 'system/core.js', false, true);
static::$loaded[__METHOD__] = true;
*/

return;
}

/**
* Add unobtrusive JavaScript support for image captions.
*
Expand Down