refined class usage for usage and coverage tests
Sonarqube Scanner / Build and analyze (push) Failing after 17s

This commit is contained in:
Florian Zumpe
2026-09-26 20:56:36 +02:00
parent aa00e25c4c
commit 0e6f40ebc3
2 changed files with 18 additions and 2 deletions
+2 -2
View File
@@ -760,12 +760,12 @@
setRouteControlOpen($('#route-control-dropdown').prop('hidden'));
});
activate('#route-control-new', function () {
activate('.route-control-actions #route-control-new', function () {
setRouteControlOpen(false);
ns.EditorUi?.openNewLocalRoute?.();
});
activate('#editor-button', function () {
activate('.route-control-actions #editor-button', function () {
setRouteControlOpen(false);
});
+16
View File
@@ -8,6 +8,7 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
button: 'editor-button',
close: 'editor-close',
dialog: 'editor-dialog',
dialogTitle: 'editor-dialog-title',
newRoute: 'editor-new-route',
poiAudio: 'editor-poi-audio',
poiCancel: 'editor-poi-cancel',
@@ -124,19 +125,34 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
status.dataset.kind = isError ? 'error' : 'notice';
}
function setDialogTitle(value) {
const title = byId(ids.dialogTitle);
if (title) title.textContent = value;
}
function routeDialogTitle() {
if (state.currentSource === 'local') {
return routeId(state.currentRoute) ? 'Lokale Strecke bearbeiten' : 'Neue lokale Strecke';
}
return 'Veröffentlichte Strecke bearbeiten';
}
function showListView() {
setDialogTitle('Streckenverwaltung');
setHidden(byId(ids.routeListView), false);
setHidden(byId(ids.routeDetailView), true);
setHidden(byId(ids.poiFormView), true);
}
function showRouteView() {
setDialogTitle(routeDialogTitle());
setHidden(byId(ids.routeListView), true);
setHidden(byId(ids.routeDetailView), false);
setHidden(byId(ids.poiFormView), true);
}
function showPoiView() {
setDialogTitle(state.currentPoi ? 'POI bearbeiten' : 'POI hinzufügen');
setHidden(byId(ids.routeListView), true);
setHidden(byId(ids.routeDetailView), true);
setHidden(byId(ids.poiFormView), false);