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

fix: version column resize when clipboard icon appears #292

Merged
merged 1 commit into from
Aug 25, 2019
Merged
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
4 changes: 2 additions & 2 deletions lib/pact_broker/ui/views/index/show-with-tags.haml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
%td.consumer-version-number
%div.clippable
= escape_html(index_item.consumer_version_number)
%button.clippy.hidden{ title: "Copy to clipboard" }
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- if index_item.latest?
.tag.label.label-success
Expand All @@ -60,7 +60,7 @@
%td.provider-version-number
%div.clippable
= escape_html(index_item.provider_version_number)
%button.clippy.hidden{ title: "Copy to clipboard" }
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- index_item.provider_version_latest_tag_names.each do | tag_name |
.tag.label.label-primary
Expand Down
4 changes: 2 additions & 2 deletions lib/pact_broker/ui/views/matrix/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
%div.clippable
%a{href: line.consumer_version_number_url}
= line.display_consumer_version_number
%button.clippy.hidden{ title: "Copy to clipboard" }
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- line.latest_consumer_version_tags.each do | tag |
.tag-parent{"title": tag.tooltip, "data-toggle": "tooltip", "data-placement": "right"}
Expand All @@ -132,7 +132,7 @@
%div.clippable
%a{href: line.provider_version_number_url}
= line.display_provider_version_number
%button.clippy.hidden{ title: "Copy to clipboard" }
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- line.latest_provider_version_tags.each do | tag |
.tag-parent{"title": tag.tooltip, "data-toggle": "tooltip", "data-placement": "right"}
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @example in Haml
* %div.clippable
* = Text to be copied
* %button.clippy.hidden{ title: "Copy to clipboard" }
* %button.clippy.invisible{ title: "Copy to clipboard" }
* %span.glyphicon.glyphicon-copy
*/

Expand All @@ -17,7 +17,7 @@ function initializeClipper(selector) {
const elements = $(selector);

elements.hover(function() {
$(this).children(".clippy").toggleClass("hidden");
$(this).children(".clippy").toggleClass("invisible");
});

elements
Expand Down