refining modals.

This commit is contained in:
Saman Bemel-Benrud
2012-12-19 15:22:19 -05:00
parent a8a26d5d10
commit 2fc2ef63f4
4 changed files with 38 additions and 33 deletions

View File

@@ -730,6 +730,8 @@ div.typeahead a:first-child {
text-align: center;
}
.modal button { margin-top: 0;}
.shaded {
z-index: 2;
position: relative;
@@ -780,8 +782,10 @@ div.typeahead a:first-child {
font:normal 12px/20px 'Helvetica Neue', Arial, sans-serif;
}
.commit-modal .buttons button { margin-top: 0;}
.commit-section {
.commit-modal .buttons {
padding-bottom: 10px;
margin-bottom: 10px;
border-bottom: 1px solid #ccc;
}
/* Notices

View File

@@ -38,16 +38,16 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="271.55795"
inkscape:cy="81.516722"
inkscape:zoom="1"
inkscape:cx="661.39825"
inkscape:cy="49.903618"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1560"
inkscape:window-height="922"
inkscape:window-x="228"
inkscape:window-y="77"
inkscape:window-x="1136"
inkscape:window-y="155"
inkscape:window-maximized="0"
fit-margin-top="0"
fit-margin-left="0"

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

@@ -7,7 +7,32 @@ iD.commit = function() {
body = selection.append('div').attr('class', 'body');
header.append('h2').text('Upload Changes to OpenStreetMap');
header.append('p').text('the changes you upload will be visible on all maps using OpenStreetMap data');
header.append('p').text('The changes you upload will be visible on all maps that use OpenStreetMap data.');
body.append('div').attr('class','pad1')
.append('textarea')
.attr('class', 'changeset-comment pad1')
.attr('placeholder', 'Brief Description of your contributions');
var buttonwrap = body.append('div')
.attr('class', 'buttons');
var savebutton = buttonwrap.append('button')
.attr('class', 'action wide')
.on('click.save', function() {
event.save({
comment: d3.select('textarea.changeset-comment').node().value
});
});
savebutton.append('span').attr('class','icon save icon-pre-text')
savebutton.append('span').attr('class','label').text('Upload')
var cancelbutton = buttonwrap.append('button')
.attr('class', 'cancel wide')
.on('click.cancel', function() {
event.cancel();
});
cancelbutton.append('span').attr('class','icon close icon-pre-text')
cancelbutton.append('span').attr('class','label').text('Cancel')
var section = body.selectAll('div.commit-section')
.data(['modified', 'deleted', 'created'].filter(function(d) {
@@ -34,31 +59,6 @@ iD.commit = function() {
return iD.util.friendlyName(d);
})
.attr('title', iD.util.tagText);
body.append('div').attr('class','pad1')
.append('textarea')
.attr('class', 'changeset-comment pad1')
.attr('placeholder', 'Brief Description');
var buttonwrap = body.append('div')
.attr('class', 'buttons');
var savebutton = buttonwrap.append('button')
.attr('class', 'action wide')
.on('click.save', function() {
event.save({
comment: d3.select('textarea.changeset-comment').node().value
});
});
savebutton.append('span').attr('class','icon save icon-pre-text')
savebutton.append('span').attr('class','label').text('Save')
var cancelbutton = buttonwrap.append('button')
.attr('class', 'cancel wide')
.on('click.cancel', function() {
event.cancel();
});
cancelbutton.append('span').attr('class','icon close icon-pre-text')
cancelbutton.append('span').attr('class','label').text('Cancel')
}
return d3.rebind(commit, event, 'on');

View File

@@ -2,6 +2,7 @@ iD.confirm = function(message) {
var modal = iD.modal();
modal.select('.modal').classed('modal-alert', true);
modal.select('.content')
.classed('pad1', true)
.append('div').attr('class', 'description pad1');
var nochanges = modal.select('.content')
.append('button')