More changes to init procedure and API.

This commit is contained in:
Lars Jung 2012-10-11 14:45:18 +02:00
parent 15dd200b28
commit a087e96d69
6 changed files with 17 additions and 13 deletions

View file

@ -1,29 +0,0 @@
modulejs.define('h5ai-info', ['$', 'core/server'], function ($, server) {
var setCheckResult = function (id, result) {
var $result = $(id).find('.test-result');
if (result) {
$result.addClass('test-passed').text('yes');
} else {
$result.addClass('test-failed').text('no');
}
},
init = function () {
server.request({action: 'get', checks: true}, function (json) {
if (json) {
$('.test').each(function () {
setCheckResult(this, json[$(this).data('id')]);
});
}
});
};
init();
});