Skip to content

Commit 7f5dd8e

Browse files
authored
[4.0] Remove tooltip from add-new-buttons (#34601)
1 parent cef365d commit 7f5dd8e

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

administrator/components/com_contact/src/Service/HTML/Icon.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ public static function create($category, $params, $attribs = array())
6666

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

69-
$text = LayoutHelper::render('joomla.content.icons.create', array('params' => $params, 'legacy' => false));
69+
$text = '';
70+
71+
if ($params->get('show_icons'))
72+
{
73+
$text .= '<span class="icon-plus icon-fw" aria-hidden="true"></span>';
74+
}
75+
76+
$text .= Text::_('COM_CONTACT_NEW_CONTACT');
7077

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

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

83-
$output = '<span class="hasTooltip" title="' . HTMLHelper::_('tooltipText', 'COM_CONTACT_CREATE_CONTACT') . '">' . $button . '</span>';
84-
85-
return $output;
90+
return $button;
8691
}
8792

8893
/**

administrator/components/com_content/src/Service/HTML/Icon.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@ public function create($category, $params, $attribs = array(), $legacy = false)
6868

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

71-
$text = LayoutHelper::render('joomla.content.icons.create', array('params' => $params, 'legacy' => $legacy));
71+
$text = '';
72+
73+
if ($params->get('show_icons'))
74+
{
75+
$text .= '<span class="icon-plus icon-fw" aria-hidden="true"></span>';
76+
}
77+
78+
$text .= Text::_('COM_CONTENT_NEW_ARTICLE');
7279

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

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

85-
$output = '<span class="hasTooltip" title="' . HTMLHelper::_('tooltipText', 'COM_CONTENT_CREATE_ARTICLE') . '">' . $button . '</span>';
86-
87-
return $output;
92+
return $button;
8893
}
8994

9095
/**

language/en-GB/com_contact.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ COM_CONTACT_COPYSUBJECT_OF="Copy of: {SUBJECT}"
1919
COM_CONTACT_COPYTEXT_OF="This is a copy of the following message you sent to {CONTACTNAME} via {SITENAME}\n\n{BODY}"
2020
COM_CONTACT_COUNT="Contact count:"
2121
COM_CONTACT_COUNTRY="Country"
22-
COM_CONTACT_CREATE_CONTACT="Submit new contact"
2322
COM_CONTACT_DEFAULT_PAGE_TITLE="Contacts"
2423
COM_CONTACT_DETAILS="Contact"
2524
COM_CONTACT_DOWNLOAD_INFORMATION_AS="Download information as:"

language/en-GB/com_content.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ COM_CONTENT_CATEGORY_LIST_TABLE_CAPTION="List of articles in category %s"
1717
COM_CONTENT_CHECKED_OUT_BY="Checked out by %s"
1818
COM_CONTENT_CONTENT_TYPE_ARTICLE="Article"
1919
COM_CONTENT_CONTENT_TYPE_CATEGORY="Article Category"
20-
COM_CONTENT_CREATE_ARTICLE="Submit new article"
2120
COM_CONTENT_CREATED_DATE="Created Date"
2221
COM_CONTENT_CREATED_DATE_ON="Created: %s"
2322
COM_CONTENT_EDIT_ITEM="Edit Article"

0 commit comments

Comments
 (0)