Skip to content

Commit

Permalink
Fix repositories flags tooltip
Browse files Browse the repository at this point in the history
In some browsers when clicking in the tootip nothing happens.
  • Loading branch information
DavidKang committed Dec 10, 2018
1 parent 4405a9e commit 7c9d251
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/api/app/assets/javascripts/webui2/repositories.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ function setSpinnersForFlags() { // jshint ignore:line
var icon = $('div[id="' + flag + '"] a');
icon.addClass('d-none');
icon.next().removeClass('d-none');
$('.popover').popover('hide');
});
}

Expand Down
6 changes: 3 additions & 3 deletions src/api/app/views/webui2/shared/_repositories.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
%span.flagerror
= render partial: 'shared/repositories_flag_table',
locals: { flags: useforbuild, project: project, package: package, architectures: architectures, user_can_set_flags: user_can_set_flags }
:javascript
$(document).ready(function() {

= content_for :ready_function do
:plain
setSpinnersForFlags();
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
icon_class += ' ml-0_6' if is_flag_set_by_user

%div{ id: flag.fullname }
%a{ href: 'javascript:void(0)', title: title,
data: { html: 'true', toggle: user_can_set_flags ? 'popover' : '', placement: 'left', trigger: 'focus', content: "#{content}" } }
%span.text-nowrap
= link_to('javascript:void(0)', title: title,
data: { html: 'true', toggle: user_can_set_flags ? 'popover' : '', placement: 'left', content: "#{content}" } ) do
%span.text-nowrap.current_flag_state
%i.fas{ class: icon_class }
- if is_flag_set_by_user
%i.fas.fa-circle.text-gray-500.text-40p-size
Expand Down

0 comments on commit 7c9d251

Please sign in to comment.