Устранение несовместимости между bootstrap-button и jquery-ui-button.
Данная проблема решается с помощью этого скрипта. Собственно сам скачанный скрипт здесь.
Но имеется следующая проблема - Для устранения конфликта скрипты должны подключаться в следующем порядке:
1. Bootstamp. 2. jQuery UI. 3. bootstrap-button-fix.js. Но Joomla подключает bootstamp последним.
Для решения данного вопроса следует создать системный плагин.
<?php
/**
* @version $Id: #plugin#.php 147 2013-10-06 08:58:34Z michel $
* @copyright Copyright (C) 2015, Vadim Rigin. All rights reserved.
* @license #http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
// No direct access
defined('_JEXEC') or die;
jimport('joomla.plugin.plugin');
class plgSystemMovescripts extends JPlugin
{
//Just examples
function onBeforeCompileHead()
{
$app = JFactory::getApplication();
if (!$app->isAdmin())
{
$doc = JFactory::getDocument();
if(!method_exists($doc,'getHeadData'))
{
return;
}
$headers = $doc->getHeadData();
if( isset($headers['scripts'])
&& isset($headers['scripts']['/media/jui/js/bootstrap.min.js'])
&& isset($headers['scripts']['/templates/usertemplate/js/jquery-ui.min.js'])
&& isset($headers['scripts']['/templates/usertemplate/js/bootstrap-button-fix.js'])
)
{
foreach ($headers['scripts'] as $key => $value) {
if(
$key == '/media/jui/js/bootstrap.min.js' ||
$key == '/templates/usertemplate/js/jquery-ui.min.js' ||
$key == '/templates/usertemplate/js/bootstrap-button-fix.js'
)
continue;
$buf[$key] = $value;
}
$buf['/media/jui/js/bootstrap.min.js'] = $headers['scripts']['/media/jui/js/bootstrap.min.js'];
$buf['/templates/usertemplate/js/jquery-ui.min.js'] = $headers['scripts']['/templates/usertemplate/js/jquery-ui.min.js'];
$buf['/templates/usertemplate/js/bootstrap-button-fix.js'] = $headers['scripts']['/templates/usertemplate/js/bootstrap-button-fix.js'];
$headers['scripts'] = $buf;
$doc->setHeadData($headers);
}
}
}
}
Плагин вот.