mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-04 10:24:21 +00:00
Replace 'X' with Cancel button on save panel (closes #2378)
This commit is contained in:
@@ -2427,6 +2427,13 @@ img.wiki-image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.save-section .buttons .action {
|
||||
display: inline-block;
|
||||
margin: 0 20px 0 0;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.loading-modal {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ iD.ui.Commit = function(context) {
|
||||
summary = context.history().difference().summary();
|
||||
|
||||
function zoomToEntity(change) {
|
||||
|
||||
var entity = change.entity;
|
||||
if (change.changeType !== 'deleted' &&
|
||||
context.graph().entity(entity.id).geometry(context.graph()) !== 'vertex') {
|
||||
@@ -20,18 +19,13 @@ iD.ui.Commit = function(context) {
|
||||
var header = selection.append('div')
|
||||
.attr('class', 'header fillL');
|
||||
|
||||
header.append('button')
|
||||
.attr('class', 'fr')
|
||||
.on('click.commit', function() { dispatch.cancel(); })
|
||||
.append('span')
|
||||
.attr('class', 'icon close');
|
||||
|
||||
header.append('h3')
|
||||
.text(t('commit.title'));
|
||||
|
||||
var body = selection.append('div')
|
||||
.attr('class', 'body');
|
||||
|
||||
|
||||
// Comment Section
|
||||
var commentSection = body.append('div')
|
||||
.attr('class', 'modal-section form-field commit-form');
|
||||
@@ -50,6 +44,7 @@ iD.ui.Commit = function(context) {
|
||||
|
||||
commentField.node().select();
|
||||
|
||||
|
||||
// Warnings
|
||||
var warnings = body.selectAll('div.warning-section')
|
||||
.data([context.history().validate(changes)])
|
||||
@@ -86,9 +81,10 @@ iD.ui.Commit = function(context) {
|
||||
.placement('top')
|
||||
);
|
||||
|
||||
// Save Section
|
||||
|
||||
// Upload Explanation
|
||||
var saveSection = body.append('div')
|
||||
.attr('class','modal-section fillL cf');
|
||||
.attr('class','modal-section save-section fillL cf');
|
||||
|
||||
var prose = saveSection.append('p')
|
||||
.attr('class', 'commit-info')
|
||||
@@ -115,9 +111,13 @@ iD.ui.Commit = function(context) {
|
||||
prose.html(t('commit.upload_explanation_with_user', {user: userLink.html()}));
|
||||
});
|
||||
|
||||
// Confirm Button
|
||||
var saveButton = saveSection.append('button')
|
||||
.attr('class', 'action col6 button')
|
||||
|
||||
// Buttons
|
||||
var buttonSection = saveSection.append('div')
|
||||
.attr('class','buttons fillL cf');
|
||||
|
||||
var saveButton = buttonSection.append('button')
|
||||
.attr('class', 'action col5 button')
|
||||
.on('click.save', function() {
|
||||
dispatch.save({
|
||||
comment: commentField.node().value
|
||||
@@ -128,6 +128,16 @@ iD.ui.Commit = function(context) {
|
||||
.attr('class', 'label')
|
||||
.text(t('commit.save'));
|
||||
|
||||
var cancelButton = buttonSection.append('button')
|
||||
.attr('class', 'action col5 button')
|
||||
.on('click.cancel', function() { dispatch.cancel(); });
|
||||
|
||||
cancelButton.append('span')
|
||||
.attr('class', 'label')
|
||||
.text(t('commit.cancel'));
|
||||
|
||||
|
||||
// Changes
|
||||
var changeSection = body.selectAll('div.commit-section')
|
||||
.data([0])
|
||||
.enter()
|
||||
|
||||
Reference in New Issue
Block a user