mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-06 17:51:15 -04:00
29 lines
543 B
JavaScript
29 lines
543 B
JavaScript
|
|
modulejs.define('info', ['$'], function ($) {
|
|
|
|
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 () {
|
|
|
|
$.getJSON('server/php/index.php', {action: 'get', checks: true}, function (json) {
|
|
|
|
if (json) {
|
|
$('.test').each(function () {
|
|
|
|
setCheckResult(this, json.checks[$(this).data('id')]);
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
init();
|
|
});
|