Skip to content
Prev Previous commit
Next Next commit
Resolved issue for action label
Signed-off-by: Kavita Sonawane <[email protected]>
  • Loading branch information
TSI-kavitasonawane committed Oct 29, 2021
commit 3c6b3b376b0941132d3dfa69a9487bee5fa32374
9 changes: 8 additions & 1 deletion apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -3520,7 +3520,7 @@
* Show or hide file action menu based on the current selection
*/
resizeFileActionMenu: function() {
const appList = $('.filesSelectionMenu ul li').not('.item-toggleSelectionMode:hidden');
const appList = $('.filesSelectionMenu ul li').not('.item-toggleSelectionMode:hidden,.item-tags:hidden');
const headerWidth = $('#filestable thead').outerWidth();
const checkWidth = $('#headerSelection').outerWidth();
const headerNameWidth = $('#headerName').outerWidth();
Expand All @@ -3529,12 +3529,19 @@

let availableWidth = headerWidth - (checkWidth + allLabelWidth+ headerNameWidth);
let appCount = Math.floor((availableWidth / $(appList).width()));
let appListCount = $(appList).width();

if(appCount < appList.length) {
$('#selectedActionLabel').css('display','block');
availableWidth = headerWidth - (checkWidth + allLabelWidth+ headerNameWidth + actionWidth);
appCount = Math.floor((availableWidth / $(appList).width()));
}
else if(appListCount==0) {
$('#selectedActionLabel').css('display','block');
}
else{
$('#selectedActionLabel').css('display','none');
}

for (let k = 0; k < appList.length; k++) {
if (k < appCount) {
Expand Down