64 lines
3.6 KiB
Plaintext
64 lines
3.6 KiB
Plaintext
@using static WebWindowComplex.LayoutConst
|
|
<div class="input-group mb-2">
|
|
<label class="input-group-text px-2 py-1">
|
|
<img class="img-fluid" src="@GetImageJointPosPath(CurrPosJointName)" title="@(CurrPosJointName)" width="50" />
|
|
</label>
|
|
@if (User)
|
|
{
|
|
<button class="btn btn-outline-secondary d-flex align-items-center gap-2"
|
|
type="button"
|
|
style="background-color: @(isOpenDropdown ? "#f8f9fa" : "#ffffff"); color: @(isOpenDropdown ? "#333333" : "");">
|
|
<span class="d-flex align-items-center">
|
|
<img class="img-fluid" src="@GetImageJointShapePath(CurrPosJointName, CurrJointName)" title="@(CurrJointName)" width="50" />
|
|
</span>
|
|
</button>
|
|
}
|
|
else
|
|
{
|
|
@if (CurrRec.ParentArea is Frame &&
|
|
(CurrRec.ParentArea.ParentWindow.AreaList.First().SelShapeIndex == (int)Json.WindowConst.Shapes.DOUBLEARC ||
|
|
CurrRec.ParentArea.ParentWindow.AreaList.First().SelShapeIndex == (int)Json.WindowConst.Shapes.ARC_FULL ||
|
|
CurrRec.ParentArea.ParentWindow.AreaList.First().SelShapeIndex == (int)Json.WindowConst.Shapes.THREECENTERARC) &&
|
|
(CurrRec.nIndex == 3 || CurrRec.nIndex == 4))
|
|
{
|
|
<button class="btn btn-outline-secondary d-flex align-items-center gap-2"
|
|
type="button"
|
|
style="background-color: @(isOpenDropdown ? "#f8f9fa" : "#ffffff"); color: @(isOpenDropdown ? "#333333" : "");">
|
|
<span class="d-flex align-items-center">
|
|
<img class="img-fluid" src="@GetImageJointShapePath(CurrPosJointName, CurrJointName)" title="@(CurrJointName)" width="50" />
|
|
</span>
|
|
</button>
|
|
}
|
|
else
|
|
{
|
|
<div class="dropdown" @onfocusout="HandleFocusOut" tabindex="0">
|
|
<button class="btn btn-outline-secondary dropdown-toggle d-flex align-items-center gap-2"
|
|
type="button"
|
|
style="background-color: @(isOpenDropdown ? "#f8f9fa" : "#ffffff"); color: @(isOpenDropdown ? "#333333" : "");"
|
|
@onclick="ToggleDropdownOpening"
|
|
aria-expanded="@isOpenDropdown">
|
|
<span class="d-flex align-items-center">
|
|
<img class="img-fluid" src="@GetImageJointShapePath(CurrPosJointName, CurrJointName)" title="@(CurrJointName)" width="50" />
|
|
</span>
|
|
</button>
|
|
<ul class="dropdown-menu p-2 @(isOpenDropdown ? "show" : "")"
|
|
style="position: absolute; min-width: 20em;">
|
|
<div class="row g-2 m-0">
|
|
@foreach (var jointType in CurrRec.JointTypeList)
|
|
{
|
|
<div class="col p-0">
|
|
<button type="button"
|
|
class="dropdown-item d-flex flex-column align-items-center justify-content-center p-2 rounded text-center h-100 @ButtonOpeningCss(jointType.Id)"
|
|
style="background-color: @(CurrJoint == jointType.Id ? "#d4e6fa" : "#f8f9fa");"
|
|
@onclick="() => SelJoint(jointType.Id)">
|
|
<img class="img-fluid" src="@GetImageJointShapePath(CurrPosJointName, jointType.Name)"
|
|
title="@(jointType.Name)" width="100" />
|
|
</button>
|
|
</div>
|
|
}
|
|
</div>
|
|
</ul>
|
|
</div>
|
|
}
|
|
}
|
|
</div> |