Add colored changeset icons

This commit is contained in:
Aaron Lidman
2013-10-22 11:48:21 -04:00
parent a0d3694f29
commit df6a292a44
2 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -577,6 +577,8 @@ button[disabled] .icon.nearby { background-position: -340px -40px;}
.icon.line.created { background-position: -320px -100px;}
.icon.area.created { background-position: -340px -100px;}
.icon.modified { opacity: .5; }
/* Out link is special */
.icon.out-link { height: 14px; width: 14px; background-position: -500px 0;}
@@ -2462,7 +2464,7 @@ img.wiki-image {
background-color: #ececec;
}
.mode-save .changeset-list .icon {
.mode-save .changeset-list .alert {
opacity: 0.5;
}
+6 -2
View File
@@ -151,7 +151,8 @@ iD.ui.Commit = function(context) {
li.append('span')
.attr('class', function(d) {
var graph = d.changeType === 'deleted' ? base : context.graph();
return graph.entity(d.entity.id).geometry(graph) + ' icon icon-pre-text';
return graph.entity(d.entity.id).geometry(graph) + ' ' + d.changeType +
' icon icon-pre-text';
});
li.append('span')
@@ -170,7 +171,10 @@ iD.ui.Commit = function(context) {
li.append('span')
.attr('class', 'entity-name')
.text(function(d) {
return ' ' + (iD.util.displayName(d.entity) || '');
var name = iD.util.displayName(d.entity) || '',
string = '';
if (name !== '') string += ':';
return string += ' ' + name;
});
li.style('opacity', 0)