mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 04:24:45 -04:00
Refactor code.
This commit is contained in:
parent
d5221c0d17
commit
1a47a2aa3b
5 changed files with 33 additions and 40 deletions
|
@ -23,18 +23,12 @@ modulejs.define('main/info', ['$', 'config'], function ($, config) {
|
|||
|
||||
function addTest(label, info, passed, result) {
|
||||
|
||||
$(testTemp)
|
||||
.find('.label')
|
||||
.text(label)
|
||||
.end()
|
||||
.find('.result')
|
||||
var $test = $(testTemp).appendTo('#tests');
|
||||
$test.find('.label').text(label);
|
||||
$test.find('.result')
|
||||
.addClass(passed ? 'passed' : 'failed')
|
||||
.text(result ? result : (passed ? 'yes' : 'no'))
|
||||
.end()
|
||||
.find('.info')
|
||||
.html(info)
|
||||
.end()
|
||||
.appendTo('#tests');
|
||||
.text(result ? result : (passed ? 'yes' : 'no'));
|
||||
$test.find('.info').html(info);
|
||||
}
|
||||
|
||||
function addTests() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue