Refactored and lots of modification. See README.md.

This commit is contained in:
Lars Jung 2012-04-16 12:53:54 +02:00
parent 859a680e19
commit 71ed41fa69
85 changed files with 3191 additions and 2969 deletions

View file

@ -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
};
});