[REFACTOR] user_service.py: Added id to user name, word and frequency for click to execute AJAX request in JS #30

Merged
mrlan merged 8 commits from Bug400-QiuZhonghui into master 2022-07-18 13:29:04 +08:00
  1. Add jquery.js and word_operation.js to the static folder.

  2. Changed the return type of the familiar, unfamiliar and deleteword methods of user_service.py.

    original: return redirect(url_for('userpage', username=username))
    now: return "success"
    
  3. In order to get elements in JS to make ajax requests we add ids in userpage_get.html for familiar, unfamiliar, delete buttons and so on.

  4. When the user's word book was retrieved, the list returned was already sorted in descending order of frequency, so redundant code was removed in userpage_get.html.

1. Add jquery.js and word_operation.js to the static folder. 2. Changed the return type of the familiar, unfamiliar and deleteword methods of user_service.py. ``` original: return redirect(url_for('userpage', username=username)) now: return "success" ``` 3. In order to get elements in JS to make ajax requests we add ids in userpage_get.html for familiar, unfamiliar, delete buttons and so on. 4. When the user's word book was retrieved, the list returned was already sorted in descending order of frequency, so redundant code was removed in userpage_get.html.
qiuzhonghui added 1 commit 2022-06-09 13:48:27 +08:00
Bugzilla link: [http://118.25.96.118/bugzilla/show_bug.cgi?id=400](https://)
qiuzhonghui added 1 commit 2022-06-10 10:19:57 +08:00
mrlan added 6 commits 2022-07-18 13:24:58 +08:00
mrlan merged commit 9d420acd8b into master 2022-07-18 13:29:04 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrlan/EnglishPal#30
There is no content yet.