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
24 lines
657 B
JavaScript
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);
|