jordan.baucke
jordan.baucke

Reputation: 4328

Applying 'Loadmask' to FullCalendar has strange results

I'm using FullCalendar 1.5.1, and I'm getting strange results when I pair it with 'jQuery Loadmask' across different browsers.

The loadmask appears normally in Firefox, and I've also tried the adaptation in Chrome.

If I pause the script in the debugger immediately before and after the calendar begins to fire the asynchronous background events to display various elements, I see the mask. Running in regular time however, I don't see the loadmask at all in Internet Explorer, Chrome, etc.

I see it just fine in Firefox!?

  1. So far I've thought it was a z-index, overlay issue with jQuery UI, but this has proved not to have much of an affect using the Loadmask adapted to use jQuery UI -
  2. I've also tried to add artificial delay using the time-out function, etc. and it still does not display over the calendar?

Upvotes: 0

Views: 401

Answers (1)

jordan.baucke
jordan.baucke

Reputation: 4328

Figured this one out:

You can wrap part of the $.ajax function internal to the calendar with some delay:

setTimeout(function() {
                    $.ajax($.extend({}, ajaxDefaults, source, {
                            data: data,
                            success: function(events) {
                                events = events || [];
                                var res = applyAll(success, this, arguments);
                                if ($.isArray(res)) {
                                    events = res;
                                }
                                callback(events);
                            },
                            error: function() {
                                applyAll(error, this, arguments);
                                callback();
                            },
                            complete: function() {
                                applyAll(complete, this, arguments);
                                popLoading();
                            }
                    }))
                }, options.fetchDelay); 

Upvotes: 1

Related Questions