Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore help tooltips #289

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
34 changes: 34 additions & 0 deletions ckanext/dcatapit/fanstatic/dcatapit.css
Original file line number Diff line number Diff line change
Expand Up @@ -616,4 +616,38 @@ ul.ui-tabs-nav {
.select2-search-choice-close,
.select2-container-multi .select2-search-choice-close {
top: 4px!important;
}

[data-title]:hover:after {
opacity: 1;
transition: all 0.1s ease 0.5s;
visibility: visible;
}

[data-title]:after {
content: attr(data-title);
position: absolute;
bottom: -1.6em;
left: 100%;
padding: 4px 4px 4px 8px;
color: #222;
white-space: nowrap;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 0px 0px 4px #222;
-webkit-box-shadow: 0px 0px 4px #222;
box-shadow: 0px 0px 4px #222;
background-image: -moz-linear-gradient(top, #f8f8f8, #cccccc);
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f8f8f8),color-stop(1, #cccccc));
background-image: -webkit-linear-gradient(top, #f8f8f8, #cccccc);
background-image: -moz-linear-gradient(top, #f8f8f8, #cccccc);
background-image: -ms-linear-gradient(top, #f8f8f8, #cccccc);
background-image: -o-linear-gradient(top, #f8f8f8, #cccccc);
opacity: 0;
z-index: 99999;
visibility: hidden;
}
[data-title] {
position: relative;
}
18 changes: 9 additions & 9 deletions ckanext/dcatapit/fanstatic/dcatapit.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,17 +574,17 @@ ckan.module('geonames', function($){
});


ckan.module('dcatapit-help', function($){
var help = {
initialize: function(){
$.proxyAll(this, /_on/);
$(this.el.find('i')).tooltip();
}
}
// ckan.module('dcatapit-help', function($){
// var help = {
// initialize: function(){
// $.proxyAll(this, /_on/);
// $(this.el.find('i')).tooltip();
// }
// }

return $.extend({}, help);
// return $.extend({}, help);

});
// });


ckan.module('dcatapit-theme', function($){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@
{% macro help_block(content) %}
{% if content %}
<span class="inline-block" data-module="dcatapit-help">
<i class="icon-info-sign size-12" title="{{ content }}"></i>
<i class="icon-info-sign size-12" data-title="{{ content }}" title="{{ content }}"></i>
</span>
{% endif %}
{% endmacro %}
Expand Down