Refactor appropriate functions, such as createRandomFreebaseItemLink().
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Hjfocs | T168243 Refactor the JS code responsible for the interaction with the user | |||
Resolved | Hjfocs | T168251 Refactor functions that interact with the user |
Event Timeline
Comment Actions
Refactoring function:
- createPrimarySourcesRandomMenuItem()
- create and append an element to list in left menu
- API call when the user click on it
- show content
New PrimarySources JavaScript object (accessible via mw.PrimarySources), has:
- qid: id of current item
- API: object with urls to rest API
- getDataset: callback with list of dasets available
Comment Actions
working branch https://github.com/afnecors/mediawiki-extensions-Wikibase/commits/PrimarySources-extension (currently stopped)
Comment Actions
The following modules are now responsible for the interaction with the user:
- filter: https://github.com/marfox/pst-frontend/blob/master/modules/ext.PrimarySources.filter.js
- item curation: https://github.com/marfox/pst-frontend/blob/master/modules/ext.PrimarySources.itemCuration.js
- sidebar: https://github.com/marfox/pst-frontend/blob/master/modules/ext.PrimarySources.sidebar.js
- reference preview: https://github.com/marfox/pst-frontend/blob/master/modules/ext.PrimarySources.referencePreview.js