Skip to content
Closed
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions administrator/templates/hathor/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
$input = $app->input;
$user = JFactory::getUser();

// If Right-to-Left
if ($this->direction == 'rtl') :
$doc->addStyleSheet('../media/jui/css/bootstrap-rtl.css');
endif;
// load optional rtl bootstrap css and bootstrap bugfixes
JHtmlBootstrap::loadCss( $includeMaincss = false, $this->direction);

// Load specific language related CSS
$file = 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css';
Expand Down
7 changes: 2 additions & 5 deletions administrator/templates/isis/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@
// Add Stylesheets
$doc->addStyleSheet('templates/' . $this->template . '/css/template.css');

// If Right-to-Left
if ($this->direction === 'rtl')
{
$doc->addStyleSheet('../media/jui/css/bootstrap-rtl.css');
}
// load optional rtl bootstrap css and bootstrap bugfixes
JHtmlBootstrap::loadCss( $includeMaincss = false, $this->direction);

// Load specific language related CSS
$file = 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css';
Expand Down
26 changes: 26 additions & 0 deletions libraries/cms/html/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,4 +575,30 @@ public static function endPanel()
{
return '</div>';
}

/**
* Loads css files needed by bootstrap, including a secondary file that may contains boostrap css bug fixes
*
* @param boolean if true, main bootstrap.css file is loaded, if false, only optional rtl and bug fixes file
* @param string rtl or ltr direction. If empty, ltr is assumed
* @param array optional array of attributes to be passed to JHtml::_('stylesheet')
*/
public static function loadCss( $includeMaincss = true, $direction = 'ltr', $attribs = array())
{

if($includeMaincss)
{
// load bootstrap main css
JHtml::_('stylesheet', 'media/jui/css/bootstrap.css', array(), false);
}

if ($direction === 'rtl')
{
JHtml::_('stylesheet', 'media/jui/css/bootstrap-rtl.css', array(), false);
}

// load bootstrap css fixes
JHtml::_('stylesheet', 'media/cms/css/bootstrap.css', array(), false);

}
}
7 changes: 7 additions & 0 deletions media/cms/css/bootstrap.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

/* Fix for #29223: ref: http://stackoverflow.com/questions/10959068/twitter-bootstrap-accordion-and-button-dropdown-overflow-issue */
.accordion-body.in:hover { overflow:visible; }
10 changes: 2 additions & 8 deletions templates/beez3/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,8 @@

if ($templateparams->get('bootstrap') == 1)
{
// Pull in the Bootstrap styles from jui
$doc->addStyleSheet('media/jui/css/bootstrap.css');

// If Right-to-Left
if ($this->direction == 'rtl')
{
$doc->addStyleSheet('media/jui/css/bootstrap-rtl.css');
}
// load optional rtl bootstrap css and bootstrap bugfixes
JHtmlBootstrap::loadCss( $includeMaincss = true, $this->direction);
}

$doc->addStyleSheet(JURI::base() . '/templates/system/css/system.css');
Expand Down
7 changes: 2 additions & 5 deletions templates/protostar/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@
// Add Stylesheets
$doc->addStyleSheet('templates/'.$this->template.'/css/template.css');

// If Right-to-Left
if ($this->direction == 'rtl')
{
$doc->addStyleSheet('media/jui/css/bootstrap-rtl.css');
}
// load optional rtl bootstrap css and bootstrap bugfixes
JHtmlBootstrap::loadCss( $includeMaincss = false, $this->direction);

// Add current user information
$user = JFactory::getUser();
Expand Down