mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-05 09:23:40 -04:00
Refactored and lots of modification. See README.md.
This commit is contained in:
parent
859a680e19
commit
71ed41fa69
85 changed files with 3191 additions and 2969 deletions
|
@ -1,47 +0,0 @@
|
|||
|
||||
Module.define('splash', [jQuery, 'core'], function ($, core) {
|
||||
|
||||
var setCheckResult = function (id, result) {
|
||||
|
||||
var $ele = $(id).find('.test-result');
|
||||
|
||||
if (result) {
|
||||
$ele.addClass('test-passed').text('yes');
|
||||
} else {
|
||||
$ele.addClass('test-failed').text('no');
|
||||
}
|
||||
},
|
||||
handleChecksResponse = function (response) {
|
||||
|
||||
setCheckResult('#test-php', response && response.php);
|
||||
setCheckResult('#test-zips', response && response.zips);
|
||||
setCheckResult('#test-thumbs', response && response.thumbs);
|
||||
},
|
||||
checks = function () {
|
||||
|
||||
$.ajax({
|
||||
url: core.api(),
|
||||
data: {
|
||||
action: 'checks'
|
||||
},
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
|
||||
handleChecksResponse(response);
|
||||
},
|
||||
error: function () {
|
||||
|
||||
handleChecksResponse();
|
||||
}
|
||||
});
|
||||
},
|
||||
init = function () {
|
||||
|
||||
checks();
|
||||
};
|
||||
|
||||
return {
|
||||
init: init
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue