Update umbsections.directive.js
Update the number of sections to the actual number of sections available at the present time, add a fix to the calculateWidth method so that if less items are allowed than available but there is technically enough room to show them the overflow tray still shows up. On prior version, try adding translation to your allowed user group sections and reload, you can't see the translation section in the top menu, but the overflow menu button won't show until you shrink the screen.
This commit is contained in:
committed by
Sebastiaan Janssen
parent
a3de30934d
commit
f394af20d0
@@ -12,7 +12,7 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se
|
||||
|
||||
var sectionItemsWidth = [];
|
||||
var evts = [];
|
||||
var maxSections = 7;
|
||||
var maxSections = 8;
|
||||
|
||||
//setup scope vars
|
||||
scope.maxSections = maxSections;
|
||||
@@ -46,8 +46,8 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se
|
||||
var sectionsWidth = 0;
|
||||
scope.totalSections = scope.sections.length;
|
||||
scope.maxSections = maxSections;
|
||||
scope.overflowingSections = 0;
|
||||
scope.needTray = false;
|
||||
scope.overflowingSections = scope.maxSections - scope.totalSections;
|
||||
scope.needTray = scope.sections.length > scope.maxSections;
|
||||
|
||||
// detect how many sections we can show on the screen
|
||||
for (var i = 0; i < sectionItemsWidth.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user