From 9cb232c198433b328b026dce0a61877e5e9dc101 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Mon, 27 Jan 2014 01:48:43 -0500 Subject: [PATCH] added header tooltips --- public/language/en/global.json | 2 ++ public/src/app.js | 16 ++++++++++++++++ public/templates/header.tpl | 8 ++++---- 3 files changed, 22 insertions(+), 4 deletions(-) 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 @@