mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 13:18:15 +02:00
added note reporting and margin to save buttons
This commit is contained in:
@@ -146,3 +146,7 @@
|
||||
max-height: 300px;
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
.note-report {
|
||||
float: right;
|
||||
}
|
||||
@@ -3573,6 +3573,7 @@ img.tile-debug {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.save-section .buttons .action,
|
||||
|
||||
@@ -623,6 +623,7 @@ en:
|
||||
comment: Comment
|
||||
close_comment: Close and Comment
|
||||
open_comment: Reopen and Comment
|
||||
report: Report
|
||||
help:
|
||||
title: Help
|
||||
key: H
|
||||
|
||||
Vendored
+4
-3
@@ -755,7 +755,8 @@
|
||||
"open": "Reopen Note",
|
||||
"comment": "Comment",
|
||||
"close_comment": "Close and Comment",
|
||||
"open_comment": "Reopen and Comment"
|
||||
"open_comment": "Reopen and Comment",
|
||||
"report": "Report"
|
||||
},
|
||||
"help": {
|
||||
"title": "Help",
|
||||
@@ -6686,7 +6687,7 @@
|
||||
"attribution": {
|
||||
"text": "Terms & Feedback"
|
||||
},
|
||||
"description": "DigitalGlobe-Premium is a mosaic composed of DigitalGlobe basemap with select regions filled with +Vivid or custom area of interest imagery, 50cm resolution or better, and refreshed more frequently with ongoing updates.",
|
||||
"description": "Premium DigitalGlobe satellite imagery.",
|
||||
"name": "DigitalGlobe Premium Imagery"
|
||||
},
|
||||
"DigitalGlobe-Premium-vintage": {
|
||||
@@ -6700,7 +6701,7 @@
|
||||
"attribution": {
|
||||
"text": "Terms & Feedback"
|
||||
},
|
||||
"description": "DigitalGlobe-Standard is a curated set of imagery covering 86% of the earth’s landmass, with 30-60cm resolution where available, backfilled by Landsat. Average age is 2.31 years, with some areas updated 2x per year.",
|
||||
"description": "Standard DigitalGlobe satellite imagery.",
|
||||
"name": "DigitalGlobe Standard Imagery"
|
||||
},
|
||||
"DigitalGlobe-Standard-vintage": {
|
||||
|
||||
@@ -37,6 +37,7 @@ export { uiNotice } from './notice';
|
||||
export { uiNoteComments } from './note_comments';
|
||||
export { uiNoteEditor } from './note_editor';
|
||||
export { uiNoteHeader } from './note_header';
|
||||
export { uiNoteReport } from './note_report';
|
||||
export { uiPresetEditor } from './preset_editor';
|
||||
export { uiPresetIcon } from './preset_icon';
|
||||
export { uiPresetList } from './preset_list';
|
||||
|
||||
@@ -9,7 +9,8 @@ import { svgIcon } from '../svg';
|
||||
import {
|
||||
uiNoteComments,
|
||||
uiNoteHeader,
|
||||
uiViewOnOSM
|
||||
uiNoteReport,
|
||||
uiViewOnOSM,
|
||||
} from './index';
|
||||
|
||||
import {
|
||||
@@ -20,8 +21,8 @@ import {
|
||||
|
||||
export function uiNoteEditor(context) {
|
||||
var dispatch = d3_dispatch('change');
|
||||
var noteHeader = uiNoteHeader();
|
||||
var noteComments = uiNoteComments();
|
||||
var noteHeader = uiNoteHeader();
|
||||
var _note;
|
||||
|
||||
|
||||
@@ -67,7 +68,8 @@ export function uiNoteEditor(context) {
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'footer')
|
||||
.call(uiViewOnOSM(context).what(_note));
|
||||
.call(uiViewOnOSM(context).what(_note))
|
||||
.call(uiNoteReport(context).note(_note));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
import { t } from '../util/locale';
|
||||
import { svgIcon } from '../svg';
|
||||
import {
|
||||
osmNote
|
||||
} from '../osm';
|
||||
|
||||
|
||||
export function uiNoteReport() {
|
||||
var _note;
|
||||
var url = 'https://www.openstreetmap.org/reports/new?reportable_id=';
|
||||
|
||||
function noteReport(selection) {
|
||||
|
||||
if (!(_note instanceof osmNote)) return;
|
||||
|
||||
url += _note.id + '&reportable_type=Note';
|
||||
|
||||
var data = ((!_note || _note.isNew()) ? [] : [_note]);
|
||||
var link = selection.selectAll('.note-report')
|
||||
.data(data, function(d) { return d.id; });
|
||||
|
||||
// exit
|
||||
link.exit()
|
||||
.remove();
|
||||
|
||||
// enter
|
||||
var linkEnter = link.enter()
|
||||
.append('a')
|
||||
.attr('class', 'note-report')
|
||||
.attr('target', '_blank')
|
||||
.attr('href', url)
|
||||
.call(svgIcon('#iD-icon-out-link', 'inline'));
|
||||
|
||||
linkEnter
|
||||
.append('span')
|
||||
.text(t('note.report'));
|
||||
}
|
||||
|
||||
|
||||
noteReport.note = function(_) {
|
||||
if (!arguments.length) return _note;
|
||||
_note = _;
|
||||
return noteReport;
|
||||
};
|
||||
|
||||
return noteReport;
|
||||
}
|
||||
Reference in New Issue
Block a user