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

Replace readmore.js with something that does not depend on deprecated/removed jQuery 1.7 features. #28

Open
yohell opened this issue May 17, 2017 · 4 comments
Assignees

Comments

@yohell
Copy link
Contributor

yohell commented May 17, 2017

I put a silly red border around the part that I want to be able to click to show/hide, eg here:

http://neic.no/activities/tryggve/#neic-2017-sensitive-data-workshop

and here:

http://localhost:4000/activities/tryggve/#eudat-sensitive-data-meeting

The border comes from literal element style in _includes/activity.html. Feel free to nuke when you've got the message.

@yohell yohell self-assigned this May 17, 2017
@yohell
Copy link
Contributor Author

yohell commented May 17, 2017

29048c4 adds this using readmore.js,

Not perfect, works on pixel height rather than after first paragraph. Hmmm... Maybe one could wrap only the second paragraph to a pixel height of 0?

Doesn't work on past activity outreach events for some reason.

Also, doesn't seem to obey the speed option.

@yohell
Copy link
Contributor Author

yohell commented May 18, 2017

Animations speed workaround in a95e6e4, also folding only the details to height 0px (and not folding the blurb) works.

A disturbing find: readmore relies on this.selector, which was deprecated in jquery 1.7 and removed in jquery 1.9. We use 3.2.1. As a workaround, I'm injecting the selector as an option when running the $().readmore() funtion.

@bast
Copy link
Member

bast commented May 20, 2017

It is not completely clear to me whether this is now solved and if not what remains to be done before we can close this issue.

@yohell yohell changed the title Click to show / hide calendar event details. Replace readmore.js with something that does not depend on deprecated/removed jQuery 1.7 features. May 22, 2017
@yohell
Copy link
Contributor Author

yohell commented May 22, 2017

We are presently using a (hand-edited version of) <script src="{{ site.baseurl }}/assets/js/readmore.js"></script>, which uses deprecated/removed features of jQuery 1.7. I worked around this by injecting the missing information in the function call instead. Readmore was last updated a year ago https://github.com/jedfoster/Readmore.js. We should probably not use it.

vilmahakkinen added a commit that referenced this issue Feb 17, 2020
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

No branches or pull requests

2 participants