Skip to content

Commit

Permalink
Merge branch '4.3-dev' into activate_send_email
Browse files Browse the repository at this point in the history
  • Loading branch information
Quy committed Feb 21, 2023
2 parents d4375a8 + 000f357 commit 6b4ee8a
Show file tree
Hide file tree
Showing 169 changed files with 1,979 additions and 481 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ RoboFile.ini
/media/com_media/css/mediamanager.min.css.map

#cypress
/tests/cypress/screenshots
!/tests/cypress/screenshots/.gitkeep
/tests/cypress/videos
!/tests/cypress/videos/.gitkeep
/tests/cypress/output/screenshots
!/tests/cypress/output/screenshots/.gitkeep
/tests/cypress/output/videos
!/tests/cypress/output/videos/.gitkeep
cypress.config.js

# WebAuthn FIDO metadata cache
Expand Down
10 changes: 10 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -6527,6 +6527,16 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/plugins/fields/url/url.php',
'/plugins/fields/user/user.php',
'/plugins/fields/usergrouplist/usergrouplist.php',
// From 4.3.0-beta2 to 4.3.0-beta3
'/cypress.config.dist.js',
'/plugins/captcha/recaptcha/recaptcha.php',
'/plugins/captcha/recaptcha_invisible/recaptcha_invisible.php',
'/plugins/filesystem/local/local.php',
'/plugins/finder/categories/categories.php',
'/plugins/finder/contacts/contacts.php',
'/plugins/finder/content/content.php',
'/plugins/finder/newsfeeds/newsfeeds.php',
'/plugins/finder/tags/tags.php',
];

$folders = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,23 @@ public function association($contactid)
*/
public function featured($value, $i, $canChange = true)
{
Factory::getDocument()->getWebAssetManager()->useScript('list-view');

// Array of image, task, title, action
$states = [
0 => ['unfeatured', 'contacts.featured', 'COM_CONTACT_UNFEATURED', 'JGLOBAL_ITEM_FEATURE'],
1 => ['featured', 'contacts.unfeatured', 'JFEATURED', 'JGLOBAL_ITEM_UNFEATURE'],
];
$state = ArrayHelper::getValue($states, (int) $value, $states[1]);
$icon = $state[0] === 'featured' ? 'star featured' : 'circle';
$onclick = 'onclick="return Joomla.listItemTask(\'cb' . $i . '\',\'' . $state[1] . '\')"';
$tooltipText = Text::_($state[3]);

if (!$canChange) {
$onclick = 'disabled';
$tooltipText = Text::_($state[2]);
}

$html = '<button type="submit" class="tbody-icon' . ($value == 1 ? ' active' : '') . '"'
. ' aria-labelledby="cb' . $i . '-desc" ' . $onclick . '>'
$html = '<button type="button" class="js-grid-item-action tbody-icon' . ($value == 1 ? ' active' : '') . '"'
. ' aria-labelledby="cb' . $i . '-desc" data-item-id="cb' . $i . '" data-item-task="' . $state[1] . '">'
. '<span class="icon-' . $icon . '" aria-hidden="true"></span>'
. '</button>'
. '<div role="tooltip" id="cb' . $i . '-desc">' . $tooltipText . '</div>';
Expand Down
90 changes: 49 additions & 41 deletions administrator/components/com_contenthistory/tmpl/history/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@
Text::script('COM_CONTENTHISTORY_BUTTON_SELECT_TWO_VERSIONS', true);
Text::script('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST');

$inlineJS = <<<JS
document.querySelectorAll('.js-link-open-window').forEach((link) => link.addEventListener('click', (e) => {
e.preventDefault();
window.open(link.dataset.url, 'win2', 'width=800,height=600,resizable=yes,scrollbars=yes')
}));
JS;

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('multiselect')
->useScript('com_contenthistory.admin-history-modal');
->useScript('com_contenthistory.admin-history-modal')
->useScript('list-view')
->addInlineScript($inlineJS, [], ['type' => 'module']);
?>
<div class="container-popup">
<div id="subhead" class="subhead noshadow mb-3">
Expand Down Expand Up @@ -61,49 +70,48 @@
</tr>
</thead>
<tbody>
<?php $i = 0; ?>
<?php foreach ($this->items as $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->version_id, false, 'cid', 'cb', $item->save_date); ?>
</td>
<th scope="row">
<a class="save-date" onclick="window.open(this.href,'win2','width=800,height=600,resizable=yes,scrollbars=yes'); return false;"
href="<?php echo Route::_('index.php?option=com_contenthistory&view=preview&layout=preview&tmpl=component&' . Session::getFormToken() . '=1&version_id=' . $item->version_id); ?>">
<?php echo HTMLHelper::_('date', $item->save_date, Text::_('DATE_FORMAT_LC6')); ?>
</a>
<?php if ($item->sha1_hash == $hash) : ?>
<span class="icon-star" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('JCURRENT'); ?></span>
<?php endif; ?>
</th>
<td class="d-none d-md-table-cell">
<?php echo htmlspecialchars($item->version_note); ?>
</td>
<td>
<?php if ($item->keep_forever) : ?>
<button type="button" class="btn btn-secondary btn-sm" onclick="return Joomla.listItemTask('cb<?php echo $i; ?>','history.keep')">
<?php echo Text::_('JYES'); ?>
&nbsp;<span class="icon-lock" aria-hidden="true"></span>
</button>
<?php else : ?>
<button type="button" class="btn btn-secondary btn-sm" onclick="return Joomla.listItemTask('cb<?php echo $i; ?>','history.keep')">
<?php echo Text::_('JNO'); ?>
</button>
<?php endif; ?>
</td>
<td class="d-none d-md-table-cell">
<?php echo htmlspecialchars($item->editor); ?>
</td>
<td class="text-end">
<?php echo number_format((int) $item->character_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
<?php $i = 0; ?>
<?php foreach ($this->items as $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->version_id, false, 'cid', 'cb', $item->save_date); ?>
</td>
<th scope="row">
<a href="#" class="js-link-open-window save-date" data-url="<?php echo Route::_('index.php?option=com_contenthistory&view=preview&layout=preview&tmpl=component&' . Session::getFormToken() . '=1&version_id=' . $item->version_id); ?>">
<?php echo HTMLHelper::_('date', $item->save_date, Text::_('DATE_FORMAT_LC6')); ?>
</a>
<?php if ($item->sha1_hash == $hash) : ?>
<span class="icon-star" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('JCURRENT'); ?></span>
<?php endif; ?>
</th>
<td class="d-none d-md-table-cell">
<?php echo htmlspecialchars($item->version_note); ?>
</td>
<td>
<?php if ($item->keep_forever) : ?>
<button type="button" class="js-grid-item-action btn btn-secondary btn-sm" data-item-id="cb<?php echo $i; ?>" data-item-task="history.keep">
<?php echo Text::_('JYES'); ?>
&nbsp;<span class="icon-lock" aria-hidden="true"></span>
</button>
<?php else : ?>
<button type="button" class="js-grid-item-action btn btn-secondary btn-sm" data-item-id="cb<?php echo $i; ?>" data-item-task="history.keep">
<?php echo Text::_('JNO'); ?>
</button>
<?php endif; ?>
</td>
<td class="d-none d-md-table-cell">
<?php echo htmlspecialchars($item->editor); ?>
</td>
<td class="text-end">
<?php echo number_format((int) $item->character_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>

<?php // load the pagination. ?>
<?php /* load the pagination. */ ?>
<?php echo $this->pagination->getListFooter(); ?>

<input type="hidden" name="task" value="">
Expand Down
26 changes: 13 additions & 13 deletions administrator/components/com_finder/src/Response/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,103 +30,103 @@ class Response
* The buffer
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $buffer;

/**
* The memory
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $memory;

/**
* If it has an error
*
* @var bool
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $error;

/**
* The header
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $header;

/**
* The message
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $message;

/**
* The batch size
*
* @var int
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $batchSize;

/**
* The batch offset
*
* @var int
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $batchOffset;

/**
* The total items
*
* @var int
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $totalItems;

/**
* The plugin state
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $pluginState;

/**
* The start time
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $startTime;

/**
* The end time
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $endTime;

/**
* The start
*
* @var int
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $start;

/**
* The complete
*
* @var int
* @since __DEPLOY_VERSION__
* @since 4.3.0
*/
public $complete;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function discover_install()
$app->setUserState('com_installer.extension_message', $installer->get('extension_message'));

if (!$failed) {
$app->enqueueMessage(Text::_('COM_INSTALLER_MSG_DISCOVER_INSTALLSUCCESSFUL'));
$app->enqueueMessage(Text::_('COM_INSTALLER_MSG_DISCOVER_INSTALLSUCCESSFUL'), 'success');
}
} else {
$app->enqueueMessage(Text::_('COM_INSTALLER_MSG_DISCOVER_NOEXTENSIONSELECTED'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div
ref="browserItems"
class="media-browser"
:style="mediaBrowserStyles"
:style="getHeight"
@dragenter="onDragEnter"
@drop="onDrop"
@dragover="onDragOver"
Expand Down Expand Up @@ -119,6 +119,11 @@ export default {
];
},
/* The styles for the media-browser element */
getHeight() {
return {
height: this.$store.state.listView === 'table' && !this.isEmpty ? 'unset' : '100%',
};
},
mediaBrowserStyles() {
return {
width: this.$store.state.showInfoBar ? '75%' : '100%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
style="display: flex"
@click.stop
>
<tab-lock>
<Lock>
<div
class="modal-dialog"
:class="modalClass"
Expand All @@ -35,14 +35,19 @@
</div>
</div>
</div>
</tab-lock>
</Lock>
</div>
</div>
</template>

<script>
import Lock from 'vue-focus-lock/src/Lock.vue';
export default {
name: 'MediaModal',
components: {
Lock,
},
props: {
/* Whether or not the close button in the header should be shown */
showClose: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Helper\MediaHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Model\BaseModel;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\Component\Media\Administrator\Exception\FileExistsException;
use Joomla\Component\Media\Administrator\Exception\FileNotFoundException;
Expand Down Expand Up @@ -202,7 +204,7 @@ public function postFiles()
// A file needs to be created
$name = $this->getModel()->createFile($adapter, $name, $path, $mediaContent, $override);
} else {
// A file needs to be created
// A folder needs to be created
$name = $this->getModel()->createFolder($adapter, $name, $path, $override);
}

Expand Down Expand Up @@ -355,7 +357,9 @@ private function checkContent()
|| ($postMaxSize > 0 && $contentLength > $postMaxSize)
|| ($memoryLimit > -1 && $contentLength > $memoryLimit)
) {
throw new \Exception(Text::_('COM_MEDIA_ERROR_WARNFILETOOLARGE'), 403);
$link = 'index.php?option=com_config&view=component&component=com_media';
$output = HTMLHelper::_('link', Route::_($link), Text::_('JOPTIONS'));
throw new \Exception(Text::sprintf('COM_MEDIA_ERROR_WARNFILETOOLARGE', $output), 403);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ protected static function parseXmlNode($node, $replace = [])
$item->link = str_replace("{sql:$var}", $val, $item->link);
$item->class = str_replace("{sql:$var}", $val, $item->class);
$item->icon = str_replace("{sql:$var}", $val, $item->icon);
$params->set('menu-quicktask', str_replace("{sql:$var}", $val, $params->get('menu-quicktask')));
$params->set('menu-quicktask', str_replace("{sql:$var}", $val, $params->get('menu-quicktask', '')));
}

$item->setParams($params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public function &getModules()
*
* @return array
*
* @since _DEPLOY_VERSION__
* @since 4.2.0
*/
public function getMissingModuleLanguages(): array
{
Expand Down

0 comments on commit 6b4ee8a

Please sign in to comment.