-
Notifications
You must be signed in to change notification settings - Fork 2
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
#157731630 Creates a get exercises on hover over image body part feature #13
Conversation
…over body part feature This commit creates a feature that enables users to hover over a body part in the image and display the exercises for that body part. Add event handlers to wger/exercises/templates/muscles/overview.html to get the required target on mouse hover over image, and display the relevant body exercises Add flip-front and flip-back button to enable users flip the image to the back side, in case you want to hover over the back muscles Add default svg css to wger/core/static/css/workout-manager.css to hide the overlapping svg images with the targeted ids and position the image over the background image. [Delivers #157731630]
255a3c8
to
532eac5
Compare
@@ -45,5 +46,6 @@ def formfield(self, **kwargs): | |||
Use our custom field | |||
''' | |||
defaults = {'form_class': Html5FormDateField} | |||
|
|||
defaults.update(kwargs) | |||
return super(Html5DateField, self).formfield(**defaults) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two fields are similar, maybe you should look at them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanx @peterwade153 , Peter but one is date and the other is time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However please endeavour to clean up your PR structure, its not readabale
What does this PR do?
This PR creates a feature that enables users to hover over a body part in the image
and display the exercises for that body part.
Add event handlers to
wger/exercises/templates/muscles/overview.html
to get the required target on mouse hover over image, and display the relevant body exercises
Add flip-front and flip-back button to enable users flip the image to the back side,
in case you want to hover over the back muscles
Add default svg css to
wger/core/static/css/workout-manager.css
to hide the overlapping svgimages with the targeted ids and position the image over the background image.
Add a new file muscles.js with the muscles svg image variables to
wger/exercises/static/js/muscles.js
Description of Task to be completed?
The user should be able to move the mouse over a body part on the image and get exercises for that body part.
How should this be manually tested?
1: Clone the application and install the requirements in your virtual environment.
2: Update the database settings in the
settings.py
file with your postgres user, password and database name.3: Run the application with
python manage.py runserver
.4: Register and login.
5: Hover over
Exercises
in the navbar menu and selectMuscle overview
.6: Hover over the body parts in the image. Sample image shown below:
7: Expected response: The application should display the exercises related to the muscle you hovered over.
8: The application should also auto highlight the muscle name related to the muscle you hovered over. Sample response shown below.
The exercises are displayed in the far right section.
9: Click the
front
orback
buttons to flip the image.Any background context you want to provide?
This feature was not available.
What are the relevant pivotal tracker stories?
#157731630