diff --git a/lib/mail_catcher/growl.rb b/lib/mail_catcher/growl.rb index 80ec5a8..430522c 100644 --- a/lib/mail_catcher/growl.rb +++ b/lib/mail_catcher/growl.rb @@ -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 diff --git a/public/images/logo_large.png b/public/images/logo_large.png new file mode 100644 index 0000000..55739eb Binary files /dev/null and b/public/images/logo_large.png differ diff --git a/public/javascripts/application.coffee b/public/javascripts/application.coffee index 5bf3338..f0185c2 100644 --- a/public/javascripts/application.coffee +++ b/public/javascripts/application.coffee @@ -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' diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 555245e..4c372ff 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -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',