Merge branch 'avoid-hash-in-urls-by-preventing-default-link-action' of https://github.com/schmidt/mailcatcher

This commit is contained in:
Samuel Cochran 2011-10-08 00:25:25 +08:00
commit 623f2b4514
4 changed files with 6 additions and 1 deletions

View File

@ -6,7 +6,8 @@ module MailCatcher
end
def notify message
system "growlnotify", "--name", "MailCatcher", "--message", "Message received:\n#{message["subject"]}"
image_path = File.expand_path(File.join(__FILE__, '..', '..', '..', 'public', 'images', 'logo_large.png'))
system "growlnotify", "--image", image_path, "--name", "MailCatcher", "--message", "Message received:\n#{message["subject"]}"
end
# TODO: Native support on MacRuby with click backs

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -25,6 +25,7 @@ class MailCatcher
height: e.clientY - $('#messages').offset().top
$('nav.app .clear a').live 'click', (e) =>
e.preventDefault()
if confirm "You will lose all your received messages.\n\nAre you sure you want to clear all messages?"
$.ajax
url: '/messages'
@ -37,6 +38,7 @@ class MailCatcher
alert 'Error while quitting.'
$('nav.app .quit a').live 'click', (e) =>
e.preventDefault()
if confirm "You will lose all your received messages.\n\nAre you sure you want to quit?"
$.ajax
type: 'DELETE'

View File

@ -34,6 +34,7 @@
}
});
$('nav.app .clear a').live('click', __bind(function(e) {
e.preventDefault();
if (confirm("You will lose all your received messages.\n\nAre you sure you want to clear all messages?")) {
return $.ajax({
url: '/messages',
@ -50,6 +51,7 @@
}
}, this));
$('nav.app .quit a').live('click', __bind(function(e) {
e.preventDefault();
if (confirm("You will lose all your received messages.\n\nAre you sure you want to quit?")) {
return $.ajax({
type: 'DELETE',