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

Made citations easier to copy #37

Merged
merged 2 commits into from
Mar 4, 2016
Merged

Made citations easier to copy #37

merged 2 commits into from
Mar 4, 2016

Conversation

hunse
Copy link
Member

@hunse hunse commented Jan 13, 2015

  • The individual publication pages now use the same citation popup
    as the publications index.
  • The citation popup uses readonly textareas so the text is easily
    selectable.
  • There is a "Select All" button to make text selection even easier.

Together, these features help address #36.

I added some scripts (JQuery and Bootstrap.js) so I wanted to run this by @tbekolay. Also, would it be possible to upgrade to newer Bootstrap? I think this might make some of the things I'm doing easier and less hackish (namely since I could get the calling button/link for setting the popup tab).

There's some inline style elements that should maybe be in our .css file? Is that an issue?

@@ -390,6 +390,21 @@ h6 {
padding: 10px;
}

/* Citation modal popup stuff */

textarea {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now this is applying to all textareas. Is that bad?

- The individual publication pages now use the same citation popup
  as the publications index.
- The citation popup uses readonly textareas so the text is easily
  selectable.
- There is a "Select All" button to make text selection even easier.
@tbekolay tbekolay force-pushed the pub-upgrades branch 3 times, most recently from 55c6dc4 to 81b234a Compare March 3, 2016 22:58
@tbekolay
Copy link
Member

tbekolay commented Mar 3, 2016

Apologies, this is super old now! But, I took a look and made a slightly different version. It's similar in concept, but makes less changes to the style of the modal. Instead of a "select all" button, now the citation text is clickable (has a pointer cursor on hover) and when you click it it selects all the text for easy copying.

And yeah, at this point Bootstrap 4 is out, so we should upgrade. It's a lot to change though.

@tbekolay
Copy link
Member

tbekolay commented Mar 3, 2016

Since it's so old I don't know if it'll be easy to review, so yeah, I'll probably just merge this in a bit.

@tbekolay tbekolay force-pushed the pub-upgrades branch 3 times, most recently from 34c13f1 to 4d8ee56 Compare March 3, 2016 23:11
Instead of using a textarea, we make the div containing the citation
select on click. Also, fixed some issues with including two copies
of jquery and bootstrap, which were causing the modal to fire twice.

This commit also introduces a `main.js` file for keeping together
miscellaneous JS that is used on multiple pages.
@hunse
Copy link
Member Author

hunse commented Mar 4, 2016

I don't remember this much at all, so if you say it's good to go I'll take your word for it.

@tbekolay tbekolay merged commit 2f260a1 into master Mar 4, 2016
@tbekolay tbekolay deleted the pub-upgrades branch March 28, 2016 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants