-
Notifications
You must be signed in to change notification settings - Fork 52
feature/show_event_day_view #248
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
Merged
yammesicka
merged 9 commits into
PythonFreeCourse:develop
from
ADI-projects30:feature/load_event_in_day_view
Feb 16, 2021
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b194aaf
feature/show_event_day_view
ADI-projects30 057ff3b
fixing datetime problem
ADI-projects30 3c97520
forgot to delete something
ADI-projects30 211775a
add plus icon
ADI-projects30 257cc5e
fix given notes
ADI-projects30 d63c8c2
fixing the notes
ADI-projects30 7af514f
fix more notes
ADI-projects30 f827d1b
fixing other notes for merge
ADI-projects30 05ebd64
forget delete something
ADI-projects30 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| function scrollTo(element) { | ||
| window.scroll({ | ||
| behavior: 'smooth', | ||
| left: 0, | ||
| top: element.offsetTop | ||
| }); | ||
| } | ||
|
|
||
| document.addEventListener('DOMContentLoaded', () => { | ||
| let chosen_button = document.getElementsByClassName('event-btn'); | ||
| for (let i = 0; i < chosen_button.length; i++) { | ||
| chosen_button[i].addEventListener("click", function(e) { | ||
| let clickedElem = e.target.id | ||
| fetch('/event/' + clickedElem) | ||
| .then(function(response) { | ||
| return response.text(); | ||
| }) | ||
| .then(function(body) { | ||
| document.querySelector('#here').innerHTML = body; | ||
| scrollTo(document.getElementById("here")); | ||
| }); | ||
| }); | ||
| } | ||
| }); | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,12 +53,19 @@ | |
|
|
||
| {% for event, attr in events %} | ||
| <div class="d-flex flex-row justify-content-around align-items-end action-continer" style="grid-row: {{attr.grid_position}};"> | ||
| <a href="/edit/{{event.id}}" title="Edit event" class="action-icon"><img class="pb-1" src="{{ url_for('static', path='/images/icons/pencil.svg')}}" width="15em" height="15em"></a> | ||
| <a href="/delete/{{event.id}}" title="Delete event" class="action-icon"><img class="pb-1" src="{{ url_for('static', path='/images/icons/trash-can.svg')}}" width="15em" height="15em"></a> | ||
| <a href="/edit/{{event.id}}" title="Edit event" class="action-icon"><img class="pb-1" src="{{ url_for('static', path='/images/icons/pencil.svg')}}"></a> | ||
| <a href="/delete/{{event.id}}" title="Delete event" class="action-icon"><img class="pb-1" src="{{ url_for('static', path='/images/icons/trash-can.svg')}}"></a> | ||
| <button class="event-btn" title="See full event" id="{{event.id}}">event details</button> | ||
|
||
| </div> | ||
| {% endfor %} | ||
| </div> | ||
| </div> | ||
| <div> | ||
| <a href="/event/edit" title="Add Event" class="add-event-icon"><img class="plus_image" src="{{ url_for('static', path='/images/icons/plus.svg')}}"></a> | ||
| </div> | ||
| <div id="here"></div> | ||
| <div id="nice">Have a nice day</div> | ||
|
||
| <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script> | ||
| <script type="text/javascript" src="{{ url_for('static', path='/eventdisplay.js') }}"></script> | ||
| </body> | ||
| </html> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can be
constThere 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.
fixed all of the notes:, waiting for merge :)