MediaWiki:Gadgets-definition

From WikiAnesthesia
Revision as of 00:39, 28 August 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

This is the search gadget

  • calculator-search[ResourceLoader|dependencies=ext.gadget.calculator-core|hidden|targets=desktop,mobile|type=general]|calculator-search.js|calculator-search.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-core[ResourceLoader|dependencies=ext.gadget.calculator-patients|hidden|targets=desktop,mobile|type=general]|calculator-drugs-core.js|calculator-drugs-core.css
  • calculator-drugs-data[ResourceLoader|dependencies=ext.gadget.calculator-drugs-core|hidden|targets=desktop,mobile|type=general]|calculator-drugs-data.js
  • calculator-drugDosages[ResourceLoader|dependencies=ext.gadget.calculator-patientInput,ext.gadget.calculator-drugs-data|hidden|targets=desktop,mobile|type=general]|calculator-drugDosages.js|calculator-drugDosages.css
  • calculator-drugDilution[ResourceLoader|dependencies=ext.gadget.calculator-drugs|hidden|targets=desktop,mobile|type=general]|calculator-drugDilution.js|calculator-drugDilution.css
Patients
  • calculator-patients[ResourceLoader|dependencies=ext.gadget.calculator-core|hidden|targets=desktop,mobile|type=general]|calculator-patients.js
  • calculator-patientInput[ResourceLoader|dependencies=ext.gadget.calculator-patients|hidden|targets=desktop,mobile|type=general]|calculator-patientInput.js|calculator-patientInput.css
  • calculator-anatomyPhysiology[ResourceLoader|dependencies=ext.gadget.calculator-patientInput|hidden|targets=desktop,mobile|type=general]|calculator-anatomyPhysiology.js|calculator-anatomyPhysiology.css