diff options
author | Patrik Kernstock <info@pkern.at> | 2017-06-04 03:26:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-04 03:26:40 +0200 |
commit | c88e4e2feb0387c98be0dbd845c25e3bcec2ea4a (patch) | |
tree | dba28651486038974e53c1904946bdea07b8f422 /core/js | |
parent | f03d6f225e7460cff935f0d0b77e86af3d394887 (diff) | |
download | nextcloud-server-c88e4e2feb0387c98be0dbd845c25e3bcec2ea4a.tar.gz nextcloud-server-c88e4e2feb0387c98be0dbd845c25e3bcec2ea4a.zip |
Now using dynamic percentual appmenu limit
Signed-off-by: Patrik Kernstock <info@pkern.at>
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js index 80c62e70116..2cb94c9cf2b 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1512,12 +1512,17 @@ function initCore() { var resizeMenu = function() { var appList = $('#appmenu li'); - var availableWidth = $('#header-left').width() - $('#nextcloud').width() - 44; + var usePercentualAppMenuLimit = 33; + var availableWidth = (($('#header-left').width() - $('#nextcloud').width()) / 100 * usePercentualAppMenuLimit); var appCount = Math.floor((availableWidth)/44); // show at least 2 apps in the popover if(appList.length-1-appCount >= 1) { appCount--; } + // show at least one icon + if(appCount < 1) { + appCount = 1; + } $('#more-apps a').removeClass('active'); var lastShownApp; |