Skip to content

Commit

Permalink
Merge pull request #5596 from IQSS/3925-tooltip-icons
Browse files Browse the repository at this point in the history
3925 tooltip icons
  • Loading branch information
kcondon authored Mar 7, 2019
2 parents 6d72ccf + 0a782f8 commit dc24355
Show file tree
Hide file tree
Showing 50 changed files with 769 additions and 787 deletions.
6 changes: 6 additions & 0 deletions doc/sphinx-guides/source/_static/docsdataverse_org.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ div.code-example .color-swatch {
margin: 0 5px;
border-radius: 3px
}
div.code-example .messagePanel .glyphicon {
font-size: 1.5em;
vertical-align: bottom;
}
div.code-example span.glyphicon-question-sign.tooltip-icon {color: #99bcdb !important;}
div.code-example span.glyphicon-question-sign.tooltip-icon:hover {color: #337AB7 !important;}

#breadcrumbNavBlock {margin-top:.5em;}
#breadcrumbNavBlock .breadcrumbBlock {float:left; position:relative;}
Expand Down
33 changes: 30 additions & 3 deletions doc/sphinx-guides/source/_static/dv_rebind_bootstrap_ui.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
function bind_tooltip(){
// bind tooltips to all necessary elements
$("a.bootstrap-button-tooltip").tooltip({container: 'body'});
function bind_bsui_components(){
bind_tooltip_popover();
}

function bind_tooltip_popover(){
// bind tooltips + popovers to all necessary elements
$jqTheme(".bootstrap-button-tooltip, [data-toggle='tooltip']").tooltip({container: 'body'});
$jqTheme("[data-toggle='popver']").popover({container: 'body'});

// CLOSE OPEN TOOLTIPS + POPOVERS ON BODY CLICKS
$jqTheme('body').on("touchstart", function(e){
$jqTheme(".bootstrap-button-tooltip, [data-toggle='tooltip']").each(function () {
// hide any open tooltips when anywhere else in body is clicked
if (!$jqTheme(this).is(e.target) && $jqTheme(this).has(e.target).length === 0 && $jqTheme('div.tooltip').has(e.target).length === 0) {
$jqTheme(this).tooltip('hide');
}////end if
});
$jqTheme("a.popoverHTML, [data-toggle='popover']").each(function () {
//the 'is' for buttons that trigger popups
//the 'has' for icons within a button that triggers a popup
if (!$jqTheme(this).is(e.target) && $jqTheme(this).has(e.target).length === 0 && $jqTheme('div.popover').has(e.target).length === 0) {
$jqTheme(this).popover('hide');
}
});
});

// CLOSE OPEN TOOLTIPS ON BUTTON CLICKS
$jqTheme('.bootstrap-button-tooltip').on('click', function () {
$jqTheme(this).tooltip('hide');
});
}
6 changes: 6 additions & 0 deletions doc/sphinx-guides/source/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
{# Add some extra stuff before and use existing with 'super()' call. #}
{% block footer %}
{{ super() }}
<script>
$jqTheme(document).ready(function () {
// Rebind bootstrap UI components
bind_bsui_components();
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand Down
8 changes: 4 additions & 4 deletions doc/sphinx-guides/source/style/foundations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ There are over 250 glyphs in font format from the Glyphicon Halflings set provid
.. raw:: html

<div class="panel panel-default code-example">
<div class="panel-body">
<span class="glyphicon glyphicon-search h1"></span>
<span class="glyphicon glyphicon-user h1"></span>
<span class="glyphicon glyphicon-lock h1"></span>
<div class="panel-body h1">
<span class="glyphicon glyphicon-search"></span>
<span class="glyphicon glyphicon-user"></span>
<span class="glyphicon glyphicon-lock"></span>
</div>
</div>

Expand Down
205 changes: 136 additions & 69 deletions doc/sphinx-guides/source/style/patterns.rst

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion doc/sphinx_bootstrap_theme/bootstrap/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
'_static/js/jquery-fix.js',
'_static/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js',
'_static/bootstrap-sphinx.js',
'_static/navbarscroll.js'
'_static/navbarscroll.js',
'_static/dv_rebind_bootstrap_ui.js'
]
%}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ less=Less...
select=Select...
selectedFiles=Selected Files
htmlAllowedTitle=Allowed HTML Tags
htmlAllowedMsg=This field supports only certain <span class="text-info popoverHTML">HTML tags</span>.
htmlAllowedMsg=This field supports only certain <a class="popoverHTML" tabindex="0" role="button">HTML tags</a>.
htmlAllowedTags=<a>, <b>, <blockquote>, <br>, <code>, <del>, <dd>, <dl>, <dt>, <em>, <hr>, <h1>-<h3>, <i>, <img>, <kbd>, <li>, <ol>, <p>, <pre>, <s>, <sup>, <sub>, <strong>, <strike>, <ul>
toggleNavigation=Toggle navigation
defaultBody=Default Body
Expand Down Expand Up @@ -974,7 +974,7 @@ dataverse.permissions.roles.id.title=Enter a name for the alias.
dataverse.permissions.roles.description.title=Describe the role (1000 characters max).
dataverse.permissions.roles.description.counter={0} characters remaining
dataverse.permissions.roles.roleList.header=Role Permissions
dataverse.permissions.roles.roleList.authorizedUserOnly=Permissions with the information icon indicate actions that can be performed by users not logged into Dataverse.
dataverse.permissions.roles.roleList.authorizedUserOnly=Permissions with an asterisk icon indicate actions that can be performed by users not logged into Dataverse.

# explicitGroup-new-dialog.xhtml
dataverse.permissions.explicitGroupEditDialog.title.new=Create Group
Expand Down
3 changes: 1 addition & 2 deletions src/main/webapp/dashboard.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@
<div class="row text-left">
<div class="col-xs-12">
<p class="help-block">
<span class="glyphicon glyphicon-info-sign"/>
<h:outputFormat value=" #{bundle['dashboard.card.metadataexport.message']}" escape="false">
<h:outputFormat value="#{bundle['dashboard.card.metadataexport.message']}" escape="false">
<f:param value="#{dataverseServiceBean.findRootDataverse().displayName}"/>
<f:param value="&lt;a href=&#34;#{systemConfig.guidesBaseUrl}/#{systemConfig.guidesVersion}/api&#34; target=&#34;_blank&#34;&gt;"/>
<f:param value="&lt;/a&gt;"/>
Expand Down
13 changes: 8 additions & 5 deletions src/main/webapp/dataset-citation.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
<span class="citation-select" onclick="if (event.target) { selectText(event.target); } else{ selectText(this); }">
<h:outputText value="#{DatasetPage.displayCitation}" escape="false"/>
</span>
<span class="glyphicon glyphicon-question-sign text-primary" jsf:rendered="#{!DatasetPage.dataset.released}" data-toggle="tooltip" data-trigger="hover" data-placement="top" data-original-title="#{bundle['dataset.cite.title.released']}"/>
<span class="glyphicon glyphicon-question-sign text-primary" jsf:rendered="#{DatasetPage.dataset.released and DatasetPage.workingVersion.draft}" data-toggle="tooltip" data-trigger="hover" data-placement="top" data-original-title="#{bundle['dataset.cite.title.draft']}"/>
<span class="glyphicon glyphicon-question-sign text-primary" jsf:rendered="#{DatasetPage.workingVersion.deaccessioned}" data-toggle="tooltip" data-trigger="hover" data-placement="top" data-original-title="#{bundle['dataset.cite.title.deassessioned']}"/>
<span class="glyphicon glyphicon-question-sign text-primary" jsf:rendered="#{!DatasetPage.dataset.released}"
data-toggle="tooltip" data-placement="top" data-original-title="#{bundle['dataset.cite.title.released']}"/>
<span class="glyphicon glyphicon-question-sign text-primary" jsf:rendered="#{DatasetPage.dataset.released and DatasetPage.workingVersion.draft}"
data-toggle="tooltip" data-placement="top" data-original-title="#{bundle['dataset.cite.title.draft']}"/>
<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="col-sm-5 col-md-4 text-right citation-download" jsf:rendered="#{!DatasetPage.workingVersion.deaccessioned}">
<div class="col-xs-5 col-md-4 text-right citation-download" jsf:rendered="#{!DatasetPage.workingVersion.deaccessioned}">
<div class="dropdown">
<button type="button" class="btn btn-default dropdown-toggle downloadCitation" data-toggle="dropdown">
<span class="glyphicon glyphicon-list"/> #{bundle['dataset.cite.downloadBtn']} <span class="caret"></span>
Expand All @@ -41,7 +44,7 @@
</li>
</ul>
</div>
<div class="small text-muted text-right citation-standards"><span class="glyphicon glyphicon-info-sign"></span> <h:outputText value=" #{bundle['dataset.cite.standards.tip']}" escape="false"/></div>
<div class="small text-muted text-right citation-standards"><h:outputText value="#{bundle['dataset.cite.standards.tip']}" escape="false"/></div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit dc24355

Please sign in to comment.