Commit graph

968 commits

Author SHA1 Message Date
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 842f2cecc1 fix import, fix ope with addcost enabled, move Config location 2017-03-26 15:12:03 +02:00
Aurélien Delobelle bc6ecda0c8 fix addcost kspul 2017-03-26 14:59:21 +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 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
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
Aurélien Delobelle 72970c6be7 Fix api call on new transfers
- Use django-js-reverse
- Replace old url (deleted) with standard url
2017-03-25 09:44:55 +01:00
Aurélien Delobelle ac18cbd9d9 fix by on last statement 2017-03-24 22:10:34 +01: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
Ludovic Stephan 3465dd7045 Change node.type to node.modelname for clarity 2017-03-20 00:26:11 -03:00
Ludovic Stephan fc3e86aea6 Add websocket support to ArticleManager 2017-03-18 22:06:30 -03:00
Ludovic Stephan 565a054323 Add support for low stock css 2017-03-17 17:30:22 -03:00
Ludovic Stephan a7de396aa3 Better comparison control 2017-03-17 12:33:43 -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
Ludovic Stephan f0a80561ed Add article display to Config callback 2017-03-16 22:24:57 -03: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 3d76079439 Add correct syntax to category data 2017-03-16 01:20:06 -03:00
Ludovic Stephan 08d1521d81 Adapt ArticleManagerto new API 2017-03-15 22:40:06 -03:00
Ludovic Stephan fe6823fc7b Adapt article_data return value to ModelTree standards 2017-03-15 22:39:30 -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 02485afd9b doc and compare function 2017-03-10 19:59:15 -03:00
Ludovic Stephan e1abff2242 last tweaks 2017-03-09 22:31:59 -03:00
Ludovic Stephan 8aa4fa2dce modify article API return 2017-03-09 09:21:07 -03:00
Ludovic Stephan c9b7683238 articlelist and modellist finished 2017-03-09 09:20:53 -03:00
Ludovic Stephan fe8e5d7e46 move and adapt manager and completion 2017-03-09 09:20:23 -03:00
Ludovic Stephan a05a075962 apimodellist & articlelist 2017-03-08 10:47:51 -03:00
Ludovic Stephan d5dfd5fa93 move ModelList def 2017-03-07 18:36:56 -03:00
Ludovic Stephan c9cce5b125 remove temp file 2017-03-07 17:58:10 -03:00
Ludovic Stephan 2cc0e0cffe modellist suite et fin 2017-03-07 17:57:40 -03:00
Ludovic Stephan db9c14f768 articlelist wip 2017-03-06 02:43:48 -03:00
Ludovic Stephan 643503269e add Article and Category models 2017-03-02 06:50:47 -03:00
Aurélien Delobelle a9cb50b38d Better k-fet js and more
JavaScript
----------
- Basic classes that can be inherited to define a new class for a
  django model in javascript.
- Formatters classes are used to render properties and attributes of
  the instances of models classes.
- New classes to handle Account, Checkout, Statement models.
- Refactor K-Psul JS (part n/m).
- Better file organization.

Views
-----
- 'kpsul.checkout_data' is cleaner. Last statement is added to the JSON
  response with GET paramater 'last_statement'.
- 'account.read.json' is merged in account.read. JSON response is sent if
  GET parametter 'format' is set to 'json'.
- Fix PEP8 of concerned views.

New requirement: django-js-reverse
----------------------------------
Used to resolve the URLs defined in the project in JavaScript.
See https://github.com/ierror/django-js-reverse
2017-02-23 22:07:38 +01:00
Aurélien Delobelle ee848d210e refactor account k-psul js - part 2/?
- les événements de AccountSearch sont enregistrés depuis ces classes (plus depuis le manager)
- ajout d'une classe AccountSelection s'occupant de la sélection d'un
  compte par l'utilisateur
- la méthode update de AccountManager peut maintenant prendre un
  trigramme et le set correctement, à défaut elle récupère le trigramme
  via AccountSelection
2017-02-15 14:09:20 +01:00
Aurélien Delobelle fdcf4c3ab0 fix property location 2017-02-13 13:48:57 +01:00
Aurélien Delobelle d9fc683525 update account_data[] to account_manager.account. 2017-02-13 00:41:41 +01:00
Aurélien Delobelle 890be9b343 refactor account k-psul js - part 1
- nouvelle classe - Account: stocke, sert et récupère les données
  associées à un compte
- nouvelle classe - AccountManager: interface pour le management de la
  partie Account de K-Psul
- nouvelle classe - AccountSearch: module de recherche d'un compte
- nouvelles classes - AccountFormatter, StandardAccountFormatter,
  LIQAccountFormatter: styles de formattage des données d'un compte

- désactive l'autocomplétion dans la recherche d'un compte
- fix #89: "Entrée" dans le champ de trigramme met le compte LIQ
2017-02-13 00:23:32 +01:00
Aurélien Delobelle 5c7a1d6874 Refactor JS Settings K-Psul
- change name: Settings -> Config
- provide interface `Config` to get/set parameters
- `Config` uses global object `window.config` to store key/value
- `Config` setters handle types
2017-02-12 13:26:02 +01:00
Aurélien Delobelle 8279bddf4e clean js k-psul
- K-Psul JavaScript uses strict-mode (when JS try to do better things,
  we should follow)
2017-02-12 06:10:17 +01:00
Aurélien Delobelle 4a5d9f880a Merge branch 'Aufinal/fix_amounts' into 'k-fet'
Corrige l'affichage du prix

!124 était overkill ; `amountToUKF` peut prendre en argument des valeurs positives ou négatives, et il me semble que le `round` ne sert quà corriger les erreurs de `float`, ce qui conduit à #128. Du coup, on revert une partie.

fixes #128

See merge request !163
2017-02-12 05:09:30 +01:00