Skip to content

Commit f0221b0

Browse files
authored
Merge pull request #88 from topcoder-platform/issues-544-1
Issues-544:Tooltips
2 parents 510acfd + 608215c commit f0221b0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

views/group/helper_functions.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,24 @@ function watchGroupButton($group) {
4545
$hasWatched = $groupModel->hasWatchedGroup($group);
4646
$groupID = $group->GroupID;
4747
$output = '';
48-
$text = $hasWatched ? t('Stop watching the group') : t('Watch the group');
48+
$text = $hasWatched ? t('Stop watching forum') : t('Watch forum');
4949

5050
if($canWatch && !$hasWatched) {
51-
$icon = watchIcon($hasWatched, $text);
51+
$icon = '<span class="tooltiptext">'.$text.'</span>'. watchIcon($hasWatched, '');
5252
$output .= anchor(
5353
$icon,
5454
"/group/watch/{$groupID}/" . Gdn::session()->transientKey(),
55-
'Hijack watchButton' . ($hasWatched ? ' isWatching' : ''),
56-
['title' => $text, 'aria-pressed' => $hasWatched ? 'true' : 'false', 'role' => 'button', 'tabindex' => '0']
55+
'Hijack watchButton ' . ($hasWatched ? ' isWatching tooltip' : 'tooltip'),
56+
[ 'aria-pressed' => $hasWatched ? 'true' : 'false', 'role' => 'button', 'tabindex' => '0']
5757
);
5858

5959
} else if($hasWatched) {
60-
$icon = watchIcon($hasWatched,$text);
60+
$icon = '<span class="tooltiptext">'.$text.'</span>'. watchIcon($hasWatched,'');
6161
$output .= anchor(
6262
$icon,
6363
"/group/unwatch/{$groupID}/" . Gdn::session()->transientKey(),
64-
'Hijack watchButton' . ($hasWatched ? ' isWatching' : ''),
65-
['title' => $text, 'aria-pressed' => $hasWatched ? 'true' : 'false', 'role' => 'button', 'tabindex' => '0']
64+
'Hijack watchButton ' . ($hasWatched ? ' isWatching tooltip' : 'tooltip'),
65+
['aria-pressed' => $hasWatched ? 'true' : 'false', 'role' => 'button', 'tabindex' => '0']
6666
);
6767
}
6868

0 commit comments

Comments
 (0)