Skip to content

Commit

Permalink
[4.0] Remove tooltip from add-new-buttons (#34601)
Browse files Browse the repository at this point in the history
  • Loading branch information
chmst authored Jun 30, 2021
1 parent cef365d commit 7f5dd8e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
13 changes: 9 additions & 4 deletions administrator/components/com_contact/src/Service/HTML/Icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ public static function create($category, $params, $attribs = array())

$url = 'index.php?option=com_contact&task=contact.add&return=' . base64_encode($uri) . '&id=0&catid=' . $category->id;

$text = LayoutHelper::render('joomla.content.icons.create', array('params' => $params, 'legacy' => false));
$text = '';

if ($params->get('show_icons'))
{
$text .= '<span class="icon-plus icon-fw" aria-hidden="true"></span>';
}

$text .= Text::_('COM_CONTACT_NEW_CONTACT');

// Add the button classes to the attribs array
if (isset($attribs['class']))
Expand All @@ -80,9 +87,7 @@ public static function create($category, $params, $attribs = array())

$button = HTMLHelper::_('link', Route::_($url), $text, $attribs);

$output = '<span class="hasTooltip" title="' . HTMLHelper::_('tooltipText', 'COM_CONTACT_CREATE_CONTACT') . '">' . $button . '</span>';

return $output;
return $button;
}

/**
Expand Down
13 changes: 9 additions & 4 deletions administrator/components/com_content/src/Service/HTML/Icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,14 @@ public function create($category, $params, $attribs = array(), $legacy = false)

$url = 'index.php?option=com_content&task=article.add&return=' . base64_encode($uri) . '&a_id=0&catid=' . $category->id;

$text = LayoutHelper::render('joomla.content.icons.create', array('params' => $params, 'legacy' => $legacy));
$text = '';

if ($params->get('show_icons'))
{
$text .= '<span class="icon-plus icon-fw" aria-hidden="true"></span>';
}

$text .= Text::_('COM_CONTENT_NEW_ARTICLE');

// Add the button classes to the attribs array
if (isset($attribs['class']))
Expand All @@ -82,9 +89,7 @@ public function create($category, $params, $attribs = array(), $legacy = false)

$button = HTMLHelper::_('link', Route::_($url), $text, $attribs);

$output = '<span class="hasTooltip" title="' . HTMLHelper::_('tooltipText', 'COM_CONTENT_CREATE_ARTICLE') . '">' . $button . '</span>';

return $output;
return $button;
}

/**
Expand Down
1 change: 0 additions & 1 deletion language/en-GB/com_contact.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ COM_CONTACT_COPYSUBJECT_OF="Copy of: {SUBJECT}"
COM_CONTACT_COPYTEXT_OF="This is a copy of the following message you sent to {CONTACTNAME} via {SITENAME}\n\n{BODY}"
COM_CONTACT_COUNT="Contact count:"
COM_CONTACT_COUNTRY="Country"
COM_CONTACT_CREATE_CONTACT="Submit new contact"
COM_CONTACT_DEFAULT_PAGE_TITLE="Contacts"
COM_CONTACT_DETAILS="Contact"
COM_CONTACT_DOWNLOAD_INFORMATION_AS="Download information as:"
Expand Down
1 change: 0 additions & 1 deletion language/en-GB/com_content.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ COM_CONTENT_CATEGORY_LIST_TABLE_CAPTION="List of articles in category %s"
COM_CONTENT_CHECKED_OUT_BY="Checked out by %s"
COM_CONTENT_CONTENT_TYPE_ARTICLE="Article"
COM_CONTENT_CONTENT_TYPE_CATEGORY="Article Category"
COM_CONTENT_CREATE_ARTICLE="Submit new article"
COM_CONTENT_CREATED_DATE="Created Date"
COM_CONTENT_CREATED_DATE_ON="Created: %s"
COM_CONTENT_EDIT_ITEM="Edit Article"
Expand Down

0 comments on commit 7f5dd8e

Please sign in to comment.