mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 13:38:26 +02:00
updated: notes save buttons
This commit is contained in:
@@ -156,22 +156,45 @@ export function uiNoteEditor(context) {
|
||||
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', 'secondary-action col5 button cancel-button')
|
||||
.attr('class', 'secondary-action button cancel-button')
|
||||
.append('span')
|
||||
.attr('class', 'label')
|
||||
.text(t('note.cancel'));
|
||||
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', 'action col5 button save-button')
|
||||
.attr('class', 'action button save-button')
|
||||
.append('span')
|
||||
.attr('class', 'label')
|
||||
.text(t('note.save'));
|
||||
|
||||
var status;
|
||||
if (_note.status) {
|
||||
status = _note.status === 'open' ? t('note.close') : t('note.reopen');
|
||||
}
|
||||
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', _note.status + '-button status-button action button')
|
||||
.append('span')
|
||||
.attr('class', 'label')
|
||||
.text(status);
|
||||
|
||||
|
||||
// update
|
||||
buttonSection = buttonSection
|
||||
.merge(buttonEnter);
|
||||
|
||||
buttonSection.selectAll('.close-button')
|
||||
.on('click.close', function() {
|
||||
console.log('close button clicked');
|
||||
});
|
||||
|
||||
buttonSection.selectAll('.reopen-button')
|
||||
.on('click.reopen', function() {
|
||||
console.log('reopen button clicked');
|
||||
});
|
||||
|
||||
buttonSection.selectAll('.cancel-button')
|
||||
.on('click.cancel', function() {
|
||||
// var selectedID = commitChanges.entityID(); TODO: cancel note event
|
||||
@@ -194,11 +217,6 @@ export function uiNoteEditor(context) {
|
||||
var saveSection = selection.selectAll('.save-section')
|
||||
.data([0]);
|
||||
|
||||
// saveSection = saveSection.enter()
|
||||
// .append('h4')
|
||||
// .text(t('note.newComment'))
|
||||
// .merge(saveSection);
|
||||
|
||||
saveSection = saveSection.enter()
|
||||
.append('div')
|
||||
.attr('class','save-section cf')
|
||||
|
||||
Reference in New Issue
Block a user