Merge branch 'testing' into ESLint-Action

This commit is contained in:
RubenPX 2022-04-20 12:12:30 +02:00 committed by GitHub
commit 57c3bee109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 15 deletions

View File

@ -200,8 +200,9 @@ async function processSelectedDevices() {
*/
manage(event, lotID, deviceListID) {
event.preventDefault();
const {indeterminate} = event.srcElement;
const checked = !event.srcElement.checked;
const srcElement = event.srcElement.parentElement.children[0]
const indeterminate = srcElement.indeterminate;
const checked = !srcElement.checked;
const found = this.list.filter(list => list.lotID == lotID)[0];
const foundIndex = found != undefined ? this.list.findLastIndex(x => x.lotID == found.lotID) : -1;
@ -339,8 +340,8 @@ async function processSelectedDevices() {
} else {
doc.children[0].indeterminate = true;
}
doc.children[0].addEventListener("mouseup", (ev) => actions.manage(ev, lotID, selectedDevicesIDs));
doc.children[0].addEventListener('mouseup', (ev) => actions.manage(ev, lotID, selectedDevicesIDs));
doc.children[1].addEventListener('mouseup', (ev) => actions.manage(ev, lotID, selectedDevicesIDs));
elementTarget.append(doc);
}

View File

@ -32,10 +32,10 @@
<div class="card-body pt-3">
<!-- Bordered Tabs -->
<div class="d-flex align-items-center justify-content-between">
<h3><a href="{{ url_for('inventory.lot_edit', id=lot.id) }}">{{ lot.name }}</a></h3>
<div class="d-flex align-items-center justify-content-between row">
<h3 class="col-sm-12 col-md-5"><a href="{{ url_for('inventory.lot_edit', id=lot.id) }}">{{ lot.name }}</a></h3>
<div><!-- lot actions -->
<div class="col-sm-12 col-md-7 d-md-flex justify-content-md-end"><!-- lot actions -->
{% if lot.is_temporary %}
<span class="d-none" id="activeRemoveLotModal" data-bs-toggle="modal" data-bs-target="#btnRemoveLots"></span>
<a class="me-2" href="javascript:newTrade('user_from')">
@ -69,7 +69,7 @@
</ul>
{% endif %}
<div class="tab-content pt-5">
<div class="tab-content pt-1">
<div id="devices-list" class="tab-pane fade devices-list active show">
<label class="btn btn-primary " for="SelectAllBTN"><input type="checkbox" id="SelectAllBTN" autocomplete="off"></label>
<div class="btn-group dropdown ml-1">
@ -91,7 +91,7 @@
</li>
</ul>
</div>
<div class="btn-group dropdown ml-1" uib-dropdown="">
<div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnActions" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-plus"></i>
New Actions
@ -178,7 +178,7 @@
</ul>
</div>
<div class="btn-group dropdown ml-1" uib-dropdown="">
<div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnExport" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-reply"></i>
Exports
@ -212,7 +212,7 @@
</ul>
</div>
<div class="btn-group dropdown ml-1" uib-dropdown="">
<div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnTags" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-tag"></i>
Tags
@ -246,7 +246,7 @@
</ul>
</div>
<div class="btn-group dropdown ml-1" uib-dropdown="">
<div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnSnapshot" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-laptop"></i>
New Device

View File

@ -19,7 +19,7 @@
<div class="card-body pt-3">
<!-- Bordered Tabs -->
<div class="btn-group dropdown ml-1">
<div class="btn-group dropdown m-1">
<a href="{{ url_for('labels.tag_add')}}" type="button" class="btn btn-primary">
<i class="bi bi-plus"></i>
Create Named Tag
@ -27,7 +27,7 @@
</a>
</div>
<div class="btn-group dropdown ml-1" uib-dropdown="">
<div class="btn-group dropdown m-1" uib-dropdown="">
<a href="{{ url_for('labels.tag_unnamed_add')}}" type="button" class="btn btn-primary">
<i class="bi bi-plus"></i>
Create UnNamed Tag
@ -57,7 +57,7 @@
<td>{{ tag.get_provider }}</td>
<td>
{% if tag.device %}
<a href={{ url_for('inventory.device_details', id=tag.device.devicehub_id)}}>
<a href="{{ url_for('inventory.device_details', id=tag.device.devicehub_id)}}">
{{ tag.device.verbose_name }}
</a>
{% endif %}