-
Notifications
You must be signed in to change notification settings - Fork 25
API: JS: Override
This functionality allows the client to override their device classification with any classification equal to or lesser than their actual classification. To invoke this functionality, all the client must do is define a GET parameter "override"={"basic","standard","full"}
in their request string to a page powered by the MWF. To return to their actual classification, they should include the GET parameter "override"="no"
in their request string to a page powered by the MWF.
The mwf.override object does not itself provide any new methods. However, it does add several methods to mwf.classification.
This functionality is defined in assets/js/core/override.js
and is automatically loaded by the JS handler.
The following functions is always added to mwf.classification
by mwf.override
:
mwf.classiciation.isOverride()
If the client has overridden the default classification, then the following functions are defined/redefined within mwf.classification
by mwf.override
:
-
mwf.classiciation.wasFull()
If the device's actual classification is full. -
mwf.classiciation.wasStandard()
If the device's actual classification is at least standard. -
mwf.classiciation.wasBasic()
Always true as all device were at least basic. -
mwf.classiciation.isFull()
If"override"="full"
andmwf.classification.wasFull()
is true. -
mwf.classiciation.isStandard()
If"override"={"standard","full"}
andmwf.classificiation.wasStandard()
is true. -
mwf.classiciation.isBasic()
Always true as an override cannot be to less than basic.
This functionality was not necessary before MWF 1.2, as MWF 1.0-1.1 performed override logic server-side and then pushed the data client-side.