Files
edx-platform/lms/static/js/logout.js
Clinton Blackburn 3f19cc0265 Updated logout view
In addition to logging the user out of LMS, the logout view also logs users out of the IDAs to which they previously authenticated.

ECOM-4610
2016-06-15 11:11:49 -04:00

24 lines
657 B
JavaScript

/**
* JS for the logout page.
*
* This script waits for all iframes on the page to load before redirecting the user
* to a specified URL. If there are no iframes on the page, the user is immediately redirected.
*/
(function ($) {
'use strict';
$(function () {
var $iframeContainer = $('#iframeContainer'),
$iframes = $iframeContainer.find('iframe'),
redirectUrl = $iframeContainer.data('redirect-url');
if ($iframes.length === 0) {
window.location = redirectUrl;
}
$iframes.allLoaded(function () {
window.location = redirectUrl;
});
});
})(jQuery);