mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 22:16:00 -04:00
Cosmetics.
This commit is contained in:
parent
7494491637
commit
c71f891af2
311 changed files with 55 additions and 46 deletions
29
src/_h5ai/client/js/inc/h5ai-info.js
Normal file
29
src/_h5ai/client/js/inc/h5ai-info.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
modulejs.define('h5ai-info', ['$', 'core/ajax'], function ($, ajax) {
|
||||
|
||||
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 () {
|
||||
|
||||
ajax.getChecks(function (json) {
|
||||
|
||||
if (json) {
|
||||
$('.test').each(function () {
|
||||
|
||||
setCheckResult(this, json[$(this).data('id')]);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
init();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue