From 098f19078d15de61c12f5fb35aa1870e1aea5f78 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Wed, 23 Jan 2013 18:00:27 +0000 Subject: [PATCH] Return last seen string in tooltip --- views/profile/profile.jade | 9 +++++---- views/users/users.jade | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/views/profile/profile.jade b/views/profile/profile.jade index 4648573..191147b 100644 --- a/views/profile/profile.jade +++ b/views/profile/profile.jade @@ -21,6 +21,7 @@ block content } } ); + $('.tip').tooltip(); $('.data').dataTable({ "aoColumnDefs": [ { "sType": "forcenum", @@ -61,12 +62,12 @@ block content #{key} span if chan.online - if chan.active - span.label.label-success Active + if chan.active.active + span.label.label-success.tip(data-original-title="#{chan.active.ago}", data-placement="right") Active else - span.label.label-important Inactive + span.label.label-important.tip(data-original-title="#{chan.active.ago}", data-placement="right") Inactive else - span.label Offline + span.label.tip(data-original-title="#{chan.active.ago}", data-placement="right") Offline td #{chan.fields.lines.data} td diff --git a/views/users/users.jade b/views/users/users.jade index 23251a1..de9dae5 100644 --- a/views/users/users.jade +++ b/views/users/users.jade @@ -21,6 +21,7 @@ block content } } ); + $('.tip').tooltip(); $('.data').dataTable({ "aoColumnDefs": [ { "aDataSort": [ 1, 0 ], "asSorting": [ "asc" ], "aTargets": [ 0 ] }, @@ -61,15 +62,15 @@ block content #{nick.display} span if nick.online - if nick.active - span.label.label-success Active + if nick.active.active + span.label.label-success.tip(data-original-title="#{nick.active.ago}", data-placement="right") Active else - span.label.label-important Inactive + span.label.label-important.tip(data-original-title="#{nick.active.ago}", data-placement="right") Inactive else - span.label Offline + span.label.tip(data-original-title="#{nick.active.ago}", data-placement="right") Offline td if nick.online - if nick.active + if nick.active.active -1 else 0