mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
adding placeholder text and exception for showing placeholder on radio buttons during hover.
This commit is contained in:
+13
-4
@@ -1028,6 +1028,19 @@ a:hover .icon.out-link { background-position: -500px -14px;}
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/* Add placeholder only on hover for radio buttons, TODO: make this less hacky */
|
||||
.inspector-hover .form-field.preset-radio .placeholder {
|
||||
color: #a9a9a9;
|
||||
display: block;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
/* Hide placeholder for radio buttons if another is active, or not in hover state */
|
||||
.form-field.preset-radio button.active ~ .placeholder,
|
||||
.form-field.preset-radio .placeholder {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* adding additional preset fields */
|
||||
|
||||
.more-buttons {
|
||||
@@ -1297,10 +1310,6 @@ input[type=number] {
|
||||
|
||||
/* Name + translate form */
|
||||
|
||||
.form-field-name input.localized-main {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.form-field .localized-main {
|
||||
padding-right: 10%;
|
||||
}
|
||||
|
||||
+413
-405
File diff suppressed because it is too large
Load Diff
@@ -117,8 +117,9 @@
|
||||
},
|
||||
"capacity": {
|
||||
"key": "capacity",
|
||||
"type": "text",
|
||||
"label": "Capacity"
|
||||
"type": "number",
|
||||
"label": "Capacity",
|
||||
"placeholder": "50, 100, 200..."
|
||||
},
|
||||
"cardinal_direction": {
|
||||
"key": "direction",
|
||||
@@ -213,7 +214,8 @@
|
||||
"fax": {
|
||||
"key": "fax",
|
||||
"type": "tel",
|
||||
"label": "Fax"
|
||||
"label": "Fax",
|
||||
"placeholder": "+31 42 123 4567"
|
||||
},
|
||||
"fee": {
|
||||
"key": "fee",
|
||||
@@ -274,7 +276,8 @@
|
||||
"lanes": {
|
||||
"key": "lanes",
|
||||
"type": "number",
|
||||
"label": "Lanes"
|
||||
"label": "Lanes",
|
||||
"placeholder": "1, 2, 3..."
|
||||
},
|
||||
"layer": {
|
||||
"key": "layer",
|
||||
@@ -289,7 +292,8 @@
|
||||
"levels": {
|
||||
"key": "building:levels",
|
||||
"type": "number",
|
||||
"label": "Levels"
|
||||
"label": "Levels",
|
||||
"placeholder": "2, 4, 6..."
|
||||
},
|
||||
"location": {
|
||||
"key": "location",
|
||||
@@ -304,12 +308,14 @@
|
||||
"maxspeed": {
|
||||
"key": "maxspeed",
|
||||
"type": "maxspeed",
|
||||
"label": "Speed Limit"
|
||||
"label": "Speed Limit",
|
||||
"placeholder": "40, 50, 60..."
|
||||
},
|
||||
"name": {
|
||||
"key": "name",
|
||||
"type": "localized",
|
||||
"label": "Name"
|
||||
"label": "Name",
|
||||
"placeholder": "Common name (if any)"
|
||||
},
|
||||
"natural": {
|
||||
"key": "natural",
|
||||
@@ -378,7 +384,8 @@
|
||||
"type": "tel",
|
||||
"icon": "telephone",
|
||||
"universal": true,
|
||||
"label": "Phone"
|
||||
"label": "Phone",
|
||||
"placeholder": "+31 42 123 4567"
|
||||
},
|
||||
"place": {
|
||||
"key": "place",
|
||||
@@ -473,6 +480,7 @@
|
||||
"cutting"
|
||||
],
|
||||
"label": "Structure",
|
||||
"placeholder": "Unkown",
|
||||
"strings": {
|
||||
"options": {
|
||||
"bridge": "Bridge",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"key": "capacity",
|
||||
"type": "text",
|
||||
"label": "Capacity"
|
||||
"type": "number",
|
||||
"label": "Capacity",
|
||||
"placeholder": "50, 100, 200..."
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"key": "fax",
|
||||
"type": "tel",
|
||||
"label": "Fax"
|
||||
"label": "Fax",
|
||||
"placeholder":"+31 42 123 4567"
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"key": "lanes",
|
||||
"type": "number",
|
||||
"label": "Lanes"
|
||||
"label": "Lanes",
|
||||
"placeholder":"1, 2, 3..."
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"key": "building:levels",
|
||||
"type": "number",
|
||||
"label": "Levels"
|
||||
"label": "Levels",
|
||||
"placeholder": "2, 4, 6..."
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"key": "maxspeed",
|
||||
"type": "maxspeed",
|
||||
"label": "Speed Limit"
|
||||
"label": "Speed Limit",
|
||||
"placeholder": "40, 50, 60..."
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"key": "name",
|
||||
"type": "localized",
|
||||
"label": "Name"
|
||||
"label": "Name",
|
||||
"placeholder": "Common name (if any)"
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
"type": "tel",
|
||||
"icon": "telephone",
|
||||
"universal": true,
|
||||
"label": "Phone"
|
||||
"label": "Phone",
|
||||
"placeholder": "+31 42 123 4567"
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
"cutting"
|
||||
],
|
||||
"label": "Structure",
|
||||
"placeholder": "Unkown",
|
||||
"strings": {
|
||||
"options": {
|
||||
"bridge": "Bridge",
|
||||
|
||||
Vendored
+15
-7
@@ -446,7 +446,8 @@
|
||||
"label": "Building"
|
||||
},
|
||||
"capacity": {
|
||||
"label": "Capacity"
|
||||
"label": "Capacity",
|
||||
"placeholder": "50, 100, 200..."
|
||||
},
|
||||
"cardinal_direction": {
|
||||
"label": "Direction"
|
||||
@@ -489,7 +490,8 @@
|
||||
"label": "Type"
|
||||
},
|
||||
"fax": {
|
||||
"label": "Fax"
|
||||
"label": "Fax",
|
||||
"placeholder": "+31 42 123 4567"
|
||||
},
|
||||
"fee": {
|
||||
"label": "Fee"
|
||||
@@ -523,7 +525,8 @@
|
||||
"label": "Type"
|
||||
},
|
||||
"lanes": {
|
||||
"label": "Lanes"
|
||||
"label": "Lanes",
|
||||
"placeholder": "1, 2, 3..."
|
||||
},
|
||||
"layer": {
|
||||
"label": "Layer"
|
||||
@@ -532,7 +535,8 @@
|
||||
"label": "Type"
|
||||
},
|
||||
"levels": {
|
||||
"label": "Levels"
|
||||
"label": "Levels",
|
||||
"placeholder": "2, 4, 6..."
|
||||
},
|
||||
"location": {
|
||||
"label": "Location"
|
||||
@@ -541,10 +545,12 @@
|
||||
"label": "Type"
|
||||
},
|
||||
"maxspeed": {
|
||||
"label": "Speed Limit"
|
||||
"label": "Speed Limit",
|
||||
"placeholder": "40, 50, 60..."
|
||||
},
|
||||
"name": {
|
||||
"label": "Name"
|
||||
"label": "Name",
|
||||
"placeholder": "Common name (if any)"
|
||||
},
|
||||
"natural": {
|
||||
"label": "Natural"
|
||||
@@ -577,7 +583,8 @@
|
||||
"label": "Type"
|
||||
},
|
||||
"phone": {
|
||||
"label": "Phone"
|
||||
"label": "Phone",
|
||||
"placeholder": "+31 42 123 4567"
|
||||
},
|
||||
"place": {
|
||||
"label": "Type"
|
||||
@@ -623,6 +630,7 @@
|
||||
},
|
||||
"structure": {
|
||||
"label": "Structure",
|
||||
"placeholder": "Unkown",
|
||||
"options": {
|
||||
"bridge": "Bridge",
|
||||
"tunnel": "Tunnel",
|
||||
|
||||
@@ -19,7 +19,8 @@ iD.ui.preset.maxspeed = function(field, context) {
|
||||
|
||||
input.enter().append('input')
|
||||
.attr('type', 'text')
|
||||
.attr('id', 'preset-input-' + field.id);
|
||||
.attr('id', 'preset-input-' + field.id)
|
||||
.attr('placeholder', field.placeholder());
|
||||
|
||||
input
|
||||
.on('change', change)
|
||||
|
||||
@@ -9,7 +9,7 @@ iD.ui.preset.radio = function(field) {
|
||||
var wrap = selection.selectAll('.preset-input-wrap')
|
||||
.data([0]);
|
||||
|
||||
wrap.enter().append('div')
|
||||
var buttonWrap = wrap.enter().append('div')
|
||||
.attr('class', 'preset-input-wrap toggle-list radio-wrap');
|
||||
|
||||
buttons = wrap.selectAll('button')
|
||||
@@ -24,6 +24,10 @@ iD.ui.preset.radio = function(field) {
|
||||
change();
|
||||
});
|
||||
|
||||
buttonWrap.append('span')
|
||||
.attr('class','placeholder')
|
||||
.text(field.placeholder());
|
||||
|
||||
var remove = wrap.selectAll('button.remove')
|
||||
.data([0]);
|
||||
|
||||
@@ -38,6 +42,7 @@ iD.ui.preset.radio = function(field) {
|
||||
buttons.classed('active', false);
|
||||
change();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function change() {
|
||||
|
||||
Reference in New Issue
Block a user