-
Improvement
-
Resolution: Fixed
-
Blocker
-
3.9
-
MOODLE_39_STABLE
-
MOODLE_39_STABLE
-
MDL-67914-master -
-
5
-
International 3.9 - Sprint 8
This is the first logical step after moving table_sql to have a generic web service.
This is likely the smallest possible change that we can make
We will need to:
- add new arguments to the web service:
- sortby (string) A string describing the name of a sortable column
- sortdir (int) The sort direction to use when sorting that column
- write a new set of AMD modules to handle capture of the sorting
- update our output of the table to instantiate our new JS
JS
Root path: lib/table/amd/src
General structure:
dynamic.js
|
local/dynamic/repository.js
|
local/dynamic/selectors.js
|
local/dynamic/events.js
|
Need to create a setup() function which listens on the outer-most element for the table (ideally a new <div> which the table is placed in.
We can keep any arguments in data-attributes on that div
We look for any clicks on any of the sort buttons and intercept
Call the WS and replace the <table> tag with the new one