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
5 changes: 5 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ module.exports = function(grunt) {
{ cwd: '<%= folder.node_module %>flying-focus-a11y/src/scss', src: ['*.scss'], dest: 'media/vendor/flying-focus-a11y/scss/', expand: true, filter: 'isFile'},
// flying-focus js files
{ expand: true, cwd: '<%= folder.node_module %>flying-focus-a11y/src/js', src: ['*.js'], dest: 'media/vendor/flying-focus-a11y/js/', filter: 'isFile'},
// json3 js files
{ expand: true, cwd: '<%= folder.node_module %>json3/lib', src: ['*.js'], dest: 'media/vendor/json3/js/', filter: 'isFile'},
// AES-js js files
{ expand: true, cwd: '<%= folder.node_module %>aes-js', src: ['*.js'], dest: 'media/vendor/aes-js/js/', filter: 'isFile'},
// JSDiff js files
{ expand: true, cwd: '<%= folder.node_module %>diff/dist', src: ['*.js'], dest: 'media/vendor/diff/js/', filter: 'isFile'},
// XPath polyfill js files
Expand All @@ -218,6 +222,7 @@ module.exports = function(grunt) {
{ src: ['<%= folder.node_module %>flying-focus-a11y/MIT-LICENSE.txt'], dest: 'media/vendor/flying-focus-a11y/MIT-LICENSE.txt'},
{ src: ['<%= folder.node_module %>diff/LICENSE'], dest: 'media/vendor/diff/LICENSE'},
{ src: ['<%= folder.node_module %>wicked-good-xpath/LICENSE'], dest: 'media/vendor/polyfills/wicked-good-xpath-LICENSE'},
{ src: ['<%= folder.node_module %>aes-js/LICENSE.txt'], dest: 'media/vendor/aes-js/LICENSE.txt'},
]
},
webcomponents: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
*/

defined('_JEXEC') or die;
?>

use Joomla\CMS\HTML\HTMLHelper;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using namespaced classes in layout views?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason not to?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure it's fine, I just didn't think we were doing that and sticking with \JHtml, etc, in the layouts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, basically that part needs to go out of core, it' only used in couple places, not needed to be part of the core, core should be just the API

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its fine to use the namespaced classes.

use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

?>
<fieldset>
<legend>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_COMPLETE_HEADING'); ?>
</legend>
<p class="alert alert-success">
<?php echo JText::sprintf('COM_JOOMLAUPDATE_VIEW_COMPLETE_MESSAGE', JVERSION); ?>
</p>
<legend><?php echo Text::_('COM_JOOMLAUPDATE_VIEW_COMPLETE_HEADING'); ?></legend>
<p class="alert alert-success"><?php echo Text::sprintf('COM_JOOMLAUPDATE_VIEW_COMPLETE_MESSAGE', JVERSION); ?></p>
</fieldset>
<form action="<?php echo JRoute::_('index.php?option=com_joomlaupdate'); ?>" method="post" id="adminForm">
<form action="<?php echo Route::_('index.php?option=com_joomlaupdate'); ?>" method="post" id="adminForm">
<input type="hidden" name="task" value="">
<?php echo JHtml::_('form.token'); ?>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,40 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Joomlaupdate\Administrator\View\Joomlaupdate\Html $this */
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

JHtml::_('jquery.framework');
JHtml::_('behavior.core');
JHtml::_('script', 'com_joomlaupdate/default.min.js', array('version' => 'auto', 'relative' => true));
JText::script('COM_INSTALLER_MSG_INSTALL_PLEASE_SELECT_A_PACKAGE', true);
JText::script('JYES');
JText::script('JNO');
JText::script('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_VERSION_MISSING');
JText::script('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN');
/** @var \Joomla\Component\Joomlaupdate\Administrator\View\Joomlaupdate\HtmlView $this */

$latestJoomlaVersion = $this->updateInfo['latest'];
HTMLHelper::_('behavior.core');
HTMLHelper::_('script', 'com_joomlaupdate/default.min.js', array('version' => 'auto', 'relative' => true));

JFactory::getDocument()->addScriptDeclaration(
<<<JS
var joomlaTargetVersion = '$latestJoomlaVersion';
JS
);
Text::script('COM_INSTALLER_MSG_INSTALL_PLEASE_SELECT_A_PACKAGE', true);
Text::script('JYES', true);
Text::script('JNO', true);
Text::script('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_VERSION_MISSING', true);
Text::script('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN', true);

?>
Factory::getDocument()->addScriptOptions('joomlaTargetVersion', $this->updateInfo['latest']);

?>
<div id="joomlaupdate-wrapper">
<?php if ($this->showUploadAndUpdate) : ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'joomlaupdate-tabs', array('active' => $this->shouldDisplayPreUpdateCheck() ? 'pre-update-check' : 'online-update')); ?>
<?php echo HTMLHelper::_('bootstrap.startTabSet', 'joomlaupdate-tabs', array('active' => $this->shouldDisplayPreUpdateCheck() ? 'pre-update-check' : 'online-update')); ?>
<?php if ($this->shouldDisplayPreUpdateCheck()) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'joomlaupdate-tabs', 'pre-update-check', JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_TAB_PRE_UPDATE_CHECK')); ?>
<?php echo HTMLHelper::_('bootstrap.addTab', 'joomlaupdate-tabs', 'pre-update-check', Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_TAB_PRE_UPDATE_CHECK')); ?>
<?php echo $this->loadTemplate('preupdatecheck'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo HTMLHelper::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.addTab', 'joomlaupdate-tabs', 'online-update', JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_TAB_ONLINE')); ?>
<?php echo HTMLHelper::_('bootstrap.addTab', 'joomlaupdate-tabs', 'online-update', Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_TAB_ONLINE')); ?>
<?php endif; ?>

<form enctype="multipart/form-data" action="index.php" method="post" id="adminForm">

<?php if ($this->selfUpdate) : ?>
<?php // If we have a self update notice to install it first! ?>
<?php JFactory::getApplication()->enqueueMessage(JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALL_SELF_UPDATE_FIRST'), 'error'); ?>
<?php Factory::getApplication()->enqueueMessage(Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALL_SELF_UPDATE_FIRST'), 'error'); ?>
<?php echo $this->loadTemplate('updatemefirst'); ?>
<?php else : ?>
<?php if ((!isset($this->updateInfo['object']->downloadurl->_data)
Expand All @@ -66,20 +63,20 @@
<input type="hidden" name="task" value="update.download">
<input type="hidden" name="option" value="com_joomlaupdate">

<?php echo JHtml::_('form.token'); ?>
<?php echo HTMLHelper::_('form.token'); ?>
</form>

<?php // Only Super Users have access to the Update & Install for obvious security reasons ?>
<?php if ($this->showUploadAndUpdate) : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'joomlaupdate-tabs', 'upload-update', JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_TAB_UPLOAD')); ?>
<?php echo HTMLHelper::_('bootstrap.endTab'); ?>
<?php echo HTMLHelper::_('bootstrap.addTab', 'joomlaupdate-tabs', 'upload-update', Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_TAB_UPLOAD')); ?>
<?php echo $this->loadTemplate('upload'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<?php echo HTMLHelper::_('bootstrap.endTab'); ?>
<?php echo HTMLHelper::_('bootstrap.endTabSet'); ?>
<?php endif; ?>

<div id="download-message" style="display:none">
<p class="nowarning"><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_DOWNLOAD_IN_PROGRESS'); ?></p>
<p class="nowarning"><?php echo Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_DOWNLOAD_IN_PROGRESS'); ?></p>
<div class="joomlaupdate_spinner"></div>
</div>
<div id="loading"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,22 @@
*/
defined('_JEXEC') or die;

/** @var \Joomla\Component\Joomlaupdate\Administrator\View\Joomlaupdate\Html $this */
?>
use Joomla\CMS\Language\Text;

/** @var \Joomla\Component\Joomlaupdate\Administrator\View\Joomlaupdate\HtmlView $this */

?>
<fieldset>
<?php if (!$this->getModel()->isDatabaseTypeSupported()) : ?>
<legend>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_DB_NOT_SUPPORTED'); ?>
</legend>
<p>
<?php echo JText::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_DB_NOT_SUPPORTED_DESC', $this->updateInfo['latest']); ?>
</p>
<legend><?php echo Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_DB_NOT_SUPPORTED'); ?></legend>
<p><?php echo Text::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_DB_NOT_SUPPORTED_DESC', $this->updateInfo['latest']); ?></p>
<?php endif; ?>
<?php if (!$this->getModel()->isPhpVersionSupported()) : ?>
<legend>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_PHP_VERSION_NOT_SUPPORTED'); ?>
</legend>
<p>
<?php echo JText::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_PHP_VERSION_NOT_SUPPORTED_DESC', $this->updateInfo['latest']); ?>
</p>
<legend><?php echo Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_PHP_VERSION_NOT_SUPPORTED'); ?></legend>
<p><?php echo Text::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_PHP_VERSION_NOT_SUPPORTED_DESC', $this->updateInfo['latest']); ?></p>
<?php endif; ?>
<?php if (!isset($this->updateInfo['object']->downloadurl->_data) && $this->updateInfo['installed'] < $this->updateInfo['latest'] && $this->getModel()->isPhpVersionSupported() && $this->getModel()->isDatabaseTypeSupported()) : ?>
<legend>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL'); ?>
</legend>
<p>
<?php echo JText::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL_DESC', $this->updateInfo['latest']); ?>
</p>
<legend><?php echo Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL'); ?></legend>
<p><?php echo Text::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL_DESC', $this->updateInfo['latest']); ?></p>
<?php endif; ?>


</fieldset>
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,24 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Joomlaupdate\Administrator\View\Joomlaupdate\Html $this */
use Joomla\CMS\Language\Text;

/** @var \Joomla\Component\Joomlaupdate\Administrator\View\Joomlaupdate\HtmlView $this */
?>

<h2>
<?php echo JText::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_COMPATIBILITY_CHECK', $this->updateInfo['latest']); ?>
</h2>
<h2><?php echo Text::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_COMPATIBILITY_CHECK', $this->updateInfo['latest']); ?></h2>

<div class="row-fluid">
<fieldset class="span6">
<legend>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_PREUPDATE_CHECK'); ?>
</legend>
<legend><?php echo Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_PREUPDATE_CHECK'); ?></legend>
<table class="table">
<tbody>
<?php foreach ($this->phpOptions as $option) : ?>
<tr>
<td>
<?php echo $option->label; ?>
</td>
<td><?php echo $option->label; ?></td>
<td>
<span class="label label-<?php echo $option->state ? 'success' : 'important'; ?>">
<?php echo JText::_($option->state ? 'JYES' : 'JNO'); ?>
<?php echo Text::_($option->state ? 'JYES' : 'JNO'); ?>
<?php if ($option->notice) : ?>
<span class="icon-info icon-white hasTooltip" title="<?php echo $option->notice; ?>"></span>
<?php endif; ?>
Expand All @@ -43,36 +39,22 @@
</fieldset>

<fieldset class="span6">
<legend>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_RECOMMENDED_SETTINGS'); ?>
</legend>
<p>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_RECOMMENDED_SETTINGS_DESC'); ?>
</p>
<legend><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_RECOMMENDED_SETTINGS'); ?></legend>
<p><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_RECOMMENDED_SETTINGS_DESC'); ?></p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Text instead of JText


<table class="table">
<thead>
<tr>
<td>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_DIRECTIVE'); ?>
</td>
<td>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_RECOMMENDED'); ?>
</td>
<td>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_ACTUAL'); ?>
</td>
<td><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_DIRECTIVE'); ?></td>
<td><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_RECOMMENDED'); ?></td>
<td><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_ACTUAL'); ?></td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Text instead of JText

</tr>
</thead>
<tbody>
<?php foreach ($this->phpSettings as $setting) : ?>
<tr>
<td>
<?php echo $setting->label; ?>
</td>
<td>
<?php echo JText::_($setting->recommended ? 'JON' : 'JOFF'); ?>
</td>
<td><?php echo $setting->label; ?></td>
<td><?php echo JText::_($setting->recommended ? 'JON' : 'JOFF'); ?></td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Text instead of JText

<td>
<span class="label label-<?php echo ($setting->state === $setting->recommended) ? 'success' : 'warning'; ?>">
<?php echo JText::_($setting->state ? 'JON' : 'JOFF'); ?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Text instead of JText

Expand All @@ -87,38 +69,26 @@

<div class="row-fluid">
<fieldset class="span6">
<legend>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS'); ?>
</legend>
<legend><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSIONS'); ?></legend>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Text instead of JText


<table class="table">
<thead>
<tr>
<td>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NAME'); ?>
</td>
<td>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_COMPATIBLE'); ?>
</td>
<td>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_INSTALLED_VERSION'); ?>
</td>
<td><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_NAME'); ?></td>
<td><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_COMPATIBLE'); ?></td>
<td><?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_INSTALLED_VERSION'); ?></td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Text instead of JText

</tr>
</thead>
<tbody>
<?php foreach ($this->nonCoreExtensions as $extension) : ?>
<tr>
<td>
<?php echo JText::_($extension->name); ?>
</td>
<td><?php echo JText::_($extension->name); ?></td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Text instead of JText

<td class="extension-check"
data-extension-id="<?php echo $extension->extension_id; ?>"
data-extension-current-version="<?php echo $extension->version; ?>">
<img src="../media/system/images/mootree_loader.gif" />
</td>
<td>
<?php echo $extension->version; ?>
</td>
<td><?php echo $extension->version; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
Expand Down
Loading