Skip to content

Commit

Permalink
fixed folder cursor initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
car031 committed Oct 13, 2023
1 parent fce5bb2 commit cc108f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions logicaldoc-gui/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<exclude name="setup/" />
<exclude name="login/" / -->
<exclude name="WEB-INF/**" />
<exclude name="**/*.jsp" />
<!-- exclude name="skin/" />
<exclude name="skin-Tahoe/" />
<exclude name="prev/" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,15 @@ public void onFolderSelected(GUIFolder folder) {
if (pagination == null) {
pagination = new FolderPagination(folder.getId(), Session.get().getConfigAsInt(GUI_FOLDER_MAXCHILDREN),
(int) folder.getSubfolderCount(), 1);
if (folder.getGrid() != null && !folder.getGrid().isEmpty())
pagination.setPageSize(DocumentGridUtil.getFolderPageSizeFromSpec(folder.getGrid()));
else if (Session.get().getUser().getDocsGrid() != null && !Session.get().getUser().getDocsGrid().isEmpty())
pagination
.setPageSize(DocumentGridUtil.getFolderPageSizeFromSpec(Session.get().getUser().getDocsGrid()));
Integer pageSizeFromSpec = null;
if (folder.getGrid() != null && !folder.getGrid().isEmpty()) {
pageSizeFromSpec = DocumentGridUtil.getFolderPageSizeFromSpec(folder.getGrid());
} else if (Session.get().getUser().getDocsGrid() != null
&& !Session.get().getUser().getDocsGrid().isEmpty()) {
pageSizeFromSpec = DocumentGridUtil.getFolderPageSizeFromSpec(Session.get().getUser().getDocsGrid());
}
if (pageSizeFromSpec != null)
pagination.setPageSize(pageSizeFromSpec);

// Save it only if there is more than one page
if (pagination.getTotalPages() > 1)
Expand Down

0 comments on commit cc108f6

Please sign in to comment.