mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 15:56:56 +02:00
Restore tooltips on rule checkboxes, separate 'tip' and 'reference'
Reference will show on clicking info button, and can contain more useful information than a tooltip can.
This commit is contained in:
@@ -305,16 +305,19 @@ export function uiIssues(context) {
|
||||
updateRulesList();
|
||||
}
|
||||
|
||||
|
||||
function updateRulesList() {
|
||||
var ruleKeys = context.validator().getRuleKeys();
|
||||
_rulesList
|
||||
.call(drawListItems, ruleKeys, 'checkbox', 'rule', toggleRule, isRuleEnabled);
|
||||
}
|
||||
|
||||
|
||||
function isRuleEnabled(d) {
|
||||
return context.validator().isRuleEnabled(d);
|
||||
}
|
||||
|
||||
|
||||
function toggleRule(d) {
|
||||
context.validator().toggleRule(d);
|
||||
}
|
||||
@@ -398,6 +401,14 @@ export function uiIssues(context) {
|
||||
var enter = items.enter()
|
||||
.append('li');
|
||||
|
||||
if (name === 'rule') {
|
||||
enter
|
||||
.call(tooltip()
|
||||
.title(function(d) { return t('issues.' + d + '.tip'); })
|
||||
.placement('top')
|
||||
);
|
||||
}
|
||||
|
||||
var label = enter
|
||||
.append('label');
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ export function validationAlmostJunction() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.almost_junction.highway-highway.tip'));
|
||||
.text(t('issues.almost_junction.highway-highway.reference'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -517,7 +517,7 @@ export function validationCrossingWays() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.crossing_ways.' + crossingTypeID + '.tip'));
|
||||
.text(t('issues.crossing_ways.' + crossingTypeID + '.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ export function validationDisconnectedWay() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.disconnected_way.highway.tip'));
|
||||
.text(t('issues.disconnected_way.highway.reference'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ export function validationGenericName() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.generic_name.tip'));
|
||||
.text(t('issues.generic_name.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ export function validationIncompatibleSource() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.incompatible_source.' + id + '.tip'));
|
||||
.text(t('issues.incompatible_source.' + id + '.reference'));
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@ export function validationMissingRole() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.missing_role.multipolygon.tip'));
|
||||
.text(t('issues.missing_role.multipolygon.reference'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ export function validationMissingTag() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.missing_tag.tip'));
|
||||
.text(t('issues.missing_tag.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export function validationOldMultipolygon() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.old_multipolygon.tip'));
|
||||
.text(t('issues.old_multipolygon.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ export function validationOutdatedTags() {
|
||||
enter
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.outdated_tags.tip'));
|
||||
.text(t('issues.outdated_tags.reference'));
|
||||
|
||||
enter
|
||||
.append('strong')
|
||||
|
||||
@@ -96,7 +96,7 @@ export function validationPrivateData() {
|
||||
enter
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.private_data.tip'));
|
||||
.text(t('issues.private_data.reference'));
|
||||
|
||||
enter
|
||||
.append('strong')
|
||||
|
||||
@@ -107,7 +107,7 @@ export function validationTagSuggestsArea() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.tag_suggests_area.tip'));
|
||||
.text(t('issues.tag_suggests_area.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export function validationUnknownRoad() {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'issue-reference')
|
||||
.text(t('issues.unknown_road.tip'));
|
||||
.text(t('issues.unknown_road.reference'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user