MediaWiki:Gadgets-definition
From WikiAnesthesia
Revision as of 18:06, 22 July 2021 by Chris Rishel (talk | contribs)
Calculators
Calculators must have gadgets defined in this file in order to be loaded. See the Gadgets extension for usage details.
Core gadgets
This is the core gadget required by all calculators
- calculator-core[ResourceLoader|dependencies=ext.calculators.math.js|hidden|targets=desktop,mobile|type=general]|calculator-core.js|calculator-core.css
Calculator gadgets
Gadgets are loaded using the <calculator id="X" /> tag. The value for X must exactly match the declared gadget name (after calculator-).
For example, to load the "drugDosages" calculator, place <calculator id="drugDosages" /> in the article at the location where the calculator should appear.
Note: Gadgets are loaded by the calculator-core gadget and thus do not need to declare this as a dependency.
Drugs
- calculator-drugs[ResourceLoader|hidden|targets=desktop,mobile|type=general]|calculator-drugs.js
- calculator-drugDosages[ResourceLoader|dependencies=ext.gadget.calculator-patientinput|hidden|targets=desktop,mobile|type=general]|calculator-drugDosages.js|calculator-drugDosages.css
Patients
- calculator-patientInput[ResourceLoader|hidden|targets=desktop,mobile|type=general]|calculator-patientInput.js|calculator-patientInput.css
- calculator-patientStats[ResourceLoader|dependencies=ext.gadget.calculator-patientInput|hidden|targets=desktop,mobile|type=general]|calculator-patientStats.js|calculator-patientStats.css