Patch #31441 » selectors_for_tooltip.patch
| app/helpers/application_helper.rb | ||
|---|---|---|
|
def time_tag(time)
|
||
|
text = distance_of_time_in_words(Time.now, time)
|
||
|
if @project
|
||
|
link_to(text, project_activity_path(@project, :from => User.current.time_to_date(time)), :title => format_time(time))
|
||
|
link_to(text, project_activity_path(@project, :from => User.current.time_to_date(time)), :title => format_time(time), :data => {:toggle => 'tooltip'})
|
||
|
else
|
||
|
content_tag('abbr', text, :title => format_time(time))
|
||
|
end
|
||
| app/helpers/avatars_helper.rb | ||
|---|---|---|
|
# +user+ can be a User or a string that will be scanned for an email address (eg. 'joe <joe@foo.bar>')
|
||
|
def avatar(user, options = { })
|
||
|
if Setting.gravatar_enabled?
|
||
|
options.merge!(:default => Setting.gravatar_default)
|
||
|
options.merge!(:default => Setting.gravatar_default, :data => {:toggle => 'tooltip'})
|
||
|
options[:class] = GravatarHelper::DEFAULT_OPTIONS[:class] + " " + options[:class] if options[:class]
|
||
|
email = nil
|
||
|
if user.respond_to?(:mail)
|
||
| public/javascripts/application.js | ||
|---|---|---|
|
}
|
||
|
$(function () {
|
||
|
$('[title]').tooltip({
|
||
|
$('[data-toggle="tooltip"], .icon-only').tooltip({
|
||
|
show: {
|
||
|
delay: 400
|
||
|
},
|
||