新增测试集的编辑框自适应高度

This commit is contained in:
cxt 2015-09-28 16:09:59 +08:00
parent e1348a4845
commit 955d87a98c
1 changed files with 8 additions and 0 deletions

View File

@ -184,6 +184,14 @@ $(function(){
$("#BluePopupBox").on('click', 'a.icon_add', function(){ $("#BluePopupBox").on('click', 'a.icon_add', function(){
var html = bt('t:test-answer-list', null); var html = bt('t:test-answer-list', null);
$(this).parent('.mt10').after(html); $(this).parent('.mt10').after(html);
var inputs = document.getElementsByName("program[input][]");
var outputs = document.getElementsByName("program[output][]");
if (inputs.length == outputs.length) {
for (var i=0; i<inputs.length; i++) {
autoTextarea2(inputs[i], outputs[i]);
autoTextarea2(outputs[i], inputs[i]);
}
}
}); });
$("#BluePopupBox").on('click', 'a.icon_remove', function(){ $("#BluePopupBox").on('click', 'a.icon_remove', function(){