Skip to content

Commit

Permalink
Merge branch '4.0-dev' into 4.0_menu_accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
infograf768 committed Nov 19, 2019
2 parents 388fe3f + cb00087 commit daccdf6
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<div class="row">
<!-- Begin Sidebar -->
<div id="sidebar" class="col-md-3">
<button class="btn btn-sm btn-secondary my-2 options-menu d-md-none" type="button" data-toggle="collapse" data-target=".sidebar-nav" aria-controls="sidebar-nav" aria-expanded="false" aria-label="<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>">
<button class="btn btn-sm btn-secondary my-2 options-menu d-md-none" type="button" data-toggle="collapse" data-target=".sidebar-nav" aria-controls="sidebar-nav" aria-expanded="false" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
<span class="fas fa-align-justify" aria-hidden="true"></span>
<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>
<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>
</button>
<div class="sidebar-nav bg-light p-2 my-2">
<?php echo $this->loadTemplate('navigation'); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@

<?php // Begin Sidebar ?>
<div class="col-md-3" id="sidebar">
<button class="btn btn-sm btn-secondary my-2 options-menu d-md-none" type="button" data-toggle="collapse" data-target=".sidebar-nav" aria-controls="sidebar-nav" aria-expanded="false" aria-label="<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>">
<button class="btn btn-sm btn-secondary my-2 options-menu d-md-none" type="button" data-toggle="collapse" data-target=".sidebar-nav" aria-controls="sidebar-nav" aria-expanded="false" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
<span class="fas fa-align-justify" aria-hidden="true"></span>
<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>
<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>
</button>
<div class="sidebar-nav bg-light p-2 my-2">
<?php echo $this->loadTemplate('navigation'); ?>
Expand Down
3 changes: 2 additions & 1 deletion administrator/language/en-GB/en-GB.ini
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,10 @@ JSEARCH_FILTER="Search"
JSEARCH_TITLE="Search %s"
JSEARCH_RESET="Reset"

JTOGGLE_SIDEBAR_LABEL="Sidebar"
JTOGGLE_HIDE_SIDEBAR="Hide the sidebar"
JTOGGLE_SHOW_SIDEBAR="Show the sidebar"
JTOGGLE_SIDEBAR_LABEL="Sidebar"
JTOGGLE_SIDEBAR_MENU="Toggle Menu"

JTOOLBAR_APPLY="Save"
JTOOLBAR_ARCHIVE="Archive"
Expand Down
1 change: 0 additions & 1 deletion administrator/language/en-GB/en-GB.tpl_atum.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ TPL_ATUM_LOGIN_SITE_TITLE="%s - Administrator Login"
TPL_ATUM_SITENAME_LABEL="Site Name"
TPL_ATUM_SITE_LOGO_LABEL="Site Logo"
TPL_ATUM_SITE_LOGO_SMALL_LABEL="Small Site Logo"
TPL_ATUM_TOGGLE_SIDEBAR="Toggle Menu"
TPL_ATUM_TOOLBAR="Toolbar"
TPL_ATUM_XML_DESCRIPTION="Continuing the Egyptian god/goddess theme (Khepri from 1.5, Hathor from 1.6, Isis from 3.0), Atum is the name of the Joomla 4 administrator template."
17 changes: 17 additions & 0 deletions administrator/modules/mod_messages/mod_messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,21 @@

use Joomla\CMS\Helper\ModuleHelper;

// Try to get the items from the messages model
try
{
$messagesModel = new \Joomla\Component\Messages\Administrator\Model\MessagesModel(['ignore_request' => true]);
$messagesModel->setState('filter.state', 0);
$messages = $messagesModel->getItems();
}
catch (RuntimeException $e)
{
$messages = [];

// Still render the error message from the Exception object
$app->enqueueMessage($e->getMessage(), 'error');
}

$countUnread = count($messages);

require ModuleHelper::getLayoutPath('mod_messages', $params->get('layout', 'default'));
1 change: 0 additions & 1 deletion administrator/modules/mod_messages/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<div class="tiny">
<?php echo Text::_('MOD_MESSAGES_PRIVATE_MESSAGES'); ?>
</div>
<?php $countUnread = $app->getSession()->get('messages.unread'); ?>
<?php if ($countUnread > 0) : ?>
<span class="badge badge-pill badge-danger"><?php echo $countUnread; ?></span>
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion administrator/templates/atum/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<div class="sidebar-toggle">
<a id="menu-collapse" href="#">
<span id="menu-collapse-icon" class="fa fa-toggle-off fa-fw" aria-hidden="true"></span>
<span class="sidebar-item-title"><?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?></span>
<span class="sidebar-item-title"><?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?></span>
</a>
</div>
<jdoc:include type="modules" name="menu" style="none" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ window.customElements.define('joomla-field-fancy-select', class extends HTMLElem

this.isDisconnected = false;

// Add placeholder option for multiple mode,
// Because it not supported as parameter by Choices for <select> https://github.com/jshjohnson/Choices#placeholder
if (this.select.multiple && this.placeholder) {
const option = document.createElement('option');
option.setAttribute('placeholder', '');
option.textContent = this.placeholder;
this.select.appendChild(option);
}

// Init Choices
this.choicesInstance = new Choices(this.select, {
placeholderValue: this.placeholder,
Expand Down
4 changes: 2 additions & 2 deletions layouts/joomla/sidebars/submenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<?php if ($displayData->displayMenu || $displayData->displayFilters) : ?>
<div id="j-toggle-sidebar-wrapper">
<div id="sidebar" class="sidebar">
<button class="btn btn-sm btn-secondary my-2 options-menu d-md-none" type="button" data-toggle="collapse" data-target=".sidebar-nav" aria-controls="sidebar-nav" aria-expanded="false" aria-label="<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>">
<button class="btn btn-sm btn-secondary my-2 options-menu d-md-none" type="button" data-toggle="collapse" data-target=".sidebar-nav" aria-controls="sidebar-nav" aria-expanded="false" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
<span class="fas fa-align-justify" aria-hidden="true"></span>
<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>
<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>
</button>
<div class="sidebar-nav bg-light p-2 my-2">
<?php if ($displayData->displayMenu) : ?>
Expand Down
47 changes: 17 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@webcomponents/webcomponentsjs": "2.1.2",
"awesomplete": "1.1.4",
"bootstrap": "~4.3",
"choices.js": "^7.0.0",
"choices.js": "^9.0.0",
"chosen-js": "1.6.2",
"codemirror": "5.40.0",
"cropperjs": "1.2.2",
Expand Down

0 comments on commit daccdf6

Please sign in to comment.