Difference between revisions of "MediaWiki:Gadgets-definition"
From WikiAnesthesia
Chris Rishel (talk | contribs) (Blanked the page) Tags: 2017 source edit Blanking |
Chris Rishel (talk | contribs) Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
=== Calculators === | |||
Calculators must have gadgets defined in this file in order to be loaded. See [https://www.mediawiki.org/wiki/Extension:Gadgets 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 ''id'' 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. | |||
==== Drug gadgets ==== | |||
* calculator-drugs[ResourceLoader|hidden|default|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 | |||
==== Patient gadgets ==== | |||
* 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 |
Revision as of 16:34, 22 July 2021
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 id 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.
Drug gadgets
- calculator-drugs[ResourceLoader|hidden|default|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
Patient gadgets
- 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