Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions Smartscope/server/api/templates/holecard.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,17 @@
</ul>
</div>
<h5 class="col-19 card-title m-0">Hole {{hole.hole_id.number}}-{{hole.number}}</h5>
<div class="p-0 justify-content-center d-none d-md-flex">
<div class="d-flex p-0 justify-content-center align-items-center">
{% include "autoscreenViewer/download_images_dropdown.html" with instance=hole %}
<div class="div col-2 p-0 justify-content-center d-none d-md-block">
<button id='' class='a btn btn-outline-secondary zoomBtn' type="button" value='1'><i
class="bi bi-zoom-in zoomIcon"></i></button>
</div>
<button id='' class='btn btn-outline-secondary btn-sm zoomBtn mx-1' type="button" value='1'><i
class="bi bi-zoom-in zoomIcon"></i></button>
</div>
</div>
</div>
<div class="card-img-top ">
<div class="div row mw-100 m-0 p-0 justify-content-center">
<div class="col-12 col-md-6 p-0 d-flex align-items-center justify-content-center">
<div class="w-100">
<div class="w-100 holeCardSvg" data-pixel-size="{{hole.pixel_size}}">
{{svg | safe }}
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions Smartscope/server/api/templates/mapcard.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
data-bs-toggle="tooltip" data-bs-placement="top" title="Clear Selection"><i
class="bi bi-x-square"></i></a>
</li>
<!--Ruler icon in the square_div -->
<!--Ruler icon for measurement (Square card only) -->
{% if instance.targets_prefix == 'hole' %}
<li class="nav-item d-flex align-items-center">
<a id="angleMeasure" class="nav-link"
<a id="{{instance.targets_prefix}}AngleMeasure" class="nav-link angleMeasureBtn"
data-bs-toggle="tooltip" data-bs-placement="top"
title="Measure square rotation angle">
title="Measure angle and distance">
<i class="bi bi-rulers"></i>
</a>
</li>
Expand All @@ -56,7 +56,7 @@
</nav>

<div class="d-flex h-100 w-100 m-0 p-0 justify-content-center align-items-center">
<div id="{{instance.prefix}}_im" class="d-flex w-100 h-100 justify-content-center">
<div id="{{instance.prefix}}_im" class="d-flex w-100 h-100 justify-content-center" data-pixel-size="{{instance.pixel_size}}">
{{ svg | safe }}
</div>
</div>
Expand Down
63 changes: 33 additions & 30 deletions Smartscope/server/api/templates/mapcard/add_targets.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,48 +62,51 @@
{% endif %}

<!-- Hidden Form -->
<div id="dialogueForm" class="dialogue-form">
<h5>Extend Lattice Parameters</h5>
<form id="extendLatticeForm"">
<div class="form-group row">
<label for="squareMeshSpacing" class="col-4 col-form-label">Square Mesh Spacing</label>
<div class="col-8">
<input type="number" class="form-control" id="squareMeshSpacing" name="square_mesh_spacing" step="0.01">
<div id="dialogueForm" class="dialogue-form" style="font-size: 13px;">
<p class="mb-2 fw-bold">Extend Lattice Parameters</p>
<form id="extendLatticeForm">
<div class="form-group row g-1 mb-1">
<label for="squareMeshSpacing" class="col-7 col-form-label py-0 text-start">Square Mesh Spacing (μm)</label>
<div class="col-5">
<input type="number" class="form-control form-control-sm py-0" style="font-size: 13px;" id="squareMeshSpacing" name="square_mesh_spacing" step="0.01" placeholder="85">
</div>
</div>
<div class="form-group row">
<label for="squareMeshRotation" class="col-4 col-form-label">Square Mesh Rotation</label>
<div class="col-8">
<input type="number" class="form-control" id="squareMeshRotation" name="square_mesh_rotation" step="0.01">
<div class="form-group row g-1 mb-1">
<label for="squareMeshRotation" class="col-7 col-form-label py-0 text-start">Square Mesh Rotation (°)</label>
<div class="col-5">
<input type="number" class="form-control form-control-sm py-0" style="font-size: 13px;" id="squareMeshRotation" name="square_mesh_rotation" step="0.01" placeholder="0">
</div>
</div>
<div class="form-group row">
<label for="holeSquareSpacing" class="col-4 col-form-label">Hole Square Spacing</label>
<div class="col-8">
<input type="number" class="form-control" id="holeSquareSpacing" name="hole_square_spacing" step="0.01" required>
<div class="form-group row g-1 mb-1">
<label for="holeSquareSpacing" class="col-7 col-form-label py-0 text-start">Hole Square Spacing (μm)</label>
<div class="col-5">
<input type="number" class="form-control form-control-sm py-0" style="font-size: 13px;" id="holeSquareSpacing" name="hole_square_spacing" step="0.01" placeholder="1.2" required>
</div>
</div>
<div class="form-group row">
<label for="holeSquareRotation" class="col-4 col-form-label">Hole Square Rotation</label>
<div class="col-8">
<input type="number" class="form-control" id="holeSquareRotation" name="hole_square_rotation" step="0.01" required>
<div class="form-group row g-1 mb-1">
<label for="holeSquareRotation" class="col-7 col-form-label py-0 text-start">Hole Square Rotation (°)</label>
<div class="col-5">
<input type="number" class="form-control form-control-sm py-0" style="font-size: 13px;" id="holeSquareRotation" name="hole_square_rotation" step="0.01" placeholder="0" required>
</div>
</div>
<div class="form-group row">
<label for="holeMedmagSpacing" class="col-4 col-form-label">Hole MedMag Spacing</label>
<div class="col-8">
<input type="number" class="form-control" id="holeMedmagSpacing" name="hole_medmag_spacing" step="0.01">
<div class="form-group row g-1 mb-1">
<label for="holeMedmagSpacing" class="col-7 col-form-label py-0 text-start">Hole MedMag Spacing (μm)</label>
<div class="col-5">
<input type="number" class="form-control form-control-sm py-0" style="font-size: 13px;" id="holeMedmagSpacing" name="hole_medmag_spacing" step="0.01" placeholder="1.2">
</div>
</div>
<div class="form-group row">
<label for="holeMedmagRotation" class="col-4 col-form-label">Hole MedMag Rotation</label>
<div class="col-8">
<input type="number" class="form-control" id="holeMedmagRotation" name="hole_medmag_rotation" step="0.01">
<div class="form-group row g-1 mb-1">
<label for="holeMedmagRotation" class="col-7 col-form-label py-0 text-start">Hole MedMag Rotation (°)</label>
<div class="col-5">
<input type="number" class="form-control form-control-sm py-0" style="font-size: 13px;" id="holeMedmagRotation" name="hole_medmag_rotation" step="0.01" placeholder="0">
</div>
</div>
<div class="d-flex justify-content-end mt-4">
<button type="button" class="btn btn-secondary me-2" onclick="closeExtendLatticeForm()">Cancel</button>
<button type="button" class="btn btn-primary" onclick="submitExtendLatticeForm()">Submit</button>
<div class="d-flex justify-content-between align-items-center mt-1">
<span class="fst-italic text-muted" style="font-size: 9px; max-width: 200px;">Use the measurement tool in the Square card to calculate Hole Square spacing and rotation.</span>
<div>
<button type="button" class="btn btn-secondary btn-sm me-1 py-0 px-2" onclick="closeExtendLatticeForm()">Cancel</button>
<button type="button" class="btn btn-primary btn-sm py-0 px-2" onclick="submitExtendLatticeForm()">Submit</button>
</div>
</div>
</form>
</div>
Expand Down
11 changes: 4 additions & 7 deletions static/dialogueform.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
.dialogue-form {
display: none;
position: fixed;
top: 18%;
top: 30%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
border: 1px solid #ccc;
padding: 5px;
padding: 10px 15px;
z-index: 3000;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
border-radius: 2px;
width: 600px;
height: 250px; /* Set a specific height */
overflow-y: auto; /* Allow scrolling if content overflows */
overflow-x: hidden;
border-radius: 4px;
width: 420px;
}

.dialogue-overlay {
Expand Down
Loading