Skip to content

Commit

Permalink
Usenamespaced classes for html/batch
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Lodder committed Jan 2, 2018
1 parent 06e0966 commit 923e1e0
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 32 deletions.
16 changes: 10 additions & 6 deletions layouts/joomla/html/batch/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,25 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/**
* Layout variables
* ---------------------
* None
*
* none
*/

?>
<label id="batch-access-lbl" for="batch-access" class="modalTooltip" title="<?php echo JHtml::_('tooltipText', 'JLIB_HTML_BATCH_ACCESS_LABEL', 'JLIB_HTML_BATCH_ACCESS_LABEL_DESC'); ?>">
<?php echo JText::_('JLIB_HTML_BATCH_ACCESS_LABEL'); ?></label>
<?php echo JHtml::_(
<label id="batch-access-lbl" for="batch-access" class="modalTooltip" title="<?php echo HTMLHelper::_('tooltipText', 'JLIB_HTML_BATCH_ACCESS_LABEL', 'JLIB_HTML_BATCH_ACCESS_LABEL_DESC'); ?>">
<?php echo Text::_('JLIB_HTML_BATCH_ACCESS_LABEL'); ?></label>
<?php echo HTMLHelper::_(
'access.assetgrouplist',
'batch[assetgroup_id]', '',
'class="custom-select"',
array(
'title' => JText::_('JLIB_HTML_BATCH_NOCHANGE'),
'id' => 'batch-access'
'title' => Text::_('JLIB_HTML_BATCH_NOCHANGE'),
'id' => 'batch-access'
)
); ?>
14 changes: 9 additions & 5 deletions layouts/joomla/html/batch/adminlanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/**
* Layout variables
* ---------------------
* None
*/

JFactory::getDocument()->addScriptDeclaration(
Factory::getDocument()->addScriptDeclaration(
'
jQuery(document).ready(function($){
if ($("#batch-category-id").length){var batchSelector = $("#batch-category-id");}
Expand All @@ -35,10 +39,10 @@
'
);
?>
<label id="batch-language-lbl" for="batch-language-id" class="modalTooltip" title="<?php echo JHtml::_('tooltipText', 'JLIB_HTML_BATCH_LANGUAGE_LABEL', 'JLIB_HTML_BATCH_LANGUAGE_LABEL_DESC'); ?>">
<?php echo JText::_('JLIB_HTML_BATCH_LANGUAGE_LABEL'); ?>
<label id="batch-language-lbl" for="batch-language-id" class="modalTooltip" title="<?php echo HTMLHelper::_('tooltipText', 'JLIB_HTML_BATCH_LANGUAGE_LABEL', 'JLIB_HTML_BATCH_LANGUAGE_LABEL_DESC'); ?>">
<?php echo Text::_('JLIB_HTML_BATCH_LANGUAGE_LABEL'); ?>
</label>
<select name="batch[language_id]" class="inputbox" id="batch-language-id">
<option value=""><?php echo JText::_('JLIB_HTML_BATCH_LANGUAGE_NOCHANGE'); ?></option>
<?php echo JHtml::_('select.options', JHtml::_('adminlanguage.existing', true, true), 'value', 'text'); ?>
<option value=""><?php echo Text::_('JLIB_HTML_BATCH_LANGUAGE_NOCHANGE'); ?></option>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('adminlanguage.existing', true, true), 'value', 'text'); ?>
</select>
17 changes: 10 additions & 7 deletions layouts/joomla/html/batch/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/**
* Layout variables
* ---------------------
Expand All @@ -20,18 +23,18 @@

// Create the copy/move options.
$options = array(
JHtml::_('select.option', 'c', JText::_('JLIB_HTML_BATCH_COPY')),
JHtml::_('select.option', 'm', JText::_('JLIB_HTML_BATCH_MOVE'))
HTMLHelper::_('select.option', 'c', Text::_('JLIB_HTML_BATCH_COPY')),
HTMLHelper::_('select.option', 'm', Text::_('JLIB_HTML_BATCH_MOVE'))
);
?>
<label id="batch-choose-action-lbl" for="batch-choose-action"><?php echo JText::_('JLIB_HTML_BATCH_MENU_LABEL'); ?></label>
<label id="batch-choose-action-lbl" for="batch-choose-action"><?php echo Text::_('JLIB_HTML_BATCH_MENU_LABEL'); ?></label>
<div id="batch-choose-action" class="control-group">
<select name="batch[category_id]" class="custom-select" id="batch-category-id">
<option value=""><?php echo JText::_('JLIB_HTML_BATCH_NO_CATEGORY'); ?></option>
<?php echo JHtml::_('select.options', JHtml::_('category.options', $extension)); ?>
<option value=""><?php echo Text::_('JLIB_HTML_BATCH_NO_CATEGORY'); ?></option>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('category.options', $extension)); ?>
</select>
</div>
<div id="batch-copy-move" class="control-group radio">
<?php echo JText::_('JLIB_HTML_BATCH_MOVE_QUESTION'); ?>
<?php echo JHtml::_('select.radiolist', $options, 'batch[move_copy]', '', 'value', 'text', 'm'); ?>
<?php echo Text::_('JLIB_HTML_BATCH_MOVE_QUESTION'); ?>
<?php echo HTMLHelper::_('select.radiolist', $options, 'batch[move_copy]', '', 'value', 'text', 'm'); ?>
</div>
14 changes: 9 additions & 5 deletions layouts/joomla/html/batch/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/**
* Layout variables
* ---------------------
* None
*/

JFactory::getDocument()->addScriptDeclaration(
Factory::getDocument()->addScriptDeclaration(
'
jQuery(document).ready(function($){
if ($("#batch-category-id").length){var batchSelector = $("#batch-category-id");}
Expand All @@ -35,10 +39,10 @@
'
);
?>
<label id="batch-language-lbl" for="batch-language-id" class="modalTooltip" title="<?php echo JHtml::_('tooltipText', 'JLIB_HTML_BATCH_LANGUAGE_LABEL', 'JLIB_HTML_BATCH_LANGUAGE_LABEL_DESC'); ?>">
<?php echo JText::_('JLIB_HTML_BATCH_LANGUAGE_LABEL'); ?>
<label id="batch-language-lbl" for="batch-language-id" class="modalTooltip" title="<?php echo HTMLHelper::_('tooltipText', 'JLIB_HTML_BATCH_LANGUAGE_LABEL', 'JLIB_HTML_BATCH_LANGUAGE_LABEL_DESC'); ?>">
<?php echo Text::_('JLIB_HTML_BATCH_LANGUAGE_LABEL'); ?>
</label>
<select name="batch[language_id]" class="custom-select" id="batch-language-id">
<option value=""><?php echo JText::_('JLIB_HTML_BATCH_LANGUAGE_NOCHANGE'); ?></option>
<?php echo JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text'); ?>
<option value=""><?php echo Text::_('JLIB_HTML_BATCH_LANGUAGE_NOCHANGE'); ?></option>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('contentlanguage.existing', true, true), 'value', 'text'); ?>
</select>
11 changes: 7 additions & 4 deletions layouts/joomla/html/batch/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/**
* Layout variables
* ---------------------
Expand All @@ -17,10 +20,10 @@

?>
<label id="batch-tag-lbl" for="batch-tag-id" class="modalTooltip" title="<?php
echo JHtml::_('tooltipText', 'JLIB_HTML_BATCH_TAG_LABEL', 'JLIB_HTML_BATCH_TAG_LABEL_DESC'); ?>">
<?php echo JText::_('JLIB_HTML_BATCH_TAG_LABEL'); ?>
echo HTMLHelper::_('tooltipText', 'JLIB_HTML_BATCH_TAG_LABEL', 'JLIB_HTML_BATCH_TAG_LABEL_DESC'); ?>">
<?php echo Text::_('JLIB_HTML_BATCH_TAG_LABEL'); ?>
</label>
<select name="batch[tag]" class="custom-select" id="batch-tag-id">
<option value=""><?php echo JText::_('JLIB_HTML_BATCH_TAG_NOCHANGE'); ?></option>
<?php echo JHtml::_('select.options', JHtml::_('tag.tags', array('filter.published' => array(1))), 'value', 'text'); ?>
<option value=""><?php echo Text::_('JLIB_HTML_BATCH_TAG_NOCHANGE'); ?></option>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('tag.tags', array('filter.published' => array(1))), 'value', 'text'); ?>
</select>
13 changes: 8 additions & 5 deletions layouts/joomla/html/batch/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/**
* Layout variables
* ---------------------
Expand All @@ -22,15 +25,15 @@

if ($noUser)
{
$optionNo = '<option value="0">' . JText::_('JLIB_HTML_BATCH_USER_NOUSER') . '</option>';
$optionNo = '<option value="0">' . Text::_('JLIB_HTML_BATCH_USER_NOUSER') . '</option>';
}
?>
<label id="batch-user-lbl" for="batch-user" class="modalTooltip" title="<?php
echo JHtml::_('tooltipText', 'JLIB_HTML_BATCH_USER_LABEL', 'JLIB_HTML_BATCH_USER_LABEL_DESC'); ?>">
<?php echo JText::_('JLIB_HTML_BATCH_USER_LABEL'); ?>
echo HTMLHelper::_('tooltipText', 'JLIB_HTML_BATCH_USER_LABEL', 'JLIB_HTML_BATCH_USER_LABEL_DESC'); ?>">
<?php echo Text::_('JLIB_HTML_BATCH_USER_LABEL'); ?>
</label>
<select name="batch[user_id]" class="custom-select" id="batch-user-id">
<option value=""><?php echo JText::_('JLIB_HTML_BATCH_USER_NOCHANGE'); ?></option>
<option value=""><?php echo Text::_('JLIB_HTML_BATCH_USER_NOCHANGE'); ?></option>
<?php echo $optionNo; ?>
<?php echo JHtml::_('select.options', JHtml::_('user.userlist'), 'value', 'text'); ?>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('user.userlist'), 'value', 'text'); ?>
</select>

0 comments on commit 923e1e0

Please sign in to comment.