refactor panels to not inject html

This commit is contained in:
Martin Raifer
2022-06-24 12:19:17 +02:00
parent 28eae9ed87
commit 6626ea0682
6 changed files with 6 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ export function uiInfo(context) {
title
.append('h3')
.html(function(d) { return panels[d].label; });
.each(function(d) { return panels[d].label(d3_select(this)); });
title
.append('button')

View File

@@ -159,7 +159,7 @@ export function uiPanelBackground(context) {
};
panel.id = 'background';
panel.label = t.html('info_panels.background.title');
panel.label = t.append('info_panels.background.title');
panel.key = t('info_panels.background.key');

View File

@@ -254,7 +254,7 @@ export function uiPanelHistory(context) {
};
panel.id = 'history';
panel.label = t.html('info_panels.history.title');
panel.label = t.append('info_panels.history.title');
panel.key = t('info_panels.history.key');

View File

@@ -68,7 +68,7 @@ export function uiPanelLocation(context) {
};
panel.id = 'location';
panel.label = t.html('info_panels.location.title');
panel.label = t.append('info_panels.location.title');
panel.key = t('info_panels.location.key');

View File

@@ -234,7 +234,7 @@ export function uiPanelMeasurement(context) {
};
panel.id = 'measurement';
panel.label = t.html('info_panels.measurement.title');
panel.label = t.append('info_panels.measurement.title');
panel.key = t('info_panels.measurement.key');

View File

@@ -261,7 +261,7 @@ export function uiSuccess(context) {
.call(uiDisclosure(context, `community-more-${d.id}`, false)
.expanded(false)
.updatePreference(false)
.label(t.html('success.more'))
.label(() => t.append('success.more'))
.content(showMore)
);
}