search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Force loading message with backdrop

Asked by Christos Georgiou
8 years ago.

Hello,

I am looking for a way to show the loading label (and the loading backdrop) programaticaly. I know that I can do it with

args.async = true;
$.dp.message("Loading...");

but I don't have the args variable in my library that fires up the loading process.

I tried to call $.dp.loadingStart() but it not seems to exist. I am working with ver 2182.

Answer posted by Dan Letecky [DayPilot]
8 years ago.

dp.message() should work anytime and it doesn't depend on any other variable:
https://api.daypilot.org/daypilot-scheduler-message/

You can also use dp.message.hide() to hide the current message.

There is a built-in "loading" label that doesn't use dp.message() - it's a different element. You can display it using this workaround:

dp.nav.loading.style.display = '';

It will display dp.loadingLabel as the text/html.

You can hide it like this:

dp.nav.loading.style.display = 'none';

But I would stay with dp.message() if possible because this is internal API.

Comment posted by Christos Georgiou
8 years ago.

but this method does not show the backdrop layer in order to disable user from further edit the schedule

Comment posted by Dan Letecky [DayPilot]
8 years ago.

You can use the following methods to block/onblock the UI using an overlay div:

dp.uiBlock();
dp.uiUnblock();
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.