Don't hard code form-field-structure field name

(radiobox with structure extras can be used for other fields)
This commit is contained in:
Bryan Housel
2017-10-02 09:26:54 -04:00
parent f7b7bd7d5f
commit 7ba3bf3a45
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -1420,12 +1420,12 @@ button.save.has-count .count::before {
/* preset form cycleway */
/* preset form structure extras */
.form-field-structure .structure-extras-wrap li,
.structure-extras-wrap li,
.form-field-cycleway .preset-input-wrap li,
.form-field-access .preset-input-wrap li {
border-bottom: 1px solid #ccc;
}
.form-field-structure .structure-extras-wrap li:last-child,
.structure-extras-wrap li:last-child,
.form-field-cycleway .preset-input-wrap li:last-child,
.form-field-access .preset-input-wrap li:last-child {
border-bottom: 0;
+2 -3
View File
@@ -25,8 +25,7 @@ export function uiFieldRadio(field, context) {
function selectedKey() {
var selector = '.form-field-structure .toggle-list label.active input',
node = d3_selectAll(selector);
var node = wrap.selectAll('.toggle-list label.active input');
return !node.empty() && node.datum();
}
@@ -85,7 +84,7 @@ export function uiFieldRadio(field, context) {
var extrasWrap = selection.selectAll('.structure-extras-wrap')
.data(selected ? [0] : []);
.data(selected ? [0] : []);
extrasWrap.exit()
.remove();