老师布置编程作业界面增加测试按钮

This commit is contained in:
sw 2015-07-30 17:27:42 +08:00
parent b5849ed8b8
commit 28509b7cdd
4 changed files with 12 additions and 10 deletions

View File

@ -87,16 +87,16 @@
<div>
<li>
<label class="label02">&nbsp;测试输入:&nbsp;</label>
<input type="text" class="fl h26 w200 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
<input type="text" class="fl h26 w190 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
</li>
<li >
<label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label>
<input type="text" class="fl h26 w200 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
<input type="text" class="fl h26 w190 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
</li>
<li>
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
<!--span class="green_btn fl ml5 mt1">测试</span-->
<a class="green_btn fl ml5 mt1">测试</a>
</li>
<div class="cl"></div>
</div>
@ -105,16 +105,16 @@
<div>
<li>
<label class="label02">&nbsp;测试输入:&nbsp;</label>
<input type="text" class="fl h26 w200 mb10" name="input[0]" />
<input type="text" class="fl h26 w190 mb10" name="input[0]" />
</li>
<li >
<label class=" fl f14 ml10">&nbsp;输出:&nbsp;</label>
<input type="text" class="fl h26 w200 mb10" name="output[0]" />
<input type="text" class="fl h26 w190 mb10" name="output[0]" />
</li>
<li>
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
<!--span class="green_btn fl ml5 mt1">测试</span-->
<a class="green_btn fl ml5 mt1">测试</a>
</li>
<div class="cl"></div>
</div>

View File

@ -546,10 +546,11 @@ function submit_homework_form(){if(regexHomeworkCommonName()&&regexHomeworkCommo
//增加测试结果
function add_programing_test(obj) {
var now = new Date().getTime();
obj.after("<div><li><label class='label02'>&nbsp;测试输入:&nbsp;</label><input type='text' class='fl h26 w200 mb10' name='input[" + now +"]'' />" +
"</li><li ><label class='fl f14 ml10'>&nbsp;输出:&nbsp;</label><input type='text' class='fl h26 w200 mb10' name='output[" + now +"]' />" +
obj.after("<div><li><label class='label02'>&nbsp;测试输入:&nbsp;</label><input type='text' class='fl h26 w190 mb10' name='input[" + now +"]'' />" +
"</li><li ><label class='fl f14 ml10'>&nbsp;输出:&nbsp;</label><input type='text' class='fl h26 w190 mb10' name='output[" + now +"]' />" +
"</li><li><a class='icon_add ml10' href='javascript:void(0);' title='添加测试' onclick='add_programing_test($(this).parent().parent())'></a>" +
"<a class='icon_remove' href='javascript:void(0);' title='删除测试' onclick='remove_programing_test($(this).parent().parent())'></a>" +
"<a class='green_btn fl ml5 mt1'>测试</a>" +
"</li><div class='cl'></div></div>");
}
//删除测试结果

View File

@ -609,6 +609,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
.w547{ width:544px;}
.w196{ width:196px;}
.w186{ width:186px;}
.w190{width: 190px;}
.w200{width: 200px;}
.w459{ width:459px;}
.hwork_new_set{border:1px dashed #CCC; background:#f5f5f5; text-align:center; padding:10px 0; margin-bottom:10px;}

View File

@ -166,8 +166,8 @@ a.c_green{ color:#28be6c;}
.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
a:hover.grey_btn{ background:#717171; color:#fff;}
.green_btn{ background:#28be6c; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;}
a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
.green_btn{ background:#28be6c; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
a:hover.green_btn{ background:#14ad5a;}
.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;}
a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}