Skip to content

Commit

Permalink
Preliminary commit for IQSS#2731, IQSS#2730, IQSS#2151
Browse files Browse the repository at this point in the history
To get Mike unstuck.  Glassfish will be done soon
  • Loading branch information
sekmiller committed Nov 9, 2015
1 parent 6f8ee3a commit 8768e05
Show file tree
Hide file tree
Showing 17 changed files with 153 additions and 140 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>4.0</version>
<version>5.3</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
Expand Down Expand Up @@ -343,8 +343,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,20 @@ private void refreshSelectedFiles(){
readOnly = false;
}

private Integer chunkSize = 25;

public Integer getChunkSize() {
return chunkSize;
}

public void setChunkSize(Integer chunkSize) {
this.chunkSize = chunkSize;
}

public void viewAllButtonPress(){
setChunkSize(fileMetadatasSearch.size());
}

private int activeTabIndex;

public int getActiveTabIndex() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/
public class LazyFileMetadataDataModel extends LazyDataModel<FileMetadata> {

private DataFileServiceBean fileServiceBean;
private Long datasetVersionId;
private final DataFileServiceBean fileServiceBean;
private final Long datasetVersionId;

public LazyFileMetadataDataModel(Long datasetVersionId, DataFileServiceBean fileServiceBean) {
this.fileServiceBean = fileServiceBean;
Expand All @@ -29,7 +29,7 @@ public LazyFileMetadataDataModel(Long datasetVersionId, DataFileServiceBean file

@Override
public List<FileMetadata> load(int first, int pageSize, String sortField,
SortOrder sortOrder, Map<String, String> filters) {
SortOrder sortOrder, Map<String, Object> filters) {

List<FileMetadata> listFileMetadata = null; //fileServiceBean.findFileMetadataByDatasetVersionIdLazy(datasetVersionId, pageSize, sortField, sortField, first);
//this.setRowCount(fileServiceBean.findCountByDatasetVersionId(datasetVersionId).intValue());
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/contactFormFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
<!-- send | cancel buttons -->
<div class="button-block">
<p:commandLink styleClass="btn btn-default" value="#{bundle['contact.send']}"
update="@form" oncomplete="if (args &amp;&amp; !args.validationFailed) contactForm.hide();" actionListener="#{sendFeedbackDialog.sendMessage}">
update="@form" oncomplete="if (args &amp;&amp; !args.validationFailed) PF('contactForm').hide();" actionListener="#{sendFeedbackDialog.sendMessage}">
<f:param name="DO_VALIDATION" value="true"/>
</p:commandLink>
<button type="button" onclick="contactForm.hide()" class="btn btn-default" value="#{bundle.cancel}">
<button type="button" onclick="PF('contactForm').hide()" class="btn btn-default" value="#{bundle.cancel}">
#{bundle.cancel}
</button>
</div>
Expand Down
112 changes: 56 additions & 56 deletions src/main/webapp/dataset.xhtml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/webapp/dataverse.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@
<!-- Email/Link/Share Button Group -->
<div class="btn-group pull-right" role="group">
<p:commandLink type="button" styleClass="btn btn-default bootstrap-button-tooltip" title="#{bundle['dataverse.contact']}"
update=":contactDialog" oncomplete="contactForm.show()" actionListener="#{sendFeedbackDialog.initUserInput}">
update=":contactDialog" oncomplete="PF('contactForm').show()" actionListener="#{sendFeedbackDialog.initUserInput}">
<f:setPropertyActionListener target="#{sendFeedbackDialog.userMessage}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.userEmail}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.messageSubject}" value=""/>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/dataverse_header.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<a href="/">
<span class="navbar-brand"><i id="icon-dataverse" class="icon-dataverse"></i> #{bundle.dataverse}</span>
</a>
<h:outputLink value="#" onclick="statusInfo.show()" rendered="#{!empty settingsWrapper.get(':StatusMessageText')}">
<h:outputLink value="#" onclick="PF('statusInfo').show()" rendered="#{!empty settingsWrapper.get(':StatusMessageText')}">
<span class="label label-default status">#{!empty settingsWrapper.get(':StatusMessageHeader') ? settingsWrapper.get(':StatusMessageHeader') : bundle['header.status.header']}</span>
</h:outputLink>
<ui:fragment rendered="#{empty settingsWrapper.get(':StatusMessageText') and !empty settingsWrapper.get(':StatusMessageHeader')}">
Expand Down Expand Up @@ -77,7 +77,7 @@
</ul>
</li>
<h:form class="navbar-form navbar-left navbar-form-link">
<p:commandLink value="#{bundle['header.support']}" oncomplete="contactForm.show()" update=":contactDialog" actionListener="#{sendFeedbackDialog.initUserInput}">
<p:commandLink value="#{bundle['header.support']}" oncomplete="PF('contactForm').show()" update=":contactDialog" actionListener="#{sendFeedbackDialog.initUserInput}">
<f:setPropertyActionListener target="#{sendFeedbackDialog.messageSubject}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.recipient}" value="#{null}"/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.userMessage}" value=""/>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/dataverse_template.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<p:dialog id="statusInfo" header="#{settingsWrapper.get(':StatusMessageHeader')}" widgetVar="statusInfo" modal="true">
<p><h:outputText value="#{settingsWrapper.get(':StatusMessageText')}" escape="false"/></p>
<div class="button-block">
<button type="button" onclick="statusInfo.hide()" class="btn btn-default" value="#{bundle.close}">
<button type="button" onclick="PF('statusInfo').hide()" class="btn btn-default" value="#{bundle.close}">
#{bundle.close}
</button>
</div>
Expand Down
39 changes: 19 additions & 20 deletions src/main/webapp/editFilesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
type="button" styleClass="btn btn-default btn-sm"
actionListener="#{EditDatafilesPage.setFileMetadataSelectedForTagsPopup(fileMetadata)}"
update=":datasetForm:editFileTagsPopup"
oncomplete="editFileTagsPopup.show();bind_bsui_components();">
oncomplete="PF('editFileTagsPopup').show();bind_bsui_components();">
<span class="glyphicon glyphicon-tag"/> #{bundle['file.editTags']}
</p:commandLink>

Expand All @@ -220,7 +220,7 @@
type="button" styleClass="btn btn-default"
actionListener="#{EditDatafilesPage.setFileMetadataSelectedForThumbnailPopup(fileMetadata)}"
update=":datasetForm:fileSetThumbnail"
oncomplete="fileSetThumbnail.show()">
oncomplete="PF('fileSetThumbnail').show()">
<span class="glyphicon glyphicon-file"/> #{bundle['file.setThumbnail']}
</p:commandLink>

Expand All @@ -230,7 +230,7 @@
type="button" styleClass="btn btn-default"
actionListener="#{EditDatafilesPage.setFileMetadataSelectedForIngestOptionsPopup(fileMetadata)}"
update=":datasetForm:fileAdvancedOptions"
oncomplete="fileAdvancedOptions.show()">
oncomplete="PF('fileAdvancedOptions').show()">
<span class="glyphicon glyphicon-cog"/> #{bundle['file.advancedIngestOptions']}
</p:commandLink>
</div>
Expand All @@ -254,9 +254,9 @@
<p class="text-danger"><span class="glyphicon glyphicon-warning-sign"/> #{bundle['file.deleteFileDialog.failed.tip']}</p>
</ui:fragment>
<div class="button-block">
<p:commandButton value="#{bundle.continue}" onclick="deleteFileConfirmation.hide()" oncomplete="window.scrollTo(0, 0);"
<p:commandButton value="#{bundle.continue}" onclick="PF('deleteFileConfirmation').hide()" oncomplete="window.scrollTo(0, 0);"
update=":#{p:component('filesTable')},:messagePanel" action="#{EditDatafilesPage.deleteFiles()}" />
<p:commandButton value="#{bundle.cancel}" onclick="deleteFileConfirmation.hide()" type="button" />
<p:commandButton value="#{bundle.cancel}" onclick="PF('deleteFileConfirmation').hide()" type="button" />
</div>
</p:dialog>

Expand Down Expand Up @@ -285,8 +285,8 @@
</div>
</div>
<div class="button-block">
<p:commandButton value="#{bundle.continue}" onclick="editFileAccessPopup.hide()" update=":datasetForm,:messagePanel" action="#{EditDatafilesPage.saveWithTermsOfUse()}" />
<p:commandButton value="#{bundle.cancel}" onclick="editFileAccessPopup.hide()" type="button" />
<p:commandButton value="#{bundle.continue}" onclick="PF('editFileAccessPopup').hide()" update=":datasetForm,:messagePanel" action="#{EditDatafilesPage.saveWithTermsOfUse()}" />
<p:commandButton value="#{bundle.cancel}" onclick="PF('editFileAccessPopup').hide()" type="button" />>
</div>
</ui:fragment>
</p:dialog>
Expand Down Expand Up @@ -470,9 +470,8 @@
</div>
</div>
<div class="button-block">
<p:commandButton id="fileAdvancedOptionsSaveButton" value="#{bundle.saveChanges}" oncomplete="fileAdvancedOptions.hide()" update=":datasetForm:filesTable,:messagePanel" actionListener="#{EditDatafilesPage.saveAdvancedOptions()}"/>
<p:commandButton id="fileAdvancedOptionsCancelButton" value="#{bundle.cancel}" onclick="fileAdvancedOptions.hide()" actionListener="#{EditDatafilesPage.clearFileMetadataSelectedForIngestOptionsPopup()}"/>
</div>
<p:commandButton id="fileAdvancedOptionsSaveButton" value="#{bundle.saveChanges}" oncomplete="PF('fileAdvancedOptions').hide()" update=":datasetForm:filesTable,:messagePanel" actionListener="#{EditDatafilesPage.saveAdvancedOptions()}"/>
<p:commandButton id="fileAdvancedOptionsCancelButton" value="#{bundle.cancel}" onclick="PF('fileAdvancedOptions').hide()" actionListener="#{EditDatafilesPage.clearFileMetadataSelectedForIngestOptionsPopup()}"/> </div>
</p:dialog> <!-- end of "advanced options" dialogue -->

<p:dialog id="fileSetThumbnail" styleClass="smallPopUp" header="#{bundle['file.setThumbnail.header']}" widgetVar="fileSetThumbnail" modal="true">
Expand All @@ -490,8 +489,8 @@
</div>
</div>
<div class="button-block">
<p:commandButton id="fileSetThumbnailSaveBtn" value="#{bundle.saveChanges}" oncomplete="fileSetThumbnail.hide()" update=":datasetForm:filesTable,:messagePanel" actionListener="#{EditDatafilesPage.saveAsDesignatedThumbnail()}"/>
<p:commandButton id="fileSetThumbnailCancelBtn" value="#{bundle.cancel}" onclick="fileSetThumbnail.hide()" actionListener="#{EditDatafilesPage.clearFileMetadataSelectedForThumbnailPopup()}"/>
<p:commandButton id="fileSetThumbnailSaveBtn" value="#{bundle.saveChanges}" oncomplete="PF('fileSetThumbnail').hide()" update=":datasetForm:filesTable,:messagePanel" actionListener="#{EditDatafilesPage.saveAsDesignatedThumbnail()}"/>
<p:commandButton id="fileSetThumbnailCancelBtn" value="#{bundle.cancel}" onclick="PF('fileSetThumbnail').hide()" actionListener="#{EditDatafilesPage.clearFileMetadataSelectedForThumbnailPopup()}"/>
</div>
</p:dialog>

Expand Down Expand Up @@ -542,38 +541,38 @@
</div>
</div>
<div class="button-block">
<p:commandButton id="editFileTagsPopupSaveButton" value="#{bundle.saveChanges}" oncomplete="editFileTagsPopup.hide()" update=":datasetForm:filesTable" actionListener="#{EditDatafilesPage.saveFileTagsAndCategories()}"/>
<p:commandButton id="editFileTagsPopupCancelButton" value="#{bundle.cancel}" onclick="editFileTagsPopup.hide()" actionListener="#{EditDatafilesPage.clearFileMetadataSelectedForTagsPopup()}"/>
<p:commandButton id="editFileTagsPopupSaveButton" value="#{bundle.saveChanges}" oncomplete="PF('editFileTagsPopup').hide()" update=":datasetForm:filesTable" actionListener="#{EditDatafilesPage.saveFileTagsAndCategories()}"/>
<p:commandButton id="editFileTagsPopupCancelButton" value="#{bundle.cancel}" onclick="PF('editFileTagsPopup').hide()" actionListener="#{EditDatafilesPage.clearFileMetadataSelectedForTagsPopup()}"/>
</div>
</p:dialog>

<script type="text/javascript" src="/resources/js/dropins.js" id="dropboxjs" data-app-key="#{EditDatafilesPage.dropBoxKey}"/>
<script type="text/javascript">

function openDialog() {
details.show();
PF('details').show();
}

function testCheckBoxes() {
var count = versionsTable.getSelectedRowsCount();
var count = PF('versionsTable').getSelectedRowsCount();
if (count !== 2) {
compareTwo.show();
PF('compareTwo').show();
} else {
$('button[id$="compareVersions"]').trigger('click');
}
}


function checkFilesSelected() {
var count = filesTable.getSelectedRowsCount();
var count = PF('filesTable').getSelectedRowsCount();
if (count > 0) {
deleteFileConfirmation.show();
PF('deleteFileConfirmation').show();
}
}

function checkNewlyRestricted() {
if ($('input[id$="showAccessPopup"]').val() === 'true') {
editFileAccessPopup.show();
PF('editFileAccessPopup').show();
}
else {
$('button[id$="datasetSave"]').trigger('click');
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/editdatafiles.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<!-- Create/Save Dataset Button Panel -->
<div class="button-block">
<p:commandButton tabindex="1000" id="save" value="#{bundle.saveChanges}" onclick="checkNewlyRestricted();blockFileForm.show();" />
<p:commandButton tabindex="1000" id="save" value="#{bundle.saveChanges}" onclick="checkNewlyRestricted();PF('blockFileForm').show();" />
<p:commandButton tabindex="1000" id="cancel" value="#{bundle.cancel}" action="#{EditDatafilesPage.cancel}" process="@this" update="@form" oncomplete="javascript:post_cancel_edit_files_or_metadata()">
</p:commandButton>
<p:commandButton value="Direct" id="datasetSave"
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/explicitGroup-new-dialog.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
value="#{bundle['dataverse.permissions.explicitGroupEditDialog.createGroup']}"
update="explicitGroupNewDialogContent allGroups :messagePanel"
actionListener="#{manageGroupsPage.createExplicitGroup}"
oncomplete="if (args &amp;&amp; !args.validationFailed) explicitGroupForm.hide();">
oncomplete="if (args &amp;&amp; !args.validationFailed) PF('explicitGroupForm').hide();">
<f:param name="DO_GROUP_VALIDATION" value="true"/>
</p:commandLink>
<button type="button" class="btn btn-default" onclick="explicitGroupForm.hide()" value="#{bundle.cancel}">#{bundle.cancel}</button>
<button type="button" class="btn btn-default" onclick="PF('explicitGroupForm').hide()" value="#{bundle.cancel}">#{bundle.cancel}</button>
</div>
</p:fragment>
</p:dialog>
Expand Down
Loading

0 comments on commit 8768e05

Please sign in to comment.