mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
refactor panels to not inject html
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user