Improve usability of Save, Cancel buttons

(closes #3040)
This commit is contained in:
Bryan Housel
2016-04-07 00:53:32 -04:00
parent 668d4e9fe6
commit bd57b81192
2 changed files with 10 additions and 9 deletions
+2 -1
View File
@@ -2429,7 +2429,8 @@ div.full-screen > button:hover {
vertical-align: middle;
}
.save-section .buttons .action {
.save-section .buttons .action,
.save-section .buttons .secondary-action {
display: inline-block;
margin: 0 20px 0 0;
text-align: center;
+8 -8
View File
@@ -151,6 +151,14 @@ iD.ui.Commit = function(context) {
var buttonSection = saveSection.append('div')
.attr('class','buttons fillL cf');
var cancelButton = buttonSection.append('button')
.attr('class', 'secondary-action col5 button cancel-button')
.on('click.cancel', function() { dispatch.cancel(); });
cancelButton.append('span')
.attr('class', 'label')
.text(t('commit.cancel'));
var saveButton = buttonSection.append('button')
.attr('class', 'action col5 button save-button')
.attr('disabled', function() {
@@ -167,14 +175,6 @@ iD.ui.Commit = function(context) {
.attr('class', 'label')
.text(t('commit.save'));
var cancelButton = buttonSection.append('button')
.attr('class', 'action col5 button cancel-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')