summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-12 13:17:44 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-12 13:17:44 +0100
commitf788a35cd1a70ba08effb3807bbb313744324c85 (patch)
tree10cee1229649d5660f953e39ddf25f0a22cab7d0 /app
parentc30a25672edcab483f52b16523122d9d609b4913 (diff)
Add a * to the page title when a new voicemail or fax was received.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/trigger_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/trigger_controller.rb b/app/controllers/trigger_controller.rb
index 3bd75a1..df6f39f 100644
--- a/app/controllers/trigger_controller.rb
+++ b/app/controllers/trigger_controller.rb
@@ -19,6 +19,7 @@ class TriggerController < ApplicationController
# Indicate a new voicemail in the navigation bar.
#
PrivatePub.publish_to("/users/#{user.id}/messages/new", "$('#new_voicemail_or_fax_indicator').hide('fast').show('slow');")
+ PrivatePub.publish_to("/users/#{user.id}/messages/new", "document.title = '* ' + document.title.replace( '* ' , '');")
if user.email.blank?
next
@@ -70,7 +71,6 @@ class TriggerController < ApplicationController
# push the partial to the webbrowser
#
new_html = ActionController::Base.helpers.escape_javascript(render_to_string("fax_documents/_fax_document", :layout => false, :locals => {:fax_document => fax_document}))
- Rails.logger.debug new_html
PrivatePub.publish_to("/fax_documents/#{fax_document.id}", "$('#" + fax_document.id.to_s + ".fax_document').replaceWith('#{new_html}');")
render(
@@ -143,6 +143,7 @@ class TriggerController < ApplicationController
if @last_fax_document.fax_account.fax_accountable.class == User
user = @last_fax_document.fax_account.fax_accountable
PrivatePub.publish_to("/users/#{user.id}/messages/new", "$('#new_voicemail_or_fax_indicator').hide('fast').show('slow');")
+ PrivatePub.publish_to("/users/#{user.id}/messages/new", "document.title = '* ' + document.title.replace( '* ' , '');")
end
render(