You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a Django application django-joyride on top of this library where joyrides are configurable through admin panel. As now all the configuration is managed through admin, It is necessary that postExposeCallback etc callbacks should accept function name as string:
postExposeCallback: "my_callback_name"
You just need to add below lines in non configurable settings in order to achieve that:
// check if callbacks are passed as string
if (typeof settings.postExposeCallback !== "function"){
settings.postExposeCallback = window[settings.postExposeCallback];
}
if (typeof settings.preRideCallback !== "function"){
settings.preRideCallback = window[settings.preRideCallback];
}
if (typeof settings.postRideCallback !== "function"){
settings.postRideCallback = window[settings.postRideCallback];
}
if (typeof settings.preStepCallback !== "function"){
settings.preStepCallback = window[settings.preStepCallback];
}
if (typeof settings.postStepCallback !== "function"){
settings.postStepCallback = window[settings.postStepCallback];
}
The text was updated successfully, but these errors were encountered:
I have created a Django application django-joyride on top of this library where joyrides are configurable through admin panel. As now all the configuration is managed through admin, It is necessary that
postExposeCallback
etc callbacks should accept function name as string:You just need to add below lines in non configurable settings in order to achieve that:
The text was updated successfully, but these errors were encountered: