40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
@model IList<EnVisage.Models.ResourceModel.TeamItem>
|
|
<script type="text/javascript">
|
|
function onTeamCheck(i) {
|
|
//debugger;
|
|
$("#teamChecked_" + i).val(document.getElementById("teamCheckedId_" + i).checked);
|
|
}
|
|
</script>
|
|
<table class="table table-striped table-bordered dataTable" id="uom" style="margin-top: 0px !important;">
|
|
<thead style="vertical-align:top;">
|
|
<tr>
|
|
<th style="width:30px;"></th>
|
|
<th>Name</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if (Model != null)
|
|
{
|
|
for (var i = 0; i < Model.Count; i++)
|
|
{
|
|
<tr>
|
|
<td style="text-align: right;">
|
|
<input type="hidden" value="@Model[i].Id" name="teamId[@i]" />
|
|
<input type="hidden" value="@Model[i].Name" name="teamName[@i]" />
|
|
@if (Model[i].Checked)
|
|
{
|
|
<input type="checkbox" class="teamCb" value="@Model[i].Id" checked="checked" name="teamCheckedId[@i]" id="teamCheckedId_@i" onclick="onTeamCheck(@i); " />
|
|
<input type="hidden" value="true" name="teamChecked[@i]" id="teamChecked_@i" />
|
|
}
|
|
else
|
|
{
|
|
<input type="checkbox" class="teamCb" value="@Model[i].Id" name="teamCheckedId[@i]" id="teamCheckedId_@i" onclick="onTeamCheck(@i); " />
|
|
<input type="hidden" value="false" name="teamChecked[@i]" id="teamChecked_@i" />
|
|
}
|
|
</td>
|
|
<td>@Model[i].Name</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</tbody>
|
|
</table> |