Skip to content

Commit

Permalink
[4.0] Update Bootstrap to beta-1 (#17496)
Browse files Browse the repository at this point in the history
* Initial update to BS4

* Call Popper instead of Tether

* Trailing new line

* Start cards and badges

* Finish badge colours

* Colour migration + import correct popper.js file

* remove tab files

* Colour migration for Aurora

* Update classes in SQL files

* Update to new font-size variables

* Toolbar fixes

* Gutter fix

* Fix nav in Aurora

* Fix content top margin

* fix class in sample data

* Move to popper.js in unit tests

* fix conflict on debugger

* Grid fixes (thanks Ciaran)
  • Loading branch information
C-Lodder authored and wilsonge committed Aug 23, 2017
1 parent e91f20a commit 9317866
Show file tree
Hide file tree
Showing 200 changed files with 11,913 additions and 12,057 deletions.
26 changes: 13 additions & 13 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = function(grunt) {
src: [
'media/vendor/jquery/js/*',
'media/vendor/bootstrap/**',
'media/vendor/tether/**',
'media/vendor/popper/**',
'media/vendor/jcrop/**',
'media/vendor/dragula/**',
'media/vendor/font-awesome/**',
Expand Down Expand Up @@ -139,33 +139,33 @@ module.exports = function(grunt) {
{ expand: true, cwd: '<%= folder.node_module %>jquery/dist/', src: ['*', '!(core.js)'], dest: 'media/vendor/jquery/js/', filter: 'isFile'},
// jQuery js migrate files
{ expand: true, cwd: '<%= folder.node_module %>jquery-migrate/dist/', src: ['**'], dest: 'media/vendor/jquery/js/', filter: 'isFile'},
//Bootastrap js files
// Bootastrap js files
{ expand: true, cwd: '<%= folder.node_module %>bootstrap/dist/js/', src: ['**'], dest: 'media/vendor/bootstrap/js/', filter: 'isFile'},
//Bootastrap scss files
// Bootastrap scss files
{ expand: true, cwd: '<%= folder.node_module %>bootstrap/scss/', src: ['**'], dest: 'media/vendor/bootstrap/scss/', filter: 'isFile'},
//Bootastrap css files
// Bootastrap css files
{ expand: true, cwd: '<%= folder.node_module %>bootstrap/dist/css/', src: ['**'], dest: 'media/vendor/bootstrap/css/', filter: 'isFile'},
//Teether js files
{ expand: true, cwd: '<%= folder.node_module %>tether/dist/js/', src: ['**'], dest: 'media/vendor/tether/js/', filter: 'isFile'},
// Popper js files
{ expand: true, cwd: '<%= folder.node_module %>popper.js/dist/umd/', src: ['*.js'], dest: 'media/vendor/popper/js/', filter: 'isFile'},
// Punycode js files
{ expand: true, cwd: '<%= folder.node_module %>punycode/', src: ['punycode.js', 'LICENSE-MIT.txt'], dest: 'media/vendor/punycode/js/', filter: 'isFile'},
// Cropperjs css files
{ expand: true, cwd: '<%= folder.node_module %>cropperjs/dist', src: ['*.css'], dest: 'media/vendor/cropperjs/css/', filter: 'isFile'},
// Cropperjs js files
{ expand: true, cwd: '<%= folder.node_module %>cropperjs/dist', src: ['*.js'], dest: 'media/vendor/cropperjs/js/', filter: 'isFile'},
//Font Awesome css files
// Font Awesome css files
{ expand: true, cwd: '<%= folder.node_module %>font-awesome/css/', src: ['**'], dest: 'media/vendor/font-awesome/css/', filter: 'isFile'},
//Font Awesome scss files
// Font Awesome scss files
{ expand: true, cwd: '<%= folder.node_module %>font-awesome/scss/', src: ['**'], dest: 'media/vendor/font-awesome/scss/', filter: 'isFile'},
//Font Awesome fonts files
// Font Awesome fonts files
{ expand: true, cwd: '<%= folder.node_module %>font-awesome/fonts/', src: ['**'], dest: 'media/vendor/font-awesome/fonts/', filter: 'isFile'},
// tinyMCE plugins
// TinyMCE plugins
{ expand: true, cwd: '<%= folder.node_module %>tinymce/plugins/', src: ['**'], dest: 'media/vendor/tinymce/plugins/', filter: 'isFile'},
// tinyMCE skins
// TinyMCE skins
{ expand: true, cwd: '<%= folder.node_module %>tinymce/skins/', src: ['**'], dest: 'media/vendor/tinymce/skins/', filter: 'isFile'},
// tinyMCE themes
// TinyMCE themes
{ expand: true, cwd: '<%= folder.node_module %>tinymce/themes/', src: ['**'], dest: 'media/vendor/tinymce/themes/', filter: 'isFile'},
// tinyMCE js files
// TinyMCE js files
{ expand: true, cwd: '<%= folder.node_module %>tinymce/', src: ['tinymce.js','tinymce.min.js','license.txt','changelog.txt'], dest: 'media/vendor/tinymce/', filter: 'isFile'},
// Code mirror addon files
{ expand: true, cwd: '<%= folder.node_module %>codemirror/addon/', src: ['**'], dest: 'media/vendor/codemirror/addon/', filter: 'isFile'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId
$additional = '<strong>' . \JText::sprintf('COM_MENUS_MENU_SPRINTF', $menutype_title) . '</strong><br>';
}

$labelClass = 'badge-association';
$labelClass = 'badge-secondary';
$target = $langCode . ':' . $items[$langCode]['id'] . ':edit';
$allow = $canEditReference
&& self::allowEdit($extensionName, $typeName, $items[$langCode]['id'])
Expand Down Expand Up @@ -279,7 +279,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId
$text = strtoupper($language->sef);

$tooltip = htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '<br><br>' . $additional;
$classes = 'hasPopover badge ' . $labelClass . ' badge-' . $language->sef;
$classes = 'hasPopover badge ' . $labelClass;

$items[$langCode]['link'] = '<a href="' . $url . '" title="' . $language->title . '" class="' . $classes
. '" data-content="' . $tooltip . '" data-placement="top">'
Expand Down
6 changes: 4 additions & 2 deletions administrator/components/com_banners/tmpl/banner/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@
?>
</div>
<div class="col-md-3">
<div class="card card-block card-light">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
<div class="card card-light">
<div class="card-body">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions administrator/components/com_banners/tmpl/client/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
?>
</div>
<div class="col-md-3">
<div class="card card-block card-light">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
<div class="card card-light">
<div class="card-body">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function association($catid, $extension = 'com_content')
{
$text = $item->lang_sef ? strtoupper($item->lang_sef) : 'XX';
$url = JRoute::_('index.php?option=com_categories&task=category.edit&id=' . (int) $item->id . '&extension=' . $extension);
$classes = 'hasPopover badge badge-association badge-' . $item->lang_sef;
$classes = 'hasPopover badge badge-secondary';
$item->link = '<a href="' . $url . '" title="' . $item->language_title . '" class="' . $classes
. '" data-content="' . htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8') . '" data-placement="top">'
. $text . '</a>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,25 +221,25 @@
</td>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_published')) : ?>
<td class="text-center btns hidden-sm-down">
<a class="badge <?php echo ($item->count_published > 0) ? 'badge-success' : 'badge-default'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php echo ($item->count_published > 0) ? 'badge-success' : 'badge-secondary'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_published; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_unpublished')) : ?>
<td class="text-center btns hidden-sm-down">
<a class="badge <?php echo ($item->count_unpublished > 0) ? 'badge-danger' : 'badge-default'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php echo ($item->count_unpublished > 0) ? 'badge-danger' : 'badge-secondary'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_unpublished; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_archived')) : ?>
<td class="text-center btns hidden-sm-down">
<a class="badge <?php echo ($item->count_archived > 0) ? 'badge-info' : 'badge-default'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php echo ($item->count_archived > 0) ? 'badge-info' : 'badge-secondary'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_archived; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_trashed')) : ?>
<td class="text-center btns hidden-sm-down">
<a class="badge <?php echo ($item->count_trashed > 0) ? 'badge-inverse' : 'badge-default'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php echo ($item->count_trashed > 0) ? 'badge-inverse' : 'badge-secondary'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_trashed; ?></a>
</td>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@
<?php echo $this->form->getInput('description'); ?>
</div>
<div class="col-md-3">
<div class="card card-block card-light">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
<div class="card card-light">
<div class="card-body">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</label>
</td>
<td>
<span class="badge badge-default"><?php echo $count; ?></span>
<span class="badge badge-secondary"><?php echo $count; ?></span>
</td>
</tr>
<?php $i++; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static function association($contactid)
$text = strtoupper($item->lang_sef);
$url = JRoute::_('index.php?option=com_contact&task=contact.edit&id=' . (int) $item->id);
$tooltip = htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8') . '<br>' . JText::sprintf('JCATEGORY_SPRINTF', $item->category_title);
$classes = 'hasPopover badge badge-association badge-' . $item->lang_sef;
$classes = 'hasPopover badge badge-secondary';

$item->link = '<a href="' . $url . '" title="' . $item->language_title . '" class="' . $classes
. '" data-content="' . $tooltip . '" data-placement="top">'
Expand Down
6 changes: 4 additions & 2 deletions administrator/components/com_contact/tmpl/contact/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@
</div>
</div>
<div class="col-md-3">
<div class="card card-block card-light">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
<div class="card card-light">
<div class="card-body">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static function association($articleid)
$text = $item->lang_sef ? strtoupper($item->lang_sef) : 'XX';
$url = JRoute::_('index.php?option=com_content&task=article.edit&id=' . (int) $item->id);
$tooltip = htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8') . '<br>' . JText::sprintf('JCATEGORY_SPRINTF', $item->category_title);
$classes = 'hasPopover badge badge-association badge-' . $item->lang_sef;
$classes = 'hasPopover badge badge-secondary';

$item->link = '<a href="' . $url . '" title="' . $item->language_title . '" class="' . $classes
. '" data-content="' . $tooltip . '" data-placement="top">'
Expand Down
6 changes: 4 additions & 2 deletions administrator/components/com_content/tmpl/article/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
</fieldset>
</div>
<div class="col-md-3">
<div class="card card-block card-light">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
<div class="card card-light">
<div class="card-body">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
</div>
</div>
Expand Down
34 changes: 18 additions & 16 deletions administrator/components/com_fields/tmpl/field/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,25 @@

</div>
<div class="col-md-3">
<div class="card card-block card-light">
<?php $this->set('fields',
array(
<div class="card card-light">
<div class="card-body">
<?php $this->set('fields',
array(
'published',
'state',
'enabled',
),
'group_id',
'assigned_cat_ids',
'access',
'language',
'note',
)
); ?>
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
<?php $this->set('fields', null); ?>
array(
'published',
'state',
'enabled',
),
'group_id',
'assigned_cat_ids',
'access',
'language',
'note',
)
); ?>
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
<?php $this->set('fields', null); ?>
</div>
</div>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions administrator/components/com_finder/tmpl/filter/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
<?php echo JHtml::_('filter.slider', array('selected_nodes' => $this->filter->data)); ?>
</div>
<div class="col-md-3">
<div class="card card-block card-light">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
<div class="card card-light">
<div class="card-body">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_menus/helpers/html/menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static function association($itemid)
$text = strtoupper($item->lang_sef);
$url = JRoute::_('index.php?option=com_menus&task=item.edit&id=' . (int) $item->id);
$tooltip = htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8') . '<br>' . JText::sprintf('COM_MENUS_MENU_SPRINTF', $item->menu_title);
$classes = 'hasPopover badge badge-association badge-' . $item->lang_sef;
$classes = 'hasPopover badge badge-secondary';

$item->link = '<a href="' . $url . '" title="' . $item->language_title . '" class="' . $classes
. '" data-content="' . $tooltip . '" data-placement="top">'
Expand Down Expand Up @@ -251,6 +251,6 @@ public static function visibility($params)

$show_menu = $registry->get('menu_show');

return ($show_menu === 0) ? '<span class="badge badge-default">' . JText::_('COM_MENUS_LABEL_HIDDEN') . '</span>' : '';
return ($show_menu === 0) ? '<span class="badge badge-secondary">' . JText::_('COM_MENUS_LABEL_HIDDEN') . '</span>' : '';
}
}
46 changes: 24 additions & 22 deletions administrator/components/com_menus/tmpl/item/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,30 @@
?>
</div>
<div class="col-md-3">
<div class="card card-block card-light">
<?php
// Set main fields.
$this->fields = array(
'id',
'client_id',
'menutype',
'parent_id',
'menuordering',
'published',
'home',
'access',
'language',
'note',
);

if ($this->item->type != 'component')
{
$this->fields = array_diff($this->fields, array('home'));
}

echo JLayoutHelper::render('joomla.edit.global', $this); ?>
<div class="card card-light">
<div class="card-body">
<?php
// Set main fields.
$this->fields = array(
'id',
'client_id',
'menutype',
'parent_id',
'menuordering',
'published',
'home',
'access',
'language',
'note',
);

if ($this->item->type != 'component')
{
$this->fields = array_diff($this->fields, array('home'));
}

echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions administrator/components/com_menus/tmpl/menus/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,28 +111,28 @@
</td>
<td class="text-center btns">
<?php if ($canManageItems) : ?>
<a class="badge<?php echo ($item->count_published > 0) ? ' badge-success' : ' badge-default'; ?>" href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype . '&filter[published]=1'); ?>">
<a class="badge<?php echo ($item->count_published > 0) ? ' badge-success' : ' badge-secondary'; ?>" href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype . '&filter[published]=1'); ?>">
<?php echo $item->count_published; ?></a>
<?php else : ?>
<span class="badge<?php echo ($item->count_published > 0) ? ' badge-success' : ' badge-default'; ?>">
<span class="badge<?php echo ($item->count_published > 0) ? ' badge-success' : ' badge-secondary'; ?>">
<?php echo $item->count_published; ?></span>
<?php endif; ?>
</td>
<td class="text-center btns">
<?php if ($canManageItems) : ?>
<a class="badge<?php echo ($item->count_unpublished > 0) ? ' badge-danger' : ' badge-default'; ?>" href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype . '&filter[published]=0'); ?>">
<a class="badge<?php echo ($item->count_unpublished > 0) ? ' badge-danger' : ' badge-secondary'; ?>" href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype . '&filter[published]=0'); ?>">
<?php echo $item->count_unpublished; ?></a>
<?php else : ?>
<span class="badge<?php echo ($item->count_unpublished > 0) ? ' badge-danger' : ' badge-default'; ?>">
<span class="badge<?php echo ($item->count_unpublished > 0) ? ' badge-danger' : ' badge-secondary'; ?>">
<?php echo $item->count_unpublished; ?></span>
<?php endif; ?>
</td>
<td class="text-center btns">
<?php if ($canManageItems) : ?>
<a class="badge<?php echo ($item->count_trashed > 0) ? ' badge-danger' : ' badge-default'; ?>" href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype . '&filter[published]=-2'); ?>">
<a class="badge<?php echo ($item->count_trashed > 0) ? ' badge-danger' : ' badge-secondary'; ?>" href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype . '&filter[published]=-2'); ?>">
<?php echo $item->count_trashed; ?></a>
<?php else : ?>
<span class="badge<?php echo ($item->count_trashed > 0) ? ' badge-danger' : ' badge-default'; ?>">
<span class="badge<?php echo ($item->count_trashed > 0) ? ' badge-danger' : ' badge-secondary'; ?>">
<?php echo $item->count_trashed; ?></span>
<?php endif; ?>
</td>
Expand Down
Loading

0 comments on commit 9317866

Please sign in to comment.