mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
updated: notes save buttons
This commit is contained in:
@@ -68,7 +68,6 @@
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* Note editor UI */
|
||||
#new-comment-input {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
|
||||
@@ -3566,10 +3566,16 @@ img.tile-debug {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.save-section .buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.save-section .buttons .action,
|
||||
.save-section .buttons .secondary-action {
|
||||
display: inline-block;
|
||||
margin: 0 20px 0 0;
|
||||
width: 45%;
|
||||
margin: 10px auto;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@@ -615,7 +615,8 @@ en:
|
||||
title: Edit note
|
||||
anonymous: anonymous
|
||||
commentTitle: Comments
|
||||
resolve: Resolve
|
||||
close: Resolve
|
||||
reopen: Reopen
|
||||
newComment: New Comment
|
||||
inputPlaceholder: Enter a comment to share with other users.
|
||||
comment: Comment
|
||||
|
||||
3
dist/locales/en.json
vendored
3
dist/locales/en.json
vendored
@@ -748,7 +748,8 @@
|
||||
"title": "Edit note",
|
||||
"anonymous": "anonymous",
|
||||
"commentTitle": "Comments",
|
||||
"resolve": "Resolve",
|
||||
"close": "Resolve",
|
||||
"reopen": "Reopen",
|
||||
"newComment": "New Comment",
|
||||
"inputPlaceholder": "Enter a comment to share with other users.",
|
||||
"comment": "Comment",
|
||||
|
||||
@@ -220,14 +220,14 @@ export function uiCommit(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('commit.cancel'));
|
||||
|
||||
buttonEnter
|
||||
.append('button')
|
||||
.attr('class', 'action col5 button save-button')
|
||||
.attr('class', 'action button save-button')
|
||||
.append('span')
|
||||
.attr('class', 'label')
|
||||
.text(t('commit.save'));
|
||||
|
||||
@@ -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