Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Latest commit dec871f Jan 3, 2018 History
0 contributors

Users who have contributed to this file

73 lines (62 sloc) 2.07 KB
/**
* Certified Identity Providers in the InCommon Federation.
*
* Displays an alphabetized list of certified IdPs.
* Each link requests an entity info page.
*/
// helps prevent a "flash of unstyled content"
$('html').addClass('js');
$(document).ready(function () {
"use strict";
$('#page-content').hide().ajaxStop(
function () { $(this).show(); }
);
$("#loading").ajaxStart(function () {
// the image is 31x31 pixels
var x = Math.round((document.body.clientWidth - 31) / 2);
$(this).css('left', x);
$(this).show();
}).ajaxStop(function () { $(this).hide(); });
// handle successful ajax call for all IdP metadata
var handleDone = function (entities) {
var id_selector = '#list-of-idps';
var attr_name = "urn:oasis:names:tc:SAML:attribute:assurance-certification";
var num_certified_idps, qualifier;
// insert certified IdPs into the DOM
num_certified_idps = $.insertEntitiesIntoDOM(entities, id_selector, attr_name);
// add a row to the summary table for each assurance qualifier
for (qualifier in num_certified_idps) {
$('<tr/>')
.append(
$('<td/>').html(
$('<a/>').attr({
'href': qualifier
}).text(utils.getBasenameFromURL(qualifier))
)
).append(
$('<td/>').text(
num_certified_idps[qualifier]
).css('text-align', 'center')
).appendTo('#list-of-certifications');
}
// (TODO: enable table sorting when there are more IdPs)
// initialize column sorting
//$(id_selector).tablesorter({
// // initial sort on the first column, order ascending
// sortList: [ [0, 0] ],
// // disable sorting on the second column (since there are so few IdPs)
// headers: {
// 1: { sorter: false }
// }
//});
};
// handle failed ajax call for all IdP metadata
var handleFail = function () {
$.displayErrorMsg("Unable to retrieve all IdP metadata");
};
$.getJSONMetadata4AllIdPs(handleDone, handleFail);
// handle clicked entity links
var dialogOptions = null; // unused
//$('#page-content').handleClickedEntityLinks(dialogOptions);
$('#primary-content').handleClickedEntityLinks(dialogOptions);
});