mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 13:18:15 +02:00
update checking if note is new
This commit is contained in:
@@ -98,7 +98,7 @@ export function modeSelectNote(context, selectedNoteID) {
|
||||
.call(keybinding);
|
||||
|
||||
context.ui().sidebar
|
||||
.show(noteEditor.note(note, newFeature));
|
||||
.show(noteEditor.note(note));
|
||||
|
||||
context.map()
|
||||
.on('drawn.select', selectNote);
|
||||
|
||||
@@ -11,7 +11,7 @@ export function uiNoteComments() {
|
||||
|
||||
|
||||
function noteComments(selection) {
|
||||
if (_note.newFeature) { return; }
|
||||
if (_note.isNew()) { return; }
|
||||
|
||||
var comments = selection.selectAll('.comments-container')
|
||||
.data([0]);
|
||||
|
||||
@@ -91,7 +91,7 @@ export function uiNoteEditor(context) {
|
||||
.append('h4')
|
||||
.attr('class', '.note-save-header')
|
||||
.text(function() {
|
||||
return _note.newFeature ? t('note.newDescription') : t('note.newComment');
|
||||
return _note.isNew() ? t('note.newDescription') : t('note.newComment');
|
||||
});
|
||||
|
||||
noteSaveEnter
|
||||
@@ -142,7 +142,7 @@ export function uiNoteEditor(context) {
|
||||
.append('div')
|
||||
.attr('class', 'buttons');
|
||||
|
||||
if (_note.newFeature) {
|
||||
if (_note.isNew()) {
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', 'button add-note-button action')
|
||||
@@ -215,10 +215,9 @@ export function uiNoteEditor(context) {
|
||||
}
|
||||
|
||||
|
||||
noteEditor.note = function(_, __) {
|
||||
noteEditor.note = function(_) {
|
||||
if (!arguments.length) return _note;
|
||||
_note = _;
|
||||
_note.update({ newFeature: __ });
|
||||
return noteEditor;
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ export function uiNoteHeader() {
|
||||
.append('div')
|
||||
.attr('class', 'note-icon-annotation')
|
||||
.call(svgIcon('#iD-icon-more', 'note-annotation'));
|
||||
} else if (_note.newFeature) {
|
||||
} else if (_note.isNew()) {
|
||||
iconEnter
|
||||
.append('div')
|
||||
.attr('class', 'note-icon-annotation')
|
||||
@@ -48,7 +48,7 @@ export function uiNoteHeader() {
|
||||
.append('div')
|
||||
.attr('class', 'note-header-label')
|
||||
.text(function(d) {
|
||||
if (_note.newFeature) { return t('note.new'); }
|
||||
if (_note.isNew()) { return t('note.new'); }
|
||||
return t('note.note') + ' ' + d.id + ' ' +
|
||||
(d.status === 'closed' ? t('note.closed') : '');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user