Skip to content

Commit

Permalink
Use JHtml underscore method
Browse files Browse the repository at this point in the history
  • Loading branch information
SharkyKZ committed Jun 16, 2020
1 parent 4314047 commit 89ae9e3
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
Expand Up @@ -199,10 +199,10 @@
$this->fieldset = 'description';
$long_description = JLayoutHelper::render('joomla.edit.fieldset', $this);
if (!$long_description) {
$truncated = JHtmlString::truncate($short_description, 550, true, false);
$truncated = JHtml::_('string.truncate', $short_description, 550, true, false);
if (strlen($truncated) > 500) {
$long_description = $short_description;
$short_description = JHtmlString::truncate($truncated, 250);
$short_description = JHtml::_('string.truncate', $truncated, 250);
if ($short_description == $long_description) {
$long_description = '';
}
Expand Down
Expand Up @@ -77,10 +77,10 @@
$this->fieldset = 'description';
$long_description = JLayoutHelper::render('joomla.edit.fieldset', $this);
if (!$long_description) {
$truncated = JHtmlString::truncate($short_description, 550, true, false);
$truncated = JHtml::_('string.truncate', $short_description, 550, true, false);
if (strlen($truncated) > 500) {
$long_description = $short_description;
$short_description = JHtmlString::truncate($truncated, 250);
$short_description = JHtml::_('string.truncate', $truncated, 250);
if ($short_description == $long_description) {
$long_description = '';
}
Expand Down
Expand Up @@ -127,15 +127,15 @@
$self = $loggeduser->id == $item->id;

if ($canChange) :
echo JHtml::_('jgrid.state', JHtmlUsers::blockStates($self), $item->block, $i, 'users.', !$self);
echo JHtml::_('jgrid.state', JHtml::_('users.blockStates', $self), $item->block, $i, 'users.', !$self);
else :
echo JHtml::_('jgrid.state', JHtmlUsers::blockStates($self), $item->block, $i, 'users.', false);
echo JHtml::_('jgrid.state', JHtml::_('users.blockStates', $self), $item->block, $i, 'users.', false);
endif; ?>
</td>
<td class="center hidden-phone">
<?php
$activated = empty( $item->activation) ? 0 : 1;
echo JHtml::_('jgrid.state', JHtmlUsers::activateStates(), $activated, $i, 'users.', (boolean) $activated);
echo JHtml::_('jgrid.state', JHtml::_('users.activateStates', $activated, $i, 'users.', (boolean) $activated);
?>
</td>
<td>
Expand Down
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

JHtmlBehavior::core();
JHtml::_('behavior.core');
// Add specific helper files for html generation
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
$user = JFactory::getUser();
Expand Down
2 changes: 1 addition & 1 deletion layouts/joomla/sidebars/submenu.php
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;

JHtml::_('jquery.framework');
JHtmlBehavior::core();
JHtml::_('behavior.core');

JFactory::getDocument()->addScriptDeclaration('
jQuery(document).ready(function($)
Expand Down
12 changes: 6 additions & 6 deletions templates/beez3/html/com_contact/contact/default.php
Expand Up @@ -60,8 +60,8 @@
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_DETAILS'), 'basic-details'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtmlTabs::start('tabs', array('useCookie' => '1')); ?>
<?php echo JHtmlTabs::panel(JText::_('COM_CONTACT_DETAILS'), 'basic-details'); ?>
<?php echo JHtml::_('tabs.start', 'tabs', array('useCookie' => '1')); ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_DETAILS'), 'basic-details'); ?>

<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
Expand Down Expand Up @@ -97,7 +97,7 @@
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtmlTabs::panel(JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_EMAIL_FORM').'</h3>'; ?>
Expand All @@ -116,7 +116,7 @@
echo JHtml::_('sliders.panel', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtmlTabs::panel(JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php echo JHtml::_('tabs.panel', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('JGLOBAL_ARTICLES').'</h3>'; ?>
Expand All @@ -132,7 +132,7 @@
echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtmlTabs::panel(JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_PROFILE').'</h3>'; ?>
Expand All @@ -152,7 +152,7 @@
echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtmlTabs::panel(JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc'); ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_OTHER_INFORMATION').'</h3>'; ?>
Expand Down
2 changes: 1 addition & 1 deletion templates/beez3/html/com_contact/contact/default_links.php
Expand Up @@ -13,7 +13,7 @@
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_LINKS'), 'display-links'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtmlTabs::panel(JText::_('COM_CONTACT_LINKS'), 'display-links'); ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_LINKS'), 'display-links'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_LINKS').'</h3>'; ?>
Expand Down
Expand Up @@ -35,7 +35,7 @@
echo JHtml::_('sliders.panel', $groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS'), 'display-' . $id); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtmlTabs::panel($groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS'), 'display-' . $id); ?>
<?php echo JHtml::_('tabs.panel', $groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS'), 'display-' . $id); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>' . ($groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS')) . '</h3>'; ?>
Expand Down
2 changes: 1 addition & 1 deletion templates/protostar/component.php
Expand Up @@ -29,7 +29,7 @@
JHtml::_('stylesheet', 'template.css', array('version' => 'auto', 'relative' => true));

// Load optional rtl Bootstrap css and Bootstrap bugfixes
JHtmlBootstrap::loadCss($includeMaincss = false, $this->direction);
JHtml::_('bootstrap.loadCss', $includeMaincss = false, $this->direction);
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
Expand Down

0 comments on commit 89ae9e3

Please sign in to comment.