Skip to content

Commit

Permalink
4572-explore-button-dropdown-toggle
Browse files Browse the repository at this point in the history
Updated Explore Button to click first option when only one Explorer is installed
  • Loading branch information
kevinworthington authored Apr 9, 2018
1 parent ec02f90 commit 19dd536
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/webapp/file-download-button-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@
<!--exploreTools is set as a ui:param by the file and dataset pages-->
<!--Note that "WorldMap Explore" is not an explore tool (external tool)-->
<div class="btn-group" jsf:rendered="#{fileDownloadHelper.canDownloadFile(fileMetadata) and not empty exploreTools or (worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata))}">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-equalizer"/> #{bundle.explore} <span class="caret"/>
<button jsf:rendered="#{exploreTools.size()==1}" type="button" class="btn btn-default" onclick="$(this).parent().find( 'li > a' ).trigger( 'click' );">
<span class="glyphicon glyphicon-equalizer"/> #{bundle.explore}
</button>
<button jsf:rendered="#{exploreTools.size()>1}" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-equalizer"/> #{bundle.explore} <span class="caret"/>
</button>
<ul class="dropdown-menu multi-level pull-right text-left" role="menu">
<!--external tools-->
Expand Down

0 comments on commit 19dd536

Please sign in to comment.