diff options
author | Patrik Kernstock <info@pkern.at> | 2017-06-04 03:26:40 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2017-06-15 10:55:04 +0200 |
commit | 6acabd64ca1e9ecd04da7ccf2ff50a9f0b21975b (patch) | |
tree | 5c77b9a7f6e961214808ebefe2cfbe415921f090 /core | |
parent | d44786e9b7249553099673827d7edb5b0e475d1b (diff) | |
download | nextcloud-server-6acabd64ca1e9ecd04da7ccf2ff50a9f0b21975b.tar.gz nextcloud-server-6acabd64ca1e9ecd04da7ccf2ff50a9f0b21975b.zip |
Now using dynamic percentual appmenu limit
Signed-off-by: Patrik Kernstock <info@pkern.at>
Diffstat (limited to 'core')
-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 ee4b03dd99d..b878cd35b77 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; |