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

35 lines (30 sloc) 1004 Bytes
/**
* InCommon Federation Service Categories.
*
* Displays an alphabetized list of SPs belonging to one or more
* categories. Each link requests an entity info page.
*/
$(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 SP metadata
// BUG: list is not sorted
var handleDone = function (entities) {
var id_selector = '#list-of-sps';
var attr_name = "http://macedir.org/entity-category";
$.insertEntitiesIntoDOM(entities, id_selector, attr_name, false);
};
// handle failed ajax call for all SP metadata
var handleFail = function () {
$.displayErrorMsg("Unable to retrieve all SP metadata");
};
$.getJSONMetadata4AllSPs(handleDone, handleFail);
});