Skip to content

Node.js based forum software built for the modern web

added header tooltips

Baris Soner Usakli9cb232c19843
diff --git a/public/language/en/global.json b/public/language/en/global.json
index 99fd8c74dc..210486f0a9 100644
--- a/public/language/en/global.json
+++ b/public/language/en/global.json
@@ -23,6 +23,8 @@
"header.recent": "Recent",
"header.unread": "Unread",
"header.users": "Users",
+ "header.chats": "Chats",
+ "header.notifications": "Notifications",
"header.search": "Search",
"header.profile": "Profile",
diff --git a/public/src/app.js b/public/src/app.js
index 21c0c72c86..77d55bd3ef 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -537,12 +537,28 @@ var socket,
app.alternatingTitle('');
});
+ createHeaderTooltips();
+
templates.setGlobal('relative_path', RELATIVE_PATH);
templates.setGlobal('usePagination', config.usePagination);
templates.setGlobal('topicsPerPage', config.topicsPerPage);
templates.setGlobal('postsPerPage', config.postsPerPage);
});
+ function createHeaderTooltips() {
+ $('#header-menu li i[title]').each(function() {
+ $(this).parents('li').tooltip({
+ placement: 'bottom',
+ title: $(this).attr('title')
+ });
+ });
+
+ $('#user_label').tooltip({
+ placement: 'bottom',
+ title: $('#user_dropdown').attr('title')
+ });
+ }
+
showWelcomeMessage = location.href.indexOf('loggedin') !== -1;
app.loadConfig();
diff --git a/public/templates/header.tpl b/public/templates/header.tpl
index 14c53b3b9d..29e13cbd94 100644
--- a/public/templates/header.tpl
+++ b/public/templates/header.tpl
@@ -92,7 +92,7 @@
</li>
<li class="notifications dropdown text-center hidden-xs">
- <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="notif_dropdown"></a>
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="notif_dropdown"><i class="fa fa-bell-o" title="[[global:header.notifications]]"></i></a>
<ul id="notif-list" class="dropdown-menu" aria-labelledby="notif_dropdown">
<li>
<a href="#"><i class="fa fa-refresh fa-spin"></i> [[global:notifications.loading]]</a>
@@ -104,7 +104,7 @@
</li>
<li class="chats dropdown text-center hidden-xs">
- <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="chat_dropdown"><i class="fa fa-comment-o"></i></a>
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="chat_dropdown"><i class="fa fa-comment-o" title="[[global:header.chats]]"></i></a>
<ul id="chat-list" class="dropdown-menu" aria-labelledby="chat_dropdown">
<li>
<a href="#"><i class="fa fa-refresh fa-spin"></i> [[global:chats.loading]]</a>
@@ -113,7 +113,7 @@
</li>
<li id="user_label" class="dropdown">
- <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="user_dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="user_dropdown" title="[[global:header.profile]]">
<img src=""/>
</a>
<ul id="user-control-list" class="dropdown-menu" aria-labelledby="user_dropdown">
@@ -152,7 +152,7 @@
</li>
<li class="hidden-xs">
- <a href="#" id="search-button" class="hide"><i class="fa fa-search"></i></a>
+ <a href="#" id="search-button" class="hide"><i class="fa fa-search" title="[[global:header.search]]"></i></a>
</li>
</ul>