Skip to content

Commit

Permalink
#4610 only show file edit/delete button for upload process.
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Sep 28, 2018
1 parent 0e5b9db commit fa8cad2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/webapp/editFilesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,13 @@
<span class="glyphicon glyphicon-pencil"/> #{bundle['file.editFilesSelected']} <span class="caret"></span>
</button>
<ul class="dropdown-menu multi-level pull-right text-left" role="menu">
<ui:fragment rendered="#{datasetPage || EditDatafilesPage.showFileUploadFragment()}">
<li class="#{DatasetPage.lockedFromEdits ? 'disabled' : ''}">
<p:commandLink onclick="checkFilesSelected();" >
<h:outputText value="#{bundle['file.delete']}"/>
</p:commandLink>
</li>
</ui:fragment>
<li>
<p:commandLink update="filesTable,:messagePanel" oncomplete="toggle_dropdown();" actionListener="#{EditDatafilesPage.restrictFiles(true)}">
<h:outputText value="#{bundle['file.restrict']}"/>
Expand Down Expand Up @@ -620,6 +622,14 @@
</div>
</p:dialog>

<p:dialog id="selectFilesForDelete" styleClass="smallPopUp"
header="#{bundle['dataset.noSelectedFiles.header']}" widgetVar="selectFilesForDelete" modal ="true">
<p class="text-danger"><span class="glyphicon glyphicon-exclamation-sign"/> #{bundle['dataset.noSelectedFilesForDelete']}</p>
<div class="button-block">
<p:commandButton value="#{bundle.close}" onclick="PF('selectFilesForDelete').hide();"/>
</div>
</p:dialog>

<p:dialog styleClass="smallPopUp" header="#{bundle['file.deleteFileDialog.header']}" widgetVar="deleteFileConfirmation" modal="true">
<p class="text-warning"><span class="glyphicon glyphicon-warning-sign"/> #{bundle['file.deleteFileDialog.tip']}</p>
<ui:fragment rendered="#{EditDatafilesPage.dataset.released}">
Expand Down Expand Up @@ -978,6 +988,8 @@
var count = PF('filesTable').getSelectedRowsCount();
if (count > 0) {
PF('deleteFileConfirmation').show();
} else {
PF('selectFilesForDelete').show();
}
}
function checkNewlyRestricted() {
Expand Down

0 comments on commit fa8cad2

Please sign in to comment.