mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-28 22:56:31 +02:00
+30
-28
@@ -48,6 +48,36 @@ iD.ui.Commit = function(context) {
|
||||
|
||||
commentField.node().select();
|
||||
|
||||
// Warnings
|
||||
var warnings = body.selectAll('div.warning-section')
|
||||
.data([iD.validate(changes, context.graph())])
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'modal-section warning-section fillL2')
|
||||
.style('display', function(d) { return _.isEmpty(d) ? 'none' : null; })
|
||||
.style('background', '#ffb');
|
||||
|
||||
warnings.append('h3')
|
||||
.text(t('commit.warnings'));
|
||||
|
||||
var warningLi = warnings.append('ul')
|
||||
.attr('class', 'changeset-list')
|
||||
.selectAll('li')
|
||||
.data(function(d) { return d; })
|
||||
.enter()
|
||||
.append('li')
|
||||
.style()
|
||||
.on('mouseover', mouseover)
|
||||
.on('mouseout', mouseout)
|
||||
.on('click', warningClick);
|
||||
|
||||
warningLi.append('span')
|
||||
.attr('class', 'alert icon icon-pre-text');
|
||||
|
||||
warningLi.append('strong').text(function(d) {
|
||||
return d.message;
|
||||
});
|
||||
|
||||
// Save Section
|
||||
var saveSection = body.append('div')
|
||||
.attr('class','modal-section fillL cf');
|
||||
@@ -90,34 +120,6 @@ iD.ui.Commit = function(context) {
|
||||
.attr('class', 'label')
|
||||
.text(t('commit.save'));
|
||||
|
||||
// Warnings
|
||||
var warnings = body.selectAll('div.warning-section')
|
||||
.data([iD.validate(changes, context.graph())])
|
||||
.enter()
|
||||
.append('div')
|
||||
.attr('class', 'modal-section warning-section fillL2')
|
||||
.style('display', function(d) { return _.isEmpty(d) ? 'none' : null; });
|
||||
|
||||
warnings.append('h3')
|
||||
.text(t('commit.warnings'));
|
||||
|
||||
var warningLi = warnings.append('ul')
|
||||
.attr('class', 'changeset-list')
|
||||
.selectAll('li')
|
||||
.data(function(d) { return d; })
|
||||
.enter()
|
||||
.append('li')
|
||||
.on('mouseover', mouseover)
|
||||
.on('mouseout', mouseout)
|
||||
.on('click', warningClick);
|
||||
|
||||
warningLi.append('span')
|
||||
.attr('class', 'alert icon icon-pre-text');
|
||||
|
||||
warningLi.append('strong').text(function(d) {
|
||||
return d.message;
|
||||
});
|
||||
|
||||
var changeSection = body.selectAll('div.commit-section')
|
||||
.data([0])
|
||||
.enter()
|
||||
|
||||
Reference in New Issue
Block a user