mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 13:38:26 +02:00
Show a message on the History Panel if the feature is new
(closes #4975)
This commit is contained in:
@@ -325,6 +325,7 @@ en:
|
||||
key: H
|
||||
title: History
|
||||
selected: "{n} selected"
|
||||
no_history: "No History (New Feature)"
|
||||
version: Version
|
||||
last_edit: Last Edit
|
||||
edited_by: Edited By
|
||||
|
||||
Vendored
+1
@@ -407,6 +407,7 @@
|
||||
"key": "H",
|
||||
"title": "History",
|
||||
"selected": "{n} selected",
|
||||
"no_history": "No History (New Feature)",
|
||||
"version": "Version",
|
||||
"last_edit": "Last Edit",
|
||||
"edited_by": "Edited By",
|
||||
|
||||
@@ -96,8 +96,8 @@ export function uiPanelHistory(context) {
|
||||
|
||||
|
||||
function redraw(selection) {
|
||||
var selected = _filter(context.selectedIDs(), function(e) { return context.hasEntity(e); }),
|
||||
singular = selected.length === 1 ? selected[0] : null;
|
||||
var selected = _filter(context.selectedIDs(), function(e) { return context.hasEntity(e); });
|
||||
var singular = selected.length === 1 ? selected[0] : null;
|
||||
|
||||
osm = context.connection();
|
||||
|
||||
@@ -112,6 +112,13 @@ export function uiPanelHistory(context) {
|
||||
|
||||
var entity = context.entity(singular);
|
||||
|
||||
if (!entity.version) {
|
||||
selection
|
||||
.append('div')
|
||||
.text(t('info_panels.history.no_history'));
|
||||
return;
|
||||
}
|
||||
|
||||
var list = selection
|
||||
.append('ul');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user