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

Issue #661 add a copy to clipboard button #709

Merged
merged 1 commit into from
Feb 16, 2018

Conversation

kinow
Copy link
Collaborator

@kinow kinow commented Feb 13, 2018

Just wanted to learn how it was done in JS. First tried zeroclipboard as I thought that's what GitHub was using, but the flash hidden component was failing. Then tried the simplest example provided in the issue #661.

Here's the result:

image

It re-uses the function to make a selection. So the example code provided is simplified, but we get the same effect in the end.

Not completely happy with final button, so happy to take any suggestions for it 👍

Bruno

@henriyli
Copy link
Collaborator

henriyli commented Feb 15, 2018

Great timing! We were talking about this feature earlier on the same day when you made the pull request. I think the button would be better without the border. Maybe something like this?

.copy-clipboard {
  color: #00748F;
  border-radius: 0;
  vertical-align: inherit;
  font-size: 14px;
  border: 0;
}
.copy-clipboard:hover {
  background-color: #fff;
  color: #23527c;
}
.property-value-column > .copy-clipboard {
  font-size: 24px;
}

screenshot-2018-2-15 fintoto yso cat

@kinow
Copy link
Collaborator Author

kinow commented Feb 15, 2018

Looks so much better! I'm in the airport now, disconnected until Monday. But if you'd like, feel free to update the pull request or even create a new one if necessary :-) otherwise I will update it with the your markup next week. Thanks!

@henriyli henriyli merged commit ea69f9d into NatLibFi:master Feb 16, 2018
@henriyli
Copy link
Collaborator

Thank you @kinow ! This is now merged to master. I added the css in the master branch, since I couldn't figure out the proper GitHub workflow to do it.

@kinow
Copy link
Collaborator Author

kinow commented Feb 19, 2018

Not a problem. Thanks a lot @henriyli !

@osma osma added this to the 2.0 milestone Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants