Commit graph

315 commits

Author SHA1 Message Date
Daru13
2a0113412a Comment out the previously used event sorting method. 2018-11-26 18:38:24 +01:00
Daru13
b43422dc50 Make grouping by location an option, and set grid rows of event nodes.
Event nodes used to only be sorted. This commit explictly set their CSS 
grid rows.
2018-11-26 18:37:52 +01:00
Daru13
cd771c5ba5 Do not intersect an event with anotoher event it immediately follows.
This is required so that an event E1 ending at time T and an event E2 
starting at time T _can_ be assigned the same color (i.e. they _can_ 
appear on the same row).
2018-11-26 18:35:09 +01:00
Daru13
51251c0a8f Add a new event sorting algorithm (using interval graph coloring).
Note: this only sort the event nodes in a particular, "optimal" order; 
but it does not explicitly set the grid row of each node. Therefore, the 
result is likely to spread on many more rows than what could be 
expected.
2018-11-26 16:06:31 +01:00
Daru13
c4e70840ad Add a button to switch between calendar display modes.
It switches between:
* displaying all events;
* only displaying events the user subscribed to.

Note that the button has not been included in the calendar library/files 
(yet?). Its code should be moved somewhere else at a later time.
2018-11-25 16:08:43 +01:00
Daru13
81eb6bebac Allow to only display events the user subscribed to. 2018-11-25 16:05:00 +01:00
Qwann
9e7937d7d9 hotfix : héritage de has_perm 2018-11-24 17:07:46 +01:00
Qwann
40a9ce6531 mes perms 2018-11-24 16:53:54 +01:00
Daru13
6cc04e3792 Make events for which the user is enroled more distinguishable. 2018-11-24 06:01:00 +01:00
Daru13
ad02830521 Display a tooltip when an event content cannot be fully displayed.
This is intended to make it easy to have a glimpse at the content of 
an event, when its width is not sufficient for its content to be 
displayed (without overflowing its parent).
  
  It uses an external jQuery library to display tooltips: named _tipso_ 
(https://github.com/object505/tipso).
2018-11-24 05:59:13 +01:00
Daru13
aa06036968 Add the actual links to each event detailed page (in the detail popup).
Note that the URL format is passed to the calendar as a parameter (in 
the page template). 

It is currently hard-coded, but should be generated by Django instead!
2018-11-24 03:52:09 +01:00
Daru13
3c848fe47c Improve event detail popup positionning (no above-positionning yet).
The popup is horizontally aligned with the click location, and 
vertically close to event (slightly on top of it, from below).

If the click occurs too much on the left or the right side of the 
screen, the horizontal position is shifted accordingly, so that it is 
never displayed outside of the screen. Note, however, that the small 
arrow supposed to point the related event is not shifted as well as of 
now (not as straightforward since it is a CSS pseudo-element).

This commit also removes the ability to display the popup _above_ the 
event in case the click occurs too close to the bottom of the screen. 
This feature should be reintroduced by a later commit once it will have 
been fixed :).
2018-11-24 03:37:40 +01:00
Daru13
a0d158ca77 Add a clearer error message when the attempt to (un)enrol fails.
The error message returned by jQuery only contained "Error". This commit 
replaces it by a hard-coded, more descriptive error message in French.
2018-11-24 03:32:07 +01:00
Daru13
ab4338aa84 Rename the label of the event detail popup location field to "Lieu". 2018-11-24 03:29:38 +01:00
Daru13
a2a14cb84c Add dedicated classes to first/last (daily) time slots. 2018-11-24 03:28:25 +01:00
Daru13
ff5c0845bc Remove some useless, commented CSS properties. 2018-11-24 03:26:37 +01:00
Daru13
a029987159 Add some margin to the description and tags (in the event detail popup). 2018-11-24 03:26:10 +01:00
Daru13
72617946eb Fix the event detail popup table alignment (now centered). 2018-11-24 03:25:13 +01:00
Daru13
7a1e6c0be3 Prevent event detail popup dimension updates due to <h3> hovering. 2018-11-24 03:24:41 +01:00
Daru13
7217bd1862 Set new width constraints for the event detail popup. 2018-11-24 03:23:14 +01:00
Daru13
362c7400eb Improve the look of the first/last hour slots (for each day). 2018-11-24 03:22:33 +01:00
Daru13
a192765b03 Better align the time slot hours. 2018-11-24 03:21:19 +01:00
Daru13
49e147e620 Make the whole calendar inherit the font family from its parent. 2018-11-24 03:20:52 +01:00
Daru13
5e9423c858 Fix the wrong font size of weveral calendar elements. 2018-11-24 03:19:57 +01:00
Daru13
eb8f82f6c4 Display the calendar in full height (w/ scroll). 2018-11-24 03:18:01 +01:00
Daru13
41b640a1ea Ensure time slot and event grids have the same number of columns. 2018-11-24 03:14:18 +01:00
Daru13
b2dabd1dc4 Fix event positionning in the grid. 2018-11-24 03:09:19 +01:00
Qwann
504044b1cf hotfix: inheritance in calendar 2018-11-23 15:33:04 +01:00
Qwann
bd84b46476 Merge branch 'Qwann/calendar' of git.eleves.ens.fr:klub-dev-ens/GestionEvenementiel into Qwann/calendar 2018-11-22 22:55:30 +01:00
Qwann
c30f588bed Merge branch 'master' of git.eleves.ens.fr:klub-dev-ens/GestionEvenementiel into Qwann/calendar 2018-11-22 22:55:17 +01:00
Daru13
74eaf82575 Fix the structure of the HTML of the generated events. 2018-11-22 22:43:18 +01:00
Daru13
12534ff2da Update the start and end date of the calendar (displayed era). 2018-11-22 22:42:31 +01:00
Daru13
2699573913 Fix the title of the event (used to be the event id). 2018-11-22 22:42:09 +01:00
Daru13
7a7254f3da Put the event title on its own line (in the detail popup). 2018-11-22 22:36:23 +01:00
Daru13
5da4c7050c Updates the perm counter on perm area update. 2018-11-22 22:34:45 +01:00
Daru13
555fa8fb7c Adds effective enrol/unerol POST request on related button click. 2018-11-22 22:34:09 +01:00
Qwann
1865054c29 waaaa, maintenant on peut genre se connecter 2018-11-22 13:24:59 +01:00
Evarin
3ebb89c1c6 Calendrier accessible et presque fonctionnel 2018-11-22 00:39:12 +01:00
Evarin
350836aeb2 Revert to old_css 2018-11-21 19:46:41 +01:00
Daru13
d08a39307f Initial addition of the visual calendar (day view only).
This is the first step to include a visual calendar to Poulpe,
only including a "day view" as of now (i.e. events hour-by-hour from one date to another).
More views may be added at a later time.

It is **NOT WORKING YET**!
The CSS has been broken on this branch, and will have to be fixed before the calendar can work:
* the CSS of the calendar needs to be adapted to the environment and design of Poulpe;
* add actual links to enroll/un-enroll to an activity (cf. `Event` class in `calendar.js`);
* other small tweaks :)?

Finally, this view is likely to require the addition of start and end date change,
so that an user can browse events over several days (cf. `setStartDate` and `setEndDate` methods of `Calendar` class in `calendar.js`).

Note that this code should be better re-written (e.g. in Typescript, split between files, using more/better design patterns) at a later time.
It should nonetheless be easy to fix it and use it right now (see above requirements for this).
2018-11-19 23:57:42 +01:00
Daru13
d3e1943021 Merge branch 'Evarin/enrol-json' into Qwann/calendar 2018-11-19 22:32:58 +01:00
Evarin
511c3096f7 enrol?ajax=json renvoie un JSON pour le calendrier dynamique 2018-11-12 21:44:10 +01:00
Qwann
b1c0dd857d search matos 2018-11-07 21:39:50 +01:00
Qwann
abdd893309 dos not work 2018-10-12 18:04:27 +02:00
Qwann
1042b9f9e4 partial commit 2018-10-12 17:15:55 +02:00
Qwann
94a629371c allauth don't works right now… 2018-10-11 09:48:03 +02:00
Qwann
a32881a24b MAJ allauth 2018-10-04 21:34:39 +02:00
Qwann
7ebee733c5 css no finished 2018-10-04 21:10:30 +02:00
Evarin
601ba4d116 Fix css filtrage catégories 2018-08-28 22:40:02 +02:00
Evarin
6d81735a55 Inscription en perm 2018-08-28 22:19:24 +02:00