Commit graph

374 commits

Author SHA1 Message Date
Ludovic Stephan
6362740a77 Fix: history.html marche (à peu près) correctement 2020-04-23 18:11:23 +02:00
Ludovic Stephan
931b2c4e1f Refactor js code
Harmonize history denominations
* opegroups/transfergroups -> groups
* opes/transfers -> entries
* snake/camel case -> snake case
2020-04-23 18:11:23 +02:00
Ludovic Stephan
f7ce2edd87 Plug new history in templates 2020-04-23 18:11:23 +02:00
Ludovic Stephan
49ef8b3c15 Pas besoin de ws pour les suppressions 2020-04-23 18:11:23 +02:00
Ludovic Stephan
36d6a4a1cd Déplace la logique de l'historique dans history.js
On change le lock en `window.lock` pour y avoir accès partout
2020-04-23 18:11:23 +02:00
Ludovic Stephan
7a828760b3 Répercute les changements en prod 2020-02-08 10:47:55 +01:00
Ludovic Stephan
4d3531c2cb Fix special chars in trigramme 2020-01-16 23:20:18 +01:00
Ludovic Stephan
87e3795c76 Ajout d'un nouveau transfert si formulaire rempli 2020-01-04 15:31:14 +01:00
Antonin Reitz
e97c873b4f Merge branch 'Aufinal/backbone' into 'master'
Refactor le JS de K-Psul via Backbone : 1ère étape

See merge request klub-dev-ens/gestioCOF!388
2019-12-11 23:19:44 +01:00
Martin Pepin
c6c4814519 Merge branch 'Aufinal/fix-stats-escape' into 'master'
Fix la page de stats pour certains comptes avec des caractères spéciaux

See merge request klub-dev-ens/gestioCOF!382
2019-12-01 11:22:36 +01:00
Ludovic Stephan
85aa56d030 Fix tests 2019-11-29 15:33:03 +01:00
Ludovic Stephan
361ad46be4 First steps in Account logic 2019-11-29 14:51:54 +01:00
Martin Pepin
797f0356f6 Merge branch 'Aufinal/no_reduction_category' into 'master'
Permet d'exclure des catégories de la réduction COF

See merge request klub-dev-ens/gestioCOF!386
2019-11-28 14:30:54 +01:00
Martin Pépin
61efded673
Remove unused references to multiple-select.* 2019-11-27 15:46:50 +01:00
Ludovic Stephan
38aecdd741 Typo 2019-11-27 14:41:20 +01:00
Martin Pépin
e0ffee295d
Fix static urls for multiple-select 2019-11-27 14:30:24 +01:00
Ludovic Stephan
ac3bfbe368 Display in kfet js 2019-11-27 14:14:42 +01:00
Ludovic Stephan
affdf43e0b Add logic in views and templates 2019-11-27 14:14:33 +01:00
Ludovic Stephan
d04b79bcb5 Disable autoescape in js code 2019-11-25 10:48:43 +01:00
Ludovic Stephan
a60df91b04 Add decorator to needed views 2019-11-21 01:21:26 +01:00
Ludovic Stephan
b22a77e603 Fix account history 2019-10-19 10:33:15 +02:00
Ludovic Stephan
8ea0cb84d1 Move source files (not minified) to src/ directory 2019-10-16 20:27:57 +02:00
Ludovic Stephan
f8e954ff79 Range les fichiers statiques K-Fêt
Les fichiers JS et CSS externes sont dans `static/kfet/vendor`, minifiés ; on bump la version de `reconnecting-websocket`.
2019-10-16 20:27:57 +02:00
Ludovic Stephan
de10392a7f Supprime des dossiers inutiles
Pas besoin de 12 sous-dossiers pour `autocomplete-light`.
2019-10-16 20:27:57 +02:00
Ludovic Stephan
abb3823a8b Interaction Moment.js + Chart.js
On avait pas besoin de servir `Chart.bundle.js` puisqu'on avait déjà `moment.js` servi à part. Aussi, on déplace tout et on sert les fichiers minifiés.
2019-10-16 20:27:57 +02:00
Ludovic Stephan
b343c6c6e0 Déplace (et modifie) jquery-ui
On déplace les deux versions de `jquery-ui` dans `shared/static/vendor/`, et on en récupère une version avec seulement les fonctionnalités requises.
2019-10-16 20:27:57 +02:00
Ludovic Stephan
22cfaf9b44 Idem pour jquery
On met `jquery` dans `shared/static/vendor/`, et on bump un chouïa la version.
2019-10-16 20:27:57 +02:00
Ludovic Stephan
a9dce881bd Supprime le CDN Bootstrap
On sert les fichiers nécessaires à `bootstrap` en local, dans `shared/static/vendor`.
2019-10-16 20:27:57 +02:00
Ludovic Stephan
baa3826a42 Change le formulaire de account_update
On fait un formulaire d'info non-éditable pour pas que les gens mettent des noms troll
2019-06-17 22:02:11 +02:00
Ludovic Stephan
65dd7e5fa3 Suppression d'article
On fait pareil que précédemment pour les articles, en rajoutant une vie
de délétion + de quoi afficher qu'un article a été supprimé.
N.B. : le formatage automatique de VSCode fait plein de changements,
donc pourquoi pas les garder.
2019-05-29 18:29:15 +02:00
Ludovic Stephan
08ac0ac890 Vues de suppression
On rajoute un bouton de suppression d'un compte utilisable avec la perm
`kfet.delete_account`, avec message de vérif. On en profite pour
cleanup un peu le css de `jconfirm`.
2019-05-29 18:29:15 +02:00
Ludovic Stephan
85642d00d8 Sert les polices en local 2019-02-13 16:54:42 +01:00
Ludovic Stephan
837b48af36 Fix js path for autocomplete 2018-05-29 14:39:29 +02:00
Martin Pépin
b0301f0304 fix slugurl name error 2018-05-28 00:07:34 +02:00
Martin Pépin
53a4c78903 Remove duplicate line 2018-04-07 14:21:07 +02:00
Martin Pépin
158b19778b also sort the unsold table 2018-04-07 14:20:41 +02:00
Martin Pépin
6d0ec6de43 Merge branch 'master' into qwann/separate_list 2018-04-07 14:09:48 +02:00
Martin Pépin
71b4e6253d Merge branch 'master' into aureplop/cof-tests_calendar 2018-04-07 13:42:19 +02:00
Martin Pépin
fba105fdd1 Merge branch 'master' into aureplop/kfet-sticky_thead 2018-04-07 13:32:20 +02:00
Qwann
cc27e4d964 show not sold article in a different list 2018-03-22 15:25:03 +01:00
Aurélien Delobelle
4084444dc3 Fix autocomplete in registration views.
django-autocomplete-light v3.x doesn't include anymore the
$('').yourlabsAutocomplete() function, leading to issues in cof
registration and kfet account creation views.

Adding jquery-autocomplete-light fixes these issues.

See:
- (dal) https://github.com/yourlabs/django-autocomplete-light
- (jal) https://github.com/yourlabs/jquery-autocomplete-light
2018-01-20 17:29:15 +01:00
Aurélien Delobelle
32720c56a6 kfet -- Tables are sortable
Many tables in kfet app templates become sortable:
account list, negative account list, article list, article inventory
list, article supplier list, article category list, checkout list,
checkout statement list, inventory list, inventory details, order list,
order creation, order details.

This is achieved thanks to the jQuery plugin 'tablesorter':
https://mottie.github.io/tablesorter/docs/

- Affected tables also got sticky headers (it stays visible on scroll).
- Dates format are modified in order to ease the date sorting with the
plugin (it avoids writing a custom parser, or an extractor from
additional hidden element in the table cells).
- Tables whose content is classified by category (of articles) now uses
several tbodies. This has minor effects on the tables style.
- Tags of the header help signs become 'i', instead of 'span', in order
to avoid weird spacing.
2017-11-27 18:24:22 +01:00
Aurélien Delobelle
b0b0542407 Upgrade to Django 1.11
- Deprecation warnings using Django 1.8 are resolved.
- Deprecation warnings using Django 1.11 are resolved.

- Admin: grappelli is no longer used.
- Upgrade to django-autocomplete-light v3 (v2 is not 1.11 compatible).
  * autocomplete.modelform_factory being dropped, code uses dal Select2
    views and widgets.
2017-11-19 18:41:39 +01:00
Qwann
93fa79128c order table striped 2017-10-31 15:10:21 +01:00
Aurélien Delobelle
b42452080f Mass cleaning of kfet' authentication machinery
AccountBackend
- Should now work if used in AUTHENTICATION_BACKENDS settings.
- It does not retieve itself the password, as it should not be used
this way.

GenericBackend
- Delete useless 'username' arg of its 'authenticate()' method.
- Now delete the token in DB.

TemporaryAuthMiddleware
- New name of the middleware is more meaningful.
- Is now responsible to retrieve the password from the request, instead
of the AccountBackend.

GenericTeamToken model
- Add a manager' method to create token, avoiding possible error due to
unicity constraint.

GenericLoginView (authentication with the kfet generic user)
- Replace obscure system with a 100% HTTP handling.
- See comments for more information.

Misc
- More docstrings!
- More tests!
- Add some i18n.
- Add kfet/confirm_form.html template:
    Ask user to confirm sth via a form (which will send a POST request).
    Context variables:
        * title: the page title
        * confirm_url: action attribute for <form>
        * text: displayed confirmation text
- kfet.js : Add functions allowing to emit POST request from <a> tag.
- Non-link nav items from kfet navbar also get a 'title'.
- A utility has been found for the 'sunglasses' glyphicon!
2017-09-25 17:57:47 +02:00
Aurélien Delobelle
bf61e41b50 Move auth-related from 'kfet' app to 'kfet.auth'. 2017-09-19 17:05:51 +02:00
Martin Pépin
faed7bff73 fix ?next=… on K-Fêt logout 2017-09-10 02:32:21 +02:00
Aurélien Delobelle
455b730cc3 Merge branch 'master' into aureplop/kfet_cms 2017-06-23 02:53:05 +02:00
Aurélien Delobelle
815ba50603 fix for small devices 2017-06-22 16:59:41 +02:00
Aurélien Delobelle
b8110c11a4 kfet.open
kfet.open app
- Base data (raw_open, last_update...) is stored and shared through cache system.
- 2 websockets groups: one for team users, one for other users.
- UI is initialized and kept up-to-date with WS.
- raw_open and force_close can be updated with standard HTTP requests.
  At this time, there isn't any restriction on raw_open view. Common sense tell us
  to change this behavior.

Misc
- Clean channels routing.
- 'PermConsumerMixin': user who sent the message is available as argument in
connection_groups method, which returns groups to which the user should be
appended on websocket connection (and discarded on disconnection).
- New kfet.utils module: should be used for mixins, whatever is useful and not concerns
the kfet app.
- Clean JS dependencies.
2017-06-21 07:08:28 +02:00