Skip to content

Commit

Permalink
Cleaned up file counter on dataset pg after minor merge snaffu. [ref #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mheppler committed Aug 2, 2018
1 parent 5573d49 commit 4bb287e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
13 changes: 2 additions & 11 deletions src/main/webapp/filesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@
rowIndexVar="rowNum" rowKey="#{fileMetadata.dataFile.storageIdentifier}"
selection="#{DatasetPage.selectedFiles}" var="fileMetadata" widgetVar="filesTable"
rendered="#{empty DatasetPage.editMode and (DatasetPage.workingVersion != null)}"
emptyMessage="#{bundle['file.notFound.tip']}"
>
<!-- Attempted solution from https://stackoverflow.com/questions/17487670/update-component-at-change-of-page-on-primefaces-datagrid-with-pagination -->
<!-- Suggestion to use oncomplete at https://stackoverflow.com/questions/28628989/primefaces-paginator-selection -->
<!-- Something about skipChildren=false mentioned at https://github.com/primefaces/primefaces/issues/1362#issuecomment-216529851 via https://github.com/primefaces/primefaces/issues/687-->
emptyMessage="#{bundle['file.notFound.tip']}">
<p:ajax event="page" listener="#{DatasetPage.fileListingPaginatorListener}" update="filesTable" process="@this" oncomplete="refreshPaginator()" immediate="true"/>
<p:ajax event="toggleSelect" listener="#{DatasetPage.toggleAllSelected()}" update="filesTable" />
<p:ajax event="rowUnselectCheckbox" listener="#{DatasetPage.setSelectAllFiles(false)}" update="filesTable" process="@this" />
Expand Down Expand Up @@ -97,19 +93,14 @@
<div class="row" style="margin-bottom:6px;">
<div jsf:id="filesHeaderCount" class="col-xs-3 text-left">
<!-- Files Count -->
<!--
TO-DO:
- ?Fix misleading "# Files Selected on Upload Files/Edit Files pg?
- ?Copy over new selection message to Upload Files/Edit Files pg?
-->
<h:outputFormat value="#{bundle['file.count']}" styleClass="highlightBold" rendered="#{DatasetPage.fileMetadatasSearch.size() gt 0}">
<f:param value="#{(DatasetPage.filePaginatorPage * DatasetPage.rowsPerPage) + 1}"/>
<f:param value="#{Math:min((DatasetPage.filePaginatorPage + 1) * DatasetPage.rowsPerPage,DatasetPage.fileMetadatasSearch.size()) }"/>
<f:param value="#{DatasetPage.fileMetadatasSearch.size()}"/>
</h:outputFormat>
</div>

<div class="col-xs-10">
<div class="col-xs-9">
<p:outputPanel id="filesButtons">
<!-- 4.2.1: replaced permissionsWrapper.canIssueUpdateDatasetCommand(DatasetPage.dataset) with DatasetPage.canUpdateDataset() -->
<!-- tab-header pull-right -->
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/resources/css/structure.css
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ div[id$="filesTable"].ui-datatable.ui-widget table {table-layout: fixed;}
div[id$="filesTable"].ui-datatable.ui-widget table th,
div[id$="filesTable"].ui-datatable.ui-widget table td {box-sizing: content-box;}
div[id$="filesTable"] div.ui-datatable-header.ui-widget-header {padding:0; background:none; border:0;}
div[id$="filesTable"] #filesHeaderCount {padding:10px 10px 4px 10px;}
div[id$="filesTable"] #filesHeaderCount span.highlightBold {display:block; padding:0; line-height:1.65;}
div[id$="filesHeaderCount"] {padding:6px 12px;}
div[id$="filesHeaderCount"] span.highlightBold {display:block; padding:0; line-height:1.65;}
div[id$="filesTable"] .col-file-thumb {border-right:0;}
div[id$="filesTable"] .col-file-thumb div.thumbnail-block {position:relative;width:64px;height:64px;margin:0 auto;}
div[id$="filesTable"] .col-file-thumb div.thumbnail-block span.file-thumbnail-icon {font-size:62px;line-height:1.05;}
Expand Down

0 comments on commit 4bb287e

Please sign in to comment.