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

Add meeting by clicking on the calendar matrix #168

Merged
merged 11 commits into from Mar 31, 2015
Merged

Conversation

pypingou
Copy link
Member

No description provided.

form.meeting_time_start.data = mtg_time
hours, minutes = mtg_time.split(':')[:2]
try:
hours = int(hours) + 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the + 1 here?

Copy link
Member Author

Choose a reason for hiding this comment

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

So that the end time of the meeting is 1 hour after the start time by default

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, what if a user calls this with a meeting time that they really did intend. Then you bump their meeting time up by an hour.

Perhaps this default suggestion should be set in the javascript code that calls this endpoint.

Copy link
Member Author

Choose a reason for hiding this comment

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

So the user click on the agenda matrix, the time is retrieved by JS, given to the URL called, we parse it here to do a small data checking, then it is put in the form.
In the add_meeting template we extract the value from the form (if there is one) and insert it into the timespinner().

This way, if you click on a meeting at 18:00, the default time you get are 18:00 start - 19:00 end, but this does not prevent you in anyway from adjusting the times as you would currently.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I see now. :)

@ralphbean
Copy link
Contributor

👍

@pypingou
Copy link
Member Author

Thanks @ralphbean !

pypingou added a commit that referenced this pull request Mar 31, 2015
Add meeting by clicking on the calendar matrix
@pypingou pypingou merged commit 1b4e684 into master Mar 31, 2015
@pypingou pypingou deleted the add_on_table branch March 31, 2015 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants