Skip to content

Commit

Permalink
show muteed notice on the right to make room for alarm message; adjus…
Browse files Browse the repository at this point in the history
…t browser tab title
  • Loading branch information
jasoncalabrese committed Jul 5, 2015
1 parent e4b23ff commit 77c6f80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 deletions static/css/drawer.css
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,8 @@ h1, legend,
overflow: hidden;
}
#notification {
opacity: 0.75;
top: 4px;
z-index: 99;
top: 5px;
z-index: 500;
}
#notification.info a {
background: #00f;
Expand Down
12 changes: 7 additions & 5 deletions static/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,13 @@ var app = {}, browserSettings = {}, browserStorage = $.localStorage;

var bg_title = browserSettings.customTitle || '';

if (message && alarmInProgress) {
bg_title = message.title + ' ' + message.message;
$('h1.customTitle').text(bg_title);
} else {
bg_title = generateTitle();
if (message && alarmInProgress) {
//message title + normal generated title for the browser tab
bg_title = message.title + ': ' + generateTitle();
//full message in header
$('h1.customTitle').text(message.title + ' ' + message.message);
} else {
bg_title = generateTitle();
}

$(document).attr('title', bg_title);
Expand Down
2 changes: 1 addition & 1 deletion static/js/ui-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function showNotification(note, type) {
notify.addClass(type ? type : 'urgent');

notify.find('span').html(note);
notify.css('left', 'calc(50% - ' + (notify.width() / 2) + 'px)');
notify.css('right', '5px');
notify.show();
}

Expand Down

0 comments on commit 77c6f80

Please sign in to comment.