fix the issue with long file names also

This commit is contained in:
Massimiliano Assante 2019-10-31 15:25:45 +01:00
parent 497c42b0e5
commit 556d813e22
3 changed files with 8 additions and 3 deletions

View File

@ -118,7 +118,8 @@ public class WorkspaceWidget extends MVCPortlet {
itemsList = StorageHubServiceUtil.getItemChildren(authUser, itemId, itemId, start, offset);
String groupName = GroupLocalServiceUtil.getGroup(groupId).getName();
groupName = groupName.replace("_", " ");
toSet = new Breadcrumb(itemId, groupName+" Folder");
groupName = (groupName.length() > 20) ? groupName.substring(0, 19) + " ..." : groupName;
toSet = new Breadcrumb(itemId, groupName);
request.getPortletSession().setAttribute(BREADCRUMB_ATTR, toSet, PortletSession.APPLICATION_SCOPE);
}
count = StorageHubServiceUtil.getItemChildrenCount(request, itemId);

View File

@ -128,6 +128,10 @@
color: #fefefe;
}
.workspace-widget-portlet .dataTables_wrapper {
margin-left: -5px;
}
/* .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover */
.noselect {

View File

@ -1,10 +1,10 @@
function truncateText (str) {
var cutoff = 20;
var cutoff = 15;
if (/\s/.test(str)) {
cutoff = 50;
}
return str.length < cutoff ? str : str.substr(0, cutoff-3) +'&#8230;';
return str.length < cutoff ? str : str.substr(0, cutoff-3) +' &#8230;';
}
function getInitials(fullname) {