Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Hide operator change chrome if the user does not belong to more than …
Browse files Browse the repository at this point in the history
…one operator (bug 1100536)
  • Loading branch information
chuckharmston committed Dec 4, 2014
1 parent 0358774 commit e932fd4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
16 changes: 16 additions & 0 deletions src/media/css/operators.styl
Expand Up @@ -98,3 +98,19 @@
display: none;
}
}

[data-operator-count="0"],
[data-operator-count="1"] {
#operator_selection {
display: none !important;
}
#current_operator {
cursor: default;
&:hover {
text-decoration: none;
}
&:after {
display: none;
}
}
}
5 changes: 3 additions & 2 deletions src/media/js/main.js
Expand Up @@ -33,12 +33,13 @@ function() {
z.page.on('reload_chrome', function() {
console.log('Reloading chrome');
var nunjucks = require('templates');
var all_operators = operators.get.all();
$('#site-header').html(nunjucks.env.render('header.html', {
all_operators: operators.get.all(),
all_operators: all_operators,
current_operator: operators.get.current(),
carriers: settings.carriers,
regions: settings.REGION_CHOICES_SLUG
}));
})).attr('data-operator-count', all_operators.length);
$('#site-footer').html(
nunjucks.env.render('footer.html'));
z.body.toggleClass('logged-in', require('user').logged_in());
Expand Down

0 comments on commit e932fd4

Please sign in to comment.