mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 04:24:45 -04:00
More changes to init procedure and API.
This commit is contained in:
parent
15dd200b28
commit
a087e96d69
6 changed files with 17 additions and 13 deletions
29
src/_h5ai/client/js/inc/info.js
Normal file
29
src/_h5ai/client/js/inc/info.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
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();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue