mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Don't show help/remove buttons for empty row
This commit is contained in:
24
css/app.css
24
css/app.css
@@ -405,16 +405,6 @@ button.Browse .label {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.inspector-inner button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.inspector-inner button.tag-help {
|
||||
right: 30px;
|
||||
}
|
||||
|
||||
.inspector-wrap a.permalink {
|
||||
text-decoration:none;
|
||||
margin-right:1em;
|
||||
@@ -453,6 +443,20 @@ button.Browse .label {
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.tag-row button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.tag-row-empty button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tag-row button.tag-help {
|
||||
right: 30px;
|
||||
}
|
||||
|
||||
.inspector-buttons {
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
@@ -70,23 +70,25 @@ iD.Inspector = function() {
|
||||
}
|
||||
|
||||
var li = inspectorwrap.selectAll('li')
|
||||
.data(data, function(d) { return [d.key, d.value]; });
|
||||
.data(data, function(d) { return d.key; });
|
||||
|
||||
li.exit().remove();
|
||||
|
||||
var row = li.enter().append('li').attr('class','tag-row');
|
||||
var inputs = row.append('div').attr('class','input-wrap');
|
||||
|
||||
li.classed('tag-row-empty', emptyTag);
|
||||
|
||||
inputs.append('input')
|
||||
.property('type', 'text')
|
||||
.attr('class', 'key')
|
||||
.property('value', function(d, i) { return d.key; })
|
||||
.property('value', function(d) { return d.key; })
|
||||
.on('keyup.update', setKey);
|
||||
|
||||
inputs.append('input')
|
||||
.property('type', 'text')
|
||||
.attr('class', 'value')
|
||||
.property('value', function(d, i) { return d.value; })
|
||||
.property('value', function(d) { return d.value; })
|
||||
.on('keyup.update', setValue)
|
||||
.on('keydown.push-more', pushMore)
|
||||
.each(bindTypeahead);
|
||||
|
||||
Reference in New Issue
Block a user