Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/webapp/dataset-widgets.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<img class="margin-bottom-half" src="#{DatasetWidgetsPage.datasetThumbnail.base64image}" alt="#{bundle['dataset.thumbnailsAndWidget.thumbnailImage.alt']}" jsf:rendered="#{DatasetWidgetsPage.datasetThumbnail != null}"/>

<p:commandButton update="@form" value="#{bundle.remove}" action="#{DatasetWidgetsPage.flagDatasetThumbnailForRemoval()}" rendered="#{DatasetWidgetsPage.datasetThumbnail != null and DatasetWidgetsPage.datasetThumbnail.fromDataFile != true}" oncomplete="bind_bsui_components();"/>
<p:commandButton update="@form" value="#{bundle.remove}" action="#{DatasetWidgetsPage.flagDatasetThumbnailForRemoval()}" rendered="#{DatasetWidgetsPage.datasetThumbnail != null and DatasetWidgetsPage.datasetThumbnail.fromDataFile != true}"/>

<div jsf:rendered="#{DatasetWidgetsPage.datasetThumbnail.fromDataFile == true}">
<button class="btn btn-default" onclick="PF('confrmRemove').show()" type="button">
Expand Down Expand Up @@ -73,7 +73,7 @@
</label>
<p:fileUpload invalidFileMessage="#{bundle['dataset.thumbnailsAndWidget.thumbnailImage.upload.invalidMsg']}" id="changelogo" allowTypes="/(\.|\/)(jpg|jpeg|tff|png|gif)$/" update="@form"
sizeLimit="#{systemConfig.uploadLogoSizeLimit}"
oncomplete="bind_bsui_components();" dragDropSupport="true" auto="true" multiple="false"
dragDropSupport="true" auto="true" multiple="false"
listener="#{DatasetWidgetsPage.handleImageFileUpload}" label="#{bundle['dataset.thumbnailsAndWidget.thumbnailImage.upload']}"/>
</div>
</div>
Expand Down
33 changes: 16 additions & 17 deletions src/main/webapp/dataset.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
<!-- NORMAL DOWNLOAD BUTTON (NO TABULAR FILES) -->
<li jsf:rendered="#{!DatasetPage.versionHasTabular}">
<p:commandLink update="@form" actionListener="#{DatasetPage.startDownloadAllOriginal()}" styleClass="btn-download"
oncomplete="bind_bsui_components();showPopup();">
oncomplete="showPopup();">
#{bundle.download}
<h:outputFormat value="#{bundle['dataset.accessBtn.download.size']}">
<f:param value="#{DatasetPage.sizeOfDataset}" />
Expand All @@ -180,7 +180,7 @@
<!-- DOWNLOAD ORIGINAL BUTTON (TABULAR FILES PRESENT) -->
<li jsf:rendered="#{ DatasetPage.sizeOfDatasetOrig != '0 B' and !(DatasetPage.tooLargeToDownloadOriginal) }">
<p:commandLink update="@form" actionListener="#{DatasetPage.startDownloadAllOriginal()}"
oncomplete="bind_bsui_components();showPopup();"
oncomplete="showPopup();"
styleClass="btn-download">
#{bundle.downloadOriginal}
<h:outputFormat value="#{bundle['dataset.accessBtn.download.size']}">
Expand All @@ -195,7 +195,7 @@
</ui:fragment>
<!-- DOWNLOAD ARCHIVAL FILES (TABULAR FILES PRESENT) -->
<li jsf:rendered="#{!DatasetPage.tooLargeToDownloadArchival}">
<p:commandLink update="@form" oncomplete="bind_bsui_components();showPopup();"
<p:commandLink update="@form" oncomplete="showPopup();"
actionListener="#{DatasetPage.startDownloadAllArchival()}" styleClass="btn-download">
#{bundle.downloadArchival}
<h:outputFormat value="#{bundle['dataset.accessBtn.download.size']}">
Expand Down Expand Up @@ -265,7 +265,7 @@
<!-- List link -->
<p:commandLink title="#{bundle['dataset.compute.computeBatchList']}"
value="#{bundle['dataset.compute.computeBatchList']}"
oncomplete="PF('computeBatchListPopup').show();bind_bsui_components();"
oncomplete="PF('computeBatchListPopup').show();"
update="computeBatchListPopup">
<h:outputText value="#{bundle['dataset.compute.computeBatchList']}"/>
</p:commandLink>
Expand Down Expand Up @@ -376,13 +376,13 @@
</h:outputLink>
</li>
<li>
<p:commandLink id="editMetadata" actionListener="#{DatasetPage.edit('METADATA')}" update="@form,:datasetForm,:messagePanel" oncomplete="javascript:bind_bsui_components();">
<p:commandLink id="editMetadata" actionListener="#{DatasetPage.edit('METADATA')}" update="@form,:datasetForm,:messagePanel">
<f:setPropertyActionListener target="#{DatasetPage.selectedTabIndex}" value="0" />
<h:outputText value="#{bundle['dataset.editBtn.itemLabel.metadata']}" />
</p:commandLink>
</li>
<li>
<p:commandLink id="editTerms" actionListener="#{DatasetPage.edit('LICENSE')}" update="@form,:datasetForm,:messagePanel" oncomplete="javascript:bind_bsui_components();">
<p:commandLink id="editTerms" actionListener="#{DatasetPage.edit('LICENSE')}" update="@form,:datasetForm,:messagePanel">
<f:setPropertyActionListener target="#{DatasetPage.selectedTabIndex}" value="0" />
<h:outputText value="#{bundle['dataset.editBtn.itemLabel.terms']}" />
</p:commandLink>
Expand Down Expand Up @@ -444,7 +444,7 @@
<li>
<p:commandLink id="deaccessionDatasetLink"
action="#{DatasetPage.clickDeaccessionDataset}"
oncomplete="PF('deaccessionBlock').show();bind_bsui_components();"
oncomplete="PF('deaccessionBlock').show();"
update="deaccessionBlock">
<h:outputText value="#{bundle['dataset.editBtn.itemLabel.deaccession']}" />
</p:commandLink>
Expand All @@ -459,7 +459,7 @@
<div class="btn-group btn-group-justified" jsf:rendered="#{dataverseSession.user.authenticated and !DatasetPage.workingVersion.deaccessioned and DatasetPage.dataset.released}">
<p:commandLink styleClass="btn btn-default btn-access btn-xs btn-block btn-link-dataset"
action="#{DatasetPage.setShowLinkingPopup(true)}"
oncomplete="PF('linkDatasetForm').show();bind_bsui_components();"
oncomplete="PF('linkDatasetForm').show();"
update="@form">
#{bundle['dataset.linkBtn']}
</p:commandLink>
Expand Down Expand Up @@ -699,8 +699,7 @@
style="display:none"
process="@this :datasetForm:hostDataverseContent"
update="@form,:breadCrumbPanel"
action="#{DatasetPage.updateOwnerDataverse()}"
oncomplete="bind_bsui_components();">
action="#{DatasetPage.updateOwnerDataverse()}">
</p:commandButton>
</p:fragment>
</div>
Expand Down Expand Up @@ -728,7 +727,7 @@
<p:commandButton value="#{bundle['file.dataFilesTab.button.direct']}" id="updateTemplate"
style="display:none"
update=":datasetForm,accessPopup"
action="#{DatasetPage.handleChangeButton}" oncomplete="javascript:bind_bsui_components();">
action="#{DatasetPage.handleChangeButton}">
</p:commandButton>
</div>
</div>
Expand All @@ -750,9 +749,9 @@
<p:commandButton id="saveTop" styleClass="btn btn-default" value="#{bundle.saveChanges}"
onclick="PF('blockDatasetForm').show();"
update=":datasetForm,:messagePanel"
oncomplete="javascript:bind_bsui_components();$(document).scrollTop(0);"
oncomplete="$(document).scrollTop(0);"
action="#{DatasetPage.save}"/>
<p:commandButton id="cancelTop" styleClass="btn btn-link" value="#{bundle.cancel}" action="#{DatasetPage.cancel}" process="@this" update="@form" oncomplete="javascript:bind_bsui_components();">
<p:commandButton id="cancelTop" styleClass="btn btn-link" value="#{bundle.cancel}" action="#{DatasetPage.cancel}" process="@this" update="@form">
<f:setPropertyActionListener target="#{DatasetPage.selectedTabIndex}" value="#{DatasetPage.editMode == 'METADATA' ? 1 : DatasetPage.selectedTabIndex}"/>
</p:commandButton>
</div>
Expand Down Expand Up @@ -826,7 +825,7 @@
</ui:fragment>
<p:tabView id="tabView" widgetVar="content" activeIndex="#{DatasetPage.selectedTabIndex}"
rendered="#{empty DatasetPage.editMode or (DatasetPage.editMode == 'METADATA' or DatasetPage.editMode == 'LICENSE')}">
<p:ajax event="tabChange" listener="#{DatasetPage.tabChanged}" oncomplete="bind_bsui_components();" update="@this" />
<p:ajax event="tabChange" listener="#{DatasetPage.tabChanged}" update="@this" />
<p:tab id="dataFilesTab" title="#{bundle.files}"
rendered="#{(!DatasetPage.workingVersion.deaccessioned
or (DatasetPage.workingVersion.deaccessioned and DatasetPage.canUpdateDataset()))
Expand All @@ -839,7 +838,7 @@
rendered="#{(!DatasetPage.workingVersion.deaccessioned or (DatasetPage.workingVersion.deaccessioned and DatasetPage.canUpdateDataset()))
and (empty DatasetPage.editMode or DatasetPage.editMode == 'METADATA')}">
<div class="button-block tab-header margin-bottom text-right" jsf:rendered="#{empty DatasetPage.editMode}">
<p:commandLink styleClass="btn btn-default btn-access" actionListener="#{DatasetPage.edit('METADATA')}" update="@form,:messagePanel" oncomplete="javascript:bind_bsui_components();"
<p:commandLink styleClass="btn btn-default btn-access" actionListener="#{DatasetPage.edit('METADATA')}" update="@form,:messagePanel"
disabled="#{DatasetPage.lockedFromEdits}"
rendered="#{!widgetWrapper.widgetView
and (DatasetPage.sessionUserAuthenticated
Expand Down Expand Up @@ -906,9 +905,9 @@
<p:commandButton id="save" styleClass="btn btn-default" value="#{DatasetPage.editMode == 'CREATE' ? bundle['file.addBtn'] : bundle.saveChanges}"
onclick="PF('blockDatasetForm').show();"
update=":datasetForm,:messagePanel"
oncomplete="javascript:bind_bsui_components();$(document).scrollTop(0);"
oncomplete="$(document).scrollTop(0);"
action="#{DatasetPage.save}"/>
<p:commandButton id="cancel" styleClass="btn btn-link" value="#{bundle.cancel}" action="#{DatasetPage.cancel}" process="@this" update="@form" rendered="#{DatasetPage.editMode != 'CREATE'}" oncomplete="javascript:bind_bsui_components();">
<p:commandButton id="cancel" styleClass="btn btn-link" value="#{bundle.cancel}" action="#{DatasetPage.cancel}" process="@this" update="@form" rendered="#{DatasetPage.editMode != 'CREATE'}">
<f:setPropertyActionListener target="#{DatasetPage.selectedTabIndex}" value="#{DatasetPage.editMode == 'METADATA' ? 1 : DatasetPage.selectedTabIndex}"/>
</p:commandButton>
<button id="cancelCreate" class="btn btn-link" value="#{bundle.cancel}" onclick="cancelDatasetCreate();return false;" jsf:rendered="#{DatasetPage.editMode == 'CREATE'}">#{bundle.cancel}</button>
Expand Down
4 changes: 1 addition & 3 deletions src/main/webapp/dataverse_template.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<script defer="defer" src="#{resource['js/jquery.matchHeight.js']}?version=#{settingsWrapper.appVersion}"></script>
<script defer="defer" src="#{resource['js/jquery.sharrre.js']}?version=#{settingsWrapper.appVersion}"></script>
<script defer="defer" src="#{resource['js/clipboard.min.js']}?version=#{settingsWrapper.appVersion}"></script>
<o:onloadScript>bind_bsui_components();</o:onloadScript>
<ui:fragment rendered="#{settingsWrapper.getCVocConf().size() > 0}">
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
Expand All @@ -108,9 +109,6 @@
}
;
});

// Rebind bootstrap UI components
bind_bsui_components();
});
function clickSupportLink() {
$("[id$='headerSupportLink']").click();
Expand Down