close icon button

This commit is contained in:
Milos Brzakovic (E-Search)
2021-11-26 12:25:12 +01:00
parent fef933a2a4
commit 4db3e720c0
17 changed files with 21 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ en:
list: list
text: text
deselect: deselect
close: close
toolbar:
inspect: Inspect
undo_redo: Undo / Redo

View File

@@ -226,6 +226,7 @@ export function uiCommit(context) {
headerTitle
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', function() {
dispatch.call('cancel', this);
})

View File

@@ -60,6 +60,7 @@ export function uiConflicts(context) {
headerEnter
.append('button')
.attr('class', 'fr')
.attr('title', t('icons.close'))
.on('click', cancel)
.call(svgIcon('#iD-icon-close'));

View File

@@ -26,6 +26,7 @@ export function uiDataEditor(context) {
headerEnter
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', function() {
context.enter(modeBrowse(context));
})

View File

@@ -50,6 +50,7 @@ export function uiEntityEditor(context) {
headerEnter
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', function() { context.enter(modeBrowse(context)); })
.call(svgIcon(_modified ? '#iD-icon-apply' : '#iD-icon-close'));

View File

@@ -201,6 +201,7 @@ export function uiFieldHelp(context, fieldName) {
titleEnter
.append('button')
.attr('class', 'fr close')
.attr('title', t('icons.close'))
.on('click', function(d3_event) {
d3_event.stopPropagation();
d3_event.preventDefault();

View File

@@ -31,6 +31,7 @@ export function uiImproveOsmEditor(context) {
headerEnter
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', () => context.enter(modeBrowse(context)))
.call(svgIcon('#iD-icon-close'));

View File

@@ -63,6 +63,7 @@ export function uiInfo(context) {
title
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', function(d3_event, d) {
d3_event.stopImmediatePropagation();
d3_event.preventDefault();

View File

@@ -320,6 +320,7 @@ export function uiInit(context) {
.append('a')
.attr('target', '_blank')
.attr('href', 'https://github.com/openstreetmap/iD/issues')
.attr('aria-label', t('report_a_bug'))
.call(svgIcon('#iD-icon-bug', 'light'))
.call(uiTooltip().title(t.html('report_a_bug')).placement('top'));
@@ -327,6 +328,7 @@ export function uiInit(context) {
.append('a')
.attr('target', '_blank')
.attr('href', 'https://github.com/openstreetmap/iD/blob/develop/CONTRIBUTING.md#translating')
.attr('aria-label', t('help_translate'))
.call(svgIcon('#iD-icon-translate', 'light'))
.call(uiTooltip().title(t.html('help_translate')).placement('top'));

View File

@@ -30,6 +30,7 @@ export function uiKeepRightEditor(context) {
headerEnter
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', () => context.enter(modeBrowse(context)))
.call(svgIcon('#iD-icon-close'));

View File

@@ -1,5 +1,6 @@
import { select as d3_select } from 'd3-selection';
import { t } from './../core/localizer';
import { svgIcon } from '../svg/icon';
import { utilKeybinding } from '../util';
@@ -55,6 +56,7 @@ export function uiModal(selection, blocking) {
modal
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', shaded.close)
.call(svgIcon('#iD-icon-close'));

View File

@@ -46,6 +46,7 @@ export function uiNoteEditor(context) {
headerEnter
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', function() {
context.enter(modeBrowse(context));
})

View File

@@ -42,6 +42,7 @@ export function uiNoteHeader() {
iconEnter
.append('div')
.attr('class', 'note-icon-annotation')
.attr('title', t('icons.close'))
.call(svgIcon(statusIcon, 'icon-annotation'));
});

View File

@@ -30,6 +30,7 @@ export function uiOsmoseEditor(context) {
headerEnter
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', () => context.enter(modeBrowse(context)))
.call(svgIcon('#iD-icon-close'));

View File

@@ -3,7 +3,7 @@ import {
} from 'd3-selection';
import { svgIcon } from '../svg/icon';
import { localizer } from '../core/localizer';
import { t, localizer } from '../core/localizer';
import { uiTooltip } from './tooltip';
@@ -110,6 +110,7 @@ export function uiPane(id, context) {
heading
.append('button')
.attr('title', t('icons.close'))
.on('click', hidePane)
.call(svgIcon('#iD-icon-close'));

View File

@@ -2,6 +2,7 @@ import {
select as d3_select
} from 'd3-selection';
import { t } from '../core/localizer';
import { dispatch as d3_dispatch } from 'd3-dispatch';
import { svgIcon } from '../svg/icon';
import { utilGetDimensions } from '../util/dimensions';
@@ -18,6 +19,7 @@ export function uiPhotoviewer(context) {
selection
.append('button')
.attr('class', 'thumb-hide')
.attr('title', t('icons.close'))
.on('click', function () {
if (services.streetside) { services.streetside.hideViewer(context); }
if (services.mapillary) { services.mapillary.hideViewer(context); }

View File

@@ -87,6 +87,7 @@ export function uiSuccess(context) {
header
.append('button')
.attr('class', 'close')
.attr('title', t('icons.close'))
.on('click', () => dispatch.call('cancel'))
.call(svgIcon('#iD-icon-close'));