Commit graph

269 commits

Author SHA1 Message Date
Aurélien Delobelle
f1aaad7317 Better jquery ajax calls management
It becomes the same as the original jQuery ajax object.
For example, callbacks can be queued.
get_by_apipk and from_API of ModelObject returns the ajax object.

Example (js):
Account.get_by_apipk('AAA')
    .done(function (data) {
        console.log(data)
    })
    .fail( () => console.log('cool') )
    ...
    .done( ...
2017-04-05 04:05:31 +02:00
Aurélien Delobelle
efbcde163b clean some js
- clean buttons code on account and checkout
- merge CheckoutRead and kpsul_checkout_data views (the first won)

APIModelObject interface
- add url_create, url_update, url_update_for
- rename url_object_for and url_object to url_read_for and url_read
2017-04-05 03:43:51 +02:00
Ludovic Stephan
3b9affb3f3 Add focus methods 2017-04-04 20:18:53 -03:00
Ludovic Stephan
9c559d9ec3 Add articles reset to kpsul.reset 2017-04-04 19:54:03 -03:00
Ludovic Stephan
021937a38e Small bugfixes 2017-04-04 19:52:12 -03:00
Martin Pepin
fe66a6ef6b Merge branch 'aureplop/fix_stats' into 'master'
Stats K-Fêt - Python side

See merge request !208
2017-04-05 00:41:47 +02:00
Ludovic Stephan
e5791efe4d Remove last traces of old articles 2017-04-04 19:41:15 -03:00
Ludovic Stephan
05156f37c6 Update addExistingPurchase 2017-04-04 19:34:22 -03:00
Ludovic Stephan
514f1da6df Fix SpecialOpeFormatter 2017-04-03 21:26:33 -03:00
Ludovic Stephan
20b7156e1f Improve type display 2017-04-03 21:18:07 -03:00
Ludovic Stephan
a173be4f7d Use api_with_auth in history 2017-04-03 21:14:06 -03:00
Ludovic Stephan
07290f6fec Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-04-03 21:00:12 -03:00
Ludovic Stephan
3ce4dc5c85 Add article stock management 2017-04-03 20:14:45 -03:00
Ludovic Stephan
b91edc9c7d Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_articles 2017-04-03 20:03:58 -03:00
Aurélien Delobelle
9d2298a089 Merge branch 'master' into aureplop/kpsul_js_refactor
Not chill.
2017-04-04 00:51:49 +02:00
Ludovic Stephan
5020037103 api_lock inside kfet.js 2017-04-03 16:08:40 -03:00
Ludovic Stephan
f46ba0dd6c Merge branch 'master' into Aufinal/inventaires 2017-04-03 16:01:51 -03:00
Aurélien Delobelle
6d2e150aa0 clean align 2017-04-03 16:56:44 +02:00
Aurélien Delobelle
903da795ab clean kfet statistic.js
- no longer dictToArray where it isn't necessary (because already an
  array)
- fix chart height:
  - previous charts were causing bugs
  - height is fixed (even with window resizing)
- clean whitespaces
2017-04-03 16:53:28 +02:00
Aurélien Delobelle
31261fd376 set height canvas graph & fix graph display 2017-04-02 23:38:42 +02:00
Aurélien Delobelle
6ebea6557c Merge branch 'Aufinal/graph_size' into aureplop/fix_stats 2017-04-02 23:19:34 +02:00
Ludovic Stephan
48721b7dca Reduce graph size 2017-04-02 17:54:13 -03:00
Aurélien Delobelle
df7e935390 Clean GET params in ajax calls
- Use `data` arg of `$.getJSON` for `format` param
- Delete `dictToArray` call on data returned by `SingleResumeStat` class view since this view now returns stats manifest as an array
2017-04-02 17:16:05 +02:00
Ludovic Stephan
ccf5f80685 Merge remote-tracking branch 'origin/master' into Aufinal/editions 2017-04-01 02:43:19 -03:00
Ludovic Stephan
063446efb5 Use columns for authentication and submit 2017-04-01 00:32:09 -03:00
Ludovic Stephan
2774dbb5de Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-03-31 23:51:13 -03:00
Ludovic Stephan
7d93d91af9 Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_articles 2017-03-31 23:50:33 -03:00
Aurélien Delobelle
1286606f7a Merge branch 'Aufinal/hotfix/liq_withdraw' into 'master'
K-Fêt :
- Empêche les retraits/charges sur LIQ

See merge request !205
2017-03-31 23:49:33 +02:00
Ludovic Stephan
aa29621c7c Prevents special opes on LIQ 2017-03-31 18:28:03 -03:00
Ludovic Stephan
236dcb4644 Tweaks to UserDialog 2017-03-31 18:10:06 -03:00
Ludovic Stephan
582cdebaa1 Better callback management 2017-03-31 17:49:22 -03:00
Ludovic Stephan
ab15dbae76 Add handler management 2017-03-31 17:37:39 -03:00
Ludovic Stephan
38bfccf331 Change class name 2017-03-31 15:57:15 -03:00
Ludovic Stephan
8bf1bd5343 Websocket as member 2017-03-31 15:45:15 -03:00
Ludovic Stephan
413df0806d Add url get method 2017-03-31 15:10:41 -03:00
Ludovic Stephan
499c081565 Websocket class and instance 2017-03-31 12:23:27 -03:00
Ludovic Stephan
998838ca3e Add update button 2017-03-30 13:31:16 -03:00
Ludovic Stephan
eb7d436b90 Add "count finished" checkbox 2017-03-29 20:43:48 -03:00
Ludovic Stephan
e6a1d16860 Websocket to manage possible kpsul conflicts 2017-03-29 00:58:47 -03:00
Ludovic Stephan
c1f70d9d0a Add capslock support for inputs 2017-03-26 17:51:55 -03:00
Ludovic Stephan
6d92df4155 Merge branch 'aureplop/kpsul_js_refactor' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/dialog_utils 2017-03-26 15:21:33 -03:00
Aurélien Delobelle
842f2cecc1 fix import, fix ope with addcost enabled, move Config location 2017-03-26 15:12:03 +02:00
Aurélien Delobelle
24f72ae7d4 add missing ; 2017-03-26 14:52:23 +02:00
Aurélien Delobelle
b81b33c056 allow chaining on container in display method 2017-03-26 14:51:16 +02:00
Aurélien Delobelle
485ae86a42 add update method to ModelObject 2017-03-26 14:46:46 +02:00
Ludovic Stephan
3f07bf56fa Remove console log 2017-03-26 00:25:51 -03:00
Ludovic Stephan
6be2f086df Add generic functions for confirm dialogs 2017-03-26 00:20:28 -03:00
Ludovic Stephan
a1c976185c Fix transfer sort 2017-03-25 13:44:35 -03:00
Ludovic Stephan
0997d85083 Merge branch 'aureplop/kpsul_js_refactor' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/refactor_history 2017-03-25 12:39:30 -03:00
Ludovic Stephan
5ff8f69bfa Merge branch 'aureplop/kpsul_js_refactor' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/refactor_articles 2017-03-25 12:35:04 -03:00
Ludovic Stephan
f645121fb1 Add error when editing LIQ 2017-03-25 10:39:53 -03:00
Aurélien Delobelle
6afbcb44a1 delete array comprehesion 2017-03-25 10:26:45 +01:00
Aurélien Delobelle
967748ded3 details link to read instead of update
- It was the old behaviour.
2017-03-25 09:58:20 +01:00
Ludovic Stephan
aa6a50a6e7 Simplify JS-Python interface for cancel_ops 2017-03-24 23:57:27 -03:00
Ludovic Stephan
44fbc92893 Merge branch 'master' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/editions 2017-03-24 21:07:32 -03:00
Ludovic Stephan
d7740e66fe adapt code to is_checkout removal 2017-03-24 20:52:49 -03:00
Aurélien Delobelle
0d02d47d33 move utils functions 2017-03-24 22:05:04 +01:00
Aurélien Delobelle
2e3bd5bd7a fix search box 2017-03-24 21:41:34 +01:00
Aurélien Delobelle
abce961d91 use django-js-reverse 2017-03-24 21:28:33 +01:00
Aurélien Delobelle
a9d1a6aae9 clean array iteration 2017-03-24 21:24:06 +01:00
Aurélien Delobelle
f063c3470c Merge branch 'Aufinal/fix_password_freeze' into 'master'
K-Psul:
- fix freeze when no-team password

Closes #153

See merge request !196
2017-03-24 20:53:44 +01:00
Aurélien Delobelle
ff5959638b fix missing bracket 2017-03-24 20:32:04 +01:00
Aurélien Delobelle
cb13280458 Merge branch 'master' into 'Aufinal/merge_k-fet'
# Conflicts:
#   kfet/static/kfet/css/index.css
2017-03-24 20:23:32 +01:00
Ludovic Stephan
7520effe53 Fix K-Psul freeze when no-team password
L'erreur 403 est renvoyée dans ce cas par le décorateur
`@teamkfet_required`, donc sans data associé, ce qui faisait buguer
`getErrorsHtml`. On rajoute donc le cas correspondant.
2017-03-24 15:45:47 -03:00
Ludovic Stephan
1fcd53d780 Continue renaming node.type to node.modelname 2017-03-20 00:42:12 -03:00
Ludovic Stephan
fe965875f7 Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-03-20 00:33:30 -03:00
Ludovic Stephan
3465dd7045 Change node.type to node.modelname for clarity 2017-03-20 00:26:11 -03:00
Ludovic Stephan
66c5a6953c Improve websocket filter for special history pages 2017-03-19 04:29:54 +01:00
Ludovic Stephan
951932a6c8 Add support and websocket to transfers.html 2017-03-18 22:35:47 -03:00
Ludovic Stephan
fc3e86aea6 Add websocket support to ArticleManager 2017-03-18 22:06:30 -03:00
Ludovic Stephan
b8a307b4a6 Add support for kfet/history page 2017-03-18 14:05:11 -03:00
Ludovic Stephan
1d532616b7 Fix bugs introduced by previous commit 2017-03-18 02:47:30 -03:00
Ludovic Stephan
9e905b0f8b Remove kpsul dependence from history (oops) 2017-03-18 02:40:34 -03:00
Ludovic Stephan
644b08973a Add websocket support for history 2017-03-18 02:32:27 -03:00
Ludovic Stephan
34bb680570 Add History equivalent functions 2017-03-18 02:31:52 -03:00
Ludovic Stephan
b655907bd4 Add history to KPsul manager 2017-03-18 02:29:02 -03:00
Ludovic Stephan
5c9c206f68 Adapt css to new canceled syntax 2017-03-18 02:25:44 -03:00
Ludovic Stephan
b0b1fdf936 Add jsdoc comments to history models 2017-03-17 21:00:58 -03:00
Ludovic Stephan
565a054323 Add support for low stock css 2017-03-17 17:30:22 -03:00
Ludovic Stephan
58c57c6f89 Add hierarchy of needed models, w/ formatters 2017-03-17 16:00:49 -03:00
Ludovic Stephan
47fe74fbb0 template specification 2017-03-17 15:59:52 -03:00
Ludovic Stephan
53f89f53e0 Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-03-17 12:34:48 -03:00
Ludovic Stephan
a7de396aa3 Better comparison control 2017-03-17 12:33:43 -03:00
Ludovic Stephan
11603cee69 Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-03-17 00:19:45 -03:00
Ludovic Stephan
9ab2a11432 Finish adapting ArticleManager and Autocomplete 2017-03-16 22:26:59 -03:00
Ludovic Stephan
91f14deda1 last tweaks and doc 2017-03-16 22:26:30 -03:00
Ludovic Stephan
1c5ac561a3 Change article table into divs 2017-03-16 22:26:08 -03:00
Martin Pépin
55b67f38c8 Notice the users about the α-numeric restriction
Add a help text above the two autocompletion inputs letting the users
know that non-alphanumeric characters will not be used.
2017-03-16 23:16:56 +00:00
Ludovic Stephan
01295d464d Adapt ArticleAutocomplete to new format 2017-03-16 01:22:46 -03:00
Ludovic Stephan
2ce96bce1b Add traverse function to ModelTree 2017-03-16 01:21:50 -03:00
Ludovic Stephan
770c185bd0 Modify sort in ModelTree 2017-03-16 01:21:18 -03:00
Ludovic Stephan
08d1521d81 Adapt ArticleManagerto new API 2017-03-15 22:40:06 -03:00
Ludovic Stephan
1570d9f494 Polish ModelForest class 2017-03-15 22:10:56 -03:00
Ludovic Stephan
0219d998ac model tree struct draft 2017-03-15 02:45:13 -03:00
Ludovic Stephan
66beeb5bd0 transfer history added 2017-03-11 01:41:21 -03:00
Ludovic Stephan
ab6b0d52f2 Merge branch 'Aufinal/transferts_historique' into Aufinal/refactor_history 2017-03-11 00:45:54 -03:00
Ludovic Stephan
ac2e773f9e opelist class 2017-03-10 22:09:23 -03:00
Ludovic Stephan
741bac880b dummy History test class 2017-03-10 22:09:02 -03:00
Ludovic Stephan
02485afd9b doc and compare function 2017-03-10 19:59:15 -03:00
Ludovic Stephan
eac6c42041 day, opegroup and ope model drafts 2017-03-10 19:57:36 -03:00