Permalink
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?
inc-md-js/info/js/all-entity-categories-min.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
35 lines (30 sloc)
1004 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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); | |
}); |