Files
EasySoft-ZenTaoPMS/module/testtask/js/results.js
pengjiangxiu f334c1897a * adjust code.
2017-03-20 15:54:12 +08:00

28 lines
913 B
JavaScript

$(function()
{
$('.result-item').click(function()
{
var $this = $(this);
$this.toggleClass('show-detail');
var show = $this.hasClass('show-detail');
$this.next('.result-detail').toggleClass('hide', !show);
$this.find('.collapse-handle').toggleClass('icon-chevron-down', !show).toggleClass('icon-chevron-up', show);;
});
$(".step-group input[type='checkbox']").click(function()
{
var $next = $(this).closest('tr').next();
while($next.length && $next.hasClass('step-item'))
{
var isChecked = $(this).prop('checked');
$next.find("input[type='checkbox']").prop('checked', isChecked);
$next = $next.next();
}
});
$('#casesResults table caption .result-tip').html($('#resultTip').html());
$('tr:first').addClass("show-detail");
$('#tr-detail_1').removeClass("hide");
});