Skip to content

Commit

Permalink
#4610 Display changed file type in replace Op
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Sep 28, 2018
1 parent fa8cad2 commit 64643c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,13 @@ public void uploadFinished() {
FacesContext.getCurrentInstance().addMessage(uploadComponentId, new FacesMessage(FacesMessage.SEVERITY_INFO, BundleUtil.getStringFromBundle("dataset.file.uploadWorked"), uploadSuccessMessage));
}
}


if(isFileReplaceOperation() && fileReplacePageHelper.hasContentTypeWarning()){
RequestContext context = RequestContext.getCurrentInstance();
RequestContext.getCurrentInstance().update("datasetForm:fileTypeDifferentPopup");
context.execute("PF('fileTypeDifferentPopup').show();");
}

// We clear the following duplicate warning labels, because we want to
// only inform the user of the duplicates dropped in the current upload
// attempt - for ex., one batch of drag-and-dropped files, or a single
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/editFilesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -622,11 +622,11 @@
</div>
</p:dialog>

<p:dialog id="selectFilesForDelete" styleClass="smallPopUp"
header="#{bundle['dataset.noSelectedFiles.header']}" widgetVar="selectFilesForDelete" modal ="true">
<p:dialog id="selectFilesForDeleteFragment" styleClass="smallPopUp"
header="#{bundle['dataset.noSelectedFiles.header']}" widgetVar="selectFilesForDeleteFragment" 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();"/>
<p:commandButton value="#{bundle.close}" onclick="PF('selectFilesForDeleteFragment').hide();"/>
</div>
</p:dialog>

Expand Down Expand Up @@ -989,7 +989,7 @@
if (count > 0) {
PF('deleteFileConfirmation').show();
} else {
PF('selectFilesForDelete').show();
PF('selectFilesForDeleteFragment').show();
}
}
function checkNewlyRestricted() {
Expand Down

0 comments on commit 64643c4

Please sign in to comment.