mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Merge pull request #1678 from urbanrotnik/ur-sci-3355-notifications-dropdown-problem-with-1-team
Fix navigationJS team switch when have only 1 team [SCI-3355]
This commit is contained in:
commit
12bfb7e51c
1 changed files with 6 additions and 1 deletions
|
@ -89,7 +89,12 @@
|
||||||
var teamSwitch = $('#team-switch');
|
var teamSwitch = $('#team-switch');
|
||||||
var dropDownMenu = teamSwitch.find('.dropdown-menu');
|
var dropDownMenu = teamSwitch.find('.dropdown-menu');
|
||||||
var dropDownHeight;
|
var dropDownHeight;
|
||||||
var ps = new PerfectScrollbar(teamSwitch.find('.team-container')[0], { scrollYMarginOffset: 5 });
|
var teamContainter = teamSwitch.find('.team-container')[0];
|
||||||
|
var ps;
|
||||||
|
|
||||||
|
if (typeof teamContainter === 'undefined') return;
|
||||||
|
|
||||||
|
ps = new PerfectScrollbar(teamContainter, { scrollYMarginOffset: 5 });
|
||||||
teamSwitch.click(() => {
|
teamSwitch.click(() => {
|
||||||
dropDownHeight = dropDownMenu.height();
|
dropDownHeight = dropDownMenu.height();
|
||||||
if (teamSwitch.find('.new-team').length === 0) {
|
if (teamSwitch.find('.new-team').length === 0) {
|
||||||
|
|
Loading…
Reference in a new issue