147 lines
4.6 KiB
Plaintext
147 lines
4.6 KiB
Plaintext
@model IList<EnVisage.Models.ScenarioModel.ExpenditureItem>
|
|
<script type="text/javascript">
|
|
function onChCheckExpCat(i) {
|
|
if ($('.expenditueCb:checkbox:checked').length > 0)
|
|
$("#expCatChecked_" + i).val(document.getElementById("expCatCheckedId_" + i).checked);
|
|
else $("#expCatCheckedId_" + i).prop('checked', true);
|
|
}
|
|
</script>
|
|
@{
|
|
var GroupName = string.Empty;
|
|
int ctr = 0;
|
|
}
|
|
|
|
<div class="col-sm-4" style="height:180px;overflow-y:scroll;">
|
|
@{
|
|
GroupName = "In Template";
|
|
ctr = 0;
|
|
}
|
|
@if (Model != null)
|
|
{
|
|
<h4 class="no-margin-vr">@GroupName</h4>
|
|
for (var i = 0; i < Model.Count; i++)
|
|
{
|
|
if (GroupName == Model[i].Group)
|
|
{
|
|
<input type="hidden" value="@Model[i].Group" name="expCatGroup[@i]"/>
|
|
<input type="hidden" value="@Model[i].Id" name="expCatId[@i]"/>
|
|
<input type="hidden" value="@Model[i].Name" name="expCatName[@i]"/>
|
|
<div class="checkbox">
|
|
<label>
|
|
@if (Model[i].Checked)
|
|
{
|
|
<input type="checkbox" class="expenditueCb" value="@Model[i].Id" checked="checked" name="expCatCheckedId[@i]" id="expCatCheckedId_@i" onclick="onChCheckExpCat(@i); "/>
|
|
<input type="hidden" value="true" name="expCatChecked[@i]" id="expCatChecked_@i"/>
|
|
}
|
|
else
|
|
{
|
|
<input type="checkbox" class="expenditueCb" value="@Model[i].Id" name="expCatCheckedId[@i]" id="expCatCheckedId_@i" onclick="onChCheckExpCat(@i); " />
|
|
<input type="hidden" value="false" name="expCatChecked[@i]" id="expCatChecked_@i"/>
|
|
}
|
|
@Model[i].Name
|
|
</label>
|
|
</div>
|
|
ctr++;
|
|
}
|
|
}
|
|
if (ctr == 0)
|
|
{
|
|
<div><i>No categories available</i></div>
|
|
}
|
|
}
|
|
</div>
|
|
<hr class="visible-xs-block hidden-sm hidden-md hidden-lg"/>
|
|
<div class="col-sm-4" style="height:180px;overflow-y:scroll;">
|
|
@{
|
|
GroupName = "Labor";
|
|
ctr = 0;
|
|
}
|
|
@if (Model != null)
|
|
{
|
|
<h4 class="no-margin-vr">@GroupName</h4>
|
|
for (var i = 0; i < Model.Count; i++)
|
|
{
|
|
if (GroupName == Model[i].Group)
|
|
{
|
|
<input type="hidden" value="@Model[i].Group" name="expCatGroup[@i]"/>
|
|
<input type="hidden" value="@Model[i].Id" name="expCatId[@i]"/>
|
|
<input type="hidden" value="@Model[i].Name" name="expCatName[@i]"/>
|
|
<div class="checkbox">
|
|
<label>
|
|
@if (Model[i].Checked)
|
|
{
|
|
<input type="checkbox" class="expenditueCb" value="@Model[i].Id" checked="checked" name="expCatCheckedId[@i]" id="expCatCheckedId_@i" onclick="onChCheckExpCat(@i); "/>
|
|
<input type="hidden" value="true" name="expCatChecked[@i]" id="expCatChecked_@i"/>
|
|
}
|
|
else
|
|
{
|
|
<input type="checkbox" class="expenditueCb" value="@Model[i].Id" name="expCatCheckedId[@i]" id="expCatCheckedId_@i" onclick="onChCheckExpCat(@i); " />
|
|
<input type="hidden" value="false" name="expCatChecked[@i]" id="expCatChecked_@i"/>
|
|
}
|
|
@Model[i].Name
|
|
</label>
|
|
</div>
|
|
ctr++;
|
|
}
|
|
}
|
|
if (ctr == 0)
|
|
{
|
|
<div><i>No categories available</i></div>
|
|
}
|
|
}
|
|
</div>
|
|
<hr class="visible-xs-block hidden-sm hidden-md hidden-lg"/>
|
|
<div class="col-sm-4" style="height:180px;overflow-y:scroll;">
|
|
@{
|
|
GroupName = "Materials";
|
|
var SecondGroupName = "Usage";
|
|
ctr = 0;
|
|
}
|
|
@if (Model != null)
|
|
{
|
|
<h4 class="no-margin-vr">@GroupName</h4>
|
|
for (var i = 0; i < Model.Count; i++)
|
|
{
|
|
if (GroupName != @Model[i].Group && SecondGroupName == @Model[i].Group)
|
|
{
|
|
if (ctr == 0)
|
|
{
|
|
<div><i>No categories available</i></div>
|
|
}
|
|
|
|
GroupName = @Model[i].Group;
|
|
ctr = 0;
|
|
<h4 class="no-margin-b">@GroupName</h4>
|
|
}
|
|
|
|
if (GroupName == Model[i].Group)
|
|
{
|
|
<input type="hidden" value="@Model[i].Group" name="expCatGroup[@i]"/>
|
|
<input type="hidden" value="@Model[i].Id" name="expCatId[@i]"/>
|
|
<input type="hidden" value="@Model[i].Name" name="expCatName[@i]"/>
|
|
<div class="checkbox">
|
|
<label>
|
|
@if (Model[i].Checked)
|
|
{
|
|
<input type="checkbox" class="expenditueCb" value="@Model[i].Id" checked="checked" name="expCatCheckedId[@i]" @* disabled*@ id="expCatCheckedId_@i" onclick="onChCheckExpCat(@i); "/>
|
|
<input type="hidden" value="true" name="expCatChecked[@i]" id="expCatChecked_@i"/>
|
|
}
|
|
else
|
|
{
|
|
<input type="checkbox" class="expenditueCb" value="@Model[i].Id" name="expCatCheckedId[@i]" id="expCatCheckedId_@i" onclick="onChCheckExpCat(@i); " />
|
|
<input type="hidden" value="false" name="expCatChecked[@i]" id="expCatChecked_@i"/>
|
|
}
|
|
@Model[i].Name
|
|
</label>
|
|
</div>
|
|
ctr++;
|
|
}
|
|
}
|
|
if (ctr == 0)
|
|
{
|
|
<div><i>No categories available</i></div>
|
|
}
|
|
|
|
}
|
|
</div>
|