Skip to content

Commit

Permalink
Moved inline styles for new button UI to stylesheet [ref #6684]
Browse files Browse the repository at this point in the history
  • Loading branch information
mheppler committed May 27, 2020
1 parent 136665c commit b3872b2
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 131 deletions.
12 changes: 6 additions & 6 deletions src/main/webapp/dataset-citation.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
xmlns:o="http://omnifaces.org/ui"
xmlns:jsf="http://xmlns.jcp.org/jsf">
<div class="citation-block">
<div style="padding:10px 10px 0px 10px;" class="clearfix #{DatasetPage.workingVersion.deaccessioned ? 'alert alert-danger bg-danger' : 'alert alert-info bg-citation'}">
<div class="clearfix #{DatasetPage.workingVersion.deaccessioned ? 'alert alert-danger bg-danger' : 'alert alert-info bg-citation'}">
<div class="citation #{DatasetPage.workingVersion.deaccessioned ? '' : 'margin-bottom'}">
<div class="pull-left preview-icon-block" style="padding-right:10px;padding-bottom:10px;">
<div class="pull-left preview-icon-block">
<img src="#{DatasetPage.thumbnailString}"
class="img-responsive"
jsf:rendered="#{!empty DatasetPage.thumbnailString and !DatasetPage.workingVersion.deaccessioned}"
Expand All @@ -26,9 +26,9 @@
<span class="glyphicon glyphicon-question-sign text-primary" jsf:rendered="#{DatasetPage.workingVersion.deaccessioned}"
data-toggle="tooltip" data-placement="top" data-original-title="#{bundle['dataset.cite.title.deassessioned']}"/>
</div>
<div class="pull-left row col-sm-8" style="padding:0;">
<div class="col-sm-3 col-md-4 col-lg-3 btn-group citation-download" style="margin-bottom:10px;" jsf:rendered="#{!DatasetPage.workingVersion.deaccessioned}">
<button type="button" style="padding:0;" class="btn btn-link dropdown-toggle downloadCitation" data-toggle="dropdown">
<div class="pull-left row col-sm-8 padding-none">
<div class="col-sm-3 col-md-4 col-lg-3 btn-group margin-bottom citation-download" jsf:rendered="#{!DatasetPage.workingVersion.deaccessioned}">
<button type="button" class="btn btn-link dropdown-toggle padding-none downloadCitation" data-toggle="dropdown">
#{bundle['dataset.cite.downloadBtn']} <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
Expand All @@ -49,7 +49,7 @@
</li>
</ul>
</div>
<div class="col-sm-9 col-md-8 col-lg-9 small text-muted citation-standards" style="padding-top:3px;margin-bottom:10px;" jsf:rendered="#{!DatasetPage.workingVersion.deaccessioned}">
<div class="col-sm-9 col-md-8 col-lg-9 small text-muted margin-bottom citation-standards" jsf:rendered="#{!DatasetPage.workingVersion.deaccessioned}">
<h:outputText value="#{bundle['dataset.cite.standards.tip']}" escape="false"/>
</div>
</div>
Expand Down
143 changes: 66 additions & 77 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 @@ -398,7 +398,7 @@
<div id="actionButtonBlock" class="col-xs-12 button-block" jsf:rendered="#{!widgetWrapper.widgetView}">
<div class="row">
<!-- Metrics for Root Dataverse -->
<div id="metrics-block" class="col-xs-4" jsf:rendered="#{DataversePage.isRootDataverse() and !settingsWrapper.rsyncOnly}">
<div id="metrics-block1" class="col-xs-4" jsf:rendered="#{DataversePage.isRootDataverse() and !settingsWrapper.rsyncOnly}">
<div id="metrics-label" class="col-xs-4 small text-center">
<h:outputLink value="#{systemConfig.metricsUrl}" target="_blank" title="#{bundle['metrics.title.tip']}" rendered="#{systemConfig.metricsUrl != null}">
<span class="glyphicon glyphicon-stats"/> #{bundle['metrics.title']}
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/file-configure-dropdown-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<!-- END: FILE PG -->
<!-- DATASET PG -->
<div class="btn-group dropdown" jsf:rendered="#{!isFilePg}">
<a style="font-size:2em !important;" type="button" class="btn-configure btn-accessXXX btn btn-link bootstrap-button-tooltip dropdown-toggle"
<a type="button" class="btn-configure btn-access btn btn-link bootstrap-button-tooltip dropdown-toggle"
title="#{bundle['dataset.configureBtn']}" id="configureBtn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-cog"/> <span class="caret"></span>
</a>
Expand Down
18 changes: 7 additions & 11 deletions src/main/webapp/file-download-button-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@
<p:commandLink rendered="#{!(fileMetadata.dataFile.tabularData) and !(downloadPopupRequired)
and fileMetadata.dataFile.filePackage and systemConfig.HTTPDownload}"
styleClass="btn-download btn btn-link bootstrap-button-tooltip"
style="font-size:2em !important;"
title="#{bundle.download}"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
process="@this" update="@widgetVar(downloadPackagePopup)" oncomplete="PF('downloadPackagePopup').show();handleResizeDialog('downloadPackagePopup');">
Expand All @@ -207,7 +206,6 @@
<p:commandLink rendered="#{!(fileMetadata.dataFile.tabularData) and (downloadPopupRequired)
and fileMetadata.dataFile.filePackage and systemConfig.HTTPDownload}"
styleClass="btn-download btn btn-link bootstrap-button-tooltip"
style="font-size:2em !important;"
title="#{bundle.download}"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'package')}"
Expand All @@ -220,7 +218,6 @@
<p:commandLink rendered="#{!(fileMetadata.dataFile.tabularData) and !(downloadPopupRequired)
and !(fileMetadata.dataFile.filePackage and systemConfig.HTTPDownload)}"
styleClass="btn-download btn btn-link bootstrap-button-tooltip"
style="font-size:2em !important;"
title="#{bundle.download}"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
process="@this" actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'Download')}">
Expand All @@ -231,7 +228,6 @@
<p:commandLink rendered="#{!(fileMetadata.dataFile.tabularData) and downloadPopupRequired
and !(fileMetadata.dataFile.filePackage and systemConfig.HTTPDownload)}"
styleClass="btn-download btn btn-link bootstrap-button-tooltip"
style="font-size:2em !important;"
title="#{bundle.download}"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
action="#{guestbookResponseService.modifyDatafile(guestbookResponse, fileMetadata)}"
Expand All @@ -243,7 +239,7 @@
<!-- TABULAR SUBMENU LINKS -->
<div class="btn-group" jsf:rendered="#{fileMetadata.dataFile.tabularData}">
<!-- Download Dropdown -->
<a style="font-size:2em !important;" type="button" class="btn-download btn btn-link bootstrap-button-tooltip dropdown-toggle"
<a type="button" class="btn-download btn btn-link bootstrap-button-tooltip dropdown-toggle"
title="#{bundle.download}" id="downloadBtn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-download-alt"/><span class="sr-only">#{bundle.download}</span><span class="caret"></span>
</a>
Expand Down Expand Up @@ -404,7 +400,7 @@
<!-- TODO - FIX UX INDICATOR YOUR REQUEST WAS SUBMITTED SINCE BTN LABEL IS NOW HIDDEN IN TITLE TOOLTIP
FIX, WITH CSS POINTER-EVENTS VS JQUERY WORKAROUND, BUT... PRIMEFACES COMMANDLINK DIASABLED EMPTY TITLE BUG ???? -->

<p:commandLink style="font-size:2em !important;" styleClass="btn-request btn btn-link bootstrap-button-tooltip" rendered="#{fileDownloadHelper.session.user.authenticated
<p:commandLink styleClass="btn-request btn btn-link bootstrap-button-tooltip" rendered="#{fileDownloadHelper.session.user.authenticated
and !requestAccessPopupRequired}"
title="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? bundle['file.accessRequested'] : bundle['file.requestAccess']}"
process="@this"
Expand All @@ -413,7 +409,7 @@
disabled="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user)}">
<span class="glyphicon glyphicon-bullhorn"/><span class="sr-only">#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? bundle['file.accessRequested'] : bundle['file.requestAccess']}</span>
</p:commandLink>
<p:commandLink style="font-size:2em !important;" styleClass="btn-request btn btn-link bootstrap-button-tooltip" rendered="#{fileDownloadHelper.session.user.authenticated
<p:commandLink styleClass="btn-request btn btn-link bootstrap-button-tooltip" rendered="#{fileDownloadHelper.session.user.authenticated
and requestAccessPopupRequired}"
title="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? bundle['file.accessRequested'] : bundle['file.requestAccess']}"
process="@this"
Expand All @@ -423,7 +419,7 @@
disabled="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user)}">
<span class="glyphicon glyphicon-bullhorn"/><span class="sr-only">#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? bundle['file.accessRequested'] : bundle['file.requestAccess']}</span>
</p:commandLink>
<p:commandLink style="font-size:2em !important;" styleClass="btn-request btn btn-link bootstrap-button-tooltip" rendered="#{!fileDownloadHelper.session.user.authenticated}"
<p:commandLink styleClass="btn-request btn btn-link bootstrap-button-tooltip" rendered="#{!fileDownloadHelper.session.user.authenticated}"
title="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? bundle['file.accessRequested'] : bundle['file.requestAccess']}"
process="@this"
onclick="PF('accessSignUpLogIn_popup').show()">
Expand Down Expand Up @@ -506,13 +502,13 @@
<!-- DATASET PG -->
<div class="btn-group" jsf:rendered="#{!isFilePg}">
<ui:fragment rendered="#{(exploreTools.size()==1 and !worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata)) or (exploreTools.size()==0 and worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata))}">
<a style="font-size:2em !important;" class="btn-explore btn btn-link bootstrap-button-tooltip"
<a class="btn-explore btn btn-link bootstrap-button-tooltip"
title="#{bundle.explore}" id="exploreBtn" onclick="$(this).parent().find( 'li > a' ).trigger( 'click' );">
<span class="glyphicon glyphicon-equalizer"/><span class="sr-only">#{bundle.explore}</span>
</a>
</ui:fragment>
<ui:fragment rendered="#{exploreTools.size()>1 or (exploreTools.size()>=1 and worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata))}">
<a style="font-size:2em !important;" class="btn-explore btn btn-link bootstrap-button-tooltip dropdown-toggle"
<a class="btn-explore btn btn-link bootstrap-button-tooltip dropdown-toggle"
title="#{bundle.explore}" id="exploreBtn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-equalizer"/><span class="sr-only">#{bundle.explore}</span><span class="caret"></span>
</a>
Expand Down Expand Up @@ -573,7 +569,7 @@
<!-- END: Compute Button *FILE PG only*: -->

<!-- Compute Button *DATASET PG only*: -->
<h:outputLink style="font-size:2em !important;" styleClass="btn-compute btn btn-link bootstrap-button-tooltip"
<h:outputLink styleClass="btn-compute btn btn-link bootstrap-button-tooltip"
title="#{bundle['file.compute']}" value="#{DatasetPage.getComputeUrl(fileMetadata)}"
target="_blank" rel="noopener"
rendered="#{!isFilePg and DatasetPage.showComputeButton(fileMetadata) and fileDownloadHelper.canDownloadFile(fileMetadata)}">
Expand Down
Loading

0 comments on commit b3872b2

Please sign in to comment.