show message count in title #126

This commit is contained in:
Jakub Pavlík jn 2014-03-06 20:17:52 +01:00 committed by Samuel Cochran
parent 8c5c8a51bb
commit e1ee9eefc9
2 changed files with 3 additions and 1 deletions

View File

@ -190,6 +190,8 @@ class MailCatcher
.append($("<td/>").text(message.subject or "No subject").toggleClass("blank", !message.subject)) .append($("<td/>").text(message.subject or "No subject").toggleClass("blank", !message.subject))
.append($("<td/>").text(@formatDate(message.created_at))) .append($("<td/>").text(@formatDate(message.created_at)))
.prependTo($("#messages tbody")) .prependTo($("#messages tbody"))
title = $('head title')
title.text(title.text().replace(/^\(\d*\)/, "(#{@messagesCount()})"))
scrollToRow: (row) -> scrollToRow: (row) ->
relativePosition = row.offset().top - $("#messages").offset().top relativePosition = row.offset().top - $("#messages").offset().top

View File

@ -1,7 +1,7 @@
!!! !!!
%html.mailcatcher %html.mailcatcher
%head %head
%title MailCatcher %title (0) MailCatcher
%link{:href => "/favicon.ico", :rel => "shortcut icon"} %link{:href => "/favicon.ico", :rel => "shortcut icon"}
= stylesheet_tag "mailcatcher" = stylesheet_tag "mailcatcher"
= javascript_tag "mailcatcher" = javascript_tag "mailcatcher"