Skip to content

Commit

Permalink
Merge branch '4.0-dev' into refactor-system-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Dec 5, 2018
2 parents aee8b38 + 5df86bc commit 81ea316
Show file tree
Hide file tree
Showing 23 changed files with 78 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Session\Session;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

defined('JPATH_BASE') or die;

use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ListField;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\Utilities\ArrayHelper;

/**
* Category Edit field..
Expand Down
14 changes: 5 additions & 9 deletions administrator/components/com_fields/Model/GroupModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ public function save($data)
}

/**
<<<<<<< HEAD:administrator/components/com_fields/Model/GroupModel.php
=======
* Method to get a table object, load it if necessary.
*
* @param string $name The table name. Optional.
Expand All @@ -81,18 +79,16 @@ public function save($data)
* @since 3.7.0
* @throws Exception
*/
public function getTable($name = 'Group', $prefix = 'FieldsTable', $options = array())
public function getTable($name = 'Group', $prefix = 'Administrator', $options = array())
{
if (strpos(JPATH_COMPONENT, 'com_fields') === false)
{
$this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_fields/tables');
}
// Default to text type
$table = parent::getTable($name, $prefix, $options);
$table->type = 'text';

return JTable::getInstance($name, $prefix, $options);
return $table;
}

/**
>>>>>>> 3.8.7:administrator/components/com_fields/models/group.php
* Abstract method for getting the form from the model.
*
* @param array $data Data for the form.
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_fields/tmpl/group/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

$app = Factory::getApplication();
$input = $app->input;

$this->useCoreUI = true;

?>

<form action="<?php echo Route::_('index.php?option=com_fields&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="item-form" class="form-validate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\LayoutHelper;

?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
defined('_JEXEC') or die;

use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Component\Installer\Administrator\Helper\InstallerHelper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
defined('_JEXEC') or die;

use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;

/**
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_media/src/Model/FileModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\FormModel;
use Joomla\CMS\Plugin\PluginHelper;

Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_menus/Model/MenusModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Utilities\ArrayHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
Expand Down
3 changes: 1 addition & 2 deletions administrator/modules/mod_sampledata/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
Expand Down Expand Up @@ -57,6 +56,6 @@
</ul>
<?php else : ?>
<div class="alert alert-warning">
<?php echo JText::_('MOD_SAMPLEDATA_NOTAVAILABLE'); ?>
<?php echo Text::_('MOD_SAMPLEDATA_NOTAVAILABLE'); ?>
</div>
<?php endif; ?>
31 changes: 25 additions & 6 deletions administrator/templates/atum/scss/template-rtl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,37 @@ body {
border-radius: $border-radius 0 0 $border-radius;
}

.close {
float: left;
}

.parent .collapse-arrow::after {
right: auto;
left: 15px;
content: "\f0d9";
}

li a span {
float: right;
.has-arrow::after {
left: 1rem;
right: inherit;
transform: rotate(135deg) translate(0,-50%);
}

ul a::before {
right: 18px;
}

.active .no-dropdown .sidebar-item-title {
margin-right: 28px;
}

.dropdown-submenu .sidebar-item-title {
margin-right: 28px;
}

.dropdown-submenu .no-dropdown .sidebar-item-title {
margin-right: 44px;
}

ul ul a::before {
right: 34px;
left: 0;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
const updateInfoList = JSON.parse(response);

if (updateInfoList instanceof Array) {
const updateInfo = updateInfoList.shift();

if (updateInfo.version === options.version) {
if (updateInfoList.length === 0) {
// No updates
link.classList.add('success');
linkSpans.forEach((span) => {
span.innerHTML = Joomla.JText._('PLG_QUICKICON_JOOMLAUPDATE_UPTODATE');
});
} else {
const updateInfo = updateInfoList.shift();

if (updateInfo.version !== options.version) {
const messages = {
Expand All @@ -52,6 +51,7 @@
span.innerHTML = Joomla.JText._('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND').replace('%s', `<span class="badge badge-light"> \u200E ${updateInfo.version}</span>`);
});
} else {
link.classList.add('success');
linkSpans.forEach((span) => {
span.innerHTML = Joomla.JText._('PLG_QUICKICON_JOOMLAUPDATE_UPTODATE');
});
Expand Down
9 changes: 9 additions & 0 deletions installation/template/scss/template-rtl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,12 @@ textarea.noResize {
.j-install-last-step .fa {
display: inline;
}

.j-install-step-header span {
margin-left: 5px;
margin-right: auto; }

#jform_db_prefix {
direction: ltr;
text-align: right;
}
1 change: 0 additions & 1 deletion libraries/src/Extension/LegacyComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use Joomla\CMS\Filesystem\Path;
use Joomla\CMS\Menu\AbstractMenu;
use Joomla\CMS\MVC\Factory\LegacyFactory;
use Joomla\CMS\MVC\Factory\MVCFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Factory\MVCFactoryServiceInterface;

Expand Down
19 changes: 8 additions & 11 deletions libraries/src/MVC/Model/FormModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,16 @@ public function checkin($pk = null)
return false;
}

$checkedOutField = $table->getColumnAlias('checked_out');
$checkedOutTimeField = $table->getColumnAlias('checked_out_time');

// If there is no checked_out or checked_out_time field, just return true.
if (!$table->hasField($checkedOutField) || !$table->hasField($checkedOutTimeField))
if (!$table->hasField('checked_out') || !$table->hasField('checked_out_time'))
{
return true;
}

$checkedOutField = $table->getColumnAlias('checked_out');

// Check if this is the user having previously checked out the row.
if ($table->{$checkedOutField} > 0 && $table->{$checkedOutField} != $user->get('id') && !$user->authorise('core.admin', 'com_checkin'))
if ($table->$checkedOutField > 0 && $table->$checkedOutField != $user->get('id') && !$user->authorise('core.admin', 'com_checkin'))
{
$this->setError(Text::_('JLIB_APPLICATION_ERROR_CHECKIN_USER_MISMATCH'));

Expand Down Expand Up @@ -151,19 +150,17 @@ public function checkout($pk = null)
return false;
}

$checkedOutField = $table->getColumnAlias('checked_out');
$checkedOutTimeField = $table->getColumnAlias('checked_out_time');

// If there is no checked_out or checked_out_time field, just return true.
if (!$table->hasField($checkedOutField) || !$table->hasField($checkedOutTimeField))
if (!$table->hasField('checked_out') || !$table->hasField('checked_out_time'))
{
return true;
}

$user = Factory::getUser();
$user = Factory::getUser();
$checkedOutField = $table->getColumnAlias('checked_out');

// Check if this is the user having previously checked out the row.
if ($table->{$checkedOutField} > 0 && $table->{$checkedOutField} != $user->get('id'))
if ($table->$checkedOutField > 0 && $table->$checkedOutField != $user->get('id'))
{
$this->setError(Text::_('JLIB_APPLICATION_ERROR_CHECKOUT_USER_MISMATCH'));

Expand Down
1 change: 0 additions & 1 deletion libraries/src/MVC/View/ListView.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Object\CMSObject;
Expand Down
6 changes: 2 additions & 4 deletions libraries/src/Table/Nested.php
Original file line number Diff line number Diff line change
Expand Up @@ -1333,11 +1333,9 @@ public function rebuild($parentId = null, $leftId = 0, $level = 0, $path = '')
->where('parent_id = %d');

// If the table has an ordering field, use that for ordering.
$orderingField = $this->getColumnAlias('ordering');

if ($this->hasField($orderingField))
if ($this->hasField('ordering'))
{
$query->order('parent_id, ' . $this->_db->quoteName($orderingField) . ', lft');
$query->order('parent_id, ' . $this->_db->quoteName($this->getColumnAlias('ordering')) . ', lft');
}
else
{
Expand Down

0 comments on commit 81ea316

Please sign in to comment.